import * as Constants from './constants' ; import * as Types from './types' ; import type { RobotApiRequestMeta } from '../robot-api/types' ; export const restartRobot = ( robotName ) : Types . RestartRobotAction => ( { type : Constants . RESTART , payload : { robotName } , meta : { robot : true } , } ) ; export const restartRobotSuccess = ( robotName , meta ) : Types . RestartRobotSuccessAction => ( { type : Constants . RESTART_SUCCESS , payload : { robotName } , meta , } ) ; export const restartRobotFailure = ( robotName , error , meta ) : Types . RestartRobotFailureAction => ( { type : Constants . RESTART_FAILURE , payload : { robotName , error } , meta , } ) ; export const fetchResetConfigOptions = ( robotName ) : Types . FetchResetConfigOptionsAction => ( { type : Constants . FETCH_RESET_CONFIG_OPTIONS , payload : { robotName } , meta : { } , } ) ; export const fetchResetConfigOptionsSuccess = ( robotName , options , meta ) : Types . FetchResetConfigOptionsSuccessAction => ( { type : Constants . FETCH_RESET_CONFIG_OPTIONS_SUCCESS , payload : { robotName , options } , meta , } ) ; export const fetchResetConfigOptionsFailure = ( robotName , error , meta ) : Types . FetchResetConfigOptionsFailureAction => ( { type : Constants . FETCH_RESET_CONFIG_OPTIONS_FAILURE , payload : { robotName , error } , meta , } ) ; export const resetConfig = ( robotName , resets ) : Types . ResetConfigAction => ( { type : Constants . RESET_CONFIG , payload : { robotName , resets } , meta : { } , } ) ; export const resetConfigSuccess = ( robotName , meta ) : Types . ResetConfigSuccessAction => ( { type : Constants . RESET_CONFIG_SUCCESS , payload : { robotName } , meta , } ) ; export const resetConfigFailure = ( robotName , error , meta ) : Types . ResetConfigFailureAction => ( { type : Constants . RESET_CONFIG_FAILURE , payload : { robotName , error } , meta , } ) ; export const restartStatusChanged = ( robotName , restartStatus , bootId = null , startTime = null ) : Types . RestartStatusChangedAction => ( { type : Constants . RESTART_STATUS_CHANGED , payload : { robotName , restartStatus , bootId , startTime } , } ) ;