mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-28 20:04:26 +00:00
feat(user-avatar): add support for uploading, cropping, and displaying user avatars
This commit is contained in:
@@ -25,6 +25,7 @@ export type ChildPreview = z.infer<typeof childPreviewSchema>
|
||||
export const assetUserInfoSchema = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
image: z.string().optional(),
|
||||
})
|
||||
export type AssetUserInfo = z.infer<typeof assetUserInfoSchema>
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ export const projectUserInfoSchema = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
role: z.string(),
|
||||
image: z.string().optional(),
|
||||
})
|
||||
export type ProjectUserInfo = z.infer<typeof projectUserInfoSchema>
|
||||
|
||||
|
||||
@@ -34,16 +34,24 @@ export const getMeResponseSchema = z.object({
|
||||
name: z.string(),
|
||||
email: z.string().optional(),
|
||||
role: z.string(),
|
||||
image: z.string().optional(),
|
||||
unreadNotificationCount: z.number().optional(),
|
||||
})
|
||||
export type GetMeResponse = z.infer<typeof getMeResponseSchema>
|
||||
|
||||
export const updateMeRequestSchema = z.object({
|
||||
name: z.string().optional(),
|
||||
imageKey: z.string().nullable().optional(),
|
||||
})
|
||||
export type UpdateMeRequest = z.infer<typeof updateMeRequestSchema>
|
||||
|
||||
export const userInfoSchema = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
role: z.string(),
|
||||
email: z.string().optional(),
|
||||
type: z.enum(['human', 'agent']).optional(),
|
||||
image: z.string().optional(),
|
||||
})
|
||||
export type UserInfo = z.infer<typeof userInfoSchema>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user