mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2026-02-04 18:06:48 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ca624f052 | |||
| fc3ef6c893 |
@@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [0.31.0](https://github.com/Monadical-SAS/reflector/compare/v0.30.0...v0.31.0) (2026-01-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* mixdown optional ([#834](https://github.com/Monadical-SAS/reflector/issues/834)) ([fc3ef6c](https://github.com/Monadical-SAS/reflector/commit/fc3ef6c8933231c731fad84e7477a476a6220a5e))
|
||||||
|
|
||||||
## [0.30.0](https://github.com/Monadical-SAS/reflector/compare/v0.29.0...v0.30.0) (2026-01-23)
|
## [0.30.0](https://github.com/Monadical-SAS/reflector/compare/v0.29.0...v0.30.0) (2026-01-23)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1095,7 +1095,7 @@ async def identify_action_items(
|
|||||||
|
|
||||||
|
|
||||||
@daily_multitrack_pipeline.task(
|
@daily_multitrack_pipeline.task(
|
||||||
parents=[generate_waveform, generate_title, generate_recap, identify_action_items],
|
parents=[generate_title, generate_recap, identify_action_items],
|
||||||
execution_timeout=timedelta(seconds=TIMEOUT_SHORT),
|
execution_timeout=timedelta(seconds=TIMEOUT_SHORT),
|
||||||
retries=3,
|
retries=3,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -302,10 +302,10 @@ export default function RoomsList() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const platform: "whereby" | "daily" | null =
|
const platform: "whereby" | "daily" =
|
||||||
room.platform === "whereby" || room.platform === "daily"
|
room.platform === "whereby" || room.platform === "daily"
|
||||||
? room.platform
|
? room.platform
|
||||||
: null;
|
: "daily";
|
||||||
|
|
||||||
const roomData = {
|
const roomData = {
|
||||||
name: room.name,
|
name: room.name,
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import {
|
|||||||
import { useError } from "../../../../(errors)/errorContext";
|
import { useError } from "../../../../(errors)/errorContext";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { Box, Grid } from "@chakra-ui/react";
|
import { Box, Grid } from "@chakra-ui/react";
|
||||||
|
import { parseNonEmptyString } from "../../../../lib/utils";
|
||||||
|
|
||||||
export type TranscriptCorrect = {
|
export type TranscriptCorrect = {
|
||||||
params: Promise<{
|
params: Promise<{
|
||||||
@@ -25,8 +26,7 @@ export type TranscriptCorrect = {
|
|||||||
|
|
||||||
export default function TranscriptCorrect(props: TranscriptCorrect) {
|
export default function TranscriptCorrect(props: TranscriptCorrect) {
|
||||||
const params = use(props.params);
|
const params = use(props.params);
|
||||||
|
const transcriptId = parseNonEmptyString(params.transcriptId);
|
||||||
const { transcriptId } = params;
|
|
||||||
|
|
||||||
const updateTranscriptMutation = useTranscriptUpdate();
|
const updateTranscriptMutation = useTranscriptUpdate();
|
||||||
const transcript = useTranscriptGet(transcriptId);
|
const transcript = useTranscriptGet(transcriptId);
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ import React, { useEffect, useState, use } from "react";
|
|||||||
import FinalSummary from "./finalSummary";
|
import FinalSummary from "./finalSummary";
|
||||||
import TranscriptTitle from "../transcriptTitle";
|
import TranscriptTitle from "../transcriptTitle";
|
||||||
import Player from "../player";
|
import Player from "../player";
|
||||||
|
import { useWebSockets } from "../useWebSockets";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
import { parseNonEmptyString } from "../../../lib/utils";
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
Flex,
|
Flex,
|
||||||
@@ -30,7 +32,7 @@ type TranscriptDetails = {
|
|||||||
|
|
||||||
export default function TranscriptDetails(details: TranscriptDetails) {
|
export default function TranscriptDetails(details: TranscriptDetails) {
|
||||||
const params = use(details.params);
|
const params = use(details.params);
|
||||||
const transcriptId = params.transcriptId;
|
const transcriptId = parseNonEmptyString(params.transcriptId);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const statusToRedirect = [
|
const statusToRedirect = [
|
||||||
"idle",
|
"idle",
|
||||||
@@ -49,6 +51,7 @@ export default function TranscriptDetails(details: TranscriptDetails) {
|
|||||||
transcriptId,
|
transcriptId,
|
||||||
waiting || mp3.audioDeleted === true,
|
waiting || mp3.audioDeleted === true,
|
||||||
);
|
);
|
||||||
|
useWebSockets(transcriptId);
|
||||||
const useActiveTopic = useState<Topic | null>(null);
|
const useActiveTopic = useState<Topic | null>(null);
|
||||||
const [finalSummaryElement, setFinalSummaryElement] =
|
const [finalSummaryElement, setFinalSummaryElement] =
|
||||||
useState<HTMLDivElement | null>(null);
|
useState<HTMLDivElement | null>(null);
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import {
|
|||||||
} from "@chakra-ui/react";
|
} from "@chakra-ui/react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useTranscriptGet } from "../../../../lib/apiHooks";
|
import { useTranscriptGet } from "../../../../lib/apiHooks";
|
||||||
|
import { parseNonEmptyString } from "../../../../lib/utils";
|
||||||
|
|
||||||
type TranscriptProcessing = {
|
type TranscriptProcessing = {
|
||||||
params: Promise<{
|
params: Promise<{
|
||||||
@@ -19,7 +20,7 @@ type TranscriptProcessing = {
|
|||||||
|
|
||||||
export default function TranscriptProcessing(details: TranscriptProcessing) {
|
export default function TranscriptProcessing(details: TranscriptProcessing) {
|
||||||
const params = use(details.params);
|
const params = use(details.params);
|
||||||
const transcriptId = params.transcriptId;
|
const transcriptId = parseNonEmptyString(params.transcriptId);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const transcript = useTranscriptGet(transcriptId);
|
const transcript = useTranscriptGet(transcriptId);
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { Box, Text, Grid, Heading, VStack, Flex } from "@chakra-ui/react";
|
|||||||
import LiveTrancription from "../../liveTranscription";
|
import LiveTrancription from "../../liveTranscription";
|
||||||
import { useTranscriptGet } from "../../../../lib/apiHooks";
|
import { useTranscriptGet } from "../../../../lib/apiHooks";
|
||||||
import { TranscriptStatus } from "../../../../lib/transcript";
|
import { TranscriptStatus } from "../../../../lib/transcript";
|
||||||
|
import { parseNonEmptyString } from "../../../../lib/utils";
|
||||||
|
|
||||||
type TranscriptDetails = {
|
type TranscriptDetails = {
|
||||||
params: Promise<{
|
params: Promise<{
|
||||||
@@ -21,13 +22,14 @@ type TranscriptDetails = {
|
|||||||
|
|
||||||
const TranscriptRecord = (details: TranscriptDetails) => {
|
const TranscriptRecord = (details: TranscriptDetails) => {
|
||||||
const params = use(details.params);
|
const params = use(details.params);
|
||||||
const transcript = useTranscriptGet(params.transcriptId);
|
const transcriptId = parseNonEmptyString(params.transcriptId);
|
||||||
|
const transcript = useTranscriptGet(transcriptId);
|
||||||
const [transcriptStarted, setTranscriptStarted] = useState(false);
|
const [transcriptStarted, setTranscriptStarted] = useState(false);
|
||||||
const useActiveTopic = useState<Topic | null>(null);
|
const useActiveTopic = useState<Topic | null>(null);
|
||||||
|
|
||||||
const webSockets = useWebSockets(params.transcriptId);
|
const webSockets = useWebSockets(transcriptId);
|
||||||
|
|
||||||
const mp3 = useMp3(params.transcriptId, true);
|
const mp3 = useMp3(transcriptId, true);
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import useMp3 from "../../useMp3";
|
|||||||
import { Center, VStack, Text, Heading } from "@chakra-ui/react";
|
import { Center, VStack, Text, Heading } from "@chakra-ui/react";
|
||||||
import FileUploadButton from "../../fileUploadButton";
|
import FileUploadButton from "../../fileUploadButton";
|
||||||
import { useTranscriptGet } from "../../../../lib/apiHooks";
|
import { useTranscriptGet } from "../../../../lib/apiHooks";
|
||||||
|
import { parseNonEmptyString } from "../../../../lib/utils";
|
||||||
|
|
||||||
type TranscriptUpload = {
|
type TranscriptUpload = {
|
||||||
params: Promise<{
|
params: Promise<{
|
||||||
@@ -16,12 +17,13 @@ type TranscriptUpload = {
|
|||||||
|
|
||||||
const TranscriptUpload = (details: TranscriptUpload) => {
|
const TranscriptUpload = (details: TranscriptUpload) => {
|
||||||
const params = use(details.params);
|
const params = use(details.params);
|
||||||
const transcript = useTranscriptGet(params.transcriptId);
|
const transcriptId = parseNonEmptyString(params.transcriptId);
|
||||||
|
const transcript = useTranscriptGet(transcriptId);
|
||||||
const [transcriptStarted, setTranscriptStarted] = useState(false);
|
const [transcriptStarted, setTranscriptStarted] = useState(false);
|
||||||
|
|
||||||
const webSockets = useWebSockets(params.transcriptId);
|
const webSockets = useWebSockets(transcriptId);
|
||||||
|
|
||||||
const mp3 = useMp3(params.transcriptId, true);
|
const mp3 = useMp3(transcriptId, true);
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import type { components } from "../../reflector-api";
|
import type { components } from "../../reflector-api";
|
||||||
|
import { parseMaybeNonEmptyString } from "../../lib/utils";
|
||||||
|
|
||||||
type UpdateTranscript = components["schemas"]["UpdateTranscript"];
|
type UpdateTranscript = components["schemas"]["UpdateTranscript"];
|
||||||
type GetTranscriptWithParticipants =
|
type GetTranscriptWithParticipants =
|
||||||
@@ -32,7 +33,7 @@ const TranscriptTitle = (props: TranscriptTitle) => {
|
|||||||
const [isEditing, setIsEditing] = useState(false);
|
const [isEditing, setIsEditing] = useState(false);
|
||||||
const updateTranscriptMutation = useTranscriptUpdate();
|
const updateTranscriptMutation = useTranscriptUpdate();
|
||||||
const participantsQuery = useTranscriptParticipants(
|
const participantsQuery = useTranscriptParticipants(
|
||||||
props.transcript?.id || null,
|
props.transcript?.id ? parseMaybeNonEmptyString(props.transcript.id) : null,
|
||||||
);
|
);
|
||||||
|
|
||||||
const updateTitle = async (newTitle: string, transcriptId: string) => {
|
const updateTitle = async (newTitle: string, transcriptId: string) => {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useTranscriptGet } from "../../lib/apiHooks";
|
import { useTranscriptGet } from "../../lib/apiHooks";
|
||||||
|
import { parseMaybeNonEmptyString } from "../../lib/utils";
|
||||||
import { useAuth } from "../../lib/AuthProvider";
|
import { useAuth } from "../../lib/AuthProvider";
|
||||||
import { API_URL } from "../../lib/apiClient";
|
import { API_URL } from "../../lib/apiClient";
|
||||||
|
|
||||||
@@ -27,7 +28,7 @@ const useMp3 = (transcriptId: string, waiting?: boolean): Mp3Response => {
|
|||||||
data: transcript,
|
data: transcript,
|
||||||
isLoading: transcriptMetadataLoading,
|
isLoading: transcriptMetadataLoading,
|
||||||
error: transcriptError,
|
error: transcriptError,
|
||||||
} = useTranscriptGet(later ? null : transcriptId);
|
} = useTranscriptGet(later ? null : parseMaybeNonEmptyString(transcriptId));
|
||||||
|
|
||||||
const [serviceWorker, setServiceWorker] =
|
const [serviceWorker, setServiceWorker] =
|
||||||
useState<ServiceWorkerRegistration | null>(null);
|
useState<ServiceWorkerRegistration | null>(null);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import type { components } from "../../reflector-api";
|
import type { components } from "../../reflector-api";
|
||||||
type Participant = components["schemas"]["Participant"];
|
type Participant = components["schemas"]["Participant"];
|
||||||
import { useTranscriptParticipants } from "../../lib/apiHooks";
|
import { useTranscriptParticipants } from "../../lib/apiHooks";
|
||||||
|
import { parseMaybeNonEmptyString } from "../../lib/utils";
|
||||||
|
|
||||||
type ErrorParticipants = {
|
type ErrorParticipants = {
|
||||||
error: Error;
|
error: Error;
|
||||||
@@ -32,7 +33,7 @@ const useParticipants = (transcriptId: string): UseParticipants => {
|
|||||||
isLoading: loading,
|
isLoading: loading,
|
||||||
error,
|
error,
|
||||||
refetch,
|
refetch,
|
||||||
} = useTranscriptParticipants(transcriptId || null);
|
} = useTranscriptParticipants(parseMaybeNonEmptyString(transcriptId));
|
||||||
|
|
||||||
// Type-safe return based on state
|
// Type-safe return based on state
|
||||||
if (error) {
|
if (error) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import type { components } from "../../reflector-api";
|
import type { components } from "../../reflector-api";
|
||||||
import { useTranscriptTopicsWithWordsPerSpeaker } from "../../lib/apiHooks";
|
import { useTranscriptTopicsWithWordsPerSpeaker } from "../../lib/apiHooks";
|
||||||
|
import { parseMaybeNonEmptyString } from "../../lib/utils";
|
||||||
|
|
||||||
type GetTranscriptTopicWithWordsPerSpeaker =
|
type GetTranscriptTopicWithWordsPerSpeaker =
|
||||||
components["schemas"]["GetTranscriptTopicWithWordsPerSpeaker"];
|
components["schemas"]["GetTranscriptTopicWithWordsPerSpeaker"];
|
||||||
@@ -38,7 +39,7 @@ const useTopicWithWords = (
|
|||||||
error,
|
error,
|
||||||
refetch,
|
refetch,
|
||||||
} = useTranscriptTopicsWithWordsPerSpeaker(
|
} = useTranscriptTopicsWithWordsPerSpeaker(
|
||||||
transcriptId || null,
|
parseMaybeNonEmptyString(transcriptId),
|
||||||
topicId || null,
|
topicId || null,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { useTranscriptTopics } from "../../lib/apiHooks";
|
import { useTranscriptTopics } from "../../lib/apiHooks";
|
||||||
import type { components } from "../../reflector-api";
|
import type { components } from "../../reflector-api";
|
||||||
|
import { parseMaybeNonEmptyString } from "../../lib/utils";
|
||||||
|
|
||||||
type GetTranscriptTopic = components["schemas"]["GetTranscriptTopic"];
|
type GetTranscriptTopic = components["schemas"]["GetTranscriptTopic"];
|
||||||
|
|
||||||
@@ -10,7 +11,11 @@ type TranscriptTopics = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const useTopics = (id: string): TranscriptTopics => {
|
const useTopics = (id: string): TranscriptTopics => {
|
||||||
const { data: topics, isLoading: loading, error } = useTranscriptTopics(id);
|
const {
|
||||||
|
data: topics,
|
||||||
|
isLoading: loading,
|
||||||
|
error,
|
||||||
|
} = useTranscriptTopics(parseMaybeNonEmptyString(id));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
topics: topics || null,
|
topics: topics || null,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import type { components } from "../../reflector-api";
|
import type { components } from "../../reflector-api";
|
||||||
import { useTranscriptWaveform } from "../../lib/apiHooks";
|
import { useTranscriptWaveform } from "../../lib/apiHooks";
|
||||||
|
import { parseMaybeNonEmptyString } from "../../lib/utils";
|
||||||
|
|
||||||
type AudioWaveform = components["schemas"]["AudioWaveform"];
|
type AudioWaveform = components["schemas"]["AudioWaveform"];
|
||||||
|
|
||||||
@@ -14,7 +15,7 @@ const useWaveform = (id: string, skip: boolean): AudioWaveFormResponse => {
|
|||||||
data: waveform,
|
data: waveform,
|
||||||
isLoading: loading,
|
isLoading: loading,
|
||||||
error,
|
error,
|
||||||
} = useTranscriptWaveform(skip ? null : id);
|
} = useTranscriptWaveform(skip ? null : parseMaybeNonEmptyString(id));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
waveform: waveform || null,
|
waveform: waveform || null,
|
||||||
|
|||||||
@@ -7,6 +7,12 @@ type GetTranscriptSegmentTopic =
|
|||||||
components["schemas"]["GetTranscriptSegmentTopic"];
|
components["schemas"]["GetTranscriptSegmentTopic"];
|
||||||
import { useQueryClient } from "@tanstack/react-query";
|
import { useQueryClient } from "@tanstack/react-query";
|
||||||
import { $api, WEBSOCKET_URL } from "../../lib/apiClient";
|
import { $api, WEBSOCKET_URL } from "../../lib/apiClient";
|
||||||
|
import {
|
||||||
|
invalidateTranscript,
|
||||||
|
invalidateTranscriptTopics,
|
||||||
|
invalidateTranscriptWaveform,
|
||||||
|
} from "../../lib/apiHooks";
|
||||||
|
import { NonEmptyString } from "../../lib/utils";
|
||||||
|
|
||||||
export type UseWebSockets = {
|
export type UseWebSockets = {
|
||||||
transcriptTextLive: string;
|
transcriptTextLive: string;
|
||||||
@@ -369,15 +375,10 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
});
|
});
|
||||||
console.debug("TOPIC event:", message.data);
|
console.debug("TOPIC event:", message.data);
|
||||||
// Invalidate topics query to sync with WebSocket data
|
// Invalidate topics query to sync with WebSocket data
|
||||||
queryClient.invalidateQueries({
|
invalidateTranscriptTopics(
|
||||||
queryKey: $api.queryOptions(
|
queryClient,
|
||||||
"get",
|
transcriptId as NonEmptyString,
|
||||||
"/v1/transcripts/{transcript_id}/topics",
|
);
|
||||||
{
|
|
||||||
params: { path: { transcript_id: transcriptId } },
|
|
||||||
},
|
|
||||||
).queryKey,
|
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "FINAL_SHORT_SUMMARY":
|
case "FINAL_SHORT_SUMMARY":
|
||||||
@@ -388,15 +389,7 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
if (message.data) {
|
if (message.data) {
|
||||||
setFinalSummary(message.data);
|
setFinalSummary(message.data);
|
||||||
// Invalidate transcript query to sync summary
|
// Invalidate transcript query to sync summary
|
||||||
queryClient.invalidateQueries({
|
invalidateTranscript(queryClient, transcriptId as NonEmptyString);
|
||||||
queryKey: $api.queryOptions(
|
|
||||||
"get",
|
|
||||||
"/v1/transcripts/{transcript_id}",
|
|
||||||
{
|
|
||||||
params: { path: { transcript_id: transcriptId } },
|
|
||||||
},
|
|
||||||
).queryKey,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -405,15 +398,7 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
if (message.data) {
|
if (message.data) {
|
||||||
setTitle(message.data.title);
|
setTitle(message.data.title);
|
||||||
// Invalidate transcript query to sync title
|
// Invalidate transcript query to sync title
|
||||||
queryClient.invalidateQueries({
|
invalidateTranscript(queryClient, transcriptId as NonEmptyString);
|
||||||
queryKey: $api.queryOptions(
|
|
||||||
"get",
|
|
||||||
"/v1/transcripts/{transcript_id}",
|
|
||||||
{
|
|
||||||
params: { path: { transcript_id: transcriptId } },
|
|
||||||
},
|
|
||||||
).queryKey,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -424,6 +409,10 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
);
|
);
|
||||||
if (message.data) {
|
if (message.data) {
|
||||||
setWaveForm(message.data.waveform);
|
setWaveForm(message.data.waveform);
|
||||||
|
invalidateTranscriptWaveform(
|
||||||
|
queryClient,
|
||||||
|
transcriptId as NonEmptyString,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "DURATION":
|
case "DURATION":
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import { useRouter } from "next/navigation";
|
|||||||
import { formatDateTime, formatStartedAgo } from "../lib/timeUtils";
|
import { formatDateTime, formatStartedAgo } from "../lib/timeUtils";
|
||||||
import MeetingMinimalHeader from "../components/MeetingMinimalHeader";
|
import MeetingMinimalHeader from "../components/MeetingMinimalHeader";
|
||||||
import { NonEmptyString } from "../lib/utils";
|
import { NonEmptyString } from "../lib/utils";
|
||||||
import { MeetingId } from "../lib/types";
|
import { MeetingId, assertMeetingId } from "../lib/types";
|
||||||
|
|
||||||
type Meeting = components["schemas"]["Meeting"];
|
type Meeting = components["schemas"]["Meeting"];
|
||||||
|
|
||||||
@@ -315,7 +315,9 @@ export default function MeetingSelection({
|
|||||||
variant="outline"
|
variant="outline"
|
||||||
colorScheme="red"
|
colorScheme="red"
|
||||||
size="md"
|
size="md"
|
||||||
onClick={() => handleEndMeeting(meeting.id)}
|
onClick={() =>
|
||||||
|
handleEndMeeting(assertMeetingId(meeting.id))
|
||||||
|
}
|
||||||
loading={deactivateMeetingMutation.isPending}
|
loading={deactivateMeetingMutation.isPending}
|
||||||
>
|
>
|
||||||
<Icon as={LuX} me={2} />
|
<Icon as={LuX} me={2} />
|
||||||
@@ -460,7 +462,9 @@ export default function MeetingSelection({
|
|||||||
variant="outline"
|
variant="outline"
|
||||||
colorScheme="red"
|
colorScheme="red"
|
||||||
size="md"
|
size="md"
|
||||||
onClick={() => handleEndMeeting(meeting.id)}
|
onClick={() =>
|
||||||
|
handleEndMeeting(assertMeetingId(meeting.id))
|
||||||
|
}
|
||||||
loading={deactivateMeetingMutation.isPending}
|
loading={deactivateMeetingMutation.isPending}
|
||||||
>
|
>
|
||||||
<Icon as={LuX} me={2} />
|
<Icon as={LuX} me={2} />
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { QueryClient, useQueryClient } from "@tanstack/react-query";
|
|||||||
import type { components } from "../reflector-api";
|
import type { components } from "../reflector-api";
|
||||||
import { useAuth } from "./AuthProvider";
|
import { useAuth } from "./AuthProvider";
|
||||||
import { MeetingId } from "./types";
|
import { MeetingId } from "./types";
|
||||||
|
import { NonEmptyString } from "./utils";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX error types returned from the hooks are not always correct; declared types are ValidationError but real type could be string or any other
|
* XXX error types returned from the hooks are not always correct; declared types are ValidationError but real type could be string or any other
|
||||||
@@ -103,7 +104,7 @@ export function useTranscriptProcess() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useTranscriptGet(transcriptId: string | null) {
|
export function useTranscriptGet(transcriptId: NonEmptyString | null) {
|
||||||
return $api.useQuery(
|
return $api.useQuery(
|
||||||
"get",
|
"get",
|
||||||
"/v1/transcripts/{transcript_id}",
|
"/v1/transcripts/{transcript_id}",
|
||||||
@@ -120,6 +121,16 @@ export function useTranscriptGet(transcriptId: string | null) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const invalidateTranscript = (
|
||||||
|
queryClient: QueryClient,
|
||||||
|
transcriptId: NonEmptyString,
|
||||||
|
) =>
|
||||||
|
queryClient.invalidateQueries({
|
||||||
|
queryKey: $api.queryOptions("get", "/v1/transcripts/{transcript_id}", {
|
||||||
|
params: { path: { transcript_id: transcriptId } },
|
||||||
|
}).queryKey,
|
||||||
|
});
|
||||||
|
|
||||||
export function useRoomGet(roomId: string | null) {
|
export function useRoomGet(roomId: string | null) {
|
||||||
const { isAuthenticated } = useAuthReady();
|
const { isAuthenticated } = useAuthReady();
|
||||||
|
|
||||||
@@ -297,7 +308,7 @@ export function useTranscriptUploadAudio() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useTranscriptWaveform(transcriptId: string | null) {
|
export function useTranscriptWaveform(transcriptId: NonEmptyString | null) {
|
||||||
return $api.useQuery(
|
return $api.useQuery(
|
||||||
"get",
|
"get",
|
||||||
"/v1/transcripts/{transcript_id}/audio/waveform",
|
"/v1/transcripts/{transcript_id}/audio/waveform",
|
||||||
@@ -312,7 +323,21 @@ export function useTranscriptWaveform(transcriptId: string | null) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useTranscriptMP3(transcriptId: string | null) {
|
export const invalidateTranscriptWaveform = (
|
||||||
|
queryClient: QueryClient,
|
||||||
|
transcriptId: NonEmptyString,
|
||||||
|
) =>
|
||||||
|
queryClient.invalidateQueries({
|
||||||
|
queryKey: $api.queryOptions(
|
||||||
|
"get",
|
||||||
|
"/v1/transcripts/{transcript_id}/audio/waveform",
|
||||||
|
{
|
||||||
|
params: { path: { transcript_id: transcriptId } },
|
||||||
|
},
|
||||||
|
).queryKey,
|
||||||
|
});
|
||||||
|
|
||||||
|
export function useTranscriptMP3(transcriptId: NonEmptyString | null) {
|
||||||
const { isAuthenticated } = useAuthReady();
|
const { isAuthenticated } = useAuthReady();
|
||||||
|
|
||||||
return $api.useQuery(
|
return $api.useQuery(
|
||||||
@@ -329,7 +354,7 @@ export function useTranscriptMP3(transcriptId: string | null) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useTranscriptTopics(transcriptId: string | null) {
|
export function useTranscriptTopics(transcriptId: NonEmptyString | null) {
|
||||||
return $api.useQuery(
|
return $api.useQuery(
|
||||||
"get",
|
"get",
|
||||||
"/v1/transcripts/{transcript_id}/topics",
|
"/v1/transcripts/{transcript_id}/topics",
|
||||||
@@ -344,7 +369,23 @@ export function useTranscriptTopics(transcriptId: string | null) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useTranscriptTopicsWithWords(transcriptId: string | null) {
|
export const invalidateTranscriptTopics = (
|
||||||
|
queryClient: QueryClient,
|
||||||
|
transcriptId: NonEmptyString,
|
||||||
|
) =>
|
||||||
|
queryClient.invalidateQueries({
|
||||||
|
queryKey: $api.queryOptions(
|
||||||
|
"get",
|
||||||
|
"/v1/transcripts/{transcript_id}/topics",
|
||||||
|
{
|
||||||
|
params: { path: { transcript_id: transcriptId } },
|
||||||
|
},
|
||||||
|
).queryKey,
|
||||||
|
});
|
||||||
|
|
||||||
|
export function useTranscriptTopicsWithWords(
|
||||||
|
transcriptId: NonEmptyString | null,
|
||||||
|
) {
|
||||||
const { isAuthenticated } = useAuthReady();
|
const { isAuthenticated } = useAuthReady();
|
||||||
|
|
||||||
return $api.useQuery(
|
return $api.useQuery(
|
||||||
@@ -362,7 +403,7 @@ export function useTranscriptTopicsWithWords(transcriptId: string | null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function useTranscriptTopicsWithWordsPerSpeaker(
|
export function useTranscriptTopicsWithWordsPerSpeaker(
|
||||||
transcriptId: string | null,
|
transcriptId: NonEmptyString | null,
|
||||||
topicId: string | null,
|
topicId: string | null,
|
||||||
) {
|
) {
|
||||||
const { isAuthenticated } = useAuthReady();
|
const { isAuthenticated } = useAuthReady();
|
||||||
@@ -384,7 +425,7 @@ export function useTranscriptTopicsWithWordsPerSpeaker(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useTranscriptParticipants(transcriptId: string | null) {
|
export function useTranscriptParticipants(transcriptId: NonEmptyString | null) {
|
||||||
const { isAuthenticated } = useAuthReady();
|
const { isAuthenticated } = useAuthReady();
|
||||||
|
|
||||||
return $api.useQuery(
|
return $api.useQuery(
|
||||||
|
|||||||
Reference in New Issue
Block a user