import { createAction, props } from '@ngrx/store'; import { InfoRequest, Info, InfoResponse, SendResponse, SendRequest, SendNotification, ReadNotification, CancelNotification, DelNotification } from '@ucap-webmessenger/protocol-event'; export const info = createAction( '[Messenger::Event] Info', props() ); export const infoSuccess = createAction( '[Messenger::Event] Info Success', props<{ infoList: Info[]; res: InfoResponse; }>() ); export const infoFailure = createAction( '[Messenger::Event] Info Failure', props<{ error: any }>() ); export const newInfo = createAction( '[Messenger::Event] New Info', props<{ roomSeq: string; info: Info; }>() ); export const appendInfoList = createAction( '[Messenger::Event] Append InfoList', props<{ info: Info; }>() ); export const send = createAction( '[Messenger::Event] Send', props<{ senderSeq: number; req: SendRequest }>() ); export const sendSuccess = createAction( '[Messenger::Event] Send Success', props<{ senderSeq: number; res: SendResponse; }>() ); export const sendFailure = createAction( '[Messenger::Event] Send Failure', props<{ error: any }>() ); export const sendNotification = createAction( '[Messenger::Event] Send Notification', props<{ noti: SendNotification }>() ); export const readNotification = createAction( '[Messenger::Event] Read Notification', props<{ noti: ReadNotification }>() ); export const cancelNotification = createAction( '[Messenger::Event] Cancel Notification', props<{ noti: CancelNotification }>() ); export const delNotification = createAction( '[Messenger::Event] Delete Notification', props<{ noti: DelNotification }>() );