|
@@ -1116,6 +1116,39 @@ class LiveData {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+class VideoDeviceOutputInfo {
|
|
|
+ String? videoDeviceId;
|
|
|
+ VideoDeviceSourceTypeEnum videoDeviceSourceType;
|
|
|
+ int outputWidth;
|
|
|
+ int outputHeight;
|
|
|
+
|
|
|
+ VideoDeviceOutputInfo({
|
|
|
+ this.videoDeviceId,
|
|
|
+ this.videoDeviceSourceType = VideoDeviceSourceTypeEnum.Desktop,
|
|
|
+ this.outputWidth = 0,
|
|
|
+ this.outputHeight = 0,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory VideoDeviceOutputInfo.fromJson(Map<String, dynamic> map) {
|
|
|
+ return VideoDeviceOutputInfo(
|
|
|
+ videoDeviceId: map['VideoDeviceId'],
|
|
|
+ videoDeviceSourceType: VideoDeviceSourceTypeEnum.values.firstWhere((e) => e.index == map['VideoDeviceSourceType']),
|
|
|
+ outputWidth: map['OutputWidth'],
|
|
|
+ outputHeight: map['OutputHeight'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ if(videoDeviceId != null)
|
|
|
+ map['VideoDeviceId'] = videoDeviceId;
|
|
|
+ map['VideoDeviceSourceType'] = videoDeviceSourceType.index;
|
|
|
+ map['OutputWidth'] = outputWidth;
|
|
|
+ map['OutputHeight'] = outputHeight;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
class LiveConsultationMember {
|
|
|
String? id;
|
|
|
String? name;
|
|
@@ -1130,6 +1163,10 @@ class LiveConsultationMember {
|
|
|
String? loginServerUrl;
|
|
|
LoginSource loginSource;
|
|
|
LiveData? liveData;
|
|
|
+ bool mergedChannel;
|
|
|
+ int mergedVideoOutputWidth;
|
|
|
+ int mergedVideoOutputHeight;
|
|
|
+ List<VideoDeviceOutputInfo >? videoDeviceInfos;
|
|
|
|
|
|
LiveConsultationMember({
|
|
|
this.id,
|
|
@@ -1145,6 +1182,10 @@ class LiveConsultationMember {
|
|
|
this.loginServerUrl,
|
|
|
this.loginSource = LoginSource.PC,
|
|
|
this.liveData,
|
|
|
+ this.mergedChannel = false,
|
|
|
+ this.mergedVideoOutputWidth = 0,
|
|
|
+ this.mergedVideoOutputHeight = 0,
|
|
|
+ this.videoDeviceInfos,
|
|
|
});
|
|
|
|
|
|
factory LiveConsultationMember.fromJson(Map<String, dynamic> map) {
|
|
@@ -1162,6 +1203,10 @@ class LiveConsultationMember {
|
|
|
loginServerUrl: map['LoginServerUrl'],
|
|
|
loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
|
|
|
liveData: map['LiveData'] != null ? LiveData.fromJson(map['LiveData']) : null,
|
|
|
+ mergedChannel: map['MergedChannel'],
|
|
|
+ mergedVideoOutputWidth: map['MergedVideoOutputWidth'],
|
|
|
+ mergedVideoOutputHeight: map['MergedVideoOutputHeight'],
|
|
|
+ videoDeviceInfos: map['VideoDeviceInfos'] != null ? (map['VideoDeviceInfos'] as List).map((e)=>VideoDeviceOutputInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -1185,6 +1230,11 @@ class LiveConsultationMember {
|
|
|
map['LoginSource'] = loginSource.index;
|
|
|
if(liveData != null)
|
|
|
map['LiveData'] = liveData;
|
|
|
+ map['MergedChannel'] = mergedChannel;
|
|
|
+ map['MergedVideoOutputWidth'] = mergedVideoOutputWidth;
|
|
|
+ map['MergedVideoOutputHeight'] = mergedVideoOutputHeight;
|
|
|
+ if(videoDeviceInfos != null)
|
|
|
+ map['VideoDeviceInfos'] = videoDeviceInfos;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -1195,8 +1245,7 @@ class InitiateLiveConsultationResult {
|
|
|
int roomNo;
|
|
|
int appId;
|
|
|
String? userSign;
|
|
|
- List<LiveConsultationMember >? userLiveDatas;
|
|
|
- List<LiveConsultationMember >? deviceLiveDatas;
|
|
|
+ List<LiveConsultationMember >? memberLiveDatas;
|
|
|
|
|
|
InitiateLiveConsultationResult({
|
|
|
this.consultationCode,
|
|
@@ -1204,8 +1253,7 @@ class InitiateLiveConsultationResult {
|
|
|
this.roomNo = 0,
|
|
|
this.appId = 0,
|
|
|
this.userSign,
|
|
|
- this.userLiveDatas,
|
|
|
- this.deviceLiveDatas,
|
|
|
+ this.memberLiveDatas,
|
|
|
});
|
|
|
|
|
|
factory InitiateLiveConsultationResult.fromJson(Map<String, dynamic> map) {
|
|
@@ -1215,8 +1263,7 @@ class InitiateLiveConsultationResult {
|
|
|
roomNo: map['RoomNo'],
|
|
|
appId: map['AppId'],
|
|
|
userSign: map['UserSign'],
|
|
|
- userLiveDatas: map['UserLiveDatas'] != null ? (map['UserLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
- deviceLiveDatas: map['DeviceLiveDatas'] != null ? (map['DeviceLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
+ memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -1230,10 +1277,8 @@ class InitiateLiveConsultationResult {
|
|
|
map['AppId'] = appId;
|
|
|
if(userSign != null)
|
|
|
map['UserSign'] = userSign;
|
|
|
- if(userLiveDatas != null)
|
|
|
- map['UserLiveDatas'] = userLiveDatas;
|
|
|
- if(deviceLiveDatas != null)
|
|
|
- map['DeviceLiveDatas'] = deviceLiveDatas;
|
|
|
+ if(memberLiveDatas != null)
|
|
|
+ map['MemberLiveDatas'] = memberLiveDatas;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -1422,16 +1467,28 @@ class CancelLiveConsultationRequest extends TokenRequest{
|
|
|
class AcceptLiveConsultationResult {
|
|
|
String? consultationCode;
|
|
|
String? userCode;
|
|
|
+ int roomNo;
|
|
|
+ int appId;
|
|
|
+ String? userSign;
|
|
|
+ List<LiveConsultationMember >? memberLiveDatas;
|
|
|
|
|
|
AcceptLiveConsultationResult({
|
|
|
this.consultationCode,
|
|
|
this.userCode,
|
|
|
+ this.roomNo = 0,
|
|
|
+ this.appId = 0,
|
|
|
+ this.userSign,
|
|
|
+ this.memberLiveDatas,
|
|
|
});
|
|
|
|
|
|
factory AcceptLiveConsultationResult.fromJson(Map<String, dynamic> map) {
|
|
|
return AcceptLiveConsultationResult(
|
|
|
consultationCode: map['ConsultationCode'],
|
|
|
userCode: map['UserCode'],
|
|
|
+ roomNo: map['RoomNo'],
|
|
|
+ appId: map['AppId'],
|
|
|
+ userSign: map['UserSign'],
|
|
|
+ memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -1441,6 +1498,12 @@ class AcceptLiveConsultationResult {
|
|
|
map['ConsultationCode'] = consultationCode;
|
|
|
if(userCode != null)
|
|
|
map['UserCode'] = userCode;
|
|
|
+ map['RoomNo'] = roomNo;
|
|
|
+ map['AppId'] = appId;
|
|
|
+ if(userSign != null)
|
|
|
+ map['UserSign'] = userSign;
|
|
|
+ if(memberLiveDatas != null)
|
|
|
+ map['MemberLiveDatas'] = memberLiveDatas;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -2301,4 +2364,127 @@ class AcceptInvitationRequest extends TokenRequest{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+enum SyncTypeEnum {
|
|
|
+ InitiateLiveConsultation,
|
|
|
+ AcceptLiveConsultation,
|
|
|
+ RejectLiveConsultation,
|
|
|
+}
|
|
|
+
|
|
|
+enum MongoDBActionTypeEnum {
|
|
|
+ InsertOne,
|
|
|
+ InsertOneAsync,
|
|
|
+ InsertMany,
|
|
|
+ InsertManyAsync,
|
|
|
+ DeleteOne,
|
|
|
+ DeleteOneAsync,
|
|
|
+ DeleteMany,
|
|
|
+ DeleteManyAsync,
|
|
|
+ FindOneAndDelete,
|
|
|
+ FindOneAndDeleteAsync,
|
|
|
+ ReplaceOne,
|
|
|
+ ReplaceOneAsync,
|
|
|
+ FindOneAndReplace,
|
|
|
+ FindOneAndReplaceAsync,
|
|
|
+ UpdateOne,
|
|
|
+ UpdateOneAsync,
|
|
|
+ UpdateMany,
|
|
|
+ UpdateManyAsync,
|
|
|
+ FindOneAndUpdate,
|
|
|
+ FindOneAndUpdateAsync,
|
|
|
+}
|
|
|
+
|
|
|
+class OperationLogDTO {
|
|
|
+ int id;
|
|
|
+ String? collectionName;
|
|
|
+ MongoDBActionTypeEnum actionType;
|
|
|
+ String? bsonContent;
|
|
|
+ String? filterContent;
|
|
|
+ DateTime? createTime;
|
|
|
+ String? code;
|
|
|
+ String? sourceUrl;
|
|
|
+
|
|
|
+ OperationLogDTO({
|
|
|
+ this.id = 0,
|
|
|
+ this.collectionName,
|
|
|
+ this.actionType = MongoDBActionTypeEnum.InsertOne,
|
|
|
+ this.bsonContent,
|
|
|
+ this.filterContent,
|
|
|
+ this.createTime,
|
|
|
+ this.code,
|
|
|
+ this.sourceUrl,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory OperationLogDTO.fromJson(Map<String, dynamic> map) {
|
|
|
+ return OperationLogDTO(
|
|
|
+ id: map['Id'],
|
|
|
+ collectionName: map['CollectionName'],
|
|
|
+ actionType: MongoDBActionTypeEnum.values.firstWhere((e) => e.index == map['ActionType']),
|
|
|
+ bsonContent: map['BsonContent'],
|
|
|
+ filterContent: map['FilterContent'],
|
|
|
+ createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
|
|
|
+ code: map['Code'],
|
|
|
+ sourceUrl: map['SourceUrl'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ map['Id'] = id;
|
|
|
+ if(collectionName != null)
|
|
|
+ map['CollectionName'] = collectionName;
|
|
|
+ map['ActionType'] = actionType.index;
|
|
|
+ if(bsonContent != null)
|
|
|
+ map['BsonContent'] = bsonContent;
|
|
|
+ if(filterContent != null)
|
|
|
+ map['FilterContent'] = filterContent;
|
|
|
+ if(createTime != null)
|
|
|
+ map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
|
|
|
+ if(code != null)
|
|
|
+ map['Code'] = code;
|
|
|
+ if(sourceUrl != null)
|
|
|
+ map['SourceUrl'] = sourceUrl;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class SyncReceiveServiceDataRequest {
|
|
|
+ SyncTypeEnum syncType;
|
|
|
+ String? serviceDataJson;
|
|
|
+ List<OperationLogDTO >? oplogs;
|
|
|
+ String? sourceUrl;
|
|
|
+ String? serverID;
|
|
|
+
|
|
|
+ SyncReceiveServiceDataRequest({
|
|
|
+ this.syncType = SyncTypeEnum.InitiateLiveConsultation,
|
|
|
+ this.serviceDataJson,
|
|
|
+ this.oplogs,
|
|
|
+ this.sourceUrl,
|
|
|
+ this.serverID,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory SyncReceiveServiceDataRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return SyncReceiveServiceDataRequest(
|
|
|
+ syncType: SyncTypeEnum.values.firstWhere((e) => e.index == map['SyncType']),
|
|
|
+ serviceDataJson: map['ServiceDataJson'],
|
|
|
+ oplogs: map['Oplogs'] != null ? (map['Oplogs'] as List).map((e)=>OperationLogDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
+ sourceUrl: map['SourceUrl'],
|
|
|
+ serverID: map['ServerID'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ map['SyncType'] = syncType.index;
|
|
|
+ if(serviceDataJson != null)
|
|
|
+ map['ServiceDataJson'] = serviceDataJson;
|
|
|
+ if(oplogs != null)
|
|
|
+ map['Oplogs'] = oplogs;
|
|
|
+ if(sourceUrl != null)
|
|
|
+ map['SourceUrl'] = sourceUrl;
|
|
|
+ if(serverID != null)
|
|
|
+ map['ServerID'] = serverID;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
|