member_webapp/@overflow/probe/store/trash/probe-host/probe-host.action.ts

38 lines
874 B
TypeScript
Raw Normal View History

2018-04-25 09:04:47 +00:00
import { Action } from '@ngrx/store';
2018-05-24 06:44:13 +00:00
import { RPCClientError } from '@loafer/ng-rpc';
2018-04-25 09:04:47 +00:00
2018-05-02 08:09:39 +00:00
import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe';
2018-04-25 09:04:47 +00:00
export enum ActionType {
ReadByProbe = '[probeHost.detail] Read',
ReadByProbeSuccess = '[probeHost.detail] ReadSuccess',
ReadByProbeFailure = '[probeHost.detail] ReadFailure',
}
export class ReadByProbe implements Action {
readonly type = ActionType.ReadByProbe;
constructor(public payload: Probe) {}
}
export class ReadByProbeSuccess implements Action {
readonly type = ActionType.ReadByProbeSuccess;
constructor(public payload: ProbeHost) {}
}
export class ReadByProbeFailure implements Action {
readonly type = ActionType.ReadByProbeFailure;
constructor(public payload: RPCClientError) {}
}
export type Actions =
| ReadByProbe
| ReadByProbeSuccess
| ReadByProbeFailure
;