/* Options: Date: 2025-05-06 22:27:24 Version: 8.70 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://unstable-consumer-api.brovs.com //GlobalNamespace: ConsumerApi //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: ResetPasswordRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ library ConsumerApi; import 'package:servicestack/servicestack.dart'; class DateOfBirth implements IConvertible { int? year; int? month; int? dayOfMonth; DateOfBirth({this.year,this.month,this.dayOfMonth}); DateOfBirth.fromJson(Map json) { fromMap(json); } fromMap(Map json) { year = json['year']; month = json['month']; dayOfMonth = json['dayOfMonth']; return this; } Map toJson() => { 'year': year, 'month': month, 'dayOfMonth': dayOfMonth }; getTypeName() => "DateOfBirth"; TypeContext? context = _ctx; } enum Sex { Male, Female, } enum DistanceUnit { Kilometer, Mile, } enum Locale { EnUs, NbNo, } class UserAddress implements IConvertible { String? streetName; String? streetNumber; String? postalCode; String? region; String? countryCode; UserAddress({this.streetName,this.streetNumber,this.postalCode,this.region,this.countryCode}); UserAddress.fromJson(Map json) { fromMap(json); } fromMap(Map json) { streetName = json['streetName']; streetNumber = json['streetNumber']; postalCode = json['postalCode']; region = json['region']; countryCode = json['countryCode']; return this; } Map toJson() => { 'streetName': streetName, 'streetNumber': streetNumber, 'postalCode': postalCode, 'region': region, 'countryCode': countryCode }; getTypeName() => "UserAddress"; TypeContext? context = _ctx; } class HomeLocation implements IConvertible { UserAddress? address; double? latitude; double? longitude; HomeLocation({this.address,this.latitude,this.longitude}); HomeLocation.fromJson(Map json) { fromMap(json); } fromMap(Map json) { address = JsonConverters.fromJson(json['address'],'UserAddress',context!); latitude = JsonConverters.toDouble(json['latitude']); longitude = JsonConverters.toDouble(json['longitude']); return this; } Map toJson() => { 'address': JsonConverters.toJson(address,'UserAddress',context!), 'latitude': latitude, 'longitude': longitude }; getTypeName() => "HomeLocation"; TypeContext? context = _ctx; } class UserProfileDto implements IConvertible { Locale? locale; String? userGuid; String? firstName; String? lastName; String? profilePhotoUrl; String? mobilePhone; bool? mobilePhoneVerified; String? email; bool? emailVerified; bool? hasPassword; DateOfBirth? dateOfBirth; Sex? sex; HomeLocation? home; DistanceUnit? showDistancesIn; bool? legalIdentityVerified; bool? managesPlacesInBusinessWeb; int? pointsTotal; UserProfileDto({this.locale,this.userGuid,this.firstName,this.lastName,this.profilePhotoUrl,this.mobilePhone,this.mobilePhoneVerified,this.email,this.emailVerified,this.hasPassword,this.dateOfBirth,this.sex,this.home,this.showDistancesIn,this.legalIdentityVerified,this.managesPlacesInBusinessWeb,this.pointsTotal}); UserProfileDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { locale = JsonConverters.fromJson(json['locale'],'Locale',context!); userGuid = json['userGuid']; firstName = json['firstName']; lastName = json['lastName']; profilePhotoUrl = json['profilePhotoUrl']; mobilePhone = json['mobilePhone']; mobilePhoneVerified = json['mobilePhoneVerified']; email = json['email']; emailVerified = json['emailVerified']; hasPassword = json['hasPassword']; dateOfBirth = JsonConverters.fromJson(json['dateOfBirth'],'DateOfBirth',context!); sex = JsonConverters.fromJson(json['sex'],'Sex',context!); home = JsonConverters.fromJson(json['home'],'HomeLocation',context!); showDistancesIn = JsonConverters.fromJson(json['showDistancesIn'],'DistanceUnit',context!); legalIdentityVerified = json['legalIdentityVerified']; managesPlacesInBusinessWeb = json['managesPlacesInBusinessWeb']; pointsTotal = json['pointsTotal']; return this; } Map toJson() => { 'locale': JsonConverters.toJson(locale,'Locale',context!), 'userGuid': userGuid, 'firstName': firstName, 'lastName': lastName, 'profilePhotoUrl': profilePhotoUrl, 'mobilePhone': mobilePhone, 'mobilePhoneVerified': mobilePhoneVerified, 'email': email, 'emailVerified': emailVerified, 'hasPassword': hasPassword, 'dateOfBirth': JsonConverters.toJson(dateOfBirth,'DateOfBirth',context!), 'sex': JsonConverters.toJson(sex,'Sex',context!), 'home': JsonConverters.toJson(home,'HomeLocation',context!), 'showDistancesIn': JsonConverters.toJson(showDistancesIn,'DistanceUnit',context!), 'legalIdentityVerified': legalIdentityVerified, 'managesPlacesInBusinessWeb': managesPlacesInBusinessWeb, 'pointsTotal': pointsTotal }; getTypeName() => "UserProfileDto"; TypeContext? context = _ctx; } class ResetPasswordResponse implements IConvertible { UserProfileDto? userProfile; int? passwordScore; ResetPasswordResponse({this.userProfile,this.passwordScore}); ResetPasswordResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { userProfile = JsonConverters.fromJson(json['userProfile'],'UserProfileDto',context!); passwordScore = json['passwordScore']; return this; } Map toJson() => { 'userProfile': JsonConverters.toJson(userProfile,'UserProfileDto',context!), 'passwordScore': passwordScore }; getTypeName() => "ResetPasswordResponse"; TypeContext? context = _ctx; } // @Route("/recovery/reset_password", "POST") class ResetPasswordRequest implements IReturn, IPost, IConvertible { // @Validate(Validator="NotEmpty") String? verifiedToken; // @Validate(Validator="NotEmpty") String? newPassword; // @Validate(Validator="NotEmpty") String? newPasswordConfirmation; ResetPasswordRequest({this.verifiedToken,this.newPassword,this.newPasswordConfirmation}); ResetPasswordRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { verifiedToken = json['verifiedToken']; newPassword = json['newPassword']; newPasswordConfirmation = json['newPasswordConfirmation']; return this; } Map toJson() => { 'verifiedToken': verifiedToken, 'newPassword': newPassword, 'newPasswordConfirmation': newPasswordConfirmation }; createResponse() => ResetPasswordResponse(); getResponseTypeName() => "ResetPasswordResponse"; getTypeName() => "ResetPasswordRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'ConsumerApi', types: { 'DateOfBirth': TypeInfo(TypeOf.Class, create:() => DateOfBirth()), 'Sex': TypeInfo(TypeOf.Enum, enumValues:Sex.values), 'DistanceUnit': TypeInfo(TypeOf.Enum, enumValues:DistanceUnit.values), 'Locale': TypeInfo(TypeOf.Enum, enumValues:Locale.values), 'UserAddress': TypeInfo(TypeOf.Class, create:() => UserAddress()), 'HomeLocation': TypeInfo(TypeOf.Class, create:() => HomeLocation()), 'UserProfileDto': TypeInfo(TypeOf.Class, create:() => UserProfileDto()), 'ResetPasswordResponse': TypeInfo(TypeOf.Class, create:() => ResetPasswordResponse()), 'ResetPasswordRequest': TypeInfo(TypeOf.Class, create:() => ResetPasswordRequest()), });