@msssystems/mss-link-sdk 0.2.11 → 0.2.14
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.
|
@@ -46,6 +46,11 @@ export interface Chat {
|
|
|
46
46
|
createdAt: string;
|
|
47
47
|
updatedAt: string;
|
|
48
48
|
}
|
|
49
|
+
export interface MessageReaction {
|
|
50
|
+
id: string;
|
|
51
|
+
emoji: string;
|
|
52
|
+
userId: string;
|
|
53
|
+
}
|
|
49
54
|
export interface Message {
|
|
50
55
|
id: string;
|
|
51
56
|
type: string;
|
|
@@ -61,7 +66,13 @@ export interface Message {
|
|
|
61
66
|
displayName: string;
|
|
62
67
|
avatarUrl?: string | null;
|
|
63
68
|
};
|
|
69
|
+
forwardedFrom?: {
|
|
70
|
+
id: string;
|
|
71
|
+
displayName: string;
|
|
72
|
+
avatarUrl?: string | null;
|
|
73
|
+
} | null;
|
|
64
74
|
media: MessageMediaAttachment[];
|
|
75
|
+
reactions: MessageReaction[];
|
|
65
76
|
createdAt: string;
|
|
66
77
|
updatedAt: string;
|
|
67
78
|
}
|
|
@@ -99,7 +110,7 @@ export interface MarkMessagesStatusInput {
|
|
|
99
110
|
throughMessageId?: string;
|
|
100
111
|
limit?: number;
|
|
101
112
|
}
|
|
102
|
-
export type SyncEventType = 'MESSAGE_NEW' | 'MESSAGE_STATUS_UPDATED';
|
|
113
|
+
export type SyncEventType = 'MESSAGE_NEW' | 'MESSAGE_STATUS_UPDATED' | 'MESSAGE_REACT';
|
|
103
114
|
export interface SyncEvent {
|
|
104
115
|
sequence: string;
|
|
105
116
|
type: SyncEventType;
|
|
@@ -145,6 +156,7 @@ export interface SendEncryptedMessageInput {
|
|
|
145
156
|
chatId: string;
|
|
146
157
|
targetUserId: string;
|
|
147
158
|
text: string;
|
|
159
|
+
forwardedFromId?: string;
|
|
148
160
|
}
|
|
149
161
|
export interface SendMediaMessageInput {
|
|
150
162
|
profileId: string;
|
|
@@ -8,6 +8,7 @@ export interface LocalSdkMessage {
|
|
|
8
8
|
createdAt?: string;
|
|
9
9
|
updatedAt?: string;
|
|
10
10
|
}
|
|
11
|
+
import type { MessageReaction } from '../../contracts/chat.contract';
|
|
11
12
|
export interface DecryptedMessage {
|
|
12
13
|
id: string;
|
|
13
14
|
chatId: string;
|
|
@@ -15,6 +16,12 @@ export interface DecryptedMessage {
|
|
|
15
16
|
text: string;
|
|
16
17
|
kind: string;
|
|
17
18
|
status: string;
|
|
19
|
+
forwardedFrom?: {
|
|
20
|
+
id: string;
|
|
21
|
+
displayName: string;
|
|
22
|
+
avatarUrl?: string | null;
|
|
23
|
+
} | null;
|
|
24
|
+
reactions?: MessageReaction[];
|
|
18
25
|
createdAt: string;
|
|
19
26
|
updatedAt: string;
|
|
20
27
|
}
|
|
@@ -60,4 +60,7 @@ export class MessagesClient {
|
|
|
60
60
|
async acknowledgeSyncCheckpoint(input) {
|
|
61
61
|
return this.http.post('/link/v1/sync/ack', input);
|
|
62
62
|
}
|
|
63
|
+
async reactToMessage(chatId, messageId, emoji) {
|
|
64
|
+
return this.http.post(`/link/v1/chats/${chatId}/messages/${messageId}/react`, { emoji });
|
|
65
|
+
}
|
|
63
66
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@msssystems/mss-link-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "Official managed application SDK for MSS ecosystem",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"registry": "https://registry.npmjs.org/"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@msssystems/mss-crypto-wasm": "^0.1.
|
|
56
|
+
"@msssystems/mss-crypto-wasm": "^0.1.26",
|
|
57
57
|
"@nestjs/common": "^10.0.0 || ^11.0.0",
|
|
58
58
|
"@nestjs/core": "^10.0.0 || ^11.0.0",
|
|
59
59
|
"express": "^4.0.0 || ^5.0.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@msssystems/mss-crypto-wasm": "^0.1.
|
|
80
|
+
"@msssystems/mss-crypto-wasm": "^0.1.27",
|
|
81
81
|
"@nestjs/common": "^11.0.1",
|
|
82
82
|
"@nestjs/core": "^11.0.1",
|
|
83
83
|
"@types/express": "^5.0.0",
|