50 lines
1.1 KiB
TypeScript
50 lines
1.1 KiB
TypeScript
// ============================================================================
|
|
// Auth Data Types
|
|
// ============================================================================
|
|
|
|
export type TUserStatus = 'active' | 'suspended' | 'pending_verification';
|
|
|
|
export interface IIdentity {
|
|
jwt: string;
|
|
refreshJwt: string;
|
|
userId: string;
|
|
email: string;
|
|
username: string;
|
|
displayName: string;
|
|
isSystemAdmin: boolean;
|
|
expiresAt: number;
|
|
sessionId: string;
|
|
}
|
|
|
|
export interface IUser {
|
|
id: string;
|
|
email: string;
|
|
username: string;
|
|
displayName: string;
|
|
avatarUrl?: string;
|
|
isSystemAdmin: boolean;
|
|
isActive: boolean;
|
|
createdAt: string;
|
|
lastLoginAt?: string;
|
|
}
|
|
|
|
export interface ISession {
|
|
id: string;
|
|
userId: string;
|
|
userAgent: string;
|
|
ipAddress: string;
|
|
isValid: boolean;
|
|
lastActivityAt: string;
|
|
createdAt: string;
|
|
}
|
|
|
|
export interface IPublicAuthProvider {
|
|
id: string;
|
|
name: string;
|
|
displayName: string;
|
|
type: TAuthProviderType;
|
|
}
|
|
|
|
export type TAuthProviderType = 'oidc' | 'ldap';
|
|
export type TAuthProviderStatus = 'active' | 'disabled' | 'testing';
|