mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
Migrate to the latest openapi-ts
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import type { BaseHttpRequest } from "./core/BaseHttpRequest";
|
||||
import type { OpenAPIConfig } from "./core/OpenAPI";
|
||||
import { Interceptors } from "./core/OpenAPI";
|
||||
import { AxiosHttpRequest } from "./core/AxiosHttpRequest";
|
||||
|
||||
import { DefaultService } from "./services/DefaultService";
|
||||
import { DefaultService } from "./services.gen";
|
||||
|
||||
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
|
||||
|
||||
@@ -25,6 +26,10 @@ export class OpenApi {
|
||||
PASSWORD: config?.PASSWORD,
|
||||
HEADERS: config?.HEADERS,
|
||||
ENCODE_PATH: config?.ENCODE_PATH,
|
||||
interceptors: {
|
||||
request: config?.interceptors?.request ?? new Interceptors(),
|
||||
response: config?.interceptors?.response ?? new Interceptors(),
|
||||
},
|
||||
});
|
||||
|
||||
this.default = new DefaultService(this.request);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export type ApiRequestOptions = {
|
||||
export type ApiRequestOptions<T = unknown> = {
|
||||
readonly method:
|
||||
| "GET"
|
||||
| "PUT"
|
||||
@@ -16,5 +16,6 @@ export type ApiRequestOptions = {
|
||||
readonly body?: any;
|
||||
readonly mediaType?: string;
|
||||
readonly responseHeader?: string;
|
||||
readonly errors?: Record<number, string>;
|
||||
readonly responseTransformer?: (data: unknown) => Promise<T>;
|
||||
readonly errors?: Record<number | string, string>;
|
||||
};
|
||||
|
||||
@@ -15,7 +15,9 @@ export class AxiosHttpRequest extends BaseHttpRequest {
|
||||
* @returns CancelablePromise<T>
|
||||
* @throws ApiError
|
||||
*/
|
||||
public override request<T>(options: ApiRequestOptions): CancelablePromise<T> {
|
||||
public override request<T>(
|
||||
options: ApiRequestOptions<T>,
|
||||
): CancelablePromise<T> {
|
||||
return __request(this.config, options);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,5 +5,7 @@ import type { OpenAPIConfig } from "./OpenAPI";
|
||||
export abstract class BaseHttpRequest {
|
||||
constructor(public readonly config: OpenAPIConfig) {}
|
||||
|
||||
public abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
|
||||
public abstract request<T>(
|
||||
options: ApiRequestOptions<T>,
|
||||
): CancelablePromise<T>;
|
||||
}
|
||||
|
||||
@@ -18,13 +18,13 @@ export interface OnCancel {
|
||||
}
|
||||
|
||||
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?: unknown) => void;
|
||||
private _isResolved: boolean;
|
||||
private _isRejected: boolean;
|
||||
private _isCancelled: boolean;
|
||||
readonly cancelHandlers: (() => void)[];
|
||||
readonly promise: Promise<T>;
|
||||
private _resolve?: (value: T | PromiseLike<T>) => void;
|
||||
private _reject?: (reason?: unknown) => void;
|
||||
|
||||
constructor(
|
||||
executor: (
|
||||
@@ -33,47 +33,47 @@ export class CancelablePromise<T> implements Promise<T> {
|
||||
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;
|
||||
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) {
|
||||
if (this._isResolved || this._isRejected || this._isCancelled) {
|
||||
return;
|
||||
}
|
||||
this.#isResolved = true;
|
||||
if (this.#resolve) this.#resolve(value);
|
||||
this._isResolved = true;
|
||||
if (this._resolve) this._resolve(value);
|
||||
};
|
||||
|
||||
const onReject = (reason?: unknown): void => {
|
||||
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
||||
if (this._isResolved || this._isRejected || this._isCancelled) {
|
||||
return;
|
||||
}
|
||||
this.#isRejected = true;
|
||||
if (this.#reject) this.#reject(reason);
|
||||
this._isRejected = true;
|
||||
if (this._reject) this._reject(reason);
|
||||
};
|
||||
|
||||
const onCancel = (cancelHandler: () => void): void => {
|
||||
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
||||
if (this._isResolved || this._isRejected || this._isCancelled) {
|
||||
return;
|
||||
}
|
||||
this.#cancelHandlers.push(cancelHandler);
|
||||
this.cancelHandlers.push(cancelHandler);
|
||||
};
|
||||
|
||||
Object.defineProperty(onCancel, "isResolved", {
|
||||
get: (): boolean => this.#isResolved,
|
||||
get: (): boolean => this._isResolved,
|
||||
});
|
||||
|
||||
Object.defineProperty(onCancel, "isRejected", {
|
||||
get: (): boolean => this.#isRejected,
|
||||
get: (): boolean => this._isRejected,
|
||||
});
|
||||
|
||||
Object.defineProperty(onCancel, "isCancelled", {
|
||||
get: (): boolean => this.#isCancelled,
|
||||
get: (): boolean => this._isCancelled,
|
||||
});
|
||||
|
||||
return executor(onResolve, onReject, onCancel as OnCancel);
|
||||
@@ -88,27 +88,27 @@ export class CancelablePromise<T> implements Promise<T> {
|
||||
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
|
||||
onRejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null,
|
||||
): Promise<TResult1 | TResult2> {
|
||||
return this.#promise.then(onFulfilled, onRejected);
|
||||
return this.promise.then(onFulfilled, onRejected);
|
||||
}
|
||||
|
||||
public catch<TResult = never>(
|
||||
onRejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null,
|
||||
): Promise<T | TResult> {
|
||||
return this.#promise.catch(onRejected);
|
||||
return this.promise.catch(onRejected);
|
||||
}
|
||||
|
||||
public finally(onFinally?: (() => void) | null): Promise<T> {
|
||||
return this.#promise.finally(onFinally);
|
||||
return this.promise.finally(onFinally);
|
||||
}
|
||||
|
||||
public cancel(): void {
|
||||
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
||||
if (this._isResolved || this._isRejected || this._isCancelled) {
|
||||
return;
|
||||
}
|
||||
this.#isCancelled = true;
|
||||
if (this.#cancelHandlers.length) {
|
||||
this._isCancelled = true;
|
||||
if (this.cancelHandlers.length) {
|
||||
try {
|
||||
for (const cancelHandler of this.#cancelHandlers) {
|
||||
for (const cancelHandler of this.cancelHandlers) {
|
||||
cancelHandler();
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -116,11 +116,11 @@ export class CancelablePromise<T> implements Promise<T> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.#cancelHandlers.length = 0;
|
||||
if (this.#reject) this.#reject(new CancelError("Request aborted"));
|
||||
this.cancelHandlers.length = 0;
|
||||
if (this._reject) this._reject(new CancelError("Request aborted"));
|
||||
}
|
||||
|
||||
public get isCancelled(): boolean {
|
||||
return this.#isCancelled;
|
||||
return this._isCancelled;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,28 @@
|
||||
import type { AxiosRequestConfig, AxiosResponse } from "axios";
|
||||
import type { ApiRequestOptions } from "./ApiRequestOptions";
|
||||
import type { TConfig, TResult } from "./types";
|
||||
|
||||
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
||||
type Headers = Record<string, string>;
|
||||
type Middleware<T> = (value: T) => T | Promise<T>;
|
||||
type Resolver<T> = (options: ApiRequestOptions<T>) => Promise<T>;
|
||||
|
||||
export class Interceptors<T> {
|
||||
_fns: Middleware<T>[];
|
||||
|
||||
constructor() {
|
||||
this._fns = [];
|
||||
}
|
||||
|
||||
eject(fn: Middleware<T>): void {
|
||||
const index = this._fns.indexOf(fn);
|
||||
if (index !== -1) {
|
||||
this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)];
|
||||
}
|
||||
}
|
||||
|
||||
use(fn: Middleware<T>): void {
|
||||
this._fns = [...this._fns, fn];
|
||||
}
|
||||
}
|
||||
|
||||
export type OpenAPIConfig = {
|
||||
BASE: string;
|
||||
@@ -10,11 +30,14 @@ export type OpenAPIConfig = {
|
||||
ENCODE_PATH?: ((path: string) => string) | undefined;
|
||||
HEADERS?: Headers | Resolver<Headers> | undefined;
|
||||
PASSWORD?: string | Resolver<string> | undefined;
|
||||
RESULT?: TResult;
|
||||
TOKEN?: string | Resolver<string> | undefined;
|
||||
USERNAME?: string | Resolver<string> | undefined;
|
||||
VERSION: string;
|
||||
WITH_CREDENTIALS: boolean;
|
||||
interceptors: {
|
||||
request: Interceptors<AxiosRequestConfig>;
|
||||
response: Interceptors<AxiosResponse>;
|
||||
};
|
||||
};
|
||||
|
||||
export const OpenAPI: OpenAPIConfig = {
|
||||
@@ -23,26 +46,12 @@ export const OpenAPI: OpenAPIConfig = {
|
||||
ENCODE_PATH: undefined,
|
||||
HEADERS: undefined,
|
||||
PASSWORD: undefined,
|
||||
RESULT: "body",
|
||||
TOKEN: undefined,
|
||||
USERNAME: undefined,
|
||||
VERSION: "0.1.0",
|
||||
WITH_CREDENTIALS: false,
|
||||
};
|
||||
|
||||
export const mergeOpenApiConfig = <T extends TResult>(
|
||||
config: OpenAPIConfig,
|
||||
overrides: TConfig<T>,
|
||||
) => {
|
||||
const merged = { ...config };
|
||||
Object.entries(overrides)
|
||||
.filter(([key]) => key.startsWith("_"))
|
||||
.forEach(([key, value]) => {
|
||||
const k = key.slice(1).toLocaleUpperCase() as keyof typeof merged;
|
||||
if (merged.hasOwnProperty(k)) {
|
||||
// @ts-ignore
|
||||
merged[k] = value;
|
||||
}
|
||||
});
|
||||
return merged;
|
||||
interceptors: {
|
||||
request: new Interceptors(),
|
||||
response: new Interceptors(),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -5,7 +5,6 @@ import type {
|
||||
AxiosResponse,
|
||||
AxiosInstance,
|
||||
} from "axios";
|
||||
import FormData from "form-data";
|
||||
|
||||
import { ApiError } from "./ApiError";
|
||||
import type { ApiRequestOptions } from "./ApiRequestOptions";
|
||||
@@ -23,18 +22,7 @@ export const isStringWithValue = (value: unknown): value is string => {
|
||||
};
|
||||
|
||||
export const isBlob = (value: any): value is Blob => {
|
||||
return (
|
||||
value !== null &&
|
||||
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) &&
|
||||
// @ts-ignore
|
||||
/^(Blob|File)$/.test(value[Symbol.toStringTag])
|
||||
);
|
||||
return value instanceof Blob;
|
||||
};
|
||||
|
||||
export const isFormData = (value: unknown): value is FormData => {
|
||||
@@ -66,7 +54,9 @@ export const getQueryString = (params: Record<string, unknown>): string => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Array.isArray(value)) {
|
||||
if (value instanceof Date) {
|
||||
append(key, value.toISOString());
|
||||
} else if (Array.isArray(value)) {
|
||||
value.forEach((v) => encodePair(key, v));
|
||||
} else if (typeof value === "object") {
|
||||
Object.entries(value).forEach(([k, v]) => encodePair(`${key}[${k}]`, v));
|
||||
@@ -102,7 +92,7 @@ export const getFormData = (
|
||||
if (options.formData) {
|
||||
const formData = new FormData();
|
||||
|
||||
const process = (key: string, value: any) => {
|
||||
const process = (key: string, value: unknown) => {
|
||||
if (isString(value) || isBlob(value)) {
|
||||
formData.append(key, value);
|
||||
} else {
|
||||
@@ -111,7 +101,7 @@ export const getFormData = (
|
||||
};
|
||||
|
||||
Object.entries(options.formData)
|
||||
.filter(([_, value]) => value !== undefined && value !== null)
|
||||
.filter(([, value]) => value !== undefined && value !== null)
|
||||
.forEach(([key, value]) => {
|
||||
if (Array.isArray(value)) {
|
||||
value.forEach((v) => process(key, v));
|
||||
@@ -125,10 +115,10 @@ export const getFormData = (
|
||||
return undefined;
|
||||
};
|
||||
|
||||
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
||||
type Resolver<T> = (options: ApiRequestOptions<T>) => Promise<T>;
|
||||
|
||||
export const resolve = async <T>(
|
||||
options: ApiRequestOptions,
|
||||
options: ApiRequestOptions<T>,
|
||||
resolver?: T | Resolver<T>,
|
||||
): Promise<T | undefined> => {
|
||||
if (typeof resolver === "function") {
|
||||
@@ -137,29 +127,27 @@ export const resolve = async <T>(
|
||||
return resolver;
|
||||
};
|
||||
|
||||
export const getHeaders = async (
|
||||
export const getHeaders = async <T>(
|
||||
config: OpenAPIConfig,
|
||||
options: ApiRequestOptions,
|
||||
formData?: FormData,
|
||||
options: ApiRequestOptions<T>,
|
||||
): Promise<Record<string, string>> => {
|
||||
const [token, username, password, additionalHeaders] = await Promise.all([
|
||||
// @ts-ignore
|
||||
resolve(options, config.TOKEN),
|
||||
// @ts-ignore
|
||||
resolve(options, config.USERNAME),
|
||||
// @ts-ignore
|
||||
resolve(options, config.PASSWORD),
|
||||
// @ts-ignore
|
||||
resolve(options, config.HEADERS),
|
||||
]);
|
||||
|
||||
const formHeaders =
|
||||
(typeof formData?.getHeaders === "function" && formData?.getHeaders()) ||
|
||||
{};
|
||||
|
||||
const headers = Object.entries({
|
||||
Accept: "application/json",
|
||||
...additionalHeaders,
|
||||
...options.headers,
|
||||
...formHeaders,
|
||||
})
|
||||
.filter(([_, value]) => value !== undefined && value !== null)
|
||||
.filter(([, value]) => value !== undefined && value !== null)
|
||||
.reduce(
|
||||
(headers, [key, value]) => ({
|
||||
...headers,
|
||||
@@ -187,6 +175,10 @@ export const getHeaders = async (
|
||||
} else if (!isFormData(options.body)) {
|
||||
headers["Content-Type"] = "application/json";
|
||||
}
|
||||
} else if (options.formData !== undefined) {
|
||||
if (options.mediaType) {
|
||||
headers["Content-Type"] = options.mediaType;
|
||||
}
|
||||
}
|
||||
|
||||
return headers;
|
||||
@@ -201,7 +193,7 @@ export const getRequestBody = (options: ApiRequestOptions): unknown => {
|
||||
|
||||
export const sendRequest = async <T>(
|
||||
config: OpenAPIConfig,
|
||||
options: ApiRequestOptions,
|
||||
options: ApiRequestOptions<T>,
|
||||
url: string,
|
||||
body: unknown,
|
||||
formData: FormData | undefined,
|
||||
@@ -211,17 +203,21 @@ export const sendRequest = async <T>(
|
||||
): Promise<AxiosResponse<T>> => {
|
||||
const controller = new AbortController();
|
||||
|
||||
const requestConfig: AxiosRequestConfig = {
|
||||
url,
|
||||
headers,
|
||||
let requestConfig: AxiosRequestConfig = {
|
||||
data: body ?? formData,
|
||||
headers,
|
||||
method: options.method,
|
||||
withCredentials: config.WITH_CREDENTIALS,
|
||||
signal: controller.signal,
|
||||
url,
|
||||
withCredentials: config.WITH_CREDENTIALS,
|
||||
};
|
||||
|
||||
onCancel(() => controller.abort());
|
||||
|
||||
for (const fn of config.interceptors.request._fns) {
|
||||
requestConfig = await fn(requestConfig);
|
||||
}
|
||||
|
||||
try {
|
||||
return await axiosClient.request(requestConfig);
|
||||
} catch (error) {
|
||||
@@ -260,11 +256,44 @@ export const catchErrorCodes = (
|
||||
const errors: Record<number, string> = {
|
||||
400: "Bad Request",
|
||||
401: "Unauthorized",
|
||||
402: "Payment Required",
|
||||
403: "Forbidden",
|
||||
404: "Not Found",
|
||||
405: "Method Not Allowed",
|
||||
406: "Not Acceptable",
|
||||
407: "Proxy Authentication Required",
|
||||
408: "Request Timeout",
|
||||
409: "Conflict",
|
||||
410: "Gone",
|
||||
411: "Length Required",
|
||||
412: "Precondition Failed",
|
||||
413: "Payload Too Large",
|
||||
414: "URI Too Long",
|
||||
415: "Unsupported Media Type",
|
||||
416: "Range Not Satisfiable",
|
||||
417: "Expectation Failed",
|
||||
418: "Im a teapot",
|
||||
421: "Misdirected Request",
|
||||
422: "Unprocessable Content",
|
||||
423: "Locked",
|
||||
424: "Failed Dependency",
|
||||
425: "Too Early",
|
||||
426: "Upgrade Required",
|
||||
428: "Precondition Required",
|
||||
429: "Too Many Requests",
|
||||
431: "Request Header Fields Too Large",
|
||||
451: "Unavailable For Legal Reasons",
|
||||
500: "Internal Server Error",
|
||||
501: "Not Implemented",
|
||||
502: "Bad Gateway",
|
||||
503: "Service Unavailable",
|
||||
504: "Gateway Timeout",
|
||||
505: "HTTP Version Not Supported",
|
||||
506: "Variant Also Negotiates",
|
||||
507: "Insufficient Storage",
|
||||
508: "Loop Detected",
|
||||
510: "Not Extended",
|
||||
511: "Network Authentication Required",
|
||||
...options.errors,
|
||||
};
|
||||
|
||||
@@ -302,7 +331,7 @@ export const catchErrorCodes = (
|
||||
*/
|
||||
export const request = <T>(
|
||||
config: OpenAPIConfig,
|
||||
options: ApiRequestOptions,
|
||||
options: ApiRequestOptions<T>,
|
||||
axiosClient: AxiosInstance = axios,
|
||||
): CancelablePromise<T> => {
|
||||
return new CancelablePromise(async (resolve, reject, onCancel) => {
|
||||
@@ -310,10 +339,10 @@ export const request = <T>(
|
||||
const url = getUrl(config, options);
|
||||
const formData = getFormData(options);
|
||||
const body = getRequestBody(options);
|
||||
const headers = await getHeaders(config, options, formData);
|
||||
const headers = await getHeaders(config, options);
|
||||
|
||||
if (!onCancel.isCancelled) {
|
||||
const response = await sendRequest<T>(
|
||||
let response = await sendRequest<T>(
|
||||
config,
|
||||
options,
|
||||
url,
|
||||
@@ -323,18 +352,28 @@ export const request = <T>(
|
||||
onCancel,
|
||||
axiosClient,
|
||||
);
|
||||
|
||||
for (const fn of config.interceptors.response._fns) {
|
||||
response = await fn(response);
|
||||
}
|
||||
|
||||
const responseBody = getResponseBody(response);
|
||||
const responseHeader = getResponseHeader(
|
||||
response,
|
||||
options.responseHeader,
|
||||
);
|
||||
|
||||
let transformedBody = responseBody;
|
||||
if (options.responseTransformer && isSuccess(response.status)) {
|
||||
transformedBody = await options.responseTransformer(responseBody);
|
||||
}
|
||||
|
||||
const result: ApiResult = {
|
||||
url,
|
||||
ok: isSuccess(response.status),
|
||||
status: response.status,
|
||||
statusText: response.statusText,
|
||||
body: responseHeader ?? responseBody,
|
||||
body: responseHeader ?? transformedBody,
|
||||
};
|
||||
|
||||
catchErrorCodes(options, result);
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import type { ApiResult } from "./ApiResult";
|
||||
|
||||
export type TResult = "body" | "raw";
|
||||
|
||||
export type TApiResponse<T extends TResult, TData> = Exclude<
|
||||
T,
|
||||
"raw"
|
||||
> extends never
|
||||
? ApiResult<TData>
|
||||
: ApiResult<TData>["body"];
|
||||
|
||||
export type TConfig<T extends TResult> = {
|
||||
_result?: T;
|
||||
};
|
||||
@@ -1,59 +1,9 @@
|
||||
// This file is auto-generated by @hey-api/openapi-ts
|
||||
export { OpenApi } from "./OpenApi";
|
||||
|
||||
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 { $AudioWaveform } from "./schemas/$AudioWaveform";
|
||||
export { $Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post } from "./schemas/$Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post";
|
||||
export { $CreateParticipant } from "./schemas/$CreateParticipant";
|
||||
export { $CreateTranscript } from "./schemas/$CreateTranscript";
|
||||
export { $DeletionStatus } from "./schemas/$DeletionStatus";
|
||||
export { $GetTranscript } from "./schemas/$GetTranscript";
|
||||
export { $GetTranscriptSegmentTopic } from "./schemas/$GetTranscriptSegmentTopic";
|
||||
export { $GetTranscriptTopic } from "./schemas/$GetTranscriptTopic";
|
||||
export { $GetTranscriptTopicWithWords } from "./schemas/$GetTranscriptTopicWithWords";
|
||||
export { $GetTranscriptTopicWithWordsPerSpeaker } from "./schemas/$GetTranscriptTopicWithWordsPerSpeaker";
|
||||
export { $HTTPValidationError } from "./schemas/$HTTPValidationError";
|
||||
export { $Page_GetTranscript_ } from "./schemas/$Page_GetTranscript_";
|
||||
export { $Participant } from "./schemas/$Participant";
|
||||
export { $RtcOffer } from "./schemas/$RtcOffer";
|
||||
export { $SpeakerAssignment } from "./schemas/$SpeakerAssignment";
|
||||
export { $SpeakerAssignmentStatus } from "./schemas/$SpeakerAssignmentStatus";
|
||||
export { $SpeakerMerge } from "./schemas/$SpeakerMerge";
|
||||
export { $SpeakerWords } from "./schemas/$SpeakerWords";
|
||||
export { $TranscriptParticipant } from "./schemas/$TranscriptParticipant";
|
||||
export { $UpdateParticipant } from "./schemas/$UpdateParticipant";
|
||||
export { $UpdateTranscript } from "./schemas/$UpdateTranscript";
|
||||
export { $UserInfo } from "./schemas/$UserInfo";
|
||||
export { $ValidationError } from "./schemas/$ValidationError";
|
||||
export { $Word } from "./schemas/$Word";
|
||||
|
||||
export { DefaultService } from "./services/DefaultService";
|
||||
export { OpenAPI, type OpenAPIConfig } from "./core/OpenAPI";
|
||||
export * from "./schemas.gen";
|
||||
export * from "./services.gen";
|
||||
export * from "./types.gen";
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
export type AudioWaveform = {
|
||||
data: Array<number>;
|
||||
};
|
||||
@@ -1,4 +0,0 @@
|
||||
export type Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post =
|
||||
{
|
||||
file: Blob;
|
||||
};
|
||||
@@ -1,4 +0,0 @@
|
||||
export type CreateParticipant = {
|
||||
speaker?: number | null;
|
||||
name: string;
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
export type CreateTranscript = {
|
||||
name: string;
|
||||
source_language?: string;
|
||||
target_language?: string;
|
||||
};
|
||||
@@ -1,3 +0,0 @@
|
||||
export type DeletionStatus = {
|
||||
status: string;
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
import type { TranscriptParticipant } from "./TranscriptParticipant";
|
||||
|
||||
export type GetTranscript = {
|
||||
id: string;
|
||||
user_id: string | null;
|
||||
name: string;
|
||||
status: string;
|
||||
locked: boolean;
|
||||
duration: number;
|
||||
title: string | null;
|
||||
short_summary: string | null;
|
||||
long_summary: string | null;
|
||||
created_at: string;
|
||||
share_mode?: string;
|
||||
source_language: string | null;
|
||||
target_language: string | null;
|
||||
participants: Array<TranscriptParticipant> | null;
|
||||
reviewed: boolean;
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
export type GetTranscriptSegmentTopic = {
|
||||
text: string;
|
||||
start: number;
|
||||
speaker: number;
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import type { GetTranscriptSegmentTopic } from "./GetTranscriptSegmentTopic";
|
||||
|
||||
export type GetTranscriptTopic = {
|
||||
id: string;
|
||||
title: string;
|
||||
summary: string;
|
||||
timestamp: number;
|
||||
duration: number | null;
|
||||
transcript: string;
|
||||
segments?: Array<GetTranscriptSegmentTopic>;
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
import type { GetTranscriptSegmentTopic } from "./GetTranscriptSegmentTopic";
|
||||
import type { Word } from "./Word";
|
||||
|
||||
export type GetTranscriptTopicWithWords = {
|
||||
id: string;
|
||||
title: string;
|
||||
summary: string;
|
||||
timestamp: number;
|
||||
duration: number | null;
|
||||
transcript: string;
|
||||
segments?: Array<GetTranscriptSegmentTopic>;
|
||||
words?: Array<Word>;
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
import type { GetTranscriptSegmentTopic } from "./GetTranscriptSegmentTopic";
|
||||
import type { SpeakerWords } from "./SpeakerWords";
|
||||
|
||||
export type GetTranscriptTopicWithWordsPerSpeaker = {
|
||||
id: string;
|
||||
title: string;
|
||||
summary: string;
|
||||
timestamp: number;
|
||||
duration: number | null;
|
||||
transcript: string;
|
||||
segments?: Array<GetTranscriptSegmentTopic>;
|
||||
words_per_speaker?: Array<SpeakerWords>;
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
import type { ValidationError } from "./ValidationError";
|
||||
|
||||
export type HTTPValidationError = {
|
||||
detail?: Array<ValidationError>;
|
||||
};
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { GetTranscript } from "./GetTranscript";
|
||||
|
||||
export type Page_GetTranscript_ = {
|
||||
items: Array<GetTranscript>;
|
||||
total: number;
|
||||
page: number | null;
|
||||
size: number | null;
|
||||
pages?: number | null;
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
export type Participant = {
|
||||
id: string;
|
||||
speaker: number | null;
|
||||
name: string;
|
||||
};
|
||||
@@ -1,4 +0,0 @@
|
||||
export type RtcOffer = {
|
||||
sdp: string;
|
||||
type: string;
|
||||
};
|
||||
@@ -1,6 +0,0 @@
|
||||
export type SpeakerAssignment = {
|
||||
speaker?: number | null;
|
||||
participant?: string | null;
|
||||
timestamp_from: number;
|
||||
timestamp_to: number;
|
||||
};
|
||||
@@ -1,3 +0,0 @@
|
||||
export type SpeakerAssignmentStatus = {
|
||||
status: string;
|
||||
};
|
||||
@@ -1,4 +0,0 @@
|
||||
export type SpeakerMerge = {
|
||||
speaker_from: number;
|
||||
speaker_to: number;
|
||||
};
|
||||
@@ -1,6 +0,0 @@
|
||||
import type { Word } from "./Word";
|
||||
|
||||
export type SpeakerWords = {
|
||||
speaker: number;
|
||||
words: Array<Word>;
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
export type TranscriptParticipant = {
|
||||
id?: string;
|
||||
speaker: number | null;
|
||||
name: string;
|
||||
};
|
||||
@@ -1,4 +0,0 @@
|
||||
export type UpdateParticipant = {
|
||||
speaker?: number | null;
|
||||
name?: string | null;
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
import type { TranscriptParticipant } from "./TranscriptParticipant";
|
||||
|
||||
export type UpdateTranscript = {
|
||||
name?: string | null;
|
||||
locked?: boolean | null;
|
||||
title?: string | null;
|
||||
short_summary?: string | null;
|
||||
long_summary?: string | null;
|
||||
share_mode?: "public" | "semi-private" | "private" | null;
|
||||
participants?: Array<TranscriptParticipant> | null;
|
||||
reviewed?: boolean | null;
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
export type UserInfo = {
|
||||
sub: string;
|
||||
email: string | null;
|
||||
email_verified: boolean | null;
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
export type ValidationError = {
|
||||
loc: Array<string | number>;
|
||||
msg: string;
|
||||
type: string;
|
||||
};
|
||||
@@ -1,6 +0,0 @@
|
||||
export type Word = {
|
||||
text: string;
|
||||
start: number;
|
||||
end: number;
|
||||
speaker?: number;
|
||||
};
|
||||
845
www/app/api/schemas.gen.ts
Normal file
845
www/app/api/schemas.gen.ts
Normal file
@@ -0,0 +1,845 @@
|
||||
// This file is auto-generated by @hey-api/openapi-ts
|
||||
|
||||
export const $AudioWaveform = {
|
||||
properties: {
|
||||
data: {
|
||||
items: {
|
||||
type: "number",
|
||||
},
|
||||
type: "array",
|
||||
title: "Data",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["data"],
|
||||
title: "AudioWaveform",
|
||||
} as const;
|
||||
|
||||
export const $Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post =
|
||||
{
|
||||
properties: {
|
||||
file: {
|
||||
type: "string",
|
||||
format: "binary",
|
||||
title: "File",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["file"],
|
||||
title:
|
||||
"Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post",
|
||||
} as const;
|
||||
|
||||
export const $CreateParticipant = {
|
||||
properties: {
|
||||
speaker: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "integer",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Speaker",
|
||||
},
|
||||
name: {
|
||||
type: "string",
|
||||
title: "Name",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["name"],
|
||||
title: "CreateParticipant",
|
||||
} as const;
|
||||
|
||||
export const $CreateTranscript = {
|
||||
properties: {
|
||||
name: {
|
||||
type: "string",
|
||||
title: "Name",
|
||||
},
|
||||
source_language: {
|
||||
type: "string",
|
||||
title: "Source Language",
|
||||
default: "en",
|
||||
},
|
||||
target_language: {
|
||||
type: "string",
|
||||
title: "Target Language",
|
||||
default: "en",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["name"],
|
||||
title: "CreateTranscript",
|
||||
} as const;
|
||||
|
||||
export const $DeletionStatus = {
|
||||
properties: {
|
||||
status: {
|
||||
type: "string",
|
||||
title: "Status",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["status"],
|
||||
title: "DeletionStatus",
|
||||
} as const;
|
||||
|
||||
export const $GetTranscript = {
|
||||
properties: {
|
||||
id: {
|
||||
type: "string",
|
||||
title: "Id",
|
||||
},
|
||||
user_id: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "User Id",
|
||||
},
|
||||
name: {
|
||||
type: "string",
|
||||
title: "Name",
|
||||
},
|
||||
status: {
|
||||
type: "string",
|
||||
title: "Status",
|
||||
},
|
||||
locked: {
|
||||
type: "boolean",
|
||||
title: "Locked",
|
||||
},
|
||||
duration: {
|
||||
type: "number",
|
||||
title: "Duration",
|
||||
},
|
||||
title: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Title",
|
||||
},
|
||||
short_summary: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Short Summary",
|
||||
},
|
||||
long_summary: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Long Summary",
|
||||
},
|
||||
created_at: {
|
||||
type: "string",
|
||||
format: "date-time",
|
||||
title: "Created At",
|
||||
},
|
||||
share_mode: {
|
||||
type: "string",
|
||||
title: "Share Mode",
|
||||
default: "private",
|
||||
},
|
||||
source_language: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Source Language",
|
||||
},
|
||||
target_language: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Target Language",
|
||||
},
|
||||
participants: {
|
||||
anyOf: [
|
||||
{
|
||||
items: {
|
||||
$ref: "#/components/schemas/TranscriptParticipant",
|
||||
},
|
||||
type: "array",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Participants",
|
||||
},
|
||||
reviewed: {
|
||||
type: "boolean",
|
||||
title: "Reviewed",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: [
|
||||
"id",
|
||||
"user_id",
|
||||
"name",
|
||||
"status",
|
||||
"locked",
|
||||
"duration",
|
||||
"title",
|
||||
"short_summary",
|
||||
"long_summary",
|
||||
"created_at",
|
||||
"source_language",
|
||||
"target_language",
|
||||
"participants",
|
||||
"reviewed",
|
||||
],
|
||||
title: "GetTranscript",
|
||||
} as const;
|
||||
|
||||
export const $GetTranscriptSegmentTopic = {
|
||||
properties: {
|
||||
text: {
|
||||
type: "string",
|
||||
title: "Text",
|
||||
},
|
||||
start: {
|
||||
type: "number",
|
||||
title: "Start",
|
||||
},
|
||||
speaker: {
|
||||
type: "integer",
|
||||
title: "Speaker",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["text", "start", "speaker"],
|
||||
title: "GetTranscriptSegmentTopic",
|
||||
} as const;
|
||||
|
||||
export const $GetTranscriptTopic = {
|
||||
properties: {
|
||||
id: {
|
||||
type: "string",
|
||||
title: "Id",
|
||||
},
|
||||
title: {
|
||||
type: "string",
|
||||
title: "Title",
|
||||
},
|
||||
summary: {
|
||||
type: "string",
|
||||
title: "Summary",
|
||||
},
|
||||
timestamp: {
|
||||
type: "number",
|
||||
title: "Timestamp",
|
||||
},
|
||||
duration: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Duration",
|
||||
},
|
||||
transcript: {
|
||||
type: "string",
|
||||
title: "Transcript",
|
||||
},
|
||||
segments: {
|
||||
items: {
|
||||
$ref: "#/components/schemas/GetTranscriptSegmentTopic",
|
||||
},
|
||||
type: "array",
|
||||
title: "Segments",
|
||||
default: [],
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["id", "title", "summary", "timestamp", "duration", "transcript"],
|
||||
title: "GetTranscriptTopic",
|
||||
} as const;
|
||||
|
||||
export const $GetTranscriptTopicWithWords = {
|
||||
properties: {
|
||||
id: {
|
||||
type: "string",
|
||||
title: "Id",
|
||||
},
|
||||
title: {
|
||||
type: "string",
|
||||
title: "Title",
|
||||
},
|
||||
summary: {
|
||||
type: "string",
|
||||
title: "Summary",
|
||||
},
|
||||
timestamp: {
|
||||
type: "number",
|
||||
title: "Timestamp",
|
||||
},
|
||||
duration: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Duration",
|
||||
},
|
||||
transcript: {
|
||||
type: "string",
|
||||
title: "Transcript",
|
||||
},
|
||||
segments: {
|
||||
items: {
|
||||
$ref: "#/components/schemas/GetTranscriptSegmentTopic",
|
||||
},
|
||||
type: "array",
|
||||
title: "Segments",
|
||||
default: [],
|
||||
},
|
||||
words: {
|
||||
items: {
|
||||
$ref: "#/components/schemas/Word",
|
||||
},
|
||||
type: "array",
|
||||
title: "Words",
|
||||
default: [],
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["id", "title", "summary", "timestamp", "duration", "transcript"],
|
||||
title: "GetTranscriptTopicWithWords",
|
||||
} as const;
|
||||
|
||||
export const $GetTranscriptTopicWithWordsPerSpeaker = {
|
||||
properties: {
|
||||
id: {
|
||||
type: "string",
|
||||
title: "Id",
|
||||
},
|
||||
title: {
|
||||
type: "string",
|
||||
title: "Title",
|
||||
},
|
||||
summary: {
|
||||
type: "string",
|
||||
title: "Summary",
|
||||
},
|
||||
timestamp: {
|
||||
type: "number",
|
||||
title: "Timestamp",
|
||||
},
|
||||
duration: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Duration",
|
||||
},
|
||||
transcript: {
|
||||
type: "string",
|
||||
title: "Transcript",
|
||||
},
|
||||
segments: {
|
||||
items: {
|
||||
$ref: "#/components/schemas/GetTranscriptSegmentTopic",
|
||||
},
|
||||
type: "array",
|
||||
title: "Segments",
|
||||
default: [],
|
||||
},
|
||||
words_per_speaker: {
|
||||
items: {
|
||||
$ref: "#/components/schemas/SpeakerWords",
|
||||
},
|
||||
type: "array",
|
||||
title: "Words Per Speaker",
|
||||
default: [],
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["id", "title", "summary", "timestamp", "duration", "transcript"],
|
||||
title: "GetTranscriptTopicWithWordsPerSpeaker",
|
||||
} as const;
|
||||
|
||||
export const $HTTPValidationError = {
|
||||
properties: {
|
||||
detail: {
|
||||
items: {
|
||||
$ref: "#/components/schemas/ValidationError",
|
||||
},
|
||||
type: "array",
|
||||
title: "Detail",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
title: "HTTPValidationError",
|
||||
} as const;
|
||||
|
||||
export const $Page_GetTranscript_ = {
|
||||
properties: {
|
||||
items: {
|
||||
items: {
|
||||
$ref: "#/components/schemas/GetTranscript",
|
||||
},
|
||||
type: "array",
|
||||
title: "Items",
|
||||
},
|
||||
total: {
|
||||
type: "integer",
|
||||
minimum: 0,
|
||||
title: "Total",
|
||||
},
|
||||
page: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "integer",
|
||||
minimum: 1,
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Page",
|
||||
},
|
||||
size: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "integer",
|
||||
minimum: 1,
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Size",
|
||||
},
|
||||
pages: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "integer",
|
||||
minimum: 0,
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Pages",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["items", "total", "page", "size"],
|
||||
title: "Page[GetTranscript]",
|
||||
} as const;
|
||||
|
||||
export const $Participant = {
|
||||
properties: {
|
||||
id: {
|
||||
type: "string",
|
||||
title: "Id",
|
||||
},
|
||||
speaker: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "integer",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Speaker",
|
||||
},
|
||||
name: {
|
||||
type: "string",
|
||||
title: "Name",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["id", "speaker", "name"],
|
||||
title: "Participant",
|
||||
} as const;
|
||||
|
||||
export const $RtcOffer = {
|
||||
properties: {
|
||||
sdp: {
|
||||
type: "string",
|
||||
title: "Sdp",
|
||||
},
|
||||
type: {
|
||||
type: "string",
|
||||
title: "Type",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["sdp", "type"],
|
||||
title: "RtcOffer",
|
||||
} as const;
|
||||
|
||||
export const $SpeakerAssignment = {
|
||||
properties: {
|
||||
speaker: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "integer",
|
||||
minimum: 0,
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Speaker",
|
||||
},
|
||||
participant: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Participant",
|
||||
},
|
||||
timestamp_from: {
|
||||
type: "number",
|
||||
title: "Timestamp From",
|
||||
},
|
||||
timestamp_to: {
|
||||
type: "number",
|
||||
title: "Timestamp To",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["timestamp_from", "timestamp_to"],
|
||||
title: "SpeakerAssignment",
|
||||
} as const;
|
||||
|
||||
export const $SpeakerAssignmentStatus = {
|
||||
properties: {
|
||||
status: {
|
||||
type: "string",
|
||||
title: "Status",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["status"],
|
||||
title: "SpeakerAssignmentStatus",
|
||||
} as const;
|
||||
|
||||
export const $SpeakerMerge = {
|
||||
properties: {
|
||||
speaker_from: {
|
||||
type: "integer",
|
||||
title: "Speaker From",
|
||||
},
|
||||
speaker_to: {
|
||||
type: "integer",
|
||||
title: "Speaker To",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["speaker_from", "speaker_to"],
|
||||
title: "SpeakerMerge",
|
||||
} as const;
|
||||
|
||||
export const $SpeakerWords = {
|
||||
properties: {
|
||||
speaker: {
|
||||
type: "integer",
|
||||
title: "Speaker",
|
||||
},
|
||||
words: {
|
||||
items: {
|
||||
$ref: "#/components/schemas/Word",
|
||||
},
|
||||
type: "array",
|
||||
title: "Words",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["speaker", "words"],
|
||||
title: "SpeakerWords",
|
||||
} as const;
|
||||
|
||||
export const $TranscriptParticipant = {
|
||||
properties: {
|
||||
id: {
|
||||
type: "string",
|
||||
title: "Id",
|
||||
},
|
||||
speaker: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "integer",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Speaker",
|
||||
},
|
||||
name: {
|
||||
type: "string",
|
||||
title: "Name",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["speaker", "name"],
|
||||
title: "TranscriptParticipant",
|
||||
} as const;
|
||||
|
||||
export const $UpdateParticipant = {
|
||||
properties: {
|
||||
speaker: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "integer",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Speaker",
|
||||
},
|
||||
name: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Name",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
title: "UpdateParticipant",
|
||||
} as const;
|
||||
|
||||
export const $UpdateTranscript = {
|
||||
properties: {
|
||||
name: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Name",
|
||||
},
|
||||
locked: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "boolean",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Locked",
|
||||
},
|
||||
title: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Title",
|
||||
},
|
||||
short_summary: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Short Summary",
|
||||
},
|
||||
long_summary: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Long Summary",
|
||||
},
|
||||
share_mode: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "string",
|
||||
enum: ["public", "semi-private", "private"],
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Share Mode",
|
||||
},
|
||||
participants: {
|
||||
anyOf: [
|
||||
{
|
||||
items: {
|
||||
$ref: "#/components/schemas/TranscriptParticipant",
|
||||
},
|
||||
type: "array",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Participants",
|
||||
},
|
||||
reviewed: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "boolean",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Reviewed",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
title: "UpdateTranscript",
|
||||
} as const;
|
||||
|
||||
export const $UserInfo = {
|
||||
properties: {
|
||||
sub: {
|
||||
type: "string",
|
||||
title: "Sub",
|
||||
},
|
||||
email: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Email",
|
||||
},
|
||||
email_verified: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "boolean",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
title: "Email Verified",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["sub", "email", "email_verified"],
|
||||
title: "UserInfo",
|
||||
} as const;
|
||||
|
||||
export const $ValidationError = {
|
||||
properties: {
|
||||
loc: {
|
||||
items: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "integer",
|
||||
},
|
||||
],
|
||||
},
|
||||
type: "array",
|
||||
title: "Location",
|
||||
},
|
||||
msg: {
|
||||
type: "string",
|
||||
title: "Message",
|
||||
},
|
||||
type: {
|
||||
type: "string",
|
||||
title: "Error Type",
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["loc", "msg", "type"],
|
||||
title: "ValidationError",
|
||||
} as const;
|
||||
|
||||
export const $Word = {
|
||||
properties: {
|
||||
text: {
|
||||
type: "string",
|
||||
title: "Text",
|
||||
},
|
||||
start: {
|
||||
type: "number",
|
||||
title: "Start",
|
||||
},
|
||||
end: {
|
||||
type: "number",
|
||||
title: "End",
|
||||
},
|
||||
speaker: {
|
||||
type: "integer",
|
||||
title: "Speaker",
|
||||
default: 0,
|
||||
},
|
||||
},
|
||||
type: "object",
|
||||
required: ["text", "start", "end"],
|
||||
title: "Word",
|
||||
} as const;
|
||||
@@ -1,11 +0,0 @@
|
||||
export const $AudioWaveform = {
|
||||
properties: {
|
||||
data: {
|
||||
type: "array",
|
||||
contains: {
|
||||
type: "number",
|
||||
},
|
||||
isRequired: true,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,10 +0,0 @@
|
||||
export const $Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post =
|
||||
{
|
||||
properties: {
|
||||
file: {
|
||||
type: "binary",
|
||||
isRequired: true,
|
||||
format: "binary",
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,19 +0,0 @@
|
||||
export const $CreateParticipant = {
|
||||
properties: {
|
||||
speaker: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
},
|
||||
name: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,14 +0,0 @@
|
||||
export const $CreateTranscript = {
|
||||
properties: {
|
||||
name: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
source_language: {
|
||||
type: "string",
|
||||
},
|
||||
target_language: {
|
||||
type: "string",
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,8 +0,0 @@
|
||||
export const $DeletionStatus = {
|
||||
properties: {
|
||||
status: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,123 +0,0 @@
|
||||
export const $GetTranscript = {
|
||||
properties: {
|
||||
id: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
user_id: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
isRequired: true,
|
||||
},
|
||||
name: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
status: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
locked: {
|
||||
type: "boolean",
|
||||
isRequired: true,
|
||||
},
|
||||
duration: {
|
||||
type: "number",
|
||||
isRequired: true,
|
||||
},
|
||||
title: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
isRequired: true,
|
||||
},
|
||||
short_summary: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
isRequired: true,
|
||||
},
|
||||
long_summary: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
isRequired: true,
|
||||
},
|
||||
created_at: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
format: "date-time",
|
||||
},
|
||||
share_mode: {
|
||||
type: "string",
|
||||
},
|
||||
source_language: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
isRequired: true,
|
||||
},
|
||||
target_language: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
isRequired: true,
|
||||
},
|
||||
participants: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "array",
|
||||
contains: {
|
||||
type: "TranscriptParticipant",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
isRequired: true,
|
||||
},
|
||||
reviewed: {
|
||||
type: "boolean",
|
||||
isRequired: true,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,16 +0,0 @@
|
||||
export const $GetTranscriptSegmentTopic = {
|
||||
properties: {
|
||||
text: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
start: {
|
||||
type: "number",
|
||||
isRequired: true,
|
||||
},
|
||||
speaker: {
|
||||
type: "number",
|
||||
isRequired: true,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,42 +0,0 @@
|
||||
export const $GetTranscriptTopic = {
|
||||
properties: {
|
||||
id: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
title: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
summary: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
timestamp: {
|
||||
type: "number",
|
||||
isRequired: true,
|
||||
},
|
||||
duration: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
isRequired: true,
|
||||
},
|
||||
transcript: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
segments: {
|
||||
type: "array",
|
||||
contains: {
|
||||
type: "GetTranscriptSegmentTopic",
|
||||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,48 +0,0 @@
|
||||
export const $GetTranscriptTopicWithWords = {
|
||||
properties: {
|
||||
id: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
title: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
summary: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
timestamp: {
|
||||
type: "number",
|
||||
isRequired: true,
|
||||
},
|
||||
duration: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
isRequired: true,
|
||||
},
|
||||
transcript: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
segments: {
|
||||
type: "array",
|
||||
contains: {
|
||||
type: "GetTranscriptSegmentTopic",
|
||||
},
|
||||
},
|
||||
words: {
|
||||
type: "array",
|
||||
contains: {
|
||||
type: "Word",
|
||||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,48 +0,0 @@
|
||||
export const $GetTranscriptTopicWithWordsPerSpeaker = {
|
||||
properties: {
|
||||
id: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
title: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
summary: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
timestamp: {
|
||||
type: "number",
|
||||
isRequired: true,
|
||||
},
|
||||
duration: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
isRequired: true,
|
||||
},
|
||||
transcript: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
segments: {
|
||||
type: "array",
|
||||
contains: {
|
||||
type: "GetTranscriptSegmentTopic",
|
||||
},
|
||||
},
|
||||
words_per_speaker: {
|
||||
type: "array",
|
||||
contains: {
|
||||
type: "SpeakerWords",
|
||||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,10 +0,0 @@
|
||||
export const $HTTPValidationError = {
|
||||
properties: {
|
||||
detail: {
|
||||
type: "array",
|
||||
contains: {
|
||||
type: "ValidationError",
|
||||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,52 +0,0 @@
|
||||
export const $Page_GetTranscript_ = {
|
||||
properties: {
|
||||
items: {
|
||||
type: "array",
|
||||
contains: {
|
||||
type: "GetTranscript",
|
||||
},
|
||||
isRequired: true,
|
||||
},
|
||||
total: {
|
||||
type: "number",
|
||||
isRequired: true,
|
||||
},
|
||||
page: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "number",
|
||||
minimum: 1,
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
isRequired: true,
|
||||
},
|
||||
size: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "number",
|
||||
minimum: 1,
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
isRequired: true,
|
||||
},
|
||||
pages: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,24 +0,0 @@
|
||||
export const $Participant = {
|
||||
properties: {
|
||||
id: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
speaker: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
isRequired: true,
|
||||
},
|
||||
name: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,12 +0,0 @@
|
||||
export const $RtcOffer = {
|
||||
properties: {
|
||||
sdp: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
type: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,34 +0,0 @@
|
||||
export const $SpeakerAssignment = {
|
||||
properties: {
|
||||
speaker: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
},
|
||||
participant: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
},
|
||||
timestamp_from: {
|
||||
type: "number",
|
||||
isRequired: true,
|
||||
},
|
||||
timestamp_to: {
|
||||
type: "number",
|
||||
isRequired: true,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,8 +0,0 @@
|
||||
export const $SpeakerAssignmentStatus = {
|
||||
properties: {
|
||||
status: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,12 +0,0 @@
|
||||
export const $SpeakerMerge = {
|
||||
properties: {
|
||||
speaker_from: {
|
||||
type: "number",
|
||||
isRequired: true,
|
||||
},
|
||||
speaker_to: {
|
||||
type: "number",
|
||||
isRequired: true,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,15 +0,0 @@
|
||||
export const $SpeakerWords = {
|
||||
properties: {
|
||||
speaker: {
|
||||
type: "number",
|
||||
isRequired: true,
|
||||
},
|
||||
words: {
|
||||
type: "array",
|
||||
contains: {
|
||||
type: "Word",
|
||||
},
|
||||
isRequired: true,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,23 +0,0 @@
|
||||
export const $TranscriptParticipant = {
|
||||
properties: {
|
||||
id: {
|
||||
type: "string",
|
||||
},
|
||||
speaker: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
isRequired: true,
|
||||
},
|
||||
name: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,26 +0,0 @@
|
||||
export const $UpdateParticipant = {
|
||||
properties: {
|
||||
speaker: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
},
|
||||
name: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,95 +0,0 @@
|
||||
export const $UpdateTranscript = {
|
||||
properties: {
|
||||
name: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
},
|
||||
locked: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "boolean",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
},
|
||||
title: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
},
|
||||
short_summary: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
},
|
||||
long_summary: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
},
|
||||
share_mode: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "Enum",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
},
|
||||
participants: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "array",
|
||||
contains: {
|
||||
type: "TranscriptParticipant",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
},
|
||||
reviewed: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "boolean",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,32 +0,0 @@
|
||||
export const $UserInfo = {
|
||||
properties: {
|
||||
sub: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
email: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
isRequired: true,
|
||||
},
|
||||
email_verified: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "boolean",
|
||||
},
|
||||
{
|
||||
type: "null",
|
||||
},
|
||||
],
|
||||
isRequired: true,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,27 +0,0 @@
|
||||
export const $ValidationError = {
|
||||
properties: {
|
||||
loc: {
|
||||
type: "array",
|
||||
contains: {
|
||||
type: "any-of",
|
||||
contains: [
|
||||
{
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
},
|
||||
],
|
||||
},
|
||||
isRequired: true,
|
||||
},
|
||||
msg: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
type: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@@ -1,19 +0,0 @@
|
||||
export const $Word = {
|
||||
properties: {
|
||||
text: {
|
||||
type: "string",
|
||||
isRequired: true,
|
||||
},
|
||||
start: {
|
||||
type: "number",
|
||||
isRequired: true,
|
||||
},
|
||||
end: {
|
||||
type: "number",
|
||||
isRequired: true,
|
||||
},
|
||||
speaker: {
|
||||
type: "number",
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
579
www/app/api/services.gen.ts
Normal file
579
www/app/api/services.gen.ts
Normal file
@@ -0,0 +1,579 @@
|
||||
// This file is auto-generated by @hey-api/openapi-ts
|
||||
|
||||
import type { CancelablePromise } from "./core/CancelablePromise";
|
||||
import type { BaseHttpRequest } from "./core/BaseHttpRequest";
|
||||
import type {
|
||||
MetricsResponse,
|
||||
V1TranscriptsListData,
|
||||
V1TranscriptsListResponse,
|
||||
V1TranscriptsCreateData,
|
||||
V1TranscriptsCreateResponse,
|
||||
V1TranscriptGetData,
|
||||
V1TranscriptGetResponse,
|
||||
V1TranscriptUpdateData,
|
||||
V1TranscriptUpdateResponse,
|
||||
V1TranscriptDeleteData,
|
||||
V1TranscriptDeleteResponse,
|
||||
V1TranscriptGetTopicsData,
|
||||
V1TranscriptGetTopicsResponse,
|
||||
V1TranscriptGetTopicsWithWordsData,
|
||||
V1TranscriptGetTopicsWithWordsResponse,
|
||||
V1TranscriptGetTopicsWithWordsPerSpeakerData,
|
||||
V1TranscriptGetTopicsWithWordsPerSpeakerResponse,
|
||||
V1TranscriptHeadAudioMp3Data,
|
||||
V1TranscriptHeadAudioMp3Response,
|
||||
V1TranscriptGetAudioMp3Data,
|
||||
V1TranscriptGetAudioMp3Response,
|
||||
V1TranscriptGetAudioWaveformData,
|
||||
V1TranscriptGetAudioWaveformResponse,
|
||||
V1TranscriptGetParticipantsData,
|
||||
V1TranscriptGetParticipantsResponse,
|
||||
V1TranscriptAddParticipantData,
|
||||
V1TranscriptAddParticipantResponse,
|
||||
V1TranscriptGetParticipantData,
|
||||
V1TranscriptGetParticipantResponse,
|
||||
V1TranscriptUpdateParticipantData,
|
||||
V1TranscriptUpdateParticipantResponse,
|
||||
V1TranscriptDeleteParticipantData,
|
||||
V1TranscriptDeleteParticipantResponse,
|
||||
V1TranscriptAssignSpeakerData,
|
||||
V1TranscriptAssignSpeakerResponse,
|
||||
V1TranscriptMergeSpeakerData,
|
||||
V1TranscriptMergeSpeakerResponse,
|
||||
V1TranscriptRecordUploadData,
|
||||
V1TranscriptRecordUploadResponse,
|
||||
V1TranscriptGetWebsocketEventsData,
|
||||
V1TranscriptGetWebsocketEventsResponse,
|
||||
V1TranscriptRecordWebrtcData,
|
||||
V1TranscriptRecordWebrtcResponse,
|
||||
V1UserMeResponse,
|
||||
} from "./types.gen";
|
||||
|
||||
export class DefaultService {
|
||||
constructor(public readonly httpRequest: BaseHttpRequest) {}
|
||||
|
||||
/**
|
||||
* Metrics
|
||||
* Endpoint that serves Prometheus metrics.
|
||||
* @returns unknown Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public metrics(): CancelablePromise<MetricsResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/metrics",
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcripts List
|
||||
* @param data The data for the request.
|
||||
* @param data.page Page number
|
||||
* @param data.size Page size
|
||||
* @returns Page_GetTranscript_ Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptsList(
|
||||
data: V1TranscriptsListData = {},
|
||||
): CancelablePromise<V1TranscriptsListResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/transcripts",
|
||||
query: {
|
||||
page: data.page,
|
||||
size: data.size,
|
||||
},
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcripts Create
|
||||
* @param data The data for the request.
|
||||
* @param data.requestBody
|
||||
* @returns GetTranscript Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptsCreate(
|
||||
data: V1TranscriptsCreateData,
|
||||
): CancelablePromise<V1TranscriptsCreateResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "POST",
|
||||
url: "/v1/transcripts",
|
||||
body: data.requestBody,
|
||||
mediaType: "application/json",
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Get
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @returns GetTranscript Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGet(
|
||||
data: V1TranscriptGetData,
|
||||
): CancelablePromise<V1TranscriptGetResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/transcripts/{transcript_id}",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
},
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Update
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @param data.requestBody
|
||||
* @returns GetTranscript Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptUpdate(
|
||||
data: V1TranscriptUpdateData,
|
||||
): CancelablePromise<V1TranscriptUpdateResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "PATCH",
|
||||
url: "/v1/transcripts/{transcript_id}",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
},
|
||||
body: data.requestBody,
|
||||
mediaType: "application/json",
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Delete
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @returns DeletionStatus Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptDelete(
|
||||
data: V1TranscriptDeleteData,
|
||||
): CancelablePromise<V1TranscriptDeleteResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "DELETE",
|
||||
url: "/v1/transcripts/{transcript_id}",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
},
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Get Topics
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @returns GetTranscriptTopic Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGetTopics(
|
||||
data: V1TranscriptGetTopicsData,
|
||||
): CancelablePromise<V1TranscriptGetTopicsResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/transcripts/{transcript_id}/topics",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
},
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Get Topics With Words
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @returns GetTranscriptTopicWithWords Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGetTopicsWithWords(
|
||||
data: V1TranscriptGetTopicsWithWordsData,
|
||||
): CancelablePromise<V1TranscriptGetTopicsWithWordsResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/transcripts/{transcript_id}/topics/with-words",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
},
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Get Topics With Words Per Speaker
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @param data.topicId
|
||||
* @returns GetTranscriptTopicWithWordsPerSpeaker Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGetTopicsWithWordsPerSpeaker(
|
||||
data: V1TranscriptGetTopicsWithWordsPerSpeakerData,
|
||||
): CancelablePromise<V1TranscriptGetTopicsWithWordsPerSpeakerResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/transcripts/{transcript_id}/topics/{topic_id}/words-per-speaker",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
topic_id: data.topicId,
|
||||
},
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Get Audio Mp3
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @param data.token
|
||||
* @returns unknown Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptHeadAudioMp3(
|
||||
data: V1TranscriptHeadAudioMp3Data,
|
||||
): CancelablePromise<V1TranscriptHeadAudioMp3Response> {
|
||||
return this.httpRequest.request({
|
||||
method: "HEAD",
|
||||
url: "/v1/transcripts/{transcript_id}/audio/mp3",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
},
|
||||
query: {
|
||||
token: data.token,
|
||||
},
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Get Audio Mp3
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @param data.token
|
||||
* @returns unknown Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGetAudioMp3(
|
||||
data: V1TranscriptGetAudioMp3Data,
|
||||
): CancelablePromise<V1TranscriptGetAudioMp3Response> {
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/transcripts/{transcript_id}/audio/mp3",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
},
|
||||
query: {
|
||||
token: data.token,
|
||||
},
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Get Audio Waveform
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @returns AudioWaveform Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGetAudioWaveform(
|
||||
data: V1TranscriptGetAudioWaveformData,
|
||||
): CancelablePromise<V1TranscriptGetAudioWaveformResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/transcripts/{transcript_id}/audio/waveform",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
},
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Get Participants
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @returns Participant Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGetParticipants(
|
||||
data: V1TranscriptGetParticipantsData,
|
||||
): CancelablePromise<V1TranscriptGetParticipantsResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/transcripts/{transcript_id}/participants",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
},
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Add Participant
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @param data.requestBody
|
||||
* @returns Participant Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptAddParticipant(
|
||||
data: V1TranscriptAddParticipantData,
|
||||
): CancelablePromise<V1TranscriptAddParticipantResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "POST",
|
||||
url: "/v1/transcripts/{transcript_id}/participants",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
},
|
||||
body: data.requestBody,
|
||||
mediaType: "application/json",
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Get Participant
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @param data.participantId
|
||||
* @returns Participant Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGetParticipant(
|
||||
data: V1TranscriptGetParticipantData,
|
||||
): CancelablePromise<V1TranscriptGetParticipantResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/transcripts/{transcript_id}/participants/{participant_id}",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
participant_id: data.participantId,
|
||||
},
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Update Participant
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @param data.participantId
|
||||
* @param data.requestBody
|
||||
* @returns Participant Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptUpdateParticipant(
|
||||
data: V1TranscriptUpdateParticipantData,
|
||||
): CancelablePromise<V1TranscriptUpdateParticipantResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "PATCH",
|
||||
url: "/v1/transcripts/{transcript_id}/participants/{participant_id}",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
participant_id: data.participantId,
|
||||
},
|
||||
body: data.requestBody,
|
||||
mediaType: "application/json",
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Delete Participant
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @param data.participantId
|
||||
* @returns DeletionStatus Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptDeleteParticipant(
|
||||
data: V1TranscriptDeleteParticipantData,
|
||||
): CancelablePromise<V1TranscriptDeleteParticipantResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "DELETE",
|
||||
url: "/v1/transcripts/{transcript_id}/participants/{participant_id}",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
participant_id: data.participantId,
|
||||
},
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Assign Speaker
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @param data.requestBody
|
||||
* @returns SpeakerAssignmentStatus Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptAssignSpeaker(
|
||||
data: V1TranscriptAssignSpeakerData,
|
||||
): CancelablePromise<V1TranscriptAssignSpeakerResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "PATCH",
|
||||
url: "/v1/transcripts/{transcript_id}/speaker/assign",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
},
|
||||
body: data.requestBody,
|
||||
mediaType: "application/json",
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Merge Speaker
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @param data.requestBody
|
||||
* @returns SpeakerAssignmentStatus Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptMergeSpeaker(
|
||||
data: V1TranscriptMergeSpeakerData,
|
||||
): CancelablePromise<V1TranscriptMergeSpeakerResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "PATCH",
|
||||
url: "/v1/transcripts/{transcript_id}/speaker/merge",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
},
|
||||
body: data.requestBody,
|
||||
mediaType: "application/json",
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Record Upload
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @param data.formData
|
||||
* @returns unknown Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptRecordUpload(
|
||||
data: V1TranscriptRecordUploadData,
|
||||
): CancelablePromise<V1TranscriptRecordUploadResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "POST",
|
||||
url: "/v1/transcripts/{transcript_id}/record/upload",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
},
|
||||
formData: data.formData,
|
||||
mediaType: "multipart/form-data",
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Get Websocket Events
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @returns unknown Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGetWebsocketEvents(
|
||||
data: V1TranscriptGetWebsocketEventsData,
|
||||
): CancelablePromise<V1TranscriptGetWebsocketEventsResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/transcripts/{transcript_id}/events",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
},
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Record Webrtc
|
||||
* @param data The data for the request.
|
||||
* @param data.transcriptId
|
||||
* @param data.requestBody
|
||||
* @returns unknown Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptRecordWebrtc(
|
||||
data: V1TranscriptRecordWebrtcData,
|
||||
): CancelablePromise<V1TranscriptRecordWebrtcResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "POST",
|
||||
url: "/v1/transcripts/{transcript_id}/record/webrtc",
|
||||
path: {
|
||||
transcript_id: data.transcriptId,
|
||||
},
|
||||
body: data.requestBody,
|
||||
mediaType: "application/json",
|
||||
errors: {
|
||||
422: "Validation Error",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* User Me
|
||||
* @returns unknown Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1UserMe(): CancelablePromise<V1UserMeResponse> {
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/me",
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,598 +0,0 @@
|
||||
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 type TDataV1TranscriptsList = {
|
||||
/**
|
||||
* Page number
|
||||
*/
|
||||
page?: number;
|
||||
/**
|
||||
* Page size
|
||||
*/
|
||||
size?: number;
|
||||
};
|
||||
export type TDataV1TranscriptsCreate = {
|
||||
requestBody: CreateTranscript;
|
||||
};
|
||||
export type TDataV1TranscriptGet = {
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptUpdate = {
|
||||
requestBody: UpdateTranscript;
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptDelete = {
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptGetTopics = {
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptGetTopicsWithWords = {
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptGetTopicsWithWordsPerSpeaker = {
|
||||
topicId: string;
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptHeadAudioMp3 = {
|
||||
token?: string | null;
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptGetAudioMp3 = {
|
||||
token?: string | null;
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptGetAudioWaveform = {
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptGetParticipants = {
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptAddParticipant = {
|
||||
requestBody: CreateParticipant;
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptGetParticipant = {
|
||||
participantId: string;
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptUpdateParticipant = {
|
||||
participantId: string;
|
||||
requestBody: UpdateParticipant;
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptDeleteParticipant = {
|
||||
participantId: string;
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptAssignSpeaker = {
|
||||
requestBody: SpeakerAssignment;
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptMergeSpeaker = {
|
||||
requestBody: SpeakerMerge;
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptRecordUpload = {
|
||||
formData: Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post;
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptGetWebsocketEvents = {
|
||||
transcriptId: string;
|
||||
};
|
||||
export type TDataV1TranscriptRecordWebrtc = {
|
||||
requestBody: RtcOffer;
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export class DefaultService {
|
||||
constructor(public readonly httpRequest: BaseHttpRequest) {}
|
||||
|
||||
/**
|
||||
* Metrics
|
||||
* Endpoint that serves Prometheus metrics.
|
||||
* @returns unknown Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public metrics(): CancelablePromise<unknown> {
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/metrics",
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcripts List
|
||||
* @returns Page_GetTranscript_ Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptsList(
|
||||
data: TDataV1TranscriptsList = {},
|
||||
): CancelablePromise<Page_GetTranscript_> {
|
||||
const { page = 1, size = 50 } = data;
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/transcripts",
|
||||
query: {
|
||||
page,
|
||||
size,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcripts Create
|
||||
* @returns GetTranscript Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptsCreate(
|
||||
data: TDataV1TranscriptsCreate,
|
||||
): CancelablePromise<GetTranscript> {
|
||||
const { requestBody } = data;
|
||||
return this.httpRequest.request({
|
||||
method: "POST",
|
||||
url: "/v1/transcripts",
|
||||
body: requestBody,
|
||||
mediaType: "application/json",
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Get
|
||||
* @returns GetTranscript Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGet(
|
||||
data: TDataV1TranscriptGet,
|
||||
): CancelablePromise<GetTranscript> {
|
||||
const { transcriptId } = data;
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/transcripts/{transcript_id}",
|
||||
path: {
|
||||
transcript_id: transcriptId,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Update
|
||||
* @returns GetTranscript Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptUpdate(
|
||||
data: TDataV1TranscriptUpdate,
|
||||
): CancelablePromise<GetTranscript> {
|
||||
const { requestBody, transcriptId } = data;
|
||||
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
|
||||
* @returns DeletionStatus Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptDelete(
|
||||
data: TDataV1TranscriptDelete,
|
||||
): CancelablePromise<DeletionStatus> {
|
||||
const { transcriptId } = data;
|
||||
return this.httpRequest.request({
|
||||
method: "DELETE",
|
||||
url: "/v1/transcripts/{transcript_id}",
|
||||
path: {
|
||||
transcript_id: transcriptId,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Get Topics
|
||||
* @returns GetTranscriptTopic Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGetTopics(
|
||||
data: TDataV1TranscriptGetTopics,
|
||||
): CancelablePromise<Array<GetTranscriptTopic>> {
|
||||
const { transcriptId } = data;
|
||||
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
|
||||
* @returns GetTranscriptTopicWithWords Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGetTopicsWithWords(
|
||||
data: TDataV1TranscriptGetTopicsWithWords,
|
||||
): CancelablePromise<Array<GetTranscriptTopicWithWords>> {
|
||||
const { transcriptId } = data;
|
||||
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
|
||||
* @returns GetTranscriptTopicWithWordsPerSpeaker Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGetTopicsWithWordsPerSpeaker(
|
||||
data: TDataV1TranscriptGetTopicsWithWordsPerSpeaker,
|
||||
): CancelablePromise<GetTranscriptTopicWithWordsPerSpeaker> {
|
||||
const { topicId, transcriptId } = data;
|
||||
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
|
||||
* @returns unknown Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptHeadAudioMp3(
|
||||
data: TDataV1TranscriptHeadAudioMp3,
|
||||
): CancelablePromise<unknown> {
|
||||
const { token, transcriptId } = data;
|
||||
return this.httpRequest.request({
|
||||
method: "HEAD",
|
||||
url: "/v1/transcripts/{transcript_id}/audio/mp3",
|
||||
path: {
|
||||
transcript_id: transcriptId,
|
||||
},
|
||||
query: {
|
||||
token,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Get Audio Mp3
|
||||
* @returns unknown Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGetAudioMp3(
|
||||
data: TDataV1TranscriptGetAudioMp3,
|
||||
): CancelablePromise<unknown> {
|
||||
const { token, transcriptId } = data;
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/transcripts/{transcript_id}/audio/mp3",
|
||||
path: {
|
||||
transcript_id: transcriptId,
|
||||
},
|
||||
query: {
|
||||
token,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Get Audio Waveform
|
||||
* @returns AudioWaveform Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGetAudioWaveform(
|
||||
data: TDataV1TranscriptGetAudioWaveform,
|
||||
): CancelablePromise<AudioWaveform> {
|
||||
const { transcriptId } = data;
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/transcripts/{transcript_id}/audio/waveform",
|
||||
path: {
|
||||
transcript_id: transcriptId,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Get Participants
|
||||
* @returns Participant Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGetParticipants(
|
||||
data: TDataV1TranscriptGetParticipants,
|
||||
): CancelablePromise<Array<Participant>> {
|
||||
const { transcriptId } = data;
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/transcripts/{transcript_id}/participants",
|
||||
path: {
|
||||
transcript_id: transcriptId,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Add Participant
|
||||
* @returns Participant Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptAddParticipant(
|
||||
data: TDataV1TranscriptAddParticipant,
|
||||
): CancelablePromise<Participant> {
|
||||
const { requestBody, transcriptId } = data;
|
||||
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
|
||||
* @returns Participant Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGetParticipant(
|
||||
data: TDataV1TranscriptGetParticipant,
|
||||
): CancelablePromise<Participant> {
|
||||
const { participantId, transcriptId } = data;
|
||||
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
|
||||
* @returns Participant Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptUpdateParticipant(
|
||||
data: TDataV1TranscriptUpdateParticipant,
|
||||
): CancelablePromise<Participant> {
|
||||
const { participantId, requestBody, transcriptId } = data;
|
||||
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
|
||||
* @returns DeletionStatus Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptDeleteParticipant(
|
||||
data: TDataV1TranscriptDeleteParticipant,
|
||||
): CancelablePromise<DeletionStatus> {
|
||||
const { participantId, transcriptId } = data;
|
||||
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
|
||||
* @returns SpeakerAssignmentStatus Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptAssignSpeaker(
|
||||
data: TDataV1TranscriptAssignSpeaker,
|
||||
): CancelablePromise<SpeakerAssignmentStatus> {
|
||||
const { requestBody, transcriptId } = data;
|
||||
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
|
||||
* @returns SpeakerAssignmentStatus Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptMergeSpeaker(
|
||||
data: TDataV1TranscriptMergeSpeaker,
|
||||
): CancelablePromise<SpeakerAssignmentStatus> {
|
||||
const { requestBody, transcriptId } = data;
|
||||
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
|
||||
* @returns unknown Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptRecordUpload(
|
||||
data: TDataV1TranscriptRecordUpload,
|
||||
): CancelablePromise<unknown> {
|
||||
const { formData, transcriptId } = data;
|
||||
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
|
||||
* @returns unknown Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptGetWebsocketEvents(
|
||||
data: TDataV1TranscriptGetWebsocketEvents,
|
||||
): CancelablePromise<unknown> {
|
||||
const { transcriptId } = data;
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/transcripts/{transcript_id}/events",
|
||||
path: {
|
||||
transcript_id: transcriptId,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Record Webrtc
|
||||
* @returns unknown Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1TranscriptRecordWebrtc(
|
||||
data: TDataV1TranscriptRecordWebrtc,
|
||||
): CancelablePromise<unknown> {
|
||||
const { requestBody, transcriptId } = data;
|
||||
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 unknown Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public v1UserMe(): CancelablePromise<UserInfo | null> {
|
||||
return this.httpRequest.request({
|
||||
method: "GET",
|
||||
url: "/v1/me",
|
||||
});
|
||||
}
|
||||
}
|
||||
642
www/app/api/types.gen.ts
Normal file
642
www/app/api/types.gen.ts
Normal file
@@ -0,0 +1,642 @@
|
||||
// This file is auto-generated by @hey-api/openapi-ts
|
||||
|
||||
export type AudioWaveform = {
|
||||
data: Array<number>;
|
||||
};
|
||||
|
||||
export type Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post =
|
||||
{
|
||||
file: Blob | File;
|
||||
};
|
||||
|
||||
export type CreateParticipant = {
|
||||
speaker?: number | null;
|
||||
name: string;
|
||||
};
|
||||
|
||||
export type CreateTranscript = {
|
||||
name: string;
|
||||
source_language?: string;
|
||||
target_language?: string;
|
||||
};
|
||||
|
||||
export type DeletionStatus = {
|
||||
status: string;
|
||||
};
|
||||
|
||||
export type GetTranscript = {
|
||||
id: string;
|
||||
user_id: string | null;
|
||||
name: string;
|
||||
status: string;
|
||||
locked: boolean;
|
||||
duration: number;
|
||||
title: string | null;
|
||||
short_summary: string | null;
|
||||
long_summary: string | null;
|
||||
created_at: string;
|
||||
share_mode?: string;
|
||||
source_language: string | null;
|
||||
target_language: string | null;
|
||||
participants: Array<TranscriptParticipant> | null;
|
||||
reviewed: boolean;
|
||||
};
|
||||
|
||||
export type GetTranscriptSegmentTopic = {
|
||||
text: string;
|
||||
start: number;
|
||||
speaker: number;
|
||||
};
|
||||
|
||||
export type GetTranscriptTopic = {
|
||||
id: string;
|
||||
title: string;
|
||||
summary: string;
|
||||
timestamp: number;
|
||||
duration: number | null;
|
||||
transcript: string;
|
||||
segments?: Array<GetTranscriptSegmentTopic>;
|
||||
};
|
||||
|
||||
export type GetTranscriptTopicWithWords = {
|
||||
id: string;
|
||||
title: string;
|
||||
summary: string;
|
||||
timestamp: number;
|
||||
duration: number | null;
|
||||
transcript: string;
|
||||
segments?: Array<GetTranscriptSegmentTopic>;
|
||||
words?: Array<Word>;
|
||||
};
|
||||
|
||||
export type GetTranscriptTopicWithWordsPerSpeaker = {
|
||||
id: string;
|
||||
title: string;
|
||||
summary: string;
|
||||
timestamp: number;
|
||||
duration: number | null;
|
||||
transcript: string;
|
||||
segments?: Array<GetTranscriptSegmentTopic>;
|
||||
words_per_speaker?: Array<SpeakerWords>;
|
||||
};
|
||||
|
||||
export type HTTPValidationError = {
|
||||
detail?: Array<ValidationError>;
|
||||
};
|
||||
|
||||
export type Page_GetTranscript_ = {
|
||||
items: Array<GetTranscript>;
|
||||
total: number;
|
||||
page: number | null;
|
||||
size: number | null;
|
||||
pages?: number | null;
|
||||
};
|
||||
|
||||
export type Participant = {
|
||||
id: string;
|
||||
speaker: number | null;
|
||||
name: string;
|
||||
};
|
||||
|
||||
export type RtcOffer = {
|
||||
sdp: string;
|
||||
type: string;
|
||||
};
|
||||
|
||||
export type SpeakerAssignment = {
|
||||
speaker?: number | null;
|
||||
participant?: string | null;
|
||||
timestamp_from: number;
|
||||
timestamp_to: number;
|
||||
};
|
||||
|
||||
export type SpeakerAssignmentStatus = {
|
||||
status: string;
|
||||
};
|
||||
|
||||
export type SpeakerMerge = {
|
||||
speaker_from: number;
|
||||
speaker_to: number;
|
||||
};
|
||||
|
||||
export type SpeakerWords = {
|
||||
speaker: number;
|
||||
words: Array<Word>;
|
||||
};
|
||||
|
||||
export type TranscriptParticipant = {
|
||||
id?: string;
|
||||
speaker: number | null;
|
||||
name: string;
|
||||
};
|
||||
|
||||
export type UpdateParticipant = {
|
||||
speaker?: number | null;
|
||||
name?: string | null;
|
||||
};
|
||||
|
||||
export type UpdateTranscript = {
|
||||
name?: string | null;
|
||||
locked?: boolean | null;
|
||||
title?: string | null;
|
||||
short_summary?: string | null;
|
||||
long_summary?: string | null;
|
||||
share_mode?: "public" | "semi-private" | "private" | null;
|
||||
participants?: Array<TranscriptParticipant> | null;
|
||||
reviewed?: boolean | null;
|
||||
};
|
||||
|
||||
export type UserInfo = {
|
||||
sub: string;
|
||||
email: string | null;
|
||||
email_verified: boolean | null;
|
||||
};
|
||||
|
||||
export type ValidationError = {
|
||||
loc: Array<string | number>;
|
||||
msg: string;
|
||||
type: string;
|
||||
};
|
||||
|
||||
export type Word = {
|
||||
text: string;
|
||||
start: number;
|
||||
end: number;
|
||||
speaker?: number;
|
||||
};
|
||||
|
||||
export type MetricsResponse = unknown;
|
||||
|
||||
export type V1TranscriptsListData = {
|
||||
/**
|
||||
* Page number
|
||||
*/
|
||||
page?: number;
|
||||
/**
|
||||
* Page size
|
||||
*/
|
||||
size?: number;
|
||||
};
|
||||
|
||||
export type V1TranscriptsListResponse = Page_GetTranscript_;
|
||||
|
||||
export type V1TranscriptsCreateData = {
|
||||
requestBody: CreateTranscript;
|
||||
};
|
||||
|
||||
export type V1TranscriptsCreateResponse = GetTranscript;
|
||||
|
||||
export type V1TranscriptGetData = {
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptGetResponse = GetTranscript;
|
||||
|
||||
export type V1TranscriptUpdateData = {
|
||||
requestBody: UpdateTranscript;
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptUpdateResponse = GetTranscript;
|
||||
|
||||
export type V1TranscriptDeleteData = {
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptDeleteResponse = DeletionStatus;
|
||||
|
||||
export type V1TranscriptGetTopicsData = {
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptGetTopicsResponse = Array<GetTranscriptTopic>;
|
||||
|
||||
export type V1TranscriptGetTopicsWithWordsData = {
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptGetTopicsWithWordsResponse =
|
||||
Array<GetTranscriptTopicWithWords>;
|
||||
|
||||
export type V1TranscriptGetTopicsWithWordsPerSpeakerData = {
|
||||
topicId: string;
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptGetTopicsWithWordsPerSpeakerResponse =
|
||||
GetTranscriptTopicWithWordsPerSpeaker;
|
||||
|
||||
export type V1TranscriptHeadAudioMp3Data = {
|
||||
token?: string | null;
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptHeadAudioMp3Response = unknown;
|
||||
|
||||
export type V1TranscriptGetAudioMp3Data = {
|
||||
token?: string | null;
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptGetAudioMp3Response = unknown;
|
||||
|
||||
export type V1TranscriptGetAudioWaveformData = {
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptGetAudioWaveformResponse = AudioWaveform;
|
||||
|
||||
export type V1TranscriptGetParticipantsData = {
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptGetParticipantsResponse = Array<Participant>;
|
||||
|
||||
export type V1TranscriptAddParticipantData = {
|
||||
requestBody: CreateParticipant;
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptAddParticipantResponse = Participant;
|
||||
|
||||
export type V1TranscriptGetParticipantData = {
|
||||
participantId: string;
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptGetParticipantResponse = Participant;
|
||||
|
||||
export type V1TranscriptUpdateParticipantData = {
|
||||
participantId: string;
|
||||
requestBody: UpdateParticipant;
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptUpdateParticipantResponse = Participant;
|
||||
|
||||
export type V1TranscriptDeleteParticipantData = {
|
||||
participantId: string;
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptDeleteParticipantResponse = DeletionStatus;
|
||||
|
||||
export type V1TranscriptAssignSpeakerData = {
|
||||
requestBody: SpeakerAssignment;
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptAssignSpeakerResponse = SpeakerAssignmentStatus;
|
||||
|
||||
export type V1TranscriptMergeSpeakerData = {
|
||||
requestBody: SpeakerMerge;
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptMergeSpeakerResponse = SpeakerAssignmentStatus;
|
||||
|
||||
export type V1TranscriptRecordUploadData = {
|
||||
formData: Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post;
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptRecordUploadResponse = unknown;
|
||||
|
||||
export type V1TranscriptGetWebsocketEventsData = {
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptGetWebsocketEventsResponse = unknown;
|
||||
|
||||
export type V1TranscriptRecordWebrtcData = {
|
||||
requestBody: RtcOffer;
|
||||
transcriptId: string;
|
||||
};
|
||||
|
||||
export type V1TranscriptRecordWebrtcResponse = unknown;
|
||||
|
||||
export type V1UserMeResponse = UserInfo | null;
|
||||
|
||||
export type $OpenApiTs = {
|
||||
"/metrics": {
|
||||
get: {
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: unknown;
|
||||
};
|
||||
};
|
||||
};
|
||||
"/v1/transcripts": {
|
||||
get: {
|
||||
req: V1TranscriptsListData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: Page_GetTranscript_;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
post: {
|
||||
req: V1TranscriptsCreateData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: GetTranscript;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
};
|
||||
"/v1/transcripts/{transcript_id}": {
|
||||
get: {
|
||||
req: V1TranscriptGetData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: GetTranscript;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
patch: {
|
||||
req: V1TranscriptUpdateData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: GetTranscript;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
delete: {
|
||||
req: V1TranscriptDeleteData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: DeletionStatus;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
};
|
||||
"/v1/transcripts/{transcript_id}/topics": {
|
||||
get: {
|
||||
req: V1TranscriptGetTopicsData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: Array<GetTranscriptTopic>;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
};
|
||||
"/v1/transcripts/{transcript_id}/topics/with-words": {
|
||||
get: {
|
||||
req: V1TranscriptGetTopicsWithWordsData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: Array<GetTranscriptTopicWithWords>;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
};
|
||||
"/v1/transcripts/{transcript_id}/topics/{topic_id}/words-per-speaker": {
|
||||
get: {
|
||||
req: V1TranscriptGetTopicsWithWordsPerSpeakerData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: GetTranscriptTopicWithWordsPerSpeaker;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
};
|
||||
"/v1/transcripts/{transcript_id}/audio/mp3": {
|
||||
head: {
|
||||
req: V1TranscriptHeadAudioMp3Data;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: unknown;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
get: {
|
||||
req: V1TranscriptGetAudioMp3Data;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: unknown;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
};
|
||||
"/v1/transcripts/{transcript_id}/audio/waveform": {
|
||||
get: {
|
||||
req: V1TranscriptGetAudioWaveformData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: AudioWaveform;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
};
|
||||
"/v1/transcripts/{transcript_id}/participants": {
|
||||
get: {
|
||||
req: V1TranscriptGetParticipantsData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: Array<Participant>;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
post: {
|
||||
req: V1TranscriptAddParticipantData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: Participant;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
};
|
||||
"/v1/transcripts/{transcript_id}/participants/{participant_id}": {
|
||||
get: {
|
||||
req: V1TranscriptGetParticipantData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: Participant;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
patch: {
|
||||
req: V1TranscriptUpdateParticipantData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: Participant;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
delete: {
|
||||
req: V1TranscriptDeleteParticipantData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: DeletionStatus;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
};
|
||||
"/v1/transcripts/{transcript_id}/speaker/assign": {
|
||||
patch: {
|
||||
req: V1TranscriptAssignSpeakerData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: SpeakerAssignmentStatus;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
};
|
||||
"/v1/transcripts/{transcript_id}/speaker/merge": {
|
||||
patch: {
|
||||
req: V1TranscriptMergeSpeakerData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: SpeakerAssignmentStatus;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
};
|
||||
"/v1/transcripts/{transcript_id}/record/upload": {
|
||||
post: {
|
||||
req: V1TranscriptRecordUploadData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: unknown;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
};
|
||||
"/v1/transcripts/{transcript_id}/events": {
|
||||
get: {
|
||||
req: V1TranscriptGetWebsocketEventsData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: unknown;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
};
|
||||
"/v1/transcripts/{transcript_id}/record/webrtc": {
|
||||
post: {
|
||||
req: V1TranscriptRecordWebrtcData;
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: unknown;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HTTPValidationError;
|
||||
};
|
||||
};
|
||||
};
|
||||
"/v1/me": {
|
||||
get: {
|
||||
res: {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: UserInfo | null;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user