import * as Constants from './constants' ; import * as Types from './types' ; import type { RobotApiRequestMeta } from '../robot-api/types' ; export const fetchPipettes = ( robotName , refresh = false ) : Types . FetchPipettesAction => ( { type : Constants . FETCH_PIPETTES , payload : { robotName , refresh } , meta : { } , } ) ; export const fetchPipettesSuccess = ( robotName , pipettes , meta ) : Types . FetchPipettesSuccessAction => ( { type : Constants . FETCH_PIPETTES_SUCCESS , payload : { robotName , pipettes } , meta , } ) ; export const fetchPipettesFailure = ( robotName , error , meta ) : Types . FetchPipettesFailureAction => ( { type : Constants . FETCH_PIPETTES_FAILURE , payload : { robotName , error } , meta , } ) ; export const fetchPipetteSettings = ( robotName ) : Types . FetchPipetteSettingsAction => ( { type : Constants . FETCH_PIPETTE_SETTINGS , payload : { robotName } , meta : { } , } ) ; export const fetchPipetteSettingsSuccess = ( robotName , settings , meta ) : Types . FetchPipetteSettingsSuccessAction => ( { type : Constants . FETCH_PIPETTE_SETTINGS_SUCCESS , payload : { robotName , settings } , meta , } ) ; export const fetchPipetteSettingsFailure = ( robotName , error , meta ) : Types . FetchPipetteSettingsFailureAction => ( { type : Constants . FETCH_PIPETTE_SETTINGS_FAILURE , payload : { robotName , error } , meta , } ) ; export const updatePipetteSettings = ( robotName , pipetteId , fields ) : Types . UpdatePipetteSettingsAction => ( { type : Constants . UPDATE_PIPETTE_SETTINGS , payload : { robotName , pipetteId , fields } , meta : { } , } ) ; export const updatePipetteSettingsSuccess = ( robotName , pipetteId , fields , meta ) : Types . UpdatePipetteSettingsSuccessAction => ( { type : Constants . UPDATE_PIPETTE_SETTINGS_SUCCESS , payload : { robotName , pipetteId , fields } , meta , } ) ; export const updatePipetteSettingsFailure = ( robotName , pipetteId , error , meta ) : Types . UpdatePipetteSettingsFailureAction => ( { type : Constants . UPDATE_PIPETTE_SETTINGS_FAILURE , payload : { robotName , pipetteId , error } , meta , } ) ;