2018-04-27 07:31:27 +00:00
|
|
|
import { Action } from '@ngrx/store';
|
|
|
|
|
2018-05-24 06:44:13 +00:00
|
|
|
import { RPCClientError } from '@loafer/ng-rpc';
|
2018-04-27 07:31:27 +00:00
|
|
|
|
2018-05-02 08:09:39 +00:00
|
|
|
import { Probe } from '@overflow/commons-typescript/model/probe';
|
2018-04-27 07:31:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
export enum ActionType {
|
2018-05-02 03:59:45 +00:00
|
|
|
Modify = '[probe.modify] Modify',
|
|
|
|
ModifyDisplayName = '[probe.modify] ModifyDisplayName',
|
|
|
|
ModifySuccess = '[probe.modify] ModifySuccess',
|
|
|
|
ModifyFailure = '[probe.modify] ModifyFailure',
|
2018-04-27 07:31:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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) {}
|
|
|
|
}
|
|
|
|
|
2018-05-02 03:59:45 +00:00
|
|
|
export class ModifyDisplayName implements Action {
|
|
|
|
readonly type = ActionType.ModifyDisplayName;
|
|
|
|
|
|
|
|
constructor(public payload: {id: string, displayName: string}) {}
|
|
|
|
}
|
|
|
|
|
2018-04-27 07:31:27 +00:00
|
|
|
|
|
|
|
export type Actions =
|
|
|
|
| Modify
|
|
|
|
| ModifySuccess
|
|
|
|
| ModifyFailure
|
2018-05-02 03:59:45 +00:00
|
|
|
| ModifyDisplayName
|
2018-04-27 07:31:27 +00:00
|
|
|
;
|