18 lines
456 B
TypeScript
18 lines
456 B
TypeScript
import { APIResponseObject } from "../../types";
|
|
export type APICrudPostParams<T extends {
|
|
[key: string]: any;
|
|
} = {
|
|
[key: string]: any;
|
|
}> = {
|
|
dbName: string;
|
|
tableName: string;
|
|
body: T;
|
|
update?: boolean;
|
|
apiKey?: string;
|
|
};
|
|
export default function apiCrudPOST<T extends {
|
|
[key: string]: any;
|
|
} = {
|
|
[key: string]: any;
|
|
}>({ dbName, tableName, body, update, apiKey, }: APICrudPostParams<T>): Promise<APIResponseObject>;
|