@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,80 @@
1
+ import { AXDialogService } from '@acorex/components/dialog';
2
+ import { AXConversationService } from '@acorex/components/conversation';
3
+ import { AXTranslationService } from '@acorex/core/translation';
4
+ import { AXPSessionService } from '@acorex-platform/framework-client/auth';
5
+ import { AXPUserAvatarService } from '@acorex-platform/framework-client/layout/components';
6
+ import * as i0 from '@angular/core';
7
+ import { inject, Injectable } from '@angular/core';
8
+ import { Router } from '@angular/router';
9
+ import { firstValueFrom, take } from 'rxjs';
10
+
11
+ //#endregion
12
+ //#region ----- Command -----
13
+ /** Creates or reuses a private conversation with {@link AXMStartDirectChatOptions.userId} and opens chat. */
14
+ class AXMConversationStartDirectChatCommand {
15
+ constructor() {
16
+ //#region ----- Services & Dependencies -----
17
+ this.conversationService = inject(AXConversationService);
18
+ this.sessionService = inject(AXPSessionService);
19
+ this.avatarService = inject(AXPUserAvatarService);
20
+ this.router = inject(Router);
21
+ this.dialogService = inject(AXDialogService);
22
+ this.translation = inject(AXTranslationService);
23
+ }
24
+ //#endregion
25
+ async execute(input) {
26
+ const userId = typeof input?.userId === 'string'
27
+ ? input.userId.trim()
28
+ : '';
29
+ if (!userId) {
30
+ await this.showError('missing-user');
31
+ return { success: false, message: { text: '@conversation:chat.user-card.errors.missing-user' } };
32
+ }
33
+ const currentUserId = this.sessionService.user?.id;
34
+ if (currentUserId != null && userId === currentUserId) {
35
+ await this.showError('self-chat');
36
+ return { success: false, message: { text: '@conversation:chat.user-card.errors.self-chat' } };
37
+ }
38
+ const title = await this.resolveChatTitle(userId);
39
+ try {
40
+ const conversation = await this.conversationService.createConversation([userId], 'private', { title });
41
+ await this.router.navigate([this.applicationRouteSegment(), 'chat', conversation.id]);
42
+ return { success: true, kind: 'object', data: { conversationId: conversation.id } };
43
+ }
44
+ catch {
45
+ await this.showError('create-room');
46
+ return { success: false, message: { text: '@conversation:chat.user-card.errors.create-room' } };
47
+ }
48
+ }
49
+ //#region ----- Private -----
50
+ applicationRouteSegment() {
51
+ return this.sessionService.application?.name?.trim() || 'platform';
52
+ }
53
+ async resolveChatTitle(userId) {
54
+ try {
55
+ const info = await firstValueFrom(this.avatarService.getUserInfo$(userId).pipe(take(1)));
56
+ const parts = [info?.firstName, info?.lastName].map((part) => part?.trim()).filter(Boolean);
57
+ if (parts.length > 0) {
58
+ return parts.join(' ');
59
+ }
60
+ return info?.username?.trim() || '';
61
+ }
62
+ catch {
63
+ return '';
64
+ }
65
+ }
66
+ async showError(key) {
67
+ const title = await this.translation.translateAsync('@conversation:chat.user-card.error-title');
68
+ const message = await this.translation.translateAsync(`@conversation:chat.user-card.errors.${key}`);
69
+ await this.dialogService.alert(title, message, 'danger');
70
+ }
71
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMConversationStartDirectChatCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
72
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMConversationStartDirectChatCommand, providedIn: 'root' }); }
73
+ }
74
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMConversationStartDirectChatCommand, decorators: [{
75
+ type: Injectable,
76
+ args: [{ providedIn: 'root' }]
77
+ }] });
78
+
79
+ export { AXMConversationStartDirectChatCommand };
80
+ //# sourceMappingURL=acorex-platform-module-conversation-client-start-direct-chat.command-CfSIVHDu.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-conversation-client-start-direct-chat.command-CfSIVHDu.mjs","sources":["../../../../libs/modules/conversation/client/src/lib/features/commands/start-direct-chat.command.ts"],"sourcesContent":["import { AXDialogService } from '@acorex/components/dialog';\nimport { AXConversationService } from '@acorex/components/conversation';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPUserAvatarService } from '@acorex-platform/framework-client/layout/components';\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { firstValueFrom, take } from 'rxjs';\n\n//#region ----- Types -----\n\nexport interface AXMStartDirectChatOptions {\n userId?: string;\n}\n\n//#endregion\n\n//#region ----- Command -----\n\n/** Creates or reuses a private conversation with {@link AXMStartDirectChatOptions.userId} and opens chat. */\n@Injectable({ providedIn: 'root' })\nexport class AXMConversationStartDirectChatCommand implements AXPCommand<AXMStartDirectChatOptions, { conversationId: string }> {\n //#region ----- Services & Dependencies -----\n\n private readonly conversationService = inject(AXConversationService);\n private readonly sessionService = inject(AXPSessionService);\n private readonly avatarService = inject(AXPUserAvatarService);\n private readonly router = inject(Router);\n private readonly dialogService = inject(AXDialogService);\n private readonly translation = inject(AXTranslationService);\n\n //#endregion\n\n async execute(input: AXMStartDirectChatOptions | unknown): AXPCommandExecuteResultPromise<{ conversationId: string }> {\n const userId = typeof (input as AXMStartDirectChatOptions)?.userId === 'string'\n ? (input as AXMStartDirectChatOptions).userId!.trim()\n : '';\n\n if (!userId) {\n await this.showError('missing-user');\n return { success: false, message: { text: '@conversation:chat.user-card.errors.missing-user' } };\n }\n\n const currentUserId = this.sessionService.user?.id;\n if (currentUserId != null && userId === currentUserId) {\n await this.showError('self-chat');\n return { success: false, message: { text: '@conversation:chat.user-card.errors.self-chat' } };\n }\n\n const title = await this.resolveChatTitle(userId);\n try {\n const conversation = await this.conversationService.createConversation([userId], 'private', { title });\n await this.router.navigate([this.applicationRouteSegment(), 'chat', conversation.id]);\n return { success: true, kind: 'object', data: { conversationId: conversation.id } };\n } catch {\n await this.showError('create-room');\n return { success: false, message: { text: '@conversation:chat.user-card.errors.create-room' } };\n }\n }\n\n //#region ----- Private -----\n\n private applicationRouteSegment(): string {\n return this.sessionService.application?.name?.trim() || 'platform';\n }\n\n private async resolveChatTitle(userId: string): Promise<string> {\n try {\n const info = await firstValueFrom(this.avatarService.getUserInfo$(userId).pipe(take(1)));\n const parts = [info?.firstName, info?.lastName].map((part) => part?.trim()).filter(Boolean) as string[];\n if (parts.length > 0) {\n return parts.join(' ');\n }\n return info?.username?.trim() || '';\n } catch {\n return '';\n }\n }\n\n private async showError(key: string): Promise<void> {\n const title = await this.translation.translateAsync('@conversation:chat.user-card.error-title');\n const message = await this.translation.translateAsync(`@conversation:chat.user-card.errors.${key}`);\n await this.dialogService.alert(title, message, 'danger');\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;AAgBA;AAEA;AAEA;MAEa,qCAAqC,CAAA;AADlD,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACnD,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAC5C,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAyD5D,IAAA;;IArDC,MAAM,OAAO,CAAC,KAA0C,EAAA;AACtD,QAAA,MAAM,MAAM,GAAG,OAAQ,KAAmC,EAAE,MAAM,KAAK;AACrE,cAAG,KAAmC,CAAC,MAAO,CAAC,IAAI;cACjD,EAAE;QAEN,IAAI,CAAC,MAAM,EAAE;AACX,YAAA,MAAM,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC;AACpC,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,kDAAkD,EAAE,EAAE;QAClG;QAEA,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,EAAE;QAClD,IAAI,aAAa,IAAI,IAAI,IAAI,MAAM,KAAK,aAAa,EAAE;AACrD,YAAA,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;AACjC,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,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A,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AACpB,gBAAA,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;YACxB;YACA,OAAO,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE;QACrC;AAAE,QAAA,MAAM;AACN,YAAA,OAAO,EAAE;QACX;IACF;IAEQ,MAAM,SAAS,CAAC,GAAW,EAAA;QACjC,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,0CAA0C,CAAC;AAC/F,QAAA,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,CAAA,oCAAA,EAAuC,GAAG,CAAA,CAAE,CAAC;AACnG,QAAA,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC;IAC1D;8GA9DW,qCAAqC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAArC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qCAAqC,cADxB,MAAM,EAAA,CAAA,CAAA;;2FACnB,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBADjD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
@@ -0,0 +1,142 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Injectable } from '@angular/core';
3
+ import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
4
+ import { RootConfig } from '@acorex-platform/module-communication-management-client/contracts';
5
+ import { AXPCommunicationManagementClient } from '@acorex-platform/module-communication-management-client';
6
+ import { A as AXMConversationEntityStoreService, d as AXMConversationFocusService } from './acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-DsjrXRZ6.mjs';
7
+
8
+ //#region ---- Conversation in-app notification sync ----
9
+ const IN_APP_CHANNEL = 'in-app';
10
+ const SYNC_MIN_INTERVAL_MS = 2500;
11
+ class AXMConversationInAppNotificationSyncService {
12
+ constructor() {
13
+ this.client = inject(AXPCommunicationManagementClient, { optional: true });
14
+ this.entityService = inject(AXPEntityService);
15
+ this.deliveryData = this.entityService
16
+ .withEntity(RootConfig.module.name, RootConfig.entities.communicationDelivery.name)
17
+ .data();
18
+ this.communicationData = this.entityService
19
+ .withEntity(RootConfig.module.name, RootConfig.entities.communication.name)
20
+ .data();
21
+ this.lastSyncAt = new Map();
22
+ this.syncChains = new Map();
23
+ }
24
+ async markConversationInAppRead(conversationId, recipientUserId) {
25
+ if (!this.client || !conversationId.trim() || !recipientUserId.trim()) {
26
+ return;
27
+ }
28
+ const key = `${conversationId.trim()}:${recipientUserId.trim()}`;
29
+ const now = Date.now();
30
+ const last = this.lastSyncAt.get(key) ?? 0;
31
+ if (now - last < SYNC_MIN_INTERVAL_MS) {
32
+ return;
33
+ }
34
+ const previous = this.syncChains.get(key) ?? Promise.resolve();
35
+ const next = previous.then(() => this.markConversationInAppReadInternal(conversationId, recipientUserId));
36
+ this.syncChains.set(key, next.finally(() => {
37
+ if (this.syncChains.get(key) === next) {
38
+ this.syncChains.delete(key);
39
+ }
40
+ }));
41
+ await next;
42
+ this.lastSyncAt.set(key, Date.now());
43
+ }
44
+ async markConversationInAppReadInternal(conversationId, recipientUserId) {
45
+ const prefix = `conversation:${conversationId.trim()}:`;
46
+ const communications = await this.communicationData.query({
47
+ skip: 0,
48
+ take: 100,
49
+ filter: {
50
+ field: 'correlationId',
51
+ operator: { type: 'contains' },
52
+ value: prefix,
53
+ },
54
+ });
55
+ const communicationIds = communications.items
56
+ .filter((row) => String(row.correlationId ?? '').startsWith(prefix))
57
+ .map((row) => row.id)
58
+ .filter(Boolean);
59
+ if (communicationIds.length === 0) {
60
+ return;
61
+ }
62
+ const deliveries = await this.deliveryData.query({
63
+ skip: 0,
64
+ take: Math.max(communicationIds.length, 1),
65
+ filter: {
66
+ logic: 'and',
67
+ filters: [
68
+ { field: 'channel', operator: { type: 'equal' }, value: IN_APP_CHANNEL },
69
+ { field: 'recipientUserId', operator: { type: 'equal' }, value: recipientUserId },
70
+ { field: 'readAt', operator: { type: 'isNull' }, value: null },
71
+ {
72
+ logic: 'or',
73
+ filters: communicationIds.map((id) => ({
74
+ field: 'communicationId',
75
+ operator: { type: 'equal' },
76
+ value: id,
77
+ })),
78
+ },
79
+ ],
80
+ },
81
+ });
82
+ const deliveryIds = deliveries.items
83
+ .map((row) => row.id)
84
+ .filter(Boolean);
85
+ if (deliveryIds.length === 0) {
86
+ return;
87
+ }
88
+ await this.client.markInAppRead({ deliveryIds });
89
+ }
90
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMConversationInAppNotificationSyncService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
91
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMConversationInAppNotificationSyncService, providedIn: 'root' }); }
92
+ }
93
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMConversationInAppNotificationSyncService, decorators: [{
94
+ type: Injectable,
95
+ args: [{ providedIn: 'root' }]
96
+ }] });
97
+
98
+ //#endregion
99
+ //#region ---- Command ----
100
+ class AXMConversationSyncReadStateCommand {
101
+ constructor() {
102
+ this.store = inject(AXMConversationEntityStoreService);
103
+ this.focus = inject(AXMConversationFocusService);
104
+ this.inAppSync = inject(AXMConversationInAppNotificationSyncService);
105
+ }
106
+ async execute(input) {
107
+ const options = input;
108
+ const conversationId = options.conversationId?.trim();
109
+ if (!conversationId) {
110
+ return { success: true, kind: 'object', data: undefined };
111
+ }
112
+ this.focus.setFocusedConversation(conversationId);
113
+ if (!options.messageIds?.length) {
114
+ const cachedConversation = this.store.getCachedConversation(conversationId);
115
+ const cachedMessages = this.store.getCachedMessageList(conversationId);
116
+ const skipInAppSync = cachedMessages !== null &&
117
+ cachedMessages.length === 0 &&
118
+ (cachedConversation?.unreadCount ?? 0) === 0;
119
+ if (cachedConversation?.unreadCount === 0) {
120
+ return { success: true, kind: 'object', data: undefined };
121
+ }
122
+ await this.store.setUnreadCount(conversationId, 0);
123
+ if (!skipInAppSync) {
124
+ await this.inAppSync.markConversationInAppRead(conversationId, options.currentUserId);
125
+ }
126
+ return { success: true, kind: 'object', data: undefined };
127
+ }
128
+ const marked = await this.focus.markMessagesRead(conversationId, options.messageIds, options.currentUserId);
129
+ await this.inAppSync.markConversationInAppRead(conversationId, options.currentUserId);
130
+ void marked;
131
+ return { success: true, kind: 'object', data: undefined };
132
+ }
133
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMConversationSyncReadStateCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
134
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMConversationSyncReadStateCommand, providedIn: 'root' }); }
135
+ }
136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMConversationSyncReadStateCommand, decorators: [{
137
+ type: Injectable,
138
+ args: [{ providedIn: 'root' }]
139
+ }] });
140
+
141
+ export { AXMConversationSyncReadStateCommand };
142
+ //# sourceMappingURL=acorex-platform-module-conversation-client-sync-read-state.command-B1Z_gZ6O.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-conversation-client-sync-read-state.command-B1Z_gZ6O.mjs","sources":["../../../../libs/modules/conversation/client/src/lib/features/chat/services/conversation-in-app-notification-sync.service.ts","../../../../libs/modules/conversation/client/src/lib/features/commands/sync-read-state.command.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport {\n RootConfig,\n type AXMCommunicationDeliveryModel,\n type AXMCommunicationModel,\n} from '@acorex-platform/module-communication-management-client/contracts';\nimport { AXPCommunicationManagementClient } from '@acorex-platform/module-communication-management-client';\n\n//#region ---- Conversation in-app notification sync ----\n\nconst IN_APP_CHANNEL = 'in-app';\nconst SYNC_MIN_INTERVAL_MS = 2500;\n\n@Injectable({ providedIn: 'root' })\nexport class AXMConversationInAppNotificationSyncService {\n private readonly client = inject(AXPCommunicationManagementClient, { optional: true });\n private readonly entityService = inject(AXPEntityService);\n private readonly deliveryData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.communicationDelivery.name)\n .data<string, AXMCommunicationDeliveryModel, AXMCommunicationDeliveryModel>();\n private readonly communicationData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.communication.name)\n .data<string, AXMCommunicationModel, AXMCommunicationModel>();\n\n private readonly lastSyncAt = new Map<string, number>();\n private readonly syncChains = new Map<string, Promise<void>>();\n\n async markConversationInAppRead(conversationId: string, recipientUserId: string): Promise<void> {\n if (!this.client || !conversationId.trim() || !recipientUserId.trim()) {\n return;\n }\n\n const key = `${conversationId.trim()}:${recipientUserId.trim()}`;\n const now = Date.now();\n const last = this.lastSyncAt.get(key) ?? 0;\n if (now - last < SYNC_MIN_INTERVAL_MS) {\n return;\n }\n\n const previous = this.syncChains.get(key) ?? Promise.resolve();\n const next = previous.then(() => this.markConversationInAppReadInternal(conversationId, recipientUserId));\n this.syncChains.set(\n key,\n next.finally(() => {\n if (this.syncChains.get(key) === next) {\n this.syncChains.delete(key);\n }\n }),\n );\n await next;\n this.lastSyncAt.set(key, Date.now());\n }\n\n private async markConversationInAppReadInternal(\n conversationId: string,\n recipientUserId: string,\n ): Promise<void> {\n const prefix = `conversation:${conversationId.trim()}:`;\n\n const communications = await this.communicationData.query({\n skip: 0,\n take: 100,\n filter: {\n field: 'correlationId',\n operator: { type: 'contains' },\n value: prefix,\n },\n });\n\n const communicationIds = (communications.items as AXMCommunicationModel[])\n .filter((row) => String(row.correlationId ?? '').startsWith(prefix))\n .map((row) => row.id)\n .filter(Boolean);\n\n if (communicationIds.length === 0) {\n return;\n }\n\n const deliveries = await this.deliveryData.query({\n skip: 0,\n take: Math.max(communicationIds.length, 1),\n filter: {\n logic: 'and',\n filters: [\n { field: 'channel', operator: { type: 'equal' }, value: IN_APP_CHANNEL },\n { field: 'recipientUserId', operator: { type: 'equal' }, value: recipientUserId },\n { field: 'readAt', operator: { type: 'isNull' }, value: null },\n {\n logic: 'or',\n filters: communicationIds.map((id) => ({\n field: 'communicationId',\n operator: { type: 'equal' as const },\n value: id,\n })),\n },\n ],\n },\n });\n\n const deliveryIds = (deliveries.items as AXMCommunicationDeliveryModel[])\n .map((row) => row.id)\n .filter(Boolean);\n\n if (deliveryIds.length === 0) {\n return;\n }\n\n await this.client!.markInAppRead({ deliveryIds });\n }\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\n\nimport { inject, Injectable } from '@angular/core';\n\nimport { axmIsAssistStreamingMessage } from '../chat/plugins/utils/conversation-unread.util';\nimport { AXMConversationInAppNotificationSyncService } from '../chat/services/conversation-in-app-notification-sync.service';\nimport { AXMConversationEntityStoreService } from '../chat/services/conversation-entity-store.service';\nimport { AXMConversationFocusService } from '../chat/services/conversation-focus.service';\n\n//#endregion\n\n//#region ---- Types ----\n\nexport interface AXMSyncReadStateOptions {\n conversationId: string;\n messageIds?: string[];\n currentUserId: string;\n}\n\n//#endregion\n\n//#region ---- Command ----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMConversationSyncReadStateCommand implements AXPCommand<AXMSyncReadStateOptions, void> {\n private readonly store = inject(AXMConversationEntityStoreService);\n private readonly focus = inject(AXMConversationFocusService);\n private readonly inAppSync = inject(AXMConversationInAppNotificationSyncService);\n\n async execute(input: AXMSyncReadStateOptions | unknown): AXPCommandExecuteResultPromise<void> {\n const options = input as AXMSyncReadStateOptions;\n const conversationId = options.conversationId?.trim();\n if (!conversationId) {\n return { success: true, kind: 'object', data: undefined };\n }\n\n this.focus.setFocusedConversation(conversationId);\n\n if (!options.messageIds?.length) {\n const cachedConversation = this.store.getCachedConversation(conversationId);\n const cachedMessages = this.store.getCachedMessageList(conversationId);\n const skipInAppSync =\n cachedMessages !== null &&\n cachedMessages.length === 0 &&\n (cachedConversation?.unreadCount ?? 0) === 0;\n\n if (cachedConversation?.unreadCount === 0) {\n return { success: true, kind: 'object', data: undefined };\n }\n\n await this.store.setUnreadCount(conversationId, 0);\n if (!skipInAppSync) {\n await this.inAppSync.markConversationInAppRead(conversationId, options.currentUserId);\n }\n return { success: true, kind: 'object', data: undefined };\n }\n\n const marked = await this.focus.markMessagesRead(conversationId, options.messageIds, options.currentUserId);\n await this.inAppSync.markConversationInAppRead(conversationId, options.currentUserId);\n void marked;\n return { success: true, kind: 'object', data: undefined };\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AASA;AAEA,MAAM,cAAc,GAAG,QAAQ;AAC/B,MAAM,oBAAoB,GAAG,IAAI;MAGpB,2CAA2C,CAAA;AADxD,IAAA,WAAA,GAAA;QAEmB,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,gCAAgC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACrE,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;QACxC,IAAA,CAAA,YAAY,GAAG,IAAI,CAAC;AAClC,aAAA,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAI;AACjF,aAAA,IAAI,EAAwE;QAC9D,IAAA,CAAA,iBAAiB,GAAG,IAAI,CAAC;AACvC,aAAA,UAAU,CAAC,U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IAAI,CAAC,SAAS,CAAC,yBAAyB,CAAC,cAAc,EAAE,OAAO,CAAC,aAAa,CAAC;YACvF;AACA,YAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;QAC3D;AAEA,QAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,cAAc,EAAE,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,aAAa,CAAC;AAC3G,QAAA,MAAM,IAAI,CAAC,SAAS,CAAC,yBAAyB,CAAC,cAAc,EAAE,OAAO,CAAC,aAAa,CAAC;AACrF,QAAA,KAAK,MAAM;AACX,QAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;IAC3D;8GArCW,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mCAAmC,cADtB,MAAM,EAAA,CAAA,CAAA;;2FACnB,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAD/C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
@@ -0,0 +1,2 @@
1
+ export { z as AXMAddReactionCommand, y as AXMAssistSuggestionChipsComponent, B as AXMChatComponent, C as AXMChatConversationApi, D as AXMChatEntityConversationApi, E as AXMChatEntityConversationFocusHandler, F as AXMChatEntityConversationRoomQueryService, G as AXMChatEntityMessageApi, H as AXMChatEntityRealtimeApi, I as AXMChatEntityUserApi, J as AXMChatMessageApi, K as AXMChatRealtimeApi, i as AXMChatUserApi, e as AXMCommentComponent, L as AXMCommentManagementService, M as AXMCommentPopupComponent, N as AXMCommentRealtimeService, O as AXMCommentRealtimeServiceImpl, P as AXMCommentService, Q as AXMCommentServiceImpl, R as AXMCommentWidgetViewComponent, S as AXMConversationAssistBackgroundOperationHandler, A as AXMConversationEntityStoreService, d as AXMConversationFocusService, T as AXMConversationModule, m as AXMConversationRealtimeBus, U as AXMEntityChatService, V as AXMMiniChatComponent, W as AXMMiniChatHeaderSlotComponent, X as AXMMiniChatHistoryComponent, Y as AXMMiniChatInboxHistoryComponent, Z as AXMMiniChatInboxPanelHostComponent, _ as AXMMiniChatLauncherComponent, $ as AXMMiniChatPanelComponent, a0 as AXMMiniChatPanelService, a1 as AXMShowCommentPopupCommand, a2 as AXM_AI_MANAGEMENT_AGENT_ENTITY_NAME, a3 as AXM_AI_MANAGEMENT_ASSIST_ENTITY_NAME, a4 as AXM_AI_MANAGEMENT_MODULE_NAME, a5 as AXM_ASSIST_DEFAULT_RESOLVER_PORT, a6 as AXM_ASSIST_TRANSCRIPT_LINE_PAYLOAD_TYPE, a7 as AXM_CHAT_ASSIST_CATALOG_PORT, a8 as AXM_CHAT_EMPTY_STATE_COMPONENT, a9 as AXM_CHAT_SIDEBAR_ACTION_PROVIDER, aa as AXM_CONVERSATION_ASSIST_BACKGROUND_OPERATION_HANDLERS, ab as AXM_CONVERSATION_ASSIST_BACKGROUND_OPERATION_KEY, a as AXM_CONVERSATION_ASSIST_RESPONSE_PORT, ac as AXM_CONVERSATION_CHAT_ATTACHMENT_CATEGORY, ad as AXM_CONVERSATION_CHAT_ATTACHMENT_REF_TYPE, b as AXM_CONVERSATION_REGULAR_AUTO_REPLY_PORT, ae as AXM_CONVERSATION_TAB_BOT, af as AXM_MINI_CHAT_INBOX_CONVERSATION_FILTER, ag as AXM_MINI_CHAT_INBOX_SESSION_KEY, ah as AXPCommentWidget, ai as COMMENTS_PAGE_COMPONENT_KEY, aj as CONVERSATION_AFTER_MESSAGE_SENT_COMMAND, ak as CONVERSATION_EMIT_TYPING_INDICATOR_COMMAND, al as CONVERSATION_MARK_CONVERSATION_UNREAD_COMMAND, am as CONVERSATION_OPEN_CHAT_COMMAND, an as CONVERSATION_RETRY_ASSIST_RESPONSE_COMMAND, ao as CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND, ap as CONVERSATION_START_ASSIST_CHAT_COMMAND, aq as CONVERSATION_START_DIRECT_CHAT_COMMAND, ar as CONVERSATION_SYNC_READ_STATE_COMMAND, as as axmApplyAnswerTextToAssistPayloadLine, at as axmAssistFollowUpItemsFromUnknown, au as axmAssistHasFinalizeMetadata, av as axmAssistLastTranscriptLine, aw as axmAssistNormalizeFollowUpItemForConversation, ax as axmAssistNormalizeFollowUpItemsForConversation, ay as axmAssistPersistedMessageLooksComplete, az as axmAssistResolveFollowUpCommandName, aA as axmAssistStarterPromptChipItems, aB as axmAssistUserFacingPayloadLine, aC as axmAssistUserVisibleItemsForLine, aD as axmAssistWidgetNodeDedupeKey, t as axmAssistWidgetNodeFromUnknown, aE as axmBuildAiChatConversationMetadata, aF as axmBuildAssistPeerParticipantFromCreateData, aG as axmBuildAssistPeerParticipantFromId, aH as axmBuildAssistTranscriptLinePayload, aI as axmBuildAutoTitleFromUserText, aJ as axmBuildEntityChatConversationMetadata, aK as axmChatAiPeerParticipantId, aL as axmChatAiTargetAvatarUrl, aM as axmChatAiTargetDisplayDescription, aN as axmChatAiTargetDisplayName, aO as axmChatAiTargetShortcutDescriptionKey, aP as axmCoerceDate, aQ as axmCoerceTimestampMs, aR as axmComputeConversationUnreadCount, c as axmConversationHasAiChat, aS as axmConversationIsEntityChat, aT as axmConversationMatchesEntity, aU as axmExtractAssistIdFromMetadata, aV as axmExtractAssistSnapshotFromMetadata, aW as axmExtractDirectAgentIdFromMetadata, aX as axmExtractEntityRefFromMetadata, aY as axmExtractModelEntityIdFromMetadata, aZ as axmExtractTextFromPayload, a_ as axmFilterChatAiTargets, a$ as axmIsAssistBotConversation, b0 as axmIsAssistPeerParticipant, b1 as axmIsAssistRetryableStatus, b2 as axmIsAssistStreamingMessage, b3 as axmIsAssistStreamingStatus, b4 as axmIsAssistTerminalStatus, b5 as axmLoadChatAiTargets, b6 as axmMessageCountsTowardUnread, b7 as axmMessageEntityToMessage, b8 as axmNormalizeAssistTranscriptForChatUi, b9 as axmNormalizeAssistTranscriptLineResponses, ba as axmParseAssistTranscriptLinePayload, s as axmParseAssistTranscriptTextEnvelope, u as axmPartitionAssistAnswerText, p as axmReadAssistAiTranscript, q as axmReadAssistAiTranscriptRaw, bb as axmReadAssistResponseError, bc as axmReadAssistResponseStatus, bd as axmReadPlainTextMessagePayload, be as axmReadReplyToUserMessageId, bf as axmResolveAssistFinalAnswerText, bg as axmResolveChatAiTargetText, bh as axmRoomEntityToConversation, bi as axmRoomWithAssistPeerDisplayName, bj as axmSanitizeAssistUserAnswerText, bk as axmShouldPreferPersistedAssistOverLiveCache, bl as axmShowCommentPopupCommandDefinition, bm as axmSortMessagesNewestFirst, bn as axmSyncAssistPeerDisplayName, v as axmSyntheticEmbedMessage, bo as axmUserRowToParticipant, bp as commentsPlugin, bq as createConversationServiceSessionAdapter, br as persistChatAttachment } from './acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-DsjrXRZ6.mjs';
2
+ //# sourceMappingURL=acorex-platform-module-conversation-client.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-conversation-client.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@acorex-platform/module-conversation-client",
3
+ "version": "0.0.21",
4
+ "sideEffects": false,
5
+ "peerDependencies": {
6
+ "@angular/common": "^21.0.0",
7
+ "@angular/core": "^21.0.0"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "module": "fesm2022/acorex-platform-module-conversation-client.mjs",
13
+ "typings": "types/acorex-platform-module-conversation-client.d.ts",
14
+ "exports": {
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./types/acorex-platform-module-conversation-client.d.ts",
20
+ "default": "./fesm2022/acorex-platform-module-conversation-client.mjs"
21
+ },
22
+ "./contracts": {
23
+ "types": "./types/acorex-platform-module-conversation-client-contracts.d.ts",
24
+ "default": "./fesm2022/acorex-platform-module-conversation-client-contracts.mjs"
25
+ }
26
+ },
27
+ "type": "module"
28
+ }