Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aicore/coco-db-client

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aicore/coco-db-client - npm Package Compare versions

Comparing version 1.0.13 to 1.0.14

20

package.json
{
"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) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc