import { ErrorResponse } from "../../../utils"; import { State } from "./state"; import { Action as TAction, StoreDispatchProps } from "../../../Store"; import { Dispatch } from "redux"; export declare namespace Actions { const REQUEST_GET = "io/request/alertsRecent/get"; const REQUEST_POST = "io/request/alertsRecent/post"; const RESPONSE_GET = "io/response/alertsRecent/get"; const RESPONSE_POST = "io/response/alertsRecent/post"; const EDIT = "io/edit/alertsRecent"; const POLL_START = "io/poll/alertsRecent/start"; const POLL_STOP = "io/poll/alertsRecent/stop"; const ALERT_SET = "io/alertsRecent/set/alert"; const ALERT_CLR = "io/alertsRecent/clr/alert"; const ALERT_CANCEL = "io/alertsRecent/clr/cancel"; type Requests = GetRequest | PostRequest; interface GetRequest extends TAction { } interface PostRequest extends TAction { data: Partial; } interface GetResponse extends TAction { data: State.ServerResponse; diff?: number; } interface PostResponse extends TAction { data: ErrorResponse; } interface Edit extends TAction { data: Partial; } interface AlertSet extends TAction { data: State.AlertRecentServer; } interface AlertCancel extends TAction { pending?: number; } interface AlertClr extends TAction { } interface PollStart extends TAction { } interface PollStop extends TAction { } interface DispatchProps extends StoreDispatchProps { } const getRequest: (payload?: Pick | undefined) => GetRequest; const getResponse: (payload?: Pick | undefined) => GetResponse; const postRequest: (payload?: Pick | undefined) => PostRequest; const postResponse: (payload?: Pick | undefined) => PostResponse; const edit: (payload?: Pick | undefined) => Edit; const pollStart: (payload?: Pick | undefined) => PollStart; const pollStop: (payload?: Pick | undefined) => PollStop; const alertSet: (payload?: Pick | undefined) => AlertSet; const alertClr: (payload?: Pick | undefined) => AlertClr; const alertCancel: (payload?: Pick | undefined) => AlertCancel; function fetchRequest(): GetRequest; function fetchRequest(data: Partial): PostRequest; const bindDispatchProps: (dispatch: Dispatch) => { edit: (data: Partial) => Edit; fetch: (data?: Partial | undefined) => Requests; poll: (p: boolean) => PollStart | PollStop; close: () => AlertClr; cancel: () => AlertCancel; }; } export default Actions;