Enforce 10-minute TTL for generated company invites

This commit is contained in:
Dotta
2026-03-06 10:10:23 -06:00
parent c3ac209e5f
commit 0f895a8cf9
6 changed files with 19 additions and 7 deletions

View File

@@ -69,7 +69,6 @@ export const accessApi = {
companyId: string,
input: {
allowedJoinTypes?: "human" | "agent" | "both";
expiresInHours?: number;
defaultsPayload?: Record<string, unknown> | null;
agentMessage?: string | null;
} = {},

View File

@@ -78,8 +78,7 @@ export function CompanySettings() {
const inviteMutation = useMutation({
mutationFn: () =>
accessApi.createCompanyInvite(selectedCompanyId!, {
allowedJoinTypes: "agent",
expiresInHours: 72
allowedJoinTypes: "agent"
}),
onSuccess: async (invite) => {
setInviteError(null);
@@ -320,7 +319,7 @@ export function CompanySettings() {
<span className="text-xs text-muted-foreground">
Generate an agent snippet for join flows.
</span>
<HintIcon text="Creates an agent-only invite (72h) and renders a copy-ready snippet." />
<HintIcon text="Creates an agent-only invite (10m) and renders a copy-ready snippet." />
</div>
<div className="flex flex-wrap items-center gap-2">
<Button