@inter-digital/wasm-client-sdk 3.8.4-patch.1 → 3.8.4-patch.11

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.
Binary file
@@ -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>;
@@ -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>;
@@ -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/index.es.js CHANGED
@@ -607,6 +607,7 @@ function initDatabaseAPI(isLogStandardOutput = true) {
607
607
  window.updateMsgSenderNickname = registeMethodOnWindow('updateMsgSenderNickname');
608
608
  window.updateMsgSenderFaceURL = registeMethodOnWindow('updateMsgSenderFaceURL');
609
609
  window.updateMsgSenderFaceURLAndSenderNickname = registeMethodOnWindow('updateMsgSenderFaceURLAndSenderNickname');
610
+ window.updateMsgSenderFaceBackgroundColor = registeMethodOnWindow('updateMsgSenderFaceBackgroundColor');
610
611
  window.getMsgSeqByClientMsgID = registeMethodOnWindow('getMsgSeqByClientMsgID');
611
612
  window.getMsgSeqListByGroupID = registeMethodOnWindow('getMsgSeqListByGroupID');
612
613
  window.getMsgSeqListByPeerUserID = registeMethodOnWindow('getMsgSeqListByPeerUserID');
@@ -674,6 +675,7 @@ function initDatabaseAPI(isLogStandardOutput = true) {
674
675
  window.getLoginUser = registeMethodOnWindow('getLoginUser');
675
676
  window.insertLoginUser = registeMethodOnWindow('insertLoginUser');
676
677
  window.updateLoginUser = registeMethodOnWindow('updateLoginUser');
678
+ window.processUserCommandGetAll = registeMethodOnWindow('processUserCommandGetAll');
677
679
  window.getStrangerInfo = registeMethodOnWindow('getStrangerInfo');
678
680
  window.setStrangerInfo = registeMethodOnWindow('setStrangerInfo');
679
681
  // app sdk versions
@@ -739,6 +741,7 @@ function initDatabaseAPI(isLogStandardOutput = true) {
739
741
  // black
740
742
  window.getBlackListDB = registeMethodOnWindow('getBlackList');
741
743
  window.getBlackListUserID = registeMethodOnWindow('getBlackListUserID');
744
+ window.getBlackListByOtherDB = registeMethodOnWindow('getBlackListByOtherDB');
742
745
  window.getBlackInfoByBlockUserID = registeMethodOnWindow('getBlackInfoByBlockUserID');
743
746
  window.getBlackInfoList = registeMethodOnWindow('getBlackInfoList');
744
747
  window.insertBlack = registeMethodOnWindow('insertBlack');
@@ -1334,7 +1337,7 @@ class SDK extends Emitter {
1334
1337
  });
1335
1338
  };
1336
1339
  this.createQuoteMessage = (params, operationID = v4()) => {
1337
- return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, params.message], data => {
1340
+ return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, JSON.stringify(params.message)], data => {
1338
1341
  // compitable with old version sdk
1339
1342
  return data[0];
1340
1343
  });
package/lib/index.js CHANGED
@@ -611,6 +611,7 @@ function initDatabaseAPI(isLogStandardOutput = true) {
611
611
  window.updateMsgSenderNickname = registeMethodOnWindow('updateMsgSenderNickname');
612
612
  window.updateMsgSenderFaceURL = registeMethodOnWindow('updateMsgSenderFaceURL');
613
613
  window.updateMsgSenderFaceURLAndSenderNickname = registeMethodOnWindow('updateMsgSenderFaceURLAndSenderNickname');
614
+ window.updateMsgSenderFaceBackgroundColor = registeMethodOnWindow('updateMsgSenderFaceBackgroundColor');
614
615
  window.getMsgSeqByClientMsgID = registeMethodOnWindow('getMsgSeqByClientMsgID');
615
616
  window.getMsgSeqListByGroupID = registeMethodOnWindow('getMsgSeqListByGroupID');
616
617
  window.getMsgSeqListByPeerUserID = registeMethodOnWindow('getMsgSeqListByPeerUserID');
@@ -678,6 +679,7 @@ function initDatabaseAPI(isLogStandardOutput = true) {
678
679
  window.getLoginUser = registeMethodOnWindow('getLoginUser');
679
680
  window.insertLoginUser = registeMethodOnWindow('insertLoginUser');
680
681
  window.updateLoginUser = registeMethodOnWindow('updateLoginUser');
682
+ window.processUserCommandGetAll = registeMethodOnWindow('processUserCommandGetAll');
681
683
  window.getStrangerInfo = registeMethodOnWindow('getStrangerInfo');
682
684
  window.setStrangerInfo = registeMethodOnWindow('setStrangerInfo');
683
685
  // app sdk versions
@@ -743,6 +745,7 @@ function initDatabaseAPI(isLogStandardOutput = true) {
743
745
  // black
744
746
  window.getBlackListDB = registeMethodOnWindow('getBlackList');
745
747
  window.getBlackListUserID = registeMethodOnWindow('getBlackListUserID');
748
+ window.getBlackListByOtherDB = registeMethodOnWindow('getBlackListByOtherDB');
746
749
  window.getBlackInfoByBlockUserID = registeMethodOnWindow('getBlackInfoByBlockUserID');
747
750
  window.getBlackInfoList = registeMethodOnWindow('getBlackInfoList');
748
751
  window.insertBlack = registeMethodOnWindow('insertBlack');
@@ -1338,7 +1341,7 @@ class SDK extends Emitter {
1338
1341
  });
1339
1342
  };
1340
1343
  this.createQuoteMessage = (params, operationID = v4()) => {
1341
- return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, params.message], data => {
1344
+ return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, JSON.stringify(params.message)], data => {
1342
1345
  // compitable with old version sdk
1343
1346
  return data[0];
1344
1347
  });
package/lib/index.umd.js CHANGED
@@ -613,6 +613,7 @@
613
613
  window.updateMsgSenderNickname = registeMethodOnWindow('updateMsgSenderNickname');
614
614
  window.updateMsgSenderFaceURL = registeMethodOnWindow('updateMsgSenderFaceURL');
615
615
  window.updateMsgSenderFaceURLAndSenderNickname = registeMethodOnWindow('updateMsgSenderFaceURLAndSenderNickname');
616
+ window.updateMsgSenderFaceBackgroundColor = registeMethodOnWindow('updateMsgSenderFaceBackgroundColor');
616
617
  window.getMsgSeqByClientMsgID = registeMethodOnWindow('getMsgSeqByClientMsgID');
617
618
  window.getMsgSeqListByGroupID = registeMethodOnWindow('getMsgSeqListByGroupID');
618
619
  window.getMsgSeqListByPeerUserID = registeMethodOnWindow('getMsgSeqListByPeerUserID');
@@ -680,6 +681,7 @@
680
681
  window.getLoginUser = registeMethodOnWindow('getLoginUser');
681
682
  window.insertLoginUser = registeMethodOnWindow('insertLoginUser');
682
683
  window.updateLoginUser = registeMethodOnWindow('updateLoginUser');
684
+ window.processUserCommandGetAll = registeMethodOnWindow('processUserCommandGetAll');
683
685
  window.getStrangerInfo = registeMethodOnWindow('getStrangerInfo');
684
686
  window.setStrangerInfo = registeMethodOnWindow('setStrangerInfo');
685
687
  // app sdk versions
@@ -745,6 +747,7 @@
745
747
  // black
746
748
  window.getBlackListDB = registeMethodOnWindow('getBlackList');
747
749
  window.getBlackListUserID = registeMethodOnWindow('getBlackListUserID');
750
+ window.getBlackListByOtherDB = registeMethodOnWindow('getBlackListByOtherDB');
748
751
  window.getBlackInfoByBlockUserID = registeMethodOnWindow('getBlackInfoByBlockUserID');
749
752
  window.getBlackInfoList = registeMethodOnWindow('getBlackInfoList');
750
753
  window.insertBlack = registeMethodOnWindow('insertBlack');
@@ -1340,7 +1343,7 @@
1340
1343
  });
1341
1344
  };
1342
1345
  this.createQuoteMessage = (params, operationID = v4()) => {
1343
- return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, params.message], data => {
1346
+ return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, JSON.stringify(params.message)], data => {
1344
1347
  // compitable with old version sdk
1345
1348
  return data[0];
1346
1349
  });
@@ -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[];