refactor(shared): rename PatchInviteRequest → UpdateInviteRequest + JSDoc

Matches existing codebase convention (UpdateChannelRequest,
UpdateSpaceRequest, etc.). Adds JSDoc on InviteStatus and
InviteLinkSummary.url / createdByUsername fields with server-side
semantics. Plan updated for downstream task naming consistency.
This commit is contained in:
Jannis Braun
2026-04-28 19:50:05 +02:00
parent 884b3d9fe9
commit e984ce910c
+4 -1
View File
@@ -1135,6 +1135,7 @@ export interface ApprovalRequest {
// ─── Invite Links ────────────────────────────────────────────────────────── // ─── Invite Links ──────────────────────────────────────────────────────────
/** Derived status of an invite link. Active = usable; expired/exhausted/revoked = archived. */
export type InviteStatus = 'active' | 'expired' | 'exhausted' | 'revoked'; export type InviteStatus = 'active' | 'expired' | 'exhausted' | 'revoked';
export interface InviteLinkSummary { export interface InviteLinkSummary {
@@ -1147,8 +1148,10 @@ export interface InviteLinkSummary {
expiresAt: number | null; expiresAt: number | null;
revokedAt: number | null; revokedAt: number | null;
createdBy: string; createdBy: string;
/** Joined from users.username at read time. `'Deleted User'` when the creator's account is tombstoned. `null` only if the FK is somehow unresolvable (defensive). */
createdByUsername: string | null; createdByUsername: string | null;
createdAt: number; createdAt: number;
/** Server-constructed full URL, e.g. `https://host.example/register?invite=<token>`. Clients must NOT assemble this themselves. */
url: string; url: string;
} }
@@ -1167,7 +1170,7 @@ export interface CreateInviteRequest {
expiresAt: number | null; expiresAt: number | null;
} }
export interface PatchInviteRequest { export interface UpdateInviteRequest {
name?: string; name?: string;
maxUses?: number | null; maxUses?: number | null;
expiresAt?: number | null; expiresAt?: number | null;