@inter-digital/wasm-client-sdk 3.8.4-patch.2 → 3.8.4-patch.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.
- package/assets/openIM.wasm +0 -0
- package/assets/wasm_exec.js +15 -1
- package/lib/api/database/black.d.ts +1 -0
- package/lib/api/database/conversation.d.ts +1 -0
- package/lib/api/database/groupRequest.d.ts +1 -0
- package/lib/api/database/index.d.ts +1 -0
- package/lib/api/database/message.d.ts +1 -0
- package/lib/api/database/msgPin.d.ts +4 -0
- package/lib/api/database/users.d.ts +1 -0
- package/lib/constant/index.d.ts +3 -0
- package/lib/index.es.js +43 -1
- package/lib/index.js +43 -1
- package/lib/index.umd.js +43 -1
- package/lib/sdk/index.d.ts +4 -1
- package/lib/sqls/index.d.ts +1 -0
- package/lib/sqls/localBlack.d.ts +1 -0
- package/lib/sqls/localChatLogsConversationID.d.ts +1 -0
- package/lib/sqls/localConversations.d.ts +1 -0
- package/lib/sqls/localGroupRequests.d.ts +3 -0
- package/lib/sqls/localMsgPin.d.ts +12 -0
- package/lib/types/entity.d.ts +24 -0
- package/lib/types/eventData.d.ts +3 -1
- package/lib/types/params.d.ts +8 -0
- package/lib/worker-legacy.js +1 -1
- package/lib/worker.js +1 -1
- package/package.json +1 -1
package/assets/openIM.wasm
CHANGED
|
Binary file
|
package/assets/wasm_exec.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
if (!globalThis.fs) {
|
|
15
15
|
let outputBuf = "";
|
|
16
16
|
globalThis.fs = {
|
|
17
|
-
constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused
|
|
17
|
+
constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1, O_DIRECTORY: -1 }, // unused
|
|
18
18
|
writeSync(fd, buf) {
|
|
19
19
|
outputBuf += decoder.decode(buf);
|
|
20
20
|
const nl = outputBuf.lastIndexOf("\n");
|
|
@@ -73,6 +73,14 @@
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
if (!globalThis.path) {
|
|
77
|
+
globalThis.path = {
|
|
78
|
+
resolve(...pathSegments) {
|
|
79
|
+
return pathSegments.join("/");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
76
84
|
if (!globalThis.crypto) {
|
|
77
85
|
throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");
|
|
78
86
|
}
|
|
@@ -208,10 +216,16 @@
|
|
|
208
216
|
return decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));
|
|
209
217
|
}
|
|
210
218
|
|
|
219
|
+
const testCallExport = (a, b) => {
|
|
220
|
+
this._inst.exports.testExport0();
|
|
221
|
+
return this._inst.exports.testExport(a, b);
|
|
222
|
+
}
|
|
223
|
+
|
|
211
224
|
const timeOrigin = Date.now() - performance.now();
|
|
212
225
|
this.importObject = {
|
|
213
226
|
_gotest: {
|
|
214
227
|
add: (a, b) => a + b,
|
|
228
|
+
callExport: testCallExport,
|
|
215
229
|
},
|
|
216
230
|
gojs: {
|
|
217
231
|
// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare function getBlackList(): Promise<string>;
|
|
2
2
|
export declare function getBlackListUserID(): Promise<string>;
|
|
3
|
+
export declare function getBlackListByOtherDB(loginUserID: string): Promise<string>;
|
|
3
4
|
export declare function getBlackInfoByBlockUserID(blockUserID: string, loginUserID: string): Promise<string>;
|
|
4
5
|
export declare function getBlackInfoList(blockUserIDListStr: string): Promise<string>;
|
|
5
6
|
export declare function insertBlack(localBlackStr: string): Promise<string>;
|
|
@@ -6,6 +6,7 @@ export declare function getAllSingleConversationIDList(): Promise<string>;
|
|
|
6
6
|
export declare function getAllConversationIDList(): Promise<string>;
|
|
7
7
|
export declare function getHiddenConversationList(): Promise<string>;
|
|
8
8
|
export declare function getConversation(conversationID: string): Promise<string>;
|
|
9
|
+
export declare function getConversationByConversationIDLike(conversationID: string): Promise<string>;
|
|
9
10
|
export declare function getMultipleConversation(conversationIDList: string): Promise<string>;
|
|
10
11
|
export declare function updateColumnsConversation(conversationID: string, conversation: ClientConversation | string): Promise<string>;
|
|
11
12
|
export declare function decrConversationUnreadCount(conversationID: string, count: number): Promise<string>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare function insertGroupRequest(localGroupRequestStr: string): Promise<string>;
|
|
2
2
|
export declare function deleteGroupRequest(groupID: string, userID: string): Promise<string>;
|
|
3
3
|
export declare function updateGroupRequest(localGroupRequestStr: string): Promise<string>;
|
|
4
|
+
export declare function updateGroupRequestGroupInfo(groupID: string, updatesStr: string): Promise<string>;
|
|
4
5
|
export declare function getSendGroupApplication(): Promise<string>;
|
|
5
6
|
export declare function insertAdminGroupRequest(localAdminGroupRequestStr: string): Promise<string>;
|
|
6
7
|
export declare function deleteAdminGroupRequest(groupID: string, userID: string): Promise<string>;
|
|
@@ -20,6 +20,7 @@ export declare function searchMessageByContentType(conversationID: string, conte
|
|
|
20
20
|
export declare function searchMessageByContentTypeAndKeyword(conversationID: string, contentTypeStr: string, keywordListStr: string, keywordListMatchType: number, startTime: number, endTime: number): Promise<string>;
|
|
21
21
|
export declare function messageIfExists(conversationID: string, clientMsgID: string): Promise<string>;
|
|
22
22
|
export declare function updateMsgSenderFaceURLAndSenderNickname(conversationID: string, sendID: string, faceURL: string, nickname: string, faceBackgroundColor?: string): Promise<string>;
|
|
23
|
+
export declare function updateMsgSenderFaceBackgroundColor(conversationID: string, sendID: string, faceBackgroundColor: string): Promise<string>;
|
|
23
24
|
export declare function deleteConversationAllMessages(conversationID: string): Promise<string>;
|
|
24
25
|
export declare function markDeleteConversationAllMessages(conversationID: string): Promise<string>;
|
|
25
26
|
export declare function getUnreadMessage(conversationID: string, loginUserID: string): Promise<string>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function insertMsgPin(msgPinStr: string): Promise<string>;
|
|
2
|
+
export declare function findMsgPinByConversationIDAndSeq(conversationID: string, seq: number): Promise<string>;
|
|
3
|
+
export declare function findMsgPinByConversationID(conversationID: string): Promise<string>;
|
|
4
|
+
export declare function deleteMsgPin(conversationID: string, seq: number): Promise<string>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare function getLoginUser(userID: string): Promise<string>;
|
|
2
2
|
export declare function insertLoginUser(userStr: string): Promise<string>;
|
|
3
3
|
export declare function updateLoginUser(userStr: string): Promise<string>;
|
|
4
|
+
export declare function processUserCommandGetAll(): Promise<string>;
|
package/lib/constant/index.d.ts
CHANGED
|
@@ -51,6 +51,9 @@ export declare enum CbEvents {
|
|
|
51
51
|
OnGroupMemberInfoChanged = "OnGroupMemberInfoChanged",
|
|
52
52
|
OnGroupApplicationAccepted = "OnGroupApplicationAccepted",
|
|
53
53
|
OnGroupApplicationRejected = "OnGroupApplicationRejected",
|
|
54
|
+
OnGroupRequestInfoChanged = "OnGroupRequestInfoChanged",
|
|
55
|
+
OnMsgPinned = "OnMsgPinned",
|
|
56
|
+
OnMsgUnpinned = "OnMsgUnpinned",
|
|
54
57
|
UploadComplete = "UploadComplete",
|
|
55
58
|
OnRecvCustomBusinessMessage = "OnRecvCustomBusinessMessage",
|
|
56
59
|
OnUserStatusChanged = "OnUserStatusChanged",
|
package/lib/index.es.js
CHANGED
|
@@ -434,6 +434,10 @@ var CbEvents;
|
|
|
434
434
|
CbEvents["OnGroupMemberInfoChanged"] = "OnGroupMemberInfoChanged";
|
|
435
435
|
CbEvents["OnGroupApplicationAccepted"] = "OnGroupApplicationAccepted";
|
|
436
436
|
CbEvents["OnGroupApplicationRejected"] = "OnGroupApplicationRejected";
|
|
437
|
+
CbEvents["OnGroupRequestInfoChanged"] = "OnGroupRequestInfoChanged";
|
|
438
|
+
// message pin
|
|
439
|
+
CbEvents["OnMsgPinned"] = "OnMsgPinned";
|
|
440
|
+
CbEvents["OnMsgUnpinned"] = "OnMsgUnpinned";
|
|
437
441
|
CbEvents["UploadComplete"] = "UploadComplete";
|
|
438
442
|
CbEvents["OnRecvCustomBusinessMessage"] = "OnRecvCustomBusinessMessage";
|
|
439
443
|
CbEvents["OnUserStatusChanged"] = "OnUserStatusChanged";
|
|
@@ -607,6 +611,7 @@ function initDatabaseAPI(isLogStandardOutput = true) {
|
|
|
607
611
|
window.updateMsgSenderNickname = registeMethodOnWindow('updateMsgSenderNickname');
|
|
608
612
|
window.updateMsgSenderFaceURL = registeMethodOnWindow('updateMsgSenderFaceURL');
|
|
609
613
|
window.updateMsgSenderFaceURLAndSenderNickname = registeMethodOnWindow('updateMsgSenderFaceURLAndSenderNickname');
|
|
614
|
+
window.updateMsgSenderFaceBackgroundColor = registeMethodOnWindow('updateMsgSenderFaceBackgroundColor');
|
|
610
615
|
window.getMsgSeqByClientMsgID = registeMethodOnWindow('getMsgSeqByClientMsgID');
|
|
611
616
|
window.getMsgSeqListByGroupID = registeMethodOnWindow('getMsgSeqListByGroupID');
|
|
612
617
|
window.getMsgSeqListByPeerUserID = registeMethodOnWindow('getMsgSeqListByPeerUserID');
|
|
@@ -635,11 +640,21 @@ function initDatabaseAPI(isLogStandardOutput = true) {
|
|
|
635
640
|
window.insertSendingMessage = registeMethodOnWindow('insertSendingMessage');
|
|
636
641
|
window.deleteSendingMessage = registeMethodOnWindow('deleteSendingMessage');
|
|
637
642
|
window.getAllSendingMessages = registeMethodOnWindow('getAllSendingMessages');
|
|
643
|
+
// message pin
|
|
644
|
+
// @ts-ignore - window types extended in types/index.d.ts
|
|
645
|
+
window.insertMsgPin = registeMethodOnWindow('insertMsgPin');
|
|
646
|
+
// @ts-ignore
|
|
647
|
+
window.deleteMsgPin = registeMethodOnWindow('deleteMsgPin');
|
|
648
|
+
// @ts-ignore
|
|
649
|
+
window.findMsgPinByConversationIDAndSeq = registeMethodOnWindow('findMsgPinByConversationIDAndSeq');
|
|
650
|
+
// @ts-ignore
|
|
651
|
+
window.findMsgPinByConversationID = registeMethodOnWindow('findMsgPinByConversationID');
|
|
638
652
|
// conversation
|
|
639
653
|
window.getAllConversationListDB = registeMethodOnWindow('getAllConversationList');
|
|
640
654
|
window.getAllConversationListToSync = registeMethodOnWindow('getAllConversationListToSync');
|
|
641
655
|
window.getHiddenConversationList = registeMethodOnWindow('getHiddenConversationList');
|
|
642
656
|
window.getConversation = registeMethodOnWindow('getConversation');
|
|
657
|
+
window.getConversationByConversationIDLike = registeMethodOnWindow('getConversationByConversationIDLike');
|
|
643
658
|
window.getMultipleConversationDB = registeMethodOnWindow('getMultipleConversation');
|
|
644
659
|
window.updateColumnsConversation = registeMethodOnWindow('updateColumnsConversation');
|
|
645
660
|
window.updateConversation = registeMethodOnWindow('updateColumnsConversation', 'updateConversation');
|
|
@@ -674,6 +689,7 @@ function initDatabaseAPI(isLogStandardOutput = true) {
|
|
|
674
689
|
window.getLoginUser = registeMethodOnWindow('getLoginUser');
|
|
675
690
|
window.insertLoginUser = registeMethodOnWindow('insertLoginUser');
|
|
676
691
|
window.updateLoginUser = registeMethodOnWindow('updateLoginUser');
|
|
692
|
+
window.processUserCommandGetAll = registeMethodOnWindow('processUserCommandGetAll');
|
|
677
693
|
window.getStrangerInfo = registeMethodOnWindow('getStrangerInfo');
|
|
678
694
|
window.setStrangerInfo = registeMethodOnWindow('setStrangerInfo');
|
|
679
695
|
// app sdk versions
|
|
@@ -739,6 +755,7 @@ function initDatabaseAPI(isLogStandardOutput = true) {
|
|
|
739
755
|
// black
|
|
740
756
|
window.getBlackListDB = registeMethodOnWindow('getBlackList');
|
|
741
757
|
window.getBlackListUserID = registeMethodOnWindow('getBlackListUserID');
|
|
758
|
+
window.getBlackListByOtherDB = registeMethodOnWindow('getBlackListByOtherDB');
|
|
742
759
|
window.getBlackInfoByBlockUserID = registeMethodOnWindow('getBlackInfoByBlockUserID');
|
|
743
760
|
window.getBlackInfoList = registeMethodOnWindow('getBlackInfoList');
|
|
744
761
|
window.insertBlack = registeMethodOnWindow('insertBlack');
|
|
@@ -786,6 +803,7 @@ function initDatabaseAPI(isLogStandardOutput = true) {
|
|
|
786
803
|
window.insertGroupRequest = registeMethodOnWindow('insertGroupRequest');
|
|
787
804
|
window.deleteGroupRequest = registeMethodOnWindow('deleteGroupRequest');
|
|
788
805
|
window.updateGroupRequest = registeMethodOnWindow('updateGroupRequest');
|
|
806
|
+
window.updateGroupRequestGroupInfo = registeMethodOnWindow('updateGroupRequestGroupInfo');
|
|
789
807
|
window.getSendGroupApplication = registeMethodOnWindow('getSendGroupApplication');
|
|
790
808
|
window.insertAdminGroupRequest = registeMethodOnWindow('insertAdminGroupRequest');
|
|
791
809
|
window.deleteAdminGroupRequest = registeMethodOnWindow('deleteAdminGroupRequest');
|
|
@@ -1230,6 +1248,11 @@ class SDK extends Emitter {
|
|
|
1230
1248
|
isLogStandardOutput: (_a = params.isLogStandardOutput) !== null && _a !== void 0 ? _a : this.isLogStandardOutput,
|
|
1231
1249
|
logFilePath: './',
|
|
1232
1250
|
isExternalExtensions: params.isExternalExtensions || false,
|
|
1251
|
+
// SDK Monitoring
|
|
1252
|
+
enableListenerMonitoring: params.enableListenerMonitoring || false,
|
|
1253
|
+
pushgatewayURL: params.pushgatewayURL || '',
|
|
1254
|
+
metricsPushIntervalSec: params.metricsPushIntervalSec || 60,
|
|
1255
|
+
slowCallbackThresholdMs: params.slowCallbackThresholdMs || 1000,
|
|
1233
1256
|
};
|
|
1234
1257
|
this.tryParse = (_b = params.tryParse) !== null && _b !== void 0 ? _b : true;
|
|
1235
1258
|
const result = window.initSDK(operationID, JSON.stringify(config));
|
|
@@ -1334,7 +1357,7 @@ class SDK extends Emitter {
|
|
|
1334
1357
|
});
|
|
1335
1358
|
};
|
|
1336
1359
|
this.createQuoteMessage = (params, operationID = v4()) => {
|
|
1337
|
-
return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, params.message], data => {
|
|
1360
|
+
return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, JSON.stringify(params.message)], data => {
|
|
1338
1361
|
// compitable with old version sdk
|
|
1339
1362
|
return data[0];
|
|
1340
1363
|
});
|
|
@@ -1461,6 +1484,20 @@ class SDK extends Emitter {
|
|
|
1461
1484
|
this.getSelfUserInfo = (operationID = v4()) => {
|
|
1462
1485
|
return this._invoker('getSelfUserInfo', window.getSelfUserInfo, [operationID]);
|
|
1463
1486
|
};
|
|
1487
|
+
this.setMessagePin = (params, operationID = v4()) => {
|
|
1488
|
+
return this._invoker('setMessagePin', window.setMessagePin, [
|
|
1489
|
+
operationID,
|
|
1490
|
+
params.conversationID,
|
|
1491
|
+
params.seq,
|
|
1492
|
+
params.pinned,
|
|
1493
|
+
]);
|
|
1494
|
+
};
|
|
1495
|
+
this.getMessagePin = (params, operationID = v4()) => {
|
|
1496
|
+
return this._invoker('getMessagePin', window.getMessagePin, [
|
|
1497
|
+
operationID,
|
|
1498
|
+
params.conversationID,
|
|
1499
|
+
]);
|
|
1500
|
+
};
|
|
1464
1501
|
this.getUsersInfo = (data, operationID = v4()) => {
|
|
1465
1502
|
return this._invoker('getUsersInfo', window.getUsersInfo, [operationID, JSON.stringify(data)]);
|
|
1466
1503
|
};
|
|
@@ -2101,6 +2138,11 @@ class SDK extends Emitter {
|
|
|
2101
2138
|
}),
|
|
2102
2139
|
]);
|
|
2103
2140
|
};
|
|
2141
|
+
this.getMsgPinInfo = (operationID = v4()) => {
|
|
2142
|
+
return this._invoker('getMsgPinInfo', window.getMsgPinInfo, [
|
|
2143
|
+
operationID,
|
|
2144
|
+
]);
|
|
2145
|
+
};
|
|
2104
2146
|
this.fileMapSet = (uuid, file) => window.fileMapSet(uuid, file);
|
|
2105
2147
|
// Reset any previous state before initializing
|
|
2106
2148
|
reset();
|
package/lib/index.js
CHANGED
|
@@ -438,6 +438,10 @@ exports.CbEvents = void 0;
|
|
|
438
438
|
CbEvents["OnGroupMemberInfoChanged"] = "OnGroupMemberInfoChanged";
|
|
439
439
|
CbEvents["OnGroupApplicationAccepted"] = "OnGroupApplicationAccepted";
|
|
440
440
|
CbEvents["OnGroupApplicationRejected"] = "OnGroupApplicationRejected";
|
|
441
|
+
CbEvents["OnGroupRequestInfoChanged"] = "OnGroupRequestInfoChanged";
|
|
442
|
+
// message pin
|
|
443
|
+
CbEvents["OnMsgPinned"] = "OnMsgPinned";
|
|
444
|
+
CbEvents["OnMsgUnpinned"] = "OnMsgUnpinned";
|
|
441
445
|
CbEvents["UploadComplete"] = "UploadComplete";
|
|
442
446
|
CbEvents["OnRecvCustomBusinessMessage"] = "OnRecvCustomBusinessMessage";
|
|
443
447
|
CbEvents["OnUserStatusChanged"] = "OnUserStatusChanged";
|
|
@@ -611,6 +615,7 @@ function initDatabaseAPI(isLogStandardOutput = true) {
|
|
|
611
615
|
window.updateMsgSenderNickname = registeMethodOnWindow('updateMsgSenderNickname');
|
|
612
616
|
window.updateMsgSenderFaceURL = registeMethodOnWindow('updateMsgSenderFaceURL');
|
|
613
617
|
window.updateMsgSenderFaceURLAndSenderNickname = registeMethodOnWindow('updateMsgSenderFaceURLAndSenderNickname');
|
|
618
|
+
window.updateMsgSenderFaceBackgroundColor = registeMethodOnWindow('updateMsgSenderFaceBackgroundColor');
|
|
614
619
|
window.getMsgSeqByClientMsgID = registeMethodOnWindow('getMsgSeqByClientMsgID');
|
|
615
620
|
window.getMsgSeqListByGroupID = registeMethodOnWindow('getMsgSeqListByGroupID');
|
|
616
621
|
window.getMsgSeqListByPeerUserID = registeMethodOnWindow('getMsgSeqListByPeerUserID');
|
|
@@ -639,11 +644,21 @@ function initDatabaseAPI(isLogStandardOutput = true) {
|
|
|
639
644
|
window.insertSendingMessage = registeMethodOnWindow('insertSendingMessage');
|
|
640
645
|
window.deleteSendingMessage = registeMethodOnWindow('deleteSendingMessage');
|
|
641
646
|
window.getAllSendingMessages = registeMethodOnWindow('getAllSendingMessages');
|
|
647
|
+
// message pin
|
|
648
|
+
// @ts-ignore - window types extended in types/index.d.ts
|
|
649
|
+
window.insertMsgPin = registeMethodOnWindow('insertMsgPin');
|
|
650
|
+
// @ts-ignore
|
|
651
|
+
window.deleteMsgPin = registeMethodOnWindow('deleteMsgPin');
|
|
652
|
+
// @ts-ignore
|
|
653
|
+
window.findMsgPinByConversationIDAndSeq = registeMethodOnWindow('findMsgPinByConversationIDAndSeq');
|
|
654
|
+
// @ts-ignore
|
|
655
|
+
window.findMsgPinByConversationID = registeMethodOnWindow('findMsgPinByConversationID');
|
|
642
656
|
// conversation
|
|
643
657
|
window.getAllConversationListDB = registeMethodOnWindow('getAllConversationList');
|
|
644
658
|
window.getAllConversationListToSync = registeMethodOnWindow('getAllConversationListToSync');
|
|
645
659
|
window.getHiddenConversationList = registeMethodOnWindow('getHiddenConversationList');
|
|
646
660
|
window.getConversation = registeMethodOnWindow('getConversation');
|
|
661
|
+
window.getConversationByConversationIDLike = registeMethodOnWindow('getConversationByConversationIDLike');
|
|
647
662
|
window.getMultipleConversationDB = registeMethodOnWindow('getMultipleConversation');
|
|
648
663
|
window.updateColumnsConversation = registeMethodOnWindow('updateColumnsConversation');
|
|
649
664
|
window.updateConversation = registeMethodOnWindow('updateColumnsConversation', 'updateConversation');
|
|
@@ -678,6 +693,7 @@ function initDatabaseAPI(isLogStandardOutput = true) {
|
|
|
678
693
|
window.getLoginUser = registeMethodOnWindow('getLoginUser');
|
|
679
694
|
window.insertLoginUser = registeMethodOnWindow('insertLoginUser');
|
|
680
695
|
window.updateLoginUser = registeMethodOnWindow('updateLoginUser');
|
|
696
|
+
window.processUserCommandGetAll = registeMethodOnWindow('processUserCommandGetAll');
|
|
681
697
|
window.getStrangerInfo = registeMethodOnWindow('getStrangerInfo');
|
|
682
698
|
window.setStrangerInfo = registeMethodOnWindow('setStrangerInfo');
|
|
683
699
|
// app sdk versions
|
|
@@ -743,6 +759,7 @@ function initDatabaseAPI(isLogStandardOutput = true) {
|
|
|
743
759
|
// black
|
|
744
760
|
window.getBlackListDB = registeMethodOnWindow('getBlackList');
|
|
745
761
|
window.getBlackListUserID = registeMethodOnWindow('getBlackListUserID');
|
|
762
|
+
window.getBlackListByOtherDB = registeMethodOnWindow('getBlackListByOtherDB');
|
|
746
763
|
window.getBlackInfoByBlockUserID = registeMethodOnWindow('getBlackInfoByBlockUserID');
|
|
747
764
|
window.getBlackInfoList = registeMethodOnWindow('getBlackInfoList');
|
|
748
765
|
window.insertBlack = registeMethodOnWindow('insertBlack');
|
|
@@ -790,6 +807,7 @@ function initDatabaseAPI(isLogStandardOutput = true) {
|
|
|
790
807
|
window.insertGroupRequest = registeMethodOnWindow('insertGroupRequest');
|
|
791
808
|
window.deleteGroupRequest = registeMethodOnWindow('deleteGroupRequest');
|
|
792
809
|
window.updateGroupRequest = registeMethodOnWindow('updateGroupRequest');
|
|
810
|
+
window.updateGroupRequestGroupInfo = registeMethodOnWindow('updateGroupRequestGroupInfo');
|
|
793
811
|
window.getSendGroupApplication = registeMethodOnWindow('getSendGroupApplication');
|
|
794
812
|
window.insertAdminGroupRequest = registeMethodOnWindow('insertAdminGroupRequest');
|
|
795
813
|
window.deleteAdminGroupRequest = registeMethodOnWindow('deleteAdminGroupRequest');
|
|
@@ -1234,6 +1252,11 @@ class SDK extends Emitter {
|
|
|
1234
1252
|
isLogStandardOutput: (_a = params.isLogStandardOutput) !== null && _a !== void 0 ? _a : this.isLogStandardOutput,
|
|
1235
1253
|
logFilePath: './',
|
|
1236
1254
|
isExternalExtensions: params.isExternalExtensions || false,
|
|
1255
|
+
// SDK Monitoring
|
|
1256
|
+
enableListenerMonitoring: params.enableListenerMonitoring || false,
|
|
1257
|
+
pushgatewayURL: params.pushgatewayURL || '',
|
|
1258
|
+
metricsPushIntervalSec: params.metricsPushIntervalSec || 60,
|
|
1259
|
+
slowCallbackThresholdMs: params.slowCallbackThresholdMs || 1000,
|
|
1237
1260
|
};
|
|
1238
1261
|
this.tryParse = (_b = params.tryParse) !== null && _b !== void 0 ? _b : true;
|
|
1239
1262
|
const result = window.initSDK(operationID, JSON.stringify(config));
|
|
@@ -1338,7 +1361,7 @@ class SDK extends Emitter {
|
|
|
1338
1361
|
});
|
|
1339
1362
|
};
|
|
1340
1363
|
this.createQuoteMessage = (params, operationID = v4()) => {
|
|
1341
|
-
return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, params.message], data => {
|
|
1364
|
+
return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, JSON.stringify(params.message)], data => {
|
|
1342
1365
|
// compitable with old version sdk
|
|
1343
1366
|
return data[0];
|
|
1344
1367
|
});
|
|
@@ -1465,6 +1488,20 @@ class SDK extends Emitter {
|
|
|
1465
1488
|
this.getSelfUserInfo = (operationID = v4()) => {
|
|
1466
1489
|
return this._invoker('getSelfUserInfo', window.getSelfUserInfo, [operationID]);
|
|
1467
1490
|
};
|
|
1491
|
+
this.setMessagePin = (params, operationID = v4()) => {
|
|
1492
|
+
return this._invoker('setMessagePin', window.setMessagePin, [
|
|
1493
|
+
operationID,
|
|
1494
|
+
params.conversationID,
|
|
1495
|
+
params.seq,
|
|
1496
|
+
params.pinned,
|
|
1497
|
+
]);
|
|
1498
|
+
};
|
|
1499
|
+
this.getMessagePin = (params, operationID = v4()) => {
|
|
1500
|
+
return this._invoker('getMessagePin', window.getMessagePin, [
|
|
1501
|
+
operationID,
|
|
1502
|
+
params.conversationID,
|
|
1503
|
+
]);
|
|
1504
|
+
};
|
|
1468
1505
|
this.getUsersInfo = (data, operationID = v4()) => {
|
|
1469
1506
|
return this._invoker('getUsersInfo', window.getUsersInfo, [operationID, JSON.stringify(data)]);
|
|
1470
1507
|
};
|
|
@@ -2105,6 +2142,11 @@ class SDK extends Emitter {
|
|
|
2105
2142
|
}),
|
|
2106
2143
|
]);
|
|
2107
2144
|
};
|
|
2145
|
+
this.getMsgPinInfo = (operationID = v4()) => {
|
|
2146
|
+
return this._invoker('getMsgPinInfo', window.getMsgPinInfo, [
|
|
2147
|
+
operationID,
|
|
2148
|
+
]);
|
|
2149
|
+
};
|
|
2108
2150
|
this.fileMapSet = (uuid, file) => window.fileMapSet(uuid, file);
|
|
2109
2151
|
// Reset any previous state before initializing
|
|
2110
2152
|
reset();
|
package/lib/index.umd.js
CHANGED
|
@@ -440,6 +440,10 @@
|
|
|
440
440
|
CbEvents["OnGroupMemberInfoChanged"] = "OnGroupMemberInfoChanged";
|
|
441
441
|
CbEvents["OnGroupApplicationAccepted"] = "OnGroupApplicationAccepted";
|
|
442
442
|
CbEvents["OnGroupApplicationRejected"] = "OnGroupApplicationRejected";
|
|
443
|
+
CbEvents["OnGroupRequestInfoChanged"] = "OnGroupRequestInfoChanged";
|
|
444
|
+
// message pin
|
|
445
|
+
CbEvents["OnMsgPinned"] = "OnMsgPinned";
|
|
446
|
+
CbEvents["OnMsgUnpinned"] = "OnMsgUnpinned";
|
|
443
447
|
CbEvents["UploadComplete"] = "UploadComplete";
|
|
444
448
|
CbEvents["OnRecvCustomBusinessMessage"] = "OnRecvCustomBusinessMessage";
|
|
445
449
|
CbEvents["OnUserStatusChanged"] = "OnUserStatusChanged";
|
|
@@ -613,6 +617,7 @@
|
|
|
613
617
|
window.updateMsgSenderNickname = registeMethodOnWindow('updateMsgSenderNickname');
|
|
614
618
|
window.updateMsgSenderFaceURL = registeMethodOnWindow('updateMsgSenderFaceURL');
|
|
615
619
|
window.updateMsgSenderFaceURLAndSenderNickname = registeMethodOnWindow('updateMsgSenderFaceURLAndSenderNickname');
|
|
620
|
+
window.updateMsgSenderFaceBackgroundColor = registeMethodOnWindow('updateMsgSenderFaceBackgroundColor');
|
|
616
621
|
window.getMsgSeqByClientMsgID = registeMethodOnWindow('getMsgSeqByClientMsgID');
|
|
617
622
|
window.getMsgSeqListByGroupID = registeMethodOnWindow('getMsgSeqListByGroupID');
|
|
618
623
|
window.getMsgSeqListByPeerUserID = registeMethodOnWindow('getMsgSeqListByPeerUserID');
|
|
@@ -641,11 +646,21 @@
|
|
|
641
646
|
window.insertSendingMessage = registeMethodOnWindow('insertSendingMessage');
|
|
642
647
|
window.deleteSendingMessage = registeMethodOnWindow('deleteSendingMessage');
|
|
643
648
|
window.getAllSendingMessages = registeMethodOnWindow('getAllSendingMessages');
|
|
649
|
+
// message pin
|
|
650
|
+
// @ts-ignore - window types extended in types/index.d.ts
|
|
651
|
+
window.insertMsgPin = registeMethodOnWindow('insertMsgPin');
|
|
652
|
+
// @ts-ignore
|
|
653
|
+
window.deleteMsgPin = registeMethodOnWindow('deleteMsgPin');
|
|
654
|
+
// @ts-ignore
|
|
655
|
+
window.findMsgPinByConversationIDAndSeq = registeMethodOnWindow('findMsgPinByConversationIDAndSeq');
|
|
656
|
+
// @ts-ignore
|
|
657
|
+
window.findMsgPinByConversationID = registeMethodOnWindow('findMsgPinByConversationID');
|
|
644
658
|
// conversation
|
|
645
659
|
window.getAllConversationListDB = registeMethodOnWindow('getAllConversationList');
|
|
646
660
|
window.getAllConversationListToSync = registeMethodOnWindow('getAllConversationListToSync');
|
|
647
661
|
window.getHiddenConversationList = registeMethodOnWindow('getHiddenConversationList');
|
|
648
662
|
window.getConversation = registeMethodOnWindow('getConversation');
|
|
663
|
+
window.getConversationByConversationIDLike = registeMethodOnWindow('getConversationByConversationIDLike');
|
|
649
664
|
window.getMultipleConversationDB = registeMethodOnWindow('getMultipleConversation');
|
|
650
665
|
window.updateColumnsConversation = registeMethodOnWindow('updateColumnsConversation');
|
|
651
666
|
window.updateConversation = registeMethodOnWindow('updateColumnsConversation', 'updateConversation');
|
|
@@ -680,6 +695,7 @@
|
|
|
680
695
|
window.getLoginUser = registeMethodOnWindow('getLoginUser');
|
|
681
696
|
window.insertLoginUser = registeMethodOnWindow('insertLoginUser');
|
|
682
697
|
window.updateLoginUser = registeMethodOnWindow('updateLoginUser');
|
|
698
|
+
window.processUserCommandGetAll = registeMethodOnWindow('processUserCommandGetAll');
|
|
683
699
|
window.getStrangerInfo = registeMethodOnWindow('getStrangerInfo');
|
|
684
700
|
window.setStrangerInfo = registeMethodOnWindow('setStrangerInfo');
|
|
685
701
|
// app sdk versions
|
|
@@ -745,6 +761,7 @@
|
|
|
745
761
|
// black
|
|
746
762
|
window.getBlackListDB = registeMethodOnWindow('getBlackList');
|
|
747
763
|
window.getBlackListUserID = registeMethodOnWindow('getBlackListUserID');
|
|
764
|
+
window.getBlackListByOtherDB = registeMethodOnWindow('getBlackListByOtherDB');
|
|
748
765
|
window.getBlackInfoByBlockUserID = registeMethodOnWindow('getBlackInfoByBlockUserID');
|
|
749
766
|
window.getBlackInfoList = registeMethodOnWindow('getBlackInfoList');
|
|
750
767
|
window.insertBlack = registeMethodOnWindow('insertBlack');
|
|
@@ -792,6 +809,7 @@
|
|
|
792
809
|
window.insertGroupRequest = registeMethodOnWindow('insertGroupRequest');
|
|
793
810
|
window.deleteGroupRequest = registeMethodOnWindow('deleteGroupRequest');
|
|
794
811
|
window.updateGroupRequest = registeMethodOnWindow('updateGroupRequest');
|
|
812
|
+
window.updateGroupRequestGroupInfo = registeMethodOnWindow('updateGroupRequestGroupInfo');
|
|
795
813
|
window.getSendGroupApplication = registeMethodOnWindow('getSendGroupApplication');
|
|
796
814
|
window.insertAdminGroupRequest = registeMethodOnWindow('insertAdminGroupRequest');
|
|
797
815
|
window.deleteAdminGroupRequest = registeMethodOnWindow('deleteAdminGroupRequest');
|
|
@@ -1236,6 +1254,11 @@
|
|
|
1236
1254
|
isLogStandardOutput: (_a = params.isLogStandardOutput) !== null && _a !== void 0 ? _a : this.isLogStandardOutput,
|
|
1237
1255
|
logFilePath: './',
|
|
1238
1256
|
isExternalExtensions: params.isExternalExtensions || false,
|
|
1257
|
+
// SDK Monitoring
|
|
1258
|
+
enableListenerMonitoring: params.enableListenerMonitoring || false,
|
|
1259
|
+
pushgatewayURL: params.pushgatewayURL || '',
|
|
1260
|
+
metricsPushIntervalSec: params.metricsPushIntervalSec || 60,
|
|
1261
|
+
slowCallbackThresholdMs: params.slowCallbackThresholdMs || 1000,
|
|
1239
1262
|
};
|
|
1240
1263
|
this.tryParse = (_b = params.tryParse) !== null && _b !== void 0 ? _b : true;
|
|
1241
1264
|
const result = window.initSDK(operationID, JSON.stringify(config));
|
|
@@ -1340,7 +1363,7 @@
|
|
|
1340
1363
|
});
|
|
1341
1364
|
};
|
|
1342
1365
|
this.createQuoteMessage = (params, operationID = v4()) => {
|
|
1343
|
-
return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, params.message], data => {
|
|
1366
|
+
return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, JSON.stringify(params.message)], data => {
|
|
1344
1367
|
// compitable with old version sdk
|
|
1345
1368
|
return data[0];
|
|
1346
1369
|
});
|
|
@@ -1467,6 +1490,20 @@
|
|
|
1467
1490
|
this.getSelfUserInfo = (operationID = v4()) => {
|
|
1468
1491
|
return this._invoker('getSelfUserInfo', window.getSelfUserInfo, [operationID]);
|
|
1469
1492
|
};
|
|
1493
|
+
this.setMessagePin = (params, operationID = v4()) => {
|
|
1494
|
+
return this._invoker('setMessagePin', window.setMessagePin, [
|
|
1495
|
+
operationID,
|
|
1496
|
+
params.conversationID,
|
|
1497
|
+
params.seq,
|
|
1498
|
+
params.pinned,
|
|
1499
|
+
]);
|
|
1500
|
+
};
|
|
1501
|
+
this.getMessagePin = (params, operationID = v4()) => {
|
|
1502
|
+
return this._invoker('getMessagePin', window.getMessagePin, [
|
|
1503
|
+
operationID,
|
|
1504
|
+
params.conversationID,
|
|
1505
|
+
]);
|
|
1506
|
+
};
|
|
1470
1507
|
this.getUsersInfo = (data, operationID = v4()) => {
|
|
1471
1508
|
return this._invoker('getUsersInfo', window.getUsersInfo, [operationID, JSON.stringify(data)]);
|
|
1472
1509
|
};
|
|
@@ -2107,6 +2144,11 @@
|
|
|
2107
2144
|
}),
|
|
2108
2145
|
]);
|
|
2109
2146
|
};
|
|
2147
|
+
this.getMsgPinInfo = (operationID = v4()) => {
|
|
2148
|
+
return this._invoker('getMsgPinInfo', window.getMsgPinInfo, [
|
|
2149
|
+
operationID,
|
|
2150
|
+
]);
|
|
2151
|
+
};
|
|
2110
2152
|
this.fileMapSet = (uuid, file) => window.fileMapSet(uuid, file);
|
|
2111
2153
|
// Reset any previous state before initializing
|
|
2112
2154
|
reset();
|
package/lib/sdk/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Emitter from '../utils/emitter';
|
|
2
2
|
import { AccessFriendApplicationParams, AccessGroupApplicationParams, AccessMessageParams, AddFriendParams, AdvancedMsgParams, AdvancedQuoteMsgParams, AtMsgParams, ChangeGroupMemberMuteParams, ChangeGroupMuteParams, CreateGroupParams, CustomMsgParams, CustomSignalParams, FaceMessageParams, FileMsgParamsByURL, FindMessageParams, GetAdvancedHistoryMsgParams, GetGroupMemberByTimeParams, GetGroupMemberParams, GetGroupMessageReaderParams, GetHistoryMsgParams, GetOneConversationParams, ImageMsgParamsByURL, InitConfig, LoginConfig, InitAndLoginConfig, InsertGroupMsgParams, InsertSingleMsgParams, AccessToGroupParams, SetConversationRecvOptParams, JoinGroupParams, LocationMsgParams, UpdateMemberInfoParams, MergerMsgParams, PartialUserItem, SetConversationPinParams, QuoteMsgParams, RemarkFriendParams, RtcActionParams, SearchFriendParams, SearchGroupMemberParams, SearchGroupParams, SearchLocalParams, SendGroupReadReceiptParams, SendMsgParams, SetBurnDurationParams, SetConversationMsgDestructParams, SetConversationMsgDestructTimeParams, SetConversationDraftParams, SetGroupRoleParams, SetGroupVerificationParams, SetMemberPermissionParams, SetMessageLocalExParams, SetConversationPrivateStateParams, SignalingInviteParams, SoundMsgParamsByURL, SplitConversationParams, TransferGroupParams, TypingUpdateParams, UploadFileParams, VideoMsgParamsByURL, SetGroupMemberNickParams, WasmPathConfig, PinFriendParams, SetFriendExParams, SetConversationExParams, AddBlackParams, OffsetParams, UpdateFriendsParams, SetConversationParams, GetSpecifiedFriendsParams, ChangeInputStatesParams, GetInputstatesParams, FetchSurroundingParams } from '../types/params';
|
|
3
|
-
import { AdvancedGetMessageResult, BlackUserItem, CallingRoomData, CardElem, ConversationItem, FriendApplicationItem, FriendshipInfo, FriendUserItem, GroupApplicationItem, GroupItem, GroupMemberItem, MessageItem, OfflinePush, PublicUserItem, RtcInvite, RtcInviteResults, SearchedFriendsInfo, SearchMessageResult, SelfUserInfo, UserOnlineState, WsResponse } from '../types/entity';
|
|
3
|
+
import { AdvancedGetMessageResult, BlackUserItem, CallingRoomData, CardElem, ConversationItem, FriendApplicationItem, FriendshipInfo, FriendUserItem, GroupApplicationItem, GroupItem, GroupMemberItem, MessageItem, OfflinePush, PublicUserItem, RtcInvite, RtcInviteResults, SearchedFriendsInfo, SearchMessageResult, SelfUserInfo, UserOnlineState, WsResponse, type MsgPinInfo, SetMsgPinInfo, GetMsgPinInfo } from '../types/entity';
|
|
4
4
|
import { LoginStatus, MessageReceiveOptType, Platform } from '../types/enum';
|
|
5
5
|
declare class SDK extends Emitter {
|
|
6
6
|
private wasmInitializedPromise;
|
|
@@ -57,6 +57,8 @@ declare class SDK extends Emitter {
|
|
|
57
57
|
networkStatusChanged: <T>(operationID?: string) => Promise<WsResponse<T>>;
|
|
58
58
|
getLoginUserID: (operationID?: string) => Promise<WsResponse<string>>;
|
|
59
59
|
getSelfUserInfo: (operationID?: string) => Promise<WsResponse<SelfUserInfo>>;
|
|
60
|
+
setMessagePin: <T>(params: SetMsgPinInfo, operationID?: string) => Promise<WsResponse<T>>;
|
|
61
|
+
getMessagePin: (params: GetMsgPinInfo, operationID?: string) => Promise<WsResponse<MsgPinInfo[]>>;
|
|
60
62
|
getUsersInfo: (data: string[], operationID?: string) => Promise<WsResponse<PublicUserItem[]>>;
|
|
61
63
|
/**
|
|
62
64
|
* @deprecated Use setSelfInfo instead.
|
|
@@ -226,6 +228,7 @@ declare class SDK extends Emitter {
|
|
|
226
228
|
signalingSendCustomSignal: <T>(data: CustomSignalParams, operationID?: string) => Promise<WsResponse<T>>;
|
|
227
229
|
setConversationIsMsgDestruct: <T>(data: SetConversationMsgDestructParams, operationID?: string) => Promise<WsResponse<T>>;
|
|
228
230
|
setConversationMsgDestructTime: <T>(data: SetConversationMsgDestructTimeParams, operationID?: string) => Promise<WsResponse<T>>;
|
|
231
|
+
getMsgPinInfo: (operationID?: string) => Promise<WsResponse<MsgPinInfo>>;
|
|
229
232
|
fileMapSet: (uuid: string, file: File) => Promise<any>;
|
|
230
233
|
}
|
|
231
234
|
export declare function getSDK(config?: WasmPathConfig): SDK;
|
package/lib/sqls/index.d.ts
CHANGED
package/lib/sqls/localBlack.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare type LocalBlack = {
|
|
|
5
5
|
export declare function locaBlacks(db: Database): QueryExecResult[];
|
|
6
6
|
export declare function getBlackList(db: Database): QueryExecResult[];
|
|
7
7
|
export declare function getBlackListUserID(db: Database): QueryExecResult[];
|
|
8
|
+
export declare function getBlackListByOther(db: Database, loginUserID: string): QueryExecResult[];
|
|
8
9
|
export declare function getBlackInfoByBlockUserID(db: Database, blockUserID: string, loginUserID: string): QueryExecResult[];
|
|
9
10
|
export declare function getBlackInfoList(db: Database, blockUserIDList: string[]): QueryExecResult[];
|
|
10
11
|
export declare function insertBlack(db: Database, localBlack: LocalBlack): QueryExecResult[];
|
|
@@ -24,6 +24,7 @@ export declare function searchMessageByContentType(db: Database, conversationID:
|
|
|
24
24
|
export declare function searchMessageByContentTypeAndKeyword(db: Database, conversationID: string, contentType: number[], keywordList: string[], keywordListMatchType: number, startTime: number, endTime: number): QueryExecResult[];
|
|
25
25
|
export declare function messageIfExists(db: Database, conversationID: string, clientMsgID: string): QueryExecResult[];
|
|
26
26
|
export declare function updateMsgSenderFaceURLAndSenderNickname(db: Database, conversationID: string, sendID: string, faceURL: string, nickname: string, faceBackgroundColor?: string): QueryExecResult[];
|
|
27
|
+
export declare function updateMsgSenderFaceBackgroundColor(db: Database, conversationID: string, sendID: string, faceBackgroundColor: string): QueryExecResult[];
|
|
27
28
|
export declare function deleteConversationAllMessages(db: Database, conversationID: string): QueryExecResult[];
|
|
28
29
|
export declare function markDeleteConversationAllMessages(db: Database, conversationID: string): QueryExecResult[];
|
|
29
30
|
export declare function getUnreadMessage(db: Database, conversationID: string, loginUserID: string): QueryExecResult[];
|
|
@@ -12,6 +12,7 @@ export declare function getAllConversationIDList(db: Database): QueryExecResult[
|
|
|
12
12
|
export declare function getHiddenConversationList(db: Database): QueryExecResult[];
|
|
13
13
|
export declare function getConversationListSplit(db: Database, offset: number, count: number): QueryExecResult[];
|
|
14
14
|
export declare function getConversation(db: Database, conversationID: string): QueryExecResult[];
|
|
15
|
+
export declare function getConversationByConversationIDLike(db: Database, conversationID: string): QueryExecResult[];
|
|
15
16
|
export declare function getMultipleConversation(db: Database, conversationIDList: string[]): QueryExecResult[];
|
|
16
17
|
export declare function updateColumnsConversation(db: Database, conversationID: string, conversation: ClientConversation): QueryExecResult[];
|
|
17
18
|
export declare function incrConversationUnreadCount(db: Database, conversationID: string): QueryExecResult[];
|
|
@@ -6,4 +6,7 @@ export declare function localGroupRequests(db: Database): QueryExecResult[];
|
|
|
6
6
|
export declare function insertGroupRequest(db: Database, localGroupRequest: LocalGroupRequest): QueryExecResult[];
|
|
7
7
|
export declare function deleteGroupRequest(db: Database, groupID: string, userID: string): QueryExecResult[];
|
|
8
8
|
export declare function updateGroupRequest(db: Database, localGroupRequest: LocalGroupRequest): QueryExecResult[];
|
|
9
|
+
export declare function updateGroupRequestGroupInfo(db: Database, groupID: string, updates: {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}): QueryExecResult[];
|
|
9
12
|
export declare function getSendGroupApplication(db: Database): QueryExecResult[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Database, QueryExecResult } from '@jlongster/sql.js';
|
|
2
|
+
export declare type LocalMsgPin = {
|
|
3
|
+
conversation_id: string;
|
|
4
|
+
seq: number;
|
|
5
|
+
created_by?: string;
|
|
6
|
+
created_at?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function localMsgPins(db: Database): QueryExecResult[];
|
|
9
|
+
export declare function insertMsgPin(db: Database, msgPin: LocalMsgPin): QueryExecResult[];
|
|
10
|
+
export declare function findMsgPinByConversationIDAndSeq(db: Database, conversationID: string, seq: number): QueryExecResult[];
|
|
11
|
+
export declare function findMsgPinByConversationID(db: Database, conversationID: string): QueryExecResult[];
|
|
12
|
+
export declare function deleteMsgPin(db: Database, conversationID: string, seq: number): QueryExecResult[];
|
package/lib/types/entity.d.ts
CHANGED
|
@@ -23,6 +23,10 @@ export declare type IMConfig = {
|
|
|
23
23
|
isLogStandardOutput: boolean;
|
|
24
24
|
logFilePath: string;
|
|
25
25
|
isExternalExtensions: boolean;
|
|
26
|
+
enableListenerMonitoring: boolean;
|
|
27
|
+
pushgatewayURL: string;
|
|
28
|
+
metricsPushIntervalSec: number;
|
|
29
|
+
slowCallbackThresholdMs: number;
|
|
26
30
|
};
|
|
27
31
|
export declare type MessageEntity = {
|
|
28
32
|
type: string;
|
|
@@ -66,6 +70,7 @@ export declare type GroupApplicationItem = {
|
|
|
66
70
|
joinSource: GroupJoinSource;
|
|
67
71
|
status: GroupStatus;
|
|
68
72
|
userFaceURL: string;
|
|
73
|
+
userFaceBackgroundColor: string;
|
|
69
74
|
faceBackgroundColor: string;
|
|
70
75
|
userID: string;
|
|
71
76
|
};
|
|
@@ -232,6 +237,17 @@ export declare type MessageItem = {
|
|
|
232
237
|
typingElem?: TypingElem;
|
|
233
238
|
attachedInfoElem: AttachedInfoElem;
|
|
234
239
|
};
|
|
240
|
+
export declare type MsgPinInfo = {
|
|
241
|
+
conversationID: string;
|
|
242
|
+
seq: number;
|
|
243
|
+
createdBy: string;
|
|
244
|
+
createdAt: number;
|
|
245
|
+
msg: MessageItem;
|
|
246
|
+
};
|
|
247
|
+
export declare type MsgUnpinInfo = {
|
|
248
|
+
conversationID: string;
|
|
249
|
+
seq: number;
|
|
250
|
+
};
|
|
235
251
|
export declare type TextElem = {
|
|
236
252
|
content: string;
|
|
237
253
|
};
|
|
@@ -454,3 +470,11 @@ export declare type CallingRoomData = {
|
|
|
454
470
|
invitation?: RtcInvite;
|
|
455
471
|
roomID: string;
|
|
456
472
|
};
|
|
473
|
+
export declare type SetMsgPinInfo = {
|
|
474
|
+
conversationID: string;
|
|
475
|
+
seq: number;
|
|
476
|
+
pinned: boolean;
|
|
477
|
+
};
|
|
478
|
+
export declare type GetMsgPinInfo = {
|
|
479
|
+
conversationID: string;
|
|
480
|
+
};
|
package/lib/types/eventData.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CbEvents } from '../constant';
|
|
2
|
-
import { BlackUserItem, ConversationInputStatus, ConversationItem, FriendApplicationItem, FriendUserItem, GroupApplicationItem, GroupItem, GroupMemberItem, GroupMessageReceiptInfo, MessageItem, ReceiptInfo, RevokedInfo, SelfUserInfo, UserOnlineState } from './entity';
|
|
2
|
+
import { BlackUserItem, ConversationInputStatus, ConversationItem, FriendApplicationItem, FriendUserItem, GroupApplicationItem, GroupItem, GroupMemberItem, GroupMessageReceiptInfo, MessageItem, MsgPinInfo, MsgUnpinInfo, ReceiptInfo, RevokedInfo, SelfUserInfo, UserOnlineState } from './entity';
|
|
3
3
|
export declare type EventDataMap = {
|
|
4
4
|
[CbEvents.OnProgress]: {
|
|
5
5
|
progress: number;
|
|
@@ -47,5 +47,7 @@ export declare type EventDataMap = {
|
|
|
47
47
|
[CbEvents.OnKickedOffline]: void;
|
|
48
48
|
[CbEvents.OnUserTokenExpired]: void;
|
|
49
49
|
[CbEvents.OnUserTokenInvalid]: void;
|
|
50
|
+
[CbEvents.OnMsgPinned]: MsgPinInfo;
|
|
51
|
+
[CbEvents.OnMsgUnpinned]: MsgUnpinInfo;
|
|
50
52
|
};
|
|
51
53
|
export declare type DataOfEvent<E extends CbEvents> = E extends keyof EventDataMap ? EventDataMap[E] : never;
|
package/lib/types/params.d.ts
CHANGED
|
@@ -13,6 +13,10 @@ export declare type InitConfig = {
|
|
|
13
13
|
isLogStandardOutput?: boolean;
|
|
14
14
|
isExternalExtensions?: boolean;
|
|
15
15
|
tryParse?: boolean;
|
|
16
|
+
enableListenerMonitoring?: boolean;
|
|
17
|
+
pushgatewayURL?: string;
|
|
18
|
+
metricsPushIntervalSec?: number;
|
|
19
|
+
slowCallbackThresholdMs?: number;
|
|
16
20
|
};
|
|
17
21
|
export declare type LoginConfig = {
|
|
18
22
|
userID: string;
|
|
@@ -28,6 +32,10 @@ export declare type InitAndLoginConfig = {
|
|
|
28
32
|
isLogStandardOutput?: boolean;
|
|
29
33
|
isExternalExtensions?: boolean;
|
|
30
34
|
tryParse?: boolean;
|
|
35
|
+
enableListenerMonitoring?: boolean;
|
|
36
|
+
pushgatewayURL?: string;
|
|
37
|
+
metricsPushIntervalSec?: number;
|
|
38
|
+
slowCallbackThresholdMs?: number;
|
|
31
39
|
};
|
|
32
40
|
export declare type GetOneConversationParams = {
|
|
33
41
|
sourceID: string;
|