{"size": 1262, "ext": "js", "max_stars_repo_path": "src/timeline/actions/index.js", "max_stars_repo_name": "chrissantamaria/connect", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/timeline/actions/index.js", "max_issues_repo_name": "chrissantamaria/connect", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/timeline/actions/index.js", "max_forks_repo_name": "chrissantamaria/connect", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.7746478873, "max_line_length": 82, "alphanum_fraction": 0.7242472266}
import {
  ACTION_PRIME_NAV,
  ACTION_PRIME_PAYMENTMETHOD,
  ACTION_PRIME_SUBSCRIPTION,
  ACTION_SELECT_DEVICE,
  ACTION_SELECT_TIME_RANGE,
  ACTION_UPDATE_DEVICES,
  ACTION_UPDATE_DEVICE,
  ACTION_UPDATE_DEVICE_ONLINE,
} from './types';

export function updateDevices(devices) {
  return {
    type: ACTION_UPDATE_DEVICES,
    devices,
  };
}

export function updateDevice(device) {
  return {
    type: ACTION_UPDATE_DEVICE,
    device,
  };
}

export function selectDevice(dongleId) {
  return {
    type: ACTION_SELECT_DEVICE,
    dongleId
  };
}

export function selectTimeRange(start, end) {
  return {
    type: ACTION_SELECT_TIME_RANGE,
    start,
    end
  };
}

export function primeGetSubscriptionAction(dongleId, subscription) {
  return {
    type: ACTION_PRIME_SUBSCRIPTION,
    dongleId,
    subscription,
  };
}

export function primeGetPaymentMethodAction(paymentMethod) {
  return {
    type: ACTION_PRIME_PAYMENTMETHOD,
    paymentMethod,
  };
}

export function primeNavAction(nav) {
  return {
    type: ACTION_PRIME_NAV,
    primeNav: nav,
  };
}

export function updateDeviceOnlineAction(dongleId, last_athena_ping, fetched_at) {
  return {
    type: ACTION_UPDATE_DEVICE_ONLINE,
    dongleId,
    last_athena_ping,
    fetched_at,
  };
}
