@aicore/coco-db-client
Advanced tools
Comparing version 1.0.13 to 1.0.14
{ | ||
"name": "@aicore/coco-db-client", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"description": "JS client for cocoDb", | ||
@@ -52,17 +52,17 @@ "main": "src/index.js", | ||
"devDependencies": { | ||
"@commitlint/cli": "17.1.2", | ||
"@commitlint/config-conventional": "17.1.0", | ||
"@commitlint/cli": "17.3.0", | ||
"@commitlint/config-conventional": "17.3.0", | ||
"c8": "7.12.0", | ||
"chai": "4.3.6", | ||
"chai": "4.3.7", | ||
"cli-color": "2.0.3", | ||
"documentation": "14.0.0", | ||
"eslint": "8.25.0", | ||
"documentation": "14.0.1", | ||
"eslint": "8.31.0", | ||
"glob": "8.0.3", | ||
"husky": "8.0.1", | ||
"mocha": "10.0.0" | ||
"husky": "8.0.3", | ||
"mocha": "10.2.0" | ||
}, | ||
"dependencies": { | ||
"node-fetch": "3.2.10", | ||
"@aicore/libcommonutils": "1.0.18" | ||
"node-fetch": "3.3.0", | ||
"@aicore/libcommonutils": "1.0.19" | ||
} | ||
} |
@@ -169,5 +169,10 @@ // @INCLUDE_IN_API_DOCS | ||
* @param queryObject - This is the object that you want to query. | ||
* @param {Object} options Optional parameter to add pagination. | ||
* @param {number} options.pageOffset specify which row to start retrieving documents from. Eg: to get 10 documents from | ||
* the 100'th document, you should specify `pageOffset = 100` and `pageLimit = 10` | ||
* @param {number} options.pageLimit specify number of documents to retrieve. Eg: to get 10 documents from | ||
* the 100'th document, you should specify `pageOffset = 100` and `pageLimit = 10` | ||
* @returns A promise | ||
*/ | ||
export function getFromNonIndex(tableName, queryObject = {}) { | ||
export function getFromNonIndex(tableName, queryObject = {}, options = {}) { | ||
if (isStringEmpty(tableName)) { | ||
@@ -178,3 +183,4 @@ throw new Error('Please provide valid table Name'); | ||
tableName: tableName, | ||
queryObject: queryObject | ||
queryObject: queryObject, | ||
options | ||
}); | ||
@@ -187,5 +193,10 @@ } | ||
* @param queryObject - This is the object that you want to query on. | ||
* @param {Object} options Optional parameter to add pagination. | ||
* @param {number} options.pageOffset specify which row to start retrieving documents from. Eg: to get 10 documents from | ||
* the 100'th document, you should specify `pageOffset = 100` and `pageLimit = 10` | ||
* @param {number} options.pageLimit specify number of documents to retrieve. Eg: to get 10 documents from | ||
* the 100'th document, you should specify `pageOffset = 100` and `pageLimit = 10` | ||
* @returns A promise | ||
*/ | ||
export function getFromIndex(tableName, queryObject) { | ||
export function getFromIndex(tableName, queryObject, options = {}) { | ||
if (isStringEmpty(tableName)) { | ||
@@ -199,3 +210,4 @@ throw new Error('Please provide valid table Name'); | ||
tableName: tableName, | ||
queryObject: queryObject | ||
queryObject: queryObject, | ||
options | ||
}); | ||
@@ -262,5 +274,10 @@ } | ||
* @param {Array<string>}[useIndexForFields=null] - This is an array of fields that you want to use the index for. | ||
* @param {Object} options Optional parameter to add pagination. | ||
* @param {number} options.pageOffset specify which row to start retrieving documents from. Eg: to get 10 documents from | ||
* the 100'th document, you should specify `pageOffset = 100` and `pageLimit = 10` | ||
* @param {number} options.pageLimit specify number of documents to retrieve. Eg: to get 10 documents from | ||
* the 100'th document, you should specify `pageOffset = 100` and `pageLimit = 10` | ||
* @returns A promise | ||
*/ | ||
export function query(tableName, queryString, useIndexForFields = null) { | ||
export function query(tableName, queryString, useIndexForFields = null, options ={}) { | ||
if (isStringEmpty(tableName)) { | ||
@@ -275,3 +292,4 @@ throw new Error('Please provide valid table Name'); | ||
tableName: tableName, | ||
queryString: queryString | ||
queryString: queryString, | ||
options | ||
}); | ||
@@ -282,4 +300,5 @@ } | ||
queryString: queryString, | ||
useIndexForFields: useIndexForFields | ||
useIndexForFields: useIndexForFields, | ||
options | ||
}); | ||
} |
@@ -77,3 +77,2 @@ import {isString} from "@aicore/libcommonutils"; | ||
const body = await response.text(); | ||
console.log(JSON.parse(body)); | ||
return body ? JSON.parse(body) : {}; | ||
@@ -109,6 +108,3 @@ } catch (e) { | ||
}); | ||
const data = await response.json(); | ||
console.log(typeof data); | ||
console.log(data); | ||
return data; | ||
return await response.json(); | ||
@@ -115,0 +111,0 @@ } catch (e) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60565
426
+ Added@aicore/libcommonutils@1.0.19(transitive)
+ Addednode-fetch@3.3.0(transitive)
- Removed@aicore/libcommonutils@1.0.18(transitive)
- Removednode-fetch@3.2.10(transitive)
Updatednode-fetch@3.3.0