import actionCreatorFactory from 'typescript-fsa' const actionCreator = actionCreatorFactory() import * as constants from './constants' import { IFetchPlaybookForEndUserAction, IEnrollAction, IPlaybook, IPlaybookAction, IEnrollFailedAction } from './interfaces' export const searchPlaybooks = actionCreator(constants.SEARCH_PLAYBOOKS) export const searchPlaybooksSuccess = actionCreator(constants.SEARCH_PLAYBOOKS_SUCCESS) export const searchPlaybooksPending = actionCreator(constants.SEARCH_PLAYBOOKS_PENDING) export const searchPlaybooksFailed = actionCreator(constants.SEARCH_PLAYBOOKS_FAILED) export const enroll = actionCreator(constants.ENROLL) export const enrollSuccess = actionCreator(constants.ENROLL_SUCCESS) export const enrollPending = actionCreator(constants.ENROLL_PENDING) export const enrollFailed = actionCreator(constants.ENROLL_FAILED) export const fetchEnrolledSequenceCount = actionCreator(constants.FETCH_ENROLLED_SEQUENCE_COUNT) export const fetchEnrolledSequenceCountSuccess = actionCreator(constants.FETCH_ENROLLED_SEQUENCE_COUNT_SUCCESS) export const fetchEnrolledSequenceCountPending = actionCreator(constants.FETCH_ENROLLED_SEQUENCE_COUNT_PENDING) export const fetchEnrolledSequenceCountFailed = actionCreator(constants.FETCH_ENROLLED_SEQUENCE_COUNT_FAILED) export const setSFEmails = actionCreator<{ emails: string[] }>(constants.SET_SF_EMAILS) export const fetchPlaybookForEndUser = actionCreator(constants.FETCH_PLAYBOOK_FOR_END_USER) export const fetchPlaybookForEndUserSuccess = actionCreator(constants.FETCH_PLAYBOOK_FOR_END_USER_SUCCESS) export const fetchPlaybookForEndUserPending = actionCreator(constants.FETCH_PLAYBOOK_FOR_END_USER_PENDING) export const fetchPlaybookForEndUserFailed = actionCreator(constants.FETCH_PLAYBOOK_FOR_END_USER_FAILED) export const setPlaybookForEndUserSubject = actionCreator(constants.SET_PLAYBOOK_FOR_END_USER_SUBJECT) export const setPlaybookForEndUserMessage = actionCreator(constants.SET_PLAYBOOK_FOR_END_USER_MESSAGE) export const clearState = actionCreator(constants.CLEAR_STATE)