From 0c27be4a4886c737e92590b76ab2a2ada82c3dbd Mon Sep 17 00:00:00 2001 From: Koper Date: Thu, 24 Aug 2023 14:02:09 +0700 Subject: [PATCH] Updated API --- www/app/api/apis/DefaultApi.ts | 32 ++++++++++++++++++++++++++ www/app/api/models/GetTranscript.ts | 9 ++++++++ www/app/api/models/UpdateTranscript.ts | 8 +++++++ 3 files changed, 49 insertions(+) diff --git a/www/app/api/apis/DefaultApi.ts b/www/app/api/apis/DefaultApi.ts index 947c64ed..7fdc25da 100644 --- a/www/app/api/apis/DefaultApi.ts +++ b/www/app/api/apis/DefaultApi.ts @@ -285,6 +285,14 @@ export class DefaultApi extends runtime.BaseAPI { 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`.replace( @@ -340,6 +348,14 @@ export class DefaultApi extends runtime.BaseAPI { 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( @@ -395,6 +411,14 @@ export class DefaultApi extends runtime.BaseAPI { 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}/topics`.replace( @@ -517,6 +541,14 @@ export class DefaultApi extends runtime.BaseAPI { headerParameters["Content-Type"] = "application/json"; + 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}/record/webrtc`.replace( diff --git a/www/app/api/models/GetTranscript.ts b/www/app/api/models/GetTranscript.ts index 36ec1451..5f242956 100644 --- a/www/app/api/models/GetTranscript.ts +++ b/www/app/api/models/GetTranscript.ts @@ -49,6 +49,12 @@ export interface GetTranscript { * @memberof GetTranscript */ duration: any | null; + /** + * + * @type {any} + * @memberof GetTranscript + */ + summary: any | null; /** * * @type {any} @@ -67,6 +73,7 @@ export function instanceOfGetTranscript(value: object): boolean { isInstance = isInstance && "status" in value; isInstance = isInstance && "locked" in value; isInstance = isInstance && "duration" in value; + isInstance = isInstance && "summary" in value; isInstance = isInstance && "createdAt" in value; return isInstance; @@ -89,6 +96,7 @@ export function GetTranscriptFromJSONTyped( status: json["status"], locked: json["locked"], duration: json["duration"], + summary: json["summary"], createdAt: json["created_at"], }; } @@ -106,6 +114,7 @@ export function GetTranscriptToJSON(value?: GetTranscript | null): any { status: value.status, locked: value.locked, duration: value.duration, + summary: value.summary, created_at: value.createdAt, }; } diff --git a/www/app/api/models/UpdateTranscript.ts b/www/app/api/models/UpdateTranscript.ts index 8f050146..f4e00ddb 100644 --- a/www/app/api/models/UpdateTranscript.ts +++ b/www/app/api/models/UpdateTranscript.ts @@ -31,6 +31,12 @@ export interface UpdateTranscript { * @memberof UpdateTranscript */ locked?: any | null; + /** + * + * @type {any} + * @memberof UpdateTranscript + */ + summary?: any | null; } /** @@ -56,6 +62,7 @@ export function UpdateTranscriptFromJSONTyped( return { name: !exists(json, "name") ? undefined : json["name"], locked: !exists(json, "locked") ? undefined : json["locked"], + summary: !exists(json, "summary") ? undefined : json["summary"], }; } @@ -69,5 +76,6 @@ export function UpdateTranscriptToJSON(value?: UpdateTranscript | null): any { return { name: value.name, locked: value.locked, + summary: value.summary, }; }