@@ -7,8 +7,8 @@ import { useSelector } from 'react-redux';
7
7
import {
8
8
osrdEditoastApi ,
9
9
type PathItemLocation ,
10
- type PostV2InfraByInfraIdPathPropertiesApiArg ,
11
- type PostV2InfraByInfraIdPathfindingBlocksApiArg ,
10
+ type PostInfraByInfraIdPathPropertiesApiArg ,
11
+ type PostInfraByInfraIdPathfindingBlocksApiArg ,
12
12
type RollingStockWithLiveries ,
13
13
type TrainScheduleResult ,
14
14
type PathfindingResult ,
@@ -131,13 +131,13 @@ const useSetupItineraryForTrainUpdate = (
131
131
const usingElectricalProfiles = useSelector ( getUsingElectricalProfiles ) ;
132
132
const dispatch = useAppDispatch ( ) ;
133
133
const osrdActions = useOsrdConfActions ( ) as OperationalStudiesConfSliceActions ;
134
- const [ getTrainScheduleById ] = osrdEditoastApi . endpoints . getV2TrainScheduleById . useLazyQuery ( { } ) ;
134
+ const [ getTrainScheduleById ] = osrdEditoastApi . endpoints . getTrainScheduleById . useLazyQuery ( { } ) ;
135
135
const [ getRollingStockByName ] =
136
136
osrdEditoastApi . endpoints . getRollingStockNameByRollingStockName . useLazyQuery ( ) ;
137
137
const [ postPathfindingBlocks ] =
138
- osrdEditoastApi . endpoints . postV2InfraByInfraIdPathfindingBlocks . useMutation ( ) ;
138
+ osrdEditoastApi . endpoints . postInfraByInfraIdPathfindingBlocks . useMutation ( ) ;
139
139
const [ postPathProperties ] =
140
- osrdEditoastApi . endpoints . postV2InfraByInfraIdPathProperties . useMutation ( ) ;
140
+ osrdEditoastApi . endpoints . postInfraByInfraIdPathProperties . useMutation ( ) ;
141
141
142
142
useEffect ( ( ) => {
143
143
const computeItineraryForTrainUpdate = async (
@@ -150,9 +150,9 @@ const useSetupItineraryForTrainUpdate = (
150
150
151
151
// TODO TS2 : Next part might not be needed (except to updePathSteps), we need inly trainSchedulePath and
152
152
// rolling stock infos to relaunch the pathfinding. Check for that in simulation results issue
153
- const params : PostV2InfraByInfraIdPathfindingBlocksApiArg = {
153
+ const params : PostInfraByInfraIdPathfindingBlocksApiArg = {
154
154
infraId,
155
- pathfindingInputV2 : {
155
+ pathfindingInput : {
156
156
path_items : trainSchedule . path . map ( ( item ) =>
157
157
omit ( item , [ 'id' , 'deleted' ] )
158
158
) as PathItemLocation [ ] ,
@@ -170,7 +170,7 @@ const useSetupItineraryForTrainUpdate = (
170
170
if ( pathfindingResult . status !== 'success' ) {
171
171
return null ;
172
172
}
173
- const pathPropertiesParams : PostV2InfraByInfraIdPathPropertiesApiArg = {
173
+ const pathPropertiesParams : PostInfraByInfraIdPathPropertiesApiArg = {
174
174
infraId,
175
175
props : [ 'electrifications' , 'geometry' , 'operational_points' ] ,
176
176
pathPropertiesInput : {
0 commit comments