import * as Constants from './constants' ; import * as Types from './types' ; import type { RobotApiRequestMeta } from '../robot-api/types' ; export const fetchSettings = ( robotName ) : Types . FetchSettingsAction => ( { type : Constants . FETCH_SETTINGS , payload : { robotName } , meta : { } , } ) ; export const fetchSettingsSuccess = ( robotName , settings , restartPath , meta ) : Types . FetchSettingsSuccessAction => ( { type : Constants . FETCH_SETTINGS_SUCCESS , payload : { robotName , settings , restartPath } , meta , } ) ; export const fetchSettingsFailure = ( robotName , error , meta ) : Types . FetchSettingsFailureAction => ( { type : Constants . FETCH_SETTINGS_FAILURE , payload : { robotName , error } , meta , } ) ; export const updateSetting = ( robotName , settingId , value ) : Types . UpdateSettingAction => ( { type : Constants . UPDATE_SETTING , payload : { robotName , settingId , value } , meta : { } , } ) ; export const updateSettingSuccess = ( robotName , settings , restartPath , meta ) : Types . UpdateSettingSuccessAction => ( { type : Constants . UPDATE_SETTING_SUCCESS , payload : { robotName , settings , restartPath } , meta , } ) ; export const updateSettingFailure = ( robotName , error , meta ) : Types . UpdateSettingFailureAction => ( { type : Constants . UPDATE_SETTING_FAILURE , payload : { robotName , error } , meta , } ) ; export const clearRestartPath = ( robotName ) : Types . ClearRestartPathAction => ( { type : Constants . CLEAR_RESTART_PATH , payload : { robotName } , } ) ;