Browse Source

同步Server最新接口

loki.wu 2 years ago
parent
commit
4e233b5da1

+ 3 - 0
lib/rpc.dart

@@ -116,6 +116,9 @@ class JsonRpcProxy {
 	StorageService get storage =>
 	findService(() => new StorageService(currentHostAddress));
 
+	UpgradeService get upgrade =>
+	findService(() => new UpgradeService(currentHostAddress));
+
 	UserService get user =>
 	findService(() => new UserService(currentHostAddress));
 

+ 12 - 0
lib/services/aIDiagnosis.m.dart

@@ -97,6 +97,13 @@ enum DiagnosisDescriptionEnum {
 	Margin,
 	Calcification,
 	LesionSize,
+	ThyroidEchoPattern,
+	ThyroidShape,
+	ThyroidMargin,
+	ThyroidEchogenicFoci,
+	LiverShape,
+	LiverBoundary,
+	LiverEchoTexture,
 }
 
 class AIDiagnosisDescription {
@@ -387,9 +394,11 @@ class DiagnosisImageResult {
 
 class DiagnosisImageRequest extends TokenRequest{
 	String? fileToken;
+	String? relationCode;
 
 	DiagnosisImageRequest({
 		this.fileToken,
+		this.relationCode,
 		String? token,
 	}) : super(
 			token: token,
@@ -398,6 +407,7 @@ class DiagnosisImageRequest extends TokenRequest{
 	factory DiagnosisImageRequest.fromJson(Map<String, dynamic> map) {
 		return DiagnosisImageRequest( 
 			fileToken: map['FileToken'],
+			relationCode: map['RelationCode'],
 			token: map['Token'],
 		);
 	}
@@ -406,6 +416,8 @@ class DiagnosisImageRequest extends TokenRequest{
 		final map = super.toJson();
 		if(fileToken != null)
 			map['FileToken'] = fileToken;
+		if(relationCode != null)
+			map['RelationCode'] = relationCode;
 		return map;
 	}
 }

+ 4 - 0
lib/services/device.m.dart

@@ -815,6 +815,7 @@ class DeviceServerSettingResult {
 	String? notificationUrl;
 	bool mergedChannel;
 	int liveConsultationRateSeconds;
+	bool isSelfRtcService;
 
 	DeviceServerSettingResult({
 		this.serverConfigList,
@@ -824,6 +825,7 @@ class DeviceServerSettingResult {
 		this.notificationUrl,
 		this.mergedChannel = false,
 		this.liveConsultationRateSeconds = 0,
+		this.isSelfRtcService = false,
 	});
 
 	factory DeviceServerSettingResult.fromJson(Map<String, dynamic> map) {
@@ -835,6 +837,7 @@ class DeviceServerSettingResult {
 			notificationUrl: map['NotificationUrl'],
 			mergedChannel: map['MergedChannel'],
 			liveConsultationRateSeconds: map['LiveConsultationRateSeconds'],
+			isSelfRtcService: map['IsSelfRtcService'],
 		);
 	}
 
@@ -849,6 +852,7 @@ class DeviceServerSettingResult {
 			map['NotificationUrl'] = notificationUrl;
 		map['MergedChannel'] = mergedChannel;
 		map['LiveConsultationRateSeconds'] = liveConsultationRateSeconds;
+		map['IsSelfRtcService'] = isSelfRtcService;
 		return map;
 	}
 }

+ 2 - 0
lib/services/index.dart

@@ -22,6 +22,7 @@ export 'report.dart';
 export 'role.dart';
 export 'sMS.dart';
 export 'storage.dart';
+export 'upgrade.dart';
 export 'user.dart';
 export 'vinnoServer.dart';
 export 'aIDiagnosis.m.dart';
@@ -47,5 +48,6 @@ export 'remedical.m.dart';
 export 'report.m.dart';
 export 'role.m.dart';
 export 'storage.m.dart';
+export 'upgrade.m.dart';
 export 'user.m.dart';
 export 'vinnoServer.m.dart';

+ 85 - 0
lib/services/notification.m.dart

@@ -59,6 +59,9 @@ enum NotificationTypeEnum {
 	CloseConsultationDueToChangeNotification,
 	CloseConsultationDueToChangeToDeviceNotification,
 	CourseStatusNotification,
+	UpgradeNotification,
+	EducationReStartNotification,
+	ConsultationReStartNotification,
 }
 
 class NotificationDTO {
@@ -683,6 +686,72 @@ class CourseStatusNotification extends NotificationDTO{
 	}
 }
 
+enum UpgradeTypeEnum {
+	NoUpgrade,
+	Normal,
+	Force,
+	AutoAfterRestart,
+}
+
+enum UpgradeUpdateTypeEnum {
+	Part,
+	All,
+}
+
+class UpgradeNotification extends NotificationDTO{
+	UpgradeTypeEnum upgadeType;
+	String? upgradeCDNUrl;
+	String? upgradeUrl;
+	UpgradeUpdateTypeEnum upgradeUpdateType;
+	String? newVersion;
+	String? description;
+
+	UpgradeNotification({
+		NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
+		this.upgadeType = UpgradeTypeEnum.NoUpgrade,
+		this.upgradeCDNUrl,
+		this.upgradeUrl,
+		this.upgradeUpdateType = UpgradeUpdateTypeEnum.Part,
+		this.newVersion,
+		this.description,
+		String? code,
+		bool isResponse = false,
+	}) : super(
+			notificationType: notificationType,
+			code: code,
+			isResponse: isResponse,
+		);
+
+	factory UpgradeNotification.fromJson(Map<String, dynamic> map) {
+		return UpgradeNotification( 
+			notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
+			upgadeType: UpgradeTypeEnum.values.firstWhere((e) => e.index == map['UpgadeType']),
+			upgradeCDNUrl: map['UpgradeCDNUrl'],
+			upgradeUrl: map['UpgradeUrl'],
+			upgradeUpdateType: UpgradeUpdateTypeEnum.values.firstWhere((e) => e.index == map['UpgradeUpdateType']),
+			newVersion: map['NewVersion'],
+			description: map['Description'],
+			code: map['Code'],
+			isResponse: map['IsResponse'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		map['UpgadeType'] = upgadeType.index;
+		if(upgradeCDNUrl != null)
+			map['UpgradeCDNUrl'] = upgradeCDNUrl;
+		if(upgradeUrl != null)
+			map['UpgradeUrl'] = upgradeUrl;
+		map['UpgradeUpdateType'] = upgradeUpdateType.index;
+		if(newVersion != null)
+			map['NewVersion'] = newVersion;
+		if(description != null)
+			map['Description'] = description;
+		return map;
+	}
+}
+
 class ApplyConsultationNotification extends NotificationDTO{
 	String? consultationCode;
 	String? operatorName;
@@ -1363,6 +1432,8 @@ class LiveCourseMember {
 	bool mute;
 	bool videoOpend;
 	bool isTeacher;
+	bool isExpertUser;
+	bool isAssistantUser;
 	bool isBusy;
 	StudentCourseStatusEnum status;
 	String? loginServerUrl;
@@ -1385,6 +1456,8 @@ class LiveCourseMember {
 		this.mute = false,
 		this.videoOpend = false,
 		this.isTeacher = false,
+		this.isExpertUser = false,
+		this.isAssistantUser = false,
 		this.isBusy = false,
 		this.status = StudentCourseStatusEnum.All,
 		this.loginServerUrl,
@@ -1409,6 +1482,8 @@ class LiveCourseMember {
 			mute: map['Mute'],
 			videoOpend: map['VideoOpend'],
 			isTeacher: map['IsTeacher'],
+			isExpertUser: map['IsExpertUser'],
+			isAssistantUser: map['IsAssistantUser'],
 			isBusy: map['IsBusy'],
 			status: StudentCourseStatusEnum.values.firstWhere((e) => e.index == map['Status']),
 			loginServerUrl: map['LoginServerUrl'],
@@ -1437,6 +1512,8 @@ class LiveCourseMember {
 		map['Mute'] = mute;
 		map['VideoOpend'] = videoOpend;
 		map['IsTeacher'] = isTeacher;
+		map['IsExpertUser'] = isExpertUser;
+		map['IsAssistantUser'] = isAssistantUser;
 		map['IsBusy'] = isBusy;
 		map['Status'] = status.index;
 		if(loginServerUrl != null)
@@ -1543,6 +1620,8 @@ class LiveMemberDTO {
 	bool mute;
 	bool videoOpend;
 	bool isInitiator;
+	bool isExpertUser;
+	bool isAssistantUser;
 	bool isBusy;
 	LiveMemberStatusEnum status;
 	String? loginServerUrl;
@@ -1563,6 +1642,8 @@ class LiveMemberDTO {
 		this.mute = false,
 		this.videoOpend = false,
 		this.isInitiator = false,
+		this.isExpertUser = false,
+		this.isAssistantUser = false,
 		this.isBusy = false,
 		this.status = LiveMemberStatusEnum.Default,
 		this.loginServerUrl,
@@ -1585,6 +1666,8 @@ class LiveMemberDTO {
 			mute: map['Mute'],
 			videoOpend: map['VideoOpend'],
 			isInitiator: map['IsInitiator'],
+			isExpertUser: map['IsExpertUser'],
+			isAssistantUser: map['IsAssistantUser'],
 			isBusy: map['IsBusy'],
 			status: LiveMemberStatusEnum.values.firstWhere((e) => e.index == map['Status']),
 			loginServerUrl: map['LoginServerUrl'],
@@ -1611,6 +1694,8 @@ class LiveMemberDTO {
 		map['Mute'] = mute;
 		map['VideoOpend'] = videoOpend;
 		map['IsInitiator'] = isInitiator;
+		map['IsExpertUser'] = isExpertUser;
+		map['IsAssistantUser'] = isAssistantUser;
 		map['IsBusy'] = isBusy;
 		map['Status'] = status.index;
 		if(loginServerUrl != null)

+ 3 - 0
lib/services/notificationdecoder.dart

@@ -49,6 +49,9 @@ class NotificationDecoder {
 		_builders.add(NotificationTypeEnum.CourseStatusNotification,
 				(map) => CourseStatusNotification.fromJson(map));
 
+		_builders.add(NotificationTypeEnum.UpgradeNotification,
+				(map) => UpgradeNotification.fromJson(map));
+
 		_builders.add(NotificationTypeEnum.ApplyConsultationNotification,
 				(map) => ApplyConsultationNotification.fromJson(map));
 

+ 4 - 0
lib/services/organization.m.dart

@@ -745,6 +745,7 @@ class ServerSettingResult {
 	String? notificationUrl;
 	int liveConsultationRateSeconds;
 	String? cMSUrl;
+	bool isSelfRtcService;
 
 	ServerSettingResult({
 		this.serverLangugeList,
@@ -754,6 +755,7 @@ class ServerSettingResult {
 		this.notificationUrl,
 		this.liveConsultationRateSeconds = 0,
 		this.cMSUrl,
+		this.isSelfRtcService = false,
 	});
 
 	factory ServerSettingResult.fromJson(Map<String, dynamic> map) {
@@ -765,6 +767,7 @@ class ServerSettingResult {
 			notificationUrl: map['NotificationUrl'],
 			liveConsultationRateSeconds: map['LiveConsultationRateSeconds'],
 			cMSUrl: map['CMSUrl'],
+			isSelfRtcService: map['IsSelfRtcService'],
 		);
 	}
 
@@ -781,6 +784,7 @@ class ServerSettingResult {
 		map['LiveConsultationRateSeconds'] = liveConsultationRateSeconds;
 		if(cMSUrl != null)
 			map['CMSUrl'] = cMSUrl;
+		map['IsSelfRtcService'] = isSelfRtcService;
 		return map;
 	}
 }

+ 126 - 6
lib/services/other.m.dart

@@ -1,5 +1,6 @@
 import 'authentication.m.dart';
 import 'notification.m.dart';
+import 'upgrade.m.dart';
 import 'user.m.dart';
 import 'liveConsultation.m.dart';
 import 'patient.m.dart';
@@ -708,9 +709,74 @@ class ChangeLiveStatusRequest {
 	}
 }
 
+class ICollection<T> {
+	int count;
+	bool isReadOnly;
+
+	ICollection({
+		this.count = 0,
+		this.isReadOnly = false,
+	});
+
+	factory ICollection.fromJson(Map<String, dynamic> map) {
+		return ICollection( 
+			count: map['Count'],
+			isReadOnly: map['IsReadOnly'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		map['Count'] = count;
+		map['IsReadOnly'] = isReadOnly;
+		return map;
+	}
+}
+
+class IDictionary<T> {
+	List<T>? item;
+	ICollection<T>? keys;
+	ICollection<List<String>>? values;
+
+	IDictionary({
+		this.item,
+		this.keys,
+		this.values,
+	});
+
+	factory IDictionary.fromJson(Map<String, dynamic> map) {
+		List<T> itemList = [];
+		if (map['Item'] != null) {
+			itemList.addAll(
+					(map['Item'] as List).map((e) => FJsonConvert.fromJson<T>(e)!));
+		}
+		List<T> keysList = [];
+		if (map['Keys'] != null) {
+			keysList.addAll(
+					(map['Keys'] as List).map((e) => FJsonConvert.fromJson<T>(e)!));
+		}
+		return IDictionary( 
+			item: itemList,
+			keys: keysList,
+			values: map['Values'] != null ? map['Values'].cast<List<String>>().toList() : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(item != null)
+			map['Item'] = item;
+		if(keys != null)
+			map['Keys'] = keys;
+		if(values != null)
+			map['Values'] = values;
+		return map;
+	}
+}
+
 class CreateRoomRequest {
 	String? initiatorCode;
-	List<String >? userCodes;
+	IDictionary<String>? userCodes;
 	String? deviceCode;
 	String? name;
 	DateTime? liveTime;
@@ -9864,7 +9930,7 @@ class LiveRoomInfoDTO {
 	LiveMemberDTO? initiator;
 	List<LiveMemberDTO >? userInfos;
 	List<LiveMemberDTO >? deviceInfos;
-	List<LiveMemberDTO >? mainUserInfos;
+	List<LiveMemberDTO >? expertUserInfos;
 	List<LiveMemberDTO >? assistantsInfos;
 	LiveRoomStatus status;
 	String? name;
@@ -9880,7 +9946,7 @@ class LiveRoomInfoDTO {
 		this.initiator,
 		this.userInfos,
 		this.deviceInfos,
-		this.mainUserInfos,
+		this.expertUserInfos,
 		this.assistantsInfos,
 		this.status = LiveRoomStatus.Default,
 		this.name,
@@ -9898,7 +9964,7 @@ class LiveRoomInfoDTO {
 			initiator: map['Initiator'] != null ? LiveMemberDTO.fromJson(map['Initiator']) : null,
 			userInfos: map['UserInfos'] != null ? (map['UserInfos'] as List).map((e)=>LiveMemberDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
 			deviceInfos: map['DeviceInfos'] != null ? (map['DeviceInfos'] as List).map((e)=>LiveMemberDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
-			mainUserInfos: map['MainUserInfos'] != null ? (map['MainUserInfos'] as List).map((e)=>LiveMemberDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
+			expertUserInfos: map['ExpertUserInfos'] != null ? (map['ExpertUserInfos'] as List).map((e)=>LiveMemberDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
 			assistantsInfos: map['AssistantsInfos'] != null ? (map['AssistantsInfos'] as List).map((e)=>LiveMemberDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
 			status: LiveRoomStatus.values.firstWhere((e) => e.index == map['Status']),
 			name: map['Name'],
@@ -9923,8 +9989,8 @@ class LiveRoomInfoDTO {
 			map['UserInfos'] = userInfos;
 		if(deviceInfos != null)
 			map['DeviceInfos'] = deviceInfos;
-		if(mainUserInfos != null)
-			map['MainUserInfos'] = mainUserInfos;
+		if(expertUserInfos != null)
+			map['ExpertUserInfos'] = expertUserInfos;
 		if(assistantsInfos != null)
 			map['AssistantsInfos'] = assistantsInfos;
 		map['Status'] = status.index;
@@ -13786,6 +13852,8 @@ class LiveMemberDTO2 {
 	String? loginServerHost;
 	LiveDataDTO2? liveData;
 	bool isControllingParameter;
+	bool isExpertUser;
+	bool isAssistantUser;
 
 	LiveMemberDTO2({
 		this.code,
@@ -13798,6 +13866,8 @@ class LiveMemberDTO2 {
 		this.loginServerHost,
 		this.liveData,
 		this.isControllingParameter = false,
+		this.isExpertUser = false,
+		this.isAssistantUser = false,
 	});
 
 	factory LiveMemberDTO2.fromJson(Map<String, dynamic> map) {
@@ -13812,6 +13882,8 @@ class LiveMemberDTO2 {
 			loginServerHost: map['LoginServerHost'],
 			liveData: map['LiveData'] != null ? LiveDataDTO2.fromJson(map['LiveData']) : null,
 			isControllingParameter: map['IsControllingParameter'],
+			isExpertUser: map['IsExpertUser'],
+			isAssistantUser: map['IsAssistantUser'],
 		);
 	}
 
@@ -13832,6 +13904,8 @@ class LiveMemberDTO2 {
 		if(liveData != null)
 			map['LiveData'] = liveData;
 		map['IsControllingParameter'] = isControllingParameter;
+		map['IsExpertUser'] = isExpertUser;
+		map['IsAssistantUser'] = isAssistantUser;
 		return map;
 	}
 }
@@ -13843,8 +13917,13 @@ class LiveRoomDTO {
 	int integerRoomId;
 	BusinessModuleEnum businessModule;
 	DateTime? lastEndTime;
+	DateTime? liveTime;
 	List<LiveMemberDTO2 >? deviceInfos;
 	List<LiveMemberDTO2 >? userInfos;
+	LiveRoomStatus status;
+	int liveStatus;
+	NotificationTypeEnum reStartNotificationType;
+	TransactionTypeEnum transactionType;
 
 	LiveRoomDTO({
 		this.liveRoomCode,
@@ -13853,8 +13932,13 @@ class LiveRoomDTO {
 		this.integerRoomId = 0,
 		this.businessModule = BusinessModuleEnum.RemoteDiagnosis,
 		this.lastEndTime,
+		this.liveTime,
 		this.deviceInfos,
 		this.userInfos,
+		this.status = LiveRoomStatus.Default,
+		this.liveStatus = 0,
+		this.reStartNotificationType = NotificationTypeEnum.Unknown,
+		this.transactionType = TransactionTypeEnum.Consultion,
 	});
 
 	factory LiveRoomDTO.fromJson(Map<String, dynamic> map) {
@@ -13865,8 +13949,13 @@ class LiveRoomDTO {
 			integerRoomId: map['IntegerRoomId'],
 			businessModule: BusinessModuleEnum.values.firstWhere((e) => e.index == map['BusinessModule']),
 			lastEndTime: map['LastEndTime'] != null ? DateTime.parse(map['LastEndTime']) : null,
+			liveTime: map['LiveTime'] != null ? DateTime.parse(map['LiveTime']) : null,
 			deviceInfos: map['DeviceInfos'] != null ? (map['DeviceInfos'] as List).map((e)=>LiveMemberDTO2.fromJson(e as Map<String,dynamic>)).toList() : null,
 			userInfos: map['UserInfos'] != null ? (map['UserInfos'] as List).map((e)=>LiveMemberDTO2.fromJson(e as Map<String,dynamic>)).toList() : null,
+			status: LiveRoomStatus.values.firstWhere((e) => e.index == map['Status']),
+			liveStatus: map['LiveStatus'],
+			reStartNotificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['ReStartNotificationType']),
+			transactionType: TransactionTypeEnum.values.firstWhere((e) => e.index == map['TransactionType']),
 		);
 	}
 
@@ -13882,10 +13971,16 @@ class LiveRoomDTO {
 		map['BusinessModule'] = businessModule.index;
 		if(lastEndTime != null)
 			map['LastEndTime'] = JsonRpcUtils.dateFormat(lastEndTime!);
+		if(liveTime != null)
+			map['LiveTime'] = JsonRpcUtils.dateFormat(liveTime!);
 		if(deviceInfos != null)
 			map['DeviceInfos'] = deviceInfos;
 		if(userInfos != null)
 			map['UserInfos'] = userInfos;
+		map['Status'] = status.index;
+		map['LiveStatus'] = liveStatus;
+		map['ReStartNotificationType'] = reStartNotificationType.index;
+		map['TransactionType'] = transactionType.index;
 		return map;
 	}
 }
@@ -14173,6 +14268,31 @@ class DistributedServerInfoDTO extends BaseDTO{
 	}
 }
 
+class DiagnosisResultDTO {
+	int index;
+	String? diagnosisResult;
+
+	DiagnosisResultDTO({
+		this.index = 0,
+		this.diagnosisResult,
+	});
+
+	factory DiagnosisResultDTO.fromJson(Map<String, dynamic> map) {
+		return DiagnosisResultDTO( 
+			index: map['Index'],
+			diagnosisResult: map['DiagnosisResult'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		map['Index'] = index;
+		if(diagnosisResult != null)
+			map['DiagnosisResult'] = diagnosisResult;
+		return map;
+	}
+}
+
 class BoardPointDTO {
 	double x;
 	double y;

+ 32 - 0
lib/services/upgrade.dart

@@ -0,0 +1,32 @@
+import 'dart:core';
+
+import 'package:fis_jsonrpc/client_base.dart';
+import 'package:fis_common/json_convert.dart';
+
+import 'upgrade.m.dart';
+
+
+class UpgradeService extends JsonRpcClientBase {
+	UpgradeService(
+		String host, {
+		String serviceName = "IUpgradeService",
+		Map<String, String>? headers,
+		int? timeout,
+	}) : super(
+						host,
+						serviceName,
+						headers: headers,
+						timeout: timeout,
+				) {
+		/// 注册响应实体反序列化处理器
+		FJsonConvert.setDecoder((map) => GetUpgradeInfoResult.fromJson(map));
+	}
+
+	Future<GetUpgradeInfoResult> getUpgradeInfoAsync(GetUpgradeInfoRequest request) async {
+		var rpcRst = await call("GetUpgradeInfoAsync", request);
+		var result = GetUpgradeInfoResult.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+}
+

+ 101 - 0
lib/services/upgrade.m.dart

@@ -0,0 +1,101 @@
+import 'notification.m.dart';
+import 'liveConsultation.m.dart';
+
+class GetUpgradeInfoResult {
+	UpgradeTypeEnum upgadeType;
+	String? upgradeCDNUrl;
+	String? upgradeUrl;
+	UpgradeUpdateTypeEnum upgradeUpdateType;
+	String? newVersion;
+	String? description;
+
+	GetUpgradeInfoResult({
+		this.upgadeType = UpgradeTypeEnum.NoUpgrade,
+		this.upgradeCDNUrl,
+		this.upgradeUrl,
+		this.upgradeUpdateType = UpgradeUpdateTypeEnum.Part,
+		this.newVersion,
+		this.description,
+	});
+
+	factory GetUpgradeInfoResult.fromJson(Map<String, dynamic> map) {
+		return GetUpgradeInfoResult( 
+			upgadeType: UpgradeTypeEnum.values.firstWhere((e) => e.index == map['UpgadeType']),
+			upgradeCDNUrl: map['UpgradeCDNUrl'],
+			upgradeUrl: map['UpgradeUrl'],
+			upgradeUpdateType: UpgradeUpdateTypeEnum.values.firstWhere((e) => e.index == map['UpgradeUpdateType']),
+			newVersion: map['NewVersion'],
+			description: map['Description'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		map['UpgadeType'] = upgadeType.index;
+		if(upgradeCDNUrl != null)
+			map['UpgradeCDNUrl'] = upgradeCDNUrl;
+		if(upgradeUrl != null)
+			map['UpgradeUrl'] = upgradeUrl;
+		map['UpgradeUpdateType'] = upgradeUpdateType.index;
+		if(newVersion != null)
+			map['NewVersion'] = newVersion;
+		if(description != null)
+			map['Description'] = description;
+		return map;
+	}
+}
+
+enum UpgradePlatformEnum {
+	PC,
+	Android,
+	IOS,
+	Mac,
+}
+
+enum UpgradeSourceTypeEnum {
+	Client,
+	US,
+	SONOPOST,
+}
+
+class GetUpgradeInfoRequest extends BaseRequest{
+	UpgradePlatformEnum platform;
+	UpgradeSourceTypeEnum sourceType;
+	String? currentVersion;
+	String? language;
+	String? token;
+
+	GetUpgradeInfoRequest({
+		this.platform = UpgradePlatformEnum.PC,
+		this.sourceType = UpgradeSourceTypeEnum.Client,
+		this.currentVersion,
+		this.language,
+		this.token,
+	}) : super(
+		);
+
+	factory GetUpgradeInfoRequest.fromJson(Map<String, dynamic> map) {
+		return GetUpgradeInfoRequest( 
+			platform: UpgradePlatformEnum.values.firstWhere((e) => e.index == map['Platform']),
+			sourceType: UpgradeSourceTypeEnum.values.firstWhere((e) => e.index == map['SourceType']),
+			currentVersion: map['CurrentVersion'],
+			language: map['Language'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		map['Platform'] = platform.index;
+		map['SourceType'] = sourceType.index;
+		if(currentVersion != null)
+			map['CurrentVersion'] = currentVersion;
+		if(language != null)
+			map['Language'] = language;
+		if(token != null)
+			map['Token'] = token;
+		return map;
+	}
+}
+
+