38 lines
773 B
TypeScript
38 lines
773 B
TypeScript
|
import { Action } from '@ngrx/store';
|
||
|
|
||
|
import { RPCClientError } from '@loafer/ng-rpc/protocol';
|
||
|
|
||
|
import { Probe } from '../../model';
|
||
|
|
||
|
|
||
|
export enum ActionType {
|
||
|
Modify = '[probe.detail] Modify',
|
||
|
ModifySuccess = '[probe.detail] ModifySuccess',
|
||
|
ModifyFailure = '[probe.detail] 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 type Actions =
|
||
|
| Modify
|
||
|
| ModifySuccess
|
||
|
| ModifyFailure
|
||
|
;
|