feat(users): add user admin section and delegate login authorization to API

This commit is contained in:
2026-08-10 23:04:41 +08:00
parent 88039d9ebe
commit 04c12ad340
9 changed files with 6630 additions and 2500 deletions
+33
View File
@@ -63,6 +63,38 @@ export interface AdminUser {
is_robot?: boolean
}
export interface PlatformUser {
kind: 'user'
uid: string
sid?: string | null
sid_display?: string | null
username: string | null
display_name: string | null
email: string | null
phone: string | null
country_code?: string | null
avatar: string | null
expertise?: string | null
city?: string | null
timezone?: string | null
timezone_offset?: number | null
locale?: string | null
status: boolean
is_robot: boolean
email_verified_at?: string | null
phone_verified_at?: string | null
roles: string[]
created_at: string
updated_at?: string
}
export interface UserListParams extends ListParams {
q?: string
status?: boolean
is_robot?: boolean
role?: string
}
export interface MeResponse extends ApiResponse<AdminUser> {
meta: {
roles: string[]
@@ -70,6 +102,7 @@ export interface MeResponse extends ApiResponse<AdminUser> {
}
}
// ---------- category ----------
export interface CategoryTranslation {