@canonmsg/backend-contracts 1.6.0 → 1.7.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.
- package/dist/cjs/message.js +3 -0
- package/dist/message.d.ts +1 -0
- package/dist/message.js +3 -0
- package/package.json +1 -1
package/dist/cjs/message.js
CHANGED
|
@@ -92,6 +92,9 @@ function normalizeContactCard(value) {
|
|
|
92
92
|
};
|
|
93
93
|
if (typeof value.about === 'string')
|
|
94
94
|
card.about = value.about;
|
|
95
|
+
if (userType === 'ai_agent' && typeof value.canonContactId === 'string') {
|
|
96
|
+
card.canonContactId = value.canonContactId;
|
|
97
|
+
}
|
|
95
98
|
const clientType = userType === 'ai_agent'
|
|
96
99
|
? normalizeAgentClientType(value.clientType)
|
|
97
100
|
: undefined;
|
package/dist/message.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface ForwardedFrom {
|
|
|
9
9
|
export type SerializedReactions = Record<string, string[]>;
|
|
10
10
|
export interface SerializedContactCard {
|
|
11
11
|
userId: string;
|
|
12
|
+
canonContactId?: string;
|
|
12
13
|
displayName: string;
|
|
13
14
|
avatarUrl: string | null;
|
|
14
15
|
userType: SerializedSenderType;
|
package/dist/message.js
CHANGED
|
@@ -89,6 +89,9 @@ function normalizeContactCard(value) {
|
|
|
89
89
|
};
|
|
90
90
|
if (typeof value.about === 'string')
|
|
91
91
|
card.about = value.about;
|
|
92
|
+
if (userType === 'ai_agent' && typeof value.canonContactId === 'string') {
|
|
93
|
+
card.canonContactId = value.canonContactId;
|
|
94
|
+
}
|
|
92
95
|
const clientType = userType === 'ai_agent'
|
|
93
96
|
? normalizeAgentClientType(value.clientType)
|
|
94
97
|
: undefined;
|