From 1be544bbd512ebcc910f30ca387928345884b6b0 Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Tue, 21 Apr 2026 13:33:52 +0200 Subject: [PATCH] feat(shared): add dm_call_undeliverable event type --- packages/shared/src/types.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/shared/src/types.ts b/packages/shared/src/types.ts index 24b452e9..0d8c123a 100644 --- a/packages/shared/src/types.ts +++ b/packages/shared/src/types.ts @@ -358,6 +358,19 @@ export interface Activity { // ─── WebSocket Event Types ────────────────────────────────────────────────── +export type DmCallUndeliverableReason = + | 'peer_rejected' + | 'peer_awaiting_approval' + | 'peer_transient_failure' + | 'livekit_unavailable'; + +export interface DmCallUndeliverableFailure { + reason: DmCallUndeliverableReason; + peerOrigin?: string; + peerLabel?: string; + affectedUserIds?: string[]; +} + // Client → Server Events export type ClientEvent = | { type: 'auth'; token: string } @@ -413,6 +426,7 @@ export type ServerEvent = | { type: 'dm_call_accepted'; dmChannelId: string | null; federatedCallId?: string } | { type: 'dm_call_rejected'; dmChannelId: string } | { type: 'dm_call_ended'; dmChannelId: string } + | { type: 'dm_call_undeliverable'; dmChannelId: string | null; federatedCallId: string; terminal: boolean; failures: DmCallUndeliverableFailure[] } | { type: 'voice_status_update'; userId: string; channelId: string; isMuted: boolean; isDeafened: boolean; isCameraOn: boolean; isScreenSharing: boolean } | { type: 'dm_channel_created'; dmChannel: DmChannel } | { type: 'dm_channel_closed'; dmChannelId: string }