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

46 lines
1.0 KiB
TypeScript

import { Action } from '@ngrx/store';
import { RPCClientError } from '@loafer/ng-rpc';
import { Probe } from '@overflow/commons-typescript/model/probe';
export enum ActionType {
Modify = '[probe.modify] Modify',
ModifyDisplayName = '[probe.modify] ModifyDisplayName',
ModifySuccess = '[probe.modify] ModifySuccess',
ModifyFailure = '[probe.modify] ModifyFailure',
}
export class Modify implements Action {
readonly type = ActionType.Modify;
constructor(public payload: Probe) {}
}
export class ModifySuccess implements Action {
readonly type = ActionType.ModifySuccess;
constructor(public payload: Probe) {}
}
export class ModifyFailure implements Action {
readonly type = ActionType.ModifyFailure;
constructor(public payload: RPCClientError) {}
}
export class ModifyDisplayName implements Action {
readonly type = ActionType.ModifyDisplayName;
constructor(public payload: {id: string, displayName: string}) {}
}
export type Actions =
| Modify
| ModifySuccess
| ModifyFailure
| ModifyDisplayName
;