member_webapp/@overflow/probe/store/trash/remove/remove.action.ts

38 lines
802 B
TypeScript
Raw Normal View History

2018-04-29 10:43:14 +00:00
import { Action } from '@ngrx/store';
2018-05-24 06:44:13 +00:00
import { RPCClientError } from '@loafer/ng-rpc';
2018-04-29 10:43:14 +00:00
2018-05-02 08:09:39 +00:00
import { Probe } from '@overflow/commons-typescript/model/probe';
2018-04-29 10:43:14 +00:00
export enum ActionType {
Remove = '[probe.remove] Remove',
RemoveSuccess = '[probe.detail] RemoveSuccess',
RemoveFailure = '[probe.detail] RemoveFailure',
}
export class Remove implements Action {
readonly type = ActionType.Remove;
constructor(public payload: {id: string}) {}
}
export class RemoveSuccess implements Action {
readonly type = ActionType.RemoveSuccess;
constructor(public payload: boolean) {}
}
export class RemoveFailure implements Action {
readonly type = ActionType.RemoveFailure;
constructor(public payload: RPCClientError) {}
}
export type Actions =
| Remove
| RemoveSuccess
| RemoveFailure
;