feat(project): support adding existing team members and prioritize project-specific roles

This commit is contained in:
yiling
2026-06-12 10:00:17 +08:00
parent 8a0358fd98
commit fb76fbd970
15 changed files with 438 additions and 48 deletions
+14
View File
@@ -110,3 +110,17 @@ export interface ServiceUpdateProjectMemberRoleRequest {
userId: string
role: 'editor' | 'reviewer'
}
export const addProjectMemberRequestSchema = z.object({
userId: z.string(),
role: z.enum(['owner', 'editor', 'reviewer']),
})
export type AddProjectMemberRequest = z.infer<typeof addProjectMemberRequestSchema>
export const projectMeResponseSchema = z.object({
id: z.string(),
name: z.string(),
role: z.enum(['owner', 'editor', 'reviewer', 'bot', 'unknown']),
image: z.string().optional(),
})
export type ProjectMeResponse = z.infer<typeof projectMeResponseSchema>