2019-10-08 13:18:05 +09:00
|
|
|
import { createAction, props } from '@ngrx/store';
|
|
|
|
import {
|
|
|
|
InfoRequest,
|
|
|
|
Info,
|
2019-10-08 14:34:37 +09:00
|
|
|
InfoResponse,
|
|
|
|
SendResponse,
|
2019-10-11 14:01:43 +09:00
|
|
|
SendRequest,
|
|
|
|
SendNotification,
|
|
|
|
ReadNotification,
|
|
|
|
CancelNotification,
|
2019-10-16 14:52:31 +09:00
|
|
|
DelNotification,
|
|
|
|
ReadRequest
|
2019-10-08 13:18:05 +09:00
|
|
|
} from '@ucap-webmessenger/protocol-event';
|
|
|
|
|
|
|
|
export const info = createAction(
|
|
|
|
'[Messenger::Event] Info',
|
|
|
|
props<InfoRequest>()
|
|
|
|
);
|
|
|
|
|
|
|
|
export const infoSuccess = createAction(
|
|
|
|
'[Messenger::Event] Info Success',
|
|
|
|
props<{
|
|
|
|
infoList: Info[];
|
|
|
|
res: InfoResponse;
|
|
|
|
}>()
|
|
|
|
);
|
|
|
|
|
|
|
|
export const infoFailure = createAction(
|
|
|
|
'[Messenger::Event] Info Failure',
|
|
|
|
props<{ error: any }>()
|
|
|
|
);
|
2019-10-08 14:34:37 +09:00
|
|
|
|
2019-10-10 13:35:32 +09:00
|
|
|
export const newInfo = createAction(
|
|
|
|
'[Messenger::Event] New Info',
|
|
|
|
props<{
|
|
|
|
roomSeq: string;
|
|
|
|
info: Info;
|
|
|
|
}>()
|
2019-10-15 19:09:26 +09:00
|
|
|
);
|
|
|
|
|
|
|
|
export const recallInfoList = createAction(
|
|
|
|
'[Messenger::Event] recall InfoList',
|
|
|
|
props<{
|
|
|
|
eventSeq: number;
|
|
|
|
}>()
|
2019-10-10 13:35:32 +09:00
|
|
|
);
|
|
|
|
|
2019-10-08 14:59:22 +09:00
|
|
|
export const appendInfoList = createAction(
|
|
|
|
'[Messenger::Event] Append InfoList',
|
|
|
|
props<{
|
|
|
|
info: Info;
|
|
|
|
}>()
|
|
|
|
);
|
|
|
|
|
2019-10-08 14:34:37 +09:00
|
|
|
export const send = createAction(
|
|
|
|
'[Messenger::Event] Send',
|
2019-10-08 14:59:22 +09:00
|
|
|
props<{ senderSeq: number; req: SendRequest }>()
|
2019-10-08 14:34:37 +09:00
|
|
|
);
|
|
|
|
|
|
|
|
export const sendSuccess = createAction(
|
|
|
|
'[Messenger::Event] Send Success',
|
|
|
|
props<{
|
2019-10-08 14:59:22 +09:00
|
|
|
senderSeq: number;
|
2019-10-08 14:34:37 +09:00
|
|
|
res: SendResponse;
|
|
|
|
}>()
|
|
|
|
);
|
|
|
|
|
|
|
|
export const sendFailure = createAction(
|
|
|
|
'[Messenger::Event] Send Failure',
|
|
|
|
props<{ error: any }>()
|
|
|
|
);
|
2019-10-11 14:01:43 +09:00
|
|
|
|
2019-10-16 14:52:31 +09:00
|
|
|
export const read = createAction(
|
|
|
|
'[Messenger::Event] read',
|
|
|
|
props<ReadRequest>()
|
|
|
|
);
|
|
|
|
|
|
|
|
export const readSuccess = createAction(
|
|
|
|
'[Messenger::Event] read Success',
|
|
|
|
props<{
|
|
|
|
infoList: Info[];
|
|
|
|
res: InfoResponse;
|
|
|
|
}>()
|
|
|
|
);
|
|
|
|
|
|
|
|
export const readFailure = createAction(
|
|
|
|
'[Messenger::Event] read Failure',
|
|
|
|
props<{ error: any }>()
|
|
|
|
);
|
|
|
|
|
2019-10-11 14:01:43 +09:00
|
|
|
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 }>()
|
|
|
|
);
|