diff --git a/package.json b/package.json index 7b005ec..16aa32a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasquirel", - "version": "1.1.7", + "version": "1.1.8", "description": "Cloud-based SQL data management tool", "main": "index.js", "scripts": { diff --git a/users/add-user.js b/users/add-user.js index 7cbcca5..d0b6d8d 100644 --- a/users/add-user.js +++ b/users/add-user.js @@ -13,7 +13,7 @@ const https = require("https"); /** ****************************************************************************** */ /** - * @typedef {Promise} FunctionReturn + * @typedef {object} FunctionReturn * @property {boolean} success - Did the function run successfully? * @property {(Object[]|string)} [payload=[]] - Payload */ diff --git a/users/login-user.js b/users/login-user.js index 4a317cb..e60bf68 100644 --- a/users/login-user.js +++ b/users/login-user.js @@ -14,7 +14,7 @@ const encrypt = require("../functions/encrypt"); /** ****************************************************************************** */ /** - * @typedef {Promise} FunctionReturn + * @typedef {object} FunctionReturn * @property {boolean} success - Did the function run successfully? * @property {(Object[]|string)} [payload=[]] - Payload */ diff --git a/users/update-user.js b/users/update-user.js index 74e3f3a..6ac4336 100644 --- a/users/update-user.js +++ b/users/update-user.js @@ -13,7 +13,7 @@ const https = require("https"); /** ****************************************************************************** */ /** - * @typedef {Promise} FunctionReturn + * @typedef {object} FunctionReturn * @property {boolean} success - Did the function run successfully? * @property {(Object[]|string)} [payload=[]] - Payload */ diff --git a/utils/post.js b/utils/post.js index 66e9817..6987281 100644 --- a/utils/post.js +++ b/utils/post.js @@ -27,12 +27,13 @@ const https = require("https"); * @param {Object} params - Single object passed * @param {string} params.key - API Key * @param {string} params.database - Database Name - * @param {(Object | string)} params.query - SQL query String or Request Object - * @param {string} [params.query.action="insert"] - Query action => insert | update | delete - * @param {string} params.query.table - Database table slug - * @param {string} params.query.identifierColumnName - Name of column(or field) to match - * @param {(string | number)} params.query.identifierValue - Value attached to target column(or field) - * @param {Object} params.query.data - data to be inserted: eg. { id: 1267, first_name: John, last_name: Doe } + * @param {({ + * action: [string="insert"], + * table: string, + * identifierColumnName: string, + * identifierValue: (string|number), + * data: object, + * } | string)} params.query - SQL query String or Request Object * * @returns { PostReturn } - Return Object */