member_webapp/src/packages/probe/store/modify/modify.action.ts

38 lines
773 B
TypeScript
Raw Normal View History

2018-04-27 07:31:27 +00:00
import { Action } from '@ngrx/store';
import { RPCClientError } from '@loafer/ng-rpc/protocol';
import { Probe } from '../../model';
export enum ActionType {
Modify = '[probe.detail] Modify',
ModifySuccess = '[probe.detail] ModifySuccess',
ModifyFailure = '[probe.detail] ModifyFailure',
}
export class Modify implements Action {
readonly type = ActionType.Modify;
constructor(public payload: Probe) {}
}
export class ModifySuccess implements Action {
readonly type = ActionType.ModifySuccess;
constructor(public payload: Probe) {}
}
export class ModifyFailure implements Action {
readonly type = ActionType.ModifyFailure;
constructor(public payload: RPCClientError) {}
}
export type Actions =
| Modify
| ModifySuccess
| ModifyFailure
;