diff --git a/surfsense_web/contracts/types/rbac.types.ts b/surfsense_web/contracts/types/rbac.types.ts index f00d9fa52..9cfe6dcdb 100644 --- a/surfsense_web/contracts/types/rbac.types.ts +++ b/surfsense_web/contracts/types/rbac.types.ts @@ -183,6 +183,23 @@ export const getInvitesRequest = z.object({ export const getInvitesResponse = z.array(invite); +/** + * Update invite + */ +export const updateInviteRequest = z.object({ + search_space_id: z.number(), + invite_id: z.number(), + data: z.object({ + name: z.string().max(100).optional(), + role_id: z.number().nullable().optional(), + expires_at: z.string().nullable().optional(), + max_uses: z.number().nullable().optional(), + is_active: z.boolean().optional(), + }), +}); + +export const updateInviteResponse = invite; + export type Role = z.infer; export type Membership = z.infer; export type Invite = z.infer; @@ -210,3 +227,5 @@ export type CreateInviteRequest = z.infer; export type CreateInviteResponse = z.infer; export type GetInvitesRequest = z.infer; export type GetInvitesResponse = z.infer; +export type UpdateInviteRequest = z.infer; +export type UpdateInviteResponse = z.infer;