member_webapp/@overflow/sensor/store/regist/regist.action.ts

39 lines
1.0 KiB
TypeScript
Raw Normal View History

2018-04-06 11:02:18 +00:00
import { Action } from '@ngrx/store';
2018-05-24 06:44:13 +00:00
import { RPCClientError } from '@loafer/ng-rpc';
2018-04-06 11:02:18 +00:00
2018-05-02 08:09:39 +00:00
import { Domain } from '@overflow/commons-typescript/model/domain';
2018-05-24 06:44:13 +00:00
// import { PageParams, Page } from 'app/commons/model';
2018-05-02 08:09:39 +00:00
import { Sensor } from '@overflow/commons-typescript/model/sensor';
import { SensorItem } from '@overflow/commons-typescript/model/sensor-item';
2018-04-06 11:02:18 +00:00
export enum ActionType {
Regist = '[Sensor.Regist] Regist',
RegistSuccess = '[Sensor.RegistSuccess] RegistSuccess',
RegistFailure = '[Sensor.RegistFailure] RegistFailure',
}
export class Regist implements Action {
readonly type = ActionType.Regist;
constructor(public payload: { sensor: Sensor, sensorItems: SensorItem[]}) {}
}
export class RegistSuccess implements Action {
readonly type = ActionType.RegistSuccess;
constructor(public payload: Sensor) {}
}
export class RegistFailure implements Action {
readonly type = ActionType.RegistFailure;
constructor(public payload: RPCClientError) {}
}
export type Actions =
| Regist
| RegistSuccess
| RegistFailure
;