ing
This commit is contained in:
parent
ca017516a1
commit
4f588b21be
|
@ -1,23 +0,0 @@
|
|||
import {
|
||||
Action,
|
||||
} from './action';
|
||||
|
||||
// API Action Type
|
||||
export type ASYNC_REQUEST = '@overflow/commons/async/REQUEST';
|
||||
export const ASYNC_REQUEST: ASYNC_REQUEST = '@overflow/commons/async/REQUEST';
|
||||
|
||||
export interface AsyncRequestPayload {
|
||||
method: string;
|
||||
params?: any[];
|
||||
}
|
||||
|
||||
export type asyncRequestActions = (method: string, ...params: any[]) => Action<AsyncRequestPayload>;
|
||||
export const asyncRequestActions: asyncRequestActions = (method: string, ...params: any[]): Action<AsyncRequestPayload> => {
|
||||
return {
|
||||
type: ASYNC_REQUEST,
|
||||
payload: {
|
||||
method: method,
|
||||
params: params,
|
||||
},
|
||||
};
|
||||
};
|
|
@ -1,23 +0,0 @@
|
|||
import {
|
||||
Action,
|
||||
} from './action';
|
||||
|
||||
// REST Action Type
|
||||
export type REST_REQUEST = '@overflow/commons/rest/REQUEST';
|
||||
export const REST_REQUEST: REST_REQUEST = '@overflow/commons/rest/REQUEST';
|
||||
|
||||
export interface RESTRequestPayload {
|
||||
entry: string;
|
||||
params?: any[];
|
||||
}
|
||||
|
||||
export type restRequestActions = (entry: string, ...params: any[]) => Action<RESTRequestPayload>;
|
||||
export const restRequestActions: restRequestActions = (entry: string, ...params: any[]): Action<RESTRequestPayload> => {
|
||||
return {
|
||||
type: REST_REQUEST,
|
||||
payload: {
|
||||
entry: entry,
|
||||
params: params,
|
||||
},
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue
Block a user