member_webapp/@overflow/sensor/store/regist/regist.action.ts
crusader d59d9379f9 ing
2018-05-24 15:44:13 +09:00

39 lines
1.0 KiB
TypeScript

import { Action } from '@ngrx/store';
import { RPCClientError } from '@loafer/ng-rpc';
import { Domain } from '@overflow/commons-typescript/model/domain';
// import { PageParams, Page } from 'app/commons/model';
import { Sensor } from '@overflow/commons-typescript/model/sensor';
import { SensorItem } from '@overflow/commons-typescript/model/sensor-item';
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
;