POST,GET | /api/Security/GetUserByBranchForApp |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
// @Flags()
class TrainingCourse
{
static const TrainingCourse AddMember = const TrainingCourse._(1);
static const TrainingCourse EditMember = const TrainingCourse._(2);
static const TrainingCourse AddMembership = const TrainingCourse._(4);
static const TrainingCourse Journal = const TrainingCourse._(8);
static const TrainingCourse Home = const TrainingCourse._(16);
static const TrainingCourse Till = const TrainingCourse._(32);
static const TrainingCourse Accounting = const TrainingCourse._(64);
static const TrainingCourse UnexplainedPayments = const TrainingCourse._(128);
static const TrainingCourse Bookings = const TrainingCourse._(256);
static const TrainingCourse Users = const TrainingCourse._(512);
final int _value;
const TrainingCourse._(this._value);
int get value => _value;
static List<TrainingCourse> get values => const [AddMember,EditMember,AddMembership,Journal,Home,Till,Accounting,UnexplainedPayments,Bookings,Users];
}
class User implements IConvertible
{
int? UserId;
String? UserName;
String? Name;
String? Email;
bool? EmailConfirmed;
String? MobilePhone;
bool? MobilePhoneConfirmed;
String? ConfirmPassword;
String? Password;
String? PasswordSalt;
bool? Enabled;
bool? Training;
DateTime? LastLogin;
DateTime? Created;
int? BranchId;
int? ParentBranchId;
int? MemberId;
List<String>? Roles;
TrainingCourse? CoursesCompleted;
bool? DisplayHomeNotification;
bool? TwoFactorEnabled;
String? BranchName;
String? BranchKey;
bool? Notifications;
String? PublishableKey;
String? SecretKey;
String? AppRegistrationId;
String? AppRegistrationLink;
String? AppQrImageLink;
DateTime? ChangePassword;
DateTime? Activated;
User({this.UserId,this.UserName,this.Name,this.Email,this.EmailConfirmed,this.MobilePhone,this.MobilePhoneConfirmed,this.ConfirmPassword,this.Password,this.PasswordSalt,this.Enabled,this.Training,this.LastLogin,this.Created,this.BranchId,this.ParentBranchId,this.MemberId,this.Roles,this.CoursesCompleted,this.DisplayHomeNotification,this.TwoFactorEnabled,this.BranchName,this.BranchKey,this.Notifications,this.PublishableKey,this.SecretKey,this.AppRegistrationId,this.AppRegistrationLink,this.AppQrImageLink,this.ChangePassword,this.Activated});
User.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
UserId = json['UserId'];
UserName = json['UserName'];
Name = json['Name'];
Email = json['Email'];
EmailConfirmed = json['EmailConfirmed'];
MobilePhone = json['MobilePhone'];
MobilePhoneConfirmed = json['MobilePhoneConfirmed'];
ConfirmPassword = json['ConfirmPassword'];
Password = json['Password'];
PasswordSalt = json['PasswordSalt'];
Enabled = json['Enabled'];
Training = json['Training'];
LastLogin = JsonConverters.fromJson(json['LastLogin'],'DateTime',context!);
Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
BranchId = json['BranchId'];
ParentBranchId = json['ParentBranchId'];
MemberId = json['MemberId'];
Roles = JsonConverters.fromJson(json['Roles'],'List<String>',context!);
CoursesCompleted = JsonConverters.fromJson(json['CoursesCompleted'],'TrainingCourse',context!);
DisplayHomeNotification = json['DisplayHomeNotification'];
TwoFactorEnabled = json['TwoFactorEnabled'];
BranchName = json['BranchName'];
BranchKey = json['BranchKey'];
Notifications = json['Notifications'];
PublishableKey = json['PublishableKey'];
SecretKey = json['SecretKey'];
AppRegistrationId = json['AppRegistrationId'];
AppRegistrationLink = json['AppRegistrationLink'];
AppQrImageLink = json['AppQrImageLink'];
ChangePassword = JsonConverters.fromJson(json['ChangePassword'],'DateTime',context!);
Activated = JsonConverters.fromJson(json['Activated'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'UserId': UserId,
'UserName': UserName,
'Name': Name,
'Email': Email,
'EmailConfirmed': EmailConfirmed,
'MobilePhone': MobilePhone,
'MobilePhoneConfirmed': MobilePhoneConfirmed,
'ConfirmPassword': ConfirmPassword,
'Password': Password,
'PasswordSalt': PasswordSalt,
'Enabled': Enabled,
'Training': Training,
'LastLogin': JsonConverters.toJson(LastLogin,'DateTime',context!),
'Created': JsonConverters.toJson(Created,'DateTime',context!),
'BranchId': BranchId,
'ParentBranchId': ParentBranchId,
'MemberId': MemberId,
'Roles': JsonConverters.toJson(Roles,'List<String>',context!),
'CoursesCompleted': JsonConverters.toJson(CoursesCompleted,'TrainingCourse',context!),
'DisplayHomeNotification': DisplayHomeNotification,
'TwoFactorEnabled': TwoFactorEnabled,
'BranchName': BranchName,
'BranchKey': BranchKey,
'Notifications': Notifications,
'PublishableKey': PublishableKey,
'SecretKey': SecretKey,
'AppRegistrationId': AppRegistrationId,
'AppRegistrationLink': AppRegistrationLink,
'AppQrImageLink': AppQrImageLink,
'ChangePassword': JsonConverters.toJson(ChangePassword,'DateTime',context!),
'Activated': JsonConverters.toJson(Activated,'DateTime',context!)
};
getTypeName() => "User";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.clubmanagercentral.com', types: <String, TypeInfo> {
'TrainingCourse': TypeInfo(TypeOf.Enum, enumValues:TrainingCourse.values),
'User': TypeInfo(TypeOf.Class, create:() => User()),
});
Dart SecurityService.GetUserByBranchForAppRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/Security/GetUserByBranchForApp HTTP/1.1
Host: api.clubmanagercentral.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
AppUserId: 0
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { UserId: 0, UserName: String, Name: String, Email: String, EmailConfirmed: False, MobilePhone: String, MobilePhoneConfirmed: False, ConfirmPassword: String, Password: String, PasswordSalt: String, Enabled: False, Training: False, LastLogin: 0001-01-01, Created: 0001-01-01, BranchId: 0, ParentBranchId: 0, MemberId: 0, Roles: [ String ], CoursesCompleted: 1, DisplayHomeNotification: False, TwoFactorEnabled: False, BranchName: String, BranchKey: 00000000000000000000000000000000, Notifications: False, PublishableKey: String, SecretKey: String, AppRegistrationId: 7TvtgFvdvABkciG+5MdrKWdOb3jcmCvVCNGhKIjNTe8DO9SIT6XiKiD7kcMEPEWodlOsNZbcYTVDmLFHZsmbWgWen0EAAF5rjgpEi9a9pcg=, AppRegistrationLink: "https://secure.clubmanagercentral.com/Register?id=7TvtgFvdvABkciG+5MdrKWdOb3jcmCvVCNGhKIjNTe8DO9SIT6XiKiD7kcMEPEWodlOsNZbcYTVDmLFHZsmbWgWen0EAAF5rjgpEi9a9pcg=", AppQrImageLink: "https://secure.clubmanagercentral.com/User.mvc/GetQrByUserId?id=36xZln01EfE80ZF7GFWKkg==", ChangePassword: 0001-01-01, Activated: 0001-01-01 }