fix: API types in the frontent

This commit is contained in:
wilson 2026-03-31 07:21:55 +01:00
parent 13911331a3
commit 43df46f26b
3 changed files with 11 additions and 46 deletions

View file

@ -1,2 +1,3 @@
# Makes a request to localhost:8000/openapi.json and saves the result in ./src/lib/openapi.json # Makes a request to localhost:8000/openapi.json and saves the result in ./src/lib/openapi.json
curl -o ./src/lib/openapi.json http://localhost:8000/openapi.json curl -o ./src/lib/openapi.json http://localhost:8000/openapi.json
pnpm openapi-ts:gen

View file

@ -28,6 +28,12 @@ export type ArticleDetail = {
* Source Body * Source Body
*/ */
source_body: string; source_body: string;
/**
* Source Body Pos
*/
source_body_pos: {
[key: string]: unknown;
};
/** /**
* Target Language * Target Language
*/ */
@ -53,7 +59,7 @@ export type ArticleDetail = {
*/ */
target_body_pos: { target_body_pos: {
[key: string]: unknown; [key: string]: unknown;
} | null; };
/** /**
* Target Body Transcript * Target Body Transcript
*/ */
@ -171,17 +177,9 @@ export type JobResponse = {
*/ */
status: string; status: string;
/** /**
* Source Language * Translated Article Id
*/ */
source_language: string; translated_article_id?: string | null;
/**
* Target Language
*/
target_language: string;
/**
* Complexity Level
*/
complexity_level: string;
/** /**
* Created At * Created At
*/ */
@ -194,40 +192,6 @@ export type JobResponse = {
* Completed At * Completed At
*/ */
completed_at?: string | null; completed_at?: string | null;
/**
* Generated Text
*/
generated_text?: string | null;
/**
* Generated Text Pos
*/
generated_text_pos?: {
[key: string]: unknown;
} | null;
/**
* Translated Text
*/
translated_text?: string | null;
/**
* Translated Text Pos
*/
translated_text_pos?: {
[key: string]: unknown;
} | null;
/**
* Input Summary
*/
input_summary?: string | null;
/**
* Audio Url
*/
audio_url?: string | null;
/**
* Audio Transcript
*/
audio_transcript?: {
[key: string]: unknown;
} | null;
/** /**
* Error Message * Error Message
*/ */

File diff suppressed because one or more lines are too long