@inter-digital/wasm-client-sdk 3.8.3-patch.13 → 3.8.3-patch.14
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 +201 -661
- package/assets/openIM.wasm +0 -0
- package/assets/version +1 -1
- package/assets/wasm_exec.js +1 -15
- package/lib/index.es.js +12 -41
- package/lib/index.js +11 -40
- package/lib/index.umd.js +11 -40
- package/lib/sdk/index.d.ts +5 -7
- package/lib/types/entity.d.ts +1 -2
- package/lib/types/enum.d.ts +0 -5
- package/lib/types/params.d.ts +0 -21
- package/lib/worker-legacy.js +1 -1
- package/lib/worker.js +1 -1
- package/package.json +1 -1
package/assets/openIM.wasm
CHANGED
|
Binary file
|
package/assets/version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
v3.8.3-patch.
|
|
1
|
+
v3.8.3-patch.3
|
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
|
|
17
|
+
constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused
|
|
18
18
|
writeSync(fd, buf) {
|
|
19
19
|
outputBuf += decoder.decode(buf);
|
|
20
20
|
const nl = outputBuf.lastIndexOf("\n");
|
|
@@ -73,14 +73,6 @@
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
if (!globalThis.path) {
|
|
77
|
-
globalThis.path = {
|
|
78
|
-
resolve(...pathSegments) {
|
|
79
|
-
return pathSegments.join("/");
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
76
|
if (!globalThis.crypto) {
|
|
85
77
|
throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");
|
|
86
78
|
}
|
|
@@ -216,16 +208,10 @@
|
|
|
216
208
|
return decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));
|
|
217
209
|
}
|
|
218
210
|
|
|
219
|
-
const testCallExport = (a, b) => {
|
|
220
|
-
this._inst.exports.testExport0();
|
|
221
|
-
return this._inst.exports.testExport(a, b);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
211
|
const timeOrigin = Date.now() - performance.now();
|
|
225
212
|
this.importObject = {
|
|
226
213
|
_gotest: {
|
|
227
214
|
add: (a, b) => a + b,
|
|
228
|
-
callExport: testCallExport,
|
|
229
215
|
},
|
|
230
216
|
gojs: {
|
|
231
217
|
// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)
|
package/lib/index.es.js
CHANGED
|
@@ -1012,12 +1012,6 @@ var MessageReceiveOptType;
|
|
|
1012
1012
|
MessageReceiveOptType[MessageReceiveOptType["NotReceive"] = 1] = "NotReceive";
|
|
1013
1013
|
MessageReceiveOptType[MessageReceiveOptType["NotNotify"] = 2] = "NotNotify";
|
|
1014
1014
|
})(MessageReceiveOptType || (MessageReceiveOptType = {}));
|
|
1015
|
-
var AddFriendPermission;
|
|
1016
|
-
(function (AddFriendPermission) {
|
|
1017
|
-
AddFriendPermission[AddFriendPermission["AddFriendAllowed"] = 0] = "AddFriendAllowed";
|
|
1018
|
-
AddFriendPermission[AddFriendPermission["AddFriendAllowedNoReview"] = 1] = "AddFriendAllowedNoReview";
|
|
1019
|
-
AddFriendPermission[AddFriendPermission["AddFriendDenied"] = 2] = "AddFriendDenied";
|
|
1020
|
-
})(AddFriendPermission || (AddFriendPermission = {}));
|
|
1021
1015
|
var AllowType;
|
|
1022
1016
|
(function (AllowType) {
|
|
1023
1017
|
AllowType[AllowType["Allowed"] = 0] = "Allowed";
|
|
@@ -1214,14 +1208,14 @@ class SDK extends Emitter {
|
|
|
1214
1208
|
isExternalExtensions: params.isExternalExtensions || false,
|
|
1215
1209
|
};
|
|
1216
1210
|
this.tryParse = (_b = params.tryParse) !== null && _b !== void 0 ? _b : true;
|
|
1217
|
-
window.initSDK(operationID, JSON.stringify(config));
|
|
1211
|
+
return window.initSDK(operationID, JSON.stringify(config));
|
|
1218
1212
|
};
|
|
1219
1213
|
this.login = async (params, operationID = v4()) => {
|
|
1220
1214
|
this._logWrap(`SDK => (invoked by js) run login with args ${JSON.stringify({
|
|
1221
1215
|
params,
|
|
1222
1216
|
operationID,
|
|
1223
1217
|
})}`);
|
|
1224
|
-
// If
|
|
1218
|
+
// If initialization config is provided, run init first
|
|
1225
1219
|
if ('platformID' in params) {
|
|
1226
1220
|
await this.init(params, operationID);
|
|
1227
1221
|
}
|
|
@@ -1694,21 +1688,11 @@ class SDK extends Emitter {
|
|
|
1694
1688
|
this.getSpecifiedFriendsInfo = (data, operationID = v4()) => {
|
|
1695
1689
|
return this._invoker('getSpecifiedFriendsInfo', window.getSpecifiedFriendsInfo, [operationID, JSON.stringify(data.friendUserIDList), data.filterBlack]);
|
|
1696
1690
|
};
|
|
1697
|
-
this.getFriendApplicationListAsRecipient = (
|
|
1698
|
-
|
|
1699
|
-
offset: 0,
|
|
1700
|
-
count: 0,
|
|
1701
|
-
}, operationID = v4()) => {
|
|
1702
|
-
return this._invoker('getFriendApplicationListAsRecipient ', window.getFriendApplicationListAsRecipient, [operationID, JSON.stringify(data)]);
|
|
1691
|
+
this.getFriendApplicationListAsRecipient = (operationID = v4()) => {
|
|
1692
|
+
return this._invoker('getFriendApplicationListAsRecipient ', window.getFriendApplicationListAsRecipient, [operationID]);
|
|
1703
1693
|
};
|
|
1704
|
-
this.getFriendApplicationListAsApplicant = (
|
|
1705
|
-
|
|
1706
|
-
count: 0,
|
|
1707
|
-
}, operationID = v4()) => {
|
|
1708
|
-
return this._invoker('getFriendApplicationListAsApplicant ', window.getFriendApplicationListAsApplicant, [operationID, JSON.stringify(data)]);
|
|
1709
|
-
};
|
|
1710
|
-
this.getFriendApplicationUnhandledCount = (data, operationID = v4()) => {
|
|
1711
|
-
return this._invoker('getFriendApplicationUnhandledCount ', window.getFriendApplicationUnhandledCount, [operationID, JSON.stringify(data)]);
|
|
1694
|
+
this.getFriendApplicationListAsApplicant = (operationID = v4()) => {
|
|
1695
|
+
return this._invoker('getFriendApplicationListAsApplicant ', window.getFriendApplicationListAsApplicant, [operationID]);
|
|
1712
1696
|
};
|
|
1713
1697
|
this.getFriendList = (filterBlack = false, operationID = v4()) => {
|
|
1714
1698
|
return this._invoker('getFriendList ', window.getFriendList, [operationID, filterBlack]);
|
|
@@ -1947,24 +1931,11 @@ class SDK extends Emitter {
|
|
|
1947
1931
|
data.newOwnerUserID,
|
|
1948
1932
|
]);
|
|
1949
1933
|
};
|
|
1950
|
-
this.getGroupApplicationListAsApplicant = (
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
}, operationID = v4()) => {
|
|
1956
|
-
return this._invoker('getGroupApplicationListAsApplicant ', window.getGroupApplicationListAsApplicant, [operationID, JSON.stringify(data)]);
|
|
1957
|
-
};
|
|
1958
|
-
this.getGroupApplicationListAsRecipient = (data = {
|
|
1959
|
-
groupID: [],
|
|
1960
|
-
handleResults: [],
|
|
1961
|
-
offset: 0,
|
|
1962
|
-
count: 0,
|
|
1963
|
-
}, operationID = v4()) => {
|
|
1964
|
-
return this._invoker('getGroupApplicationListAsRecipient ', window.getGroupApplicationListAsRecipient, [operationID, JSON.stringify(data)]);
|
|
1965
|
-
};
|
|
1966
|
-
this.getGroupApplicationUnhandledCount = (data, operationID = v4()) => {
|
|
1967
|
-
return this._invoker('getGroupApplicationUnhandledCount ', window.getGroupApplicationUnhandledCount, [operationID, JSON.stringify(data)]);
|
|
1934
|
+
this.getGroupApplicationListAsApplicant = (operationID = v4()) => {
|
|
1935
|
+
return this._invoker('getGroupApplicationListAsApplicant ', window.getGroupApplicationListAsApplicant, [operationID]);
|
|
1936
|
+
};
|
|
1937
|
+
this.getGroupApplicationListAsRecipient = (operationID = v4()) => {
|
|
1938
|
+
return this._invoker('getGroupApplicationListAsRecipient ', window.getGroupApplicationListAsRecipient, [operationID]);
|
|
1968
1939
|
};
|
|
1969
1940
|
this.acceptGroupApplication = (data, operationID = v4()) => {
|
|
1970
1941
|
return this._invoker('acceptGroupApplication ', window.acceptGroupApplication, [operationID, data.groupID, data.fromUserID, data.handleMsg]);
|
|
@@ -2222,4 +2193,4 @@ var indexeddbMainThreadWorkerB24e7a21 = /*#__PURE__*/Object.freeze({
|
|
|
2222
2193
|
'default': WorkerFactory
|
|
2223
2194
|
});
|
|
2224
2195
|
|
|
2225
|
-
export {
|
|
2196
|
+
export { AllowType, ApplicationHandleResult, CbEvents, GroupAtType, GroupJoinSource, GroupMemberFilter, GroupMemberRole, GroupMessageReaderFilter, GroupStatus, GroupType, GroupVerificationType, LogLevel, LoginStatus, MessageReceiveOptType, MessageStatus, MessageType, OnlineState, Platform, Relationship, SessionType, ViewType, getSDK };
|
package/lib/index.js
CHANGED
|
@@ -1016,12 +1016,6 @@ exports.MessageReceiveOptType = void 0;
|
|
|
1016
1016
|
MessageReceiveOptType[MessageReceiveOptType["NotReceive"] = 1] = "NotReceive";
|
|
1017
1017
|
MessageReceiveOptType[MessageReceiveOptType["NotNotify"] = 2] = "NotNotify";
|
|
1018
1018
|
})(exports.MessageReceiveOptType || (exports.MessageReceiveOptType = {}));
|
|
1019
|
-
exports.AddFriendPermission = void 0;
|
|
1020
|
-
(function (AddFriendPermission) {
|
|
1021
|
-
AddFriendPermission[AddFriendPermission["AddFriendAllowed"] = 0] = "AddFriendAllowed";
|
|
1022
|
-
AddFriendPermission[AddFriendPermission["AddFriendAllowedNoReview"] = 1] = "AddFriendAllowedNoReview";
|
|
1023
|
-
AddFriendPermission[AddFriendPermission["AddFriendDenied"] = 2] = "AddFriendDenied";
|
|
1024
|
-
})(exports.AddFriendPermission || (exports.AddFriendPermission = {}));
|
|
1025
1019
|
exports.AllowType = void 0;
|
|
1026
1020
|
(function (AllowType) {
|
|
1027
1021
|
AllowType[AllowType["Allowed"] = 0] = "Allowed";
|
|
@@ -1218,14 +1212,14 @@ class SDK extends Emitter {
|
|
|
1218
1212
|
isExternalExtensions: params.isExternalExtensions || false,
|
|
1219
1213
|
};
|
|
1220
1214
|
this.tryParse = (_b = params.tryParse) !== null && _b !== void 0 ? _b : true;
|
|
1221
|
-
window.initSDK(operationID, JSON.stringify(config));
|
|
1215
|
+
return window.initSDK(operationID, JSON.stringify(config));
|
|
1222
1216
|
};
|
|
1223
1217
|
this.login = async (params, operationID = v4()) => {
|
|
1224
1218
|
this._logWrap(`SDK => (invoked by js) run login with args ${JSON.stringify({
|
|
1225
1219
|
params,
|
|
1226
1220
|
operationID,
|
|
1227
1221
|
})}`);
|
|
1228
|
-
// If
|
|
1222
|
+
// If initialization config is provided, run init first
|
|
1229
1223
|
if ('platformID' in params) {
|
|
1230
1224
|
await this.init(params, operationID);
|
|
1231
1225
|
}
|
|
@@ -1698,21 +1692,11 @@ class SDK extends Emitter {
|
|
|
1698
1692
|
this.getSpecifiedFriendsInfo = (data, operationID = v4()) => {
|
|
1699
1693
|
return this._invoker('getSpecifiedFriendsInfo', window.getSpecifiedFriendsInfo, [operationID, JSON.stringify(data.friendUserIDList), data.filterBlack]);
|
|
1700
1694
|
};
|
|
1701
|
-
this.getFriendApplicationListAsRecipient = (
|
|
1702
|
-
|
|
1703
|
-
offset: 0,
|
|
1704
|
-
count: 0,
|
|
1705
|
-
}, operationID = v4()) => {
|
|
1706
|
-
return this._invoker('getFriendApplicationListAsRecipient ', window.getFriendApplicationListAsRecipient, [operationID, JSON.stringify(data)]);
|
|
1695
|
+
this.getFriendApplicationListAsRecipient = (operationID = v4()) => {
|
|
1696
|
+
return this._invoker('getFriendApplicationListAsRecipient ', window.getFriendApplicationListAsRecipient, [operationID]);
|
|
1707
1697
|
};
|
|
1708
|
-
this.getFriendApplicationListAsApplicant = (
|
|
1709
|
-
|
|
1710
|
-
count: 0,
|
|
1711
|
-
}, operationID = v4()) => {
|
|
1712
|
-
return this._invoker('getFriendApplicationListAsApplicant ', window.getFriendApplicationListAsApplicant, [operationID, JSON.stringify(data)]);
|
|
1713
|
-
};
|
|
1714
|
-
this.getFriendApplicationUnhandledCount = (data, operationID = v4()) => {
|
|
1715
|
-
return this._invoker('getFriendApplicationUnhandledCount ', window.getFriendApplicationUnhandledCount, [operationID, JSON.stringify(data)]);
|
|
1698
|
+
this.getFriendApplicationListAsApplicant = (operationID = v4()) => {
|
|
1699
|
+
return this._invoker('getFriendApplicationListAsApplicant ', window.getFriendApplicationListAsApplicant, [operationID]);
|
|
1716
1700
|
};
|
|
1717
1701
|
this.getFriendList = (filterBlack = false, operationID = v4()) => {
|
|
1718
1702
|
return this._invoker('getFriendList ', window.getFriendList, [operationID, filterBlack]);
|
|
@@ -1951,24 +1935,11 @@ class SDK extends Emitter {
|
|
|
1951
1935
|
data.newOwnerUserID,
|
|
1952
1936
|
]);
|
|
1953
1937
|
};
|
|
1954
|
-
this.getGroupApplicationListAsApplicant = (
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
}, operationID = v4()) => {
|
|
1960
|
-
return this._invoker('getGroupApplicationListAsApplicant ', window.getGroupApplicationListAsApplicant, [operationID, JSON.stringify(data)]);
|
|
1961
|
-
};
|
|
1962
|
-
this.getGroupApplicationListAsRecipient = (data = {
|
|
1963
|
-
groupID: [],
|
|
1964
|
-
handleResults: [],
|
|
1965
|
-
offset: 0,
|
|
1966
|
-
count: 0,
|
|
1967
|
-
}, operationID = v4()) => {
|
|
1968
|
-
return this._invoker('getGroupApplicationListAsRecipient ', window.getGroupApplicationListAsRecipient, [operationID, JSON.stringify(data)]);
|
|
1969
|
-
};
|
|
1970
|
-
this.getGroupApplicationUnhandledCount = (data, operationID = v4()) => {
|
|
1971
|
-
return this._invoker('getGroupApplicationUnhandledCount ', window.getGroupApplicationUnhandledCount, [operationID, JSON.stringify(data)]);
|
|
1938
|
+
this.getGroupApplicationListAsApplicant = (operationID = v4()) => {
|
|
1939
|
+
return this._invoker('getGroupApplicationListAsApplicant ', window.getGroupApplicationListAsApplicant, [operationID]);
|
|
1940
|
+
};
|
|
1941
|
+
this.getGroupApplicationListAsRecipient = (operationID = v4()) => {
|
|
1942
|
+
return this._invoker('getGroupApplicationListAsRecipient ', window.getGroupApplicationListAsRecipient, [operationID]);
|
|
1972
1943
|
};
|
|
1973
1944
|
this.acceptGroupApplication = (data, operationID = v4()) => {
|
|
1974
1945
|
return this._invoker('acceptGroupApplication ', window.acceptGroupApplication, [operationID, data.groupID, data.fromUserID, data.handleMsg]);
|
package/lib/index.umd.js
CHANGED
|
@@ -1018,12 +1018,6 @@
|
|
|
1018
1018
|
MessageReceiveOptType[MessageReceiveOptType["NotReceive"] = 1] = "NotReceive";
|
|
1019
1019
|
MessageReceiveOptType[MessageReceiveOptType["NotNotify"] = 2] = "NotNotify";
|
|
1020
1020
|
})(exports.MessageReceiveOptType || (exports.MessageReceiveOptType = {}));
|
|
1021
|
-
exports.AddFriendPermission = void 0;
|
|
1022
|
-
(function (AddFriendPermission) {
|
|
1023
|
-
AddFriendPermission[AddFriendPermission["AddFriendAllowed"] = 0] = "AddFriendAllowed";
|
|
1024
|
-
AddFriendPermission[AddFriendPermission["AddFriendAllowedNoReview"] = 1] = "AddFriendAllowedNoReview";
|
|
1025
|
-
AddFriendPermission[AddFriendPermission["AddFriendDenied"] = 2] = "AddFriendDenied";
|
|
1026
|
-
})(exports.AddFriendPermission || (exports.AddFriendPermission = {}));
|
|
1027
1021
|
exports.AllowType = void 0;
|
|
1028
1022
|
(function (AllowType) {
|
|
1029
1023
|
AllowType[AllowType["Allowed"] = 0] = "Allowed";
|
|
@@ -1220,14 +1214,14 @@
|
|
|
1220
1214
|
isExternalExtensions: params.isExternalExtensions || false,
|
|
1221
1215
|
};
|
|
1222
1216
|
this.tryParse = (_b = params.tryParse) !== null && _b !== void 0 ? _b : true;
|
|
1223
|
-
window.initSDK(operationID, JSON.stringify(config));
|
|
1217
|
+
return window.initSDK(operationID, JSON.stringify(config));
|
|
1224
1218
|
};
|
|
1225
1219
|
this.login = async (params, operationID = v4()) => {
|
|
1226
1220
|
this._logWrap(`SDK => (invoked by js) run login with args ${JSON.stringify({
|
|
1227
1221
|
params,
|
|
1228
1222
|
operationID,
|
|
1229
1223
|
})}`);
|
|
1230
|
-
// If
|
|
1224
|
+
// If initialization config is provided, run init first
|
|
1231
1225
|
if ('platformID' in params) {
|
|
1232
1226
|
await this.init(params, operationID);
|
|
1233
1227
|
}
|
|
@@ -1700,21 +1694,11 @@
|
|
|
1700
1694
|
this.getSpecifiedFriendsInfo = (data, operationID = v4()) => {
|
|
1701
1695
|
return this._invoker('getSpecifiedFriendsInfo', window.getSpecifiedFriendsInfo, [operationID, JSON.stringify(data.friendUserIDList), data.filterBlack]);
|
|
1702
1696
|
};
|
|
1703
|
-
this.getFriendApplicationListAsRecipient = (
|
|
1704
|
-
|
|
1705
|
-
offset: 0,
|
|
1706
|
-
count: 0,
|
|
1707
|
-
}, operationID = v4()) => {
|
|
1708
|
-
return this._invoker('getFriendApplicationListAsRecipient ', window.getFriendApplicationListAsRecipient, [operationID, JSON.stringify(data)]);
|
|
1697
|
+
this.getFriendApplicationListAsRecipient = (operationID = v4()) => {
|
|
1698
|
+
return this._invoker('getFriendApplicationListAsRecipient ', window.getFriendApplicationListAsRecipient, [operationID]);
|
|
1709
1699
|
};
|
|
1710
|
-
this.getFriendApplicationListAsApplicant = (
|
|
1711
|
-
|
|
1712
|
-
count: 0,
|
|
1713
|
-
}, operationID = v4()) => {
|
|
1714
|
-
return this._invoker('getFriendApplicationListAsApplicant ', window.getFriendApplicationListAsApplicant, [operationID, JSON.stringify(data)]);
|
|
1715
|
-
};
|
|
1716
|
-
this.getFriendApplicationUnhandledCount = (data, operationID = v4()) => {
|
|
1717
|
-
return this._invoker('getFriendApplicationUnhandledCount ', window.getFriendApplicationUnhandledCount, [operationID, JSON.stringify(data)]);
|
|
1700
|
+
this.getFriendApplicationListAsApplicant = (operationID = v4()) => {
|
|
1701
|
+
return this._invoker('getFriendApplicationListAsApplicant ', window.getFriendApplicationListAsApplicant, [operationID]);
|
|
1718
1702
|
};
|
|
1719
1703
|
this.getFriendList = (filterBlack = false, operationID = v4()) => {
|
|
1720
1704
|
return this._invoker('getFriendList ', window.getFriendList, [operationID, filterBlack]);
|
|
@@ -1953,24 +1937,11 @@
|
|
|
1953
1937
|
data.newOwnerUserID,
|
|
1954
1938
|
]);
|
|
1955
1939
|
};
|
|
1956
|
-
this.getGroupApplicationListAsApplicant = (
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
}, operationID = v4()) => {
|
|
1962
|
-
return this._invoker('getGroupApplicationListAsApplicant ', window.getGroupApplicationListAsApplicant, [operationID, JSON.stringify(data)]);
|
|
1963
|
-
};
|
|
1964
|
-
this.getGroupApplicationListAsRecipient = (data = {
|
|
1965
|
-
groupID: [],
|
|
1966
|
-
handleResults: [],
|
|
1967
|
-
offset: 0,
|
|
1968
|
-
count: 0,
|
|
1969
|
-
}, operationID = v4()) => {
|
|
1970
|
-
return this._invoker('getGroupApplicationListAsRecipient ', window.getGroupApplicationListAsRecipient, [operationID, JSON.stringify(data)]);
|
|
1971
|
-
};
|
|
1972
|
-
this.getGroupApplicationUnhandledCount = (data, operationID = v4()) => {
|
|
1973
|
-
return this._invoker('getGroupApplicationUnhandledCount ', window.getGroupApplicationUnhandledCount, [operationID, JSON.stringify(data)]);
|
|
1940
|
+
this.getGroupApplicationListAsApplicant = (operationID = v4()) => {
|
|
1941
|
+
return this._invoker('getGroupApplicationListAsApplicant ', window.getGroupApplicationListAsApplicant, [operationID]);
|
|
1942
|
+
};
|
|
1943
|
+
this.getGroupApplicationListAsRecipient = (operationID = v4()) => {
|
|
1944
|
+
return this._invoker('getGroupApplicationListAsRecipient ', window.getGroupApplicationListAsRecipient, [operationID]);
|
|
1974
1945
|
};
|
|
1975
1946
|
this.acceptGroupApplication = (data, operationID = v4()) => {
|
|
1976
1947
|
return this._invoker('acceptGroupApplication ', window.acceptGroupApplication, [operationID, data.groupID, data.fromUserID, data.handleMsg]);
|
package/lib/sdk/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Emitter from '../utils/emitter';
|
|
2
|
-
import { AccessFriendApplicationParams, AccessGroupApplicationParams, AccessMessageParams, AddFriendParams, AdvancedMsgParams, AdvancedQuoteMsgParams, AtMsgParams, ChangeGroupMemberMuteParams, ChangeGroupMuteParams, CreateGroupParams, CustomMsgParams, CustomSignalParams, FaceMessageParams, FileMsgParamsByURL, FindMessageParams, GetAdvancedHistoryMsgParams, GetGroupMemberByTimeParams, GetGroupMemberParams, GetGroupMessageReaderParams, GetHistoryMsgParams, GetOneConversationParams, ImageMsgParamsByURL,
|
|
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
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';
|
|
4
4
|
import { LoginStatus, MessageReceiveOptType, Platform } from '../types/enum';
|
|
5
5
|
declare class SDK extends Emitter {
|
|
@@ -122,9 +122,8 @@ declare class SDK extends Emitter {
|
|
|
122
122
|
addFriend: <T>(data: AddFriendParams, operationID?: string) => Promise<WsResponse<T>>;
|
|
123
123
|
searchFriends: (data: SearchFriendParams, operationID?: string) => Promise<WsResponse<SearchedFriendsInfo[]>>;
|
|
124
124
|
getSpecifiedFriendsInfo: (data: GetSpecifiedFriendsParams, operationID?: string) => Promise<WsResponse<FriendUserItem[]>>;
|
|
125
|
-
getFriendApplicationListAsRecipient: (
|
|
126
|
-
getFriendApplicationListAsApplicant: (
|
|
127
|
-
getFriendApplicationUnhandledCount: (data: GetSelfUnhandledApplyCountParams, operationID?: string) => Promise<WsResponse<number>>;
|
|
125
|
+
getFriendApplicationListAsRecipient: (operationID?: string) => Promise<WsResponse<FriendApplicationItem[]>>;
|
|
126
|
+
getFriendApplicationListAsApplicant: (operationID?: string) => Promise<WsResponse<FriendApplicationItem[]>>;
|
|
128
127
|
getFriendList: (filterBlack?: boolean, operationID?: string) => Promise<WsResponse<FriendUserItem[]>>;
|
|
129
128
|
getFriendListPage: (data: OffsetParams & {
|
|
130
129
|
filterBlack?: boolean;
|
|
@@ -182,9 +181,8 @@ declare class SDK extends Emitter {
|
|
|
182
181
|
changeGroupMute: <T>(data: ChangeGroupMuteParams, operationID?: string) => Promise<WsResponse<T>>;
|
|
183
182
|
changeGroupMemberMute: <T>(data: ChangeGroupMemberMuteParams, operationID?: string) => Promise<WsResponse<T>>;
|
|
184
183
|
transferGroupOwner: <T>(data: TransferGroupParams, operationID?: string) => Promise<WsResponse<T>>;
|
|
185
|
-
getGroupApplicationListAsApplicant: (
|
|
186
|
-
getGroupApplicationListAsRecipient: (
|
|
187
|
-
getGroupApplicationUnhandledCount: (data: GetSelfUnhandledApplyCountParams, operationID?: string) => Promise<WsResponse<number>>;
|
|
184
|
+
getGroupApplicationListAsApplicant: (operationID?: string) => Promise<WsResponse<GroupApplicationItem[]>>;
|
|
185
|
+
getGroupApplicationListAsRecipient: (operationID?: string) => Promise<WsResponse<GroupApplicationItem[]>>;
|
|
188
186
|
acceptGroupApplication: <T>(data: AccessGroupApplicationParams, operationID?: string) => Promise<WsResponse<T>>;
|
|
189
187
|
refuseGroupApplication: <T>(data: AccessGroupApplicationParams, operationID?: string) => Promise<WsResponse<T>>;
|
|
190
188
|
/**
|
package/lib/types/entity.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CbEvents } from '../constant';
|
|
2
|
-
import { GroupType, SessionType, MessageType, Platform, MessageStatus, GroupStatus, GroupVerificationType, AllowType, GroupJoinSource, GroupMemberRole, MessageReceiveOptType, GroupAtType, LogLevel, ApplicationHandleResult, Relationship, OnlineState
|
|
2
|
+
import { GroupType, SessionType, MessageType, Platform, MessageStatus, GroupStatus, GroupVerificationType, AllowType, GroupJoinSource, GroupMemberRole, MessageReceiveOptType, GroupAtType, LogLevel, ApplicationHandleResult, Relationship, OnlineState } from './enum';
|
|
3
3
|
export declare type WSEvent<T = unknown> = {
|
|
4
4
|
event: CbEvents;
|
|
5
5
|
data: T;
|
|
@@ -95,7 +95,6 @@ export declare type SelfUserInfo = {
|
|
|
95
95
|
nickname: string;
|
|
96
96
|
userID: string;
|
|
97
97
|
globalRecvMsgOpt: MessageReceiveOptType;
|
|
98
|
-
addFriendPermission: AddFriendPermission;
|
|
99
98
|
};
|
|
100
99
|
export declare type PartialUserInfo = {
|
|
101
100
|
userID: string;
|
package/lib/types/enum.d.ts
CHANGED
|
@@ -3,11 +3,6 @@ export declare enum MessageReceiveOptType {
|
|
|
3
3
|
NotReceive = 1,
|
|
4
4
|
NotNotify = 2
|
|
5
5
|
}
|
|
6
|
-
export declare enum AddFriendPermission {
|
|
7
|
-
AddFriendAllowed = 0,
|
|
8
|
-
AddFriendAllowedNoReview = 1,
|
|
9
|
-
AddFriendDenied = 2
|
|
10
|
-
}
|
|
11
6
|
export declare enum AllowType {
|
|
12
7
|
Allowed = 0,
|
|
13
8
|
NotAllowed = 1
|
package/lib/types/params.d.ts
CHANGED
|
@@ -405,24 +405,3 @@ export declare type SetConversationMsgDestructTimeParams = {
|
|
|
405
405
|
conversationID: string;
|
|
406
406
|
msgDestructTime: number;
|
|
407
407
|
};
|
|
408
|
-
export declare type GetGroupApplicationListParams = {
|
|
409
|
-
groupID: string[];
|
|
410
|
-
handleResults: number[];
|
|
411
|
-
offset: number;
|
|
412
|
-
count: number;
|
|
413
|
-
};
|
|
414
|
-
export declare type GetFriendApplicationListAsRecipientParams = {
|
|
415
|
-
handleResults: number[];
|
|
416
|
-
offset: number;
|
|
417
|
-
count: number;
|
|
418
|
-
};
|
|
419
|
-
export declare type GetFriendApplicationListAsApplicationParams = {
|
|
420
|
-
offset: number;
|
|
421
|
-
count: number;
|
|
422
|
-
};
|
|
423
|
-
export declare type GetFriendApplicationUnhandledCountParams = {
|
|
424
|
-
time: number;
|
|
425
|
-
};
|
|
426
|
-
export declare type GetSelfUnhandledApplyCountParams = {
|
|
427
|
-
time: number;
|
|
428
|
-
};
|