@inter-digital/wasm-client-sdk 3.8.4-patch.21 → 3.8.4-patch.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 +17 -0
- package/lib/index.js +17 -0
- package/lib/index.umd.js +17 -0
- package/lib/sdk/index.d.ts +4 -2
- package/lib/types/entity.d.ts +7 -0
- package/lib/types/params.d.ts +8 -0
- package/package.json +1 -1
package/lib/index.es.js
CHANGED
|
@@ -1243,6 +1243,7 @@ class SDK extends Emitter {
|
|
|
1243
1243
|
platformID: params.platformID,
|
|
1244
1244
|
apiAddr: params.apiAddr,
|
|
1245
1245
|
wsAddr: params.wsAddr,
|
|
1246
|
+
chatAddr: params.chatAddr || '',
|
|
1246
1247
|
dataDir: './',
|
|
1247
1248
|
logLevel: params.logLevel || 5,
|
|
1248
1249
|
isLogStandardOutput: (_a = params.isLogStandardOutput) !== null && _a !== void 0 ? _a : this.isLogStandardOutput,
|
|
@@ -1423,6 +1424,22 @@ class SDK extends Emitter {
|
|
|
1423
1424
|
params.localEx,
|
|
1424
1425
|
]);
|
|
1425
1426
|
};
|
|
1427
|
+
this.translateMessage = (params, operationID = v4()) => {
|
|
1428
|
+
var _a;
|
|
1429
|
+
return this._invoker('translateMessage', window.translateMessage, [
|
|
1430
|
+
operationID,
|
|
1431
|
+
params.conversationID,
|
|
1432
|
+
params.clientMsgID,
|
|
1433
|
+
params.targetLang,
|
|
1434
|
+
(_a = params.sourceLang) !== null && _a !== void 0 ? _a : '',
|
|
1435
|
+
]);
|
|
1436
|
+
};
|
|
1437
|
+
this.setChatToken = (chatToken, operationID = v4()) => {
|
|
1438
|
+
return this._invoker('setChatToken', window.setChatToken, [
|
|
1439
|
+
operationID,
|
|
1440
|
+
chatToken,
|
|
1441
|
+
]);
|
|
1442
|
+
};
|
|
1426
1443
|
this.getHistoryMessageListReverse = (params, operationID = v4()) => {
|
|
1427
1444
|
return this._invoker('getHistoryMessageListReverse', window.getHistoryMessageListReverse, [operationID, JSON.stringify(params)]);
|
|
1428
1445
|
};
|
package/lib/index.js
CHANGED
|
@@ -1247,6 +1247,7 @@ class SDK extends Emitter {
|
|
|
1247
1247
|
platformID: params.platformID,
|
|
1248
1248
|
apiAddr: params.apiAddr,
|
|
1249
1249
|
wsAddr: params.wsAddr,
|
|
1250
|
+
chatAddr: params.chatAddr || '',
|
|
1250
1251
|
dataDir: './',
|
|
1251
1252
|
logLevel: params.logLevel || 5,
|
|
1252
1253
|
isLogStandardOutput: (_a = params.isLogStandardOutput) !== null && _a !== void 0 ? _a : this.isLogStandardOutput,
|
|
@@ -1427,6 +1428,22 @@ class SDK extends Emitter {
|
|
|
1427
1428
|
params.localEx,
|
|
1428
1429
|
]);
|
|
1429
1430
|
};
|
|
1431
|
+
this.translateMessage = (params, operationID = v4()) => {
|
|
1432
|
+
var _a;
|
|
1433
|
+
return this._invoker('translateMessage', window.translateMessage, [
|
|
1434
|
+
operationID,
|
|
1435
|
+
params.conversationID,
|
|
1436
|
+
params.clientMsgID,
|
|
1437
|
+
params.targetLang,
|
|
1438
|
+
(_a = params.sourceLang) !== null && _a !== void 0 ? _a : '',
|
|
1439
|
+
]);
|
|
1440
|
+
};
|
|
1441
|
+
this.setChatToken = (chatToken, operationID = v4()) => {
|
|
1442
|
+
return this._invoker('setChatToken', window.setChatToken, [
|
|
1443
|
+
operationID,
|
|
1444
|
+
chatToken,
|
|
1445
|
+
]);
|
|
1446
|
+
};
|
|
1430
1447
|
this.getHistoryMessageListReverse = (params, operationID = v4()) => {
|
|
1431
1448
|
return this._invoker('getHistoryMessageListReverse', window.getHistoryMessageListReverse, [operationID, JSON.stringify(params)]);
|
|
1432
1449
|
};
|
package/lib/index.umd.js
CHANGED
|
@@ -1249,6 +1249,7 @@
|
|
|
1249
1249
|
platformID: params.platformID,
|
|
1250
1250
|
apiAddr: params.apiAddr,
|
|
1251
1251
|
wsAddr: params.wsAddr,
|
|
1252
|
+
chatAddr: params.chatAddr || '',
|
|
1252
1253
|
dataDir: './',
|
|
1253
1254
|
logLevel: params.logLevel || 5,
|
|
1254
1255
|
isLogStandardOutput: (_a = params.isLogStandardOutput) !== null && _a !== void 0 ? _a : this.isLogStandardOutput,
|
|
@@ -1429,6 +1430,22 @@
|
|
|
1429
1430
|
params.localEx,
|
|
1430
1431
|
]);
|
|
1431
1432
|
};
|
|
1433
|
+
this.translateMessage = (params, operationID = v4()) => {
|
|
1434
|
+
var _a;
|
|
1435
|
+
return this._invoker('translateMessage', window.translateMessage, [
|
|
1436
|
+
operationID,
|
|
1437
|
+
params.conversationID,
|
|
1438
|
+
params.clientMsgID,
|
|
1439
|
+
params.targetLang,
|
|
1440
|
+
(_a = params.sourceLang) !== null && _a !== void 0 ? _a : '',
|
|
1441
|
+
]);
|
|
1442
|
+
};
|
|
1443
|
+
this.setChatToken = (chatToken, operationID = v4()) => {
|
|
1444
|
+
return this._invoker('setChatToken', window.setChatToken, [
|
|
1445
|
+
operationID,
|
|
1446
|
+
chatToken,
|
|
1447
|
+
]);
|
|
1448
|
+
};
|
|
1432
1449
|
this.getHistoryMessageListReverse = (params, operationID = v4()) => {
|
|
1433
1450
|
return this._invoker('getHistoryMessageListReverse', window.getHistoryMessageListReverse, [operationID, JSON.stringify(params)]);
|
|
1434
1451
|
};
|
package/lib/sdk/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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, 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, type MsgPinInfo, SetMsgPinInfo, GetMsgPinInfo } from '../types/entity';
|
|
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, TranslateMessageParams } 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, TranslateResult, 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;
|
|
@@ -40,6 +40,8 @@ declare class SDK extends Emitter {
|
|
|
40
40
|
sendMessage: (params: SendMsgParams, operationID?: string) => Promise<WsResponse<MessageItem>>;
|
|
41
41
|
sendMessageNotOss: (params: SendMsgParams, operationID?: string) => Promise<WsResponse<MessageItem>>;
|
|
42
42
|
setMessageLocalEx: <T>(params: SetMessageLocalExParams, operationID?: string) => Promise<WsResponse<T>>;
|
|
43
|
+
translateMessage: (params: TranslateMessageParams, operationID?: string) => Promise<WsResponse<TranslateResult>>;
|
|
44
|
+
setChatToken: (chatToken: string, operationID?: string) => Promise<WsResponse<unknown>>;
|
|
43
45
|
exportDB(operationID?: string): Promise<WsResponse<unknown>>;
|
|
44
46
|
getHistoryMessageListReverse: (params: GetHistoryMsgParams, operationID?: string) => Promise<WsResponse<AdvancedGetMessageResult>>;
|
|
45
47
|
revokeMessage: <T>(data: AccessMessageParams, operationID?: string) => Promise<WsResponse<T>>;
|
package/lib/types/entity.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare type IMConfig = {
|
|
|
18
18
|
platformID: Platform;
|
|
19
19
|
apiAddr: string;
|
|
20
20
|
wsAddr: string;
|
|
21
|
+
chatAddr: string;
|
|
21
22
|
dataDir: string;
|
|
22
23
|
logLevel: LogLevel;
|
|
23
24
|
isLogStandardOutput: boolean;
|
|
@@ -478,3 +479,9 @@ export declare type SetMsgPinInfo = {
|
|
|
478
479
|
export declare type GetMsgPinInfo = {
|
|
479
480
|
conversationID: string;
|
|
480
481
|
};
|
|
482
|
+
export declare type TranslateResult = {
|
|
483
|
+
clientMsgID: string;
|
|
484
|
+
translatedText: string;
|
|
485
|
+
detectedLang: string;
|
|
486
|
+
targetLang: string;
|
|
487
|
+
};
|
package/lib/types/params.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare type InitConfig = {
|
|
|
9
9
|
platformID: number;
|
|
10
10
|
apiAddr: string;
|
|
11
11
|
wsAddr: string;
|
|
12
|
+
chatAddr?: string;
|
|
12
13
|
logLevel?: LogLevel;
|
|
13
14
|
isLogStandardOutput?: boolean;
|
|
14
15
|
isExternalExtensions?: boolean;
|
|
@@ -28,6 +29,7 @@ export declare type InitAndLoginConfig = {
|
|
|
28
29
|
platformID: number;
|
|
29
30
|
apiAddr: string;
|
|
30
31
|
wsAddr: string;
|
|
32
|
+
chatAddr?: string;
|
|
31
33
|
logLevel?: LogLevel;
|
|
32
34
|
isLogStandardOutput?: boolean;
|
|
33
35
|
isExternalExtensions?: boolean;
|
|
@@ -89,6 +91,12 @@ export declare type SetMessageLocalExParams = {
|
|
|
89
91
|
clientMsgID: string;
|
|
90
92
|
localEx: string;
|
|
91
93
|
};
|
|
94
|
+
export declare type TranslateMessageParams = {
|
|
95
|
+
conversationID: string;
|
|
96
|
+
clientMsgID: string;
|
|
97
|
+
targetLang: string;
|
|
98
|
+
sourceLang?: string;
|
|
99
|
+
};
|
|
92
100
|
export declare type ImageMsgParamsByURL = {
|
|
93
101
|
sourcePicture: PicBaseInfo;
|
|
94
102
|
bigPicture: PicBaseInfo;
|