From 8d9c250eb71c2152df9ec51304cb93ed361ab507 Mon Sep 17 00:00:00 2001 From: Kirill Date: Wed, 20 May 2026 10:57:11 +0500 Subject: [PATCH] =?UTF-8?q?refactor:=20rename=20name=E2=86=92displayName?= =?UTF-8?q?=20in=20AuthUser=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/shared/model/auth.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/client/src/shared/model/auth.ts b/client/src/shared/model/auth.ts index be9b4fe..3c4540f 100644 --- a/client/src/shared/model/auth.ts +++ b/client/src/shared/model/auth.ts @@ -3,7 +3,17 @@ import { apiClient } from '@/shared/api/client' import { createErrorStore } from '@/shared/lib/create-error-store' import { persistToken } from '@/shared/lib/persist-token' -export type AuthUser = { id: string; email: string; name?: string | null; phone?: string | null; isAdmin?: boolean } +export type AuthUser = { + id: string + email: string + displayName?: string | null + firstName?: string | null + lastName?: string | null + gender?: string | null + avatar?: string | null + phone?: string | null + isAdmin?: boolean +} export const tokenSet = createEvent() export const logout = createEvent() @@ -58,7 +68,7 @@ export const verifyEmailChangeFx = createEffect(async (params: { newEmail: strin // ----- Profile update ----- -export type UpdateProfileParams = { name: string | null; phone?: string | null } +export type UpdateProfileParams = { displayName: string | null; phone?: string | null } export const updateProfileFx = createEffect(async (params: UpdateProfileParams) => { const { data } = await apiClient.patch<{ user: AuthUser }>('me/profile', params)