member_webapp/@overflow/target/store/modify/modify.action.ts

35 lines
797 B
TypeScript
Raw Normal View History

2018-04-30 10:59:32 +00:00
import { Action } from '@ngrx/store';
2018-05-24 06:44:13 +00:00
import { RPCClientError } from '@loafer/ng-rpc';
2018-05-02 08:25:38 +00:00
import { Target } from '@overflow/commons-typescript/model/target';
2018-04-30 10:59:32 +00:00
export enum ActionType {
Modify = '[Target.modify] Modify',
ModifySuccess = '[Target.modify] ModifySuccess',
ModifyFailure = '[Target.modify] ModifyFailure',
}
export class Modify implements Action {
readonly type = ActionType.Modify;
constructor(public payload: Target) {}
}
export class ModifySuccess implements Action {
readonly type = ActionType.ModifySuccess;
constructor(public payload: Target) {}
}
export class ModifyFailure implements Action {
readonly type = ActionType.ModifyFailure;
constructor(public payload: RPCClientError) {}
}
export type Actions =
| Modify
| ModifySuccess
| ModifyFailure
;