diff --git a/mvp/client/src/generated/index.ts b/mvp/client/src/generated/index.ts index bd668b7..335638d 100644 --- a/mvp/client/src/generated/index.ts +++ b/mvp/client/src/generated/index.ts @@ -9,9 +9,10 @@ export type { OpenAPIConfig } from './core/OpenAPI'; export type { GameSessionDTO } from './models/GameSessionDTO'; export type { HTTPValidationError } from './models/HTTPValidationError'; -export type { MachineStats } from './models/MachineStats'; +export type { MachineState } from './models/MachineState'; export type { OperationalParameters } from './models/OperationalParameters'; export type { ValidationError } from './models/ValidationError'; export { DefaultService } from './services/DefaultService'; +export { MachineInterventionsService } from './services/MachineInterventionsService'; export { SessionsService } from './services/SessionsService'; diff --git a/mvp/client/src/generated/models/GameSessionDTO.ts b/mvp/client/src/generated/models/GameSessionDTO.ts index ac64298..4a6e01b 100644 --- a/mvp/client/src/generated/models/GameSessionDTO.ts +++ b/mvp/client/src/generated/models/GameSessionDTO.ts @@ -3,10 +3,10 @@ /* tslint:disable */ /* eslint-disable */ -import type { MachineStats } from './MachineStats'; +import type { MachineState } from './MachineState'; export type GameSessionDTO = { id: string; current_step: number; - machine_stats?: (MachineStats | null); + machine_state?: (MachineState | null); }; diff --git a/mvp/client/src/generated/models/MachineStats.ts b/mvp/client/src/generated/models/MachineState.ts similarity index 75% rename from mvp/client/src/generated/models/MachineStats.ts rename to mvp/client/src/generated/models/MachineState.ts index 4f45bfd..f292f9e 100644 --- a/mvp/client/src/generated/models/MachineStats.ts +++ b/mvp/client/src/generated/models/MachineState.ts @@ -5,8 +5,8 @@ import type { OperationalParameters } from './OperationalParameters'; -export type MachineStats = { +export type MachineState = { predicted_rul?: (number | null); health_percentage: number; - operational_parameters?: (OperationalParameters | null); + operational_parameters: OperationalParameters; }; diff --git a/mvp/client/src/generated/services/MachineInterventionsService.ts b/mvp/client/src/generated/services/MachineInterventionsService.ts new file mode 100644 index 0000000..3f95888 --- /dev/null +++ b/mvp/client/src/generated/services/MachineInterventionsService.ts @@ -0,0 +1,34 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { GameSessionDTO } from '../models/GameSessionDTO'; + +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; + +export class MachineInterventionsService { + + /** + * Do Maintenance + * @param sessionId + * @returns GameSessionDTO Successful Response + * @throws ApiError + */ + public static doMaintenanceSessionMachineInterventionsMaintenancePost( +sessionId: string, +): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/session/machine/interventions/maintenance', + query: { + 'session_id': sessionId, + }, + errors: { + 422: `Validation Error`, + }, + }); + } + +} diff --git a/mvp/client/src/routes/+page.svelte b/mvp/client/src/routes/+page.svelte index 38aed82..c0b40c8 100644 --- a/mvp/client/src/routes/+page.svelte +++ b/mvp/client/src/routes/+page.svelte @@ -1,5 +1,10 @@