next-ucap-messenger/projects/ucap-webmessenger-app/src/app/store/messenger/query/actions.ts

57 lines
1.2 KiB
TypeScript
Raw Normal View History

2019-10-04 04:45:02 +00:00
import { createAction, props } from '@ngrx/store';
import {
AuthRequest,
AuthResponse,
DeptRequest,
2019-10-07 04:07:52 +00:00
DeptInfo,
DeptUserRequest,
UserInfoSS,
DeptUserResponse
2019-10-04 04:45:02 +00:00
} from '@ucap-webmessenger/protocol-query';
export const auth = createAction(
'[Messenger::Query] Auth',
props<AuthRequest>()
);
export const authSuccess = createAction(
'[Messenger::Query] Auth Success',
props<{ res: AuthResponse }>()
);
export const authFailure = createAction(
'[Messenger::Query] Auth Failure',
props<{ error: any }>()
);
export const dept = createAction(
'[Messenger::Query] Dept',
props<DeptRequest>()
);
export const deptSuccess = createAction(
'[Messenger::Query] Dept Success',
props<{ departmentInfoList: DeptInfo[] }>()
);
export const deptFailure = createAction(
'[Messenger::Query] Dept Failure',
props<{ error: any }>()
);
2019-10-07 04:07:52 +00:00
export const deptUser = createAction(
'[Messenger::Query] Dept User',
props<DeptUserRequest>()
);
export const deptUserSuccess = createAction(
'[Messenger::Query] Dept User Success',
props<{ userInfos: UserInfoSS[]; res: DeptUserResponse }>()
);
export const deptUserFailure = createAction(
'[Messenger::Query] Dept User Failure',
props<{ error: any }>()
);