@tolinax/ayoune-interfaces 2026.50.0 → 2026.52.0
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.
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { IDefaultFields } from "./IDefaultFields";
|
|
2
|
+
import { INotificationAction } from "./INotificationAction";
|
|
3
|
+
import { INotificationAttachment } from "./INotificationAttachment";
|
|
2
4
|
export interface IChatMessage extends IDefaultFields {
|
|
3
5
|
_customerID: ObjectId;
|
|
4
6
|
_clientID?: ObjectId[];
|
|
@@ -26,4 +28,31 @@ export interface IChatMessage extends IDefaultFields {
|
|
|
26
28
|
viewParams?: object;
|
|
27
29
|
viewTitle?: string;
|
|
28
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* Typed rich-content attachments — reuses the same discriminated union
|
|
33
|
+
* that INotification carries. A task referenced in a chat message
|
|
34
|
+
* renders with the exact same card component as a task in a
|
|
35
|
+
* Tasks.assigned notification (see ChatViewComponent phase-4a
|
|
36
|
+
* integration). Producers can pass bare `{type, _id}` refs; the chat-
|
|
37
|
+
* api send route enriches them server-side (same helper the
|
|
38
|
+
* notification orchestrator uses).
|
|
39
|
+
*/
|
|
40
|
+
attachments?: INotificationAttachment[];
|
|
41
|
+
/**
|
|
42
|
+
* Inline action buttons on the message (bot replies, quick-approvals,
|
|
43
|
+
* AI-copilot hand-offs). Same dispatch model as notification actions:
|
|
44
|
+
* link → router, api → /_action bridge, ai-copilot → Copilot panel.
|
|
45
|
+
*/
|
|
46
|
+
actions?: INotificationAction[];
|
|
47
|
+
/**
|
|
48
|
+
* Avatar-carrying sender metadata for the bubble header. Mirrors
|
|
49
|
+
* INotificationSender — populated by the chat-api on send from
|
|
50
|
+
* req.user, or supplied explicitly for bot / system messages.
|
|
51
|
+
*/
|
|
52
|
+
sender?: {
|
|
53
|
+
_userId?: ObjectId;
|
|
54
|
+
name?: string;
|
|
55
|
+
avatar?: string;
|
|
56
|
+
email?: string;
|
|
57
|
+
};
|
|
29
58
|
}
|
|
@@ -34,4 +34,16 @@ export interface IInternalChatMessage extends IDefaultFields {
|
|
|
34
34
|
bookmarks: IBookmark[];
|
|
35
35
|
attachments: IAttachment[];
|
|
36
36
|
actions: IChatAction[];
|
|
37
|
+
/**
|
|
38
|
+
* Avatar-carrying sender snapshot for the chat bubble header. Mirrors
|
|
39
|
+
* the notification sender shape so the shared rendering widgets treat
|
|
40
|
+
* chat + notification senders identically. `_sender` remains the
|
|
41
|
+
* canonical ObjectId reference.
|
|
42
|
+
*/
|
|
43
|
+
sender?: {
|
|
44
|
+
_userId?: ObjectId;
|
|
45
|
+
name?: string;
|
|
46
|
+
avatar?: string;
|
|
47
|
+
email?: string;
|
|
48
|
+
};
|
|
37
49
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tolinax/ayoune-interfaces",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.52.0",
|
|
4
4
|
"description": "Houses TypeScript interfaces for aYOUne",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -98,7 +98,9 @@
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
|
-
"dependencies": {
|
|
101
|
+
"dependencies": {
|
|
102
|
+
"@tolinax/ayoune-interfaces": "^2026.50.0"
|
|
103
|
+
},
|
|
102
104
|
"devDependencies": {
|
|
103
105
|
"@release-it/conventional-changelog": "^5.0.0",
|
|
104
106
|
"cpx": "^1.5.0",
|