@imam-inter/wasm-client-sdk 3.8.4-patch-pin.21 → 3.8.4-patch-pin.23
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/index.es.js +28 -0
- package/lib/index.js +28 -0
- package/lib/index.umd.js +28 -0
- package/lib/sdk/index.d.ts +4 -1
- package/lib/types/entity.d.ts +8 -0
- package/lib/worker-legacy.js +1 -1
- package/lib/worker.js +1 -1
- package/package.json +1 -1
package/lib/index.es.js
CHANGED
|
@@ -640,6 +640,15 @@ function initDatabaseAPI(isLogStandardOutput = true) {
|
|
|
640
640
|
window.insertSendingMessage = registeMethodOnWindow('insertSendingMessage');
|
|
641
641
|
window.deleteSendingMessage = registeMethodOnWindow('deleteSendingMessage');
|
|
642
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');
|
|
643
652
|
// conversation
|
|
644
653
|
window.getAllConversationListDB = registeMethodOnWindow('getAllConversationList');
|
|
645
654
|
window.getAllConversationListToSync = registeMethodOnWindow('getAllConversationListToSync');
|
|
@@ -1475,6 +1484,20 @@ class SDK extends Emitter {
|
|
|
1475
1484
|
this.getSelfUserInfo = (operationID = v4()) => {
|
|
1476
1485
|
return this._invoker('getSelfUserInfo', window.getSelfUserInfo, [operationID]);
|
|
1477
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
|
+
};
|
|
1478
1501
|
this.getUsersInfo = (data, operationID = v4()) => {
|
|
1479
1502
|
return this._invoker('getUsersInfo', window.getUsersInfo, [operationID, JSON.stringify(data)]);
|
|
1480
1503
|
};
|
|
@@ -2115,6 +2138,11 @@ class SDK extends Emitter {
|
|
|
2115
2138
|
}),
|
|
2116
2139
|
]);
|
|
2117
2140
|
};
|
|
2141
|
+
this.getMsgPinInfo = (operationID = v4()) => {
|
|
2142
|
+
return this._invoker('getMsgPinInfo', window.getMsgPinInfo, [
|
|
2143
|
+
operationID,
|
|
2144
|
+
]);
|
|
2145
|
+
};
|
|
2118
2146
|
this.fileMapSet = (uuid, file) => window.fileMapSet(uuid, file);
|
|
2119
2147
|
// Reset any previous state before initializing
|
|
2120
2148
|
reset();
|
package/lib/index.js
CHANGED
|
@@ -644,6 +644,15 @@ function initDatabaseAPI(isLogStandardOutput = true) {
|
|
|
644
644
|
window.insertSendingMessage = registeMethodOnWindow('insertSendingMessage');
|
|
645
645
|
window.deleteSendingMessage = registeMethodOnWindow('deleteSendingMessage');
|
|
646
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');
|
|
647
656
|
// conversation
|
|
648
657
|
window.getAllConversationListDB = registeMethodOnWindow('getAllConversationList');
|
|
649
658
|
window.getAllConversationListToSync = registeMethodOnWindow('getAllConversationListToSync');
|
|
@@ -1479,6 +1488,20 @@ class SDK extends Emitter {
|
|
|
1479
1488
|
this.getSelfUserInfo = (operationID = v4()) => {
|
|
1480
1489
|
return this._invoker('getSelfUserInfo', window.getSelfUserInfo, [operationID]);
|
|
1481
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
|
+
};
|
|
1482
1505
|
this.getUsersInfo = (data, operationID = v4()) => {
|
|
1483
1506
|
return this._invoker('getUsersInfo', window.getUsersInfo, [operationID, JSON.stringify(data)]);
|
|
1484
1507
|
};
|
|
@@ -2119,6 +2142,11 @@ class SDK extends Emitter {
|
|
|
2119
2142
|
}),
|
|
2120
2143
|
]);
|
|
2121
2144
|
};
|
|
2145
|
+
this.getMsgPinInfo = (operationID = v4()) => {
|
|
2146
|
+
return this._invoker('getMsgPinInfo', window.getMsgPinInfo, [
|
|
2147
|
+
operationID,
|
|
2148
|
+
]);
|
|
2149
|
+
};
|
|
2122
2150
|
this.fileMapSet = (uuid, file) => window.fileMapSet(uuid, file);
|
|
2123
2151
|
// Reset any previous state before initializing
|
|
2124
2152
|
reset();
|
package/lib/index.umd.js
CHANGED
|
@@ -646,6 +646,15 @@
|
|
|
646
646
|
window.insertSendingMessage = registeMethodOnWindow('insertSendingMessage');
|
|
647
647
|
window.deleteSendingMessage = registeMethodOnWindow('deleteSendingMessage');
|
|
648
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');
|
|
649
658
|
// conversation
|
|
650
659
|
window.getAllConversationListDB = registeMethodOnWindow('getAllConversationList');
|
|
651
660
|
window.getAllConversationListToSync = registeMethodOnWindow('getAllConversationListToSync');
|
|
@@ -1481,6 +1490,20 @@
|
|
|
1481
1490
|
this.getSelfUserInfo = (operationID = v4()) => {
|
|
1482
1491
|
return this._invoker('getSelfUserInfo', window.getSelfUserInfo, [operationID]);
|
|
1483
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
|
+
};
|
|
1484
1507
|
this.getUsersInfo = (data, operationID = v4()) => {
|
|
1485
1508
|
return this._invoker('getUsersInfo', window.getUsersInfo, [operationID, JSON.stringify(data)]);
|
|
1486
1509
|
};
|
|
@@ -2121,6 +2144,11 @@
|
|
|
2121
2144
|
}),
|
|
2122
2145
|
]);
|
|
2123
2146
|
};
|
|
2147
|
+
this.getMsgPinInfo = (operationID = v4()) => {
|
|
2148
|
+
return this._invoker('getMsgPinInfo', window.getMsgPinInfo, [
|
|
2149
|
+
operationID,
|
|
2150
|
+
]);
|
|
2151
|
+
};
|
|
2124
2152
|
this.fileMapSet = (uuid, file) => window.fileMapSet(uuid, file);
|
|
2125
2153
|
// Reset any previous state before initializing
|
|
2126
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/types/entity.d.ts
CHANGED
|
@@ -470,3 +470,11 @@ export type CallingRoomData = {
|
|
|
470
470
|
invitation?: RtcInvite;
|
|
471
471
|
roomID: string;
|
|
472
472
|
};
|
|
473
|
+
export type SetMsgPinInfo = {
|
|
474
|
+
conversationID: string;
|
|
475
|
+
seq: number;
|
|
476
|
+
pinned: boolean;
|
|
477
|
+
};
|
|
478
|
+
export type GetMsgPinInfo = {
|
|
479
|
+
conversationID: string;
|
|
480
|
+
};
|