This commit is contained in:
Daniel Hougaard
2024-09-12 11:03:20 +04:00
parent 7b04c08fc7
commit 2e3dcc50ae
2 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -447,7 +447,9 @@ export const PROJECT_USERS = {
INVITE_MEMBER: { INVITE_MEMBER: {
projectId: "The ID of the project to invite the member to.", projectId: "The ID of the project to invite the member to.",
emails: "A list of organization member emails to invite to the project.", emails: "A list of organization member emails to invite to the project.",
usernames: "A list of usernames to invite to the project." usernames: "A list of usernames to invite to the project.",
roleSlugs:
"A list of role slugs to assign to the newly created project membership. If nothing is provided, it will default to the Member role."
}, },
REMOVE_MEMBER: { REMOVE_MEMBER: {
projectId: "The ID of the project to remove the member from.", projectId: "The ID of the project to remove the member from.",
@@ -26,7 +26,8 @@ export const registerProjectMembershipRouter = async (server: FastifyZodProvider
}), }),
body: z.object({ body: z.object({
emails: z.string().email().array().default([]).describe(PROJECT_USERS.INVITE_MEMBER.emails), emails: z.string().email().array().default([]).describe(PROJECT_USERS.INVITE_MEMBER.emails),
usernames: z.string().array().default([]).describe(PROJECT_USERS.INVITE_MEMBER.usernames) usernames: z.string().array().default([]).describe(PROJECT_USERS.INVITE_MEMBER.usernames),
roleSlugs: z.string().array().optional().describe(PROJECT_USERS.INVITE_MEMBER.roleSlugs)
}), }),
response: { response: {
200: z.object({ 200: z.object({