/* Options: Date: 2026-01-26 18:22:06 Version: 8.0 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://cochraneplus-api-dev.happen.zone //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: UserLogin.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo, IConvertible { /** * The API Key required for authentication */ // @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true) String? apiKey; /** * Latitude of the user making this request */ // @ApiMember(DataType="double", Description="Latitude of the user making this request") double? latitude; /** * Longitude of the user making this request */ // @ApiMember(DataType="double", Description="Longitude of the user making this request") double? longitude; ApiServiceRequest({this.apiKey,this.latitude,this.longitude}); ApiServiceRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { apiKey = json['apiKey']; latitude = JsonConverters.toDouble(json['latitude']); longitude = JsonConverters.toDouble(json['longitude']); return this; } Map toJson() => { 'apiKey': apiKey, 'latitude': latitude, 'longitude': longitude }; getTypeName() => "ApiServiceRequest"; TypeContext? context = _ctx; } abstract class IServiceRequest { } abstract class IHasApiKey { String? apiKey; } abstract class IHasDeviceInfo { } class SystemUserPermission implements IConvertible { bool? meeting; bool? journey; bool? attendance; bool? notificationCenter; bool? internalRating; bool? debrief; bool? thunderBoltActions; bool? onTheMove; SystemUserPermission({this.meeting,this.journey,this.attendance,this.notificationCenter,this.internalRating,this.debrief,this.thunderBoltActions,this.onTheMove}); SystemUserPermission.fromJson(Map json) { fromMap(json); } fromMap(Map json) { meeting = json['meeting']; journey = json['journey']; attendance = json['attendance']; notificationCenter = json['notificationCenter']; internalRating = json['internalRating']; debrief = json['debrief']; thunderBoltActions = json['thunderBoltActions']; onTheMove = json['onTheMove']; return this; } Map toJson() => { 'meeting': meeting, 'journey': journey, 'attendance': attendance, 'notificationCenter': notificationCenter, 'internalRating': internalRating, 'debrief': debrief, 'thunderBoltActions': thunderBoltActions, 'onTheMove': onTheMove }; getTypeName() => "SystemUserPermission"; TypeContext? context = _ctx; } class AppSettings implements IConvertible { bool? allowAbstainRatings; bool? showMoodIndicatorOnApp; bool? takePhotoForAnalysis; AppSettings({this.allowAbstainRatings,this.showMoodIndicatorOnApp,this.takePhotoForAnalysis}); AppSettings.fromJson(Map json) { fromMap(json); } fromMap(Map json) { allowAbstainRatings = json['allowAbstainRatings']; showMoodIndicatorOnApp = json['showMoodIndicatorOnApp']; takePhotoForAnalysis = json['takePhotoForAnalysis']; return this; } Map toJson() => { 'allowAbstainRatings': allowAbstainRatings, 'showMoodIndicatorOnApp': showMoodIndicatorOnApp, 'takePhotoForAnalysis': takePhotoForAnalysis }; getTypeName() => "AppSettings"; TypeContext? context = _ctx; } class ApiServiceResponse implements IServiceResponse, IConvertible { String? description; String? heading; bool? wasSuccessful; dynamic? modelState; ApiServiceResponse({this.description,this.heading,this.wasSuccessful,this.modelState}); ApiServiceResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { description = json['description']; heading = json['heading']; wasSuccessful = json['wasSuccessful']; modelState = JsonConverters.fromJson(json['modelState'],'dynamic',context!); return this; } Map toJson() => { 'description': description, 'heading': heading, 'wasSuccessful': wasSuccessful, 'modelState': JsonConverters.toJson(modelState,'dynamic',context!) }; getTypeName() => "ApiServiceResponse"; TypeContext? context = _ctx; } class UserLoginResponse extends ApiServiceResponse implements IConvertible { bool? allowAttendanceOnLaptop; String? profileImageUrl; String? friendlyName; int? systemUserId; String? username; SystemUserPermission? permissions; AppSettings? settings; double? startLatitude; double? startLongitude; bool? hasStartLocation; double? endLatitude; double? endLongitude; bool? hasEndLocation; bool? isSalesPerson; List? feelingStatusMappings; bool? hasAiPermissions; String? refreshToken; bool? isManagerOrPromotedTo; bool? isTemplateApprover; int? outstandingApprovals; UserLoginResponse({this.allowAttendanceOnLaptop,this.profileImageUrl,this.friendlyName,this.systemUserId,this.username,this.permissions,this.settings,this.startLatitude,this.startLongitude,this.hasStartLocation,this.endLatitude,this.endLongitude,this.hasEndLocation,this.isSalesPerson,this.feelingStatusMappings,this.hasAiPermissions,this.refreshToken,this.isManagerOrPromotedTo,this.isTemplateApprover,this.outstandingApprovals}); UserLoginResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); allowAttendanceOnLaptop = json['allowAttendanceOnLaptop']; profileImageUrl = json['profileImageUrl']; friendlyName = json['friendlyName']; systemUserId = json['systemUserId']; username = json['username']; permissions = JsonConverters.fromJson(json['permissions'],'SystemUserPermission',context!); settings = JsonConverters.fromJson(json['settings'],'AppSettings',context!); startLatitude = JsonConverters.toDouble(json['startLatitude']); startLongitude = JsonConverters.toDouble(json['startLongitude']); hasStartLocation = json['hasStartLocation']; endLatitude = JsonConverters.toDouble(json['endLatitude']); endLongitude = JsonConverters.toDouble(json['endLongitude']); hasEndLocation = json['hasEndLocation']; isSalesPerson = json['isSalesPerson']; feelingStatusMappings = JsonConverters.fromJson(json['feelingStatusMappings'],'List',context!); hasAiPermissions = json['hasAiPermissions']; refreshToken = json['refreshToken']; isManagerOrPromotedTo = json['isManagerOrPromotedTo']; isTemplateApprover = json['isTemplateApprover']; outstandingApprovals = json['outstandingApprovals']; return this; } Map toJson() => super.toJson()..addAll({ 'allowAttendanceOnLaptop': allowAttendanceOnLaptop, 'profileImageUrl': profileImageUrl, 'friendlyName': friendlyName, 'systemUserId': systemUserId, 'username': username, 'permissions': JsonConverters.toJson(permissions,'SystemUserPermission',context!), 'settings': JsonConverters.toJson(settings,'AppSettings',context!), 'startLatitude': startLatitude, 'startLongitude': startLongitude, 'hasStartLocation': hasStartLocation, 'endLatitude': endLatitude, 'endLongitude': endLongitude, 'hasEndLocation': hasEndLocation, 'isSalesPerson': isSalesPerson, 'feelingStatusMappings': JsonConverters.toJson(feelingStatusMappings,'List',context!), 'hasAiPermissions': hasAiPermissions, 'refreshToken': refreshToken, 'isManagerOrPromotedTo': isManagerOrPromotedTo, 'isTemplateApprover': isTemplateApprover, 'outstandingApprovals': outstandingApprovals }); getTypeName() => "UserLoginResponse"; TypeContext? context = _ctx; } // @Route("/user/login", "POST") class UserLogin extends ApiServiceRequest implements IReturn, IConvertible, IPost { String? username; String? password; int? utcOffset; UserLogin({this.username,this.password,this.utcOffset}); UserLogin.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); username = json['username']; password = json['password']; utcOffset = json['utcOffset']; return this; } Map toJson() => super.toJson()..addAll({ 'username': username, 'password': password, 'utcOffset': utcOffset }); createResponse() => UserLoginResponse(); getResponseTypeName() => "UserLoginResponse"; getTypeName() => "UserLogin"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'cochraneplus_api_dev.happen.zone', types: { 'ApiServiceRequest': TypeInfo(TypeOf.Class, create:() => ApiServiceRequest()), 'IServiceRequest': TypeInfo(TypeOf.Interface), 'IHasApiKey': TypeInfo(TypeOf.Interface), 'IHasDeviceInfo': TypeInfo(TypeOf.Interface), 'SystemUserPermission': TypeInfo(TypeOf.Class, create:() => SystemUserPermission()), 'AppSettings': TypeInfo(TypeOf.Class, create:() => AppSettings()), 'ApiServiceResponse': TypeInfo(TypeOf.Class, create:() => ApiServiceResponse()), 'UserLoginResponse': TypeInfo(TypeOf.Class, create:() => UserLoginResponse()), 'UserLogin': TypeInfo(TypeOf.Class, create:() => UserLogin()), });