/* Options: Date: 2025-07-13 10:40:57 Version: 8.71 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://team.evovoice.io //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: PatchUser.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; enum DashboardPermissions { ViewFiles, ViewNotifications, ViewSessions, ViewEndpoints, ViewReports, ViewCustomers, ViewFlows, } class UserInfo implements IConvertible { String? id; bool? isAuthenticated; String? firstName; String? lastName; String? name; String? avatarUrl; String? emailAddress; List<String>? roles; List<String>? accountIds; List<String>? accountNames; List<DashboardPermissions>? dashboardPermissions; UserInfo({this.id,this.isAuthenticated,this.firstName,this.lastName,this.name,this.avatarUrl,this.emailAddress,this.roles,this.accountIds,this.accountNames,this.dashboardPermissions}); UserInfo.fromJson(Map<String, dynamic> json) { fromMap(json); } fromMap(Map<String, dynamic> json) { id = json['id']; isAuthenticated = json['isAuthenticated']; firstName = json['firstName']; lastName = json['lastName']; name = json['name']; avatarUrl = json['avatarUrl']; emailAddress = json['emailAddress']; roles = JsonConverters.fromJson(json['roles'],'List<String>',context!); accountIds = JsonConverters.fromJson(json['accountIds'],'List<String>',context!); accountNames = JsonConverters.fromJson(json['accountNames'],'List<String>',context!); dashboardPermissions = JsonConverters.fromJson(json['dashboardPermissions'],'List<DashboardPermissions>',context!); return this; } Map<String, dynamic> toJson() => { 'id': id, 'isAuthenticated': isAuthenticated, 'firstName': firstName, 'lastName': lastName, 'name': name, 'avatarUrl': avatarUrl, 'emailAddress': emailAddress, 'roles': JsonConverters.toJson(roles,'List<String>',context!), 'accountIds': JsonConverters.toJson(accountIds,'List<String>',context!), 'accountNames': JsonConverters.toJson(accountNames,'List<String>',context!), 'dashboardPermissions': JsonConverters.toJson(dashboardPermissions,'List<DashboardPermissions>',context!) }; getTypeName() => "UserInfo"; TypeContext? context = _ctx; } /** * Update the specified login */ // @Route("/users/{userId}", "PATCH") // @Api(Description="Update the specified login") class PatchUser implements IReturn<UserInfo>, IPatch, IConvertible { /** * The account IDs that this user has access to */ // @ApiMember(Description="The account IDs that this user has access to") List<String>? accountIds; /** * The ID of the user */ // @ApiMember(Description="The ID of the user") String? userId; /** * The user's first name */ // @ApiMember(Description="The user's first name") String? firstName; /** * The user's last name */ // @ApiMember(Description="The user's last name") String? lastName; /** * The new password for the user (leave null to not change) */ // @ApiMember(Description="The new password for the user (leave null to not change)") String? newPassword; /** * The roles to associate with the login. Can only specify if system admin */ // @ApiMember(Description="The roles to associate with the login. Can only specify if system admin") List<String>? roles; PatchUser({this.accountIds,this.userId,this.firstName,this.lastName,this.newPassword,this.roles}); PatchUser.fromJson(Map<String, dynamic> json) { fromMap(json); } fromMap(Map<String, dynamic> json) { accountIds = JsonConverters.fromJson(json['accountIds'],'List<String>',context!); userId = json['userId']; firstName = json['firstName']; lastName = json['lastName']; newPassword = json['newPassword']; roles = JsonConverters.fromJson(json['roles'],'List<String>',context!); return this; } Map<String, dynamic> toJson() => { 'accountIds': JsonConverters.toJson(accountIds,'List<String>',context!), 'userId': userId, 'firstName': firstName, 'lastName': lastName, 'newPassword': newPassword, 'roles': JsonConverters.toJson(roles,'List<String>',context!) }; createResponse() => UserInfo(); getResponseTypeName() => "UserInfo"; getTypeName() => "PatchUser"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'team.evovoice.io', types: <String, TypeInfo> { 'DashboardPermissions': TypeInfo(TypeOf.Enum, enumValues:DashboardPermissions.values), 'UserInfo': TypeInfo(TypeOf.Class, create:() => UserInfo()), 'List<DashboardPermissions>': TypeInfo(TypeOf.Class, create:() => <DashboardPermissions>[]), 'PatchUser': TypeInfo(TypeOf.Class, create:() => PatchUser()), });