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

43 lines
1.0 KiB
TypeScript

import { Action } from '@ngrx/store';
import { RPCClientError } from '@loafer/ng-rpc';
import { DiscoveryStartInfo } from '@overflow/commons-typescript/model/discovery';
export enum ActionType {
Setting = '[discovery.setting] Setting',
SettingSuccess = '[discovery.setting] SettingSuccess',
SettingFailure = '[discovery.setting] SettingFailure',
SettingRedirect = '[discovery.setting] SettingRedirect',
}
export class Setting implements Action {
readonly type = ActionType.Setting;
constructor(public payload: DiscoveryStartInfo) {}
}
export class SettingSuccess implements Action {
readonly type = ActionType.SettingSuccess;
constructor(public payload: DiscoveryStartInfo) {}
}
export class SettingFailure implements Action {
readonly type = ActionType.SettingFailure;
constructor(public payload: RPCClientError) {}
}
export class SettingRedirect implements Action {
readonly type = ActionType.SettingRedirect;
}
export type Actions =
| Setting
| SettingSuccess
| SettingFailure
| SettingRedirect
;