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,
|
2019-10-24 10:45:28 +09:00
|
|
|
ReadRequest,
|
|
|
|
DelRequest,
|
|
|
|
DelResponse,
|
|
|
|
CancelRequest,
|
2019-11-06 13:48:06 +09:00
|
|
|
CancelResponse,
|
|
|
|
EventJson
|
2019-10-08 13:18:05 +09:00
|
|
|
} from '@ucap-webmessenger/protocol-event';
|
2019-11-11 14:31:26 +09:00
|
|
|
import {
|
|
|
|
InfoRequest as FileInfoRequest,
|
|
|
|
InfoResponse as FileInfoResponse,
|
|
|
|
FileDownloadInfo,
|
|
|
|
FileInfo
|
|
|
|
} from '@ucap-webmessenger/protocol-file';
|
2019-10-08 13:18:05 +09:00
|
|
|
|
|
|
|
export const info = createAction(
|
|
|
|
'[Messenger::Event] Info',
|
|
|
|
props<InfoRequest>()
|
|
|
|
);
|
|
|
|
export const infoSuccess = createAction(
|
|
|
|
'[Messenger::Event] Info Success',
|
|
|
|
props<{
|
2019-11-06 13:48:06 +09:00
|
|
|
infoList: Info<EventJson>[];
|
2019-10-08 13:18:05 +09:00
|
|
|
res: InfoResponse;
|
|
|
|
}>()
|
|
|
|
);
|
2019-11-11 14:31:26 +09:00
|
|
|
export const infoFailure = createAction(
|
|
|
|
'[Messenger::Event] Info Failure',
|
|
|
|
props<{ error: any }>()
|
|
|
|
);
|
|
|
|
|
|
|
|
export const fileInfo = createAction(
|
|
|
|
'[Messenger::Event] File Info',
|
|
|
|
props<{ req: FileInfoRequest }>()
|
|
|
|
);
|
|
|
|
export const fileInfoSuccess = createAction(
|
|
|
|
'[Messenger::Event] File Info Success',
|
|
|
|
props<{
|
|
|
|
fileInfoList: FileInfo[];
|
|
|
|
fileInfoCheckList: FileDownloadInfo[];
|
|
|
|
res: FileInfoResponse;
|
|
|
|
}>()
|
|
|
|
);
|
|
|
|
export const fileInfoFailure = createAction(
|
|
|
|
'[Messenger::Event] File Info Failure',
|
|
|
|
props<{ error: any }>()
|
|
|
|
);
|
2019-10-08 13:18:05 +09:00
|
|
|
|
2019-10-31 18:12:38 +09:00
|
|
|
export const infoMoreSuccess = createAction(
|
|
|
|
'[Messenger::Event] Info More Success',
|
|
|
|
props<{
|
2019-11-06 13:48:06 +09:00
|
|
|
infoList: Info<EventJson>[];
|
2019-10-31 18:12:38 +09:00
|
|
|
res: InfoResponse;
|
|
|
|
}>()
|
|
|
|
);
|
|
|
|
|
2019-11-01 13:43:49 +09:00
|
|
|
export const infoIntervalClear = createAction(
|
|
|
|
'[Messenger::Event] Info Interval Clear',
|
|
|
|
props()
|
|
|
|
);
|
|
|
|
|
2019-10-10 13:35:32 +09:00
|
|
|
export const newInfo = createAction(
|
|
|
|
'[Messenger::Event] New Info',
|
|
|
|
props<{
|
|
|
|
roomSeq: string;
|
2019-11-06 13:48:06 +09:00
|
|
|
info: Info<EventJson>;
|
2019-10-29 10:10:08 +09:00
|
|
|
SVC_TYPE?: number;
|
|
|
|
SSVC_TYPE?: number;
|
2019-10-10 13:35:32 +09:00
|
|
|
}>()
|
2019-10-15 19:09:26 +09:00
|
|
|
);
|
|
|
|
|
2019-10-08 14:59:22 +09:00
|
|
|
export const appendInfoList = createAction(
|
|
|
|
'[Messenger::Event] Append InfoList',
|
|
|
|
props<{
|
2019-11-06 13:48:06 +09:00
|
|
|
info: Info<EventJson>;
|
2019-10-08 14:59:22 +09:00
|
|
|
}>()
|
|
|
|
);
|
|
|
|
|
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-24 10:45:28 +09:00
|
|
|
export const sendNotification = createAction(
|
|
|
|
'[Messenger::Event] Send Notification',
|
|
|
|
props<{ noti: SendNotification }>()
|
|
|
|
);
|
|
|
|
|
2019-10-24 17:04:58 +09:00
|
|
|
export const forward = createAction(
|
|
|
|
'[Messenger::Event] forward',
|
|
|
|
props<{
|
|
|
|
senderSeq: number;
|
|
|
|
req: SendRequest;
|
|
|
|
trgtUserSeqs?: number[];
|
|
|
|
trgtRoomSeq?: string;
|
|
|
|
}>()
|
|
|
|
);
|
|
|
|
export const forwardFailure = createAction(
|
|
|
|
'[Messenger::Event] Forward Failure',
|
|
|
|
props<{ error: any }>()
|
|
|
|
);
|
|
|
|
export const forwardAfterRoomOpen = createAction(
|
|
|
|
'[Messenger::Event] forwardAfterRoomOpen',
|
|
|
|
props<{
|
|
|
|
senderSeq: number;
|
|
|
|
req: SendRequest;
|
|
|
|
trgtUserSeqs?: number[];
|
|
|
|
trgtRoomSeq?: string;
|
2019-12-09 09:58:43 +09:00
|
|
|
}>()
|
|
|
|
);
|
|
|
|
export const roomOpenAfterForward = createAction(
|
|
|
|
'[Messenger::Event] roomOpenAfterForward',
|
|
|
|
props<{
|
|
|
|
senderSeq: number;
|
|
|
|
req: SendRequest;
|
|
|
|
trgtUserSeqs?: number[];
|
|
|
|
trgtRoomSeq?: string;
|
2019-10-24 17:04:58 +09:00
|
|
|
}>()
|
|
|
|
);
|
|
|
|
|
2019-10-28 18:03:27 +09:00
|
|
|
export const sendMass = createAction(
|
|
|
|
'[Messenger::Event] Send Mass',
|
|
|
|
props<{ senderSeq: number; req: SendRequest }>()
|
|
|
|
);
|
|
|
|
export const sendMassSuccess = createAction(
|
|
|
|
'[Messenger::Event] Send Mass Success',
|
|
|
|
props<{
|
|
|
|
senderSeq: number;
|
|
|
|
res: SendResponse;
|
|
|
|
}>()
|
|
|
|
);
|
|
|
|
export const sendMassFailure = createAction(
|
|
|
|
'[Messenger::Event] Send Mass Failure',
|
|
|
|
props<{ error: any }>()
|
|
|
|
);
|
|
|
|
|
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<{
|
2019-11-06 13:48:06 +09:00
|
|
|
infoList: Info<EventJson>[];
|
2019-10-16 14:52:31 +09:00
|
|
|
res: InfoResponse;
|
|
|
|
}>()
|
|
|
|
);
|
|
|
|
|
|
|
|
export const readFailure = createAction(
|
|
|
|
'[Messenger::Event] read Failure',
|
|
|
|
props<{ error: any }>()
|
|
|
|
);
|
|
|
|
|
2019-10-11 14:01:43 +09:00
|
|
|
export const readNotification = createAction(
|
|
|
|
'[Messenger::Event] Read Notification',
|
2019-10-30 16:22:49 +09:00
|
|
|
props<ReadNotification>()
|
2019-10-11 14:01:43 +09:00
|
|
|
);
|
|
|
|
|
2019-10-24 10:45:28 +09:00
|
|
|
/** 대화 회수 */
|
|
|
|
export const cancel = createAction(
|
|
|
|
'[Messenger::Event] Cancel',
|
|
|
|
props<CancelRequest>()
|
|
|
|
);
|
|
|
|
export const cancelFailure = createAction(
|
|
|
|
'[Messenger::Event] Cancel Failure',
|
|
|
|
props<{ error: any }>()
|
|
|
|
);
|
2019-10-11 14:01:43 +09:00
|
|
|
export const cancelNotification = createAction(
|
2019-10-24 10:45:28 +09:00
|
|
|
'[Messenger::Event] Cancel Notification || Response',
|
|
|
|
props<{ noti: CancelNotification | CancelResponse }>()
|
|
|
|
);
|
|
|
|
/** 대화 회수시 열린 대화방의 대화 내용 갱신 */
|
|
|
|
export const recallInfoList = createAction(
|
|
|
|
'[Messenger::Event] Cancel InfoList',
|
|
|
|
props<{
|
|
|
|
eventSeq: number;
|
|
|
|
}>()
|
2019-10-11 14:01:43 +09:00
|
|
|
);
|
|
|
|
|
2019-10-24 10:45:28 +09:00
|
|
|
/** 대화 삭제 */
|
|
|
|
export const del = createAction(
|
|
|
|
'[Messenger::Event] Delete',
|
|
|
|
props<DelRequest>()
|
|
|
|
);
|
|
|
|
export const delFailure = createAction(
|
|
|
|
'[Messenger::Event] Delete Failure',
|
|
|
|
props<{ error: any }>()
|
|
|
|
);
|
2019-10-11 14:01:43 +09:00
|
|
|
export const delNotification = createAction(
|
2019-10-24 10:45:28 +09:00
|
|
|
'[Messenger::Event] Delete Notification || Response',
|
|
|
|
props<{ noti: DelNotification | DelResponse }>()
|
|
|
|
);
|
|
|
|
/** 대화 삭제시 열린 대화방의 대화 내용 갱신 */
|
|
|
|
export const delInfoList = createAction(
|
|
|
|
'[Messenger::Event] Delete InfoList',
|
|
|
|
props<{
|
2019-11-01 13:43:49 +09:00
|
|
|
eventSeqs: number[];
|
2019-10-24 10:45:28 +09:00
|
|
|
}>()
|
2019-10-11 14:01:43 +09:00
|
|
|
);
|