@acorex-platform/module-conversation-client 0.0.21

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.
Files changed (35) hide show
  1. package/fesm2022/acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-DsjrXRZ6.mjs +12766 -0
  2. package/fesm2022/acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-DsjrXRZ6.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-conversation-client-after-message-sent.command-D-DZ9ylV.mjs +35 -0
  4. package/fesm2022/acorex-platform-module-conversation-client-after-message-sent.command-D-DZ9ylV.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-module-conversation-client-assist-delegated-agent-detail-popup.component-BfjJCQ-e.mjs +492 -0
  6. package/fesm2022/acorex-platform-module-conversation-client-assist-delegated-agent-detail-popup.component-BfjJCQ-e.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-conversation-client-assist-tool-detail-popup.component-GC58B_n0.mjs +120 -0
  8. package/fesm2022/acorex-platform-module-conversation-client-assist-tool-detail-popup.component-GC58B_n0.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-conversation-client-chat-call-session-page.component-DkX4JSbN.mjs +871 -0
  10. package/fesm2022/acorex-platform-module-conversation-client-chat-call-session-page.component-DkX4JSbN.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-conversation-client-chat-call-start-popup.component-D4go5xbr.mjs +89 -0
  12. package/fesm2022/acorex-platform-module-conversation-client-chat-call-start-popup.component-D4go5xbr.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-conversation-client-chat-conversation-info-media-view.component-BVJdVPke.mjs +108 -0
  14. package/fesm2022/acorex-platform-module-conversation-client-chat-conversation-info-media-view.component-BVJdVPke.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-conversation-client-comments-page.component-Bq4SdK0_.mjs +83 -0
  16. package/fesm2022/acorex-platform-module-conversation-client-comments-page.component-Bq4SdK0_.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-conversation-client-contracts.mjs +225 -0
  18. package/fesm2022/acorex-platform-module-conversation-client-contracts.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-module-conversation-client-emit-typing-indicator.command-BzsN1_ns.mjs +29 -0
  20. package/fesm2022/acorex-platform-module-conversation-client-emit-typing-indicator.command-BzsN1_ns.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-module-conversation-client-mark-conversation-unread.command-BlYDwGVe.mjs +30 -0
  22. package/fesm2022/acorex-platform-module-conversation-client-mark-conversation-unread.command-BlYDwGVe.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-module-conversation-client-open-chat.command-B03q60Qx.mjs +42 -0
  24. package/fesm2022/acorex-platform-module-conversation-client-open-chat.command-B03q60Qx.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-module-conversation-client-retry-assist-response.command-BQLK6F69.mjs +34 -0
  26. package/fesm2022/acorex-platform-module-conversation-client-retry-assist-response.command-BQLK6F69.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-module-conversation-client-start-direct-chat.command-CfSIVHDu.mjs +80 -0
  28. package/fesm2022/acorex-platform-module-conversation-client-start-direct-chat.command-CfSIVHDu.mjs.map +1 -0
  29. package/fesm2022/acorex-platform-module-conversation-client-sync-read-state.command-B1Z_gZ6O.mjs +142 -0
  30. package/fesm2022/acorex-platform-module-conversation-client-sync-read-state.command-B1Z_gZ6O.mjs.map +1 -0
  31. package/fesm2022/acorex-platform-module-conversation-client.mjs +2 -0
  32. package/fesm2022/acorex-platform-module-conversation-client.mjs.map +1 -0
  33. package/package.json +28 -0
  34. package/types/acorex-platform-module-conversation-client-contracts.d.ts +497 -0
  35. package/types/acorex-platform-module-conversation-client.d.ts +1614 -0
@@ -0,0 +1,1614 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { Provider, InjectionToken, Type, Signal, OnInit, ElementRef, OnDestroy } from '@angular/core';
3
+ import * as i1 from '@acorex-platform/framework-client/layout/widget-core';
4
+ import { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';
5
+ import * as i2 from '@angular/router';
6
+ import { AXPBackgroundOperationHandler, AXPBackgroundOperation, AXPFileStorageService } from '@acorex-platform/framework-client/common';
7
+ import * as _acorex_platform_framework_shared_core from '@acorex-platform/framework-shared/core';
8
+ import { AXPExecuteCommand, AXPMultiLanguageString, AXPWidgetNode, AXPUserReference, AXPEntityReference } from '@acorex-platform/framework-shared/core';
9
+ import { AXPDeviceService } from '@acorex-platform/framework-client/core';
10
+ import { AXPPageLayoutBaseComponent } from '@acorex-platform/framework-client/layout/views';
11
+ import * as _acorex_components_conversation from '@acorex/components/conversation';
12
+ import { AXConversationApi, AXConversation, AXConversationMessageApi, AXConversationMessage, AXConversationRealtimeApi, AXConversationUserApi, AXConversationCreateData, AXConversationPagination, AXConversationFilters, AXConversationPaginatedResult, AXConversationUpdateData, AXConversationParticipant, AXConversationParticipantUpdate, AXConversationSettingsUpdate, AXConversationSendMessageCommand, AXConversationMessagePayload, AXConversationMessageSearchFilters, AXConversationReadReceipt, AXConversationMessageForwardData, AXConversationPinnedMessage, AXConversationConnectionStatus, AXConversationConnectionOptions, AXConversationConnectionEvent, AXConversationTypingIndicator, AXConversationNotificationEvent, AXConversationCallEvent, AXConversationUserProfileUpdate, AXConversationUserSearchFilters, AXConversationPresenceUpdate, AXConversationPresenceStatus, AXConversationBlockReportReason, AXConversationTab, AXConversationService } from '@acorex/components/conversation';
13
+ import { AXMConversationRoom, AXMConversationMessage, AXMCommentEntityData, AXReaction, AXMessagePayload, AXMReactionType } from '@acorex-platform/module-conversation-client/contracts';
14
+ import { Observable } from 'rxjs';
15
+ import { AXClickEvent, AXStyleLookType, AXPlacement } from '@acorex/cdk/common';
16
+ import { AXPAiChatResponse, AXPAiChatMessage, AXPAiChatFollowUpItem } from '@acorex-platform/module-ai-management-client';
17
+ import { AXPEntityDefinitionRegistryService, AXPEntityActionPlugin } from '@acorex-platform/framework-client/layout/entity';
18
+ import * as _angular_platform_browser from '@angular/platform-browser';
19
+ import { AXWysiwygContainerComponent } from '@acorex/components/wysiwyg';
20
+ import { AXPCommand, AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';
21
+ import { AXBasePageComponent } from '@acorex/components/page';
22
+ import { AXPWidgetConfig } from '@acorex-platform/framework-shared/widget-core';
23
+
24
+ declare class AXMConversationModule {
25
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMConversationModule, never>;
26
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXMConversationModule, never, [typeof i1.AXPWidgetCoreModule], [typeof i2.RouterModule]>;
27
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXMConversationModule>;
28
+ }
29
+
30
+ declare const AXM_CONVERSATION_ASSIST_BACKGROUND_OPERATION_KEY = "conversation-ai-assist";
31
+
32
+ declare class AXMConversationAssistBackgroundOperationHandler extends AXPBackgroundOperationHandler {
33
+ readonly providerKey = "conversation-ai-assist";
34
+ private readonly router;
35
+ private readonly chatService;
36
+ private readonly sessionService;
37
+ private readonly activatedRoute;
38
+ execute(command: AXPExecuteCommand, operation: AXPBackgroundOperation): Promise<void>;
39
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMConversationAssistBackgroundOperationHandler, never>;
40
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMConversationAssistBackgroundOperationHandler>;
41
+ }
42
+ declare const AXM_CONVERSATION_ASSIST_BACKGROUND_OPERATION_HANDLERS: Provider[];
43
+
44
+ declare class AXMChatComponent extends AXPPageLayoutBaseComponent {
45
+ #private;
46
+ private readonly conversationService;
47
+ private readonly chatConversationApi;
48
+ private readonly assistResponse;
49
+ private readonly miniChatPanelService;
50
+ private readonly composerService;
51
+ private readonly infoBarService;
52
+ /** Eagerly resolves tenant debug mode for assist debug download action visibility. */
53
+ private readonly _assistChatDebugModeInit;
54
+ private readonly activatedRoute;
55
+ private readonly dialogService;
56
+ private readonly popupService;
57
+ private readonly badgeService;
58
+ protected readonly deviceService: AXPDeviceService;
59
+ private readonly routeConversationId;
60
+ ngOnInit(): Promise<void>;
61
+ /**
62
+ * Computed signal to check if there is an active conversation selected.
63
+ */
64
+ readonly hasActiveConversation: _angular_core.Signal<boolean>;
65
+ readonly showChatList: _angular_core.Signal<boolean>;
66
+ /**
67
+ * Unread messages in other chats (excludes the open conversation), for the mobile back control.
68
+ */
69
+ readonly backBadgeCount: _angular_core.Signal<number>;
70
+ /**
71
+ * Handles conversation selection from the sidebar.
72
+ * Navigates to the selected conversation route.
73
+ * On mobile, closes the sidebar after selection.
74
+ * @param conversationId - The ID of the selected conversation.
75
+ */
76
+ onConversationSelected(conversationId: string): void;
77
+ /**
78
+ * Navigates back to the conversation list (mobile view).
79
+ * Removes the route param and clears the active conversation.
80
+ * Opens the sidebar to show the conversation list.
81
+ */
82
+ openChatList(): void;
83
+ /**
84
+ * Opens the platform conversation info panel when the info-bar title/avatar area is clicked.
85
+ */
86
+ onInfoBarClick(): void;
87
+ /** Composer Stop — abort server-side assist generation and SSE stream updates. */
88
+ onComposerGenerationCancelled(): void;
89
+ /**
90
+ * Handles Escape key from chat container.
91
+ * Replicates conversation source behavior by closing active conversation here.
92
+ * Also keeps URL and chat state in sync.
93
+ */
94
+ onContainerEscape(): void;
95
+ /**
96
+ * Toggles the start side (sidebar) visibility.
97
+ */
98
+ protected toggleStartSide(): void;
99
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMChatComponent, never>;
100
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMChatComponent, "axm-chat", never, {}, {}, never, never, true, never>;
101
+ }
102
+
103
+ /** refType for multimedia attachments sent from conversation chat. */
104
+ declare const AXM_CONVERSATION_CHAT_ATTACHMENT_REF_TYPE: string;
105
+ /** File storage category for conversation chat attachments. */
106
+ declare const AXM_CONVERSATION_CHAT_ATTACHMENT_CATEGORY = "chat-attachment";
107
+ /**
108
+ * Persists a chat attachment; {@link refId} is typically the conversation id (batch grouping for multi-send).
109
+ */
110
+ declare function persistChatAttachment(fileStorage: AXPFileStorageService, file: File, refId: string): Promise<{
111
+ fileId: string;
112
+ }>;
113
+
114
+ /** User profile, discovery, and presence for conversation chat. */
115
+ declare abstract class AXMChatUserApi extends AXConversationUserApi {
116
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMChatUserApi, never>;
117
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMChatUserApi>;
118
+ }
119
+ /** Conversation CRUD, participants, and inbox for conversation chat. */
120
+ declare abstract class AXMChatConversationApi extends AXConversationApi {
121
+ /** Reports which conversation thread is open in chat UI (mock uses this for notifications). */
122
+ reportFocusedConversation(_conversationId: string | null): void;
123
+ /**
124
+ * Returns every conversation bound to the given entity reference (entity-scoped mini chats).
125
+ * Bypasses the regular inbox filtering so entity chats remain discoverable per entity.
126
+ */
127
+ abstract findEntityConversations(entityType: string, entityId: string): Promise<AXConversation[]>;
128
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMChatConversationApi, never>;
129
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMChatConversationApi>;
130
+ }
131
+ /** Message CRUD, reactions, and assist replies for conversation chat. */
132
+ declare abstract class AXMChatMessageApi extends AXConversationMessageApi {
133
+ /**
134
+ * Re-runs AI generation for an incomplete or failed assist placeholder.
135
+ * Reuses the same message id so the conversation timeline stays ordered.
136
+ */
137
+ abstract retryAssistResponse(conversationId: string, messageId: string): Promise<AXConversationMessage>;
138
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMChatMessageApi, never>;
139
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMChatMessageApi>;
140
+ }
141
+ /** Realtime streams (messages, typing, presence) for conversation chat. */
142
+ declare abstract class AXMChatRealtimeApi extends AXConversationRealtimeApi {
143
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMChatRealtimeApi, never>;
144
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMChatRealtimeApi>;
145
+ }
146
+
147
+ /**
148
+ * Entity-backed implementation of {@link AXMChatConversationApi} using Conversation.room.
149
+ */
150
+ declare class AXMChatEntityConversationApi extends AXMChatConversationApi {
151
+ private readonly entityService;
152
+ private readonly filterService;
153
+ private readonly userApi;
154
+ private readonly conversationStore;
155
+ private readonly realtimeBus;
156
+ private readonly focusHandler;
157
+ private readonly roomQuery;
158
+ private readonly roomData;
159
+ reportFocusedConversation(conversationId: string | null): void;
160
+ private publishConversationPatch;
161
+ private resolveParticipantsForCreate;
162
+ private toParticipantRole;
163
+ createConversation(data: AXConversationCreateData): Promise<AXConversation>;
164
+ getConversation(conversationId: string): Promise<AXConversation>;
165
+ getConversations(pagination: AXConversationPagination, filters?: AXConversationFilters): Promise<AXConversationPaginatedResult<AXConversation>>;
166
+ updateConversation(conversationId: string, updates: AXConversationUpdateData): Promise<AXConversation>;
167
+ deleteConversation(conversationId: string): Promise<boolean>;
168
+ private publishConversationById;
169
+ archiveConversation(conversationId: string): Promise<void>;
170
+ unarchiveConversation(conversationId: string): Promise<void>;
171
+ pinConversation(conversationId: string): Promise<void>;
172
+ unpinConversation(conversationId: string): Promise<void>;
173
+ markConversationAsRead(conversationId: string): Promise<void>;
174
+ markConversationAsUnread(conversationId: string): Promise<void>;
175
+ searchConversations(query: string): Promise<AXConversation[]>;
176
+ filterConversations(filters: AXConversationFilters, pagination?: AXConversationPagination): Promise<AXConversationPaginatedResult<AXConversation>>;
177
+ findEntityConversations(entityType: string, entityId: string): Promise<AXConversation[]>;
178
+ getParticipants(conversationId: string): Promise<AXConversationParticipant[]>;
179
+ addParticipants(conversationId: string, userIds: string[]): Promise<AXConversation>;
180
+ removeParticipant(conversationId: string, userId: string): Promise<AXConversation>;
181
+ leaveConversation(conversationId: string): Promise<void>;
182
+ updateParticipant(conversationId: string, update: AXConversationParticipantUpdate): Promise<AXConversation>;
183
+ getConversationSettings(conversationId: string): Promise<AXConversationSettingsUpdate>;
184
+ updateConversationSettings(conversationId: string, settings: AXConversationSettingsUpdate): Promise<void>;
185
+ muteConversation(conversationId: string, duration?: number): Promise<void>;
186
+ unmuteConversation(conversationId: string): Promise<void>;
187
+ uploadConversationAvatar(_conversationId: string, _file: File): Promise<string>;
188
+ getConversationMedia(_conversationId: string, pagination?: AXConversationPagination): Promise<AXConversationPaginatedResult<unknown>>;
189
+ addConversationTags(_conversationId: string, _tags: string[]): Promise<void>;
190
+ removeConversationTags(_conversationId: string, _tags: string[]): Promise<void>;
191
+ getConversationTags(_conversationId: string): Promise<string[]>;
192
+ saveDraft(conversationId: string, draft: string): Promise<void>;
193
+ getDraft(conversationId: string): Promise<string | null>;
194
+ clearDraft(conversationId: string): Promise<void>;
195
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMChatEntityConversationApi, never>;
196
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMChatEntityConversationApi>;
197
+ }
198
+
199
+ /**
200
+ * Focus subscription, realtime room subscribe, and read-state sync for the active conversation.
201
+ */
202
+ declare class AXMChatEntityConversationFocusHandler {
203
+ private readonly userApi;
204
+ private readonly commandService;
205
+ private readonly focusService;
206
+ private readonly assistResponse;
207
+ private readonly realtimeConnection;
208
+ private subscribedConversationId;
209
+ private focusSyncTimer;
210
+ private pendingFocusConversationId;
211
+ reportFocusedConversation(conversationId: string | null): void;
212
+ private runFocusedConversationSync;
213
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMChatEntityConversationFocusHandler, never>;
214
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMChatEntityConversationFocusHandler>;
215
+ }
216
+
217
+ /**
218
+ * Room list loading and conversation mapping helpers for the entity conversation API.
219
+ */
220
+ declare class AXMChatEntityConversationRoomQueryService {
221
+ private readonly entityService;
222
+ private readonly filterService;
223
+ private readonly userApi;
224
+ private readonly roomData;
225
+ private readonly messageData;
226
+ loadChatRooms(): Promise<AXMConversationRoom[]>;
227
+ enrichRoom(room: AXMConversationRoom, options?: {
228
+ probeLastMessage?: boolean;
229
+ currentUserId?: string;
230
+ }): Promise<AXConversation>;
231
+ paginate<T>(items: T[], pagination: AXConversationPagination): AXConversationPaginatedResult<T>;
232
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMChatEntityConversationRoomQueryService, never>;
233
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMChatEntityConversationRoomQueryService>;
234
+ }
235
+
236
+ /**
237
+ * Maps a persisted room entity to the conversation {@link AXConversation} contract.
238
+ */
239
+ declare function axmRoomEntityToConversation(room: AXMConversationRoom, currentUserId?: string): AXConversation;
240
+ /**
241
+ * Maps a persisted message entity to the conversation {@link AXConversationMessage} contract.
242
+ */
243
+ declare function axmMessageEntityToMessage(message: AXMConversationMessage): AXConversationMessage;
244
+ /**
245
+ * Maps a security-management user row to {@link AXConversationParticipant}.
246
+ */
247
+ declare function axmUserRowToParticipant(user: {
248
+ id: string;
249
+ displayName?: string;
250
+ username?: string;
251
+ }): AXConversationParticipant;
252
+
253
+ /**
254
+ * Entity-backed implementation of {@link AXMChatMessageApi} using Conversation.message.
255
+ */
256
+ declare class AXMChatEntityMessageApi extends AXMChatMessageApi {
257
+ #private;
258
+ private static readonly MESSAGE_QUERY_MAX;
259
+ private readonly entityService;
260
+ private readonly filterService;
261
+ private readonly userApi;
262
+ private readonly commandService;
263
+ private readonly assistResponse;
264
+ private readonly conversationStore;
265
+ private readonly realtime;
266
+ private readonly typingStopTimers;
267
+ private readonly messageData;
268
+ private readonly roomData;
269
+ private requireConversationParticipant;
270
+ private loadConversationMessages;
271
+ private paginateMessages;
272
+ private paginateAxMessages;
273
+ private mergePersistedMessages;
274
+ private touchConversationLastMessage;
275
+ sendMessage(command: AXConversationSendMessageCommand): Promise<AXConversationMessage>;
276
+ getMessage(messageId: string): Promise<AXConversationMessage>;
277
+ getMessages(conversationId: string, pagination: AXConversationPagination): Promise<AXConversationPaginatedResult<AXConversationMessage>>;
278
+ editMessage(messageId: string, payload: AXConversationMessagePayload): Promise<AXConversationMessage>;
279
+ deleteMessage(messageId: string, _forEveryone?: boolean): Promise<void>;
280
+ deleteMessages(messageIds: string[], forEveryone?: boolean): Promise<void>;
281
+ retryAssistResponse(conversationId: string, messageId: string): Promise<AXConversationMessage>;
282
+ searchMessages(conversationId: string, filters: AXConversationMessageSearchFilters, pagination?: AXConversationPagination): Promise<AXConversationPaginatedResult<AXConversationMessage>>;
283
+ searchAllMessages(filters: AXConversationMessageSearchFilters, pagination?: AXConversationPagination): Promise<AXConversationPaginatedResult<AXConversationMessage>>;
284
+ private persistReactionsAndPublish;
285
+ addReaction(messageId: string, emoji: string): Promise<void>;
286
+ removeReaction(messageId: string, emoji: string): Promise<void>;
287
+ getAvailableReactions(): Promise<string[]>;
288
+ markAsRead(conversationId: string, messageIds: string[]): Promise<void>;
289
+ markAsUnread(conversationId: string): Promise<void>;
290
+ getReadReceipts(_messageId: string): Promise<AXConversationReadReceipt[]>;
291
+ markMessagesAsRead(messageIds: string[]): Promise<void>;
292
+ forwardMessage(_data: AXConversationMessageForwardData): Promise<AXConversationMessage[]>;
293
+ pinMessage(conversationId: string, messageId: string): Promise<void>;
294
+ unpinMessage(conversationId: string, messageId: string): Promise<void>;
295
+ getPinnedMessages(conversationId: string): Promise<AXConversationPinnedMessage[]>;
296
+ getMessageReplies(messageId: string, pagination?: AXConversationPagination): Promise<AXConversationPaginatedResult<AXConversationMessage>>;
297
+ getReplyCount(messageId: string): Promise<number>;
298
+ getForwardCount(_messageId: string): Promise<number>;
299
+ sendTypingIndicator(conversationId: string): Promise<void>;
300
+ stopTypingIndicator(conversationId: string): Promise<void>;
301
+ updateMessageMetadata(messageId: string, metadata: Record<string, unknown>): Promise<void>;
302
+ getMessageMetadata(messageId: string): Promise<Record<string, unknown>>;
303
+ updateMessageStatus(messageId: string, status: 'sending' | 'sent' | 'delivered' | 'read' | 'failed'): Promise<void>;
304
+ getMessageDeliveryStatus(_messageId: string): Promise<{
305
+ delivered: number;
306
+ read: number;
307
+ total: number;
308
+ }>;
309
+ bulkDeleteMessages(conversationId: string, messageIds: string[], forEveryone?: boolean): Promise<void>;
310
+ exportMessages(_conversationId: string, _format: 'json' | 'csv' | 'txt'): Promise<string | Blob>;
311
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMChatEntityMessageApi, never>;
312
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMChatEntityMessageApi>;
313
+ }
314
+
315
+ /**
316
+ * Entity-backed realtime API that forwards {@link AXMConversationRealtimeBus} events to conversation.
317
+ */
318
+ declare class AXMChatEntityRealtimeApi extends AXMChatRealtimeApi {
319
+ private readonly bus;
320
+ private readonly realtimeConnection;
321
+ private readonly presence;
322
+ readonly connectionStatus$: Observable<AXConversationConnectionStatus>;
323
+ connect(_options?: AXConversationConnectionOptions): Promise<void>;
324
+ disconnect(): Promise<void>;
325
+ isConnected(): boolean;
326
+ reconnect(): Promise<void>;
327
+ subscribeToConnectionEvents(): Observable<AXConversationConnectionEvent>;
328
+ subscribeToMessages(conversationId: string): Observable<AXConversationMessage>;
329
+ subscribeToMessageUpdates(conversationId?: string): Observable<AXConversationMessage>;
330
+ subscribeToMessageDeletions(_conversationId?: string): Observable<string>;
331
+ subscribeToMessageReactions(conversationId?: string): Observable<AXConversationMessage>;
332
+ subscribeToConversationUpdates(): Observable<AXConversation>;
333
+ subscribeToConversationCreated(): Observable<AXConversation>;
334
+ subscribeToConversationDeleted(): Observable<string>;
335
+ subscribeToTypingIndicators(conversationId: string): Observable<AXConversationTypingIndicator>;
336
+ subscribeToPresenceUpdates(userIds?: string[]): Observable<_acorex_components_conversation.AXConversationPresenceUpdate>;
337
+ subscribeToReadReceipts(conversationId?: string): Observable<{
338
+ messageId: string;
339
+ userId: string;
340
+ readAt: Date;
341
+ }>;
342
+ subscribeToNotifications(): Observable<AXConversationNotificationEvent>;
343
+ subscribeToCallEvents(): Observable<AXConversationCallEvent>;
344
+ subscribeToUserBlockEvents(): Observable<{
345
+ userId: string;
346
+ blocked: boolean;
347
+ }>;
348
+ subscribeToParticipantEvents(_conversationId?: string): Observable<{
349
+ conversationId: string;
350
+ userId: string;
351
+ action: 'added' | 'removed';
352
+ }>;
353
+ subscribeToSystemEvents(): Observable<{
354
+ type: string;
355
+ message: string;
356
+ data?: unknown;
357
+ }>;
358
+ subscribeToMessageStatusChanges(conversationId?: string): Observable<{
359
+ messageId: string;
360
+ status: 'sending' | 'sent' | 'delivered' | 'read' | 'failed';
361
+ timestamp: Date;
362
+ }>;
363
+ subscribeToConversationSettingsChanges(_conversationId?: string): Observable<{
364
+ conversationId: string;
365
+ settings: Record<string, unknown>;
366
+ }>;
367
+ subscribeToDraftChanges(_conversationId?: string): Observable<{
368
+ conversationId: string;
369
+ draft: string | null;
370
+ }>;
371
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMChatEntityRealtimeApi, never>;
372
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMChatEntityRealtimeApi>;
373
+ }
374
+
375
+ /**
376
+ * Entity-backed implementation of {@link AXMChatUserApi} using SecurityManagement.User.
377
+ */
378
+ declare class AXMChatEntityUserApi extends AXMChatUserApi {
379
+ private readonly sessionService;
380
+ private readonly filterService;
381
+ private readonly entityService;
382
+ private readonly usersData;
383
+ private readonly presence;
384
+ getCurrentUser(): Promise<AXConversationParticipant>;
385
+ updateProfile(updates: AXConversationUserProfileUpdate): Promise<AXConversationParticipant>;
386
+ uploadAvatar(_file: File): Promise<string>;
387
+ getUsers(pagination?: AXConversationPagination, filters?: AXConversationUserSearchFilters): Promise<AXConversationPaginatedResult<AXConversationParticipant>>;
388
+ searchUsers(query: string): Promise<AXConversationParticipant[]>;
389
+ getUserById(userId: string): Promise<AXConversationParticipant>;
390
+ getUsersByIds(userIds: string[]): Promise<AXConversationParticipant[]>;
391
+ getUserPresence(userId: string): Promise<AXConversationPresenceUpdate>;
392
+ updatePresence(status: AXConversationPresenceStatus, _statusText?: string): Promise<void>;
393
+ blockUser(_userId: string, _reason?: AXConversationBlockReportReason): Promise<void>;
394
+ unblockUser(_userId: string): Promise<void>;
395
+ getBlockedUsers(): Promise<string[]>;
396
+ reportUser(_userId: string, _reason: AXConversationBlockReportReason): Promise<void>;
397
+ getUserSettings(): Promise<Record<string, unknown>>;
398
+ updateUserSettings(_settings: Record<string, unknown>): Promise<void>;
399
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMChatEntityUserApi, never>;
400
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMChatEntityUserApi>;
401
+ }
402
+
403
+ interface AXMAssistDefaultResolverPort {
404
+ getDefaultAssistId(): Promise<string | undefined>;
405
+ }
406
+ declare const AXM_ASSIST_DEFAULT_RESOLVER_PORT: InjectionToken<AXMAssistDefaultResolverPort>;
407
+
408
+ interface AXMChatSidebarAction {
409
+ id: string;
410
+ label: string;
411
+ icon: string;
412
+ priority?: number;
413
+ run(event?: AXClickEvent): Promise<AXConversation | null | void> | AXConversation | null | void;
414
+ }
415
+ declare const AXM_CHAT_SIDEBAR_ACTION_PROVIDER: InjectionToken<AXMChatSidebarAction[]>;
416
+
417
+ /** True when the conversation is an assist / AI bot chat. */
418
+ declare function axmIsAssistBotConversation(conversation: AXConversation): boolean;
419
+ /** Sidebar tab for AI assist conversations (`type: 'bot'` or assist metadata). */
420
+ declare const AXM_CONVERSATION_TAB_BOT: AXConversationTab;
421
+
422
+ declare const AXM_CHAT_EMPTY_STATE_COMPONENT: InjectionToken<Type<unknown>>;
423
+
424
+ interface AXPAiChatFollowUpCommandLite {
425
+ name: string;
426
+ options?: unknown;
427
+ }
428
+ interface AXPAiChatFollowUpItemLite {
429
+ text: string | AXPMultiLanguageString;
430
+ command: AXPAiChatFollowUpCommandLite;
431
+ }
432
+ interface AXPAiChatTextResponseLite {
433
+ type: 'text';
434
+ content: string;
435
+ }
436
+ interface AXPAiChatNodeOrFollowUpResponseLite {
437
+ type: 'node' | 'followUp';
438
+ content: unknown;
439
+ }
440
+ interface AXPAiChatMessageLite {
441
+ role: 'assistant' | 'user' | 'tool';
442
+ responses: Array<AXPAiChatTextResponseLite | AXPAiChatNodeOrFollowUpResponseLite>;
443
+ }
444
+ interface AXPAiEffectiveAssistRowLite {
445
+ id: string;
446
+ name?: string;
447
+ title?: AXPMultiLanguageString | string;
448
+ description?: AXPMultiLanguageString | string;
449
+ professionImageUrl?: string;
450
+ initialMessages?: string | null;
451
+ starterPrompts?: Array<{
452
+ text?: string | AXPMultiLanguageString | null;
453
+ }> | null;
454
+ modelId?: string | null;
455
+ }
456
+ /** Persisted on conversation.room metadata to avoid Assist GetById on chat open. */
457
+ interface AXMAssistConversationSnapshotLite {
458
+ initialMessages?: string | null;
459
+ starterPrompts?: Array<{
460
+ text?: string | AXPMultiLanguageString | null;
461
+ }> | null;
462
+ modelId?: string | null;
463
+ }
464
+
465
+ /**
466
+ * Assist suggestion chips (starter prompts and engine {@code followUp} segments).
467
+ * Each item runs its platform command via {@link AXPCommandService}.
468
+ */
469
+ declare class AXMAssistSuggestionChipsComponent {
470
+ readonly items: _angular_core.InputSignal<AXPAiChatFollowUpItemLite[]>;
471
+ /** Tighter chip layout for mini-chat and other narrow panels. */
472
+ readonly compact: _angular_core.InputSignal<boolean>;
473
+ /** When true, sends starter prompts via the local {@link AXConversationService} instead of routing to chat. */
474
+ readonly sendInPlace: _angular_core.InputSignal<boolean>;
475
+ /** Disables all chips (e.g. parent composer is loading or sending). */
476
+ readonly disabled: _angular_core.InputSignal<boolean>;
477
+ /** Emits when an in-place send creates a new conversation (mini chat empty state). */
478
+ readonly conversationCreated: _angular_core.OutputEmitterRef<string>;
479
+ protected readonly normalizedItems: _angular_core.Signal<AXPAiChatFollowUpItemLite[]>;
480
+ private readonly busy;
481
+ protected readonly isInteractionBlocked: _angular_core.Signal<boolean>;
482
+ private readonly commandService;
483
+ private readonly conversationService;
484
+ private readonly conversationApi;
485
+ private readonly entityChatService;
486
+ private readonly assistCatalog;
487
+ private readonly translationService;
488
+ private readonly layoutTheme;
489
+ protected onChipClick(item: AXPAiChatFollowUpItemLite): Promise<void>;
490
+ protected resolveChipLabel(item: AXPAiChatFollowUpItemLite): string;
491
+ private isSendAssistChatMessageCommand;
492
+ private resolveItemText;
493
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMAssistSuggestionChipsComponent, never>;
494
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMAssistSuggestionChipsComponent, "axm-assist-suggestion-chips", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; "sendInPlace": { "alias": "sendInPlace"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "conversationCreated": "conversationCreated"; }, never, never, true, never>;
495
+ }
496
+
497
+ type AssistStarterPromptsSource = {
498
+ starterPrompts?: Array<{
499
+ text?: string | Record<string, string> | null;
500
+ }> | null;
501
+ } | Pick<AXPAiEffectiveAssistRowLite, 'starterPrompts'> | null | undefined;
502
+ interface AXMAssistStarterPromptChipOptions {
503
+ assistId?: string;
504
+ conversationId?: string;
505
+ /** When `false`, the chip command sends the message without routing to the chat app (e.g. mini chat). */
506
+ navigate?: boolean;
507
+ /** Entity reference so a chip-created conversation stays bound to its entity (mini chat). */
508
+ entityId?: string;
509
+ entityType?: string;
510
+ }
511
+ /**
512
+ * Resolves a follow-up chip command for Conversation assist.
513
+ * AI follow-up output may use invalid `Registry:*` placeholders; those map to
514
+ * {@link CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND} so the chip text is sent as the next user message.
515
+ */
516
+ declare function axmAssistResolveFollowUpCommandName(rawName: string, commandExists: (name: string) => boolean): string;
517
+ /** Rewrites invalid follow-up commands (e.g. hallucinated `Registry:*` keys) before rendering chips. */
518
+ declare function axmAssistNormalizeFollowUpItemForConversation(item: AXPAiChatFollowUpItemLite): AXPAiChatFollowUpItemLite;
519
+ declare function axmAssistNormalizeFollowUpItemsForConversation(items: AXPAiChatFollowUpItemLite[]): AXPAiChatFollowUpItemLite[];
520
+ /**
521
+ * Maps assist starter prompts to follow-up chip items that run {@link CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND}.
522
+ */
523
+ declare function axmAssistStarterPromptChipItems(source: AssistStarterPromptsSource, options?: AXMAssistStarterPromptChipOptions): AXPAiChatFollowUpItemLite[];
524
+
525
+ /**
526
+ * Temporary AI module identifiers used by conversation while AI-specific UI
527
+ * is being extracted to the conversation AI extension.
528
+ */
529
+ declare const AXM_AI_MANAGEMENT_MODULE_NAME = "AiManagement";
530
+ declare const AXM_AI_MANAGEMENT_ASSIST_ENTITY_NAME = "Assist";
531
+ declare const AXM_AI_MANAGEMENT_AGENT_ENTITY_NAME = "AiAgent";
532
+
533
+ interface AXMSendAssistChatMessageOptions {
534
+ text: string;
535
+ conversationId?: string;
536
+ assistId?: string;
537
+ targetId?: string;
538
+ navigate?: boolean;
539
+ entityId?: string;
540
+ entityType?: string;
541
+ }
542
+
543
+ /**
544
+ * Reorders assist transcript for debug UI: think first, tool/agent + tool results, then text blocks.
545
+ */
546
+ declare function axmNormalizeAssistTranscriptForChatUi(input: AXPAiChatMessage[]): AXPAiChatMessage[];
547
+ /** Debug transcript from {@code metadata.transcripts} or streaming {@code metadata.transcriptDraft}. */
548
+ declare function axmReadAssistAiTranscript(metadata: unknown): AXPAiChatMessage[] | null;
549
+ /** Raw engine transcript (chronological), without debug UI reordering. */
550
+ declare function axmReadAssistAiTranscriptRaw(metadata: unknown): AXPAiChatMessage[];
551
+ declare function axmAssistWidgetNodeFromUnknown(content: unknown, depth?: number): AXPWidgetNode | null;
552
+ /** Stable identity for widget nodes so embedded JSON vs structured `node` segments dedupe despite key order. */
553
+ declare function axmAssistWidgetNodeDedupeKey(content: unknown): string;
554
+ declare function axmSyntheticEmbedMessage(parent: AXConversationMessage, suffix: string, partial: Pick<AXConversationMessage, 'type' | 'payload'>): AXConversationMessage;
555
+ declare const AXM_ASSIST_TRANSCRIPT_LINE_PAYLOAD_TYPE: "assist-transcript-line";
556
+ interface AxmAssistTranscriptLinePayload {
557
+ type: typeof AXM_ASSIST_TRANSCRIPT_LINE_PAYLOAD_TYPE;
558
+ line: AXPAiChatMessage;
559
+ }
560
+ declare function axmNormalizeAssistTranscriptLineResponses(line: AXPAiChatMessage): AXPAiChatMessage;
561
+ /** Last {@link AXPAiChatMessage} in the engine turn (index {@code length - 1}). */
562
+ declare function axmAssistLastTranscriptLine(transcript: AXPAiChatMessage[]): AXPAiChatMessage | null;
563
+ interface AxmAssistPartitionedAnswerText {
564
+ markdown: string;
565
+ renderable: AXPAiChatResponse[];
566
+ }
567
+ /**
568
+ * Splits user-facing markdown from embedded {@code node}/{@code followUp} JSON so widgets render after text.
569
+ */
570
+ declare function axmPartitionAssistAnswerText(raw: string): AxmAssistPartitionedAnswerText;
571
+ /** Removes embedded {@code node}/{@code followUp}/aggregate JSON from answer markdown (stream + finalize). */
572
+ declare function axmSanitizeAssistUserAnswerText(raw: string): string;
573
+ /**
574
+ * Merges streamed answer markdown with transcript-derived text so finalize does not drop interim narration.
575
+ */
576
+ declare function axmResolveAssistFinalAnswerText(streamDraft: string, transcriptAnswer: string): string;
577
+ /** Replaces the payload line's text segment with the finalized answer markdown. */
578
+ declare function axmApplyAnswerTextToAssistPayloadLine(line: AXPAiChatMessage, answerText: string): AXPAiChatMessage;
579
+ /**
580
+ * User-facing payload line for the assist bubble: supervisor markdown narration for the turn, plus
581
+ * {@code node}/{@code file}/{@code followUp} from the turn (including specialist {@code agent_result}).
582
+ */
583
+ declare function axmAssistUserFacingPayloadLine(transcript: AXPAiChatMessage[]): AXPAiChatMessage | null;
584
+ declare function axmBuildAssistTranscriptLinePayload(line: AXPAiChatMessage): AxmAssistTranscriptLinePayload;
585
+ declare function axmParseAssistTranscriptLinePayload(payload: unknown): AXPAiChatMessage | null;
586
+ /** Reads finalized `{ type: 'text' }` assist payloads for markdown rendering. */
587
+ declare function axmReadPlainTextMessagePayload(payload: unknown): string;
588
+ declare function axmParseAssistTranscriptTextEnvelope(raw: string): {
589
+ thinking: string | null;
590
+ body: string;
591
+ };
592
+ /** Flattened user-visible items for one transcript line (payload bubble). */
593
+ type AxmAssistUserVisibleItem = {
594
+ kind: 'text';
595
+ content: string;
596
+ } | {
597
+ kind: 'node';
598
+ content: unknown;
599
+ } | {
600
+ kind: 'file';
601
+ fileId: string;
602
+ isDownloadable?: boolean;
603
+ } | {
604
+ kind: 'followUp';
605
+ items: AXPAiChatFollowUpItem[];
606
+ };
607
+ declare function axmAssistUserVisibleItemsForLine(line: AXPAiChatMessage): AxmAssistUserVisibleItem[];
608
+ /** Parses a raw {@code followUp} segment for UI (normalizes chip commands). */
609
+ declare function axmAssistFollowUpItemsFromUnknown(raw: unknown): AXPAiChatFollowUpItem[];
610
+
611
+ /**
612
+ * Resolves assist id from conversation metadata.
613
+ */
614
+ declare function axmExtractAssistIdFromMetadata(metadata: Record<string, unknown> | undefined): string | undefined;
615
+ /**
616
+ * Resolves direct agent id from conversation metadata (agent-as-assist chat).
617
+ */
618
+ declare function axmExtractDirectAgentIdFromMetadata(metadata: Record<string, unknown> | undefined): string | undefined;
619
+ /** True when the conversation targets an assist catalog row or a direct agent-as-assist chat. */
620
+ declare function axmConversationHasAiChat(metadata: Record<string, unknown> | undefined): boolean;
621
+ /** Reads embedded assist welcome/model fields stamped at conversation create. */
622
+ declare function axmExtractAssistSnapshotFromMetadata(metadata: Record<string, unknown> | undefined): AXMAssistConversationSnapshotLite | null;
623
+ /** Resolves model entity id from conversation metadata (snapshot or persisted patch). */
624
+ declare function axmExtractModelEntityIdFromMetadata(metadata: Record<string, unknown> | undefined): string | undefined;
625
+
626
+ /**
627
+ * True when the participant is an AI Assist peer (synthetic `assist-*` id or assist metadata).
628
+ * Such entries should not appear in human-only pickers (e.g. regular "New chat").
629
+ */
630
+ declare function axmIsAssistPeerParticipant(participant: AXConversationParticipant): boolean;
631
+ /**
632
+ * Builds a synthetic assist peer for entity-backed room creation when the id is not a security user.
633
+ */
634
+ declare function axmBuildAssistPeerParticipantFromCreateData(participantId: string, data: AXConversationCreateData): AXConversationParticipant | null;
635
+ /**
636
+ * Minimal assist peer for lookups by synthetic `assist-*` participant id.
637
+ */
638
+ declare function axmBuildAssistPeerParticipantFromId(participantId: string): AXConversationParticipant | null;
639
+
640
+ /** Persisted on assist message metadata (`assistResponseStatus`). */
641
+ type AxmAssistResponseStatus = 'streaming' | 'complete' | 'incomplete' | 'failed';
642
+ /**
643
+ * Resolves assist response lifecycle from message metadata.
644
+ * Falls back to legacy `isStreaming` when `assistResponseStatus` is absent.
645
+ */
646
+ declare function axmReadAssistResponseStatus(metadata: unknown): AxmAssistResponseStatus;
647
+ /** User-facing error stored when generation fails (`assistResponseError`). */
648
+ declare function axmReadReplyToUserMessageId(metadata: unknown): string | undefined;
649
+ declare function axmReadAssistResponseError(metadata: unknown): string | undefined;
650
+ declare function axmIsAssistRetryableStatus(status: AxmAssistResponseStatus): boolean;
651
+ declare function axmIsAssistStreamingStatus(status: AxmAssistResponseStatus): boolean;
652
+ declare function axmIsAssistTerminalStatus(status: AxmAssistResponseStatus): boolean;
653
+ /** Finalize metadata persisted when a run completes (even if status lags). */
654
+ declare function axmAssistHasFinalizeMetadata(metadata: unknown): boolean;
655
+ /** Persisted terminal assist state should win over stale in-memory streaming cache. */
656
+ declare function axmShouldPreferPersistedAssistOverLiveCache(persisted: {
657
+ metadata?: unknown;
658
+ }, live: {
659
+ metadata?: unknown;
660
+ }): boolean;
661
+ /**
662
+ * True when a row is still marked `streaming` but already contains a finished assist reply
663
+ * (e.g. finalize persisted payload but not status, or the page reloaded before terminal persist).
664
+ *
665
+ * Do not treat live `streamDraftText` (or draft mirrored into `payload.text` for display) as complete.
666
+ */
667
+ declare function axmAssistPersistedMessageLooksComplete(message: {
668
+ payload?: unknown;
669
+ metadata?: unknown;
670
+ }): boolean;
671
+
672
+ /**
673
+ * True while an assist placeholder is still generating (not yet a deliverable reply).
674
+ */
675
+ declare function axmIsAssistStreamingMessage(message: AXConversationMessage): boolean;
676
+ /**
677
+ * Whether an incoming message should increase the conversation unread counter.
678
+ */
679
+ declare function axmMessageCountsTowardUnread(message: AXConversationMessage, currentUserId: string): boolean;
680
+ /** Recomputes unread badge count from persisted messages. */
681
+ declare function axmComputeConversationUnreadCount(messages: AXConversationMessage[], currentUserId: string): number;
682
+
683
+ declare function axmCoerceTimestampMs(value: unknown): number;
684
+ /** Coerces entity / IndexedDB values to {@link Date} for conversation UI sorting. */
685
+ declare function axmCoerceDate(value: unknown): Date;
686
+ declare function axmSortMessagesNewestFirst(messages: AXConversationMessage[]): AXConversationMessage[];
687
+
688
+ /** Row shown in Conversation “Chat with AI” pickers (catalog assist). */
689
+ interface AXMChatAiTargetRow {
690
+ id: string;
691
+ name: string;
692
+ title: AXPMultiLanguageString | string;
693
+ description?: AXPMultiLanguageString | string;
694
+ professionImageUrl?: string;
695
+ }
696
+ /** Synthetic bot participant id for assist chats. */
697
+ declare function axmChatAiPeerParticipantId(catalogId: string): string;
698
+ /** Conversation metadata for starting an AI chat from a picker row. */
699
+ declare function axmBuildAiChatConversationMetadata(row: AXMChatAiTargetRow, assistSnapshot?: AXMAssistConversationSnapshotLite): Record<string, unknown>;
700
+ /** Loads assist rows for Conversation AI chat pickers. */
701
+ declare function axmLoadChatAiTargets(entityRegistry: AXPEntityDefinitionRegistryService): Promise<AXMChatAiTargetRow[]>;
702
+ /** Resolves ML or plain string for search/display. */
703
+ declare function axmResolveChatAiTargetText(resolveMl: (value: AXPMultiLanguageString) => string | undefined, value: AXPMultiLanguageString | string | undefined): string;
704
+ declare function axmChatAiTargetDisplayName(resolveMl: (value: AXPMultiLanguageString) => string | undefined, row: AXMChatAiTargetRow): string;
705
+ declare function axmChatAiTargetDisplayDescription(resolveMl: (value: AXPMultiLanguageString) => string | undefined, row: AXMChatAiTargetRow): string | undefined;
706
+ declare function axmChatAiTargetAvatarUrl(row: AXMChatAiTargetRow): string | null;
707
+ /** Fallback i18n key for rows with no catalog description. */
708
+ declare function axmChatAiTargetShortcutDescriptionKey(): string;
709
+ /** Same filter as {@link AXMChatWithAssistDialogComponent} target list search. */
710
+ declare function axmFilterChatAiTargets(resolveMl: (value: AXPMultiLanguageString) => string | undefined, rows: AXMChatAiTargetRow[], query: string): AXMChatAiTargetRow[];
711
+
712
+ /** Builds a sidebar/header title from the first user message (heuristic fallback). */
713
+ declare function axmBuildAutoTitleFromUserText(raw: string): string | null;
714
+ /** Bot/assist list rows often show the assist peer `name` — keep it in sync with room title. */
715
+ declare function axmSyncAssistPeerDisplayName<T extends Pick<AXConversation, 'title' | 'participants'>>(conversation: T): T;
716
+ declare function axmRoomWithAssistPeerDisplayName(room: AXMConversationRoom): AXMConversationRoom;
717
+
718
+ interface AXMConversationAssistResponsePort {
719
+ handleAfterUserMessage(conversationId: string, userMessageId: string, command: AXConversationSendMessageCommand, currentUserId: string): Promise<void>;
720
+ retryAssistResponse(conversationId: string, messageId: string): Promise<AXConversationMessage>;
721
+ reconcileStaleAssistPlaceholders(conversationId?: string): Promise<void>;
722
+ /** True when the conversation has assist rows still marked streaming (cache or entity). */
723
+ hasStreamingAssistPlaceholders(conversationId: string): Promise<boolean>;
724
+ /** Latest in-memory assist row (streaming cache wins over entity reads). */
725
+ getLiveMessage(messageId: string): AXConversationMessage | null;
726
+ /** Merges assist in-memory cache over persisted messages (mock `conversationSharedStorage.messages` parity). */
727
+ mergeLiveConversationMessages(conversationId: string, persisted: AXConversationMessage[]): AXConversationMessage[];
728
+ /** Aligns composer Stop / spinner with assist streaming for the focused conversation. */
729
+ syncComposerGenerationForFocus(conversationId: string | null): Promise<void>;
730
+ /** Cancels in-flight assist generation (composer Stop). Aborts server AI + SSE stream updates. */
731
+ cancelAssistGeneration(conversationId: string): Promise<void>;
732
+ }
733
+ declare const AXM_CONVERSATION_ASSIST_RESPONSE_PORT: InjectionToken<AXMConversationAssistResponsePort>;
734
+
735
+ interface AXMConversationRegularAutoReplyPort {
736
+ maybeGenerate(command: AXConversationSendMessageCommand, userMessageId: string, currentUserId: string): Promise<void>;
737
+ }
738
+ declare const AXM_CONVERSATION_REGULAR_AUTO_REPLY_PORT: InjectionToken<AXMConversationRegularAutoReplyPort>;
739
+
740
+ /**
741
+ * Entity-backed read/write facade for chat rooms and messages.
742
+ * Publishes mutations to {@link AXMConversationRealtimeBus}.
743
+ */
744
+ declare class AXMConversationEntityStoreService {
745
+ private readonly entityService;
746
+ private readonly filterService;
747
+ private readonly bus;
748
+ private readonly messageData;
749
+ private readonly roomData;
750
+ /** Serializes entity writes per message id so streaming deltas persist in order. */
751
+ private readonly persistChains;
752
+ /** Avoids GET-by-id existence probes for assist rows already written in this session. */
753
+ private readonly persistedMessageIds;
754
+ /** In-memory snapshots to avoid redundant GetById after local writes. */
755
+ private readonly conversationCache;
756
+ private readonly messageCache;
757
+ private readonly messageListCache;
758
+ /** Dedupes concurrent room GetById for the same conversation. */
759
+ private readonly conversationFetchChains;
760
+ /** Dedupes concurrent message list queries (page 0). */
761
+ private readonly messageListFetchChains;
762
+ getCachedConversation(conversationId: string): AXConversation | null;
763
+ getCachedMessageList(conversationId: string): AXConversationMessage[] | null;
764
+ cacheConversation(conversation: AXConversation): void;
765
+ cacheConversationFromRoom(room: AXMConversationRoom, currentUserId?: string): AXConversation;
766
+ getConversation(conversationId: string, options?: {
767
+ force?: boolean;
768
+ }): Promise<AXConversation | null>;
769
+ private fetchConversationFromEntity;
770
+ /** Persists auto-generated title after assist completes (never during streaming). */
771
+ persistAssistTitlePatch(room: AXMConversationRoom): Promise<void>;
772
+ getMessage(messageId: string): Promise<AXConversationMessage | null>;
773
+ cacheMessage(message: AXConversationMessage): void;
774
+ getCachedMessage(messageId: string): AXConversationMessage | null;
775
+ invalidateMessageListCache(conversationId: string): void;
776
+ cacheEmptyMessageList(conversationId: string): void;
777
+ private patchMessageListCache;
778
+ private appendToMessageListCache;
779
+ loadConversationMessages(conversationId: string, options?: {
780
+ skip?: number;
781
+ take?: number;
782
+ force?: boolean;
783
+ }): Promise<AXConversationMessage[]>;
784
+ private queryConversationMessages;
785
+ /** Assist placeholders still marked `streaming` in entity storage (e.g. after page reload). */
786
+ loadStreamingAssistPlaceholderMessages(conversationId?: string): Promise<AXConversationMessage[]>;
787
+ createMessageFromAxMessage(message: AXConversationMessage): Promise<AXConversationMessage>;
788
+ createMessageWithId(message: AXConversationMessage): Promise<AXConversationMessage>;
789
+ updateMessage(message: AXConversationMessage, options?: {
790
+ publish?: boolean;
791
+ }): Promise<AXConversationMessage>;
792
+ /**
793
+ * Persists a message to entity storage without publishing realtime events.
794
+ * Matches mock `putMessage` fire-and-forget used during assist streaming.
795
+ */
796
+ persistMessage(message: AXConversationMessage): Promise<void>;
797
+ private persistMessageInternal;
798
+ deleteMessage(messageId: string): Promise<void>;
799
+ touchLastMessage(conversationId: string, message: AXConversationMessage): Promise<void>;
800
+ updateConversation(conversation: AXConversation): Promise<AXConversation>;
801
+ updateConversationMetadata(conversationId: string, metadata: Record<string, unknown>): Promise<void>;
802
+ setUnreadCount(conversationId: string, unreadCount: number): Promise<void>;
803
+ syncConversationUnreadCount(conversationId: string, currentUserId: string): Promise<void>;
804
+ private isAssistResponseEntity;
805
+ messageToEntityFields(message: AXConversationMessage): Partial<AXMConversationMessage>;
806
+ axMessageFromCommand(command: AXConversationSendMessageCommand, senderId: string): AXConversationMessage;
807
+ publishNewMessage(message: AXConversationMessage): void;
808
+ publishMessageUpdate(message: AXConversationMessage): void;
809
+ publishConversationUpdate(conversation: AXConversation): void;
810
+ publishConversationCreated(conversation: AXConversation): void;
811
+ publishTypingIndicator(indicator: _acorex_components_conversation.AXConversationTypingIndicator): void;
812
+ publishPresenceUpdate(update: _acorex_components_conversation.AXConversationPresenceUpdate): void;
813
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMConversationEntityStoreService, never>;
814
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMConversationEntityStoreService>;
815
+ }
816
+
817
+ /**
818
+ * Tracks which conversation is focused in the chat UI and applies read-state updates.
819
+ */
820
+ declare class AXMConversationFocusService {
821
+ private readonly store;
822
+ private focusedConversationId;
823
+ /** Reactive focus id for computed UI (retry screen, etc.). */
824
+ readonly focusedConversationIdSignal: _angular_core.WritableSignal<string | null>;
825
+ setFocusedConversation(conversationId: string | null): void;
826
+ isFocused(conversationId: string): boolean;
827
+ getFocusedConversationId(): string | null;
828
+ /**
829
+ * Marks incoming messages as read when the conversation is focused.
830
+ * Returns ids that were transitioned to `read`.
831
+ */
832
+ markMessagesRead(conversationId: string, messageIds: readonly string[], currentUserId: string): Promise<string[]>;
833
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMConversationFocusService, never>;
834
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMConversationFocusService>;
835
+ }
836
+
837
+ /**
838
+ * In-memory event bus for entity-backed chat realtime updates.
839
+ * Replaces {@link conversationSharedStorage} streams for the conversation module.
840
+ */
841
+ declare class AXMConversationRealtimeBus {
842
+ private readonly connectionStatusSubject;
843
+ readonly connectionStatus$: Observable<AXConversationConnectionStatus>;
844
+ private readonly messageStreamSubject;
845
+ private readonly messageUpdateSubject;
846
+ private readonly messageDeletionSubject;
847
+ readonly messageStream$: Observable<AXConversationMessage>;
848
+ readonly messageUpdates$: Observable<AXConversationMessage>;
849
+ readonly messageDeletions$: Observable<string>;
850
+ private readonly conversationUpdateSubject;
851
+ private readonly conversationCreatedSubject;
852
+ readonly conversationUpdates$: Observable<AXConversation>;
853
+ readonly conversationCreated$: Observable<AXConversation>;
854
+ private readonly typingIndicatorSubject;
855
+ private readonly presenceUpdateSubject;
856
+ readonly typingIndicators$: Observable<AXConversationTypingIndicator>;
857
+ readonly presenceUpdates$: Observable<AXConversationPresenceUpdate>;
858
+ setConnectionStatus(status: AXConversationConnectionStatus): void;
859
+ publishMessage(message: AXConversationMessage): void;
860
+ publishMessageUpdate(message: AXConversationMessage): void;
861
+ publishMessageDeletion(messageId: string): void;
862
+ /** Suppresses redundant room GetById after a client-originated publish (entity-mutation echo). */
863
+ private readonly recentLocalRoomMutations;
864
+ private static readonly LOCAL_ROOM_MUTATION_SUPPRESS_MS;
865
+ markLocalRoomMutation(conversationId: string): void;
866
+ shouldSuppressRemoteRoomRefetch(conversationId: string): boolean;
867
+ publishConversationUpdate(conversation: AXConversation): void;
868
+ publishConversationCreated(conversation: AXConversation): void;
869
+ publishTypingIndicator(indicator: AXConversationTypingIndicator): void;
870
+ publishPresenceUpdate(update: AXConversationPresenceUpdate): void;
871
+ messagesForConversation(conversationId: string): Observable<AXConversationMessage>;
872
+ messageUpdatesForConversation(conversationId?: string): Observable<AXConversationMessage>;
873
+ typingIndicatorsForConversation(conversationId: string): Observable<AXConversationTypingIndicator>;
874
+ messageStatusChanges(conversationId?: string): Observable<{
875
+ messageId: string;
876
+ status: AXConversationMessage['status'];
877
+ timestamp: Date;
878
+ }>;
879
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMConversationRealtimeBus, never>;
880
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMConversationRealtimeBus>;
881
+ }
882
+
883
+ interface AXMChatAssistCatalogPort {
884
+ loadCatalogTargets(force?: boolean): Promise<AXMChatAiTargetRow[]>;
885
+ getCachedAssist(assistId: string): AXPAiEffectiveAssistRowLite | null;
886
+ getAssist(assistId: string): Promise<AXPAiEffectiveAssistRowLite | null>;
887
+ primeAssist(row: AXPAiEffectiveAssistRowLite): void;
888
+ toSnapshot(row: AXPAiEffectiveAssistRowLite): AXMAssistConversationSnapshotLite;
889
+ }
890
+ declare const AXM_CHAT_ASSIST_CATALOG_PORT: InjectionToken<AXMChatAssistCatalogPort>;
891
+
892
+ /**
893
+ * Session fields on {@link AXConversationService} not yet on the public API.
894
+ * Centralize the cast here so feature code does not repeat it.
895
+ */
896
+ interface AXMConversationServiceSessionAdapter {
897
+ readonly currentUser: Signal<AXConversationParticipant | null>;
898
+ setCurrentUser(participant: AXConversationParticipant | null): void;
899
+ closeActiveConversation(): void;
900
+ resetConversationsPagination(): void;
901
+ loadConversations(): Promise<void>;
902
+ }
903
+ declare function createConversationServiceSessionAdapter(service: AXConversationService): AXMConversationServiceSessionAdapter;
904
+
905
+ /**
906
+ * Represents a single comment in a thread.
907
+ * It can have nested replies (children).
908
+ */
909
+ interface AXMComment extends AXMConversationMessage {
910
+ /**
911
+ * Nested replies to this comment.
912
+ */
913
+ replies: AXMComment[];
914
+ /**
915
+ * The number of direct replies to this comment.
916
+ */
917
+ replyCount: number;
918
+ /**
919
+ * The depth of the comment in the thread hierarchy.
920
+ * Root comments have a depth of 0.
921
+ */
922
+ depth: number;
923
+ }
924
+ /**
925
+ * Represents a comment thread, which is essentially a room for comments.
926
+ * It contains the total number of comments and the top-level comments.
927
+ */
928
+ interface AXMCommentThread extends AXMConversationRoom {
929
+ /**
930
+ * The total number of comments in the thread.
931
+ */
932
+ commentCount: number;
933
+ /**
934
+ * An array of root-level comments.
935
+ */
936
+ comments: AXMComment[];
937
+ }
938
+ type AXMCommentEventType = 'add' | 'remove' | 'update';
939
+ type AXMThreadEventType = 'add' | 'remove' | 'update';
940
+ interface AXMCommentEvent {
941
+ type: AXMCommentEventType;
942
+ /**
943
+ * - For 'add' and 'update', payload is AXMComment.
944
+ * - For 'remove', payload is the comment ID (string).
945
+ */
946
+ payload: AXMComment | string;
947
+ }
948
+ interface AXMThreadEvent {
949
+ type: AXMThreadEventType;
950
+ /**
951
+ * - For 'add' and 'update', payload is AXMCommentThread.
952
+ * - For 'remove', payload is the thread ID (string).
953
+ */
954
+ payload: AXMCommentThread | string;
955
+ }
956
+
957
+ declare class AXMCommentManagementService {
958
+ private readonly entityService;
959
+ private readonly commentImplService;
960
+ private readonly sessionService;
961
+ private readonly usersService;
962
+ private readonly realtimeService;
963
+ private getCurrentUser;
964
+ private getUserInfo;
965
+ private formatComment;
966
+ private buildCommentTree;
967
+ private formatThread;
968
+ createThread(entityRef: AXMCommentEntityData, topic: string, title?: string): Promise<AXMCommentThread>;
969
+ getThread(entityRef: AXMCommentEntityData, topic: string): Promise<AXMCommentThread | null>;
970
+ listThreads(entityRef: AXMCommentEntityData, topic: string): Promise<AXMCommentThread[]>;
971
+ updateThread(entityRef: AXMCommentEntityData, topic: string, data: Partial<{
972
+ title: string;
973
+ }>): Promise<AXMCommentThread>;
974
+ deleteThread(entityRef: AXMCommentEntityData, topic: string): Promise<boolean>;
975
+ addComment(threadId: string, content: string, parentCommentId?: string, contentType?: string, userId?: string): Promise<AXMComment>;
976
+ getComments(threadId: string, nested: boolean): Promise<AXMComment[]>;
977
+ getComment(commentId: string): Promise<AXMComment>;
978
+ editComment(commentId: string, content: string, contentType?: string): Promise<AXMComment>;
979
+ deleteComment(commentId: string): Promise<boolean>;
980
+ addReaction(commentId: string, emoji: string): Promise<AXMComment>;
981
+ removeReaction(commentId: string, emoji: string): Promise<AXMComment>;
982
+ getReactions(commentId: string): Promise<AXReaction[]>;
983
+ likeComment(commentId: string): Promise<AXMComment>;
984
+ unlikeComment(commentId: string): Promise<AXMComment>;
985
+ pinComment(commentId: string): Promise<AXMComment>;
986
+ unpinComment(commentId: string): Promise<AXMComment>;
987
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMCommentManagementService, never>;
988
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMCommentManagementService>;
989
+ }
990
+
991
+ declare abstract class AXMCommentRealtimeService {
992
+ abstract readonly comment$: Observable<AXMCommentEvent>;
993
+ abstract readonly thread$: Observable<AXMThreadEvent>;
994
+ abstract notifyComment(event: AXMCommentEvent): void;
995
+ abstract notifyThread(event: AXMThreadEvent): void;
996
+ }
997
+ declare class AXMCommentRealtimeServiceImpl extends AXMCommentRealtimeService {
998
+ private readonly _comment$;
999
+ readonly comment$: Observable<AXMCommentEvent>;
1000
+ private readonly _thread$;
1001
+ readonly thread$: Observable<AXMThreadEvent>;
1002
+ notifyComment(event: AXMCommentEvent): void;
1003
+ notifyThread(event: AXMThreadEvent): void;
1004
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMCommentRealtimeServiceImpl, never>;
1005
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMCommentRealtimeServiceImpl>;
1006
+ }
1007
+
1008
+ declare class AXMCommentComponent implements OnInit {
1009
+ refrenceType: _angular_core.InputSignal<string>;
1010
+ refrenceId: _angular_core.InputSignal<string>;
1011
+ subject: _angular_core.InputSignal<string>;
1012
+ moduleName: _angular_core.WritableSignal<string | undefined>;
1013
+ entityName: _angular_core.WritableSignal<string | undefined>;
1014
+ protected hasCooldown: _angular_core.WritableSignal<boolean>;
1015
+ protected commentContent: _angular_core.WritableSignal<string>;
1016
+ protected isSubmitting: _angular_core.WritableSignal<boolean>;
1017
+ protected isReplyingMode: _angular_core.WritableSignal<boolean>;
1018
+ protected isEditingMode: _angular_core.WritableSignal<boolean>;
1019
+ protected isLoading: _angular_core.WritableSignal<boolean>;
1020
+ protected activeReplyComment: _angular_core.WritableSignal<(AXMComment & {
1021
+ userName: string;
1022
+ }) | undefined>;
1023
+ protected activeEditComment: _angular_core.WritableSignal<(AXMComment & {
1024
+ userName: string;
1025
+ }) | undefined>;
1026
+ protected highlightedCommentId: _angular_core.WritableSignal<string | null>;
1027
+ protected expandedCommentIds: _angular_core.WritableSignal<Set<string>>;
1028
+ protected comments: _angular_core.WritableSignal<AXMComment[]>;
1029
+ protected thread: _angular_core.WritableSignal<AXMCommentThread | undefined>;
1030
+ protected wysiwygOptions: _angular_core.WritableSignal<{
1031
+ look: AXStyleLookType;
1032
+ }>;
1033
+ protected wysiwygEditor: _angular_core.Signal<AXWysiwygContainerComponent>;
1034
+ private readonly commentService;
1035
+ private readonly realtimeService;
1036
+ private readonly sessionService;
1037
+ private readonly toastService;
1038
+ private readonly dialogService;
1039
+ private readonly inAppNotificationService;
1040
+ private readonly router;
1041
+ private readonly activatedRoute;
1042
+ private readonly sanitizer;
1043
+ private readonly translationService;
1044
+ private readonly destroyRef;
1045
+ private readonly elementRef;
1046
+ ngOnInit(): void;
1047
+ loadComments(): Promise<void>;
1048
+ /** Opens edit mode for the target comment (or its reply). */
1049
+ protected editMessage(comment: AXMComment, reply?: AXMComment, userName?: string): void;
1050
+ /** Opens reply mode, optionally mentioning a specific reply author. */
1051
+ protected replyMessage(comment: AXMComment, reply?: AXMComment, userName?: string): void;
1052
+ protected deleteComment(commentId: string): Promise<void>;
1053
+ protected resetReplyEditState(): void;
1054
+ protected submitComment(): Promise<void>;
1055
+ protected toggleLike(comment: AXMComment): Promise<void>;
1056
+ protected isLikedByUser(comment: AXMComment): boolean;
1057
+ protected getReactionsCount(comment: AXMComment): number;
1058
+ protected isRepliesExpanded(commentId: string): boolean;
1059
+ protected onRepliesExpandedChange(commentId: string, expanded: boolean): void;
1060
+ private expandReplies;
1061
+ /**
1062
+ * Scrolls to the referenced comment and triggers a highlight pulse animation.
1063
+ * Expands parent replies if needed to ensure the target is in the DOM.
1064
+ */
1065
+ protected scrollMain(): void;
1066
+ /**
1067
+ * Scrolls to a comment element and applies a highlight pulse animation.
1068
+ * Uses setTimeout to wait for Angular to render after signal updates.
1069
+ */
1070
+ private scrollToAndHighlight;
1071
+ protected sanitizeHtml(htmlContent: string | undefined): _angular_platform_browser.SafeHtml;
1072
+ private handleAddComment;
1073
+ private handleUpdateComment;
1074
+ private getCurrentUser;
1075
+ private updateLikeStatus;
1076
+ private removeMessageById;
1077
+ /** Workaround: Quill editor may not sync immediately with ngModel on clear */
1078
+ private clearEditorContent;
1079
+ /** Workaround: Quill editor may not sync immediately with ngModel on set */
1080
+ private setEditorContent;
1081
+ /** Shorthand translator scoped to the comments feature */
1082
+ private t;
1083
+ private showToast;
1084
+ private showTranslatedToast;
1085
+ protected getCommentText(comment: AXMComment): string;
1086
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMCommentComponent, never>;
1087
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMCommentComponent, "axm-comment", never, { "refrenceType": { "alias": "refrenceType"; "required": true; "isSignal": true; }; "refrenceId": { "alias": "refrenceId"; "required": true; "isSignal": true; }; "subject": { "alias": "subject"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
1088
+ }
1089
+
1090
+ /**
1091
+ * Extracts display text from a message payload (text messages and captions).
1092
+ */
1093
+ declare function axmExtractTextFromPayload(payload: AXMessagePayload | undefined): string;
1094
+
1095
+ declare abstract class AXMCommentService {
1096
+ abstract createThread(entityRef: AXMCommentEntityData, topic: string, title?: string): Promise<AXMCommentThread>;
1097
+ abstract getThread(entityRef: AXMCommentEntityData, topic: string): Promise<AXMCommentThread | null>;
1098
+ abstract listThreads(entityRef: AXMCommentEntityData, topic: string): Promise<AXMCommentThread[]>;
1099
+ abstract updateThread(entityRef: AXMCommentEntityData, topic: string, data: Partial<{
1100
+ title: string;
1101
+ }>): Promise<AXMCommentThread>;
1102
+ abstract deleteThread(entityRef: AXMCommentEntityData, topic: string): Promise<boolean>;
1103
+ abstract addComment(threadId: string, content: string, parentCommentId?: string, contentType?: string, userId?: string): Promise<AXMComment>;
1104
+ abstract getComments(threadId: string, nested: boolean): Promise<AXMComment[]>;
1105
+ abstract getComment(commentId: string): Promise<AXMComment>;
1106
+ abstract editComment(commentId: string, content: string, contentType?: string): Promise<AXMComment>;
1107
+ abstract deleteComment(commentId: string): Promise<boolean>;
1108
+ abstract addReaction(commentId: string, emoji: string): Promise<AXMComment>;
1109
+ abstract removeReaction(commentId: string, emoji: string): Promise<AXMComment>;
1110
+ abstract getReactions(commentId: string): Promise<AXReaction[]>;
1111
+ abstract likeComment(commentId: string): Promise<AXMComment>;
1112
+ abstract unlikeComment(commentId: string): Promise<AXMComment>;
1113
+ abstract pinComment(commentId: string): Promise<AXMComment>;
1114
+ abstract unpinComment(commentId: string): Promise<AXMComment>;
1115
+ }
1116
+ declare class AXMCommentServiceImpl {
1117
+ private readonly entityService;
1118
+ private readonly roomService;
1119
+ private readonly messageService;
1120
+ private readonly filterService;
1121
+ private readonly translationService;
1122
+ createThread(creatorUser: AXPUserReference, entityRef: AXMCommentEntityData, topic: string, title?: string): Promise<AXMConversationRoom>;
1123
+ getThread(entityRef: AXMCommentEntityData, topic: string): Promise<AXMConversationRoom | null>;
1124
+ listThreads(entityRef: AXMCommentEntityData, topic: string): Promise<AXMConversationRoom[]>;
1125
+ updateThread(threadId: string, data: Partial<{
1126
+ title: string;
1127
+ }>): Promise<AXMConversationRoom>;
1128
+ deleteThread(threadId: string): Promise<boolean>;
1129
+ addComment(threadId: string, content: string, author: AXPUserReference, parentCommentId?: string, _contentType?: string): Promise<AXMConversationMessage>;
1130
+ getComments(threadId: string): Promise<AXMConversationMessage[]>;
1131
+ getComment(commentId: string): Promise<AXMConversationMessage>;
1132
+ editComment(commentId: string, content: string, _editor: AXPUserReference, _contentType?: string): Promise<AXMConversationMessage>;
1133
+ deleteComment(commentId: string): Promise<boolean>;
1134
+ updateReactions(commentId: string, reactions: AXReaction[]): Promise<AXMConversationMessage>;
1135
+ getReactions(commentId: string): Promise<AXReaction[]>;
1136
+ pinComment(commentId: string, pinned: boolean): Promise<AXMConversationMessage>;
1137
+ private requireRoom;
1138
+ private requireMessage;
1139
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMCommentServiceImpl, never>;
1140
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMCommentServiceImpl>;
1141
+ }
1142
+
1143
+ /** How to show comments in entity single view: as a section (default) or as a separate page. */
1144
+ type CommentsDisplayMode = 'section' | 'page';
1145
+ /** Component key used when display is 'page'. Register a page component with this key via AXP_PAGE_COMPONENT_PROVIDER. */
1146
+ declare const COMMENTS_PAGE_COMPONENT_KEY = "entity-comments-page";
1147
+ type CommentsPluginOptions = {
1148
+ /** Where to show comments: section (inline) or page (separate tab). Default 'section' */
1149
+ display?: CommentsDisplayMode;
1150
+ /** Icon for the comments page (when display is 'page'). Default 'fa-light fa-comments' */
1151
+ icon?: string;
1152
+ /** Title override for comments section/page. Default '@conversation:terms.common.comments' */
1153
+ title?: string;
1154
+ };
1155
+ /**
1156
+ * Comments plugin.
1157
+ * - When display is 'section' (default), adds a section to the single layout with the comment widget.
1158
+ * - When display is 'page', adds a page to entity.pages with COMMENTS_PAGE_COMPONENT_KEY.
1159
+ * - Always adds a list action to open the comment popup.
1160
+ */
1161
+ declare const commentsPlugin: AXPEntityActionPlugin;
1162
+
1163
+ interface AXMAddReactionCommandInput {
1164
+ commentId: string;
1165
+ reaction: AXMReactionType;
1166
+ }
1167
+ declare class AXMAddReactionCommand implements AXPCommand<AXMAddReactionCommandInput, void> {
1168
+ execute(input: AXMAddReactionCommandInput): AXPCommandExecuteResultPromise<void>;
1169
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMAddReactionCommand, never>;
1170
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMAddReactionCommand>;
1171
+ }
1172
+
1173
+ interface AXMShowCommentPopupCommandInput {
1174
+ data?: Record<string, unknown>;
1175
+ options?: {
1176
+ refType?: string;
1177
+ refId?: string;
1178
+ subject?: string;
1179
+ };
1180
+ }
1181
+ /**
1182
+ * Opens the comments popup for a referenced entity record.
1183
+ * Replaces the former `show-comment-popup` workflow (single popup step).
1184
+ */
1185
+ declare class AXMShowCommentPopupCommand implements AXPCommand<AXMShowCommentPopupCommandInput> {
1186
+ private readonly popupService;
1187
+ private readonly translate;
1188
+ execute(input?: AXMShowCommentPopupCommandInput): AXPCommandExecuteResultPromise;
1189
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMShowCommentPopupCommand, never>;
1190
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMShowCommentPopupCommand>;
1191
+ }
1192
+
1193
+ /**
1194
+ * Build-time only. Do not import from Angular modules.
1195
+ */
1196
+ declare const axmShowCommentPopupCommandDefinition: {
1197
+ key: string;
1198
+ title: string;
1199
+ description: string;
1200
+ executionMode: "frontend";
1201
+ inputs: {
1202
+ name: string;
1203
+ title: string;
1204
+ description: string;
1205
+ interface: {
1206
+ name: string;
1207
+ };
1208
+ }[];
1209
+ outcomes: {
1210
+ mode: "static";
1211
+ values: string[];
1212
+ };
1213
+ ai: {
1214
+ tags: string[];
1215
+ };
1216
+ categories: _acorex_platform_framework_shared_core.AXPDefinitionCategory[];
1217
+ };
1218
+
1219
+ declare class AXMCommentPopupComponent extends AXBasePageComponent {
1220
+ refrenceType: _angular_core.InputSignal<string>;
1221
+ refrenceId: _angular_core.InputSignal<string>;
1222
+ subject: _angular_core.InputSignal<string>;
1223
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMCommentPopupComponent, never>;
1224
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMCommentPopupComponent, "axm-comment-popup", never, { "refrenceType": { "alias": "refrenceType"; "required": true; "isSignal": true; }; "refrenceId": { "alias": "refrenceId"; "required": true; "isSignal": true; }; "subject": { "alias": "subject"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
1225
+ }
1226
+
1227
+ declare class AXMCommentWidgetViewComponent extends AXPValueWidgetComponent<AXPEntityReference & {
1228
+ subject: string;
1229
+ }> {
1230
+ protected refrenceType: _angular_core.Signal<any>;
1231
+ protected refrenceId: _angular_core.Signal<any>;
1232
+ protected subject: _angular_core.Signal<any>;
1233
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMCommentWidgetViewComponent, never>;
1234
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMCommentWidgetViewComponent, "ng-component", never, {}, {}, never, never, true, never>;
1235
+ }
1236
+
1237
+ declare const AXPCommentWidget: AXPWidgetConfig;
1238
+
1239
+ /** Entity reference an entity-scoped chat is bound to (stored in conversation metadata). */
1240
+ interface AXMEntityChatRef {
1241
+ entityId: string;
1242
+ entityType: string;
1243
+ }
1244
+ /**
1245
+ * Conversation metadata for an entity-scoped assist chat.
1246
+ * Keeps `assistId` so the existing assist reply pipeline still answers in entity chats.
1247
+ */
1248
+ declare function axmBuildEntityChatConversationMetadata(args: {
1249
+ entityId: string;
1250
+ entityType: string;
1251
+ assistId: string;
1252
+ }): Record<string, unknown>;
1253
+ /**
1254
+ * Resolves the entity reference from conversation metadata.
1255
+ * `AXConversationService.createConversation` may nest the UI object, so values
1256
+ * are also probed at `metadata.metadata.*`.
1257
+ */
1258
+ declare function axmExtractEntityRefFromMetadata(metadata: Record<string, unknown> | undefined): AXMEntityChatRef | undefined;
1259
+ /** True when the conversation is bound to an entity (has both entity id and type). */
1260
+ declare function axmConversationIsEntityChat(metadata: Record<string, unknown> | undefined): boolean;
1261
+ /** True when conversation metadata targets the given entity reference. */
1262
+ declare function axmConversationMatchesEntity(metadata: Record<string, unknown> | undefined, ref: AXMEntityChatRef): boolean;
1263
+
1264
+ /** Arguments accepted by `AXConversationService.createConversation`, prebuilt for an entity chat. */
1265
+ interface AXMEntityChatCreateData {
1266
+ participantIds: string[];
1267
+ type: 'bot';
1268
+ options: {
1269
+ title: string;
1270
+ avatar?: string;
1271
+ icon: string;
1272
+ metadata: Record<string, unknown>;
1273
+ };
1274
+ }
1275
+ /**
1276
+ * Backing service for the entity-scoped mini chat: finds the conversations bound to an entity
1277
+ * (an entity may have several) and prepares the create payload for a new entity assist chat.
1278
+ *
1279
+ * Conversation creation/selection is performed by the caller using its own
1280
+ * {@link AXConversationService} instance so the mini chat keeps its active-selection state
1281
+ * isolated from the main chat page.
1282
+ */
1283
+ declare class AXMEntityChatService {
1284
+ private readonly injector;
1285
+ private readonly conversationService;
1286
+ private readonly entityRegistry;
1287
+ private readonly translationService;
1288
+ private readonly defaultAssistResolver;
1289
+ /**
1290
+ * Resolved lazily: this service is `providedIn: 'root'` but depends on module-scoped chat APIs
1291
+ * and optional AI services that must not be requested during the same hydration pass as chat UI.
1292
+ */
1293
+ private get conversationApi();
1294
+ /** Returns every conversation bound to the given entity reference. */
1295
+ findEntityConversations(ref: AXMEntityChatRef): Promise<AXConversation[]>;
1296
+ /** Creates a new entity-scoped assist conversation and selects it as the active conversation. */
1297
+ createEntityChat(ref: AXMEntityChatRef, assistId?: string): Promise<AXConversation>;
1298
+ /**
1299
+ * Builds the `createConversation` payload for a new entity assist chat.
1300
+ * Uses `assistId` when provided, otherwise the tenant default assist.
1301
+ */
1302
+ buildEntityChatCreateData(ref: AXMEntityChatRef, assistId?: string): Promise<AXMEntityChatCreateData>;
1303
+ /** Resolves the assist catalog row to chat with (explicit id → tenant default → first row). */
1304
+ private resolveAssistRow;
1305
+ private resolveDefaultAssistId;
1306
+ private resolveTitle;
1307
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMEntityChatService, never>;
1308
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMEntityChatService>;
1309
+ }
1310
+
1311
+ /**
1312
+ * Compact scrollable list of inbox AI-assist chats (non-entity bot / assist conversations).
1313
+ */
1314
+ declare class AXMMiniChatInboxHistoryComponent implements OnInit {
1315
+ private readonly conversationApi;
1316
+ private readonly conversationFilter;
1317
+ /** Emits when the user picks a conversation from the list. */
1318
+ readonly conversationSelected: _angular_core.OutputEmitterRef<string>;
1319
+ /** Emits when the user starts a new chat from the empty state. */
1320
+ readonly newChatRequested: _angular_core.OutputEmitterRef<void>;
1321
+ /** Emits whether the loaded history contains at least one conversation. */
1322
+ readonly hasConversationsChange: _angular_core.OutputEmitterRef<boolean>;
1323
+ readonly conversations: _angular_core.WritableSignal<AXConversation[]>;
1324
+ readonly loading: _angular_core.WritableSignal<boolean>;
1325
+ ngOnInit(): void;
1326
+ /** Reloads AI-assist inbox conversations. */
1327
+ refresh(): Promise<void>;
1328
+ protected resolveListAvatar(conversation: AXConversation): {
1329
+ title: string;
1330
+ avatar?: string;
1331
+ icon?: string;
1332
+ };
1333
+ protected onSelect(conversationId: string): void;
1334
+ protected onNewChat(): void;
1335
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMMiniChatInboxHistoryComponent, never>;
1336
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMMiniChatInboxHistoryComponent, "axm-mini-chat-inbox-history", never, {}, { "conversationSelected": "conversationSelected"; "newChatRequested": "newChatRequested"; "hasConversationsChange": "hasConversationsChange"; }, never, never, true, never>;
1337
+ }
1338
+
1339
+ type AXMMiniChatInboxConversationFilter = (conversation: AXConversation) => boolean;
1340
+ declare const AXM_MINI_CHAT_INBOX_CONVERSATION_FILTER: InjectionToken<AXMMiniChatInboxConversationFilter>;
1341
+
1342
+ /** Anchor element for overlay positioning. */
1343
+ type AXMMiniChatPanelAnchor = Element | ElementRef<HTMLElement>;
1344
+ /**
1345
+ * Common placement aliases mapped to {@link AXPlacement}.
1346
+ * Examples: `top-right` → `top-end`, `bottom-left` → `bottom-start`.
1347
+ */
1348
+ type AXMMiniChatPanelSide = AXPlacement | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'left' | 'right';
1349
+ /** Fixed viewport coordinates (px). Ignored when `anchor` is set. */
1350
+ interface AXMMiniChatPanelPosition {
1351
+ x: number;
1352
+ y: number;
1353
+ }
1354
+ /** Mini chat panel scope: entity-bound threads or main inbox (non-entity chats). */
1355
+ type AXMMiniChatPanelScope = 'entity' | 'inbox';
1356
+ /** Session key used for the global inbox mini chat (non-entity conversations). */
1357
+ declare const AXM_MINI_CHAT_INBOX_SESSION_KEY = "__inbox__";
1358
+ /** Persisted panel state for a mini chat session. */
1359
+ interface AXMMiniChatPanelSessionState {
1360
+ view: 'thread' | 'history';
1361
+ selectedChatId?: string;
1362
+ hasOpened: boolean;
1363
+ }
1364
+ /** Options passed to {@link AXMMiniChatPanelService.open}. */
1365
+ interface AXMMiniChatPanelOpenOptions {
1366
+ /** Default: `entity`. Use `inbox` for regular (non-entity) chats shown in the main chat sidebar. */
1367
+ scope?: AXMMiniChatPanelScope;
1368
+ entityId?: string;
1369
+ entityType?: string;
1370
+ assistId?: string;
1371
+ title?: string;
1372
+ showInfoBar?: boolean;
1373
+ showComposer?: boolean;
1374
+ /** Fixed viewport position (px). Ignored when `anchor` is set. */
1375
+ position?: AXMMiniChatPanelPosition;
1376
+ /** Anchor element for popover placement. */
1377
+ anchor?: AXMMiniChatPanelAnchor;
1378
+ /** Placement relative to anchor. Default: `top-end` when anchored. */
1379
+ placement?: AXMMiniChatPanelSide;
1380
+ offsetX?: number;
1381
+ offsetY?: number;
1382
+ autoFlip?: boolean;
1383
+ /** When true, always opens a fresh conversation thread. */
1384
+ forceNewChat?: boolean;
1385
+ }
1386
+
1387
+ /**
1388
+ * Host for inbox mini chat with an isolated {@link AXConversationService} so the header
1389
+ * slot does not change the main chat page selection while the user is on the chat route.
1390
+ */
1391
+ declare class AXMMiniChatInboxPanelHostComponent {
1392
+ readonly title: _angular_core.InputSignal<string>;
1393
+ readonly showInfoBar: _angular_core.InputSignal<boolean>;
1394
+ readonly showComposer: _angular_core.InputSignal<boolean>;
1395
+ readonly requestClose: _angular_core.InputSignal<() => void>;
1396
+ readonly initialView: _angular_core.InputSignal<"thread" | "history">;
1397
+ readonly initialConversationId: _angular_core.InputSignal<string | undefined>;
1398
+ readonly startWithNewChat: _angular_core.InputSignal<boolean>;
1399
+ readonly onSessionChange: _angular_core.InputSignal<((state: Pick<AXMMiniChatPanelSessionState, "view" | "selectedChatId">) => void) | undefined>;
1400
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMMiniChatInboxPanelHostComponent, never>;
1401
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMMiniChatInboxPanelHostComponent, "axm-mini-chat-inbox-panel-host", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "showInfoBar": { "alias": "showInfoBar"; "required": false; "isSignal": true; }; "showComposer": { "alias": "showComposer"; "required": false; "isSignal": true; }; "requestClose": { "alias": "requestClose"; "required": true; "isSignal": true; }; "initialView": { "alias": "initialView"; "required": false; "isSignal": true; }; "initialConversationId": { "alias": "initialConversationId"; "required": false; "isSignal": true; }; "startWithNewChat": { "alias": "startWithNewChat"; "required": false; "isSignal": true; }; "onSessionChange": { "alias": "onSessionChange"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1402
+ }
1403
+
1404
+ /**
1405
+ * Root header slot that toggles the inbox mini chat overlay (AI-assist conversations only).
1406
+ */
1407
+ declare class AXMMiniChatHeaderSlotComponent {
1408
+ private readonly panelService;
1409
+ private readonly chatButtonRef;
1410
+ protected onToggleClick(): void;
1411
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMMiniChatHeaderSlotComponent, never>;
1412
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMMiniChatHeaderSlotComponent, "axm-mini-chat-header-slot", never, {}, {}, never, never, true, never>;
1413
+ }
1414
+
1415
+ /**
1416
+ * Scrollable list of entity-scoped conversations for the mini chat panel.
1417
+ * Loads chats via {@link AXMEntityChatService.findEntityConversations}.
1418
+ */
1419
+ declare class AXMMiniChatHistoryComponent implements OnInit {
1420
+ private readonly entityChatService;
1421
+ readonly entityId: _angular_core.InputSignal<string>;
1422
+ readonly entityType: _angular_core.InputSignal<string>;
1423
+ /** Emits when the user picks a conversation from the list. */
1424
+ readonly conversationSelected: _angular_core.OutputEmitterRef<string>;
1425
+ /** Emits when the user starts a new chat from the empty state. */
1426
+ readonly newChatRequested: _angular_core.OutputEmitterRef<void>;
1427
+ /** Emits whether the loaded history contains at least one conversation. */
1428
+ readonly hasConversationsChange: _angular_core.OutputEmitterRef<boolean>;
1429
+ readonly conversations: _angular_core.WritableSignal<AXConversation[]>;
1430
+ readonly loading: _angular_core.WritableSignal<boolean>;
1431
+ ngOnInit(): void;
1432
+ /** Reloads the entity conversation list (call when the history panel becomes visible). */
1433
+ refresh(): Promise<void>;
1434
+ protected resolveListAvatar(conversation: AXConversation): {
1435
+ title: string;
1436
+ avatar?: string;
1437
+ icon?: string;
1438
+ };
1439
+ protected onSelect(conversationId: string): void;
1440
+ protected onNewChat(): void;
1441
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMMiniChatHistoryComponent, never>;
1442
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMMiniChatHistoryComponent, "axm-mini-chat-history", never, { "entityId": { "alias": "entityId"; "required": true; "isSignal": true; }; "entityType": { "alias": "entityType"; "required": true; "isSignal": true; }; }, { "conversationSelected": "conversationSelected"; "newChatRequested": "newChatRequested"; "hasConversationsChange": "hasConversationsChange"; }, never, never, true, never>;
1443
+ }
1444
+
1445
+ /**
1446
+ * Opens the entity mini chat panel via {@link AXOverlayService}.
1447
+ * Restores the last conversation per entity on reopen; use {@link forceNewChat} for an explicit new thread.
1448
+ */
1449
+ declare class AXMMiniChatPanelService {
1450
+ private readonly overlayService;
1451
+ private readonly conversationService;
1452
+ private readonly conversationApi;
1453
+ private readonly document;
1454
+ private readonly router;
1455
+ private overlayRef;
1456
+ private anchorElement;
1457
+ private keydownHandler;
1458
+ private outsideClickHandler;
1459
+ private routerSubscription;
1460
+ /** Active conversation before the panel took over selection (restored on close). */
1461
+ private savedActiveConversationId;
1462
+ /** Per-entity session (view, selected conversation) restored when the panel reopens. */
1463
+ private readonly sessions;
1464
+ /** Reactive open state for launcher UI (FAB icon). */
1465
+ readonly panelOpen: _angular_core.WritableSignal<boolean>;
1466
+ /** True while the mini chat overlay is mounted. */
1467
+ isOpen(): boolean;
1468
+ /** Closes the overlay when it is open. */
1469
+ close(): void;
1470
+ /** Toggles the inbox mini chat overlay (regular non-entity conversations). */
1471
+ toggleInbox(options?: Omit<AXMMiniChatPanelOpenOptions, 'scope' | 'entityId' | 'entityType'>): void;
1472
+ /** Toggles the overlay, restoring the last session when reopening. */
1473
+ toggle(options: AXMMiniChatPanelOpenOptions): void;
1474
+ /**
1475
+ * Opens the mini chat panel overlay (replaces any existing overlay).
1476
+ * Restores the last session for the entity unless {@link AXMMiniChatPanelOpenOptions.forceNewChat} is set.
1477
+ */
1478
+ open(options: AXMMiniChatPanelOpenOptions): Promise<void>;
1479
+ private buildEntityKey;
1480
+ private disposeOverlayOnly;
1481
+ private handleOverlayDisposed;
1482
+ private bindDismissHandlers;
1483
+ /** Ignore clicks on the anchor, overlay panel, or nested dropdown menus. */
1484
+ private isInsideInteractiveSurface;
1485
+ private removeDismissHandlers;
1486
+ private captureActiveConversation;
1487
+ private restoreActiveConversation;
1488
+ private resolveAnchorElement;
1489
+ private normalizePlacement;
1490
+ private applyFixedPosition;
1491
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMMiniChatPanelService, never>;
1492
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMMiniChatPanelService>;
1493
+ }
1494
+
1495
+ /**
1496
+ * Fixed bottom-right FAB that toggles the entity mini chat overlay via {@link AXMMiniChatPanelService}.
1497
+ * Reopens the last conversation for the entity; pass {@link placement} to control popover side.
1498
+ */
1499
+ declare class AXMMiniChatLauncherComponent {
1500
+ protected readonly panelService: AXMMiniChatPanelService;
1501
+ protected readonly isOpen: _angular_core.Signal<boolean>;
1502
+ readonly entityId: _angular_core.InputSignal<string>;
1503
+ readonly entityType: _angular_core.InputSignal<string>;
1504
+ readonly assistId: _angular_core.InputSignal<string | undefined>;
1505
+ readonly title: _angular_core.InputSignal<string | undefined>;
1506
+ /** Placement relative to the FAB when no custom {@link position} is set. Default: `top-end`. */
1507
+ readonly placement: _angular_core.InputSignal<"bottom-start" | "bottom-end" | "top-start" | "top-end" | "top" | "bottom">;
1508
+ readonly offsetX: _angular_core.InputSignal<number>;
1509
+ readonly offsetY: _angular_core.InputSignal<number>;
1510
+ private readonly fabRef;
1511
+ protected onFabClick(): void;
1512
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMMiniChatLauncherComponent, never>;
1513
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMMiniChatLauncherComponent, "axm-mini-chat-launcher", never, { "entityId": { "alias": "entityId"; "required": true; "isSignal": true; }; "entityType": { "alias": "entityType"; "required": true; "isSignal": true; }; "assistId": { "alias": "assistId"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "offsetX": { "alias": "offsetX"; "required": false; "isSignal": true; }; "offsetY": { "alias": "offsetY"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1514
+ }
1515
+
1516
+ /**
1517
+ * Mini chat panel overlay: header, thread view, and history (entity list or main inbox sidebar).
1518
+ */
1519
+ declare class AXMMiniChatPanelComponent implements OnInit, OnDestroy {
1520
+ private readonly conversationService;
1521
+ private readonly conversationApi;
1522
+ private readonly realtimeBus;
1523
+ private readonly destroyRef;
1524
+ readonly scope: _angular_core.InputSignal<AXMMiniChatPanelScope>;
1525
+ readonly entityId: _angular_core.InputSignal<string | undefined>;
1526
+ readonly entityType: _angular_core.InputSignal<string | undefined>;
1527
+ readonly assistId: _angular_core.InputSignal<string | undefined>;
1528
+ readonly title: _angular_core.InputSignal<string>;
1529
+ readonly showInfoBar: _angular_core.InputSignal<boolean>;
1530
+ readonly showComposer: _angular_core.InputSignal<boolean>;
1531
+ readonly requestClose: _angular_core.InputSignal<() => void>;
1532
+ readonly initialView: _angular_core.InputSignal<"thread" | "history">;
1533
+ readonly initialConversationId: _angular_core.InputSignal<string | undefined>;
1534
+ readonly startWithNewChat: _angular_core.InputSignal<boolean>;
1535
+ readonly onSessionChange: _angular_core.InputSignal<((state: Pick<AXMMiniChatPanelSessionState, "view" | "selectedChatId">) => void) | undefined>;
1536
+ protected readonly view: _angular_core.WritableSignal<"thread" | "history">;
1537
+ protected readonly selectedChatId: _angular_core.WritableSignal<string | undefined>;
1538
+ protected readonly historyHasItems: _angular_core.WritableSignal<boolean>;
1539
+ protected readonly isInboxScope: _angular_core.Signal<boolean>;
1540
+ /** Bumps when shared conversation storage changes so the header title stays in sync. */
1541
+ private readonly storageRevision;
1542
+ /** Active conversation title for the thread header; null when none is selected yet. */
1543
+ protected readonly headerTitle: _angular_core.Signal<string | null>;
1544
+ private readonly cachedHeaderTitle;
1545
+ constructor();
1546
+ ngOnInit(): void;
1547
+ ngOnDestroy(): void;
1548
+ protected closePanel(): void;
1549
+ protected openHistory(): void;
1550
+ protected onHistoryHasConversationsChange(hasItems: boolean): void;
1551
+ protected selectChat(conversationId: string): void;
1552
+ protected onConversationOpened(conversationId: string): void;
1553
+ protected startNewChat(): Promise<void>;
1554
+ private syncSession;
1555
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMMiniChatPanelComponent, never>;
1556
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMMiniChatPanelComponent, "axm-mini-chat-panel", never, { "scope": { "alias": "scope"; "required": false; "isSignal": true; }; "entityId": { "alias": "entityId"; "required": false; "isSignal": true; }; "entityType": { "alias": "entityType"; "required": false; "isSignal": true; }; "assistId": { "alias": "assistId"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "showInfoBar": { "alias": "showInfoBar"; "required": false; "isSignal": true; }; "showComposer": { "alias": "showComposer"; "required": false; "isSignal": true; }; "requestClose": { "alias": "requestClose"; "required": true; "isSignal": true; }; "initialView": { "alias": "initialView"; "required": false; "isSignal": true; }; "initialConversationId": { "alias": "initialConversationId"; "required": false; "isSignal": true; }; "startWithNewChat": { "alias": "startWithNewChat"; "required": false; "isSignal": true; }; "onSessionChange": { "alias": "onSessionChange"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1557
+ }
1558
+
1559
+ /**
1560
+ * Compact, entity-scoped chat: renders a single conversation thread (message list) with an optional
1561
+ * info-bar and composer. Opens an existing chat by {@link chatId}, or starts a new entity assist chat
1562
+ * (created lazily on first send and tagged with `entityId` / `entityType` in conversation metadata).
1563
+ *
1564
+ * Uses the shared {@link AXConversationService} (same instance as the main chat page) so message
1565
+ * streams, realtime updates, and assist replies behave identically. Selecting a chat / starting a
1566
+ * new one is coordinated by the host through {@link chatId} and {@link AXConversationService}.
1567
+ */
1568
+ declare class AXMMiniChatComponent {
1569
+ #private;
1570
+ private readonly conversationService;
1571
+ private readonly conversationApi;
1572
+ private readonly assistResponse;
1573
+ private readonly destroyRef;
1574
+ /** Existing conversation id to open. When omitted (and no conversation is active), the new-chat composer is shown. */
1575
+ readonly chatId: _angular_core.InputSignal<string | undefined>;
1576
+ /** Entity reference the chat is (or will be) bound to; omitted for inbox (regular) chats. */
1577
+ readonly entityId: _angular_core.InputSignal<string | undefined>;
1578
+ readonly entityType: _angular_core.InputSignal<string | undefined>;
1579
+ /** Assist used as the bot peer when creating a new entity chat (falls back to the tenant default). */
1580
+ readonly assistId: _angular_core.InputSignal<string | undefined>;
1581
+ readonly showInfoBar: _angular_core.InputSignal<boolean>;
1582
+ readonly showComposer: _angular_core.InputSignal<boolean>;
1583
+ /** Emits the active conversation id when one is opened or newly created. */
1584
+ readonly conversationOpened: _angular_core.OutputEmitterRef<string>;
1585
+ readonly hasActiveConversation: _angular_core.Signal<boolean>;
1586
+ constructor();
1587
+ /** New-chat composer created and selected a conversation; surface it to the host. */
1588
+ onConversationCreated(conversationId: string): void;
1589
+ onComposerGenerationCancelled(): void;
1590
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMMiniChatComponent, never>;
1591
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMMiniChatComponent, "axm-mini-chat", never, { "chatId": { "alias": "chatId"; "required": false; "isSignal": true; }; "entityId": { "alias": "entityId"; "required": false; "isSignal": true; }; "entityType": { "alias": "entityType"; "required": false; "isSignal": true; }; "assistId": { "alias": "assistId"; "required": false; "isSignal": true; }; "showInfoBar": { "alias": "showInfoBar"; "required": false; "isSignal": true; }; "showComposer": { "alias": "showComposer"; "required": false; "isSignal": true; }; }, { "conversationOpened": "conversationOpened"; }, never, never, true, never>;
1592
+ }
1593
+
1594
+ /** Fired after a user message is persisted — triggers assist, auto-reply, and realtime side effects. */
1595
+ declare const CONVERSATION_AFTER_MESSAGE_SENT_COMMAND = "Conversation:AfterMessageSent";
1596
+ /** Re-runs AI generation for a failed/incomplete assist placeholder. */
1597
+ declare const CONVERSATION_RETRY_ASSIST_RESPONSE_COMMAND = "Conversation:RetryAssistResponse";
1598
+ /** Marks conversation messages read and syncs chat notifications. */
1599
+ declare const CONVERSATION_SYNC_READ_STATE_COMMAND = "Conversation:SyncReadState";
1600
+ /** Marks a conversation as having unread messages. */
1601
+ declare const CONVERSATION_MARK_CONVERSATION_UNREAD_COMMAND = "Conversation:MarkConversationUnread";
1602
+ /** Sends or clears a typing indicator for the current user. */
1603
+ declare const CONVERSATION_EMIT_TYPING_INDICATOR_COMMAND = "Conversation:EmitTypingIndicator";
1604
+ /** Starts a new bot conversation with the given AI assist model. */
1605
+ declare const CONVERSATION_START_ASSIST_CHAT_COMMAND = "Conversation:StartAssistChat";
1606
+ /** Sends a user text message in the active assist chat, or starts a chat when {@code assistId} is provided. */
1607
+ declare const CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND = "Conversation:SendAssistChatMessage";
1608
+ /** Starts or reuses a private chat with another user and navigates to the conversation. */
1609
+ declare const CONVERSATION_START_DIRECT_CHAT_COMMAND = "Conversation:StartDirectChat";
1610
+ /** Opens an existing conversation in the chat app. */
1611
+ declare const CONVERSATION_OPEN_CHAT_COMMAND = "Conversation:OpenChat";
1612
+
1613
+ export { AXMAddReactionCommand, AXMAssistSuggestionChipsComponent, AXMChatComponent, AXMChatConversationApi, AXMChatEntityConversationApi, AXMChatEntityConversationFocusHandler, AXMChatEntityConversationRoomQueryService, AXMChatEntityMessageApi, AXMChatEntityRealtimeApi, AXMChatEntityUserApi, AXMChatMessageApi, AXMChatRealtimeApi, AXMChatUserApi, AXMCommentComponent, AXMCommentManagementService, AXMCommentPopupComponent, AXMCommentRealtimeService, AXMCommentRealtimeServiceImpl, AXMCommentService, AXMCommentServiceImpl, AXMCommentWidgetViewComponent, AXMConversationAssistBackgroundOperationHandler, AXMConversationEntityStoreService, AXMConversationFocusService, AXMConversationModule, AXMConversationRealtimeBus, AXMEntityChatService, AXMMiniChatComponent, AXMMiniChatHeaderSlotComponent, AXMMiniChatHistoryComponent, AXMMiniChatInboxHistoryComponent, AXMMiniChatInboxPanelHostComponent, AXMMiniChatLauncherComponent, AXMMiniChatPanelComponent, AXMMiniChatPanelService, AXMShowCommentPopupCommand, AXM_AI_MANAGEMENT_AGENT_ENTITY_NAME, AXM_AI_MANAGEMENT_ASSIST_ENTITY_NAME, AXM_AI_MANAGEMENT_MODULE_NAME, AXM_ASSIST_DEFAULT_RESOLVER_PORT, AXM_ASSIST_TRANSCRIPT_LINE_PAYLOAD_TYPE, AXM_CHAT_ASSIST_CATALOG_PORT, AXM_CHAT_EMPTY_STATE_COMPONENT, AXM_CHAT_SIDEBAR_ACTION_PROVIDER, AXM_CONVERSATION_ASSIST_BACKGROUND_OPERATION_HANDLERS, AXM_CONVERSATION_ASSIST_BACKGROUND_OPERATION_KEY, AXM_CONVERSATION_ASSIST_RESPONSE_PORT, AXM_CONVERSATION_CHAT_ATTACHMENT_CATEGORY, AXM_CONVERSATION_CHAT_ATTACHMENT_REF_TYPE, AXM_CONVERSATION_REGULAR_AUTO_REPLY_PORT, AXM_CONVERSATION_TAB_BOT, AXM_MINI_CHAT_INBOX_CONVERSATION_FILTER, AXM_MINI_CHAT_INBOX_SESSION_KEY, AXPCommentWidget, COMMENTS_PAGE_COMPONENT_KEY, CONVERSATION_AFTER_MESSAGE_SENT_COMMAND, CONVERSATION_EMIT_TYPING_INDICATOR_COMMAND, CONVERSATION_MARK_CONVERSATION_UNREAD_COMMAND, CONVERSATION_OPEN_CHAT_COMMAND, CONVERSATION_RETRY_ASSIST_RESPONSE_COMMAND, CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND, CONVERSATION_START_ASSIST_CHAT_COMMAND, CONVERSATION_START_DIRECT_CHAT_COMMAND, CONVERSATION_SYNC_READ_STATE_COMMAND, axmApplyAnswerTextToAssistPayloadLine, axmAssistFollowUpItemsFromUnknown, axmAssistHasFinalizeMetadata, axmAssistLastTranscriptLine, axmAssistNormalizeFollowUpItemForConversation, axmAssistNormalizeFollowUpItemsForConversation, axmAssistPersistedMessageLooksComplete, axmAssistResolveFollowUpCommandName, axmAssistStarterPromptChipItems, axmAssistUserFacingPayloadLine, axmAssistUserVisibleItemsForLine, axmAssistWidgetNodeDedupeKey, axmAssistWidgetNodeFromUnknown, axmBuildAiChatConversationMetadata, axmBuildAssistPeerParticipantFromCreateData, axmBuildAssistPeerParticipantFromId, axmBuildAssistTranscriptLinePayload, axmBuildAutoTitleFromUserText, axmBuildEntityChatConversationMetadata, axmChatAiPeerParticipantId, axmChatAiTargetAvatarUrl, axmChatAiTargetDisplayDescription, axmChatAiTargetDisplayName, axmChatAiTargetShortcutDescriptionKey, axmCoerceDate, axmCoerceTimestampMs, axmComputeConversationUnreadCount, axmConversationHasAiChat, axmConversationIsEntityChat, axmConversationMatchesEntity, axmExtractAssistIdFromMetadata, axmExtractAssistSnapshotFromMetadata, axmExtractDirectAgentIdFromMetadata, axmExtractEntityRefFromMetadata, axmExtractModelEntityIdFromMetadata, axmExtractTextFromPayload, axmFilterChatAiTargets, axmIsAssistBotConversation, axmIsAssistPeerParticipant, axmIsAssistRetryableStatus, axmIsAssistStreamingMessage, axmIsAssistStreamingStatus, axmIsAssistTerminalStatus, axmLoadChatAiTargets, axmMessageCountsTowardUnread, axmMessageEntityToMessage, axmNormalizeAssistTranscriptForChatUi, axmNormalizeAssistTranscriptLineResponses, axmParseAssistTranscriptLinePayload, axmParseAssistTranscriptTextEnvelope, axmPartitionAssistAnswerText, axmReadAssistAiTranscript, axmReadAssistAiTranscriptRaw, axmReadAssistResponseError, axmReadAssistResponseStatus, axmReadPlainTextMessagePayload, axmReadReplyToUserMessageId, axmResolveAssistFinalAnswerText, axmResolveChatAiTargetText, axmRoomEntityToConversation, axmRoomWithAssistPeerDisplayName, axmSanitizeAssistUserAnswerText, axmShouldPreferPersistedAssistOverLiveCache, axmShowCommentPopupCommandDefinition, axmSortMessagesNewestFirst, axmSyncAssistPeerDisplayName, axmSyntheticEmbedMessage, axmUserRowToParticipant, commentsPlugin, createConversationServiceSessionAdapter, persistChatAttachment };
1614
+ export type { AXMAddReactionCommandInput, AXMAssistConversationSnapshotLite, AXMAssistDefaultResolverPort, AXMAssistStarterPromptChipOptions, AXMChatAiTargetRow, AXMChatAssistCatalogPort, AXMChatSidebarAction, AXMComment, AXMCommentEvent, AXMCommentEventType, AXMCommentThread, AXMConversationAssistResponsePort, AXMConversationRegularAutoReplyPort, AXMConversationServiceSessionAdapter, AXMEntityChatCreateData, AXMEntityChatRef, AXMMiniChatInboxConversationFilter, AXMMiniChatPanelAnchor, AXMMiniChatPanelOpenOptions, AXMMiniChatPanelPosition, AXMMiniChatPanelScope, AXMMiniChatPanelSessionState, AXMMiniChatPanelSide, AXMSendAssistChatMessageOptions, AXMShowCommentPopupCommandInput, AXMThreadEvent, AXMThreadEventType, AXPAiChatFollowUpCommandLite, AXPAiChatFollowUpItemLite, AXPAiChatMessageLite, AXPAiChatNodeOrFollowUpResponseLite, AXPAiChatTextResponseLite, AXPAiEffectiveAssistRowLite, AxmAssistPartitionedAnswerText, AxmAssistResponseStatus, AxmAssistTranscriptLinePayload, AxmAssistUserVisibleItem, CommentsDisplayMode, CommentsPluginOptions };