import { INote } from '@models' ; import { action } from 'typesafe-actions' ; import * as types from './types' ; export const getNotesByContactFetched = ( contactId ) => action ( types . GET_NOTES_BY_CONTACT_FETCHED , { contactId , } ) ; export const getNotesByContactSuccess = ( contactId , notes ) => action ( types . GET_NOTES_BY_CONTACT_SUCCESS , { notes , contactId , } ) ; export const getNotesByContactFailed = ( error ) => action ( types . GET_NOTES_BY_CONTACT_FAILED , { error , } ) ; export const updateNote = ( note ) => action ( types . UPDATE_NOTE , note ) ; export const addNote = ( note ) => action ( types . ADD_NOTE , note ) ; export const updateNoteId = ( noteId , newId ) => action ( types . UPDATE_NOTE_ID , { noteId , newId } ) ; export const deleteNote = ( note , id ? ) => action ( types . DELETE_NOTE , { note , id } ) ;