VoiceRepository
app/features/voice/VoiceRepository.server.ts- Tables
- ChatRoomGroupGroupMatchGroupMemberUserUserSubmittedImageVoiceClientErrorVoiceFeedbackVoiceSessionVoiceSettings
- Calls
- no other repositories
- Imports
- no other modules
- Used by
- 1 loader1 action3 routes2 modules1 routine1 other
Functions & values
export async function hasFeedbackSince({ userId, since, }: { userId: number; since: number; })
TablesVoiceFeedback
Routes/api/voice/rooms/:id
export async function hasBeenKicked({ roomId, userId, }: { roomId: number; userId: number; })
TablesVoiceSession
Routes/api/voice/rooms/:id
export function findOwnSessionById(id: number)
TablesVoiceSession
export function findPlayerAdoptionSince(since: number)
Loaders/admin/voice
export function findVoiceChatPreferenceStatsSince(since: number)
TablesVoiceSession
Loaders/admin/voice
export function findLatestClientErrors()
Loaders/admin/voice
export function findLatestFeedbackComments()
Loaders/admin/voice
export async function insertOwnSession( args: Pick< TablesInsertable["VoiceSession"], "roomId" | "roomType" | "platform" | "eligibleMemberCount" | "vcPreference" >, )
TablesVoiceSession
export async function markOwnSessionConnected({ id, dailySessionId, }: { id: number; dailySessionId: string; })
TablesVoiceSession
export async function updateOwnSessionSummary({ id, ...summary }: Pick< Tables["VoiceSession"], "id" | "lowQualitySeconds" | "talkSeconds" | "inputMode" >)
TablesVoiceSession
Routes/api/voice/telemetry
export async function markOwnSessionLeft({ id, leaveReason, }: { id: number; leaveReason: VoiceLeaveReason; })
TablesVoiceSession
Routes/api/voice/rooms/:id
Ends the users open sessions of the room, for when they are taken out of the call rather than leaving it.
export async function markSessionsLeft({ roomId, userIds, leaveReason, }: { roomId: number; userIds: number[]; leaveReason: Extract<VoiceLeaveReason, "KICKED" | "EJECTED">; })
TablesVoiceSession
Routes/api/voice/rooms/:id
Modulesvoice/VoiceEject.server.ts
Whether the user is in the rooms call through a Daily session other than the given one, like after rejoining.
export async function hasOtherConnectedSession({ roomId, userId, dailySessionId, }: { roomId: number; userId: number; dailySessionId: string; })
TablesVoiceSession
Routes/api/voice/webhook
export async function updateFromLeftWebhook({ dailySessionId, durationSeconds, networkQualityState, leftAt, }: { dailySessionId: string; durationSeconds: number; networkQualityState: Tables["VoiceSession"]["networkQualityState"]; leftAt: number; })
TablesVoiceSession
Unit tests (2)
Routes/api/voice/webhook
export async function insertOwnClientError( args: Omit<TablesInsertable["VoiceClientError"], "userId" | "createdAt">, )
TablesVoiceClientError
Routes/api/voice/telemetry
export async function insertOwnFeedback( args: Pick< TablesInsertable["VoiceFeedback"], "voiceSessionId" | "rating" | "comment" >, )
TablesVoiceFeedback
Routes/api/voice/telemetry
export async function updateSettings({ isDisabled }: { isDisabled: boolean })
TablesVoiceSettings
Actions/admin/voice
export async function deleteOlderThan({ sessionsBefore, errorsBefore, }: { sessionsBefore: number; errorsBefore: number; })