add invitations tab to members page

This commit is contained in:
Gregor Vostrak
2024-04-15 23:45:27 +02:00
parent c30763d718
commit e4bf56d55d
11 changed files with 165 additions and 14 deletions

View File

@@ -14,7 +14,7 @@ const importData_Body = z
.object({ type: z.string(), data: z.string() })
.passthrough();
const InvitationResource = z
.object({ id: z.string(), user_id: z.string(), name: z.string() })
.object({ id: z.string(), email: z.string(), role: z.string() })
.passthrough();
const Role = z.enum(['owner', 'admin', 'manager', 'employee', 'placeholder']);
const invite_Body = z
@@ -449,7 +449,10 @@ const endpoints = makeApi([
errors: [
{
status: 400,
schema: z.object({ message: z.string() }).passthrough(),
schema: z.union([
z.object({ message: z.string() }).passthrough(),
z.object({ message: z.string() }).passthrough(),
]),
},
{
status: 403,