admin page

This commit is contained in:
2026-06-06 10:28:21 +03:00
parent d296032e90
commit d1e6529950
6 changed files with 132 additions and 25 deletions

View File

@@ -3,15 +3,36 @@ import { tokenStore } from '@shared/api/tokenStore'
const USERS_API_URL = 'https://app.users.elcsa.ru'
export type AccountType = 'individual' | 'legal_entity'
// Nested organization payload — present only on legal_entity accounts.
export interface LegalEntityInfo {
id: string
name: string
inn: string
status: string
short_name: string | null
ogrn: string | null
kpp: string | null
legal_address: string | null
actual_address: string | null
bank_details: Record<string, unknown> | null
contact_person: string | null
contact_phone: string | null
kyc_verified: boolean
kyc_verified_at: string | null
}
export interface MeResponse {
id: string
email: string
first_name: string
middle_name: string
last_name: string
birth_date: string
// Person fields are null on legal_entity accounts.
first_name: string | null
middle_name: string | null
last_name: string | null
birth_date: string | null
encrypted_mnemonic: string | null
phone: string
phone: string | null
passport_data: string | null
inn: string | null
erc20: string | null
@@ -21,7 +42,11 @@ export interface MeResponse {
created_at: string
updated_at: string
kyc_verified_at: string | null
webp_size_bytes: number
webp_size_bytes?: number
// "individual" -> физлицо, "legal_entity" -> аккаунт юр.лица.
account_type: AccountType
// Populated only for legal_entity accounts.
legal_entity?: LegalEntityInfo | null
}
export interface UploadAvatarPayload {