text: import {
    constructActivity,
    constructActivities
  } from './helpers';
  
  export const STORE_ACTIVITIES = 'activities/STORE_ACTIVITIES';
  export const UPDATE_ACTIVITY = 'activities/UPDATE_ACTIVITY';
  export const DELETE_ACTIVITY = 'activities/DELETE_ACTIVITY';
  
  
  export function storeActivities(activities) {
    return {
      type: STORE_ACTIVITIES,
      payload: {
        activities: constructActivities(activities)
      }
    };
  }
  
  export function updateActivity(activity) {
    return {
      type: UPDATE_ACTIVITY,
      payload: {
        activity: constructActivity(activity)
      }
    };
  }
  
  
  /**
   * "Delete" an activity == tombstoning the activity
   *
   * @export
   * @param {Object} activity
   * @returns {Object} redux action
   */
  export function deleteActivity(activity) {
    const tombstoneActivity = Object.assign({}, activity, {
      verb: 'tombstone'
    });
    return {
      type: DELETE_ACTIVITY,
      payload: {
        activitiy: constructActivity(tombstoneActivity)
      }
    };
  }
  