/* Options: Date: 2025-05-04 23:43:55 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? roles; List? accountIds; List? accountNames; List? 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 json) { fromMap(json); } fromMap(Map 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',context!); accountIds = JsonConverters.fromJson(json['accountIds'],'List',context!); accountNames = JsonConverters.fromJson(json['accountNames'],'List',context!); dashboardPermissions = JsonConverters.fromJson(json['dashboardPermissions'],'List',context!); return this; } Map toJson() => { 'id': id, 'isAuthenticated': isAuthenticated, 'firstName': firstName, 'lastName': lastName, 'name': name, 'avatarUrl': avatarUrl, 'emailAddress': emailAddress, 'roles': JsonConverters.toJson(roles,'List',context!), 'accountIds': JsonConverters.toJson(accountIds,'List',context!), 'accountNames': JsonConverters.toJson(accountNames,'List',context!), 'dashboardPermissions': JsonConverters.toJson(dashboardPermissions,'List',context!) }; getTypeName() => "UserInfo"; TypeContext? context = _ctx; } /** * Update the specified login */ // @Route("/users/{userId}", "PATCH") // @Api(Description="Update the specified login") class PatchUser implements IReturn, IPatch, IConvertible { /** * The account IDs that this user has access to */ // @ApiMember(Description="The account IDs that this user has access to") List? 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? roles; PatchUser({this.accountIds,this.userId,this.firstName,this.lastName,this.newPassword,this.roles}); PatchUser.fromJson(Map json) { fromMap(json); } fromMap(Map json) { accountIds = JsonConverters.fromJson(json['accountIds'],'List',context!); userId = json['userId']; firstName = json['firstName']; lastName = json['lastName']; newPassword = json['newPassword']; roles = JsonConverters.fromJson(json['roles'],'List',context!); return this; } Map toJson() => { 'accountIds': JsonConverters.toJson(accountIds,'List',context!), 'userId': userId, 'firstName': firstName, 'lastName': lastName, 'newPassword': newPassword, 'roles': JsonConverters.toJson(roles,'List',context!) }; createResponse() => UserInfo(); getResponseTypeName() => "UserInfo"; getTypeName() => "PatchUser"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'team.evovoice.io', types: { 'DashboardPermissions': TypeInfo(TypeOf.Enum, enumValues:DashboardPermissions.values), 'UserInfo': TypeInfo(TypeOf.Class, create:() => UserInfo()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'PatchUser': TypeInfo(TypeOf.Class, create:() => PatchUser()), });