diff --git a/www/app/[domain]/transcripts/[transcriptId]/correct/page.tsx b/www/app/[domain]/transcripts/[transcriptId]/correct/page.tsx index aab003f1..9eff7b60 100644 --- a/www/app/[domain]/transcripts/[transcriptId]/correct/page.tsx +++ b/www/app/[domain]/transcripts/[transcriptId]/correct/page.tsx @@ -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}`); }) diff --git a/www/app/[domain]/transcripts/[transcriptId]/correct/participantList.tsx b/www/app/[domain]/transcripts/[transcriptId]/correct/participantList.tsx index 9a00b61a..93979c53 100644 --- a/www/app/[domain]/transcripts/[transcriptId]/correct/participantList.tsx +++ b/www/app/[domain]/transcripts/[transcriptId]/correct/participantList.tsx @@ -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); diff --git a/www/app/[domain]/transcripts/[transcriptId]/finalSummary.tsx b/www/app/[domain]/transcripts/[transcriptId]/finalSummary.tsx index afde0aac..00f5dec7 100644 --- a/www/app/[domain]/transcripts/[transcriptId]/finalSummary.tsx +++ b/www/app/[domain]/transcripts/[transcriptId]/finalSummary.tsx @@ -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); diff --git a/www/app/[domain]/transcripts/createTranscript.ts b/www/app/[domain]/transcripts/createTranscript.ts index cf68498c..015c82de 100644 --- a/www/app/[domain]/transcripts/createTranscript.ts +++ b/www/app/[domain]/transcripts/createTranscript.ts @@ -24,7 +24,7 @@ const useCreateTranscript = (): UseCreateTranscript => { setLoading(true); api - .v1TranscriptsCreate(transcriptCreationDetails) + .v1TranscriptsCreate({ requestBody: transcriptCreationDetails }) .then((transcript) => { setTranscript(transcript); setLoading(false); diff --git a/www/app/[domain]/transcripts/fileUploadButton.tsx b/www/app/[domain]/transcripts/fileUploadButton.tsx index 2e25398d..419245e2 100644 --- a/www/app/[domain]/transcripts/fileUploadButton.tsx +++ b/www/app/[domain]/transcripts/fileUploadButton.tsx @@ -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, + }); } }; diff --git a/www/app/[domain]/transcripts/shareAndPrivacy.tsx b/www/app/[domain]/transcripts/shareAndPrivacy.tsx index 88ef661e..5bf53c3b 100644 --- a/www/app/[domain]/transcripts/shareAndPrivacy.tsx +++ b/www/app/[domain]/transcripts/shareAndPrivacy.tsx @@ -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, diff --git a/www/app/[domain]/transcripts/transcriptTitle.tsx b/www/app/[domain]/transcripts/transcriptTitle.tsx index 14ce7c97..5e103924 100644 --- a/www/app/[domain]/transcripts/transcriptTitle.tsx +++ b/www/app/[domain]/transcripts/transcriptTitle.tsx @@ -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); diff --git a/www/app/[domain]/transcripts/useParticipants.ts b/www/app/[domain]/transcripts/useParticipants.ts index d1a4b3e1..38f5aa35 100644 --- a/www/app/[domain]/transcripts/useParticipants.ts +++ b/www/app/[domain]/transcripts/useParticipants.ts @@ -49,7 +49,7 @@ const useParticipants = (transcriptId: string): UseParticipants => { setLoading(true); api - .v1TranscriptGetParticipants(transcriptId) + .v1TranscriptGetParticipants({ transcriptId }) .then((result) => { setResponse(result); setLoading(false); diff --git a/www/app/[domain]/transcripts/useTopicWithWords.ts b/www/app/[domain]/transcripts/useTopicWithWords.ts index eed618e4..29d0b982 100644 --- a/www/app/[domain]/transcripts/useTopicWithWords.ts +++ b/www/app/[domain]/transcripts/useTopicWithWords.ts @@ -56,7 +56,7 @@ const useTopicWithWords = ( setLoading(true); api - .v1TranscriptGetTopicsWithWordsPerSpeaker(transcriptId, topicId) + .v1TranscriptGetTopicsWithWordsPerSpeaker({ transcriptId, topicId }) .then((result) => { setResponse(result); setLoading(false); diff --git a/www/app/[domain]/transcripts/useTopics.ts b/www/app/[domain]/transcripts/useTopics.ts index 75864107..d0b0aaf4 100644 --- a/www/app/[domain]/transcripts/useTopics.ts +++ b/www/app/[domain]/transcripts/useTopics.ts @@ -23,7 +23,7 @@ const useTopics = (id: string): TranscriptTopics => { setLoading(true); api - .v1TranscriptGetTopics(id) + .v1TranscriptGetTopics({ transcriptId: id }) .then((result) => { setTopics(result); setLoading(false); diff --git a/www/app/[domain]/transcripts/useTranscript.ts b/www/app/[domain]/transcripts/useTranscript.ts index 5a8836ce..1e2d7ed0 100644 --- a/www/app/[domain]/transcripts/useTranscript.ts +++ b/www/app/[domain]/transcripts/useTranscript.ts @@ -37,7 +37,7 @@ const useTranscript = ( setLoading(true); api - .v1TranscriptGet(id) + .v1TranscriptGet({ transcriptId: id }) .then((result) => { setResponse(result); setLoading(false); diff --git a/www/app/[domain]/transcripts/useTranscriptList.ts b/www/app/[domain]/transcripts/useTranscriptList.ts index 1e55cf7a..378b3036 100644 --- a/www/app/[domain]/transcripts/useTranscriptList.ts +++ b/www/app/[domain]/transcripts/useTranscriptList.ts @@ -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); diff --git a/www/app/[domain]/transcripts/useWaveform.ts b/www/app/[domain]/transcripts/useWaveform.ts index 19291c93..3fbf2187 100644 --- a/www/app/[domain]/transcripts/useWaveform.ts +++ b/www/app/[domain]/transcripts/useWaveform.ts @@ -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); diff --git a/www/app/[domain]/transcripts/useWebRTC.ts b/www/app/[domain]/transcripts/useWebRTC.ts index a51b1c6f..9b4d57a0 100644 --- a/www/app/[domain]/transcripts/useWebRTC.ts +++ b/www/app/[domain]/transcripts/useWebRTC.ts @@ -41,7 +41,7 @@ const useWebRTC = ( }; api - .v1TranscriptRecordWebrtc(transcriptId, rtcOffer) + .v1TranscriptRecordWebrtc({ transcriptId, requestBody: rtcOffer }) .then((answer) => { try { p.signal(answer); diff --git a/www/app/[domain]/transcripts/useWebSockets.ts b/www/app/[domain]/transcripts/useWebSockets.ts index 94b988e9..4a7d1b38 100644 --- a/www/app/[domain]/transcripts/useWebSockets.ts +++ b/www/app/[domain]/transcripts/useWebSockets.ts @@ -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); diff --git a/www/app/api/.openapi-generator-ignore b/www/app/api/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/www/app/api/.openapi-generator-ignore +++ /dev/null @@ -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 diff --git a/www/app/api/.openapi-generator/FILES b/www/app/api/.openapi-generator/FILES deleted file mode 100644 index 0ba155bf..00000000 --- a/www/app/api/.openapi-generator/FILES +++ /dev/null @@ -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 diff --git a/www/app/api/.openapi-generator/VERSION b/www/app/api/.openapi-generator/VERSION deleted file mode 100644 index cd802a1e..00000000 --- a/www/app/api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/www/app/api/OpenApi.ts b/www/app/api/OpenApi.ts index a66a8146..19cbbf31 100644 --- a/www/app/api/OpenApi.ts +++ b/www/app/api/OpenApi.ts @@ -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, - 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); } } diff --git a/www/app/api/core/ApiError.ts b/www/app/api/core/ApiError.ts index 3335e5aa..1d07bb31 100644 --- a/www/app/api/core/ApiError.ts +++ b/www/app/api/core/ApiError.ts @@ -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( diff --git a/www/app/api/core/ApiRequestOptions.ts b/www/app/api/core/ApiRequestOptions.ts index 13f2bdf6..28e1917c 100644 --- a/www/app/api/core/ApiRequestOptions.ts +++ b/www/app/api/core/ApiRequestOptions.ts @@ -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; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; + readonly path?: Record; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; readonly body?: any; readonly mediaType?: string; readonly responseHeader?: string; diff --git a/www/app/api/core/ApiResult.ts b/www/app/api/core/ApiResult.ts index 24c93fc1..05040ba8 100644 --- a/www/app/api/core/ApiResult.ts +++ b/www/app/api/core/ApiResult.ts @@ -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 = { + readonly body: TData; readonly ok: boolean; readonly status: number; readonly statusText: string; - readonly body: any; + readonly url: string; }; diff --git a/www/app/api/core/FetchHttpRequest.ts b/www/app/api/core/AxiosHttpRequest.ts similarity index 76% rename from www/app/api/core/FetchHttpRequest.ts rename to www/app/api/core/AxiosHttpRequest.ts index 63da86ca..5cd27cda 100644 --- a/www/app/api/core/FetchHttpRequest.ts +++ b/www/app/api/core/AxiosHttpRequest.ts @@ -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); } diff --git a/www/app/api/core/BaseHttpRequest.ts b/www/app/api/core/BaseHttpRequest.ts index 29c8c164..cf68a62a 100644 --- a/www/app/api/core/BaseHttpRequest.ts +++ b/www/app/api/core/BaseHttpRequest.ts @@ -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"; diff --git a/www/app/api/core/CancelablePromise.ts b/www/app/api/core/CancelablePromise.ts index 442c2beb..b1ebd8ca 100644 --- a/www/app/api/core/CancelablePromise.ts +++ b/www/app/api/core/CancelablePromise.ts @@ -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 implements Promise { readonly #cancelHandlers: (() => void)[]; readonly #promise: Promise; #resolve?: (value: T | PromiseLike) => void; - #reject?: (reason?: any) => void; + #reject?: (reason?: unknown) => void; constructor( executor: ( resolve: (value: T | PromiseLike) => void, - reject: (reason?: any) => void, + reject: (reason?: unknown) => void, onCancel: OnCancel, ) => void, ) { @@ -53,7 +49,7 @@ export class CancelablePromise implements Promise { 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 implements Promise { public then( onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: any) => TResult2 | PromiseLike) | null, + onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null, ): Promise { return this.#promise.then(onFulfilled, onRejected); } public catch( - onRejected?: ((reason: any) => TResult | PromiseLike) | null, + onRejected?: ((reason: unknown) => TResult | PromiseLike) | null, ): Promise { return this.#promise.catch(onRejected); } diff --git a/www/app/api/core/OpenAPI.ts b/www/app/api/core/OpenAPI.ts index d8b7da6b..2749e631 100644 --- a/www/app/api/core/OpenAPI.ts +++ b/www/app/api/core/OpenAPI.ts @@ -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 = (options: ApiRequestOptions) => Promise; type Headers = Record; export type OpenAPIConfig = { BASE: string; - VERSION: string; - WITH_CREDENTIALS: boolean; CREDENTIALS: "include" | "omit" | "same-origin"; + ENCODE_PATH?: ((path: string) => string) | undefined; + HEADERS?: Headers | Resolver | undefined; + PASSWORD?: string | Resolver | undefined; + RESULT?: TResult; TOKEN?: string | Resolver | undefined; USERNAME?: string | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - HEADERS?: Headers | Resolver | 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 = ( + config: OpenAPIConfig, + overrides: TConfig, +) => { + 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; }; diff --git a/www/app/api/core/request.ts b/www/app/api/core/request.ts index ab66380a..c750d804 100644 --- a/www/app/api/core/request.ts +++ b/www/app/api/core/request.ts @@ -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 = ( - value: T | null | undefined, -): value is Exclude => { - 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 => { +export const getQueryString = (params: Record): 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 ( export const getHeaders = async ( config: OpenAPIConfig, options: ApiRequestOptions, -): Promise => { + formData?: FormData, +): Promise> => { 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 ( config: OpenAPIConfig, options: ApiRequestOptions, url: string, - body: any, + body: unknown, formData: FormData | undefined, - headers: Headers, + headers: Record, onCancel: OnCancel, -): Promise => { + axiosClient: AxiosInstance, +): Promise> => { 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; + if (axiosError.response) { + return axiosError.response; + } + throw error; + } }; export const getResponseHeader = ( - response: Response, + response: AxiosResponse, 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 => { +export const getResponseBody = (response: AxiosResponse): 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 * @throws ApiError */ export const request = ( config: OpenAPIConfig, options: ApiRequestOptions, + axiosClient: AxiosInstance = axios, ): CancelablePromise => { 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( config, options, url, @@ -337,8 +321,9 @@ export const request = ( 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 = ( const result: ApiResult = { url, - ok: response.ok, + ok: isSuccess(response.status), status: response.status, statusText: response.statusText, body: responseHeader ?? responseBody, diff --git a/www/app/api/core/types.ts b/www/app/api/core/types.ts new file mode 100644 index 00000000..8e915c44 --- /dev/null +++ b/www/app/api/core/types.ts @@ -0,0 +1,14 @@ +import type { ApiResult } from "./ApiResult"; + +export type TResult = "body" | "raw"; + +export type TApiResponse = Exclude< + T, + "raw" +> extends never + ? ApiResult + : ApiResult["body"]; + +export type TConfig = { + _result?: T; +}; diff --git a/www/app/api/index.ts b/www/app/api/index.ts index 6eed94cc..0d54a439 100644 --- a/www/app/api/index.ts +++ b/www/app/api/index.ts @@ -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"; diff --git a/www/app/api/models/AudioWaveform.ts b/www/app/api/models/AudioWaveform.ts index f48cc681..60dd57ec 100644 --- a/www/app/api/models/AudioWaveform.ts +++ b/www/app/api/models/AudioWaveform.ts @@ -1,7 +1,3 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ export type AudioWaveform = { data: Array; }; diff --git a/www/app/api/models/Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post.ts b/www/app/api/models/Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post.ts index b89d4e7e..b313fa1b 100644 --- a/www/app/api/models/Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post.ts +++ b/www/app/api/models/Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post.ts @@ -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; diff --git a/www/app/api/models/CreateParticipant.ts b/www/app/api/models/CreateParticipant.ts index bf1116b2..0d7f1950 100644 --- a/www/app/api/models/CreateParticipant.ts +++ b/www/app/api/models/CreateParticipant.ts @@ -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; diff --git a/www/app/api/models/CreateTranscript.ts b/www/app/api/models/CreateTranscript.ts index cf69f201..32fd6a1b 100644 --- a/www/app/api/models/CreateTranscript.ts +++ b/www/app/api/models/CreateTranscript.ts @@ -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; diff --git a/www/app/api/models/DeletionStatus.ts b/www/app/api/models/DeletionStatus.ts index 0a7a8373..9bd016e0 100644 --- a/www/app/api/models/DeletionStatus.ts +++ b/www/app/api/models/DeletionStatus.ts @@ -1,7 +1,3 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ export type DeletionStatus = { status: string; }; diff --git a/www/app/api/models/GetTranscript.ts b/www/app/api/models/GetTranscript.ts index d5f76dce..b755d62a 100644 --- a/www/app/api/models/GetTranscript.ts +++ b/www/app/api/models/GetTranscript.ts @@ -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; diff --git a/www/app/api/models/GetTranscriptSegmentTopic.ts b/www/app/api/models/GetTranscriptSegmentTopic.ts index bb648d46..bba84fb7 100644 --- a/www/app/api/models/GetTranscriptSegmentTopic.ts +++ b/www/app/api/models/GetTranscriptSegmentTopic.ts @@ -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; diff --git a/www/app/api/models/GetTranscriptTopic.ts b/www/app/api/models/GetTranscriptTopic.ts index 14d63dc2..808c825a 100644 --- a/www/app/api/models/GetTranscriptTopic.ts +++ b/www/app/api/models/GetTranscriptTopic.ts @@ -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; diff --git a/www/app/api/models/GetTranscriptTopicWithWords.ts b/www/app/api/models/GetTranscriptTopicWithWords.ts index 49f242d6..ffc0cd5f 100644 --- a/www/app/api/models/GetTranscriptTopicWithWords.ts +++ b/www/app/api/models/GetTranscriptTopicWithWords.ts @@ -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; diff --git a/www/app/api/models/GetTranscriptTopicWithWordsPerSpeaker.ts b/www/app/api/models/GetTranscriptTopicWithWordsPerSpeaker.ts index 99fb96e6..c77bfe9a 100644 --- a/www/app/api/models/GetTranscriptTopicWithWordsPerSpeaker.ts +++ b/www/app/api/models/GetTranscriptTopicWithWordsPerSpeaker.ts @@ -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; diff --git a/www/app/api/models/HTTPValidationError.ts b/www/app/api/models/HTTPValidationError.ts index 11c031ec..e12e0ef9 100644 --- a/www/app/api/models/HTTPValidationError.ts +++ b/www/app/api/models/HTTPValidationError.ts @@ -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; }; diff --git a/www/app/api/models/Page_GetTranscript_.ts b/www/app/api/models/Page_GetTranscript_.ts index e105580e..bff594b2 100644 --- a/www/app/api/models/Page_GetTranscript_.ts +++ b/www/app/api/models/Page_GetTranscript_.ts @@ -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; total: number; diff --git a/www/app/api/models/Participant.ts b/www/app/api/models/Participant.ts index 7f08f43e..90b07edf 100644 --- a/www/app/api/models/Participant.ts +++ b/www/app/api/models/Participant.ts @@ -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; diff --git a/www/app/api/models/RtcOffer.ts b/www/app/api/models/RtcOffer.ts index c6ef6f66..38d0e205 100644 --- a/www/app/api/models/RtcOffer.ts +++ b/www/app/api/models/RtcOffer.ts @@ -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; diff --git a/www/app/api/models/SpeakerAssignment.ts b/www/app/api/models/SpeakerAssignment.ts index c7c4032f..3ba7c28a 100644 --- a/www/app/api/models/SpeakerAssignment.ts +++ b/www/app/api/models/SpeakerAssignment.ts @@ -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; diff --git a/www/app/api/models/SpeakerAssignmentStatus.ts b/www/app/api/models/SpeakerAssignmentStatus.ts index 6b8c98df..645cd97d 100644 --- a/www/app/api/models/SpeakerAssignmentStatus.ts +++ b/www/app/api/models/SpeakerAssignmentStatus.ts @@ -1,7 +1,3 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ export type SpeakerAssignmentStatus = { status: string; }; diff --git a/www/app/api/models/SpeakerMerge.ts b/www/app/api/models/SpeakerMerge.ts index 1bebc68f..8c0c9df2 100644 --- a/www/app/api/models/SpeakerMerge.ts +++ b/www/app/api/models/SpeakerMerge.ts @@ -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; diff --git a/www/app/api/models/SpeakerWords.ts b/www/app/api/models/SpeakerWords.ts index 99a73737..22e5d490 100644 --- a/www/app/api/models/SpeakerWords.ts +++ b/www/app/api/models/SpeakerWords.ts @@ -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; diff --git a/www/app/api/models/TranscriptParticipant.ts b/www/app/api/models/TranscriptParticipant.ts index babcb686..77c0479d 100644 --- a/www/app/api/models/TranscriptParticipant.ts +++ b/www/app/api/models/TranscriptParticipant.ts @@ -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; diff --git a/www/app/api/models/UpdateParticipant.ts b/www/app/api/models/UpdateParticipant.ts index cce7b226..86bec423 100644 --- a/www/app/api/models/UpdateParticipant.ts +++ b/www/app/api/models/UpdateParticipant.ts @@ -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; diff --git a/www/app/api/models/UpdateTranscript.ts b/www/app/api/models/UpdateTranscript.ts index 07c00113..824e5edb 100644 --- a/www/app/api/models/UpdateTranscript.ts +++ b/www/app/api/models/UpdateTranscript.ts @@ -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; diff --git a/www/app/api/models/UserInfo.ts b/www/app/api/models/UserInfo.ts index 4f8c888f..ad05efae 100644 --- a/www/app/api/models/UserInfo.ts +++ b/www/app/api/models/UserInfo.ts @@ -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; diff --git a/www/app/api/models/ValidationError.ts b/www/app/api/models/ValidationError.ts index aa015bfd..03252ff0 100644 --- a/www/app/api/models/ValidationError.ts +++ b/www/app/api/models/ValidationError.ts @@ -1,7 +1,3 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ export type ValidationError = { loc: Array; msg: string; diff --git a/www/app/api/models/Word.ts b/www/app/api/models/Word.ts index e0ebf7d8..be83d3e1 100644 --- a/www/app/api/models/Word.ts +++ b/www/app/api/models/Word.ts @@ -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; diff --git a/www/app/api/runtime.ts b/www/app/api/runtime.ts deleted file mode 100644 index 6a4bc1f8..00000000 --- a/www/app/api/runtime.ts +++ /dev/null @@ -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 - | ((name?: string, scopes?: string[]) => string | Promise); // 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) - | 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(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware( - this: T, - ...preMiddlewares: Array - ) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware( - this: T, - ...postMiddlewares: Array - ) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...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 { - 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(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 - | Set - | 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; - -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 - | Set - | 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; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; -} - -export interface ApiResponse { - raw: Response; - value(): Promise; -} - -export interface ResponseTransformer { - (json: any): T; -} - -export class JSONApiResponse { - constructor( - public raw: Response, - private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, - ) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } -} - -export class VoidApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return undefined; - } -} - -export class BlobApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return await this.raw.blob(); - } -} - -export class TextApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return await this.raw.text(); - } -} diff --git a/www/app/api/schemas/$AudioWaveform.ts b/www/app/api/schemas/$AudioWaveform.ts new file mode 100644 index 00000000..cfa2964f --- /dev/null +++ b/www/app/api/schemas/$AudioWaveform.ts @@ -0,0 +1,11 @@ +export const $AudioWaveform = { + properties: { + data: { + type: "array", + contains: { + type: "number", + }, + isRequired: true, + }, + }, +} as const; diff --git a/www/app/api/schemas/$Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post.ts b/www/app/api/schemas/$Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post.ts new file mode 100644 index 00000000..60678cca --- /dev/null +++ b/www/app/api/schemas/$Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post.ts @@ -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; diff --git a/www/app/api/schemas/$CreateParticipant.ts b/www/app/api/schemas/$CreateParticipant.ts new file mode 100644 index 00000000..acb580e8 --- /dev/null +++ b/www/app/api/schemas/$CreateParticipant.ts @@ -0,0 +1,19 @@ +export const $CreateParticipant = { + properties: { + speaker: { + type: "any-of", + contains: [ + { + type: "number", + }, + { + type: "null", + }, + ], + }, + name: { + type: "string", + isRequired: true, + }, + }, +} as const; diff --git a/www/app/api/schemas/$CreateTranscript.ts b/www/app/api/schemas/$CreateTranscript.ts new file mode 100644 index 00000000..5e0baef5 --- /dev/null +++ b/www/app/api/schemas/$CreateTranscript.ts @@ -0,0 +1,14 @@ +export const $CreateTranscript = { + properties: { + name: { + type: "string", + isRequired: true, + }, + source_language: { + type: "string", + }, + target_language: { + type: "string", + }, + }, +} as const; diff --git a/www/app/api/schemas/$DeletionStatus.ts b/www/app/api/schemas/$DeletionStatus.ts new file mode 100644 index 00000000..a2afbfb6 --- /dev/null +++ b/www/app/api/schemas/$DeletionStatus.ts @@ -0,0 +1,8 @@ +export const $DeletionStatus = { + properties: { + status: { + type: "string", + isRequired: true, + }, + }, +} as const; diff --git a/www/app/api/schemas/$GetTranscript.ts b/www/app/api/schemas/$GetTranscript.ts new file mode 100644 index 00000000..7ff805e7 --- /dev/null +++ b/www/app/api/schemas/$GetTranscript.ts @@ -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; diff --git a/www/app/api/schemas/$GetTranscriptSegmentTopic.ts b/www/app/api/schemas/$GetTranscriptSegmentTopic.ts new file mode 100644 index 00000000..c7cb3cd5 --- /dev/null +++ b/www/app/api/schemas/$GetTranscriptSegmentTopic.ts @@ -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; diff --git a/www/app/api/schemas/$GetTranscriptTopic.ts b/www/app/api/schemas/$GetTranscriptTopic.ts new file mode 100644 index 00000000..36456769 --- /dev/null +++ b/www/app/api/schemas/$GetTranscriptTopic.ts @@ -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; diff --git a/www/app/api/schemas/$GetTranscriptTopicWithWords.ts b/www/app/api/schemas/$GetTranscriptTopicWithWords.ts new file mode 100644 index 00000000..252ac3cb --- /dev/null +++ b/www/app/api/schemas/$GetTranscriptTopicWithWords.ts @@ -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; diff --git a/www/app/api/schemas/$GetTranscriptTopicWithWordsPerSpeaker.ts b/www/app/api/schemas/$GetTranscriptTopicWithWordsPerSpeaker.ts new file mode 100644 index 00000000..25164f7b --- /dev/null +++ b/www/app/api/schemas/$GetTranscriptTopicWithWordsPerSpeaker.ts @@ -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; diff --git a/www/app/api/schemas/$HTTPValidationError.ts b/www/app/api/schemas/$HTTPValidationError.ts new file mode 100644 index 00000000..dd7ec8af --- /dev/null +++ b/www/app/api/schemas/$HTTPValidationError.ts @@ -0,0 +1,10 @@ +export const $HTTPValidationError = { + properties: { + detail: { + type: "array", + contains: { + type: "ValidationError", + }, + }, + }, +} as const; diff --git a/www/app/api/schemas/$Page_GetTranscript_.ts b/www/app/api/schemas/$Page_GetTranscript_.ts new file mode 100644 index 00000000..d692773a --- /dev/null +++ b/www/app/api/schemas/$Page_GetTranscript_.ts @@ -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; diff --git a/www/app/api/schemas/$Participant.ts b/www/app/api/schemas/$Participant.ts new file mode 100644 index 00000000..25b6c710 --- /dev/null +++ b/www/app/api/schemas/$Participant.ts @@ -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; diff --git a/www/app/api/schemas/$RtcOffer.ts b/www/app/api/schemas/$RtcOffer.ts new file mode 100644 index 00000000..b5ec33a1 --- /dev/null +++ b/www/app/api/schemas/$RtcOffer.ts @@ -0,0 +1,12 @@ +export const $RtcOffer = { + properties: { + sdp: { + type: "string", + isRequired: true, + }, + type: { + type: "string", + isRequired: true, + }, + }, +} as const; diff --git a/www/app/api/schemas/$SpeakerAssignment.ts b/www/app/api/schemas/$SpeakerAssignment.ts new file mode 100644 index 00000000..869f407a --- /dev/null +++ b/www/app/api/schemas/$SpeakerAssignment.ts @@ -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; diff --git a/www/app/api/schemas/$SpeakerAssignmentStatus.ts b/www/app/api/schemas/$SpeakerAssignmentStatus.ts new file mode 100644 index 00000000..e8aa81e0 --- /dev/null +++ b/www/app/api/schemas/$SpeakerAssignmentStatus.ts @@ -0,0 +1,8 @@ +export const $SpeakerAssignmentStatus = { + properties: { + status: { + type: "string", + isRequired: true, + }, + }, +} as const; diff --git a/www/app/api/schemas/$SpeakerMerge.ts b/www/app/api/schemas/$SpeakerMerge.ts new file mode 100644 index 00000000..fc662b8f --- /dev/null +++ b/www/app/api/schemas/$SpeakerMerge.ts @@ -0,0 +1,12 @@ +export const $SpeakerMerge = { + properties: { + speaker_from: { + type: "number", + isRequired: true, + }, + speaker_to: { + type: "number", + isRequired: true, + }, + }, +} as const; diff --git a/www/app/api/schemas/$SpeakerWords.ts b/www/app/api/schemas/$SpeakerWords.ts new file mode 100644 index 00000000..a9c45af7 --- /dev/null +++ b/www/app/api/schemas/$SpeakerWords.ts @@ -0,0 +1,15 @@ +export const $SpeakerWords = { + properties: { + speaker: { + type: "number", + isRequired: true, + }, + words: { + type: "array", + contains: { + type: "Word", + }, + isRequired: true, + }, + }, +} as const; diff --git a/www/app/api/schemas/$TranscriptParticipant.ts b/www/app/api/schemas/$TranscriptParticipant.ts new file mode 100644 index 00000000..d9f16714 --- /dev/null +++ b/www/app/api/schemas/$TranscriptParticipant.ts @@ -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; diff --git a/www/app/api/schemas/$UpdateParticipant.ts b/www/app/api/schemas/$UpdateParticipant.ts new file mode 100644 index 00000000..97352e58 --- /dev/null +++ b/www/app/api/schemas/$UpdateParticipant.ts @@ -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; diff --git a/www/app/api/schemas/$UpdateTranscript.ts b/www/app/api/schemas/$UpdateTranscript.ts new file mode 100644 index 00000000..b3d5fb07 --- /dev/null +++ b/www/app/api/schemas/$UpdateTranscript.ts @@ -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; diff --git a/www/app/api/schemas/$UserInfo.ts b/www/app/api/schemas/$UserInfo.ts new file mode 100644 index 00000000..b1d406f4 --- /dev/null +++ b/www/app/api/schemas/$UserInfo.ts @@ -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; diff --git a/www/app/api/schemas/$ValidationError.ts b/www/app/api/schemas/$ValidationError.ts new file mode 100644 index 00000000..ee241461 --- /dev/null +++ b/www/app/api/schemas/$ValidationError.ts @@ -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; diff --git a/www/app/api/schemas/$Word.ts b/www/app/api/schemas/$Word.ts new file mode 100644 index 00000000..f69fba99 --- /dev/null +++ b/www/app/api/schemas/$Word.ts @@ -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; diff --git a/www/app/api/services/DefaultService.ts b/www/app/api/services/DefaultService.ts index 6452d5e5..fe6092e9 100644 --- a/www/app/api/services/DefaultService.ts +++ b/www/app/api/services/DefaultService.ts @@ -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 { + public metrics(): CancelablePromise { 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 { + 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 { + 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 { + 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 { + 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 { + 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> { + 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> { + 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 { + 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 { + data: TDataV1TranscriptHeadAudioMp3, + ): CancelablePromise { + 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 { + data: TDataV1TranscriptGetAudioMp3, + ): CancelablePromise { + 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 { + 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> { + 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 { + 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 { + 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 { + 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 { + 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 { + 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 { + 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 { + data: TDataV1TranscriptRecordUpload, + ): CancelablePromise { + 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 { + data: TDataV1TranscriptGetWebsocketEvents, + ): CancelablePromise { + 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 { + data: TDataV1TranscriptRecordWebrtc, + ): CancelablePromise { + 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 { diff --git a/www/package.json b/www/package.json index 37a15374..ba3b3f83 100644 --- a/www/package.json +++ b/www/package.json @@ -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" } } diff --git a/www/yarn.lock b/www/yarn.lock index 9f2317bf..51e9c96d 100644 --- a/www/yarn.lock +++ b/www/yarn.lock @@ -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"