member_webapp/src/packages/member/store/modify/modify.action.ts

36 lines
811 B
TypeScript
Raw Normal View History

2018-04-30 11:50:47 +00:00
import { Action } from '@ngrx/store';
import { RESTClientError } from '@loafer/ng-rest/protocol';
2018-05-02 08:09:39 +00:00
import { Member } from '@overflow/commons-typescript/model/member';
2018-04-30 11:50:47 +00:00
export enum ActionType {
Modify = '[member.modify] Modify',
ModifySuccess = '[member.modify] ModifySuccess',
ModifyFailure = '[member.modify] ModifyFailure',
}
export class Modify implements Action {
readonly type = ActionType.Modify;
2018-04-30 12:04:58 +00:00
constructor(public payload: Member ) {}
2018-04-30 11:50:47 +00:00
}
export class ModifySuccess implements Action {
readonly type = ActionType.ModifySuccess;
constructor(public payload: Member) {}
}
export class ModifyFailure implements Action {
readonly type = ActionType.ModifyFailure;
constructor(public payload: RESTClientError) {}
}
export type Actions =
| Modify
| ModifySuccess
| ModifyFailure
;