member_webapp/@overflow/probe/store/trash/probe-host/probe-host.action.ts
2018-05-24 19:50:43 +09:00

38 lines
874 B
TypeScript

import { Action } from '@ngrx/store';
import { RPCClientError } from '@loafer/ng-rpc';
import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe';
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
;