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

36 lines
829 B
TypeScript

import { Action } from '@ngrx/store';
import { RESTClientError } from '@loafer/ng-rest';
import { Member } from '@overflow/commons-typescript/model/member';
export enum ActionType {
Signup = '[member.signup] Signup',
SignupSuccess = '[member.signup] SignupSuccess',
SignupFailure = '[member.signup] SignupFailure',
}
export class Signup implements Action {
readonly type = ActionType.Signup;
constructor(public payload: {member: Member, password: string}) {}
}
export class SignupSuccess implements Action {
readonly type = ActionType.SignupSuccess;
constructor(public payload: Member) {}
}
export class SignupFailure implements Action {
readonly type = ActionType.SignupFailure;
constructor(public payload: RESTClientError) {}
}
export type Actions =
| Signup
| SignupSuccess
| SignupFailure
;