mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 12:49:06 +00:00
Merge pull request #343 from Monadical-SAS/exp-move-to-openapi-typescript-codegen
Upload file / NextJS 14 / Move to openapi typescript codegen
This commit is contained in:
@@ -24,6 +24,11 @@ It also uses https://github.com/fief-dev for authentication, and Vercel for depl
|
|||||||
- [Back-End](#back-end)
|
- [Back-End](#back-end)
|
||||||
- [Installation](#installation-1)
|
- [Installation](#installation-1)
|
||||||
- [Start the API/Backend](#start-the-apibackend)
|
- [Start the API/Backend](#start-the-apibackend)
|
||||||
|
- [Redis (Mac)](#redis-mac)
|
||||||
|
- [Redis (Windows)](#redis-windows)
|
||||||
|
- [Update the database schema (run on first install, and after each pull containing a migration)](#update-the-database-schema-run-on-first-install-and-after-each-pull-containing-a-migration)
|
||||||
|
- [Main Server](#main-server)
|
||||||
|
- [Crontab (optional)](#crontab-optional)
|
||||||
- [Using docker](#using-docker)
|
- [Using docker](#using-docker)
|
||||||
- [Using local GPT4All](#using-local-gpt4all)
|
- [Using local GPT4All](#using-local-gpt4all)
|
||||||
- [Using local files](#using-local-files)
|
- [Using local files](#using-local-files)
|
||||||
@@ -152,7 +157,7 @@ redis-server
|
|||||||
## Update the database schema (run on first install, and after each pull containing a migration)
|
## Update the database schema (run on first install, and after each pull containing a migration)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
poetry run python alembic head
|
poetry run alembic heads
|
||||||
```
|
```
|
||||||
|
|
||||||
## Main Server
|
## Main Server
|
||||||
|
|||||||
@@ -72,18 +72,18 @@ export default function TranscriptBrowser() {
|
|||||||
<></>
|
<></>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{item.sourceLanguage ? (
|
{item.source_language ? (
|
||||||
<div className="inline-block bg-blue-500 text-white px-2 py-1 rounded-full text-xs font-semibold">
|
<div className="inline-block bg-blue-500 text-white px-2 py-1 rounded-full text-xs font-semibold">
|
||||||
{item.sourceLanguage}
|
{item.source_language}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<></>
|
<></>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="text-xs text-gray-700">
|
<div className="text-xs text-gray-700">
|
||||||
{new Date(item.createdAt).toLocaleDateString("en-US")}
|
{new Date(item.created_at).toLocaleDateString("en-US")}
|
||||||
</div>
|
</div>
|
||||||
<div className="text-sm">{item.shortSummary}</div>
|
<div className="text-sm">{item.short_summary}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import "../styles/globals.scss";
|
import "../styles/globals.scss";
|
||||||
import { Poppins } from "next/font/google";
|
import { Poppins } from "next/font/google";
|
||||||
import { Metadata } from "next";
|
import { Metadata, Viewport } from "next";
|
||||||
import FiefWrapper from "../(auth)/fiefWrapper";
|
import FiefWrapper from "../(auth)/fiefWrapper";
|
||||||
import UserInfo from "../(auth)/userInfo";
|
import UserInfo from "../(auth)/userInfo";
|
||||||
import { ErrorProvider } from "../(errors)/errorContext";
|
import { ErrorProvider } from "../(errors)/errorContext";
|
||||||
@@ -17,7 +17,15 @@ import { SESSION_COOKIE_NAME } from "../lib/fief";
|
|||||||
|
|
||||||
const poppins = Poppins({ subsets: ["latin"], weight: ["200", "400", "600"] });
|
const poppins = Poppins({ subsets: ["latin"], weight: ["200", "400", "600"] });
|
||||||
|
|
||||||
|
export const viewport: Viewport = {
|
||||||
|
themeColor: "black",
|
||||||
|
width: "device-width",
|
||||||
|
initialScale: 1,
|
||||||
|
maximumScale: 1,
|
||||||
|
};
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
|
metadataBase: new URL(process.env.DEV_URL || "https://reflector.media"),
|
||||||
title: {
|
title: {
|
||||||
template: "%s – Reflector",
|
template: "%s – Reflector",
|
||||||
default: "Reflector - AI-Powered Meeting Transcriptions by Monadical",
|
default: "Reflector - AI-Powered Meeting Transcriptions by Monadical",
|
||||||
@@ -54,12 +62,6 @@ export const metadata: Metadata = {
|
|||||||
shortcut: "/r-icon.png",
|
shortcut: "/r-icon.png",
|
||||||
apple: "/r-icon.png",
|
apple: "/r-icon.png",
|
||||||
},
|
},
|
||||||
viewport: {
|
|
||||||
width: "device-width",
|
|
||||||
initialScale: 1,
|
|
||||||
maximumScale: 1,
|
|
||||||
},
|
|
||||||
|
|
||||||
robots: { index: false, follow: false, noarchive: true, noimageindex: true },
|
robots: { index: false, follow: false, noarchive: true, noimageindex: true },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -16,9 +16,8 @@ import ShareModal from "./shareModal";
|
|||||||
import Player from "../player";
|
import Player from "../player";
|
||||||
import WaveformLoading from "../waveformLoading";
|
import WaveformLoading from "../waveformLoading";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { faSpinner } from "@fortawesome/free-solid-svg-icons";
|
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
||||||
import { featureEnabled } from "../../domainContext";
|
import { featureEnabled } from "../../domainContext";
|
||||||
|
import { toShareMode } from "../../../lib/shareMode";
|
||||||
|
|
||||||
type TranscriptDetails = {
|
type TranscriptDetails = {
|
||||||
params: {
|
params: {
|
||||||
@@ -91,7 +90,7 @@ export default function TranscriptDetails(details: TranscriptDetails) {
|
|||||||
<Player
|
<Player
|
||||||
topics={topics?.topics || []}
|
topics={topics?.topics || []}
|
||||||
useActiveTopic={useActiveTopic}
|
useActiveTopic={useActiveTopic}
|
||||||
waveform={waveform.waveform.data}
|
waveform={waveform.waveform}
|
||||||
media={mp3.media}
|
media={mp3.media}
|
||||||
mediaDuration={transcript.response.duration}
|
mediaDuration={transcript.response.duration}
|
||||||
/>
|
/>
|
||||||
@@ -110,10 +109,10 @@ export default function TranscriptDetails(details: TranscriptDetails) {
|
|||||||
|
|
||||||
<div className="w-full h-full grid grid-rows-layout-one grid-cols-1 gap-2 lg:gap-4">
|
<div className="w-full h-full grid grid-rows-layout-one grid-cols-1 gap-2 lg:gap-4">
|
||||||
<section className=" bg-blue-400/20 rounded-lg md:rounded-xl p-2 md:px-4 h-full">
|
<section className=" bg-blue-400/20 rounded-lg md:rounded-xl p-2 md:px-4 h-full">
|
||||||
{transcript.response.longSummary ? (
|
{transcript.response.long_summary ? (
|
||||||
<FinalSummary
|
<FinalSummary
|
||||||
fullTranscript={fullTranscript}
|
fullTranscript={fullTranscript}
|
||||||
summary={transcript.response.longSummary}
|
summary={transcript.response.long_summary}
|
||||||
transcriptId={transcript.response.id}
|
transcriptId={transcript.response.id}
|
||||||
openZulipModal={() => setShowModal(true)}
|
openZulipModal={() => setShowModal(true)}
|
||||||
/>
|
/>
|
||||||
@@ -142,8 +141,8 @@ export default function TranscriptDetails(details: TranscriptDetails) {
|
|||||||
<div className="flex-grow max-w-full">
|
<div className="flex-grow max-w-full">
|
||||||
<ShareLink
|
<ShareLink
|
||||||
transcriptId={transcript?.response?.id}
|
transcriptId={transcript?.response?.id}
|
||||||
userId={transcript?.response?.userId}
|
userId={transcript?.response?.user_id}
|
||||||
shareMode={transcript?.response?.shareMode}
|
shareMode={toShareMode(transcript?.response?.share_mode)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -75,10 +75,8 @@ const TranscriptRecord = (details: TranscriptDetails) => {
|
|||||||
}, [webSockets.status.value, transcript.response?.status]);
|
}, [webSockets.status.value, transcript.response?.status]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (webSockets.duration) {
|
if (transcript.response?.status === "ended") mp3.getNow();
|
||||||
mp3.getNow();
|
}, [transcript.response]);
|
||||||
}
|
|
||||||
}, [webSockets.duration]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
lockWakeState();
|
lockWakeState();
|
||||||
@@ -112,6 +110,7 @@ const TranscriptRecord = (details: TranscriptDetails) => {
|
|||||||
}}
|
}}
|
||||||
getAudioStream={getAudioStream}
|
getAudioStream={getAudioStream}
|
||||||
audioDevices={audioDevices}
|
audioDevices={audioDevices}
|
||||||
|
transcriptId={details.params.transcriptId}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@@ -1,48 +1,32 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useState } from "react";
|
||||||
import {
|
|
||||||
DefaultApi,
|
|
||||||
V1TranscriptsCreateRequest,
|
|
||||||
} from "../../api/apis/DefaultApi";
|
|
||||||
import { GetTranscript } from "../../api";
|
|
||||||
import { useError } from "../../(errors)/errorContext";
|
import { useError } from "../../(errors)/errorContext";
|
||||||
import getApi from "../../lib/getApi";
|
import { GetTranscript, CreateTranscript } from "../../api";
|
||||||
|
import useApi from "../../lib/useApi";
|
||||||
|
|
||||||
type CreateTranscript = {
|
type UseTranscript = {
|
||||||
response: GetTranscript | null;
|
transcript: GetTranscript | null;
|
||||||
loading: boolean;
|
loading: boolean;
|
||||||
error: Error | null;
|
error: Error | null;
|
||||||
create: (params: V1TranscriptsCreateRequest["createTranscript"]) => void;
|
create: (transcriptCreationDetails: CreateTranscript) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
const useCreateTranscript = (): CreateTranscript => {
|
const useCreateTranscript = (): UseTranscript => {
|
||||||
const [response, setResponse] = useState<GetTranscript | null>(null);
|
const [transcript, setTranscript] = useState<GetTranscript | null>(null);
|
||||||
const [loading, setLoading] = useState<boolean>(false);
|
const [loading, setLoading] = useState<boolean>(false);
|
||||||
const [error, setErrorState] = useState<Error | null>(null);
|
const [error, setErrorState] = useState<Error | null>(null);
|
||||||
const { setError } = useError();
|
const { setError } = useError();
|
||||||
const api = getApi();
|
const api = useApi();
|
||||||
|
|
||||||
const create = (params: V1TranscriptsCreateRequest["createTranscript"]) => {
|
const create = (transcriptCreationDetails: CreateTranscript) => {
|
||||||
if (loading || !api) return;
|
if (loading || !api) return;
|
||||||
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const requestParameters: V1TranscriptsCreateRequest = {
|
|
||||||
createTranscript: {
|
|
||||||
name: params.name || "Unnamed Transcript", // Default
|
|
||||||
targetLanguage: params.targetLanguage || "en", // Default
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
console.debug(
|
|
||||||
"POST - /v1/transcripts/ - Requesting new transcription creation",
|
|
||||||
requestParameters,
|
|
||||||
);
|
|
||||||
|
|
||||||
api
|
api
|
||||||
.v1TranscriptsCreate(requestParameters)
|
.v1TranscriptsCreate(transcriptCreationDetails)
|
||||||
.then((result) => {
|
.then((transcript) => {
|
||||||
setResponse(result);
|
setTranscript(transcript);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
console.debug("New transcript created:", result);
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setError(
|
setError(
|
||||||
@@ -54,7 +38,7 @@ const useCreateTranscript = (): CreateTranscript => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
return { response, loading, error, create };
|
return { transcript, loading, error, create };
|
||||||
};
|
};
|
||||||
|
|
||||||
export default useCreateTranscript;
|
export default useCreateTranscript;
|
||||||
|
|||||||
50
www/app/[domain]/transcripts/fileUploadButton.tsx
Normal file
50
www/app/[domain]/transcripts/fileUploadButton.tsx
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
import React from "react";
|
||||||
|
import useApi from "../../lib/useApi";
|
||||||
|
import { Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post } from "../../api";
|
||||||
|
|
||||||
|
type FileUploadButton = {
|
||||||
|
transcriptId: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function FileUploadButton(props: FileUploadButton) {
|
||||||
|
const fileInputRef = React.useRef<HTMLInputElement>(null);
|
||||||
|
const api = useApi();
|
||||||
|
|
||||||
|
const triggerFileUpload = () => {
|
||||||
|
fileInputRef.current?.click();
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleFileUpload = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
|
const file = event.target.files?.[0];
|
||||||
|
|
||||||
|
if (file) {
|
||||||
|
console.log("Calling api.v1TranscriptRecordUpload()...");
|
||||||
|
|
||||||
|
// Create an object of the expected type
|
||||||
|
const uploadData = {
|
||||||
|
file: file,
|
||||||
|
// Add other properties if required by the type definition
|
||||||
|
};
|
||||||
|
|
||||||
|
api?.v1TranscriptRecordUpload(props.transcriptId, uploadData);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<button
|
||||||
|
className="bg-blue-400 hover:bg-blue-500 focus-visible:bg-blue-500 text-white ml-2 md:ml:4 md:h-[78px] md:min-w-[100px] text-lg"
|
||||||
|
onClick={triggerFileUpload}
|
||||||
|
>
|
||||||
|
Upload File
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<input
|
||||||
|
type="file"
|
||||||
|
ref={fileInputRef}
|
||||||
|
style={{ display: "none" }}
|
||||||
|
onChange={handleFileUpload}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -2,8 +2,9 @@ import { useRef, useState } from "react";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import Markdown from "react-markdown";
|
import Markdown from "react-markdown";
|
||||||
import "../../styles/markdown.css";
|
import "../../styles/markdown.css";
|
||||||
import getApi from "../../lib/getApi";
|
|
||||||
import { featureEnabled } from "../domainContext";
|
import { featureEnabled } from "../domainContext";
|
||||||
|
import { UpdateTranscript } from "../../api";
|
||||||
|
import useApi from "../../lib/useApi";
|
||||||
|
|
||||||
type FinalSummaryProps = {
|
type FinalSummaryProps = {
|
||||||
summary: string;
|
summary: string;
|
||||||
@@ -19,17 +20,17 @@ export default function FinalSummary(props: FinalSummaryProps) {
|
|||||||
const [isEditMode, setIsEditMode] = useState(false);
|
const [isEditMode, setIsEditMode] = useState(false);
|
||||||
const [preEditSummary, setPreEditSummary] = useState(props.summary);
|
const [preEditSummary, setPreEditSummary] = useState(props.summary);
|
||||||
const [editedSummary, setEditedSummary] = useState(props.summary);
|
const [editedSummary, setEditedSummary] = useState(props.summary);
|
||||||
const api = getApi();
|
|
||||||
|
|
||||||
const updateSummary = async (newSummary: string, transcriptId: string) => {
|
const updateSummary = async (newSummary: string, transcriptId: string) => {
|
||||||
if (!api) return;
|
|
||||||
try {
|
try {
|
||||||
const updatedTranscript = await api.v1TranscriptUpdate({
|
const api = useApi();
|
||||||
|
const requestBody: UpdateTranscript = {
|
||||||
|
long_summary: newSummary,
|
||||||
|
};
|
||||||
|
const updatedTranscript = await api?.v1TranscriptUpdate(
|
||||||
transcriptId,
|
transcriptId,
|
||||||
updateTranscript: {
|
requestBody,
|
||||||
longSummary: newSummary,
|
);
|
||||||
},
|
|
||||||
});
|
|
||||||
console.log("Updated long summary:", updatedTranscript);
|
console.log("Updated long summary:", updatedTranscript);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("Failed to update long summary:", err);
|
console.error("Failed to update long summary:", err);
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ const TranscriptCreate = () => {
|
|||||||
const isAuthenticated = useFiefIsAuthenticated();
|
const isAuthenticated = useFiefIsAuthenticated();
|
||||||
const requireLogin = featureEnabled("requireLogin");
|
const requireLogin = featureEnabled("requireLogin");
|
||||||
|
|
||||||
const [name, setName] = useState<string>();
|
const [name, setName] = useState<string>("");
|
||||||
const nameChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
const nameChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setName(event.target.value);
|
setName(event.target.value);
|
||||||
};
|
};
|
||||||
@@ -35,13 +35,13 @@ const TranscriptCreate = () => {
|
|||||||
const send = () => {
|
const send = () => {
|
||||||
if (loadingSend || createTranscript.loading || permissionDenied) return;
|
if (loadingSend || createTranscript.loading || permissionDenied) return;
|
||||||
setLoadingSend(true);
|
setLoadingSend(true);
|
||||||
createTranscript.create({ name, targetLanguage });
|
createTranscript.create({ name, target_language: targetLanguage });
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
createTranscript.response &&
|
createTranscript.transcript &&
|
||||||
router.push(`/transcripts/${createTranscript.response.id}/record`);
|
router.push(`/transcripts/${createTranscript.transcript.id}/record`);
|
||||||
}, [createTranscript.response]);
|
}, [createTranscript.transcript]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (createTranscript.error) setLoadingSend(false);
|
if (createTranscript.error) setLoadingSend(false);
|
||||||
@@ -59,6 +59,7 @@ const TranscriptCreate = () => {
|
|||||||
<h1 className="text-2xl font-bold mb-2">
|
<h1 className="text-2xl font-bold mb-2">
|
||||||
Welcome to reflector.media
|
Welcome to reflector.media
|
||||||
</h1>
|
</h1>
|
||||||
|
<button>Test upload</button>
|
||||||
<p>
|
<p>
|
||||||
Reflector is a transcription and summarization pipeline that
|
Reflector is a transcription and summarization pipeline that
|
||||||
transforms audio into knowledge.
|
transforms audio into knowledge.
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ type PlayerProps = {
|
|||||||
Topic | null,
|
Topic | null,
|
||||||
React.Dispatch<React.SetStateAction<Topic | null>>,
|
React.Dispatch<React.SetStateAction<Topic | null>>,
|
||||||
];
|
];
|
||||||
waveform: AudioWaveform["data"];
|
waveform: AudioWaveform;
|
||||||
media: HTMLMediaElement;
|
media: HTMLMediaElement;
|
||||||
mediaDuration: number;
|
mediaDuration: number;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import AudioInputsDropdown from "./audioInputsDropdown";
|
|||||||
import { Option } from "react-dropdown";
|
import { Option } from "react-dropdown";
|
||||||
import { waveSurferStyles } from "../../styles/recorder";
|
import { waveSurferStyles } from "../../styles/recorder";
|
||||||
import { useError } from "../../(errors)/errorContext";
|
import { useError } from "../../(errors)/errorContext";
|
||||||
|
import FileUploadButton from "./fileUploadButton";
|
||||||
|
|
||||||
type RecorderProps = {
|
type RecorderProps = {
|
||||||
setStream: React.Dispatch<React.SetStateAction<MediaStream | null>>;
|
setStream: React.Dispatch<React.SetStateAction<MediaStream | null>>;
|
||||||
@@ -19,6 +20,7 @@ type RecorderProps = {
|
|||||||
onRecord?: () => void;
|
onRecord?: () => void;
|
||||||
getAudioStream: (deviceId) => Promise<MediaStream | null>;
|
getAudioStream: (deviceId) => Promise<MediaStream | null>;
|
||||||
audioDevices: Option[];
|
audioDevices: Option[];
|
||||||
|
transcriptId: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function Recorder(props: RecorderProps) {
|
export default function Recorder(props: RecorderProps) {
|
||||||
@@ -307,6 +309,11 @@ export default function Recorder(props: RecorderProps) {
|
|||||||
>
|
>
|
||||||
{isRecording ? "Stop" : "Record"}
|
{isRecording ? "Stop" : "Record"}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<FileUploadButton
|
||||||
|
transcriptId={props.transcriptId}
|
||||||
|
></FileUploadButton>
|
||||||
|
|
||||||
{!isRecording && (
|
{!isRecording && (
|
||||||
<button
|
<button
|
||||||
className={`${
|
className={`${
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import React, { useState, useRef, useEffect, use } from "react";
|
import React, { useState, useRef, useEffect, use } from "react";
|
||||||
import { featureEnabled } from "../domainContext";
|
import { featureEnabled } from "../domainContext";
|
||||||
import getApi from "../../lib/getApi";
|
|
||||||
import { useFiefUserinfo } from "@fief/fief/nextjs/react";
|
import { useFiefUserinfo } from "@fief/fief/nextjs/react";
|
||||||
import SelectSearch from "react-select-search";
|
import SelectSearch from "react-select-search";
|
||||||
import "react-select-search/style.css";
|
import "react-select-search/style.css";
|
||||||
@@ -8,11 +7,13 @@ import "../../styles/button.css";
|
|||||||
import "../../styles/form.scss";
|
import "../../styles/form.scss";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { faSpinner } from "@fortawesome/free-solid-svg-icons";
|
import { faSpinner } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { UpdateTranscript } from "../../api";
|
||||||
|
import { ShareMode, toShareMode } from "../../lib/shareMode";
|
||||||
|
import useApi from "../../lib/useApi";
|
||||||
type ShareLinkProps = {
|
type ShareLinkProps = {
|
||||||
transcriptId: string;
|
transcriptId: string;
|
||||||
userId: string | null;
|
userId: string | null;
|
||||||
shareMode: string;
|
shareMode: ShareMode;
|
||||||
};
|
};
|
||||||
|
|
||||||
const ShareLink = (props: ShareLinkProps) => {
|
const ShareLink = (props: ShareLinkProps) => {
|
||||||
@@ -21,10 +22,10 @@ const ShareLink = (props: ShareLinkProps) => {
|
|||||||
const [currentUrl, setCurrentUrl] = useState<string>("");
|
const [currentUrl, setCurrentUrl] = useState<string>("");
|
||||||
const requireLogin = featureEnabled("requireLogin");
|
const requireLogin = featureEnabled("requireLogin");
|
||||||
const [isOwner, setIsOwner] = useState(false);
|
const [isOwner, setIsOwner] = useState(false);
|
||||||
const [shareMode, setShareMode] = useState(props.shareMode);
|
const [shareMode, setShareMode] = useState<ShareMode>(props.shareMode);
|
||||||
const [shareLoading, setShareLoading] = useState(false);
|
const [shareLoading, setShareLoading] = useState(false);
|
||||||
const userinfo = useFiefUserinfo();
|
const userinfo = useFiefUserinfo();
|
||||||
const api = getApi();
|
const api = useApi();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setCurrentUrl(window.location.href);
|
setCurrentUrl(window.location.href);
|
||||||
@@ -48,15 +49,19 @@ const ShareLink = (props: ShareLinkProps) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const updateShareMode = async (selectedShareMode: string) => {
|
const updateShareMode = async (selectedShareMode: string) => {
|
||||||
if (!api) return;
|
if (!api)
|
||||||
|
throw new Error("ShareLink's API should always be ready at this point");
|
||||||
|
|
||||||
setShareLoading(true);
|
setShareLoading(true);
|
||||||
const updatedTranscript = await api.v1TranscriptUpdate({
|
const requestBody: UpdateTranscript = {
|
||||||
transcriptId: props.transcriptId,
|
share_mode: toShareMode(selectedShareMode),
|
||||||
updateTranscript: {
|
};
|
||||||
shareMode: selectedShareMode,
|
|
||||||
},
|
const updatedTranscript = await api.v1TranscriptUpdate(
|
||||||
});
|
props.transcriptId,
|
||||||
setShareMode(updatedTranscript.shareMode);
|
requestBody,
|
||||||
|
);
|
||||||
|
setShareMode(toShareMode(updatedTranscript.share_mode));
|
||||||
setShareLoading(false);
|
setShareLoading(false);
|
||||||
};
|
};
|
||||||
const privacyEnabled = featureEnabled("privacy");
|
const privacyEnabled = featureEnabled("privacy");
|
||||||
@@ -89,7 +94,7 @@ const ShareLink = (props: ShareLinkProps) => {
|
|||||||
{ name: "Secure", value: "semi-private" },
|
{ name: "Secure", value: "semi-private" },
|
||||||
{ name: "Public", value: "public" },
|
{ name: "Public", value: "public" },
|
||||||
]}
|
]}
|
||||||
value={shareMode}
|
value={shareMode?.toString()}
|
||||||
onChange={updateShareMode}
|
onChange={updateShareMode}
|
||||||
closeOnSelect={true}
|
closeOnSelect={true}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import getApi from "../../lib/getApi";
|
import { UpdateTranscript } from "../../api";
|
||||||
|
import useApi from "../../lib/useApi";
|
||||||
|
|
||||||
type TranscriptTitle = {
|
type TranscriptTitle = {
|
||||||
title: string;
|
title: string;
|
||||||
@@ -10,17 +11,19 @@ const TranscriptTitle = (props: TranscriptTitle) => {
|
|||||||
const [displayedTitle, setDisplayedTitle] = useState(props.title);
|
const [displayedTitle, setDisplayedTitle] = useState(props.title);
|
||||||
const [preEditTitle, setPreEditTitle] = useState(props.title);
|
const [preEditTitle, setPreEditTitle] = useState(props.title);
|
||||||
const [isEditing, setIsEditing] = useState(false);
|
const [isEditing, setIsEditing] = useState(false);
|
||||||
const api = getApi();
|
const api = useApi();
|
||||||
|
|
||||||
const updateTitle = async (newTitle: string, transcriptId: string) => {
|
const updateTitle = async (newTitle: string, transcriptId: string) => {
|
||||||
if (!api) return;
|
if (!api) return;
|
||||||
try {
|
try {
|
||||||
const updatedTranscript = await api.v1TranscriptUpdate({
|
const requestBody: UpdateTranscript = {
|
||||||
transcriptId,
|
|
||||||
updateTranscript: {
|
|
||||||
title: newTitle,
|
title: newTitle,
|
||||||
},
|
};
|
||||||
});
|
const api = useApi();
|
||||||
|
const updatedTranscript = await api?.v1TranscriptUpdate(
|
||||||
|
transcriptId,
|
||||||
|
requestBody,
|
||||||
|
);
|
||||||
console.log("Updated transcript:", updatedTranscript);
|
console.log("Updated transcript:", updatedTranscript);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("Failed to update transcript:", err);
|
console.error("Failed to update transcript:", err);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useContext, useEffect, useState } from "react";
|
import { useContext, useEffect, useState } from "react";
|
||||||
import { DomainContext } from "../domainContext";
|
import { DomainContext } from "../domainContext";
|
||||||
import getApi from "../../lib/getApi";
|
import getApi from "../../lib/useApi";
|
||||||
import { useFiefAccessTokenInfo } from "@fief/fief/build/esm/nextjs/react";
|
import { useFiefAccessTokenInfo } from "@fief/fief/build/esm/nextjs/react";
|
||||||
|
|
||||||
export type Mp3Response = {
|
export type Mp3Response = {
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import {
|
|
||||||
DefaultApi,
|
|
||||||
V1TranscriptGetTopicsRequest,
|
|
||||||
} from "../../api/apis/DefaultApi";
|
|
||||||
import { useError } from "../../(errors)/errorContext";
|
import { useError } from "../../(errors)/errorContext";
|
||||||
import { Topic } from "./webSocketTypes";
|
import { Topic } from "./webSocketTypes";
|
||||||
import getApi from "../../lib/getApi";
|
import useApi from "../../lib/useApi";
|
||||||
import { shouldShowError } from "../../lib/errorUtils";
|
import { shouldShowError } from "../../lib/errorUtils";
|
||||||
|
|
||||||
type TranscriptTopics = {
|
type TranscriptTopics = {
|
||||||
@@ -19,17 +15,14 @@ const useTopics = (id: string): TranscriptTopics => {
|
|||||||
const [loading, setLoading] = useState<boolean>(false);
|
const [loading, setLoading] = useState<boolean>(false);
|
||||||
const [error, setErrorState] = useState<Error | null>(null);
|
const [error, setErrorState] = useState<Error | null>(null);
|
||||||
const { setError } = useError();
|
const { setError } = useError();
|
||||||
const api = getApi();
|
const api = useApi();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!id || !api) return;
|
if (!id || !api) return;
|
||||||
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const requestParameters: V1TranscriptGetTopicsRequest = {
|
|
||||||
transcriptId: id,
|
|
||||||
};
|
|
||||||
api
|
api
|
||||||
.v1TranscriptGetTopics(requestParameters)
|
.v1TranscriptGetTopics(id)
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
setTopics(result);
|
setTopics(result);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { V1TranscriptGetRequest } from "../../api/apis/DefaultApi";
|
|
||||||
import { GetTranscript } from "../../api";
|
import { GetTranscript } from "../../api";
|
||||||
import { useError } from "../../(errors)/errorContext";
|
import { useError } from "../../(errors)/errorContext";
|
||||||
import getApi from "../../lib/getApi";
|
|
||||||
import { shouldShowError } from "../../lib/errorUtils";
|
import { shouldShowError } from "../../lib/errorUtils";
|
||||||
|
import useApi from "../../lib/useApi";
|
||||||
|
|
||||||
type ErrorTranscript = {
|
type ErrorTranscript = {
|
||||||
error: Error;
|
error: Error;
|
||||||
@@ -30,17 +29,15 @@ const useTranscript = (
|
|||||||
const [loading, setLoading] = useState<boolean>(true);
|
const [loading, setLoading] = useState<boolean>(true);
|
||||||
const [error, setErrorState] = useState<Error | null>(null);
|
const [error, setErrorState] = useState<Error | null>(null);
|
||||||
const { setError } = useError();
|
const { setError } = useError();
|
||||||
const api = getApi();
|
const api = useApi();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!id || !api) return;
|
if (!id || !api) return;
|
||||||
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const requestParameters: V1TranscriptGetRequest = {
|
|
||||||
transcriptId: id,
|
|
||||||
};
|
|
||||||
api
|
api
|
||||||
.v1TranscriptGet(requestParameters)
|
.v1TranscriptGet(id)
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
setResponse(result);
|
setResponse(result);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
|||||||
@@ -1,32 +1,28 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { GetTranscriptFromJSON, PageGetTranscript } from "../../api";
|
|
||||||
import { useError } from "../../(errors)/errorContext";
|
import { useError } from "../../(errors)/errorContext";
|
||||||
import getApi from "../../lib/getApi";
|
import useApi from "../../lib/useApi";
|
||||||
|
import { Page_GetTranscript_ } from "../../api";
|
||||||
|
|
||||||
type TranscriptList = {
|
type TranscriptList = {
|
||||||
response: PageGetTranscript | null;
|
response: Page_GetTranscript_ | null;
|
||||||
loading: boolean;
|
loading: boolean;
|
||||||
error: Error | null;
|
error: Error | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
//always protected
|
//always protected
|
||||||
const useTranscriptList = (page: number): TranscriptList => {
|
const useTranscriptList = (page: number): TranscriptList => {
|
||||||
const [response, setResponse] = useState<PageGetTranscript | null>(null);
|
const [response, setResponse] = useState<Page_GetTranscript_ | null>(null);
|
||||||
const [loading, setLoading] = useState<boolean>(true);
|
const [loading, setLoading] = useState<boolean>(true);
|
||||||
const [error, setErrorState] = useState<Error | null>(null);
|
const [error, setErrorState] = useState<Error | null>(null);
|
||||||
const { setError } = useError();
|
const { setError } = useError();
|
||||||
const api = getApi();
|
const api = useApi();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!api) return;
|
if (!api) return;
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
api
|
api
|
||||||
.v1TranscriptsList({ page })
|
.v1TranscriptsList(page)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
// issue with API layer, conversion for items is not happening
|
|
||||||
response.items = response.items.map((item) =>
|
|
||||||
GetTranscriptFromJSON(item),
|
|
||||||
);
|
|
||||||
setResponse(response);
|
setResponse(response);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { V1TranscriptGetAudioWaveformRequest } from "../../api/apis/DefaultApi";
|
|
||||||
import { AudioWaveform } from "../../api";
|
import { AudioWaveform } from "../../api";
|
||||||
import { useError } from "../../(errors)/errorContext";
|
import { useError } from "../../(errors)/errorContext";
|
||||||
import getApi from "../../lib/getApi";
|
import useApi from "../../lib/useApi";
|
||||||
import { shouldShowError } from "../../lib/errorUtils";
|
import { shouldShowError } from "../../lib/errorUtils";
|
||||||
|
|
||||||
type AudioWaveFormResponse = {
|
type AudioWaveFormResponse = {
|
||||||
@@ -16,16 +15,13 @@ const useWaveform = (id: string): AudioWaveFormResponse => {
|
|||||||
const [loading, setLoading] = useState<boolean>(true);
|
const [loading, setLoading] = useState<boolean>(true);
|
||||||
const [error, setErrorState] = useState<Error | null>(null);
|
const [error, setErrorState] = useState<Error | null>(null);
|
||||||
const { setError } = useError();
|
const { setError } = useError();
|
||||||
const api = getApi();
|
const api = useApi();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!id || !api) return;
|
if (!id || !api) return;
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const requestParameters: V1TranscriptGetAudioWaveformRequest = {
|
|
||||||
transcriptId: id,
|
|
||||||
};
|
|
||||||
api
|
api
|
||||||
.v1TranscriptGetAudioWaveform(requestParameters)
|
.v1TranscriptGetAudioWaveform(id)
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
setWaveform(result);
|
setWaveform(result);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import Peer from "simple-peer";
|
import Peer from "simple-peer";
|
||||||
import {
|
|
||||||
DefaultApi,
|
|
||||||
V1TranscriptRecordWebrtcRequest,
|
|
||||||
} from "../../api/apis/DefaultApi";
|
|
||||||
import { useError } from "../../(errors)/errorContext";
|
import { useError } from "../../(errors)/errorContext";
|
||||||
import getApi from "../../lib/getApi";
|
import useApi from "../../lib/useApi";
|
||||||
|
import { RtcOffer } from "../../api";
|
||||||
|
|
||||||
const useWebRTC = (
|
const useWebRTC = (
|
||||||
stream: MediaStream | null,
|
stream: MediaStream | null,
|
||||||
@@ -13,7 +10,7 @@ const useWebRTC = (
|
|||||||
): Peer => {
|
): Peer => {
|
||||||
const [peer, setPeer] = useState<Peer | null>(null);
|
const [peer, setPeer] = useState<Peer | null>(null);
|
||||||
const { setError } = useError();
|
const { setError } = useError();
|
||||||
const api = getApi();
|
const api = useApi();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!stream || !transcriptId) {
|
if (!stream || !transcriptId) {
|
||||||
@@ -38,16 +35,13 @@ const useWebRTC = (
|
|||||||
p.on("signal", (data: any) => {
|
p.on("signal", (data: any) => {
|
||||||
if (!api) return;
|
if (!api) return;
|
||||||
if ("sdp" in data) {
|
if ("sdp" in data) {
|
||||||
const requestParameters: V1TranscriptRecordWebrtcRequest = {
|
const rtcOffer: RtcOffer = {
|
||||||
transcriptId: transcriptId,
|
|
||||||
rtcOffer: {
|
|
||||||
sdp: data.sdp,
|
sdp: data.sdp,
|
||||||
type: data.type,
|
type: data.type,
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
api
|
api
|
||||||
.v1TranscriptRecordWebrtc(requestParameters)
|
.v1TranscriptRecordWebrtc(transcriptId, rtcOffer)
|
||||||
.then((answer) => {
|
.then((answer) => {
|
||||||
try {
|
try {
|
||||||
p.signal(answer);
|
p.signal(answer);
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ import { useContext, useEffect, useState } from "react";
|
|||||||
import { Topic, FinalSummary, Status } from "./webSocketTypes";
|
import { Topic, FinalSummary, Status } from "./webSocketTypes";
|
||||||
import { useError } from "../../(errors)/errorContext";
|
import { useError } from "../../(errors)/errorContext";
|
||||||
import { DomainContext } from "../domainContext";
|
import { DomainContext } from "../domainContext";
|
||||||
import { AudioWaveform } from "../../api";
|
import { AudioWaveform, GetTranscriptSegmentTopic } from "../../api";
|
||||||
|
import useApi from "../../lib/useApi";
|
||||||
|
|
||||||
export type UseWebSockets = {
|
export type UseWebSockets = {
|
||||||
transcriptText: string;
|
transcriptText: string;
|
||||||
@@ -11,7 +12,7 @@ export type UseWebSockets = {
|
|||||||
topics: Topic[];
|
topics: Topic[];
|
||||||
finalSummary: FinalSummary;
|
finalSummary: FinalSummary;
|
||||||
status: Status;
|
status: Status;
|
||||||
waveform: AudioWaveform["data"] | null;
|
waveform: AudioWaveform | null;
|
||||||
duration: number | null;
|
duration: number | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -32,6 +33,7 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
const { setError } = useError();
|
const { setError } = useError();
|
||||||
|
|
||||||
const { websocket_url } = useContext(DomainContext);
|
const { websocket_url } = useContext(DomainContext);
|
||||||
|
const api = useApi();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isProcessing || textQueue.length === 0) {
|
if (isProcessing || textQueue.length === 0) {
|
||||||
@@ -57,17 +59,7 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
document.onkeyup = (e) => {
|
document.onkeyup = (e) => {
|
||||||
if (e.key === "a" && process.env.NEXT_PUBLIC_ENV === "development") {
|
if (e.key === "a" && process.env.NEXT_PUBLIC_ENV === "development") {
|
||||||
setTranscriptText("Lorem Ipsum");
|
const segments: GetTranscriptSegmentTopic[] = [
|
||||||
setTopics([
|
|
||||||
{
|
|
||||||
id: "1",
|
|
||||||
timestamp: 10,
|
|
||||||
duration: 10,
|
|
||||||
summary: "This is test topic 1",
|
|
||||||
title: "Topic 1: Introduction to Quantum Mechanics",
|
|
||||||
transcript:
|
|
||||||
"A brief overview of quantum mechanics and its principles.",
|
|
||||||
segments: [
|
|
||||||
{
|
{
|
||||||
speaker: 1,
|
speaker: 1,
|
||||||
start: 0,
|
start: 0,
|
||||||
@@ -78,7 +70,6 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
start: 10,
|
start: 10,
|
||||||
text: "This is the second speaker",
|
text: "This is the second speaker",
|
||||||
},
|
},
|
||||||
,
|
|
||||||
{
|
{
|
||||||
speaker: 3,
|
speaker: 3,
|
||||||
start: 90,
|
start: 90,
|
||||||
@@ -99,7 +90,18 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
start: 300,
|
start: 300,
|
||||||
text: "This is the sixth speaker",
|
text: "This is the sixth speaker",
|
||||||
},
|
},
|
||||||
],
|
];
|
||||||
|
|
||||||
|
setTranscriptText("Lorem Ipsum");
|
||||||
|
setTopics([
|
||||||
|
{
|
||||||
|
id: "1",
|
||||||
|
timestamp: 10,
|
||||||
|
duration: 10,
|
||||||
|
summary: "This is test topic 1",
|
||||||
|
title: "Topic 1: Introduction to Quantum Mechanics",
|
||||||
|
transcript:
|
||||||
|
"A brief overview of quantum mechanics and its principles.",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "2",
|
id: "2",
|
||||||
@@ -306,7 +308,9 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!transcriptId) return;
|
if (!transcriptId || !api) return;
|
||||||
|
|
||||||
|
api?.v1TranscriptGetWebsocketEvents(transcriptId).then((result) => {});
|
||||||
|
|
||||||
const url = `${websocket_url}/v1/transcripts/${transcriptId}/events`;
|
const url = `${websocket_url}/v1/transcripts/${transcriptId}/events`;
|
||||||
let ws = new WebSocket(url);
|
let ws = new WebSocket(url);
|
||||||
@@ -412,7 +416,9 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
console.debug("WebSocket connection closed");
|
console.debug("WebSocket connection closed");
|
||||||
switch (event.code) {
|
switch (event.code) {
|
||||||
case 1000: // Normal Closure:
|
case 1000: // Normal Closure:
|
||||||
|
break;
|
||||||
case 1005: // Closure by client FF
|
case 1005: // Closure by client FF
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
setError(
|
setError(
|
||||||
new Error(`WebSocket closed unexpectedly with code: ${event.code}`),
|
new Error(`WebSocket closed unexpectedly with code: ${event.code}`),
|
||||||
@@ -431,7 +437,7 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
return () => {
|
return () => {
|
||||||
ws.close();
|
ws.close();
|
||||||
};
|
};
|
||||||
}, [transcriptId]);
|
}, [transcriptId, !api]);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
transcriptText,
|
transcriptText,
|
||||||
|
|||||||
36
www/app/api/Api.ts
Normal file
36
www/app/api/Api.ts
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
import type { BaseHttpRequest } from "./core/BaseHttpRequest";
|
||||||
|
import type { OpenAPIConfig } from "./core/OpenAPI";
|
||||||
|
import { FetchHttpRequest } from "./core/FetchHttpRequest";
|
||||||
|
|
||||||
|
import { DefaultService } from "./services/DefaultService";
|
||||||
|
|
||||||
|
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
|
||||||
|
|
||||||
|
export class Api {
|
||||||
|
public readonly default: DefaultService;
|
||||||
|
|
||||||
|
public readonly request: BaseHttpRequest;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
config?: Partial<OpenAPIConfig>,
|
||||||
|
HttpRequest: HttpRequestConstructor = FetchHttpRequest,
|
||||||
|
) {
|
||||||
|
this.request = new HttpRequest({
|
||||||
|
BASE: config?.BASE ?? "",
|
||||||
|
VERSION: config?.VERSION ?? "0.1.0",
|
||||||
|
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
|
||||||
|
CREDENTIALS: config?.CREDENTIALS ?? "include",
|
||||||
|
TOKEN: config?.TOKEN,
|
||||||
|
USERNAME: config?.USERNAME,
|
||||||
|
PASSWORD: config?.PASSWORD,
|
||||||
|
HEADERS: config?.HEADERS,
|
||||||
|
ENCODE_PATH: config?.ENCODE_PATH,
|
||||||
|
});
|
||||||
|
|
||||||
|
this.default = new DefaultService(this.request);
|
||||||
|
}
|
||||||
|
}
|
||||||
36
www/app/api/OpenApi.ts
Normal file
36
www/app/api/OpenApi.ts
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
import type { BaseHttpRequest } from "./core/BaseHttpRequest";
|
||||||
|
import type { OpenAPIConfig } from "./core/OpenAPI";
|
||||||
|
import { FetchHttpRequest } from "./core/FetchHttpRequest";
|
||||||
|
|
||||||
|
import { DefaultService } from "./services/DefaultService";
|
||||||
|
|
||||||
|
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
|
||||||
|
|
||||||
|
export class OpenApi {
|
||||||
|
public readonly default: DefaultService;
|
||||||
|
|
||||||
|
public readonly request: BaseHttpRequest;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
config?: Partial<OpenAPIConfig>,
|
||||||
|
HttpRequest: HttpRequestConstructor = FetchHttpRequest,
|
||||||
|
) {
|
||||||
|
this.request = new HttpRequest({
|
||||||
|
BASE: config?.BASE ?? "",
|
||||||
|
VERSION: config?.VERSION ?? "0.1.0",
|
||||||
|
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
|
||||||
|
CREDENTIALS: config?.CREDENTIALS ?? "include",
|
||||||
|
TOKEN: config?.TOKEN,
|
||||||
|
USERNAME: config?.USERNAME,
|
||||||
|
PASSWORD: config?.PASSWORD,
|
||||||
|
HEADERS: config?.HEADERS,
|
||||||
|
ENCODE_PATH: config?.ENCODE_PATH,
|
||||||
|
});
|
||||||
|
|
||||||
|
this.default = new DefaultService(this.request);
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export * from "./DefaultApi";
|
|
||||||
29
www/app/api/core/ApiError.ts
Normal file
29
www/app/api/core/ApiError.ts
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
import type { ApiRequestOptions } from "./ApiRequestOptions";
|
||||||
|
import type { ApiResult } from "./ApiResult";
|
||||||
|
|
||||||
|
export class ApiError extends Error {
|
||||||
|
public readonly url: string;
|
||||||
|
public readonly status: number;
|
||||||
|
public readonly statusText: string;
|
||||||
|
public readonly body: any;
|
||||||
|
public readonly request: ApiRequestOptions;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
request: ApiRequestOptions,
|
||||||
|
response: ApiResult,
|
||||||
|
message: string,
|
||||||
|
) {
|
||||||
|
super(message);
|
||||||
|
|
||||||
|
this.name = "ApiError";
|
||||||
|
this.url = response.url;
|
||||||
|
this.status = response.status;
|
||||||
|
this.statusText = response.statusText;
|
||||||
|
this.body = response.body;
|
||||||
|
this.request = request;
|
||||||
|
}
|
||||||
|
}
|
||||||
24
www/app/api/core/ApiRequestOptions.ts
Normal file
24
www/app/api/core/ApiRequestOptions.ts
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
export type ApiRequestOptions = {
|
||||||
|
readonly method:
|
||||||
|
| "GET"
|
||||||
|
| "PUT"
|
||||||
|
| "POST"
|
||||||
|
| "DELETE"
|
||||||
|
| "OPTIONS"
|
||||||
|
| "HEAD"
|
||||||
|
| "PATCH";
|
||||||
|
readonly url: string;
|
||||||
|
readonly path?: Record<string, any>;
|
||||||
|
readonly cookies?: Record<string, any>;
|
||||||
|
readonly headers?: Record<string, any>;
|
||||||
|
readonly query?: Record<string, any>;
|
||||||
|
readonly formData?: Record<string, any>;
|
||||||
|
readonly body?: any;
|
||||||
|
readonly mediaType?: string;
|
||||||
|
readonly responseHeader?: string;
|
||||||
|
readonly errors?: Record<number, string>;
|
||||||
|
};
|
||||||
11
www/app/api/core/ApiResult.ts
Normal file
11
www/app/api/core/ApiResult.ts
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
export type ApiResult = {
|
||||||
|
readonly url: string;
|
||||||
|
readonly ok: boolean;
|
||||||
|
readonly status: number;
|
||||||
|
readonly statusText: string;
|
||||||
|
readonly body: any;
|
||||||
|
};
|
||||||
13
www/app/api/core/BaseHttpRequest.ts
Normal file
13
www/app/api/core/BaseHttpRequest.ts
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
import type { ApiRequestOptions } from "./ApiRequestOptions";
|
||||||
|
import type { CancelablePromise } from "./CancelablePromise";
|
||||||
|
import type { OpenAPIConfig } from "./OpenAPI";
|
||||||
|
|
||||||
|
export abstract class BaseHttpRequest {
|
||||||
|
constructor(public readonly config: OpenAPIConfig) {}
|
||||||
|
|
||||||
|
public abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
|
||||||
|
}
|
||||||
130
www/app/api/core/CancelablePromise.ts
Normal file
130
www/app/api/core/CancelablePromise.ts
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
export class CancelError extends Error {
|
||||||
|
constructor(message: string) {
|
||||||
|
super(message);
|
||||||
|
this.name = "CancelError";
|
||||||
|
}
|
||||||
|
|
||||||
|
public get isCancelled(): boolean {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface OnCancel {
|
||||||
|
readonly isResolved: boolean;
|
||||||
|
readonly isRejected: boolean;
|
||||||
|
readonly isCancelled: boolean;
|
||||||
|
|
||||||
|
(cancelHandler: () => void): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class CancelablePromise<T> implements Promise<T> {
|
||||||
|
#isResolved: boolean;
|
||||||
|
#isRejected: boolean;
|
||||||
|
#isCancelled: boolean;
|
||||||
|
readonly #cancelHandlers: (() => void)[];
|
||||||
|
readonly #promise: Promise<T>;
|
||||||
|
#resolve?: (value: T | PromiseLike<T>) => void;
|
||||||
|
#reject?: (reason?: any) => void;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
executor: (
|
||||||
|
resolve: (value: T | PromiseLike<T>) => void,
|
||||||
|
reject: (reason?: any) => void,
|
||||||
|
onCancel: OnCancel,
|
||||||
|
) => void,
|
||||||
|
) {
|
||||||
|
this.#isResolved = false;
|
||||||
|
this.#isRejected = false;
|
||||||
|
this.#isCancelled = false;
|
||||||
|
this.#cancelHandlers = [];
|
||||||
|
this.#promise = new Promise<T>((resolve, reject) => {
|
||||||
|
this.#resolve = resolve;
|
||||||
|
this.#reject = reject;
|
||||||
|
|
||||||
|
const onResolve = (value: T | PromiseLike<T>): void => {
|
||||||
|
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.#isResolved = true;
|
||||||
|
this.#resolve?.(value);
|
||||||
|
};
|
||||||
|
|
||||||
|
const onReject = (reason?: any): void => {
|
||||||
|
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.#isRejected = true;
|
||||||
|
this.#reject?.(reason);
|
||||||
|
};
|
||||||
|
|
||||||
|
const onCancel = (cancelHandler: () => void): void => {
|
||||||
|
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.#cancelHandlers.push(cancelHandler);
|
||||||
|
};
|
||||||
|
|
||||||
|
Object.defineProperty(onCancel, "isResolved", {
|
||||||
|
get: (): boolean => this.#isResolved,
|
||||||
|
});
|
||||||
|
|
||||||
|
Object.defineProperty(onCancel, "isRejected", {
|
||||||
|
get: (): boolean => this.#isRejected,
|
||||||
|
});
|
||||||
|
|
||||||
|
Object.defineProperty(onCancel, "isCancelled", {
|
||||||
|
get: (): boolean => this.#isCancelled,
|
||||||
|
});
|
||||||
|
|
||||||
|
return executor(onResolve, onReject, onCancel as OnCancel);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
get [Symbol.toStringTag]() {
|
||||||
|
return "Cancellable Promise";
|
||||||
|
}
|
||||||
|
|
||||||
|
public then<TResult1 = T, TResult2 = never>(
|
||||||
|
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
|
||||||
|
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null,
|
||||||
|
): Promise<TResult1 | TResult2> {
|
||||||
|
return this.#promise.then(onFulfilled, onRejected);
|
||||||
|
}
|
||||||
|
|
||||||
|
public catch<TResult = never>(
|
||||||
|
onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null,
|
||||||
|
): Promise<T | TResult> {
|
||||||
|
return this.#promise.catch(onRejected);
|
||||||
|
}
|
||||||
|
|
||||||
|
public finally(onFinally?: (() => void) | null): Promise<T> {
|
||||||
|
return this.#promise.finally(onFinally);
|
||||||
|
}
|
||||||
|
|
||||||
|
public cancel(): void {
|
||||||
|
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.#isCancelled = true;
|
||||||
|
if (this.#cancelHandlers.length) {
|
||||||
|
try {
|
||||||
|
for (const cancelHandler of this.#cancelHandlers) {
|
||||||
|
cancelHandler();
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.warn("Cancellation threw an error", error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.#cancelHandlers.length = 0;
|
||||||
|
this.#reject?.(new CancelError("Request aborted"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public get isCancelled(): boolean {
|
||||||
|
return this.#isCancelled;
|
||||||
|
}
|
||||||
|
}
|
||||||
25
www/app/api/core/FetchHttpRequest.ts
Normal file
25
www/app/api/core/FetchHttpRequest.ts
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
import type { ApiRequestOptions } from "./ApiRequestOptions";
|
||||||
|
import { BaseHttpRequest } from "./BaseHttpRequest";
|
||||||
|
import type { CancelablePromise } from "./CancelablePromise";
|
||||||
|
import type { OpenAPIConfig } from "./OpenAPI";
|
||||||
|
import { request as __request } from "./request";
|
||||||
|
|
||||||
|
export class FetchHttpRequest extends BaseHttpRequest {
|
||||||
|
constructor(config: OpenAPIConfig) {
|
||||||
|
super(config);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request method
|
||||||
|
* @param options The request options from the service
|
||||||
|
* @returns CancelablePromise<T>
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public override request<T>(options: ApiRequestOptions): CancelablePromise<T> {
|
||||||
|
return __request(this.config, options);
|
||||||
|
}
|
||||||
|
}
|
||||||
32
www/app/api/core/OpenAPI.ts
Normal file
32
www/app/api/core/OpenAPI.ts
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
import type { ApiRequestOptions } from "./ApiRequestOptions";
|
||||||
|
|
||||||
|
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
||||||
|
type Headers = Record<string, string>;
|
||||||
|
|
||||||
|
export type OpenAPIConfig = {
|
||||||
|
BASE: string;
|
||||||
|
VERSION: string;
|
||||||
|
WITH_CREDENTIALS: boolean;
|
||||||
|
CREDENTIALS: "include" | "omit" | "same-origin";
|
||||||
|
TOKEN?: string | Resolver<string> | undefined;
|
||||||
|
USERNAME?: string | Resolver<string> | undefined;
|
||||||
|
PASSWORD?: string | Resolver<string> | undefined;
|
||||||
|
HEADERS?: Headers | Resolver<Headers> | undefined;
|
||||||
|
ENCODE_PATH?: ((path: string) => string) | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const OpenAPI: OpenAPIConfig = {
|
||||||
|
BASE: "",
|
||||||
|
VERSION: "0.1.0",
|
||||||
|
WITH_CREDENTIALS: false,
|
||||||
|
CREDENTIALS: "include",
|
||||||
|
TOKEN: undefined,
|
||||||
|
USERNAME: undefined,
|
||||||
|
PASSWORD: undefined,
|
||||||
|
HEADERS: undefined,
|
||||||
|
ENCODE_PATH: undefined,
|
||||||
|
};
|
||||||
361
www/app/api/core/request.ts
Normal file
361
www/app/api/core/request.ts
Normal file
@@ -0,0 +1,361 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
import { ApiError } from "./ApiError";
|
||||||
|
import type { ApiRequestOptions } from "./ApiRequestOptions";
|
||||||
|
import type { ApiResult } from "./ApiResult";
|
||||||
|
import { CancelablePromise } from "./CancelablePromise";
|
||||||
|
import type { OnCancel } from "./CancelablePromise";
|
||||||
|
import type { OpenAPIConfig } from "./OpenAPI";
|
||||||
|
|
||||||
|
export const isDefined = <T>(
|
||||||
|
value: T | null | undefined,
|
||||||
|
): value is Exclude<T, null | undefined> => {
|
||||||
|
return value !== undefined && value !== null;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const isString = (value: any): value is string => {
|
||||||
|
return typeof value === "string";
|
||||||
|
};
|
||||||
|
|
||||||
|
export const isStringWithValue = (value: any): value is string => {
|
||||||
|
return isString(value) && value !== "";
|
||||||
|
};
|
||||||
|
|
||||||
|
export const isBlob = (value: any): value is Blob => {
|
||||||
|
return (
|
||||||
|
typeof value === "object" &&
|
||||||
|
typeof value.type === "string" &&
|
||||||
|
typeof value.stream === "function" &&
|
||||||
|
typeof value.arrayBuffer === "function" &&
|
||||||
|
typeof value.constructor === "function" &&
|
||||||
|
typeof value.constructor.name === "string" &&
|
||||||
|
/^(Blob|File)$/.test(value.constructor.name) &&
|
||||||
|
/^(Blob|File)$/.test(value[Symbol.toStringTag])
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const isFormData = (value: any): value is FormData => {
|
||||||
|
return value instanceof FormData;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const base64 = (str: string): string => {
|
||||||
|
try {
|
||||||
|
return btoa(str);
|
||||||
|
} catch (err) {
|
||||||
|
// @ts-ignore
|
||||||
|
return Buffer.from(str).toString("base64");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getQueryString = (params: Record<string, any>): string => {
|
||||||
|
const qs: string[] = [];
|
||||||
|
|
||||||
|
const append = (key: string, value: any) => {
|
||||||
|
qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
|
||||||
|
};
|
||||||
|
|
||||||
|
const process = (key: string, value: any) => {
|
||||||
|
if (isDefined(value)) {
|
||||||
|
if (Array.isArray(value)) {
|
||||||
|
value.forEach((v) => {
|
||||||
|
process(key, v);
|
||||||
|
});
|
||||||
|
} else if (typeof value === "object") {
|
||||||
|
Object.entries(value).forEach(([k, v]) => {
|
||||||
|
process(`${key}[${k}]`, v);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
append(key, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
Object.entries(params).forEach(([key, value]) => {
|
||||||
|
process(key, value);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (qs.length > 0) {
|
||||||
|
return `?${qs.join("&")}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
|
};
|
||||||
|
|
||||||
|
const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {
|
||||||
|
const encoder = config.ENCODE_PATH || encodeURI;
|
||||||
|
|
||||||
|
const path = options.url
|
||||||
|
.replace("{api-version}", config.VERSION)
|
||||||
|
.replace(/{(.*?)}/g, (substring: string, group: string) => {
|
||||||
|
if (options.path?.hasOwnProperty(group)) {
|
||||||
|
return encoder(String(options.path[group]));
|
||||||
|
}
|
||||||
|
return substring;
|
||||||
|
});
|
||||||
|
|
||||||
|
const url = `${config.BASE}${path}`;
|
||||||
|
if (options.query) {
|
||||||
|
return `${url}${getQueryString(options.query)}`;
|
||||||
|
}
|
||||||
|
return url;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getFormData = (
|
||||||
|
options: ApiRequestOptions,
|
||||||
|
): FormData | undefined => {
|
||||||
|
if (options.formData) {
|
||||||
|
const formData = new FormData();
|
||||||
|
|
||||||
|
const process = (key: string, value: any) => {
|
||||||
|
if (isString(value) || isBlob(value)) {
|
||||||
|
formData.append(key, value);
|
||||||
|
} else {
|
||||||
|
formData.append(key, JSON.stringify(value));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
Object.entries(options.formData)
|
||||||
|
.filter(([_, value]) => isDefined(value))
|
||||||
|
.forEach(([key, value]) => {
|
||||||
|
if (Array.isArray(value)) {
|
||||||
|
value.forEach((v) => process(key, v));
|
||||||
|
} else {
|
||||||
|
process(key, value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return formData;
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
||||||
|
|
||||||
|
export const resolve = async <T>(
|
||||||
|
options: ApiRequestOptions,
|
||||||
|
resolver?: T | Resolver<T>,
|
||||||
|
): Promise<T | undefined> => {
|
||||||
|
if (typeof resolver === "function") {
|
||||||
|
return (resolver as Resolver<T>)(options);
|
||||||
|
}
|
||||||
|
return resolver;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getHeaders = async (
|
||||||
|
config: OpenAPIConfig,
|
||||||
|
options: ApiRequestOptions,
|
||||||
|
): Promise<Headers> => {
|
||||||
|
const token = await resolve(options, config.TOKEN);
|
||||||
|
const username = await resolve(options, config.USERNAME);
|
||||||
|
const password = await resolve(options, config.PASSWORD);
|
||||||
|
const additionalHeaders = await resolve(options, config.HEADERS);
|
||||||
|
|
||||||
|
const headers = Object.entries({
|
||||||
|
Accept: "application/json",
|
||||||
|
...additionalHeaders,
|
||||||
|
...options.headers,
|
||||||
|
})
|
||||||
|
.filter(([_, value]) => isDefined(value))
|
||||||
|
.reduce(
|
||||||
|
(headers, [key, value]) => ({
|
||||||
|
...headers,
|
||||||
|
[key]: String(value),
|
||||||
|
}),
|
||||||
|
{} as Record<string, string>,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isStringWithValue(token)) {
|
||||||
|
headers["Authorization"] = `Bearer ${token}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isStringWithValue(username) && isStringWithValue(password)) {
|
||||||
|
const credentials = base64(`${username}:${password}`);
|
||||||
|
headers["Authorization"] = `Basic ${credentials}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (options.body) {
|
||||||
|
if (options.mediaType) {
|
||||||
|
headers["Content-Type"] = options.mediaType;
|
||||||
|
} else if (isBlob(options.body)) {
|
||||||
|
headers["Content-Type"] = options.body.type || "application/octet-stream";
|
||||||
|
} else if (isString(options.body)) {
|
||||||
|
headers["Content-Type"] = "text/plain";
|
||||||
|
} else if (!isFormData(options.body)) {
|
||||||
|
headers["Content-Type"] = "application/json";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Headers(headers);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getRequestBody = (options: ApiRequestOptions): any => {
|
||||||
|
if (options.body !== undefined) {
|
||||||
|
if (options.mediaType?.includes("/json")) {
|
||||||
|
return JSON.stringify(options.body);
|
||||||
|
} else if (
|
||||||
|
isString(options.body) ||
|
||||||
|
isBlob(options.body) ||
|
||||||
|
isFormData(options.body)
|
||||||
|
) {
|
||||||
|
return options.body;
|
||||||
|
} else {
|
||||||
|
return JSON.stringify(options.body);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const sendRequest = async (
|
||||||
|
config: OpenAPIConfig,
|
||||||
|
options: ApiRequestOptions,
|
||||||
|
url: string,
|
||||||
|
body: any,
|
||||||
|
formData: FormData | undefined,
|
||||||
|
headers: Headers,
|
||||||
|
onCancel: OnCancel,
|
||||||
|
): Promise<Response> => {
|
||||||
|
const controller = new AbortController();
|
||||||
|
|
||||||
|
const request: RequestInit = {
|
||||||
|
headers,
|
||||||
|
body: body ?? formData,
|
||||||
|
method: options.method,
|
||||||
|
signal: controller.signal,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (config.WITH_CREDENTIALS) {
|
||||||
|
request.credentials = config.CREDENTIALS;
|
||||||
|
}
|
||||||
|
|
||||||
|
onCancel(() => controller.abort());
|
||||||
|
|
||||||
|
return await fetch(url, request);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getResponseHeader = (
|
||||||
|
response: Response,
|
||||||
|
responseHeader?: string,
|
||||||
|
): string | undefined => {
|
||||||
|
if (responseHeader) {
|
||||||
|
const content = response.headers.get(responseHeader);
|
||||||
|
if (isString(content)) {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getResponseBody = async (response: Response): Promise<any> => {
|
||||||
|
if (response.status !== 204) {
|
||||||
|
try {
|
||||||
|
const contentType = response.headers.get("Content-Type");
|
||||||
|
if (contentType) {
|
||||||
|
const jsonTypes = ["application/json", "application/problem+json"];
|
||||||
|
const isJSON = jsonTypes.some((type) =>
|
||||||
|
contentType.toLowerCase().startsWith(type),
|
||||||
|
);
|
||||||
|
if (isJSON) {
|
||||||
|
return await response.json();
|
||||||
|
} else {
|
||||||
|
return await response.text();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const catchErrorCodes = (
|
||||||
|
options: ApiRequestOptions,
|
||||||
|
result: ApiResult,
|
||||||
|
): void => {
|
||||||
|
const errors: Record<number, string> = {
|
||||||
|
400: "Bad Request",
|
||||||
|
401: "Unauthorized",
|
||||||
|
403: "Forbidden",
|
||||||
|
404: "Not Found",
|
||||||
|
500: "Internal Server Error",
|
||||||
|
502: "Bad Gateway",
|
||||||
|
503: "Service Unavailable",
|
||||||
|
...options.errors,
|
||||||
|
};
|
||||||
|
|
||||||
|
const error = errors[result.status];
|
||||||
|
if (error) {
|
||||||
|
throw new ApiError(options, result, error);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!result.ok) {
|
||||||
|
const errorStatus = result.status ?? "unknown";
|
||||||
|
const errorStatusText = result.statusText ?? "unknown";
|
||||||
|
const errorBody = (() => {
|
||||||
|
try {
|
||||||
|
return JSON.stringify(result.body, null, 2);
|
||||||
|
} catch (e) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
|
throw new ApiError(
|
||||||
|
options,
|
||||||
|
result,
|
||||||
|
`Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request method
|
||||||
|
* @param config The OpenAPI configuration object
|
||||||
|
* @param options The request options from the service
|
||||||
|
* @returns CancelablePromise<T>
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
export const request = <T>(
|
||||||
|
config: OpenAPIConfig,
|
||||||
|
options: ApiRequestOptions,
|
||||||
|
): CancelablePromise<T> => {
|
||||||
|
return new CancelablePromise(async (resolve, reject, onCancel) => {
|
||||||
|
try {
|
||||||
|
const url = getUrl(config, options);
|
||||||
|
const formData = getFormData(options);
|
||||||
|
const body = getRequestBody(options);
|
||||||
|
const headers = await getHeaders(config, options);
|
||||||
|
|
||||||
|
if (!onCancel.isCancelled) {
|
||||||
|
const response = await sendRequest(
|
||||||
|
config,
|
||||||
|
options,
|
||||||
|
url,
|
||||||
|
body,
|
||||||
|
formData,
|
||||||
|
headers,
|
||||||
|
onCancel,
|
||||||
|
);
|
||||||
|
const responseBody = await getResponseBody(response);
|
||||||
|
const responseHeader = getResponseHeader(
|
||||||
|
response,
|
||||||
|
options.responseHeader,
|
||||||
|
);
|
||||||
|
|
||||||
|
const result: ApiResult = {
|
||||||
|
url,
|
||||||
|
ok: response.ok,
|
||||||
|
status: response.status,
|
||||||
|
statusText: response.statusText,
|
||||||
|
body: responseHeader ?? responseBody,
|
||||||
|
};
|
||||||
|
|
||||||
|
catchErrorCodes(options, result);
|
||||||
|
|
||||||
|
resolve(result.body);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
reject(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -1,5 +1,38 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
export * from "./runtime";
|
export { OpenApi } from "./OpenApi";
|
||||||
export * from "./apis";
|
|
||||||
export * from "./models";
|
export { ApiError } from "./core/ApiError";
|
||||||
|
export { BaseHttpRequest } from "./core/BaseHttpRequest";
|
||||||
|
export { CancelablePromise, CancelError } from "./core/CancelablePromise";
|
||||||
|
export { OpenAPI } from "./core/OpenAPI";
|
||||||
|
export type { OpenAPIConfig } from "./core/OpenAPI";
|
||||||
|
|
||||||
|
export type { AudioWaveform } from "./models/AudioWaveform";
|
||||||
|
export type { Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post } from "./models/Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post";
|
||||||
|
export type { CreateParticipant } from "./models/CreateParticipant";
|
||||||
|
export type { CreateTranscript } from "./models/CreateTranscript";
|
||||||
|
export type { DeletionStatus } from "./models/DeletionStatus";
|
||||||
|
export type { GetTranscript } from "./models/GetTranscript";
|
||||||
|
export type { GetTranscriptSegmentTopic } from "./models/GetTranscriptSegmentTopic";
|
||||||
|
export type { GetTranscriptTopic } from "./models/GetTranscriptTopic";
|
||||||
|
export type { GetTranscriptTopicWithWords } from "./models/GetTranscriptTopicWithWords";
|
||||||
|
export type { GetTranscriptTopicWithWordsPerSpeaker } from "./models/GetTranscriptTopicWithWordsPerSpeaker";
|
||||||
|
export type { HTTPValidationError } from "./models/HTTPValidationError";
|
||||||
|
export type { Page_GetTranscript_ } from "./models/Page_GetTranscript_";
|
||||||
|
export type { Participant } from "./models/Participant";
|
||||||
|
export type { RtcOffer } from "./models/RtcOffer";
|
||||||
|
export type { SpeakerAssignment } from "./models/SpeakerAssignment";
|
||||||
|
export type { SpeakerAssignmentStatus } from "./models/SpeakerAssignmentStatus";
|
||||||
|
export type { SpeakerMerge } from "./models/SpeakerMerge";
|
||||||
|
export type { SpeakerWords } from "./models/SpeakerWords";
|
||||||
|
export type { TranscriptParticipant } from "./models/TranscriptParticipant";
|
||||||
|
export type { UpdateParticipant } from "./models/UpdateParticipant";
|
||||||
|
export type { UpdateTranscript } from "./models/UpdateTranscript";
|
||||||
|
export type { UserInfo } from "./models/UserInfo";
|
||||||
|
export type { ValidationError } from "./models/ValidationError";
|
||||||
|
export type { Word } from "./models/Word";
|
||||||
|
|
||||||
|
export { DefaultService } from "./services/DefaultService";
|
||||||
|
|||||||
@@ -1,66 +1,8 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
export type AudioWaveform = {
|
||||||
/**
|
data: Array<number>;
|
||||||
*
|
};
|
||||||
* @export
|
|
||||||
* @interface AudioWaveform
|
|
||||||
*/
|
|
||||||
export interface AudioWaveform {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof AudioWaveform
|
|
||||||
*/
|
|
||||||
data: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AudioWaveform interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAudioWaveform(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "data" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AudioWaveformFromJSON(json: any): AudioWaveform {
|
|
||||||
return AudioWaveformFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AudioWaveformFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): AudioWaveform {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
data: json["data"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AudioWaveformToJSON(value?: AudioWaveform | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
data: value.data,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
export type Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post =
|
||||||
|
{
|
||||||
|
file: Blob;
|
||||||
|
};
|
||||||
@@ -1,74 +1,9 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
export type CreateParticipant = {
|
||||||
/**
|
speaker?: number | null;
|
||||||
*
|
name: string;
|
||||||
* @export
|
};
|
||||||
* @interface CreateParticipant
|
|
||||||
*/
|
|
||||||
export interface CreateParticipant {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof CreateParticipant
|
|
||||||
*/
|
|
||||||
speaker?: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof CreateParticipant
|
|
||||||
*/
|
|
||||||
name: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the CreateParticipant interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfCreateParticipant(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "name" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateParticipantFromJSON(json: any): CreateParticipant {
|
|
||||||
return CreateParticipantFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateParticipantFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): CreateParticipant {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
speaker: !exists(json, "speaker") ? undefined : json["speaker"],
|
|
||||||
name: json["name"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateParticipantToJSON(value?: CreateParticipant | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
speaker: value.speaker,
|
|
||||||
name: value.name,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,86 +1,10 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
export type CreateTranscript = {
|
||||||
/**
|
name: string;
|
||||||
*
|
source_language?: string;
|
||||||
* @export
|
target_language?: string;
|
||||||
* @interface CreateTranscript
|
};
|
||||||
*/
|
|
||||||
export interface CreateTranscript {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof CreateTranscript
|
|
||||||
*/
|
|
||||||
name: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof CreateTranscript
|
|
||||||
*/
|
|
||||||
sourceLanguage?: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof CreateTranscript
|
|
||||||
*/
|
|
||||||
targetLanguage?: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the CreateTranscript interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfCreateTranscript(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "name" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateTranscriptFromJSON(json: any): CreateTranscript {
|
|
||||||
return CreateTranscriptFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateTranscriptFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): CreateTranscript {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
name: json["name"],
|
|
||||||
sourceLanguage: !exists(json, "source_language")
|
|
||||||
? undefined
|
|
||||||
: json["source_language"],
|
|
||||||
targetLanguage: !exists(json, "target_language")
|
|
||||||
? undefined
|
|
||||||
: json["target_language"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateTranscriptToJSON(value?: CreateTranscript | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
name: value.name,
|
|
||||||
source_language: value.sourceLanguage,
|
|
||||||
target_language: value.targetLanguage,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,66 +1,8 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
export type DeletionStatus = {
|
||||||
/**
|
status: string;
|
||||||
*
|
};
|
||||||
* @export
|
|
||||||
* @interface DeletionStatus
|
|
||||||
*/
|
|
||||||
export interface DeletionStatus {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof DeletionStatus
|
|
||||||
*/
|
|
||||||
status: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the DeletionStatus interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfDeletionStatus(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "status" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function DeletionStatusFromJSON(json: any): DeletionStatus {
|
|
||||||
return DeletionStatusFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function DeletionStatusFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): DeletionStatus {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
status: json["status"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function DeletionStatusToJSON(value?: DeletionStatus | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
status: value.status,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,191 +1,24 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
import type { TranscriptParticipant } from "./TranscriptParticipant";
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface GetTranscript
|
|
||||||
*/
|
|
||||||
export interface GetTranscript {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscript
|
|
||||||
*/
|
|
||||||
id: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscript
|
|
||||||
*/
|
|
||||||
userId: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscript
|
|
||||||
*/
|
|
||||||
name: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscript
|
|
||||||
*/
|
|
||||||
status: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscript
|
|
||||||
*/
|
|
||||||
locked: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscript
|
|
||||||
*/
|
|
||||||
duration: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscript
|
|
||||||
*/
|
|
||||||
title: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscript
|
|
||||||
*/
|
|
||||||
shortSummary: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscript
|
|
||||||
*/
|
|
||||||
longSummary: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscript
|
|
||||||
*/
|
|
||||||
createdAt: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscript
|
|
||||||
*/
|
|
||||||
shareMode?: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscript
|
|
||||||
*/
|
|
||||||
sourceLanguage: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscript
|
|
||||||
*/
|
|
||||||
targetLanguage: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscript
|
|
||||||
*/
|
|
||||||
participants: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscript
|
|
||||||
*/
|
|
||||||
reviewed: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
export type GetTranscript = {
|
||||||
* Check if a given object implements the GetTranscript interface.
|
id: string;
|
||||||
*/
|
user_id: string | null;
|
||||||
export function instanceOfGetTranscript(value: object): boolean {
|
name: string;
|
||||||
let isInstance = true;
|
status: string;
|
||||||
isInstance = isInstance && "id" in value;
|
locked: boolean;
|
||||||
isInstance = isInstance && "userId" in value;
|
duration: number;
|
||||||
isInstance = isInstance && "name" in value;
|
title: string | null;
|
||||||
isInstance = isInstance && "status" in value;
|
short_summary: string | null;
|
||||||
isInstance = isInstance && "locked" in value;
|
long_summary: string | null;
|
||||||
isInstance = isInstance && "duration" in value;
|
created_at: string;
|
||||||
isInstance = isInstance && "title" in value;
|
share_mode?: string;
|
||||||
isInstance = isInstance && "shortSummary" in value;
|
source_language: string | null;
|
||||||
isInstance = isInstance && "longSummary" in value;
|
target_language: string | null;
|
||||||
isInstance = isInstance && "createdAt" in value;
|
participants: Array<TranscriptParticipant> | null;
|
||||||
isInstance = isInstance && "sourceLanguage" in value;
|
reviewed: boolean;
|
||||||
isInstance = isInstance && "targetLanguage" in value;
|
};
|
||||||
isInstance = isInstance && "participants" in value;
|
|
||||||
isInstance = isInstance && "reviewed" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function GetTranscriptFromJSON(json: any): GetTranscript {
|
|
||||||
return GetTranscriptFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function GetTranscriptFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): GetTranscript {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
id: json["id"],
|
|
||||||
userId: json["user_id"],
|
|
||||||
name: json["name"],
|
|
||||||
status: json["status"],
|
|
||||||
locked: json["locked"],
|
|
||||||
duration: json["duration"],
|
|
||||||
title: json["title"],
|
|
||||||
shortSummary: json["short_summary"],
|
|
||||||
longSummary: json["long_summary"],
|
|
||||||
createdAt: json["created_at"],
|
|
||||||
shareMode: !exists(json, "share_mode") ? undefined : json["share_mode"],
|
|
||||||
sourceLanguage: json["source_language"],
|
|
||||||
targetLanguage: json["target_language"],
|
|
||||||
participants: json["participants"],
|
|
||||||
reviewed: json["reviewed"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function GetTranscriptToJSON(value?: GetTranscript | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
id: value.id,
|
|
||||||
user_id: value.userId,
|
|
||||||
name: value.name,
|
|
||||||
status: value.status,
|
|
||||||
locked: value.locked,
|
|
||||||
duration: value.duration,
|
|
||||||
title: value.title,
|
|
||||||
short_summary: value.shortSummary,
|
|
||||||
long_summary: value.longSummary,
|
|
||||||
created_at: value.createdAt,
|
|
||||||
share_mode: value.shareMode,
|
|
||||||
source_language: value.sourceLanguage,
|
|
||||||
target_language: value.targetLanguage,
|
|
||||||
participants: value.participants,
|
|
||||||
reviewed: value.reviewed,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,88 +1,10 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
export type GetTranscriptSegmentTopic = {
|
||||||
/**
|
text: string;
|
||||||
*
|
start: number;
|
||||||
* @export
|
speaker: number;
|
||||||
* @interface GetTranscriptSegmentTopic
|
};
|
||||||
*/
|
|
||||||
export interface GetTranscriptSegmentTopic {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptSegmentTopic
|
|
||||||
*/
|
|
||||||
text: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptSegmentTopic
|
|
||||||
*/
|
|
||||||
start: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptSegmentTopic
|
|
||||||
*/
|
|
||||||
speaker: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the GetTranscriptSegmentTopic interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfGetTranscriptSegmentTopic(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "text" in value;
|
|
||||||
isInstance = isInstance && "start" in value;
|
|
||||||
isInstance = isInstance && "speaker" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function GetTranscriptSegmentTopicFromJSON(
|
|
||||||
json: any,
|
|
||||||
): GetTranscriptSegmentTopic {
|
|
||||||
return GetTranscriptSegmentTopicFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function GetTranscriptSegmentTopicFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): GetTranscriptSegmentTopic {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
text: json["text"],
|
|
||||||
start: json["start"],
|
|
||||||
speaker: json["speaker"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function GetTranscriptSegmentTopicToJSON(
|
|
||||||
value?: GetTranscriptSegmentTopic | null,
|
|
||||||
): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
text: value.text,
|
|
||||||
start: value.start,
|
|
||||||
speaker: value.speaker,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,121 +1,16 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
import type { GetTranscriptSegmentTopic } from "./GetTranscriptSegmentTopic";
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface GetTranscriptTopic
|
|
||||||
*/
|
|
||||||
export interface GetTranscriptTopic {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopic
|
|
||||||
*/
|
|
||||||
id: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopic
|
|
||||||
*/
|
|
||||||
title: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopic
|
|
||||||
*/
|
|
||||||
summary: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopic
|
|
||||||
*/
|
|
||||||
timestamp: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopic
|
|
||||||
*/
|
|
||||||
duration: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopic
|
|
||||||
*/
|
|
||||||
transcript: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopic
|
|
||||||
*/
|
|
||||||
segments?: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
export type GetTranscriptTopic = {
|
||||||
* Check if a given object implements the GetTranscriptTopic interface.
|
id: string;
|
||||||
*/
|
title: string;
|
||||||
export function instanceOfGetTranscriptTopic(value: object): boolean {
|
summary: string;
|
||||||
let isInstance = true;
|
timestamp: number;
|
||||||
isInstance = isInstance && "id" in value;
|
duration: number | null;
|
||||||
isInstance = isInstance && "title" in value;
|
transcript: string;
|
||||||
isInstance = isInstance && "summary" in value;
|
segments?: Array<GetTranscriptSegmentTopic>;
|
||||||
isInstance = isInstance && "timestamp" in value;
|
};
|
||||||
isInstance = isInstance && "duration" in value;
|
|
||||||
isInstance = isInstance && "transcript" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function GetTranscriptTopicFromJSON(json: any): GetTranscriptTopic {
|
|
||||||
return GetTranscriptTopicFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function GetTranscriptTopicFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): GetTranscriptTopic {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
id: json["id"],
|
|
||||||
title: json["title"],
|
|
||||||
summary: json["summary"],
|
|
||||||
timestamp: json["timestamp"],
|
|
||||||
duration: json["duration"],
|
|
||||||
transcript: json["transcript"],
|
|
||||||
segments: !exists(json, "segments") ? undefined : json["segments"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function GetTranscriptTopicToJSON(
|
|
||||||
value?: GetTranscriptTopic | null,
|
|
||||||
): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
id: value.id,
|
|
||||||
title: value.title,
|
|
||||||
summary: value.summary,
|
|
||||||
timestamp: value.timestamp,
|
|
||||||
duration: value.duration,
|
|
||||||
transcript: value.transcript,
|
|
||||||
segments: value.segments,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,131 +1,18 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
import type { GetTranscriptSegmentTopic } from "./GetTranscriptSegmentTopic";
|
||||||
/**
|
import type { Word } from "./Word";
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface GetTranscriptTopicWithWords
|
|
||||||
*/
|
|
||||||
export interface GetTranscriptTopicWithWords {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopicWithWords
|
|
||||||
*/
|
|
||||||
id: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopicWithWords
|
|
||||||
*/
|
|
||||||
title: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopicWithWords
|
|
||||||
*/
|
|
||||||
summary: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopicWithWords
|
|
||||||
*/
|
|
||||||
timestamp: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopicWithWords
|
|
||||||
*/
|
|
||||||
duration: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopicWithWords
|
|
||||||
*/
|
|
||||||
transcript: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopicWithWords
|
|
||||||
*/
|
|
||||||
segments?: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopicWithWords
|
|
||||||
*/
|
|
||||||
words?: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
export type GetTranscriptTopicWithWords = {
|
||||||
* Check if a given object implements the GetTranscriptTopicWithWords interface.
|
id: string;
|
||||||
*/
|
title: string;
|
||||||
export function instanceOfGetTranscriptTopicWithWords(value: object): boolean {
|
summary: string;
|
||||||
let isInstance = true;
|
timestamp: number;
|
||||||
isInstance = isInstance && "id" in value;
|
duration: number | null;
|
||||||
isInstance = isInstance && "title" in value;
|
transcript: string;
|
||||||
isInstance = isInstance && "summary" in value;
|
segments?: Array<GetTranscriptSegmentTopic>;
|
||||||
isInstance = isInstance && "timestamp" in value;
|
words?: Array<Word>;
|
||||||
isInstance = isInstance && "duration" in value;
|
};
|
||||||
isInstance = isInstance && "transcript" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function GetTranscriptTopicWithWordsFromJSON(
|
|
||||||
json: any,
|
|
||||||
): GetTranscriptTopicWithWords {
|
|
||||||
return GetTranscriptTopicWithWordsFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function GetTranscriptTopicWithWordsFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): GetTranscriptTopicWithWords {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
id: json["id"],
|
|
||||||
title: json["title"],
|
|
||||||
summary: json["summary"],
|
|
||||||
timestamp: json["timestamp"],
|
|
||||||
duration: json["duration"],
|
|
||||||
transcript: json["transcript"],
|
|
||||||
segments: !exists(json, "segments") ? undefined : json["segments"],
|
|
||||||
words: !exists(json, "words") ? undefined : json["words"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function GetTranscriptTopicWithWordsToJSON(
|
|
||||||
value?: GetTranscriptTopicWithWords | null,
|
|
||||||
): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
id: value.id,
|
|
||||||
title: value.title,
|
|
||||||
summary: value.summary,
|
|
||||||
timestamp: value.timestamp,
|
|
||||||
duration: value.duration,
|
|
||||||
transcript: value.transcript,
|
|
||||||
segments: value.segments,
|
|
||||||
words: value.words,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,135 +1,18 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
import type { GetTranscriptSegmentTopic } from "./GetTranscriptSegmentTopic";
|
||||||
/**
|
import type { SpeakerWords } from "./SpeakerWords";
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface GetTranscriptTopicWithWordsPerSpeaker
|
|
||||||
*/
|
|
||||||
export interface GetTranscriptTopicWithWordsPerSpeaker {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopicWithWordsPerSpeaker
|
|
||||||
*/
|
|
||||||
id: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopicWithWordsPerSpeaker
|
|
||||||
*/
|
|
||||||
title: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopicWithWordsPerSpeaker
|
|
||||||
*/
|
|
||||||
summary: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopicWithWordsPerSpeaker
|
|
||||||
*/
|
|
||||||
timestamp: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopicWithWordsPerSpeaker
|
|
||||||
*/
|
|
||||||
duration: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopicWithWordsPerSpeaker
|
|
||||||
*/
|
|
||||||
transcript: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopicWithWordsPerSpeaker
|
|
||||||
*/
|
|
||||||
segments?: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof GetTranscriptTopicWithWordsPerSpeaker
|
|
||||||
*/
|
|
||||||
wordsPerSpeaker?: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
export type GetTranscriptTopicWithWordsPerSpeaker = {
|
||||||
* Check if a given object implements the GetTranscriptTopicWithWordsPerSpeaker interface.
|
id: string;
|
||||||
*/
|
title: string;
|
||||||
export function instanceOfGetTranscriptTopicWithWordsPerSpeaker(
|
summary: string;
|
||||||
value: object,
|
timestamp: number;
|
||||||
): boolean {
|
duration: number | null;
|
||||||
let isInstance = true;
|
transcript: string;
|
||||||
isInstance = isInstance && "id" in value;
|
segments?: Array<GetTranscriptSegmentTopic>;
|
||||||
isInstance = isInstance && "title" in value;
|
words_per_speaker?: Array<SpeakerWords>;
|
||||||
isInstance = isInstance && "summary" in value;
|
};
|
||||||
isInstance = isInstance && "timestamp" in value;
|
|
||||||
isInstance = isInstance && "duration" in value;
|
|
||||||
isInstance = isInstance && "transcript" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function GetTranscriptTopicWithWordsPerSpeakerFromJSON(
|
|
||||||
json: any,
|
|
||||||
): GetTranscriptTopicWithWordsPerSpeaker {
|
|
||||||
return GetTranscriptTopicWithWordsPerSpeakerFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function GetTranscriptTopicWithWordsPerSpeakerFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): GetTranscriptTopicWithWordsPerSpeaker {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
id: json["id"],
|
|
||||||
title: json["title"],
|
|
||||||
summary: json["summary"],
|
|
||||||
timestamp: json["timestamp"],
|
|
||||||
duration: json["duration"],
|
|
||||||
transcript: json["transcript"],
|
|
||||||
segments: !exists(json, "segments") ? undefined : json["segments"],
|
|
||||||
wordsPerSpeaker: !exists(json, "words_per_speaker")
|
|
||||||
? undefined
|
|
||||||
: json["words_per_speaker"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function GetTranscriptTopicWithWordsPerSpeakerToJSON(
|
|
||||||
value?: GetTranscriptTopicWithWordsPerSpeaker | null,
|
|
||||||
): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
id: value.id,
|
|
||||||
title: value.title,
|
|
||||||
summary: value.summary,
|
|
||||||
timestamp: value.timestamp,
|
|
||||||
duration: value.duration,
|
|
||||||
transcript: value.transcript,
|
|
||||||
segments: value.segments,
|
|
||||||
words_per_speaker: value.wordsPerSpeaker,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,67 +1,10 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
import type { ValidationError } from "./ValidationError";
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface HTTPValidationError
|
|
||||||
*/
|
|
||||||
export interface HTTPValidationError {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof HTTPValidationError
|
|
||||||
*/
|
|
||||||
detail?: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
export type HTTPValidationError = {
|
||||||
* Check if a given object implements the HTTPValidationError interface.
|
detail?: Array<ValidationError>;
|
||||||
*/
|
};
|
||||||
export function instanceOfHTTPValidationError(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function HTTPValidationErrorFromJSON(json: any): HTTPValidationError {
|
|
||||||
return HTTPValidationErrorFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function HTTPValidationErrorFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): HTTPValidationError {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
detail: !exists(json, "detail") ? undefined : json["detail"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function HTTPValidationErrorToJSON(
|
|
||||||
value?: HTTPValidationError | null,
|
|
||||||
): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
detail: value.detail,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,101 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface PageGetTranscript
|
|
||||||
*/
|
|
||||||
export interface PageGetTranscript {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof PageGetTranscript
|
|
||||||
*/
|
|
||||||
items: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof PageGetTranscript
|
|
||||||
*/
|
|
||||||
total: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof PageGetTranscript
|
|
||||||
*/
|
|
||||||
page: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof PageGetTranscript
|
|
||||||
*/
|
|
||||||
size: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof PageGetTranscript
|
|
||||||
*/
|
|
||||||
pages?: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the PageGetTranscript interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfPageGetTranscript(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "items" in value;
|
|
||||||
isInstance = isInstance && "total" in value;
|
|
||||||
isInstance = isInstance && "page" in value;
|
|
||||||
isInstance = isInstance && "size" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function PageGetTranscriptFromJSON(json: any): PageGetTranscript {
|
|
||||||
return PageGetTranscriptFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function PageGetTranscriptFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): PageGetTranscript {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
items: json["items"],
|
|
||||||
total: json["total"],
|
|
||||||
page: json["page"],
|
|
||||||
size: json["size"],
|
|
||||||
pages: !exists(json, "pages") ? undefined : json["pages"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function PageGetTranscriptToJSON(value?: PageGetTranscript | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
items: value.items,
|
|
||||||
total: value.total,
|
|
||||||
page: value.page,
|
|
||||||
size: value.size,
|
|
||||||
pages: value.pages,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
14
www/app/api/models/Page_GetTranscript_.ts
Normal file
14
www/app/api/models/Page_GetTranscript_.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import type { GetTranscript } from "./GetTranscript";
|
||||||
|
|
||||||
|
export type Page_GetTranscript_ = {
|
||||||
|
items: Array<GetTranscript>;
|
||||||
|
total: number;
|
||||||
|
page: number | null;
|
||||||
|
size: number | null;
|
||||||
|
pages?: number | null;
|
||||||
|
};
|
||||||
@@ -1,84 +1,10 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
export type Participant = {
|
||||||
/**
|
id: string;
|
||||||
*
|
speaker: number | null;
|
||||||
* @export
|
name: string;
|
||||||
* @interface Participant
|
};
|
||||||
*/
|
|
||||||
export interface Participant {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof Participant
|
|
||||||
*/
|
|
||||||
id: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof Participant
|
|
||||||
*/
|
|
||||||
speaker: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof Participant
|
|
||||||
*/
|
|
||||||
name: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the Participant interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfParticipant(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "id" in value;
|
|
||||||
isInstance = isInstance && "speaker" in value;
|
|
||||||
isInstance = isInstance && "name" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ParticipantFromJSON(json: any): Participant {
|
|
||||||
return ParticipantFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ParticipantFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): Participant {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
id: json["id"],
|
|
||||||
speaker: json["speaker"],
|
|
||||||
name: json["name"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ParticipantToJSON(value?: Participant | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
id: value.id,
|
|
||||||
speaker: value.speaker,
|
|
||||||
name: value.name,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,75 +1,9 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
export type RtcOffer = {
|
||||||
/**
|
sdp: string;
|
||||||
*
|
type: string;
|
||||||
* @export
|
};
|
||||||
* @interface RtcOffer
|
|
||||||
*/
|
|
||||||
export interface RtcOffer {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof RtcOffer
|
|
||||||
*/
|
|
||||||
sdp: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof RtcOffer
|
|
||||||
*/
|
|
||||||
type: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the RtcOffer interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfRtcOffer(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "sdp" in value;
|
|
||||||
isInstance = isInstance && "type" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function RtcOfferFromJSON(json: any): RtcOffer {
|
|
||||||
return RtcOfferFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function RtcOfferFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): RtcOffer {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
sdp: json["sdp"],
|
|
||||||
type: json["type"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function RtcOfferToJSON(value?: RtcOffer | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
sdp: value.sdp,
|
|
||||||
type: value.type,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,91 +1,11 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
export type SpeakerAssignment = {
|
||||||
/**
|
speaker?: number | null;
|
||||||
*
|
participant?: string | null;
|
||||||
* @export
|
timestamp_from: number;
|
||||||
* @interface SpeakerAssignment
|
timestamp_to: number;
|
||||||
*/
|
};
|
||||||
export interface SpeakerAssignment {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof SpeakerAssignment
|
|
||||||
*/
|
|
||||||
speaker?: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof SpeakerAssignment
|
|
||||||
*/
|
|
||||||
participant?: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof SpeakerAssignment
|
|
||||||
*/
|
|
||||||
timestampFrom: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof SpeakerAssignment
|
|
||||||
*/
|
|
||||||
timestampTo: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the SpeakerAssignment interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfSpeakerAssignment(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "timestampFrom" in value;
|
|
||||||
isInstance = isInstance && "timestampTo" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function SpeakerAssignmentFromJSON(json: any): SpeakerAssignment {
|
|
||||||
return SpeakerAssignmentFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function SpeakerAssignmentFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): SpeakerAssignment {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
speaker: !exists(json, "speaker") ? undefined : json["speaker"],
|
|
||||||
participant: !exists(json, "participant") ? undefined : json["participant"],
|
|
||||||
timestampFrom: json["timestamp_from"],
|
|
||||||
timestampTo: json["timestamp_to"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function SpeakerAssignmentToJSON(value?: SpeakerAssignment | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
speaker: value.speaker,
|
|
||||||
participant: value.participant,
|
|
||||||
timestamp_from: value.timestampFrom,
|
|
||||||
timestamp_to: value.timestampTo,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,70 +1,8 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
export type SpeakerAssignmentStatus = {
|
||||||
/**
|
status: string;
|
||||||
*
|
};
|
||||||
* @export
|
|
||||||
* @interface SpeakerAssignmentStatus
|
|
||||||
*/
|
|
||||||
export interface SpeakerAssignmentStatus {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof SpeakerAssignmentStatus
|
|
||||||
*/
|
|
||||||
status: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the SpeakerAssignmentStatus interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfSpeakerAssignmentStatus(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "status" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function SpeakerAssignmentStatusFromJSON(
|
|
||||||
json: any,
|
|
||||||
): SpeakerAssignmentStatus {
|
|
||||||
return SpeakerAssignmentStatusFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function SpeakerAssignmentStatusFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): SpeakerAssignmentStatus {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
status: json["status"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function SpeakerAssignmentStatusToJSON(
|
|
||||||
value?: SpeakerAssignmentStatus | null,
|
|
||||||
): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
status: value.status,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,75 +1,9 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
export type SpeakerMerge = {
|
||||||
/**
|
speaker_from: number;
|
||||||
*
|
speaker_to: number;
|
||||||
* @export
|
};
|
||||||
* @interface SpeakerMerge
|
|
||||||
*/
|
|
||||||
export interface SpeakerMerge {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof SpeakerMerge
|
|
||||||
*/
|
|
||||||
speakerFrom: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof SpeakerMerge
|
|
||||||
*/
|
|
||||||
speakerTo: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the SpeakerMerge interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfSpeakerMerge(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "speakerFrom" in value;
|
|
||||||
isInstance = isInstance && "speakerTo" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function SpeakerMergeFromJSON(json: any): SpeakerMerge {
|
|
||||||
return SpeakerMergeFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function SpeakerMergeFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): SpeakerMerge {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
speakerFrom: json["speaker_from"],
|
|
||||||
speakerTo: json["speaker_to"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function SpeakerMergeToJSON(value?: SpeakerMerge | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
speaker_from: value.speakerFrom,
|
|
||||||
speaker_to: value.speakerTo,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,75 +1,11 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
import type { Word } from "./Word";
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface SpeakerWords
|
|
||||||
*/
|
|
||||||
export interface SpeakerWords {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof SpeakerWords
|
|
||||||
*/
|
|
||||||
speaker: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof SpeakerWords
|
|
||||||
*/
|
|
||||||
words: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
export type SpeakerWords = {
|
||||||
* Check if a given object implements the SpeakerWords interface.
|
speaker: number;
|
||||||
*/
|
words: Array<Word>;
|
||||||
export function instanceOfSpeakerWords(value: object): boolean {
|
};
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "speaker" in value;
|
|
||||||
isInstance = isInstance && "words" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function SpeakerWordsFromJSON(json: any): SpeakerWords {
|
|
||||||
return SpeakerWordsFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function SpeakerWordsFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): SpeakerWords {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
speaker: json["speaker"],
|
|
||||||
words: json["words"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function SpeakerWordsToJSON(value?: SpeakerWords | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
speaker: value.speaker,
|
|
||||||
words: value.words,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,87 +1,10 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
export type TranscriptParticipant = {
|
||||||
/**
|
id?: string;
|
||||||
*
|
speaker: number | null;
|
||||||
* @export
|
name: string;
|
||||||
* @interface TranscriptParticipant
|
};
|
||||||
*/
|
|
||||||
export interface TranscriptParticipant {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof TranscriptParticipant
|
|
||||||
*/
|
|
||||||
id?: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof TranscriptParticipant
|
|
||||||
*/
|
|
||||||
speaker: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof TranscriptParticipant
|
|
||||||
*/
|
|
||||||
name: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the TranscriptParticipant interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfTranscriptParticipant(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "speaker" in value;
|
|
||||||
isInstance = isInstance && "name" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function TranscriptParticipantFromJSON(
|
|
||||||
json: any,
|
|
||||||
): TranscriptParticipant {
|
|
||||||
return TranscriptParticipantFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function TranscriptParticipantFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): TranscriptParticipant {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
id: !exists(json, "id") ? undefined : json["id"],
|
|
||||||
speaker: json["speaker"],
|
|
||||||
name: json["name"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function TranscriptParticipantToJSON(
|
|
||||||
value?: TranscriptParticipant | null,
|
|
||||||
): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
id: value.id,
|
|
||||||
speaker: value.speaker,
|
|
||||||
name: value.name,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,88 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface TranscriptSegmentTopic
|
|
||||||
*/
|
|
||||||
export interface TranscriptSegmentTopic {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof TranscriptSegmentTopic
|
|
||||||
*/
|
|
||||||
speaker: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof TranscriptSegmentTopic
|
|
||||||
*/
|
|
||||||
text: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof TranscriptSegmentTopic
|
|
||||||
*/
|
|
||||||
timestamp: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the TranscriptSegmentTopic interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfTranscriptSegmentTopic(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "speaker" in value;
|
|
||||||
isInstance = isInstance && "text" in value;
|
|
||||||
isInstance = isInstance && "timestamp" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function TranscriptSegmentTopicFromJSON(
|
|
||||||
json: any,
|
|
||||||
): TranscriptSegmentTopic {
|
|
||||||
return TranscriptSegmentTopicFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function TranscriptSegmentTopicFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): TranscriptSegmentTopic {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
speaker: json["speaker"],
|
|
||||||
text: json["text"],
|
|
||||||
timestamp: json["timestamp"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function TranscriptSegmentTopicToJSON(
|
|
||||||
value?: TranscriptSegmentTopic | null,
|
|
||||||
): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
speaker: value.speaker,
|
|
||||||
text: value.text,
|
|
||||||
timestamp: value.timestamp,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface TranscriptTopic
|
|
||||||
*/
|
|
||||||
export interface TranscriptTopic {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof TranscriptTopic
|
|
||||||
*/
|
|
||||||
id?: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof TranscriptTopic
|
|
||||||
*/
|
|
||||||
title: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof TranscriptTopic
|
|
||||||
*/
|
|
||||||
summary: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof TranscriptTopic
|
|
||||||
*/
|
|
||||||
timestamp: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof TranscriptTopic
|
|
||||||
*/
|
|
||||||
segments?: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the TranscriptTopic interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfTranscriptTopic(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "title" in value;
|
|
||||||
isInstance = isInstance && "summary" in value;
|
|
||||||
isInstance = isInstance && "timestamp" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function TranscriptTopicFromJSON(json: any): TranscriptTopic {
|
|
||||||
return TranscriptTopicFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function TranscriptTopicFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): TranscriptTopic {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
id: !exists(json, "id") ? undefined : json["id"],
|
|
||||||
title: json["title"],
|
|
||||||
summary: json["summary"],
|
|
||||||
timestamp: json["timestamp"],
|
|
||||||
segments: !exists(json, "segments") ? undefined : json["segments"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function TranscriptTopicToJSON(value?: TranscriptTopic | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
id: value.id,
|
|
||||||
title: value.title,
|
|
||||||
summary: value.summary,
|
|
||||||
timestamp: value.timestamp,
|
|
||||||
segments: value.segments,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,73 +1,9 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
export type UpdateParticipant = {
|
||||||
/**
|
speaker?: number | null;
|
||||||
*
|
name?: string | null;
|
||||||
* @export
|
};
|
||||||
* @interface UpdateParticipant
|
|
||||||
*/
|
|
||||||
export interface UpdateParticipant {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof UpdateParticipant
|
|
||||||
*/
|
|
||||||
speaker?: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof UpdateParticipant
|
|
||||||
*/
|
|
||||||
name?: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the UpdateParticipant interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfUpdateParticipant(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function UpdateParticipantFromJSON(json: any): UpdateParticipant {
|
|
||||||
return UpdateParticipantFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function UpdateParticipantFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): UpdateParticipant {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
speaker: !exists(json, "speaker") ? undefined : json["speaker"],
|
|
||||||
name: !exists(json, "name") ? undefined : json["name"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function UpdateParticipantToJSON(value?: UpdateParticipant | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
speaker: value.speaker,
|
|
||||||
name: value.name,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,127 +1,17 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
import type { TranscriptParticipant } from "./TranscriptParticipant";
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface UpdateTranscript
|
|
||||||
*/
|
|
||||||
export interface UpdateTranscript {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof UpdateTranscript
|
|
||||||
*/
|
|
||||||
name?: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof UpdateTranscript
|
|
||||||
*/
|
|
||||||
locked?: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof UpdateTranscript
|
|
||||||
*/
|
|
||||||
title?: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof UpdateTranscript
|
|
||||||
*/
|
|
||||||
shortSummary?: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof UpdateTranscript
|
|
||||||
*/
|
|
||||||
longSummary?: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof UpdateTranscript
|
|
||||||
*/
|
|
||||||
shareMode?: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof UpdateTranscript
|
|
||||||
*/
|
|
||||||
participants?: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof UpdateTranscript
|
|
||||||
*/
|
|
||||||
reviewed?: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
export type UpdateTranscript = {
|
||||||
* Check if a given object implements the UpdateTranscript interface.
|
name?: string | null;
|
||||||
*/
|
locked?: boolean | null;
|
||||||
export function instanceOfUpdateTranscript(value: object): boolean {
|
title?: string | null;
|
||||||
let isInstance = true;
|
short_summary?: string | null;
|
||||||
|
long_summary?: string | null;
|
||||||
return isInstance;
|
share_mode?: "public" | "semi-private" | "private" | null;
|
||||||
}
|
participants?: Array<TranscriptParticipant> | null;
|
||||||
|
reviewed?: boolean | null;
|
||||||
export function UpdateTranscriptFromJSON(json: any): UpdateTranscript {
|
};
|
||||||
return UpdateTranscriptFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function UpdateTranscriptFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): UpdateTranscript {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
name: !exists(json, "name") ? undefined : json["name"],
|
|
||||||
locked: !exists(json, "locked") ? undefined : json["locked"],
|
|
||||||
title: !exists(json, "title") ? undefined : json["title"],
|
|
||||||
shortSummary: !exists(json, "short_summary")
|
|
||||||
? undefined
|
|
||||||
: json["short_summary"],
|
|
||||||
longSummary: !exists(json, "long_summary")
|
|
||||||
? undefined
|
|
||||||
: json["long_summary"],
|
|
||||||
shareMode: !exists(json, "share_mode") ? undefined : json["share_mode"],
|
|
||||||
participants: !exists(json, "participants")
|
|
||||||
? undefined
|
|
||||||
: json["participants"],
|
|
||||||
reviewed: !exists(json, "reviewed") ? undefined : json["reviewed"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function UpdateTranscriptToJSON(value?: UpdateTranscript | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
name: value.name,
|
|
||||||
locked: value.locked,
|
|
||||||
title: value.title,
|
|
||||||
short_summary: value.shortSummary,
|
|
||||||
long_summary: value.longSummary,
|
|
||||||
share_mode: value.shareMode,
|
|
||||||
participants: value.participants,
|
|
||||||
reviewed: value.reviewed,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,84 +1,10 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
export type UserInfo = {
|
||||||
/**
|
sub: string;
|
||||||
*
|
email: string | null;
|
||||||
* @export
|
email_verified: boolean | null;
|
||||||
* @interface UserInfo
|
};
|
||||||
*/
|
|
||||||
export interface UserInfo {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof UserInfo
|
|
||||||
*/
|
|
||||||
sub: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof UserInfo
|
|
||||||
*/
|
|
||||||
email: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof UserInfo
|
|
||||||
*/
|
|
||||||
emailVerified: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the UserInfo interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfUserInfo(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "sub" in value;
|
|
||||||
isInstance = isInstance && "email" in value;
|
|
||||||
isInstance = isInstance && "emailVerified" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function UserInfoFromJSON(json: any): UserInfo {
|
|
||||||
return UserInfoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function UserInfoFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): UserInfo {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
sub: json["sub"],
|
|
||||||
email: json["email"],
|
|
||||||
emailVerified: json["email_verified"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function UserInfoToJSON(value?: UserInfo | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
sub: value.sub,
|
|
||||||
email: value.email,
|
|
||||||
email_verified: value.emailVerified,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,84 +1,10 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
export type ValidationError = {
|
||||||
/**
|
loc: Array<string | number>;
|
||||||
*
|
msg: string;
|
||||||
* @export
|
type: string;
|
||||||
* @interface ValidationError
|
};
|
||||||
*/
|
|
||||||
export interface ValidationError {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof ValidationError
|
|
||||||
*/
|
|
||||||
loc: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof ValidationError
|
|
||||||
*/
|
|
||||||
msg: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof ValidationError
|
|
||||||
*/
|
|
||||||
type: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the ValidationError interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfValidationError(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "loc" in value;
|
|
||||||
isInstance = isInstance && "msg" in value;
|
|
||||||
isInstance = isInstance && "type" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ValidationErrorFromJSON(json: any): ValidationError {
|
|
||||||
return ValidationErrorFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ValidationErrorFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): ValidationError {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
loc: json["loc"],
|
|
||||||
msg: json["msg"],
|
|
||||||
type: json["type"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ValidationErrorToJSON(value?: ValidationError | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
loc: value.loc,
|
|
||||||
msg: value.msg,
|
|
||||||
type: value.type,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,92 +1,11 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/**
|
|
||||||
* FastAPI
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from "../runtime";
|
export type Word = {
|
||||||
/**
|
text: string;
|
||||||
*
|
start: number;
|
||||||
* @export
|
end: number;
|
||||||
* @interface Word
|
speaker?: number;
|
||||||
*/
|
};
|
||||||
export interface Word {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof Word
|
|
||||||
*/
|
|
||||||
text: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof Word
|
|
||||||
*/
|
|
||||||
start: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof Word
|
|
||||||
*/
|
|
||||||
end: any | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {any}
|
|
||||||
* @memberof Word
|
|
||||||
*/
|
|
||||||
speaker?: any | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the Word interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfWord(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "text" in value;
|
|
||||||
isInstance = isInstance && "start" in value;
|
|
||||||
isInstance = isInstance && "end" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function WordFromJSON(json: any): Word {
|
|
||||||
return WordFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function WordFromJSONTyped(
|
|
||||||
json: any,
|
|
||||||
ignoreDiscriminator: boolean,
|
|
||||||
): Word {
|
|
||||||
if (json === undefined || json === null) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
text: json["text"],
|
|
||||||
start: json["start"],
|
|
||||||
end: json["end"],
|
|
||||||
speaker: !exists(json, "speaker") ? undefined : json["speaker"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function WordToJSON(value?: Word | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
text: value.text,
|
|
||||||
start: value.start,
|
|
||||||
end: value.end,
|
|
||||||
speaker: value.speaker,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export * from "./AudioWaveform";
|
|
||||||
export * from "./CreateParticipant";
|
|
||||||
export * from "./CreateTranscript";
|
|
||||||
export * from "./DeletionStatus";
|
|
||||||
export * from "./GetTranscript";
|
|
||||||
export * from "./GetTranscriptSegmentTopic";
|
|
||||||
export * from "./GetTranscriptTopic";
|
|
||||||
export * from "./GetTranscriptTopicWithWords";
|
|
||||||
export * from "./GetTranscriptTopicWithWordsPerSpeaker";
|
|
||||||
export * from "./HTTPValidationError";
|
|
||||||
export * from "./PageGetTranscript";
|
|
||||||
export * from "./Participant";
|
|
||||||
export * from "./RtcOffer";
|
|
||||||
export * from "./SpeakerAssignment";
|
|
||||||
export * from "./SpeakerAssignmentStatus";
|
|
||||||
export * from "./SpeakerMerge";
|
|
||||||
export * from "./SpeakerWords";
|
|
||||||
export * from "./TranscriptParticipant";
|
|
||||||
export * from "./UpdateParticipant";
|
|
||||||
export * from "./UpdateTranscript";
|
|
||||||
export * from "./UserInfo";
|
|
||||||
export * from "./ValidationError";
|
|
||||||
export * from "./Word";
|
|
||||||
547
www/app/api/services/DefaultService.ts
Normal file
547
www/app/api/services/DefaultService.ts
Normal file
@@ -0,0 +1,547 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
import type { AudioWaveform } from "../models/AudioWaveform";
|
||||||
|
import type { Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post } from "../models/Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post";
|
||||||
|
import type { CreateParticipant } from "../models/CreateParticipant";
|
||||||
|
import type { CreateTranscript } from "../models/CreateTranscript";
|
||||||
|
import type { DeletionStatus } from "../models/DeletionStatus";
|
||||||
|
import type { GetTranscript } from "../models/GetTranscript";
|
||||||
|
import type { GetTranscriptTopic } from "../models/GetTranscriptTopic";
|
||||||
|
import type { GetTranscriptTopicWithWords } from "../models/GetTranscriptTopicWithWords";
|
||||||
|
import type { GetTranscriptTopicWithWordsPerSpeaker } from "../models/GetTranscriptTopicWithWordsPerSpeaker";
|
||||||
|
import type { Page_GetTranscript_ } from "../models/Page_GetTranscript_";
|
||||||
|
import type { Participant } from "../models/Participant";
|
||||||
|
import type { RtcOffer } from "../models/RtcOffer";
|
||||||
|
import type { SpeakerAssignment } from "../models/SpeakerAssignment";
|
||||||
|
import type { SpeakerAssignmentStatus } from "../models/SpeakerAssignmentStatus";
|
||||||
|
import type { SpeakerMerge } from "../models/SpeakerMerge";
|
||||||
|
import type { UpdateParticipant } from "../models/UpdateParticipant";
|
||||||
|
import type { UpdateTranscript } from "../models/UpdateTranscript";
|
||||||
|
import type { UserInfo } from "../models/UserInfo";
|
||||||
|
|
||||||
|
import type { CancelablePromise } from "../core/CancelablePromise";
|
||||||
|
import type { BaseHttpRequest } from "../core/BaseHttpRequest";
|
||||||
|
|
||||||
|
export class DefaultService {
|
||||||
|
constructor(public readonly httpRequest: BaseHttpRequest) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Metrics
|
||||||
|
* Endpoint that serves Prometheus metrics.
|
||||||
|
* @returns any Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public metrics(): CancelablePromise<any> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "GET",
|
||||||
|
url: "/metrics",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcripts List
|
||||||
|
* @param page Page number
|
||||||
|
* @param size Page size
|
||||||
|
* @returns Page_GetTranscript_ Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptsList(
|
||||||
|
page: number = 1,
|
||||||
|
size: number = 50,
|
||||||
|
): CancelablePromise<Page_GetTranscript_> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "GET",
|
||||||
|
url: "/v1/transcripts",
|
||||||
|
query: {
|
||||||
|
page: page,
|
||||||
|
size: size,
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcripts Create
|
||||||
|
* @param requestBody
|
||||||
|
* @returns GetTranscript Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptsCreate(
|
||||||
|
requestBody: CreateTranscript,
|
||||||
|
): CancelablePromise<GetTranscript> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "POST",
|
||||||
|
url: "/v1/transcripts",
|
||||||
|
body: requestBody,
|
||||||
|
mediaType: "application/json",
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Get
|
||||||
|
* @param transcriptId
|
||||||
|
* @returns GetTranscript Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptGet(
|
||||||
|
transcriptId: string,
|
||||||
|
): CancelablePromise<GetTranscript> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "GET",
|
||||||
|
url: "/v1/transcripts/{transcript_id}",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Update
|
||||||
|
* @param transcriptId
|
||||||
|
* @param requestBody
|
||||||
|
* @returns GetTranscript Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptUpdate(
|
||||||
|
transcriptId: string,
|
||||||
|
requestBody: UpdateTranscript,
|
||||||
|
): CancelablePromise<GetTranscript> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "PATCH",
|
||||||
|
url: "/v1/transcripts/{transcript_id}",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
},
|
||||||
|
body: requestBody,
|
||||||
|
mediaType: "application/json",
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Delete
|
||||||
|
* @param transcriptId
|
||||||
|
* @returns DeletionStatus Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptDelete(
|
||||||
|
transcriptId: string,
|
||||||
|
): CancelablePromise<DeletionStatus> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "DELETE",
|
||||||
|
url: "/v1/transcripts/{transcript_id}",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Get Topics
|
||||||
|
* @param transcriptId
|
||||||
|
* @returns GetTranscriptTopic Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptGetTopics(
|
||||||
|
transcriptId: string,
|
||||||
|
): CancelablePromise<Array<GetTranscriptTopic>> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "GET",
|
||||||
|
url: "/v1/transcripts/{transcript_id}/topics",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Get Topics With Words
|
||||||
|
* @param transcriptId
|
||||||
|
* @returns GetTranscriptTopicWithWords Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptGetTopicsWithWords(
|
||||||
|
transcriptId: string,
|
||||||
|
): CancelablePromise<Array<GetTranscriptTopicWithWords>> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "GET",
|
||||||
|
url: "/v1/transcripts/{transcript_id}/topics/with-words",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Get Topics With Words Per Speaker
|
||||||
|
* @param transcriptId
|
||||||
|
* @param topicId
|
||||||
|
* @returns GetTranscriptTopicWithWordsPerSpeaker Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptGetTopicsWithWordsPerSpeaker(
|
||||||
|
transcriptId: string,
|
||||||
|
topicId: string,
|
||||||
|
): CancelablePromise<GetTranscriptTopicWithWordsPerSpeaker> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "GET",
|
||||||
|
url: "/v1/transcripts/{transcript_id}/topics/{topic_id}/words-per-speaker",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
topic_id: topicId,
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Get Audio Mp3
|
||||||
|
* @param transcriptId
|
||||||
|
* @param token
|
||||||
|
* @returns any Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptHeadAudioMp3(
|
||||||
|
transcriptId: string,
|
||||||
|
token?: string | null,
|
||||||
|
): CancelablePromise<any> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "HEAD",
|
||||||
|
url: "/v1/transcripts/{transcript_id}/audio/mp3",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
},
|
||||||
|
query: {
|
||||||
|
token: token,
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Get Audio Mp3
|
||||||
|
* @param transcriptId
|
||||||
|
* @param token
|
||||||
|
* @returns any Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptGetAudioMp3(
|
||||||
|
transcriptId: string,
|
||||||
|
token?: string | null,
|
||||||
|
): CancelablePromise<any> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "GET",
|
||||||
|
url: "/v1/transcripts/{transcript_id}/audio/mp3",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
},
|
||||||
|
query: {
|
||||||
|
token: token,
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Get Audio Waveform
|
||||||
|
* @param transcriptId
|
||||||
|
* @returns AudioWaveform Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptGetAudioWaveform(
|
||||||
|
transcriptId: string,
|
||||||
|
): CancelablePromise<AudioWaveform> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "GET",
|
||||||
|
url: "/v1/transcripts/{transcript_id}/audio/waveform",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Get Participants
|
||||||
|
* @param transcriptId
|
||||||
|
* @returns Participant Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptGetParticipants(
|
||||||
|
transcriptId: string,
|
||||||
|
): CancelablePromise<Array<Participant>> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "GET",
|
||||||
|
url: "/v1/transcripts/{transcript_id}/participants",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Add Participant
|
||||||
|
* @param transcriptId
|
||||||
|
* @param requestBody
|
||||||
|
* @returns Participant Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptAddParticipant(
|
||||||
|
transcriptId: string,
|
||||||
|
requestBody: CreateParticipant,
|
||||||
|
): CancelablePromise<Participant> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "POST",
|
||||||
|
url: "/v1/transcripts/{transcript_id}/participants",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
},
|
||||||
|
body: requestBody,
|
||||||
|
mediaType: "application/json",
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Get Participant
|
||||||
|
* @param transcriptId
|
||||||
|
* @param participantId
|
||||||
|
* @returns Participant Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptGetParticipant(
|
||||||
|
transcriptId: string,
|
||||||
|
participantId: string,
|
||||||
|
): CancelablePromise<Participant> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "GET",
|
||||||
|
url: "/v1/transcripts/{transcript_id}/participants/{participant_id}",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
participant_id: participantId,
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Update Participant
|
||||||
|
* @param transcriptId
|
||||||
|
* @param participantId
|
||||||
|
* @param requestBody
|
||||||
|
* @returns Participant Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptUpdateParticipant(
|
||||||
|
transcriptId: string,
|
||||||
|
participantId: string,
|
||||||
|
requestBody: UpdateParticipant,
|
||||||
|
): CancelablePromise<Participant> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "PATCH",
|
||||||
|
url: "/v1/transcripts/{transcript_id}/participants/{participant_id}",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
participant_id: participantId,
|
||||||
|
},
|
||||||
|
body: requestBody,
|
||||||
|
mediaType: "application/json",
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Delete Participant
|
||||||
|
* @param transcriptId
|
||||||
|
* @param participantId
|
||||||
|
* @returns DeletionStatus Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptDeleteParticipant(
|
||||||
|
transcriptId: string,
|
||||||
|
participantId: string,
|
||||||
|
): CancelablePromise<DeletionStatus> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "DELETE",
|
||||||
|
url: "/v1/transcripts/{transcript_id}/participants/{participant_id}",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
participant_id: participantId,
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Assign Speaker
|
||||||
|
* @param transcriptId
|
||||||
|
* @param requestBody
|
||||||
|
* @returns SpeakerAssignmentStatus Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptAssignSpeaker(
|
||||||
|
transcriptId: string,
|
||||||
|
requestBody: SpeakerAssignment,
|
||||||
|
): CancelablePromise<SpeakerAssignmentStatus> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "PATCH",
|
||||||
|
url: "/v1/transcripts/{transcript_id}/speaker/assign",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
},
|
||||||
|
body: requestBody,
|
||||||
|
mediaType: "application/json",
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Merge Speaker
|
||||||
|
* @param transcriptId
|
||||||
|
* @param requestBody
|
||||||
|
* @returns SpeakerAssignmentStatus Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptMergeSpeaker(
|
||||||
|
transcriptId: string,
|
||||||
|
requestBody: SpeakerMerge,
|
||||||
|
): CancelablePromise<SpeakerAssignmentStatus> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "PATCH",
|
||||||
|
url: "/v1/transcripts/{transcript_id}/speaker/merge",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
},
|
||||||
|
body: requestBody,
|
||||||
|
mediaType: "application/json",
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Record Upload
|
||||||
|
* @param transcriptId
|
||||||
|
* @param formData
|
||||||
|
* @returns any Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptRecordUpload(
|
||||||
|
transcriptId: string,
|
||||||
|
formData: Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post,
|
||||||
|
): CancelablePromise<any> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "POST",
|
||||||
|
url: "/v1/transcripts/{transcript_id}/record/upload",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
},
|
||||||
|
formData: formData,
|
||||||
|
mediaType: "multipart/form-data",
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Get Websocket Events
|
||||||
|
* @param transcriptId
|
||||||
|
* @returns any Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptGetWebsocketEvents(
|
||||||
|
transcriptId: string,
|
||||||
|
): CancelablePromise<any> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "GET",
|
||||||
|
url: "/v1/transcripts/{transcript_id}/events",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transcript Record Webrtc
|
||||||
|
* @param transcriptId
|
||||||
|
* @param requestBody
|
||||||
|
* @returns any Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1TranscriptRecordWebrtc(
|
||||||
|
transcriptId: string,
|
||||||
|
requestBody: RtcOffer,
|
||||||
|
): CancelablePromise<any> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "POST",
|
||||||
|
url: "/v1/transcripts/{transcript_id}/record/webrtc",
|
||||||
|
path: {
|
||||||
|
transcript_id: transcriptId,
|
||||||
|
},
|
||||||
|
body: requestBody,
|
||||||
|
mediaType: "application/json",
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User Me
|
||||||
|
* @returns any Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public v1UserMe(): CancelablePromise<UserInfo | null> {
|
||||||
|
return this.httpRequest.request({
|
||||||
|
method: "GET",
|
||||||
|
url: "/v1/me",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
7
www/app/lib/shareMode.ts
Normal file
7
www/app/lib/shareMode.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
export type ShareMode = "public" | "semi-private" | "private" | null;
|
||||||
|
|
||||||
|
export function toShareMode(value: string | undefined | null): ShareMode {
|
||||||
|
return value === "public" || value === "semi-private" || value === "private"
|
||||||
|
? value
|
||||||
|
: null;
|
||||||
|
}
|
||||||
@@ -1,16 +1,14 @@
|
|||||||
import { Configuration } from "../api/runtime";
|
|
||||||
import { DefaultApi } from "../api/apis/DefaultApi";
|
|
||||||
|
|
||||||
import { useFiefAccessTokenInfo } from "@fief/fief/nextjs/react";
|
import { useFiefAccessTokenInfo } from "@fief/fief/nextjs/react";
|
||||||
import { useContext, useEffect, useState } from "react";
|
import { useContext, useEffect, useState } from "react";
|
||||||
import { DomainContext, featureEnabled } from "../[domain]/domainContext";
|
import { DomainContext, featureEnabled } from "../[domain]/domainContext";
|
||||||
import { CookieContext } from "../(auth)/fiefWrapper";
|
import { CookieContext } from "../(auth)/fiefWrapper";
|
||||||
|
import { OpenApi, DefaultService } from "../api";
|
||||||
|
|
||||||
export default function getApi(): DefaultApi | undefined {
|
export default function useApi(): DefaultService | null {
|
||||||
const accessTokenInfo = useFiefAccessTokenInfo();
|
const accessTokenInfo = useFiefAccessTokenInfo();
|
||||||
const api_url = useContext(DomainContext).api_url;
|
const api_url = useContext(DomainContext).api_url;
|
||||||
const requireLogin = featureEnabled("requireLogin");
|
const requireLogin = featureEnabled("requireLogin");
|
||||||
const [api, setApi] = useState<DefaultApi>();
|
const [api, setApi] = useState<OpenApi | null>(null);
|
||||||
const { hasAuthCookie } = useContext(CookieContext);
|
const { hasAuthCookie } = useContext(CookieContext);
|
||||||
|
|
||||||
if (!api_url) throw new Error("no API URL");
|
if (!api_url) throw new Error("no API URL");
|
||||||
@@ -20,14 +18,15 @@ export default function getApi(): DefaultApi | undefined {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const apiConfiguration = new Configuration({
|
if (!accessTokenInfo) return;
|
||||||
basePath: api_url,
|
|
||||||
accessToken: accessTokenInfo
|
const openApi = new OpenApi({
|
||||||
? "Bearer " + accessTokenInfo.access_token
|
BASE: api_url,
|
||||||
: undefined,
|
TOKEN: accessTokenInfo?.access_token,
|
||||||
});
|
});
|
||||||
setApi(new DefaultApi(apiConfiguration));
|
|
||||||
|
setApi(openApi);
|
||||||
}, [!accessTokenInfo, hasAuthCookie]);
|
}, [!accessTokenInfo, hasAuthCookie]);
|
||||||
|
|
||||||
return api;
|
return api?.default ?? null;
|
||||||
}
|
}
|
||||||
@@ -30,7 +30,7 @@ export function getZulipMessage(
|
|||||||
topics: GetTranscriptTopic[] | null,
|
topics: GetTranscriptTopic[] | null,
|
||||||
includeTopics: boolean,
|
includeTopics: boolean,
|
||||||
) {
|
) {
|
||||||
const date = new Date(transcript.createdAt);
|
const date = new Date(transcript.created_at);
|
||||||
|
|
||||||
// Get the timezone offset in minutes and convert it to hours and minutes
|
// Get the timezone offset in minutes and convert it to hours and minutes
|
||||||
const timezoneOffset = -date.getTimezoneOffset();
|
const timezoneOffset = -date.getTimezoneOffset();
|
||||||
@@ -72,7 +72,7 @@ export function getZulipMessage(
|
|||||||
}
|
}
|
||||||
|
|
||||||
let summary = "```spoiler Summary\n";
|
let summary = "```spoiler Summary\n";
|
||||||
summary += transcript.longSummary;
|
summary += transcript.long_summary;
|
||||||
summary += "```\n\n";
|
summary += "```\n\n";
|
||||||
|
|
||||||
const message = headerText + summary + topicText + "-----\n";
|
const message = headerText + summary + topicText + "-----\n";
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint",
|
"lint": "next lint",
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
"openapi": "openapi-generator-cli generate -i http://localhost:1250/openapi.json -g typescript-fetch -o app/api && yarn format"
|
"openapi": "openapi --input http://127.0.0.1:1250/openapi.json --name OpenApi --output app/api && yarn format"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fief/fief": "^0.13.5",
|
"@fief/fief": "^0.13.5",
|
||||||
@@ -19,10 +19,12 @@
|
|||||||
"@vercel/edge-config": "^0.4.1",
|
"@vercel/edge-config": "^0.4.1",
|
||||||
"autoprefixer": "10.4.14",
|
"autoprefixer": "10.4.14",
|
||||||
"axios": "^1.6.2",
|
"axios": "^1.6.2",
|
||||||
|
"eslint-config-next": "^14.0.4",
|
||||||
"fontawesome": "^5.6.3",
|
"fontawesome": "^5.6.3",
|
||||||
"jest-worker": "^29.6.2",
|
"jest-worker": "^29.6.2",
|
||||||
"next": "^13.4.9",
|
"next": "^14.0.4",
|
||||||
"postcss": "8.4.25",
|
"postcss": "8.4.25",
|
||||||
|
"prop-types": "^15.8.1",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-dropdown": "^1.11.0",
|
"react-dropdown": "^1.11.0",
|
||||||
@@ -44,6 +46,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@openapitools/openapi-generator-cli": "^2.7.0",
|
"@openapitools/openapi-generator-cli": "^2.7.0",
|
||||||
"@types/react": "18.2.20",
|
"@types/react": "18.2.20",
|
||||||
|
"openapi-typescript-codegen": "^0.25.0",
|
||||||
"prettier": "^3.0.0"
|
"prettier": "^3.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1389
www/yarn.lock
1389
www/yarn.lock
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user