member_webapp/src/packages/member/store/modify/modify.action.ts
2018-05-02 17:09:39 +09:00

36 lines
811 B
TypeScript

import { Action } from '@ngrx/store';
import { RESTClientError } from '@loafer/ng-rest/protocol';
import { Member } from '@overflow/commons-typescript/model/member';
export enum ActionType {
Modify = '[member.modify] Modify',
ModifySuccess = '[member.modify] ModifySuccess',
ModifyFailure = '[member.modify] ModifyFailure',
}
export class Modify implements Action {
readonly type = ActionType.Modify;
constructor(public payload: Member ) {}
}
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
;