25 lines
630 B
TypeScript
25 lines
630 B
TypeScript
import { APIResponseObject, DsqlCrudQueryObject } from "../types";
|
|
type Param<T extends {
|
|
[k: string]: any;
|
|
} = {
|
|
[k: string]: any;
|
|
}> = {
|
|
key?: string;
|
|
database: string;
|
|
query: DsqlCrudQueryObject<T>;
|
|
table?: string;
|
|
debug?: boolean;
|
|
useLocal?: boolean;
|
|
apiVersion?: string;
|
|
};
|
|
export type ApiGetParams = Param;
|
|
/**
|
|
* # Make a get request to Datasquirel API
|
|
*/
|
|
export default function get<T extends {
|
|
[k: string]: any;
|
|
} = {
|
|
[k: string]: any;
|
|
}, R extends any = any>({ key, database, query, table, debug, useLocal, apiVersion, }: Param<T>): Promise<APIResponseObject<R>>;
|
|
export {};
|