@inter-digital/wasm-client-sdk 3.8.3-patch.15 → 3.8.4-patch.10
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/LICENSE +661 -201
- package/README.md +11 -1
- package/assets/openIM.wasm +0 -0
- package/assets/wasm_exec.js +15 -1
- package/lib/api/database/message.d.ts +2 -1
- package/lib/index.es.js +2 -1
- package/lib/index.js +2 -1
- package/lib/index.umd.js +2 -1
- package/lib/sqls/localChatLogsConversationID.d.ts +2 -1
- package/lib/types/entity.d.ts +7 -0
- package/lib/worker-legacy.js +1 -1
- package/lib/worker.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -153,4 +153,14 @@ Check out our [user case studies](https://github.com/OpenIMSDK/community/blob/ma
|
|
|
153
153
|
|
|
154
154
|
## License :page_facing_up:
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
This software is licensed under a dual-license model:
|
|
157
|
+
|
|
158
|
+
- The GNU Affero General Public License (AGPL), Version 3 or later; **OR**
|
|
159
|
+
- Commercial license terms from OpenIMSDK.
|
|
160
|
+
|
|
161
|
+
If you wish to use this software under commercial terms, please contact us at: contact@openim.io
|
|
162
|
+
|
|
163
|
+
For more information, see: https://www.openim.io/en/licensing
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
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)
|
|
@@ -19,7 +19,8 @@ export declare function searchMessageByKeyword(conversationID: string, contentTy
|
|
|
19
19
|
export declare function searchMessageByContentType(conversationID: string, contentTypeStr: string, startTime: number, endTime: number, offset: number, count: number): Promise<string>;
|
|
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
|
-
export declare function updateMsgSenderFaceURLAndSenderNickname(conversationID: string, sendID: string, faceURL: string, nickname: string): Promise<string>;
|
|
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>;
|
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');
|
|
@@ -1334,7 +1335,7 @@ class SDK extends Emitter {
|
|
|
1334
1335
|
});
|
|
1335
1336
|
};
|
|
1336
1337
|
this.createQuoteMessage = (params, operationID = v4()) => {
|
|
1337
|
-
return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, params.message], data => {
|
|
1338
|
+
return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, JSON.stringify(params.message)], data => {
|
|
1338
1339
|
// compitable with old version sdk
|
|
1339
1340
|
return data[0];
|
|
1340
1341
|
});
|
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');
|
|
@@ -1338,7 +1339,7 @@ class SDK extends Emitter {
|
|
|
1338
1339
|
});
|
|
1339
1340
|
};
|
|
1340
1341
|
this.createQuoteMessage = (params, operationID = v4()) => {
|
|
1341
|
-
return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, params.message], data => {
|
|
1342
|
+
return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, JSON.stringify(params.message)], data => {
|
|
1342
1343
|
// compitable with old version sdk
|
|
1343
1344
|
return data[0];
|
|
1344
1345
|
});
|
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');
|
|
@@ -1340,7 +1341,7 @@
|
|
|
1340
1341
|
});
|
|
1341
1342
|
};
|
|
1342
1343
|
this.createQuoteMessage = (params, operationID = v4()) => {
|
|
1343
|
-
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 => {
|
|
1344
1345
|
// compitable with old version sdk
|
|
1345
1346
|
return data[0];
|
|
1346
1347
|
});
|
|
@@ -23,7 +23,8 @@ export declare function searchMessageByKeyword(db: Database, conversationID: str
|
|
|
23
23
|
export declare function searchMessageByContentType(db: Database, conversationID: string, contentType: number[], startTime: number, endTime: number, offset: number, count: number): QueryExecResult[];
|
|
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
|
-
export declare function updateMsgSenderFaceURLAndSenderNickname(db: Database, conversationID: string, sendID: string, faceURL: string, nickname: string): QueryExecResult[];
|
|
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[];
|
package/lib/types/entity.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export declare type GroupApplicationItem = {
|
|
|
48
48
|
creatorUserID: string;
|
|
49
49
|
ex: string;
|
|
50
50
|
groupFaceURL: string;
|
|
51
|
+
groupFaceBackgroundColor: string;
|
|
51
52
|
groupID: string;
|
|
52
53
|
groupName: string;
|
|
53
54
|
groupType: GroupType;
|
|
@@ -65,12 +66,14 @@ export declare type GroupApplicationItem = {
|
|
|
65
66
|
joinSource: GroupJoinSource;
|
|
66
67
|
status: GroupStatus;
|
|
67
68
|
userFaceURL: string;
|
|
69
|
+
faceBackgroundColor: string;
|
|
68
70
|
userID: string;
|
|
69
71
|
};
|
|
70
72
|
export declare type FriendApplicationItem = {
|
|
71
73
|
createTime: number;
|
|
72
74
|
ex: string;
|
|
73
75
|
fromFaceURL: string;
|
|
76
|
+
fromFaceBackgroundColor: string;
|
|
74
77
|
fromNickname: string;
|
|
75
78
|
fromUserID: string;
|
|
76
79
|
handleMsg: string;
|
|
@@ -79,6 +82,7 @@ export declare type FriendApplicationItem = {
|
|
|
79
82
|
handlerUserID: string;
|
|
80
83
|
reqMsg: string;
|
|
81
84
|
toFaceURL: string;
|
|
85
|
+
toFaceBackgroundColor: string;
|
|
82
86
|
toNickname: string;
|
|
83
87
|
toUserID: string;
|
|
84
88
|
};
|
|
@@ -104,6 +108,7 @@ export declare type FriendUserItem = {
|
|
|
104
108
|
createTime: number;
|
|
105
109
|
ex: string;
|
|
106
110
|
faceURL: string;
|
|
111
|
+
faceBackgroundColor: string;
|
|
107
112
|
userID: string;
|
|
108
113
|
nickname: string;
|
|
109
114
|
operatorUserID: string;
|
|
@@ -169,6 +174,7 @@ export declare type ConversationItem = {
|
|
|
169
174
|
groupID: string;
|
|
170
175
|
showName: string;
|
|
171
176
|
faceURL: string;
|
|
177
|
+
faceBackgroundColor?: string;
|
|
172
178
|
recvMsgOpt: MessageReceiveOptType;
|
|
173
179
|
unreadCount: number;
|
|
174
180
|
groupAtType: GroupAtType;
|
|
@@ -198,6 +204,7 @@ export declare type MessageItem = {
|
|
|
198
204
|
senderPlatformID: Platform;
|
|
199
205
|
senderNickname: string;
|
|
200
206
|
senderFaceUrl: string;
|
|
207
|
+
senderFaceBackgroundColor: string;
|
|
201
208
|
groupID: string;
|
|
202
209
|
content: string;
|
|
203
210
|
seq: number;
|