@inter-digital/wasm-client-sdk 3.8.4-patch.20 → 3.8.4-patch.22
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/lib/api/database/groupRequest.d.ts +1 -0
- package/lib/api/database/index.d.ts +1 -0
- package/lib/api/database/msgPin.d.ts +4 -0
- package/lib/constant/index.d.ts +2 -0
- package/lib/index.es.js +32 -0
- package/lib/index.js +32 -0
- package/lib/index.umd.js +32 -0
- package/lib/sdk/index.d.ts +4 -1
- package/lib/sqls/index.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 +19 -0
- package/lib/types/eventData.d.ts +3 -1
- package/lib/worker-legacy.js +1 -1
- package/lib/worker.js +1 -1
- package/package.json +1 -1
|
@@ -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>;
|
|
@@ -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>;
|
package/lib/constant/index.d.ts
CHANGED
|
@@ -52,6 +52,8 @@ export declare enum CbEvents {
|
|
|
52
52
|
OnGroupApplicationAccepted = "OnGroupApplicationAccepted",
|
|
53
53
|
OnGroupApplicationRejected = "OnGroupApplicationRejected",
|
|
54
54
|
OnGroupRequestInfoChanged = "OnGroupRequestInfoChanged",
|
|
55
|
+
OnMsgPinned = "OnMsgPinned",
|
|
56
|
+
OnMsgUnpinned = "OnMsgUnpinned",
|
|
55
57
|
UploadComplete = "UploadComplete",
|
|
56
58
|
OnRecvCustomBusinessMessage = "OnRecvCustomBusinessMessage",
|
|
57
59
|
OnUserStatusChanged = "OnUserStatusChanged",
|
package/lib/index.es.js
CHANGED
|
@@ -435,6 +435,9 @@ var CbEvents;
|
|
|
435
435
|
CbEvents["OnGroupApplicationAccepted"] = "OnGroupApplicationAccepted";
|
|
436
436
|
CbEvents["OnGroupApplicationRejected"] = "OnGroupApplicationRejected";
|
|
437
437
|
CbEvents["OnGroupRequestInfoChanged"] = "OnGroupRequestInfoChanged";
|
|
438
|
+
// message pin
|
|
439
|
+
CbEvents["OnMsgPinned"] = "OnMsgPinned";
|
|
440
|
+
CbEvents["OnMsgUnpinned"] = "OnMsgUnpinned";
|
|
438
441
|
CbEvents["UploadComplete"] = "UploadComplete";
|
|
439
442
|
CbEvents["OnRecvCustomBusinessMessage"] = "OnRecvCustomBusinessMessage";
|
|
440
443
|
CbEvents["OnUserStatusChanged"] = "OnUserStatusChanged";
|
|
@@ -637,6 +640,15 @@ function initDatabaseAPI(isLogStandardOutput = true) {
|
|
|
637
640
|
window.insertSendingMessage = registeMethodOnWindow('insertSendingMessage');
|
|
638
641
|
window.deleteSendingMessage = registeMethodOnWindow('deleteSendingMessage');
|
|
639
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');
|
|
640
652
|
// conversation
|
|
641
653
|
window.getAllConversationListDB = registeMethodOnWindow('getAllConversationList');
|
|
642
654
|
window.getAllConversationListToSync = registeMethodOnWindow('getAllConversationListToSync');
|
|
@@ -791,6 +803,7 @@ function initDatabaseAPI(isLogStandardOutput = true) {
|
|
|
791
803
|
window.insertGroupRequest = registeMethodOnWindow('insertGroupRequest');
|
|
792
804
|
window.deleteGroupRequest = registeMethodOnWindow('deleteGroupRequest');
|
|
793
805
|
window.updateGroupRequest = registeMethodOnWindow('updateGroupRequest');
|
|
806
|
+
window.updateGroupRequestGroupInfo = registeMethodOnWindow('updateGroupRequestGroupInfo');
|
|
794
807
|
window.getSendGroupApplication = registeMethodOnWindow('getSendGroupApplication');
|
|
795
808
|
window.insertAdminGroupRequest = registeMethodOnWindow('insertAdminGroupRequest');
|
|
796
809
|
window.deleteAdminGroupRequest = registeMethodOnWindow('deleteAdminGroupRequest');
|
|
@@ -1471,6 +1484,20 @@ class SDK extends Emitter {
|
|
|
1471
1484
|
this.getSelfUserInfo = (operationID = v4()) => {
|
|
1472
1485
|
return this._invoker('getSelfUserInfo', window.getSelfUserInfo, [operationID]);
|
|
1473
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
|
+
};
|
|
1474
1501
|
this.getUsersInfo = (data, operationID = v4()) => {
|
|
1475
1502
|
return this._invoker('getUsersInfo', window.getUsersInfo, [operationID, JSON.stringify(data)]);
|
|
1476
1503
|
};
|
|
@@ -2111,6 +2138,11 @@ class SDK extends Emitter {
|
|
|
2111
2138
|
}),
|
|
2112
2139
|
]);
|
|
2113
2140
|
};
|
|
2141
|
+
this.getMsgPinInfo = (operationID = v4()) => {
|
|
2142
|
+
return this._invoker('getMsgPinInfo', window.getMsgPinInfo, [
|
|
2143
|
+
operationID,
|
|
2144
|
+
]);
|
|
2145
|
+
};
|
|
2114
2146
|
this.fileMapSet = (uuid, file) => window.fileMapSet(uuid, file);
|
|
2115
2147
|
// Reset any previous state before initializing
|
|
2116
2148
|
reset();
|
package/lib/index.js
CHANGED
|
@@ -439,6 +439,9 @@ exports.CbEvents = void 0;
|
|
|
439
439
|
CbEvents["OnGroupApplicationAccepted"] = "OnGroupApplicationAccepted";
|
|
440
440
|
CbEvents["OnGroupApplicationRejected"] = "OnGroupApplicationRejected";
|
|
441
441
|
CbEvents["OnGroupRequestInfoChanged"] = "OnGroupRequestInfoChanged";
|
|
442
|
+
// message pin
|
|
443
|
+
CbEvents["OnMsgPinned"] = "OnMsgPinned";
|
|
444
|
+
CbEvents["OnMsgUnpinned"] = "OnMsgUnpinned";
|
|
442
445
|
CbEvents["UploadComplete"] = "UploadComplete";
|
|
443
446
|
CbEvents["OnRecvCustomBusinessMessage"] = "OnRecvCustomBusinessMessage";
|
|
444
447
|
CbEvents["OnUserStatusChanged"] = "OnUserStatusChanged";
|
|
@@ -641,6 +644,15 @@ function initDatabaseAPI(isLogStandardOutput = true) {
|
|
|
641
644
|
window.insertSendingMessage = registeMethodOnWindow('insertSendingMessage');
|
|
642
645
|
window.deleteSendingMessage = registeMethodOnWindow('deleteSendingMessage');
|
|
643
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');
|
|
644
656
|
// conversation
|
|
645
657
|
window.getAllConversationListDB = registeMethodOnWindow('getAllConversationList');
|
|
646
658
|
window.getAllConversationListToSync = registeMethodOnWindow('getAllConversationListToSync');
|
|
@@ -795,6 +807,7 @@ function initDatabaseAPI(isLogStandardOutput = true) {
|
|
|
795
807
|
window.insertGroupRequest = registeMethodOnWindow('insertGroupRequest');
|
|
796
808
|
window.deleteGroupRequest = registeMethodOnWindow('deleteGroupRequest');
|
|
797
809
|
window.updateGroupRequest = registeMethodOnWindow('updateGroupRequest');
|
|
810
|
+
window.updateGroupRequestGroupInfo = registeMethodOnWindow('updateGroupRequestGroupInfo');
|
|
798
811
|
window.getSendGroupApplication = registeMethodOnWindow('getSendGroupApplication');
|
|
799
812
|
window.insertAdminGroupRequest = registeMethodOnWindow('insertAdminGroupRequest');
|
|
800
813
|
window.deleteAdminGroupRequest = registeMethodOnWindow('deleteAdminGroupRequest');
|
|
@@ -1475,6 +1488,20 @@ class SDK extends Emitter {
|
|
|
1475
1488
|
this.getSelfUserInfo = (operationID = v4()) => {
|
|
1476
1489
|
return this._invoker('getSelfUserInfo', window.getSelfUserInfo, [operationID]);
|
|
1477
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
|
+
};
|
|
1478
1505
|
this.getUsersInfo = (data, operationID = v4()) => {
|
|
1479
1506
|
return this._invoker('getUsersInfo', window.getUsersInfo, [operationID, JSON.stringify(data)]);
|
|
1480
1507
|
};
|
|
@@ -2115,6 +2142,11 @@ class SDK extends Emitter {
|
|
|
2115
2142
|
}),
|
|
2116
2143
|
]);
|
|
2117
2144
|
};
|
|
2145
|
+
this.getMsgPinInfo = (operationID = v4()) => {
|
|
2146
|
+
return this._invoker('getMsgPinInfo', window.getMsgPinInfo, [
|
|
2147
|
+
operationID,
|
|
2148
|
+
]);
|
|
2149
|
+
};
|
|
2118
2150
|
this.fileMapSet = (uuid, file) => window.fileMapSet(uuid, file);
|
|
2119
2151
|
// Reset any previous state before initializing
|
|
2120
2152
|
reset();
|
package/lib/index.umd.js
CHANGED
|
@@ -441,6 +441,9 @@
|
|
|
441
441
|
CbEvents["OnGroupApplicationAccepted"] = "OnGroupApplicationAccepted";
|
|
442
442
|
CbEvents["OnGroupApplicationRejected"] = "OnGroupApplicationRejected";
|
|
443
443
|
CbEvents["OnGroupRequestInfoChanged"] = "OnGroupRequestInfoChanged";
|
|
444
|
+
// message pin
|
|
445
|
+
CbEvents["OnMsgPinned"] = "OnMsgPinned";
|
|
446
|
+
CbEvents["OnMsgUnpinned"] = "OnMsgUnpinned";
|
|
444
447
|
CbEvents["UploadComplete"] = "UploadComplete";
|
|
445
448
|
CbEvents["OnRecvCustomBusinessMessage"] = "OnRecvCustomBusinessMessage";
|
|
446
449
|
CbEvents["OnUserStatusChanged"] = "OnUserStatusChanged";
|
|
@@ -643,6 +646,15 @@
|
|
|
643
646
|
window.insertSendingMessage = registeMethodOnWindow('insertSendingMessage');
|
|
644
647
|
window.deleteSendingMessage = registeMethodOnWindow('deleteSendingMessage');
|
|
645
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');
|
|
646
658
|
// conversation
|
|
647
659
|
window.getAllConversationListDB = registeMethodOnWindow('getAllConversationList');
|
|
648
660
|
window.getAllConversationListToSync = registeMethodOnWindow('getAllConversationListToSync');
|
|
@@ -797,6 +809,7 @@
|
|
|
797
809
|
window.insertGroupRequest = registeMethodOnWindow('insertGroupRequest');
|
|
798
810
|
window.deleteGroupRequest = registeMethodOnWindow('deleteGroupRequest');
|
|
799
811
|
window.updateGroupRequest = registeMethodOnWindow('updateGroupRequest');
|
|
812
|
+
window.updateGroupRequestGroupInfo = registeMethodOnWindow('updateGroupRequestGroupInfo');
|
|
800
813
|
window.getSendGroupApplication = registeMethodOnWindow('getSendGroupApplication');
|
|
801
814
|
window.insertAdminGroupRequest = registeMethodOnWindow('insertAdminGroupRequest');
|
|
802
815
|
window.deleteAdminGroupRequest = registeMethodOnWindow('deleteAdminGroupRequest');
|
|
@@ -1477,6 +1490,20 @@
|
|
|
1477
1490
|
this.getSelfUserInfo = (operationID = v4()) => {
|
|
1478
1491
|
return this._invoker('getSelfUserInfo', window.getSelfUserInfo, [operationID]);
|
|
1479
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
|
+
};
|
|
1480
1507
|
this.getUsersInfo = (data, operationID = v4()) => {
|
|
1481
1508
|
return this._invoker('getUsersInfo', window.getUsersInfo, [operationID, JSON.stringify(data)]);
|
|
1482
1509
|
};
|
|
@@ -2117,6 +2144,11 @@
|
|
|
2117
2144
|
}),
|
|
2118
2145
|
]);
|
|
2119
2146
|
};
|
|
2147
|
+
this.getMsgPinInfo = (operationID = v4()) => {
|
|
2148
|
+
return this._invoker('getMsgPinInfo', window.getMsgPinInfo, [
|
|
2149
|
+
operationID,
|
|
2150
|
+
]);
|
|
2151
|
+
};
|
|
2120
2152
|
this.fileMapSet = (uuid, file) => window.fileMapSet(uuid, file);
|
|
2121
2153
|
// Reset any previous state before initializing
|
|
2122
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
|
@@ -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
|
@@ -237,6 +237,17 @@ export declare type MessageItem = {
|
|
|
237
237
|
typingElem?: TypingElem;
|
|
238
238
|
attachedInfoElem: AttachedInfoElem;
|
|
239
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
|
+
};
|
|
240
251
|
export declare type TextElem = {
|
|
241
252
|
content: string;
|
|
242
253
|
};
|
|
@@ -459,3 +470,11 @@ export declare type CallingRoomData = {
|
|
|
459
470
|
invitation?: RtcInvite;
|
|
460
471
|
roomID: string;
|
|
461
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;
|