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)