import { Injectable } from '@angular/core' ; import { Action } from '@ngrx/store' ; import { BulkUploadFileInfo , User , Question , BulkUpload } from 'shared-library/shared/model' ; export enum BulkActionTypes { LOAD_BULK_UPLOAD = '[Bulk] LoadBulkUpload' , LOAD_BULK_UPLOAD_SUCCESS = '[Bulk] LoadBulkUploadSuccess' , LOAD_USER_BULK_UPLOAD = '[Bulk] LoadUserBulkUpload' , LOAD_USER_BULK_UPLOAD_SUCCESS = '[Bulk] LoadUserBulkUploadSuccess' , LOAD_BULK_UPLOAD_PUBLISHED_QUESTIONS = '[Bulk] LoadBulkUploadPublishedQuestions' , LOAD_BULK_UPLOAD_PUBLISHED_QUESTIONS_SUCCESS = '[Bulk] LoadBulkUploadPublishedQuestionsSuccess' , LOAD_BULK_UPLOAD_UNPUBLISHED_QUESTIONS = '[Bulk] LoadBulkUploadUnpublishedQuestions' , LOAD_BULK_UPLOAD_UNPUBLISHED_QUESTIONS_SUCCESS = '[Bulk] LoadBulkUploadUnpublishedQuestionsSuccess' , LOAD_BULK_UPLOAD_FILE_URL = '[Bulk] LoadBulkUploadFileUrl' , LOAD_BULK_UPLOAD_FILE_URL_SUCCESS = '[Bulk] LoadBulkUploadFileUrlSuccess' , UPDATE_QUESTION = '[Bulk] UpdateQuestion' , UPDATE_BULK_UPLOAD = '[Bulk] UpdateBulkUpload' , APPROVE_QUESTION = '[Bulk] ApproveQuestion' , ADD_BULK_QUESTIONS = '[Bulk] AddBulkQuestion' , ARCHIVE_BULK_UPLOAD = '[Bulk] ArchiveBulkUpload' , ARCHIVE_BULK_UPLOAD_SUCCESS = '[Bulk] ArchiveBulkUploadSuccess' , LOAD_BULK_UPLOAD_FILE = '[Bulk] LoadBulkUploadFile' , LOAD_BULK_UPLOAD_FILE_SUCCESS = '[Bulk] LoadBulkUploadFileSuccess' , SAVE_ARCHIVE_TOGGLE_STATE = '[Bulk] SaveArchiveToggleState' , SAVE_ARCHIVE_LIST = '[Bulk] SaveArchiveList' } export class LoadBulkUpload implements Action { readonly type = BulkActionTypes . LOAD_BULK_UPLOAD ; constructor ( public payload ) { } } export class LoadBulkUploadSuccess implements Action { readonly type = BulkActionTypes . LOAD_BULK_UPLOAD_SUCCESS ; constructor ( public payload ) { } } export class LoadUserBulkUpload implements Action { readonly type = BulkActionTypes . LOAD_USER_BULK_UPLOAD ; constructor ( public payload ) { } } export class LoadUserBulkUploadSuccess implements Action { readonly type = BulkActionTypes . LOAD_USER_BULK_UPLOAD_SUCCESS ; constructor ( public payload ) { } } export class LoadBulkUploadPublishedQuestions implements Action { readonly type = BulkActionTypes . LOAD_BULK_UPLOAD_PUBLISHED_QUESTIONS ; constructor ( public payload ) { } } export class LoadBulkUploadPublishedQuestionsSuccess implements Action { readonly type = BulkActionTypes . LOAD_BULK_UPLOAD_PUBLISHED_QUESTIONS_SUCCESS ; constructor ( public payload ) { } } export class LoadBulkUploadUnpublishedQuestions implements Action { readonly type = BulkActionTypes . LOAD_BULK_UPLOAD_UNPUBLISHED_QUESTIONS ; constructor ( public payload ) { } } export class LoadBulkUploadUnpublishedQuestionsSuccess implements Action { readonly type = BulkActionTypes . LOAD_BULK_UPLOAD_UNPUBLISHED_QUESTIONS_SUCCESS ; constructor ( public payload ) { } } export class LoadBulkUploadFileUrl implements Action { readonly type = BulkActionTypes . LOAD_BULK_UPLOAD_FILE_URL ; constructor ( public payload ) { } } export class LoadBulkUploadFileUrlSuccess implements Action { readonly type = BulkActionTypes . LOAD_BULK_UPLOAD_FILE_URL_SUCCESS ; constructor ( public payload ) { } } export class UpdateQuestion implements Action { readonly type = BulkActionTypes . UPDATE_QUESTION ; constructor ( public payload ) { } } export class UpdateBulkUpload implements Action { readonly type = BulkActionTypes . UPDATE_BULK_UPLOAD ; constructor ( public payload ) { } } export class ApproveQuestion implements Action { readonly type = BulkActionTypes . APPROVE_QUESTION ; constructor ( public payload ) { } } export class AddBulkQuestions implements Action { readonly type = BulkActionTypes . ADD_BULK_QUESTIONS ; constructor ( public payload ) { } } export class ArchiveBulkUpload implements Action { readonly type = BulkActionTypes . ARCHIVE_BULK_UPLOAD ; constructor ( public payload ) { } } export class ArchiveBulkUploadSuccess implements Action { readonly type = BulkActionTypes . ARCHIVE_BULK_UPLOAD_SUCCESS ; payload = null ; } export class LoadBulkUploadFile implements Action { readonly type = BulkActionTypes . LOAD_BULK_UPLOAD_FILE ; constructor ( public payload ) { } } export class LoadBulkUploadFileSuccess implements Action { readonly type = BulkActionTypes . LOAD_BULK_UPLOAD_FILE_SUCCESS ; constructor ( public payload ) { } } export class SaveArchiveToggleState implements Action { readonly type = BulkActionTypes . SAVE_ARCHIVE_TOGGLE_STATE ; constructor ( public payload ) { } } export class SaveArchiveList implements Action { readonly type = BulkActionTypes . SAVE_ARCHIVE_LIST ; constructor ( public payload ) { } } export type BulkActions = LoadBulkUpload | LoadBulkUploadSuccess | LoadUserBulkUpload | LoadUserBulkUploadSuccess | LoadBulkUploadPublishedQuestions | LoadBulkUploadPublishedQuestionsSuccess | LoadBulkUploadUnpublishedQuestions | LoadBulkUploadUnpublishedQuestionsSuccess | LoadBulkUploadFileUrl | LoadBulkUploadFileUrlSuccess | UpdateQuestion | UpdateBulkUpload | ApproveQuestion | AddBulkQuestions | ArchiveBulkUpload | ArchiveBulkUploadSuccess | LoadBulkUploadFile | LoadBulkUploadFileSuccess | SaveArchiveToggleState | SaveArchiveList ;