@imam-inter/wasm-client-sdk 3.8.4-patch-pin.20 → 3.8.4-patch-pin.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.
@@ -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');
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');
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');
@@ -237,6 +237,17 @@ export type MessageItem = {
237
237
  typingElem?: TypingElem;
238
238
  attachedInfoElem: AttachedInfoElem;
239
239
  };
240
+ export type MsgPinInfo = {
241
+ conversationID: string;
242
+ seq: number;
243
+ createdBy: string;
244
+ createdAt: number;
245
+ msg: MessageItem;
246
+ };
247
+ export type MsgUnpinInfo = {
248
+ conversationID: string;
249
+ seq: number;
250
+ };
240
251
  export type TextElem = {
241
252
  content: string;
242
253
  };
@@ -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 type EventDataMap = {
4
4
  [CbEvents.OnProgress]: {
5
5
  progress: number;
@@ -47,5 +47,7 @@ export 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 type DataOfEvent<E extends CbEvents> = E extends keyof EventDataMap ? EventDataMap[E] : never;