Migrate to openapi-ts generator

This commit is contained in:
2024-07-03 15:08:54 +02:00
parent c36b64cff1
commit ef531f6491
81 changed files with 1157 additions and 1004 deletions

View File

@@ -37,7 +37,7 @@ export default function TranscriptCorrect({
const markAsDone = () => {
if (transcript.response && !transcript.response.reviewed) {
api
?.v1TranscriptUpdate(transcriptId, { reviewed: true })
?.v1TranscriptUpdate({ transcriptId, requestBody: { reviewed: true } })
.then(() => {
router.push(`/transcripts/${transcriptId}`);
})

View File

@@ -123,10 +123,13 @@ const ParticipantList = ({
setLoading(true);
try {
await api?.v1TranscriptAssignSpeaker(transcriptId, {
participant: participant.id,
timestamp_from: selectedText.start,
timestamp_to: selectedText.end,
await api?.v1TranscriptAssignSpeaker({
transcriptId,
requestBody: {
participant: participant.id,
timestamp_from: selectedText.start,
timestamp_to: selectedText.end,
},
});
onSuccess();
} catch (error) {
@@ -142,9 +145,12 @@ const ParticipantList = ({
setLoading(true);
if (participantTo.speaker) {
try {
await api?.v1TranscriptMergeSpeaker(transcriptId, {
speaker_from: speakerFrom,
speaker_to: participantTo.speaker,
await api?.v1TranscriptMergeSpeaker({
transcriptId,
requestBody: {
speaker_from: speakerFrom,
speaker_to: participantTo.speaker,
},
});
onSuccess();
} catch (error) {
@@ -153,11 +159,11 @@ const ParticipantList = ({
}
} else {
try {
await api?.v1TranscriptUpdateParticipant(
await api?.v1TranscriptUpdateParticipant({
transcriptId,
participantTo.id,
{ speaker: speakerFrom },
);
participantId: participantTo.id,
requestBody: { speaker: speakerFrom },
});
onSuccess();
} catch (error) {
setError(error, "There was an error merging (update)");
@@ -183,8 +189,12 @@ const ParticipantList = ({
if (participant && participant.name !== participantInput) {
setLoading(true);
api
?.v1TranscriptUpdateParticipant(transcriptId, participant.id, {
name: participantInput,
?.v1TranscriptUpdateParticipant({
transcriptId,
participantId: participant.id,
requestBody: {
name: participantInput,
},
})
.then(() => {
participants.refetch();
@@ -202,9 +212,12 @@ const ParticipantList = ({
) {
setLoading(true);
api
?.v1TranscriptAddParticipant(transcriptId, {
name: participantInput,
speaker: selectedText,
?.v1TranscriptAddParticipant({
transcriptId,
requestBody: {
name: participantInput,
speaker: selectedText,
},
})
.then(() => {
participants.refetch();
@@ -222,12 +235,12 @@ const ParticipantList = ({
) {
setLoading(true);
try {
const participant = await api?.v1TranscriptAddParticipant(
const participant = await api?.v1TranscriptAddParticipant({
transcriptId,
{
requestBody: {
name: participantInput,
},
);
});
setLoading(false);
assignTo(participant)().catch(() => {
// error and loading are handled by assignTo catch
@@ -240,8 +253,11 @@ const ParticipantList = ({
} else if (action == "Create") {
setLoading(true);
api
?.v1TranscriptAddParticipant(transcriptId, {
name: participantInput,
?.v1TranscriptAddParticipant({
transcriptId,
requestBody: {
name: participantInput,
},
})
.then(() => {
participants.refetch();
@@ -261,7 +277,7 @@ const ParticipantList = ({
if (loading || participants.loading || topicWithWords.loading) return;
setLoading(true);
api
?.v1TranscriptDeleteParticipant(transcriptId, participantId)
?.v1TranscriptDeleteParticipant({ transcriptId, participantId })
.then(() => {
participants.refetch();
setLoading(false);

View File

@@ -49,10 +49,10 @@ export default function FinalSummary(props: FinalSummaryProps) {
const requestBody: UpdateTranscript = {
long_summary: newSummary,
};
const updatedTranscript = await api?.v1TranscriptUpdate(
const updatedTranscript = await api?.v1TranscriptUpdate({
transcriptId,
requestBody,
);
});
console.log("Updated long summary:", updatedTranscript);
} catch (err) {
console.error("Failed to update long summary:", err);

View File

@@ -24,7 +24,7 @@ const useCreateTranscript = (): UseCreateTranscript => {
setLoading(true);
api
.v1TranscriptsCreate(transcriptCreationDetails)
.v1TranscriptsCreate({ requestBody: transcriptCreationDetails })
.then((transcript) => {
setTranscript(transcript);
setLoading(false);

View File

@@ -27,7 +27,10 @@ export default function FileUploadButton(props: FileUploadButton) {
// Add other properties if required by the type definition
};
api?.v1TranscriptRecordUpload(props.transcriptId, uploadData);
api?.v1TranscriptRecordUpload({
transcriptId: props.transcriptId,
formData: uploadData,
});
}
};

View File

@@ -57,10 +57,10 @@ export default function ShareAndPrivacy(props: ShareAndPrivacyProps) {
share_mode: toShareMode(selectedShareMode.value),
};
const updatedTranscript = await api.v1TranscriptUpdate(
props.transcriptResponse.id,
const updatedTranscript = await api.v1TranscriptUpdate({
transcriptId: props.transcriptResponse.id,
requestBody,
);
});
setShareMode(
shareOptions.find(
(option) => option.value === updatedTranscript.share_mode,

View File

@@ -21,10 +21,10 @@ const TranscriptTitle = (props: TranscriptTitle) => {
const requestBody: UpdateTranscript = {
title: newTitle,
};
const updatedTranscript = await api?.v1TranscriptUpdate(
const updatedTranscript = await api?.v1TranscriptUpdate({
transcriptId,
requestBody,
);
});
console.log("Updated transcript:", updatedTranscript);
} catch (err) {
console.error("Failed to update transcript:", err);

View File

@@ -49,7 +49,7 @@ const useParticipants = (transcriptId: string): UseParticipants => {
setLoading(true);
api
.v1TranscriptGetParticipants(transcriptId)
.v1TranscriptGetParticipants({ transcriptId })
.then((result) => {
setResponse(result);
setLoading(false);

View File

@@ -56,7 +56,7 @@ const useTopicWithWords = (
setLoading(true);
api
.v1TranscriptGetTopicsWithWordsPerSpeaker(transcriptId, topicId)
.v1TranscriptGetTopicsWithWordsPerSpeaker({ transcriptId, topicId })
.then((result) => {
setResponse(result);
setLoading(false);

View File

@@ -23,7 +23,7 @@ const useTopics = (id: string): TranscriptTopics => {
setLoading(true);
api
.v1TranscriptGetTopics(id)
.v1TranscriptGetTopics({ transcriptId: id })
.then((result) => {
setTopics(result);
setLoading(false);

View File

@@ -37,7 +37,7 @@ const useTranscript = (
setLoading(true);
api
.v1TranscriptGet(id)
.v1TranscriptGet({ transcriptId: id })
.then((result) => {
setResponse(result);
setLoading(false);

View File

@@ -28,7 +28,7 @@ const useTranscriptList = (page: number): TranscriptList => {
if (!api) return;
setLoading(true);
api
.v1TranscriptsList(page)
.v1TranscriptsList({ page })
.then((response) => {
setResponse(response);
setLoading(false);

View File

@@ -21,7 +21,7 @@ const useWaveform = (id: string): AudioWaveFormResponse => {
if (!id || !api) return;
setLoading(true);
api
.v1TranscriptGetAudioWaveform(id)
.v1TranscriptGetAudioWaveform({ transcriptId: id })
.then((result) => {
setWaveform(result);
setLoading(false);

View File

@@ -41,7 +41,7 @@ const useWebRTC = (
};
api
.v1TranscriptRecordWebrtc(transcriptId, rtcOffer)
.v1TranscriptRecordWebrtc({ transcriptId, requestBody: rtcOffer })
.then((answer) => {
try {
p.signal(answer);

View File

@@ -316,7 +316,7 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
if (!transcriptId || !api) return;
api?.v1TranscriptGetWebsocketEvents(transcriptId).then((result) => {});
api?.v1TranscriptGetWebsocketEvents({ transcriptId }).then((result) => {});
const url = `${websocket_url}/v1/transcripts/${transcriptId}/events`;
let ws = new WebSocket(url);

View File

@@ -1,23 +0,0 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

View File

@@ -1,28 +0,0 @@
apis/DefaultApi.ts
apis/index.ts
index.ts
models/AudioWaveform.ts
models/CreateParticipant.ts
models/CreateTranscript.ts
models/DeletionStatus.ts
models/GetTranscript.ts
models/GetTranscriptSegmentTopic.ts
models/GetTranscriptTopic.ts
models/GetTranscriptTopicWithWords.ts
models/GetTranscriptTopicWithWordsPerSpeaker.ts
models/HTTPValidationError.ts
models/PageGetTranscript.ts
models/Participant.ts
models/RtcOffer.ts
models/SpeakerAssignment.ts
models/SpeakerAssignmentStatus.ts
models/SpeakerMerge.ts
models/SpeakerWords.ts
models/TranscriptParticipant.ts
models/UpdateParticipant.ts
models/UpdateTranscript.ts
models/UserInfo.ts
models/ValidationError.ts
models/Word.ts
models/index.ts
runtime.ts

View File

@@ -1 +0,0 @@
6.6.0

View File

@@ -1,18 +1,19 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseHttpRequest } from "./core/BaseHttpRequest";
import type { OpenAPIConfig } from "./core/OpenAPI";
import { FetchHttpRequest } from "./core/FetchHttpRequest";
import { AxiosHttpRequest } from "./core/AxiosHttpRequest";
import { DefaultService } from "./services/DefaultService";
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
export class OpenApi {
public readonly default: DefaultService;
public readonly request: BaseHttpRequest;
constructor(
config?: Partial<OpenAPIConfig>,
HttpRequest: HttpRequestConstructor = FetchHttpRequest,
HttpRequest: HttpRequestConstructor = AxiosHttpRequest,
) {
this.request = new HttpRequest({
BASE: config?.BASE ?? "",
@@ -25,6 +26,7 @@ export class OpenApi {
HEADERS: config?.HEADERS,
ENCODE_PATH: config?.ENCODE_PATH,
});
this.default = new DefaultService(this.request);
}
}

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ApiRequestOptions } from "./ApiRequestOptions";
import type { ApiResult } from "./ApiResult";
@@ -9,7 +5,7 @@ export class ApiError extends Error {
public readonly url: string;
public readonly status: number;
public readonly statusText: string;
public readonly body: any;
public readonly body: unknown;
public readonly request: ApiRequestOptions;
constructor(

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ApiRequestOptions = {
readonly method:
| "GET"
@@ -12,11 +8,11 @@ export type ApiRequestOptions = {
| "HEAD"
| "PATCH";
readonly url: string;
readonly path?: Record<string, any>;
readonly cookies?: Record<string, any>;
readonly headers?: Record<string, any>;
readonly query?: Record<string, any>;
readonly formData?: Record<string, any>;
readonly path?: Record<string, unknown>;
readonly cookies?: Record<string, unknown>;
readonly headers?: Record<string, unknown>;
readonly query?: Record<string, unknown>;
readonly formData?: Record<string, unknown>;
readonly body?: any;
readonly mediaType?: string;
readonly responseHeader?: string;

View File

@@ -1,11 +1,7 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ApiResult = {
readonly url: string;
export type ApiResult<TData = any> = {
readonly body: TData;
readonly ok: boolean;
readonly status: number;
readonly statusText: string;
readonly body: any;
readonly url: string;
};

View File

@@ -1,14 +1,10 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ApiRequestOptions } from "./ApiRequestOptions";
import { BaseHttpRequest } from "./BaseHttpRequest";
import type { CancelablePromise } from "./CancelablePromise";
import type { OpenAPIConfig } from "./OpenAPI";
import { request as __request } from "./request";
export class FetchHttpRequest extends BaseHttpRequest {
export class AxiosHttpRequest extends BaseHttpRequest {
constructor(config: OpenAPIConfig) {
super(config);
}

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ApiRequestOptions } from "./ApiRequestOptions";
import type { CancelablePromise } from "./CancelablePromise";
import type { OpenAPIConfig } from "./OpenAPI";

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export class CancelError extends Error {
constructor(message: string) {
super(message);
@@ -28,12 +24,12 @@ export class CancelablePromise<T> implements Promise<T> {
readonly #cancelHandlers: (() => void)[];
readonly #promise: Promise<T>;
#resolve?: (value: T | PromiseLike<T>) => void;
#reject?: (reason?: any) => void;
#reject?: (reason?: unknown) => void;
constructor(
executor: (
resolve: (value: T | PromiseLike<T>) => void,
reject: (reason?: any) => void,
reject: (reason?: unknown) => void,
onCancel: OnCancel,
) => void,
) {
@@ -53,7 +49,7 @@ export class CancelablePromise<T> implements Promise<T> {
if (this.#resolve) this.#resolve(value);
};
const onReject = (reason?: any): void => {
const onReject = (reason?: unknown): void => {
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
return;
}
@@ -90,13 +86,13 @@ export class CancelablePromise<T> implements Promise<T> {
public then<TResult1 = T, TResult2 = never>(
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null,
onRejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null,
): Promise<TResult1 | TResult2> {
return this.#promise.then(onFulfilled, onRejected);
}
public catch<TResult = never>(
onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null,
onRejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null,
): Promise<T | TResult> {
return this.#promise.catch(onRejected);
}

View File

@@ -1,32 +1,48 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ApiRequestOptions } from "./ApiRequestOptions";
import type { TConfig, TResult } from "./types";
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
type Headers = Record<string, string>;
export type OpenAPIConfig = {
BASE: string;
VERSION: string;
WITH_CREDENTIALS: boolean;
CREDENTIALS: "include" | "omit" | "same-origin";
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;
PASSWORD?: string | Resolver<string> | undefined;
HEADERS?: Headers | Resolver<Headers> | undefined;
ENCODE_PATH?: ((path: string) => string) | undefined;
VERSION: string;
WITH_CREDENTIALS: boolean;
};
export const OpenAPI: OpenAPIConfig = {
BASE: "",
VERSION: "0.1.0",
WITH_CREDENTIALS: false,
CREDENTIALS: "include",
ENCODE_PATH: undefined,
HEADERS: undefined,
PASSWORD: undefined,
RESULT: "body",
TOKEN: undefined,
USERNAME: undefined,
PASSWORD: undefined,
HEADERS: undefined,
ENCODE_PATH: 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;
};

View File

@@ -1,7 +1,12 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import axios from "axios";
import type {
AxiosError,
AxiosRequestConfig,
AxiosResponse,
AxiosInstance,
} from "axios";
import FormData from "form-data";
import { ApiError } from "./ApiError";
import type { ApiRequestOptions } from "./ApiRequestOptions";
import type { ApiResult } from "./ApiResult";
@@ -9,22 +14,17 @@ import { CancelablePromise } from "./CancelablePromise";
import type { OnCancel } from "./CancelablePromise";
import type { OpenAPIConfig } from "./OpenAPI";
export const isDefined = <T>(
value: T | null | undefined,
): value is Exclude<T, null | undefined> => {
return value !== undefined && value !== null;
};
export const isString = (value: any): value is string => {
export const isString = (value: unknown): value is string => {
return typeof value === "string";
};
export const isStringWithValue = (value: any): value is string => {
export const isStringWithValue = (value: unknown): value is string => {
return isString(value) && value !== "";
};
export const isBlob = (value: any): value is Blob => {
return (
value !== null &&
typeof value === "object" &&
typeof value.type === "string" &&
typeof value.stream === "function" &&
@@ -32,14 +32,19 @@ export const isBlob = (value: any): value is Blob => {
typeof value.constructor === "function" &&
typeof value.constructor.name === "string" &&
/^(Blob|File)$/.test(value.constructor.name) &&
// @ts-ignore
/^(Blob|File)$/.test(value[Symbol.toStringTag])
);
};
export const isFormData = (value: any): value is FormData => {
export const isFormData = (value: unknown): value is FormData => {
return value instanceof FormData;
};
export const isSuccess = (status: number): boolean => {
return status >= 200 && status < 300;
};
export const base64 = (str: string): string => {
try {
return btoa(str);
@@ -49,38 +54,30 @@ export const base64 = (str: string): string => {
}
};
export const getQueryString = (params: Record<string, any>): string => {
export const getQueryString = (params: Record<string, unknown>): string => {
const qs: string[] = [];
const append = (key: string, value: any) => {
const append = (key: string, value: unknown) => {
qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
};
const process = (key: string, value: any) => {
if (isDefined(value)) {
if (Array.isArray(value)) {
value.forEach((v) => {
process(key, v);
});
} else if (typeof value === "object") {
Object.entries(value).forEach(([k, v]) => {
process(`${key}[${k}]`, v);
});
} else {
append(key, value);
}
const encodePair = (key: string, value: unknown) => {
if (value === undefined || value === null) {
return;
}
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));
} else {
append(key, value);
}
};
Object.entries(params).forEach(([key, value]) => {
process(key, value);
});
Object.entries(params).forEach(([key, value]) => encodePair(key, value));
if (qs.length > 0) {
return `?${qs.join("&")}`;
}
return "";
return qs.length ? `?${qs.join("&")}` : "";
};
const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {
@@ -95,11 +92,8 @@ const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {
return substring;
});
const url = `${config.BASE}${path}`;
if (options.query) {
return `${url}${getQueryString(options.query)}`;
}
return url;
const url = config.BASE + path;
return options.query ? url + getQueryString(options.query) : url;
};
export const getFormData = (
@@ -117,7 +111,7 @@ export const getFormData = (
};
Object.entries(options.formData)
.filter(([_, value]) => isDefined(value))
.filter(([_, value]) => value !== undefined && value !== null)
.forEach(([key, value]) => {
if (Array.isArray(value)) {
value.forEach((v) => process(key, v));
@@ -146,7 +140,8 @@ export const resolve = async <T>(
export const getHeaders = async (
config: OpenAPIConfig,
options: ApiRequestOptions,
): Promise<Headers> => {
formData?: FormData,
): Promise<Record<string, string>> => {
const [token, username, password, additionalHeaders] = await Promise.all([
resolve(options, config.TOKEN),
resolve(options, config.USERNAME),
@@ -154,12 +149,17 @@ export const getHeaders = async (
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]) => isDefined(value))
.filter(([_, value]) => value !== undefined && value !== null)
.reduce(
(headers, [key, value]) => ({
...headers,
@@ -189,59 +189,56 @@ export const getHeaders = async (
}
}
return new Headers(headers);
return headers;
};
export const getRequestBody = (options: ApiRequestOptions): any => {
if (options.body !== undefined) {
if (options.mediaType?.includes("/json")) {
return JSON.stringify(options.body);
} else if (
isString(options.body) ||
isBlob(options.body) ||
isFormData(options.body)
) {
return options.body;
} else {
return JSON.stringify(options.body);
}
export const getRequestBody = (options: ApiRequestOptions): unknown => {
if (options.body) {
return options.body;
}
return undefined;
};
export const sendRequest = async (
export const sendRequest = async <T>(
config: OpenAPIConfig,
options: ApiRequestOptions,
url: string,
body: any,
body: unknown,
formData: FormData | undefined,
headers: Headers,
headers: Record<string, string>,
onCancel: OnCancel,
): Promise<Response> => {
axiosClient: AxiosInstance,
): Promise<AxiosResponse<T>> => {
const controller = new AbortController();
const request: RequestInit = {
const requestConfig: AxiosRequestConfig = {
url,
headers,
body: body ?? formData,
data: body ?? formData,
method: options.method,
withCredentials: config.WITH_CREDENTIALS,
signal: controller.signal,
};
if (config.WITH_CREDENTIALS) {
request.credentials = config.CREDENTIALS;
}
onCancel(() => controller.abort());
return await fetch(url, request);
try {
return await axiosClient.request(requestConfig);
} catch (error) {
const axiosError = error as AxiosError<T>;
if (axiosError.response) {
return axiosError.response;
}
throw error;
}
};
export const getResponseHeader = (
response: Response,
response: AxiosResponse<unknown>,
responseHeader?: string,
): string | undefined => {
if (responseHeader) {
const content = response.headers.get(responseHeader);
const content = response.headers[responseHeader];
if (isString(content)) {
return content;
}
@@ -249,24 +246,9 @@ export const getResponseHeader = (
return undefined;
};
export const getResponseBody = async (response: Response): Promise<any> => {
export const getResponseBody = (response: AxiosResponse<unknown>): unknown => {
if (response.status !== 204) {
try {
const contentType = response.headers.get("Content-Type");
if (contentType) {
const jsonTypes = ["application/json", "application/problem+json"];
const isJSON = jsonTypes.some((type) =>
contentType.toLowerCase().startsWith(type),
);
if (isJSON) {
return await response.json();
} else {
return await response.text();
}
}
} catch (error) {
console.error(error);
}
return response.data;
}
return undefined;
};
@@ -314,22 +296,24 @@ export const catchErrorCodes = (
* Request method
* @param config The OpenAPI configuration object
* @param options The request options from the service
* @param axiosClient The axios client instance to use
* @returns CancelablePromise<T>
* @throws ApiError
*/
export const request = <T>(
config: OpenAPIConfig,
options: ApiRequestOptions,
axiosClient: AxiosInstance = axios,
): CancelablePromise<T> => {
return new CancelablePromise(async (resolve, reject, onCancel) => {
try {
const url = getUrl(config, options);
const formData = getFormData(options);
const body = getRequestBody(options);
const headers = await getHeaders(config, options);
const headers = await getHeaders(config, options, formData);
if (!onCancel.isCancelled) {
const response = await sendRequest(
const response = await sendRequest<T>(
config,
options,
url,
@@ -337,8 +321,9 @@ export const request = <T>(
formData,
headers,
onCancel,
axiosClient,
);
const responseBody = await getResponseBody(response);
const responseBody = getResponseBody(response);
const responseHeader = getResponseHeader(
response,
options.responseHeader,
@@ -346,7 +331,7 @@ export const request = <T>(
const result: ApiResult = {
url,
ok: response.ok,
ok: isSuccess(response.status),
status: response.status,
statusText: response.statusText,
body: responseHeader ?? responseBody,

14
www/app/api/core/types.ts Normal file
View File

@@ -0,0 +1,14 @@
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;
};

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export { OpenApi } from "./OpenApi";
export { ApiError } from "./core/ApiError";
@@ -35,4 +31,29 @@ 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";

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type AudioWaveform = {
data: Array<number>;
};

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post =
{
file: Blob;

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type CreateParticipant = {
speaker?: number | null;
name: string;

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type CreateTranscript = {
name: string;
source_language?: string;

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type DeletionStatus = {
status: string;
};

View File

@@ -1,8 +1,5 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { TranscriptParticipant } from "./TranscriptParticipant";
export type GetTranscript = {
id: string;
user_id: string | null;

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type GetTranscriptSegmentTopic = {
text: string;
start: number;

View File

@@ -1,8 +1,5 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { GetTranscriptSegmentTopic } from "./GetTranscriptSegmentTopic";
export type GetTranscriptTopic = {
id: string;
title: string;

View File

@@ -1,9 +1,6 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { GetTranscriptSegmentTopic } from "./GetTranscriptSegmentTopic";
import type { Word } from "./Word";
export type GetTranscriptTopicWithWords = {
id: string;
title: string;

View File

@@ -1,9 +1,6 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { GetTranscriptSegmentTopic } from "./GetTranscriptSegmentTopic";
import type { SpeakerWords } from "./SpeakerWords";
export type GetTranscriptTopicWithWordsPerSpeaker = {
id: string;
title: string;

View File

@@ -1,8 +1,5 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ValidationError } from "./ValidationError";
export type HTTPValidationError = {
detail?: Array<ValidationError>;
};

View File

@@ -1,8 +1,5 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { GetTranscript } from "./GetTranscript";
export type Page_GetTranscript_ = {
items: Array<GetTranscript>;
total: number;

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Participant = {
id: string;
speaker: number | null;

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type RtcOffer = {
sdp: string;
type: string;

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type SpeakerAssignment = {
speaker?: number | null;
participant?: string | null;

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type SpeakerAssignmentStatus = {
status: string;
};

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type SpeakerMerge = {
speaker_from: number;
speaker_to: number;

View File

@@ -1,8 +1,5 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Word } from "./Word";
export type SpeakerWords = {
speaker: number;
words: Array<Word>;

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type TranscriptParticipant = {
id?: string;
speaker: number | null;

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type UpdateParticipant = {
speaker?: number | null;
name?: string | null;

View File

@@ -1,8 +1,5 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { TranscriptParticipant } from "./TranscriptParticipant";
export type UpdateTranscript = {
name?: string | null;
locked?: boolean | null;

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type UserInfo = {
sub: string;
email: string | null;

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ValidationError = {
loc: Array<string | number>;
msg: string;

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Word = {
text: string;
start: number;

View File

@@ -1,520 +0,0 @@
/* tslint:disable */
/* eslint-disable */
/**
* FastAPI
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
export interface ConfigurationParameters {
basePath?: string; // override base path
fetchApi?: FetchAPI; // override for fetch implementation
middleware?: Middleware[]; // middleware to apply before/after fetch requests
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
accessToken?:
| string
| Promise<string>
| ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
}
export class Configuration {
constructor(private configuration: ConfigurationParameters = {}) {}
set config(configuration: Configuration) {
this.configuration = configuration;
}
get basePath(): string {
return this.configuration.basePath != null
? this.configuration.basePath
: BASE_PATH;
}
get fetchApi(): FetchAPI | undefined {
return this.configuration.fetchApi;
}
get middleware(): Middleware[] {
return this.configuration.middleware || [];
}
get queryParamsStringify(): (params: HTTPQuery) => string {
return this.configuration.queryParamsStringify || querystring;
}
get username(): string | undefined {
return this.configuration.username;
}
get password(): string | undefined {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === "function" ? apiKey : () => apiKey;
}
return undefined;
}
get accessToken():
| ((name?: string, scopes?: string[]) => string | Promise<string>)
| undefined {
const accessToken = this.configuration.accessToken;
if (accessToken) {
return typeof accessToken === "function"
? accessToken
: async () => accessToken;
}
return undefined;
}
get headers(): HTTPHeaders | undefined {
return this.configuration.headers;
}
get credentials(): RequestCredentials | undefined {
return this.configuration.credentials;
}
}
export const DefaultConfig = new Configuration();
/**
* This is the base class for all generated API classes.
*/
export class BaseAPI {
private static readonly jsonRegex = new RegExp(
"^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$",
"i",
);
private middleware: Middleware[];
constructor(protected configuration = DefaultConfig) {
this.middleware = configuration.middleware;
}
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]) {
const next = this.clone<T>();
next.middleware = next.middleware.concat(...middlewares);
return next;
}
withPreMiddleware<T extends BaseAPI>(
this: T,
...preMiddlewares: Array<Middleware["pre"]>
) {
const middlewares = preMiddlewares.map((pre) => ({ pre }));
return this.withMiddleware<T>(...middlewares);
}
withPostMiddleware<T extends BaseAPI>(
this: T,
...postMiddlewares: Array<Middleware["post"]>
) {
const middlewares = postMiddlewares.map((post) => ({ post }));
return this.withMiddleware<T>(...middlewares);
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
protected isJsonMime(mime: string | null | undefined): boolean {
if (!mime) {
return false;
}
return BaseAPI.jsonRegex.test(mime);
}
protected async request(
context: RequestOpts,
initOverrides?: RequestInit | InitOverrideFunction,
): Promise<Response> {
const { url, init } = await this.createFetchParams(context, initOverrides);
const response = await this.fetchApi(url, init);
if (response && response.status >= 200 && response.status < 300) {
return response;
}
throw new ResponseError(response, "Response returned an error code");
}
private async createFetchParams(
context: RequestOpts,
initOverrides?: RequestInit | InitOverrideFunction,
) {
let url = this.configuration.basePath + context.path;
if (
context.query !== undefined &&
Object.keys(context.query).length !== 0
) {
// only add the querystring to the URL if there are query parameters.
// this is done to avoid urls ending with a "?" character which buggy webservers
// do not handle correctly sometimes.
url += "?" + this.configuration.queryParamsStringify(context.query);
}
const headers = Object.assign(
{},
this.configuration.headers,
context.headers,
);
Object.keys(headers).forEach((key) =>
headers[key] === undefined ? delete headers[key] : {},
);
const initOverrideFn =
typeof initOverrides === "function"
? initOverrides
: async () => initOverrides;
const initParams = {
method: context.method,
headers,
body: context.body,
credentials: this.configuration.credentials,
};
const overriddenInit: RequestInit = {
...initParams,
...(await initOverrideFn({
init: initParams,
context,
})),
};
const init: RequestInit = {
...overriddenInit,
body:
isFormData(overriddenInit.body) ||
overriddenInit.body instanceof URLSearchParams ||
isBlob(overriddenInit.body)
? overriddenInit.body
: JSON.stringify(overriddenInit.body),
};
return { url, init };
}
private fetchApi = async (url: string, init: RequestInit) => {
let fetchParams = { url, init };
for (const middleware of this.middleware) {
if (middleware.pre) {
fetchParams =
(await middleware.pre({
fetch: this.fetchApi,
...fetchParams,
})) || fetchParams;
}
}
let response: Response | undefined = undefined;
try {
response = await (this.configuration.fetchApi || fetch)(
fetchParams.url,
fetchParams.init,
);
} catch (e) {
for (const middleware of this.middleware) {
if (middleware.onError) {
response =
(await middleware.onError({
fetch: this.fetchApi,
url: fetchParams.url,
init: fetchParams.init,
error: e,
response: response ? response.clone() : undefined,
})) || response;
}
}
if (response === undefined) {
if (e instanceof Error) {
throw new FetchError(
e,
"The request failed and the interceptors did not return an alternative response",
);
} else {
throw e;
}
}
}
for (const middleware of this.middleware) {
if (middleware.post) {
response =
(await middleware.post({
fetch: this.fetchApi,
url: fetchParams.url,
init: fetchParams.init,
response: response.clone(),
})) || response;
}
}
return response;
};
/**
* Create a shallow clone of `this` by constructing a new instance
* and then shallow cloning data members.
*/
private clone<T extends BaseAPI>(this: T): T {
const constructor = this.constructor as any;
const next = new constructor(this.configuration);
next.middleware = this.middleware.slice();
return next;
}
}
function isBlob(value: any): value is Blob {
return typeof Blob !== "undefined" && value instanceof Blob;
}
function isFormData(value: any): value is FormData {
return typeof FormData !== "undefined" && value instanceof FormData;
}
export class ResponseError extends Error {
override name: "ResponseError" = "ResponseError";
constructor(
public response: Response,
msg?: string,
) {
super(msg);
}
}
export class FetchError extends Error {
override name: "FetchError" = "FetchError";
constructor(
public cause: Error,
msg?: string,
) {
super(msg);
}
}
export class RequiredError extends Error {
override name: "RequiredError" = "RequiredError";
constructor(
public field: string,
msg?: string,
) {
super(msg);
}
}
export const COLLECTION_FORMATS = {
csv: ",",
ssv: " ",
tsv: "\t",
pipes: "|",
};
export type FetchAPI = WindowOrWorkerGlobalScope["fetch"];
export type Json = any;
export type HTTPMethod =
| "GET"
| "POST"
| "PUT"
| "PATCH"
| "DELETE"
| "OPTIONS"
| "HEAD";
export type HTTPHeaders = { [key: string]: string };
export type HTTPQuery = {
[key: string]:
| string
| number
| null
| boolean
| Array<string | number | null | boolean>
| Set<string | number | null | boolean>
| HTTPQuery;
};
export type HTTPBody = Json | FormData | URLSearchParams;
export type HTTPRequestInit = {
headers?: HTTPHeaders;
method: HTTPMethod;
credentials?: RequestCredentials;
body?: HTTPBody;
};
export type ModelPropertyNaming =
| "camelCase"
| "snake_case"
| "PascalCase"
| "original";
export type InitOverrideFunction = (requestContext: {
init: HTTPRequestInit;
context: RequestOpts;
}) => Promise<RequestInit>;
export interface FetchParams {
url: string;
init: RequestInit;
}
export interface RequestOpts {
path: string;
method: HTTPMethod;
headers: HTTPHeaders;
query?: HTTPQuery;
body?: HTTPBody;
}
export function exists(json: any, key: string) {
const value = json[key];
return value !== null && value !== undefined;
}
export function querystring(params: HTTPQuery, prefix: string = ""): string {
return Object.keys(params)
.map((key) => querystringSingleKey(key, params[key], prefix))
.filter((part) => part.length > 0)
.join("&");
}
function querystringSingleKey(
key: string,
value:
| string
| number
| null
| undefined
| boolean
| Array<string | number | null | boolean>
| Set<string | number | null | boolean>
| HTTPQuery,
keyPrefix: string = "",
): string {
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
if (value instanceof Array) {
const multiValue = value
.map((singleValue) => encodeURIComponent(String(singleValue)))
.join(`&${encodeURIComponent(fullKey)}=`);
return `${encodeURIComponent(fullKey)}=${multiValue}`;
}
if (value instanceof Set) {
const valueAsArray = Array.from(value);
return querystringSingleKey(key, valueAsArray, keyPrefix);
}
if (value instanceof Date) {
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(
value.toISOString(),
)}`;
}
if (value instanceof Object) {
return querystring(value as HTTPQuery, fullKey);
}
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
}
export function mapValues(data: any, fn: (item: any) => any) {
return Object.keys(data).reduce(
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
{},
);
}
export function canConsumeForm(consumes: Consume[]): boolean {
for (const consume of consumes) {
if ("multipart/form-data" === consume.contentType) {
return true;
}
}
return false;
}
export interface Consume {
contentType: string;
}
export interface RequestContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
}
export interface ResponseContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
response: Response;
}
export interface ErrorContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
error: unknown;
response?: Response;
}
export interface Middleware {
pre?(context: RequestContext): Promise<FetchParams | void>;
post?(context: ResponseContext): Promise<Response | void>;
onError?(context: ErrorContext): Promise<Response | void>;
}
export interface ApiResponse<T> {
raw: Response;
value(): Promise<T>;
}
export interface ResponseTransformer<T> {
(json: any): T;
}
export class JSONApiResponse<T> {
constructor(
public raw: Response,
private transformer: ResponseTransformer<T> = (jsonValue: any) => jsonValue,
) {}
async value(): Promise<T> {
return this.transformer(await this.raw.json());
}
}
export class VoidApiResponse {
constructor(public raw: Response) {}
async value(): Promise<void> {
return undefined;
}
}
export class BlobApiResponse {
constructor(public raw: Response) {}
async value(): Promise<Blob> {
return await this.raw.blob();
}
}
export class TextApiResponse {
constructor(public raw: Response) {}
async value(): Promise<string> {
return await this.raw.text();
}
}

View File

@@ -0,0 +1,11 @@
export const $AudioWaveform = {
properties: {
data: {
type: "array",
contains: {
type: "number",
},
isRequired: true,
},
},
} as const;

View File

@@ -0,0 +1,10 @@
export const $Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post =
{
properties: {
file: {
type: "binary",
isRequired: true,
format: "binary",
},
},
} as const;

View File

@@ -0,0 +1,19 @@
export const $CreateParticipant = {
properties: {
speaker: {
type: "any-of",
contains: [
{
type: "number",
},
{
type: "null",
},
],
},
name: {
type: "string",
isRequired: true,
},
},
} as const;

View File

@@ -0,0 +1,14 @@
export const $CreateTranscript = {
properties: {
name: {
type: "string",
isRequired: true,
},
source_language: {
type: "string",
},
target_language: {
type: "string",
},
},
} as const;

View File

@@ -0,0 +1,8 @@
export const $DeletionStatus = {
properties: {
status: {
type: "string",
isRequired: true,
},
},
} as const;

View File

@@ -0,0 +1,123 @@
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;

View File

@@ -0,0 +1,16 @@
export const $GetTranscriptSegmentTopic = {
properties: {
text: {
type: "string",
isRequired: true,
},
start: {
type: "number",
isRequired: true,
},
speaker: {
type: "number",
isRequired: true,
},
},
} as const;

View File

@@ -0,0 +1,42 @@
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;

View File

@@ -0,0 +1,48 @@
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;

View File

@@ -0,0 +1,48 @@
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;

View File

@@ -0,0 +1,10 @@
export const $HTTPValidationError = {
properties: {
detail: {
type: "array",
contains: {
type: "ValidationError",
},
},
},
} as const;

View File

@@ -0,0 +1,52 @@
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;

View File

@@ -0,0 +1,24 @@
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;

View File

@@ -0,0 +1,12 @@
export const $RtcOffer = {
properties: {
sdp: {
type: "string",
isRequired: true,
},
type: {
type: "string",
isRequired: true,
},
},
} as const;

View File

@@ -0,0 +1,34 @@
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;

View File

@@ -0,0 +1,8 @@
export const $SpeakerAssignmentStatus = {
properties: {
status: {
type: "string",
isRequired: true,
},
},
} as const;

View File

@@ -0,0 +1,12 @@
export const $SpeakerMerge = {
properties: {
speaker_from: {
type: "number",
isRequired: true,
},
speaker_to: {
type: "number",
isRequired: true,
},
},
} as const;

View File

@@ -0,0 +1,15 @@
export const $SpeakerWords = {
properties: {
speaker: {
type: "number",
isRequired: true,
},
words: {
type: "array",
contains: {
type: "Word",
},
isRequired: true,
},
},
} as const;

View File

@@ -0,0 +1,23 @@
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;

View File

@@ -0,0 +1,26 @@
export const $UpdateParticipant = {
properties: {
speaker: {
type: "any-of",
contains: [
{
type: "number",
},
{
type: "null",
},
],
},
name: {
type: "any-of",
contains: [
{
type: "string",
},
{
type: "null",
},
],
},
},
} as const;

View File

@@ -0,0 +1,95 @@
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;

View File

@@ -0,0 +1,32 @@
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;

View File

@@ -0,0 +1,27 @@
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;

View File

@@ -0,0 +1,19 @@
export const $Word = {
properties: {
text: {
type: "string",
isRequired: true,
},
start: {
type: "number",
isRequired: true,
},
end: {
type: "number",
isRequired: true,
},
speaker: {
type: "number",
},
},
} as const;

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { AudioWaveform } from "../models/AudioWaveform";
import type { Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post } from "../models/Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post";
import type { CreateParticipant } from "../models/CreateParticipant";
@@ -22,52 +18,138 @@ 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 any Successful Response
* @returns unknown Successful Response
* @throws ApiError
*/
public metrics(): CancelablePromise<any> {
public metrics(): CancelablePromise<unknown> {
return this.httpRequest.request({
method: "GET",
url: "/metrics",
});
}
/**
* Transcripts List
* @param page Page number
* @param size Page size
* @returns Page_GetTranscript_ Successful Response
* @throws ApiError
*/
public v1TranscriptsList(
page: number = 1,
size: number = 50,
data: TDataV1TranscriptsList = {},
): CancelablePromise<Page_GetTranscript_> {
const { page = 1, size = 50 } = data;
return this.httpRequest.request({
method: "GET",
url: "/v1/transcripts",
query: {
page: page,
size: size,
page,
size,
},
errors: {
422: `Validation Error`,
},
});
}
/**
* Transcripts Create
* @param requestBody
* @returns GetTranscript Successful Response
* @throws ApiError
*/
public v1TranscriptsCreate(
requestBody: CreateTranscript,
data: TDataV1TranscriptsCreate,
): CancelablePromise<GetTranscript> {
const { requestBody } = data;
return this.httpRequest.request({
method: "POST",
url: "/v1/transcripts",
@@ -78,15 +160,16 @@ export class DefaultService {
},
});
}
/**
* Transcript Get
* @param transcriptId
* @returns GetTranscript Successful Response
* @throws ApiError
*/
public v1TranscriptGet(
transcriptId: string,
data: TDataV1TranscriptGet,
): CancelablePromise<GetTranscript> {
const { transcriptId } = data;
return this.httpRequest.request({
method: "GET",
url: "/v1/transcripts/{transcript_id}",
@@ -98,17 +181,16 @@ export class DefaultService {
},
});
}
/**
* Transcript Update
* @param transcriptId
* @param requestBody
* @returns GetTranscript Successful Response
* @throws ApiError
*/
public v1TranscriptUpdate(
transcriptId: string,
requestBody: UpdateTranscript,
data: TDataV1TranscriptUpdate,
): CancelablePromise<GetTranscript> {
const { requestBody, transcriptId } = data;
return this.httpRequest.request({
method: "PATCH",
url: "/v1/transcripts/{transcript_id}",
@@ -122,15 +204,16 @@ export class DefaultService {
},
});
}
/**
* Transcript Delete
* @param transcriptId
* @returns DeletionStatus Successful Response
* @throws ApiError
*/
public v1TranscriptDelete(
transcriptId: string,
data: TDataV1TranscriptDelete,
): CancelablePromise<DeletionStatus> {
const { transcriptId } = data;
return this.httpRequest.request({
method: "DELETE",
url: "/v1/transcripts/{transcript_id}",
@@ -142,15 +225,16 @@ export class DefaultService {
},
});
}
/**
* Transcript Get Topics
* @param transcriptId
* @returns GetTranscriptTopic Successful Response
* @throws ApiError
*/
public v1TranscriptGetTopics(
transcriptId: string,
data: TDataV1TranscriptGetTopics,
): CancelablePromise<Array<GetTranscriptTopic>> {
const { transcriptId } = data;
return this.httpRequest.request({
method: "GET",
url: "/v1/transcripts/{transcript_id}/topics",
@@ -162,15 +246,16 @@ export class DefaultService {
},
});
}
/**
* Transcript Get Topics With Words
* @param transcriptId
* @returns GetTranscriptTopicWithWords Successful Response
* @throws ApiError
*/
public v1TranscriptGetTopicsWithWords(
transcriptId: string,
data: TDataV1TranscriptGetTopicsWithWords,
): CancelablePromise<Array<GetTranscriptTopicWithWords>> {
const { transcriptId } = data;
return this.httpRequest.request({
method: "GET",
url: "/v1/transcripts/{transcript_id}/topics/with-words",
@@ -182,17 +267,16 @@ export class DefaultService {
},
});
}
/**
* Transcript Get Topics With Words Per Speaker
* @param transcriptId
* @param topicId
* @returns GetTranscriptTopicWithWordsPerSpeaker Successful Response
* @throws ApiError
*/
public v1TranscriptGetTopicsWithWordsPerSpeaker(
transcriptId: string,
topicId: string,
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",
@@ -205,17 +289,16 @@ export class DefaultService {
},
});
}
/**
* Transcript Get Audio Mp3
* @param transcriptId
* @param token
* @returns any Successful Response
* @returns unknown Successful Response
* @throws ApiError
*/
public v1TranscriptHeadAudioMp3(
transcriptId: string,
token?: string | null,
): CancelablePromise<any> {
data: TDataV1TranscriptHeadAudioMp3,
): CancelablePromise<unknown> {
const { token, transcriptId } = data;
return this.httpRequest.request({
method: "HEAD",
url: "/v1/transcripts/{transcript_id}/audio/mp3",
@@ -223,24 +306,23 @@ export class DefaultService {
transcript_id: transcriptId,
},
query: {
token: token,
token,
},
errors: {
422: `Validation Error`,
},
});
}
/**
* Transcript Get Audio Mp3
* @param transcriptId
* @param token
* @returns any Successful Response
* @returns unknown Successful Response
* @throws ApiError
*/
public v1TranscriptGetAudioMp3(
transcriptId: string,
token?: string | null,
): CancelablePromise<any> {
data: TDataV1TranscriptGetAudioMp3,
): CancelablePromise<unknown> {
const { token, transcriptId } = data;
return this.httpRequest.request({
method: "GET",
url: "/v1/transcripts/{transcript_id}/audio/mp3",
@@ -248,22 +330,23 @@ export class DefaultService {
transcript_id: transcriptId,
},
query: {
token: token,
token,
},
errors: {
422: `Validation Error`,
},
});
}
/**
* Transcript Get Audio Waveform
* @param transcriptId
* @returns AudioWaveform Successful Response
* @throws ApiError
*/
public v1TranscriptGetAudioWaveform(
transcriptId: string,
data: TDataV1TranscriptGetAudioWaveform,
): CancelablePromise<AudioWaveform> {
const { transcriptId } = data;
return this.httpRequest.request({
method: "GET",
url: "/v1/transcripts/{transcript_id}/audio/waveform",
@@ -275,15 +358,16 @@ export class DefaultService {
},
});
}
/**
* Transcript Get Participants
* @param transcriptId
* @returns Participant Successful Response
* @throws ApiError
*/
public v1TranscriptGetParticipants(
transcriptId: string,
data: TDataV1TranscriptGetParticipants,
): CancelablePromise<Array<Participant>> {
const { transcriptId } = data;
return this.httpRequest.request({
method: "GET",
url: "/v1/transcripts/{transcript_id}/participants",
@@ -295,17 +379,16 @@ export class DefaultService {
},
});
}
/**
* Transcript Add Participant
* @param transcriptId
* @param requestBody
* @returns Participant Successful Response
* @throws ApiError
*/
public v1TranscriptAddParticipant(
transcriptId: string,
requestBody: CreateParticipant,
data: TDataV1TranscriptAddParticipant,
): CancelablePromise<Participant> {
const { requestBody, transcriptId } = data;
return this.httpRequest.request({
method: "POST",
url: "/v1/transcripts/{transcript_id}/participants",
@@ -319,17 +402,16 @@ export class DefaultService {
},
});
}
/**
* Transcript Get Participant
* @param transcriptId
* @param participantId
* @returns Participant Successful Response
* @throws ApiError
*/
public v1TranscriptGetParticipant(
transcriptId: string,
participantId: string,
data: TDataV1TranscriptGetParticipant,
): CancelablePromise<Participant> {
const { participantId, transcriptId } = data;
return this.httpRequest.request({
method: "GET",
url: "/v1/transcripts/{transcript_id}/participants/{participant_id}",
@@ -342,19 +424,16 @@ export class DefaultService {
},
});
}
/**
* Transcript Update Participant
* @param transcriptId
* @param participantId
* @param requestBody
* @returns Participant Successful Response
* @throws ApiError
*/
public v1TranscriptUpdateParticipant(
transcriptId: string,
participantId: string,
requestBody: UpdateParticipant,
data: TDataV1TranscriptUpdateParticipant,
): CancelablePromise<Participant> {
const { participantId, requestBody, transcriptId } = data;
return this.httpRequest.request({
method: "PATCH",
url: "/v1/transcripts/{transcript_id}/participants/{participant_id}",
@@ -369,17 +448,16 @@ export class DefaultService {
},
});
}
/**
* Transcript Delete Participant
* @param transcriptId
* @param participantId
* @returns DeletionStatus Successful Response
* @throws ApiError
*/
public v1TranscriptDeleteParticipant(
transcriptId: string,
participantId: string,
data: TDataV1TranscriptDeleteParticipant,
): CancelablePromise<DeletionStatus> {
const { participantId, transcriptId } = data;
return this.httpRequest.request({
method: "DELETE",
url: "/v1/transcripts/{transcript_id}/participants/{participant_id}",
@@ -392,17 +470,16 @@ export class DefaultService {
},
});
}
/**
* Transcript Assign Speaker
* @param transcriptId
* @param requestBody
* @returns SpeakerAssignmentStatus Successful Response
* @throws ApiError
*/
public v1TranscriptAssignSpeaker(
transcriptId: string,
requestBody: SpeakerAssignment,
data: TDataV1TranscriptAssignSpeaker,
): CancelablePromise<SpeakerAssignmentStatus> {
const { requestBody, transcriptId } = data;
return this.httpRequest.request({
method: "PATCH",
url: "/v1/transcripts/{transcript_id}/speaker/assign",
@@ -416,17 +493,16 @@ export class DefaultService {
},
});
}
/**
* Transcript Merge Speaker
* @param transcriptId
* @param requestBody
* @returns SpeakerAssignmentStatus Successful Response
* @throws ApiError
*/
public v1TranscriptMergeSpeaker(
transcriptId: string,
requestBody: SpeakerMerge,
data: TDataV1TranscriptMergeSpeaker,
): CancelablePromise<SpeakerAssignmentStatus> {
const { requestBody, transcriptId } = data;
return this.httpRequest.request({
method: "PATCH",
url: "/v1/transcripts/{transcript_id}/speaker/merge",
@@ -440,17 +516,16 @@ export class DefaultService {
},
});
}
/**
* Transcript Record Upload
* @param transcriptId
* @param formData
* @returns any Successful Response
* @returns unknown Successful Response
* @throws ApiError
*/
public v1TranscriptRecordUpload(
transcriptId: string,
formData: Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post,
): CancelablePromise<any> {
data: TDataV1TranscriptRecordUpload,
): CancelablePromise<unknown> {
const { formData, transcriptId } = data;
return this.httpRequest.request({
method: "POST",
url: "/v1/transcripts/{transcript_id}/record/upload",
@@ -464,15 +539,16 @@ export class DefaultService {
},
});
}
/**
* Transcript Get Websocket Events
* @param transcriptId
* @returns any Successful Response
* @returns unknown Successful Response
* @throws ApiError
*/
public v1TranscriptGetWebsocketEvents(
transcriptId: string,
): CancelablePromise<any> {
data: TDataV1TranscriptGetWebsocketEvents,
): CancelablePromise<unknown> {
const { transcriptId } = data;
return this.httpRequest.request({
method: "GET",
url: "/v1/transcripts/{transcript_id}/events",
@@ -484,17 +560,16 @@ export class DefaultService {
},
});
}
/**
* Transcript Record Webrtc
* @param transcriptId
* @param requestBody
* @returns any Successful Response
* @returns unknown Successful Response
* @throws ApiError
*/
public v1TranscriptRecordWebrtc(
transcriptId: string,
requestBody: RtcOffer,
): CancelablePromise<any> {
data: TDataV1TranscriptRecordWebrtc,
): CancelablePromise<unknown> {
const { requestBody, transcriptId } = data;
return this.httpRequest.request({
method: "POST",
url: "/v1/transcripts/{transcript_id}/record/webrtc",
@@ -508,9 +583,10 @@ export class DefaultService {
},
});
}
/**
* User Me
* @returns any Successful Response
* @returns unknown Successful Response
* @throws ApiError
*/
public v1UserMe(): CancelablePromise<UserInfo | null> {

View File

@@ -8,7 +8,7 @@
"start": "next start",
"lint": "next lint",
"format": "prettier --write .",
"openapi": "openapi --input http://127.0.0.1:1250/openapi.json --name OpenApi --output app/api && yarn format"
"openapi": "openapi-ts --input http://127.0.0.1:1250/openapi.json --name OpenApi --output app/api && yarn format"
},
"dependencies": {
"@chakra-ui/icons": "^2.1.1",
@@ -56,7 +56,7 @@
"license": "All Rights Reserved",
"devDependencies": {
"@types/react": "18.2.20",
"openapi-typescript-codegen": "^0.29.0",
"@hey-api/openapi-ts": "^0.27.24",
"prettier": "^3.0.0"
}
}

View File

@@ -12,10 +12,10 @@
resolved "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz"
integrity sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==
"@apidevtools/json-schema-ref-parser@^11.5.4":
version "11.6.4"
resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.6.4.tgz#0f3e02302f646471d621a8850e6a346d63c8ebd4"
integrity sha512-9K6xOqeevacvweLGik6LnZCb1fBtCOSIWQs8d096XGeqoLKC33UVMGz9+77Gw44KvbH4pKcQPWo4ZpxkXYj05w==
"@apidevtools/json-schema-ref-parser@11.5.4":
version "11.5.4"
resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.5.4.tgz#6a90caf2140834025cf72651280c46084de187ae"
integrity sha512-o2fsypTGU0WxRxbax8zQoHiIB4dyrkwYfcm8TxZ+bx9pCzcWZbQtiMqpgBvWA/nJ2TrGjK5adCLfTH8wUeU/Wg==
dependencies:
"@jsdevtools/ono" "^7.1.3"
"@types/json-schema" "^7.0.15"
@@ -1103,6 +1103,16 @@
dependencies:
prop-types "^15.8.1"
"@hey-api/openapi-ts@^0.27.24":
version "0.27.39"
resolved "https://registry.yarnpkg.com/@hey-api/openapi-ts/-/openapi-ts-0.27.39.tgz#130be15a33cda0ea04dc51166089b7eb77190479"
integrity sha512-sqcMU4QUR/KDwYYj6YlYwAwo8F3bm9Sy9PNwWZ8K/kVNMajtcFkWXDMygeGHaLEVE0zwxmYuO+mcSN+lTD5ZCQ==
dependencies:
"@apidevtools/json-schema-ref-parser" "11.5.4"
camelcase "8.0.0"
commander "12.0.0"
handlebars "4.7.8"
"@humanwhocodes/config-array@^0.11.13":
version "0.11.13"
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.13.tgz#075dc9684f40a531d9b26b0822153c1e832ee297"
@@ -1972,10 +1982,10 @@ camelcase-css@^2.0.1:
resolved "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz"
integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==
camelcase@^6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a"
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
camelcase@8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-8.0.0.tgz#c0d36d418753fb6ad9c5e0437579745c1c14a534"
integrity sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==
caniuse-lite@^1.0.30001406, caniuse-lite@^1.0.30001464, caniuse-lite@^1.0.30001503:
version "1.0.30001572"
@@ -2090,10 +2100,10 @@ comma-separated-tokens@^2.0.0:
resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz#4e89c9458acb61bc8fef19f4529973b2392839ee"
integrity sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==
commander@^12.0.0:
version "12.1.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3"
integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==
commander@12.0.0:
version "12.0.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-12.0.0.tgz#b929db6df8546080adfd004ab215ed48cf6f2592"
integrity sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==
commander@^4.0.0:
version "4.1.1"
@@ -2809,15 +2819,6 @@ framesync@6.1.2:
dependencies:
tslib "2.4.0"
fs-extra@^11.2.0:
version "11.2.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b"
integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==
dependencies:
graceful-fs "^4.2.0"
jsonfile "^6.0.1"
universalify "^2.0.0"
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
@@ -2997,7 +2998,7 @@ gopd@^1.0.1:
dependencies:
get-intrinsic "^1.1.3"
graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9:
graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9:
version "4.2.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
@@ -3007,7 +3008,7 @@ graphemer@^1.4.0:
resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6"
integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==
handlebars@^4.7.8:
handlebars@4.7.8:
version "4.7.8"
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9"
integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==
@@ -3473,15 +3474,6 @@ json5@^1.0.2:
dependencies:
minimist "^1.2.0"
jsonfile@^6.0.1:
version "6.1.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==
dependencies:
universalify "^2.0.0"
optionalDependencies:
graceful-fs "^4.1.6"
"jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.5:
version "3.3.5"
resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz#4766bd05a8e2a11af222becd19e15575e52a853a"
@@ -4059,17 +4051,6 @@ once@^1.3.0, once@^1.4.0:
dependencies:
wrappy "1"
openapi-typescript-codegen@^0.29.0:
version "0.29.0"
resolved "https://registry.yarnpkg.com/openapi-typescript-codegen/-/openapi-typescript-codegen-0.29.0.tgz#e98a1daa223ccdeb1cc51b2e2dc11bafae6fe746"
integrity sha512-/wC42PkD0LGjDTEULa/XiWQbv4E9NwLjwLjsaJ/62yOsoYhwvmBR31kPttn1DzQ2OlGe5stACcF/EIkZk43M6w==
dependencies:
"@apidevtools/json-schema-ref-parser" "^11.5.4"
camelcase "^6.3.0"
commander "^12.0.0"
fs-extra "^11.2.0"
handlebars "^4.7.8"
optionator@^0.9.3:
version "0.9.3"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64"
@@ -5100,11 +5081,6 @@ unist-util-visit@^5.0.0:
unist-util-is "^6.0.0"
unist-util-visit-parents "^6.0.0"
universalify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==
update-browserslist-db@^1.0.11:
version "1.0.11"
resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz"