import { Action } from '@ngrx/store' ; import { User , Question , UserStatus } from 'shared-library/shared/model' ; export enum UserActionTypes { LOAD_USER_PUBLISHED_QUESTIONS = '[User] LoadUserPublishedQuestions' , LOAD_USER_PUBLISHED_QUESTIONS_SUCCESS = '[User] LoadUserPublishedQuestionsSuccess' , LOAD_USER_UNPUBLISHED_QUESTIONS = '[User] LoadUserUnpublishedQuestions' , LOAD_USER_UNPUBLISHED_QUESTIONS_SUCCESS = '[User] LoadUserUnpublishedQuestionsSuccess' , ADD_QUESTION = '[User] AddQuestions' , ADD_QUESTION_SUCCESS = '[User] AddQuestionsSuccess' , UPDATE_USER_SUCCESS = '[User] UpdateUserSuccess' } export class LoadUserPublishedQuestions implements Action { readonly type = UserActionTypes . LOAD_USER_PUBLISHED_QUESTIONS ; constructor ( public payload ) { } } export class LoadUserPublishedQuestionsSuccess implements Action { readonly type = UserActionTypes . LOAD_USER_PUBLISHED_QUESTIONS_SUCCESS ; constructor ( public payload ) { } } export class LoadUserUnpublishedQuestions implements Action { readonly type = UserActionTypes . LOAD_USER_UNPUBLISHED_QUESTIONS ; constructor ( public payload ) { } } export class LoadUserUnpublishedQuestionsSuccess implements Action { readonly type = UserActionTypes . LOAD_USER_UNPUBLISHED_QUESTIONS_SUCCESS ; constructor ( public payload ) { } } export class AddQuestion implements Action { readonly type = UserActionTypes . ADD_QUESTION ; constructor ( public payload ) { } } export class UpdateUserSuccess implements Action { readonly type = UserActionTypes . UPDATE_USER_SUCCESS ; constructor ( public payload ) { } } export type UserActions = LoadUserPublishedQuestions | LoadUserPublishedQuestionsSuccess | LoadUserUnpublishedQuestions | LoadUserUnpublishedQuestionsSuccess | AddQuestion | UpdateUserSuccess ;