feat(shared): add SpaceInviteRequest / SpaceInviteResponse / SpaceInviteSystemPayload

This commit is contained in:
Jannis Braun
2026-04-29 21:34:07 +02:00
parent 889dfe9b4a
commit 855410f88c
+35
View File
@@ -599,6 +599,41 @@ export interface CreateDmMessageRequest {
replyToId?: string;
}
// ─── Space Invite via DM ────────────────────────────────────────────────────
export interface SpaceInviteRequest {
/** Caller-supplied target friend identity. Either local userId, or remote (homeUserId+homeInstance). */
target: { userId: string } | { homeUserId: string; homeInstance: string };
/** Space identifier on the space's home instance. */
spaceId: string;
/** Space's home instance origin. Empty string for the caller's home. */
spaceInstanceOrigin: string;
/** Per-space invite code (already issued; client passes whatever it has loaded). */
inviteCode: string;
}
export interface SpaceInviteResponse {
dmChannelId: string;
messageId: string;
message: DmMessageWithUser;
}
/** JSON content shape for type='system' space_invite messages. */
export interface SpaceInviteSystemPayload {
event: 'space_invite';
spaceId: string;
spaceInstanceOrigin: string;
inviteCode: string;
snapshot: {
spaceName: string;
icon: string | null;
avatarColor: AvatarColor | null;
memberCount: number;
description: string | null;
instanceName: string;
};
}
export interface PaginatedQuery {
before?: string;
limit?: number;