From 134c70f87fda31d778dabcd1af0c5ca15f393ffa Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Mon, 15 Dec 2025 19:36:54 +0000 Subject: [PATCH] feat: add updateInvite request/response schemas --- surfsense_web/contracts/types/rbac.types.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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;