mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
server: fix openapi generation with duplicate route for audio/mp3
This commit is contained in:
@@ -121,6 +121,11 @@ export interface V1TranscriptGetWebsocketEventsRequest {
|
||||
transcriptId: any;
|
||||
}
|
||||
|
||||
export interface V1TranscriptHeadAudioMp3Request {
|
||||
transcriptId: any;
|
||||
token?: any;
|
||||
}
|
||||
|
||||
export interface V1TranscriptMergeSpeakerRequest {
|
||||
transcriptId: any;
|
||||
speakerMerge: SpeakerMerge;
|
||||
@@ -1064,6 +1069,73 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Get Audio Mp3
|
||||
*/
|
||||
async v1TranscriptHeadAudioMp3Raw(
|
||||
requestParameters: V1TranscriptHeadAudioMp3Request,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<any>> {
|
||||
if (
|
||||
requestParameters.transcriptId === null ||
|
||||
requestParameters.transcriptId === undefined
|
||||
) {
|
||||
throw new runtime.RequiredError(
|
||||
"transcriptId",
|
||||
"Required parameter requestParameters.transcriptId was null or undefined when calling v1TranscriptHeadAudioMp3.",
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters.token !== undefined) {
|
||||
queryParameters["token"] = requestParameters.token;
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = await this.configuration.accessToken(
|
||||
"OAuth2AuthorizationCodeBearer",
|
||||
[],
|
||||
);
|
||||
}
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: `/v1/transcripts/{transcript_id}/audio/mp3`.replace(
|
||||
`{${"transcript_id"}}`,
|
||||
encodeURIComponent(String(requestParameters.transcriptId)),
|
||||
),
|
||||
method: "HEAD",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
if (this.isJsonMime(response.headers.get("content-type"))) {
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
} else {
|
||||
return new runtime.TextApiResponse(response) as any;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Get Audio Mp3
|
||||
*/
|
||||
async v1TranscriptHeadAudioMp3(
|
||||
requestParameters: V1TranscriptHeadAudioMp3Request,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<any> {
|
||||
const response = await this.v1TranscriptHeadAudioMp3Raw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Transcript Merge Speaker
|
||||
*/
|
||||
|
||||
@@ -103,6 +103,12 @@ export interface GetTranscript {
|
||||
* @memberof GetTranscript
|
||||
*/
|
||||
participants: any | null;
|
||||
/**
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof GetTranscript
|
||||
*/
|
||||
reviewed: any | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -123,6 +129,7 @@ export function instanceOfGetTranscript(value: object): boolean {
|
||||
isInstance = isInstance && "sourceLanguage" in value;
|
||||
isInstance = isInstance && "targetLanguage" in value;
|
||||
isInstance = isInstance && "participants" in value;
|
||||
isInstance = isInstance && "reviewed" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
@@ -153,6 +160,7 @@ export function GetTranscriptFromJSONTyped(
|
||||
sourceLanguage: json["source_language"],
|
||||
targetLanguage: json["target_language"],
|
||||
participants: json["participants"],
|
||||
reviewed: json["reviewed"],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -178,5 +186,6 @@ export function GetTranscriptToJSON(value?: GetTranscript | null): any {
|
||||
source_language: value.sourceLanguage,
|
||||
target_language: value.targetLanguage,
|
||||
participants: value.participants,
|
||||
reviewed: value.reviewed,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -61,6 +61,12 @@ export interface UpdateTranscript {
|
||||
* @memberof UpdateTranscript
|
||||
*/
|
||||
participants?: any | null;
|
||||
/**
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof UpdateTranscript
|
||||
*/
|
||||
reviewed?: any | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,6 +103,7 @@ export function UpdateTranscriptFromJSONTyped(
|
||||
participants: !exists(json, "participants")
|
||||
? undefined
|
||||
: json["participants"],
|
||||
reviewed: !exists(json, "reviewed") ? undefined : json["reviewed"],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -115,5 +122,6 @@ export function UpdateTranscriptToJSON(value?: UpdateTranscript | null): any {
|
||||
long_summary: value.longSummary,
|
||||
share_mode: value.shareMode,
|
||||
participants: value.participants,
|
||||
reviewed: value.reviewed,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user