71 lines
1.5 KiB
TypeScript
71 lines
1.5 KiB
TypeScript
export interface RegisterCommand {
|
|
email?: string;
|
|
phone?: string;
|
|
password?: string;
|
|
displayName: string;
|
|
username?: string;
|
|
}
|
|
|
|
export interface LoginCommand {
|
|
login: string;
|
|
password: string;
|
|
deviceName?: string;
|
|
deviceType?: string;
|
|
fingerprint: string;
|
|
ipAddress?: string;
|
|
userAgent?: string;
|
|
}
|
|
|
|
export interface AuthTokens {
|
|
accessToken: string;
|
|
refreshToken: string;
|
|
expiresAt: string;
|
|
pinVerified: boolean;
|
|
sessionId: string;
|
|
user: PublicUser;
|
|
requiresTotp?: boolean;
|
|
totpChallengeToken?: string;
|
|
}
|
|
|
|
export interface PublicUser {
|
|
id: string;
|
|
email?: string | null;
|
|
phone?: string | null;
|
|
backupEmail?: string | null;
|
|
backupPhone?: string | null;
|
|
displayName: string;
|
|
username?: string | null;
|
|
avatarUrl?: string | null;
|
|
hasAvatar?: boolean;
|
|
isSuperAdmin: boolean;
|
|
status: string;
|
|
roles?: string[];
|
|
permissions?: string[];
|
|
canAccessAdmin?: boolean;
|
|
canManageRoles?: boolean;
|
|
canViewOAuth?: boolean;
|
|
canManageOAuth?: boolean;
|
|
canManageAllOAuth?: boolean;
|
|
canManageUsers?: boolean;
|
|
canManageAllUsers?: boolean;
|
|
canManageSettings?: boolean;
|
|
canViewUsers?: boolean;
|
|
canViewUserDocuments?: boolean;
|
|
hasPassword?: boolean;
|
|
isVerified?: boolean;
|
|
verificationIcon?: string;
|
|
canVerifyUsers?: boolean;
|
|
}
|
|
|
|
export interface VerifyPinCommand {
|
|
sessionId: string;
|
|
pin: string;
|
|
}
|
|
|
|
export interface UpsertSettingCommand {
|
|
key: string;
|
|
value: string;
|
|
description?: string;
|
|
isSecret?: boolean;
|
|
}
|