spiel-connect
Version:
get all the backend methods to make request easy
28 lines (27 loc) • 871 B
TypeScript
import { RequestConfig } from "spiel-request";
/**
* The type for the method functions
* @see <a href="https://github.com/spieljs/spiel-connect#make-a-request-with-spiel-connect" target="_blank">
* Make a request with Spiel Connect</a>
*/
export declare type RequestFunction = (params?: IParamsConnect | null, query?: object | string | null, body?: object | null) => Promise<any>;
export interface IParamsConnect {
[key: string]: any;
}
export interface IRouterConnect {
name: string;
props: IPropsConnect[];
}
export interface IPropsConnect {
method: string;
name: string;
path: string;
}
/**
* Request options
* @see <a href="https://github.com/spieljs/spiel-connect#config-the-server-connection" target="_blank">
* Config the server connection</a>
*/
export interface IRequestConfigConnect extends RequestConfig {
domain: string;
}