directus-sdk-javascript
Advanced tools
Comparing version 2.1.0 to 2.2.0-0
{ | ||
"name": "directus-sdk-javascript", | ||
"version": "2.1.0", | ||
"version": "2.2.0-0", | ||
"description": "WIP - Directus SDK for JavaScript (Node and Browser)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -112,2 +112,29 @@ const axios = require('axios'); | ||
createBulk(table = requiredParam('table'), data = requiredParam('data')) { | ||
if (Array.isArray(data) === false) | ||
throw new Error(`Parameter data should be an array of objects`); | ||
return this._post(`tables/${table}/bulk`, { | ||
rows: data | ||
}); | ||
} | ||
updateBulk(table = requiredParam('table'), data = requiredParam('data')) { | ||
if (Array.isArray(data) === false) | ||
throw new Error(`Parameter data should be an array of objects`); | ||
return this._put(`tables/${table}/bulk`, { | ||
rows: data | ||
}); | ||
} | ||
deleteBulk(table = requiredParam('table'), data = requiredParam('data')) { | ||
if (Array.isArray(data) === false) | ||
throw new Error(`Parameter data should be an array of objects`); | ||
return this._delete(`tables/${table}/bulk`, { | ||
rows: data | ||
}); | ||
} | ||
// Files | ||
@@ -114,0 +141,0 @@ // ---------------------------------------------------------------------------------- |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
45192
249
6
2