mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 12:49:06 +00:00
www: update openapi and display
This commit is contained in:
@@ -104,15 +104,26 @@ export function TopicList({
|
|||||||
</div>
|
</div>
|
||||||
{activeTopic?.id == topic.id && (
|
{activeTopic?.id == topic.id && (
|
||||||
<div className="p-2">
|
<div className="p-2">
|
||||||
{topic.segments.map((segment, index) => (
|
{topic.segments ? (
|
||||||
<p
|
<>
|
||||||
key={index}
|
{topic.segments.map((segment, index: number) => (
|
||||||
className="text-left text-slate-500 text-sm md:text-base"
|
<p
|
||||||
>
|
key={index}
|
||||||
[{formatTime(segment.timestamp)}] Speaker{" "}
|
className="text-left text-slate-500 text-sm md:text-base"
|
||||||
{segment.speaker}: {segment.text}
|
>
|
||||||
</p>
|
<span className="font-mono text-slate-500">
|
||||||
))}
|
[{formatTime(segment.start)}]
|
||||||
|
</span>
|
||||||
|
<span className="font-bold text-slate-500">
|
||||||
|
Speaker {segment.speaker}
|
||||||
|
</span>
|
||||||
|
<span>{segment.text}</span>
|
||||||
|
</p>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>{topic.text}</>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export type Topic = {
|
|||||||
title: string;
|
title: string;
|
||||||
summary: string;
|
summary: string;
|
||||||
id: string;
|
id: string;
|
||||||
|
text: string;
|
||||||
segments: SegmentTopic[];
|
segments: SegmentTopic[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ models/AudioWaveform.ts
|
|||||||
models/CreateTranscript.ts
|
models/CreateTranscript.ts
|
||||||
models/DeletionStatus.ts
|
models/DeletionStatus.ts
|
||||||
models/GetTranscript.ts
|
models/GetTranscript.ts
|
||||||
|
models/GetTranscriptSegmentTopic.ts
|
||||||
|
models/GetTranscriptTopic.ts
|
||||||
models/HTTPValidationError.ts
|
models/HTTPValidationError.ts
|
||||||
models/PageGetTranscript.ts
|
models/PageGetTranscript.ts
|
||||||
models/RtcOffer.ts
|
models/RtcOffer.ts
|
||||||
models/TranscriptSegmentTopic.ts
|
|
||||||
models/TranscriptTopic.ts
|
|
||||||
models/UpdateTranscript.ts
|
models/UpdateTranscript.ts
|
||||||
models/UserInfo.ts
|
models/UserInfo.ts
|
||||||
models/ValidationError.ts
|
models/ValidationError.ts
|
||||||
|
|||||||
88
www/app/api/models/GetTranscriptSegmentTopic.ts
Normal file
88
www/app/api/models/GetTranscriptSegmentTopic.ts
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
/* 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 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,
|
||||||
|
};
|
||||||
|
}
|
||||||
103
www/app/api/models/GetTranscriptTopic.ts
Normal file
103
www/app/api/models/GetTranscriptTopic.ts
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
/* 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 GetTranscriptTopic
|
||||||
|
*/
|
||||||
|
export interface GetTranscriptTopic {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @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
|
||||||
|
*/
|
||||||
|
text: any | null;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof GetTranscriptTopic
|
||||||
|
*/
|
||||||
|
segments?: any | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the GetTranscriptTopic interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfGetTranscriptTopic(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "title" in value;
|
||||||
|
isInstance = isInstance && "summary" in value;
|
||||||
|
isInstance = isInstance && "timestamp" in value;
|
||||||
|
isInstance = isInstance && "text" 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 {
|
||||||
|
title: json["title"],
|
||||||
|
summary: json["summary"],
|
||||||
|
timestamp: json["timestamp"],
|
||||||
|
text: json["text"],
|
||||||
|
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 {
|
||||||
|
title: value.title,
|
||||||
|
summary: value.summary,
|
||||||
|
timestamp: value.timestamp,
|
||||||
|
text: value.text,
|
||||||
|
segments: value.segments,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -4,11 +4,11 @@ export * from "./AudioWaveform";
|
|||||||
export * from "./CreateTranscript";
|
export * from "./CreateTranscript";
|
||||||
export * from "./DeletionStatus";
|
export * from "./DeletionStatus";
|
||||||
export * from "./GetTranscript";
|
export * from "./GetTranscript";
|
||||||
|
export * from "./GetTranscriptSegmentTopic";
|
||||||
|
export * from "./GetTranscriptTopic";
|
||||||
export * from "./HTTPValidationError";
|
export * from "./HTTPValidationError";
|
||||||
export * from "./PageGetTranscript";
|
export * from "./PageGetTranscript";
|
||||||
export * from "./RtcOffer";
|
export * from "./RtcOffer";
|
||||||
export * from "./TranscriptSegmentTopic";
|
|
||||||
export * from "./TranscriptTopic";
|
|
||||||
export * from "./UpdateTranscript";
|
export * from "./UpdateTranscript";
|
||||||
export * from "./UserInfo";
|
export * from "./UserInfo";
|
||||||
export * from "./ValidationError";
|
export * from "./ValidationError";
|
||||||
|
|||||||
Reference in New Issue
Block a user