member_webapp/@overflow/noauth/store/noauth-probe/noauth-probe.action.ts

106 lines
2.7 KiB
TypeScript
Raw Normal View History

2018-04-06 11:02:18 +00:00
import { Action } from '@ngrx/store';
2018-05-24 06:44:13 +00:00
import { RPCClientError } from '@loafer/ng-rpc';
2018-04-06 11:02:18 +00:00
2018-05-02 08:09:39 +00:00
import { Domain } from '@overflow/commons-typescript/model/domain';
2018-04-06 11:02:18 +00:00
2018-05-02 08:09:39 +00:00
import { NoAuthProbe } from '@overflow/commons-typescript/model/noauth';
2018-04-06 11:02:18 +00:00
export enum ActionType {
ReadAllByDomain = '[noauth-proboe.noauth-proboe] ReadAllByDomain',
ReadAllByDomainSuccess = '[noauth-proboe.noauth-proboe] ReadAllByDomainSuccess',
ReadAllByDomainFailure = '[noauth-proboe.noauth-proboe] ReadAllByDomainFailure',
Accept = '[noauth-proboe.noauth-proboe] Accept',
AcceptSuccess = '[noauth-proboe.noauth-proboe] AcceptSuccess',
AcceptFailure = '[noauth-proboe.noauth-proboe] AcceptFailure',
Deny = '[noauth-proboe.noauth-proboe] Deny',
DenySuccess = '[noauth-proboe.noauth-proboe] DenySuccess',
DenyFailure = '[noauth-proboe.noauth-proboe] DenyFailure',
2018-05-10 10:54:47 +00:00
OnConnect = '[noauth-proboe.noauth-proboe] OnConnect',
OnDisconnect = '[noauth-proboe.noauth-proboe] OnDisconnect',
2018-04-06 11:02:18 +00:00
}
export class ReadAllByDomain implements Action {
readonly type = ActionType.ReadAllByDomain;
constructor(public payload: Domain) {}
}
export class ReadAllByDomainSuccess implements Action {
readonly type = ActionType.ReadAllByDomainSuccess;
constructor(public payload: NoAuthProbe[]) {}
}
export class ReadAllByDomainFailure implements Action {
readonly type = ActionType.ReadAllByDomainFailure;
constructor(public payload: RPCClientError) {}
}
export class Accept implements Action {
readonly type = ActionType.Accept;
constructor(public payload: NoAuthProbe) {}
}
export class AcceptSuccess implements Action {
readonly type = ActionType.AcceptSuccess;
constructor(public payload: NoAuthProbe[]) {}
}
export class AcceptFailure implements Action {
readonly type = ActionType.AcceptFailure;
constructor(public payload: RPCClientError) {}
}
export class Deny implements Action {
readonly type = ActionType.Deny;
constructor(public payload: NoAuthProbe) {}
}
export class DenySuccess implements Action {
readonly type = ActionType.DenySuccess;
constructor(public payload: NoAuthProbe[]) {}
}
export class DenyFailure implements Action {
readonly type = ActionType.DenyFailure;
constructor(public payload: RPCClientError) {}
}
2018-05-10 10:54:47 +00:00
export class OnConnect implements Action {
readonly type = ActionType.OnConnect;
constructor(public payload: NoAuthProbe) {}
}
export class OnDisconnect implements Action {
readonly type = ActionType.OnDisconnect;
constructor(public payload: NoAuthProbe) {}
}
2018-04-06 11:02:18 +00:00
export type Actions =
| ReadAllByDomain
| ReadAllByDomainSuccess
| ReadAllByDomainFailure
| Accept
| AcceptSuccess
| AcceptFailure
| Deny
| DenySuccess
| DenyFailure
2018-05-10 10:54:47 +00:00
| OnConnect
| OnDisconnect
2018-04-06 11:02:18 +00:00
;