import { User } from '@devhub/core' ; import { createAction , createErrorAction } from '../helpers' ; import { AuthError , State as AuthState } from '../reducers/auth' ; export function loginRequest ( payload ) { return createAction ( 'LOGIN_REQUEST' , payload ) ; } export function loginSuccess ( payload ) { return createAction ( 'LOGIN_SUCCESS' , payload ) ; } export function loginFailure < E extends AuthError > ( error ) { return createErrorAction ( 'LOGIN_FAILURE' , error ) ; } export function logout ( ) { return createAction ( 'LOGOUT' ) ; } export function updateUserData ( payload ) { return createAction ( 'UPDATE_USER_DATA' , payload ) ; } export function deleteAccountRequest ( ) { return createAction ( 'DELETE_ACCOUNT_REQUEST' ) ; } export function deleteAccountSuccess ( ) { return createAction ( 'DELETE_ACCOUNT_SUCCESS' ) ; } export function deleteAccountFailure < E extends Error > ( error ) { return createErrorAction ( 'DELETE_ACCOUNT_FAILURE' , error ) ; }