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

35 lines
797 B
TypeScript

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