Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@doodle/intercom-connector / src / state / actions / intercomActions.js
Size: Mime:
export const ActionTypes = {
  BOOT: '@doodle/intercom/BOOT',
  TRACK_EVENT: '@doodle/intercom/TRACK_EVENT',
  SHOW: '@doodle/intercom/SHOW',
  SHOW_MESSAGES: '@doodle/intercom/SHOW_MESSAGES',
  SHOW_NEW_MESSAGE: '@doodle/intercom/SHOW_NEW_MESSAGE',
  HIDE: '@doodle/intercom/HIDE',
  UPDATE: '@doodle/intercom/UPDATE',
  SHUTDOWN: '@doodle/intercom/SHUTDOWN',
};

export const boot = () => ({
  type: ActionTypes.BOOT,
});

export const trackEvent = (event, metadata = {}) => ({
  type: ActionTypes.TRACK_EVENT,
  payload: {
    event,
    metadata,
  },
});

export const show = () => ({
  type: ActionTypes.SHOW,
});

export const showMessages = () => ({
  type: ActionTypes.SHOW_MESSAGES,
});

export const showNewMessage = () => ({
  type: ActionTypes.SHOW_NEW_MESSAGE,
});

export const hide = () => ({
  type: ActionTypes.HIDE,
});

export const update = userDetails => ({
  type: ActionTypes.UPDATE,
  payload: {
    ...userDetails,
  },
});

export const shutdown = () => ({
  type: ActionTypes.SHUTDOWN,
});