|
@@ -393,4 +393,269 @@ class GenerateNewPasswordRequest extends TokenRequest{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+enum AssociatedAccountResultEnum {
|
|
|
+ Success,
|
|
|
+ UserNotFind,
|
|
|
+ UserNameIsEmpty,
|
|
|
+ Error,
|
|
|
+}
|
|
|
+
|
|
|
+class StartAssociatedWithAccountResult {
|
|
|
+ bool isSuccess;
|
|
|
+ AssociatedAccountResultEnum state;
|
|
|
+
|
|
|
+ StartAssociatedWithAccountResult({
|
|
|
+ this.isSuccess = false,
|
|
|
+ this.state = AssociatedAccountResultEnum.Success,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory StartAssociatedWithAccountResult.fromJson(Map<String, dynamic> map) {
|
|
|
+ return StartAssociatedWithAccountResult(
|
|
|
+ isSuccess: map['IsSuccess'],
|
|
|
+ state: AssociatedAccountResultEnum.values.firstWhere((e) => e.index == map['State']),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ map['IsSuccess'] = isSuccess;
|
|
|
+ map['State'] = state.index;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class StartAssociatedWithAccountRequest extends TokenRequest{
|
|
|
+ String? wingUserName;
|
|
|
+ String? thirdPartyUserId;
|
|
|
+ String? languageCode;
|
|
|
+
|
|
|
+ StartAssociatedWithAccountRequest({
|
|
|
+ this.wingUserName,
|
|
|
+ this.thirdPartyUserId,
|
|
|
+ this.languageCode,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory StartAssociatedWithAccountRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return StartAssociatedWithAccountRequest(
|
|
|
+ wingUserName: map['WingUserName'],
|
|
|
+ thirdPartyUserId: map['ThirdPartyUserId'],
|
|
|
+ languageCode: map['LanguageCode'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(wingUserName != null)
|
|
|
+ map['WingUserName'] = wingUserName;
|
|
|
+ if(thirdPartyUserId != null)
|
|
|
+ map['ThirdPartyUserId'] = thirdPartyUserId;
|
|
|
+ if(languageCode != null)
|
|
|
+ map['LanguageCode'] = languageCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class AssociatedFeatureInfoDTO extends AssociatedInfoDTO{
|
|
|
+ String? featureCode;
|
|
|
+
|
|
|
+ AssociatedFeatureInfoDTO({
|
|
|
+ this.featureCode,
|
|
|
+ String? id,
|
|
|
+ String? title,
|
|
|
+ String? cTitle,
|
|
|
+ String? eTitle,
|
|
|
+ String? icon,
|
|
|
+ String? description,
|
|
|
+ String? url,
|
|
|
+ int index = 0,
|
|
|
+ }) : super(
|
|
|
+ id: id,
|
|
|
+ title: title,
|
|
|
+ cTitle: cTitle,
|
|
|
+ eTitle: eTitle,
|
|
|
+ icon: icon,
|
|
|
+ description: description,
|
|
|
+ url: url,
|
|
|
+ index: index,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory AssociatedFeatureInfoDTO.fromJson(Map<String, dynamic> map) {
|
|
|
+ return AssociatedFeatureInfoDTO(
|
|
|
+ featureCode: map['FeatureCode'],
|
|
|
+ id: map['Id'],
|
|
|
+ title: map['Title'],
|
|
|
+ cTitle: map['CTitle'],
|
|
|
+ eTitle: map['ETitle'],
|
|
|
+ icon: map['Icon'],
|
|
|
+ description: map['Description'],
|
|
|
+ url: map['Url'],
|
|
|
+ index: map['Index'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(featureCode != null)
|
|
|
+ map['FeatureCode'] = featureCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class GetAssociatedAccountInfoResult {
|
|
|
+ bool isSuccess;
|
|
|
+ List<AssociatedFeatureInfoDTO >? accountInfoList;
|
|
|
+
|
|
|
+ GetAssociatedAccountInfoResult({
|
|
|
+ this.isSuccess = false,
|
|
|
+ this.accountInfoList,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory GetAssociatedAccountInfoResult.fromJson(Map<String, dynamic> map) {
|
|
|
+ return GetAssociatedAccountInfoResult(
|
|
|
+ isSuccess: map['IsSuccess'],
|
|
|
+ accountInfoList: map['AccountInfoList'] != null ? (map['AccountInfoList'] as List).map((e)=>AssociatedFeatureInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ map['IsSuccess'] = isSuccess;
|
|
|
+ if(accountInfoList != null)
|
|
|
+ map['AccountInfoList'] = accountInfoList;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class GetAssociatedAccountInfoRequest extends TokenRequest{
|
|
|
+
|
|
|
+ GetAssociatedAccountInfoRequest({
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory GetAssociatedAccountInfoRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return GetAssociatedAccountInfoRequest(
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+enum ScanLoginSource {
|
|
|
+ PC,
|
|
|
+ Web,
|
|
|
+ US,
|
|
|
+}
|
|
|
+
|
|
|
+class GetScanCodeRequest {
|
|
|
+ ScanLoginSource scanLoginSource;
|
|
|
+ String? installVersion;
|
|
|
+
|
|
|
+ GetScanCodeRequest({
|
|
|
+ this.scanLoginSource = ScanLoginSource.PC,
|
|
|
+ this.installVersion,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory GetScanCodeRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return GetScanCodeRequest(
|
|
|
+ scanLoginSource: ScanLoginSource.values.firstWhere((e) => e.index == map['ScanLoginSource']),
|
|
|
+ installVersion: map['InstallVersion'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ map['ScanLoginSource'] = scanLoginSource.index;
|
|
|
+ if(installVersion != null)
|
|
|
+ map['InstallVersion'] = installVersion;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class ConfirmScanRequest extends TokenRequest{
|
|
|
+ String? scanCode;
|
|
|
+
|
|
|
+ ConfirmScanRequest({
|
|
|
+ this.scanCode,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory ConfirmScanRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return ConfirmScanRequest(
|
|
|
+ scanCode: map['ScanCode'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(scanCode != null)
|
|
|
+ map['ScanCode'] = scanCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+enum CheckConfirmScanState {
|
|
|
+ Wait,
|
|
|
+ Success,
|
|
|
+ Expire,
|
|
|
+}
|
|
|
+
|
|
|
+class CheckConfirmScanStateResult {
|
|
|
+ CheckConfirmScanState checkConfirmScanState;
|
|
|
+ LoginResult? loginResult;
|
|
|
+
|
|
|
+ CheckConfirmScanStateResult({
|
|
|
+ this.checkConfirmScanState = CheckConfirmScanState.Wait,
|
|
|
+ this.loginResult,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory CheckConfirmScanStateResult.fromJson(Map<String, dynamic> map) {
|
|
|
+ return CheckConfirmScanStateResult(
|
|
|
+ checkConfirmScanState: CheckConfirmScanState.values.firstWhere((e) => e.index == map['CheckConfirmScanState']),
|
|
|
+ loginResult: map['LoginResult'] != null ? LoginResult.fromJson(map['LoginResult']) : null,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ map['CheckConfirmScanState'] = checkConfirmScanState.index;
|
|
|
+ if(loginResult != null)
|
|
|
+ map['LoginResult'] = loginResult;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class CheckConfirmScanStateRequest {
|
|
|
+ String? scanCode;
|
|
|
+
|
|
|
+ CheckConfirmScanStateRequest({
|
|
|
+ this.scanCode,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory CheckConfirmScanStateRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return CheckConfirmScanStateRequest(
|
|
|
+ scanCode: map['ScanCode'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ if(scanCode != null)
|
|
|
+ map['ScanCode'] = scanCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
|