2024-11-08 15:44:31 +00:00
|
|
|
export = post;
|
|
|
|
/**
|
2024-12-06 10:44:26 +00:00
|
|
|
* # Make a post request to Datasquirel API
|
2024-11-08 15:44:31 +00:00
|
|
|
* @async
|
|
|
|
*
|
|
|
|
* @param {Object} params - Single object passed
|
|
|
|
* @param {string} [params.key] - FULL ACCESS API Key
|
|
|
|
* @param {string} [params.database] - Database Name
|
|
|
|
* @param {import("../package-shared/types").PostDataPayload | string} params.query - SQL query String or Request Object
|
|
|
|
* @param {any[]} [params.queryValues] - Query Values if using "?" placeholders
|
|
|
|
* @param {string} [params.tableName] - Name of the table to query
|
2024-12-06 10:44:26 +00:00
|
|
|
* @param {boolean} [params.useLocal] - Whether to use a remote database instead of API
|
|
|
|
* @param {boolean} [params.user_id] - User ID
|
2024-11-08 15:44:31 +00:00
|
|
|
*
|
|
|
|
* @returns { Promise<import("../package-shared/types").PostReturn> } - Return Object
|
|
|
|
*/
|
2024-12-06 10:44:26 +00:00
|
|
|
declare function post({ key, query, queryValues, database, tableName, useLocal, user_id, }: {
|
2024-11-08 15:44:31 +00:00
|
|
|
key?: string;
|
|
|
|
database?: string;
|
|
|
|
query: import("../package-shared/types").PostDataPayload | string;
|
|
|
|
queryValues?: any[];
|
|
|
|
tableName?: string;
|
2024-11-18 09:34:08 +00:00
|
|
|
useLocal?: boolean;
|
2024-12-06 10:44:26 +00:00
|
|
|
user_id?: boolean;
|
2024-11-08 15:44:31 +00:00
|
|
|
}): Promise<import("../package-shared/types").PostReturn>;
|