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

es-alchemy

Package Overview
Dependencies
Maintainers
1
Versions
318
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es-alchemy - npm Package Compare versions

Comparing version 10.3.2 to 10.4.0

7

lib/util/rest/data/update.js

@@ -5,3 +5,3 @@ import assert from 'assert';

export default async (call, versions, actions_) => {
export default async (call, versions, actions_, raw) => {
Joi.assert(actions_, Joi.array().items(Joi.object().keys({

@@ -74,3 +74,3 @@ idx: Joi.string().valid(...versions.list()),

if (payload.length === 0) {
return true;
throw new Error('No Actions provided');
}

@@ -84,2 +84,5 @@ const r = await call('POST', '', {

assert(r.statusCode === 200, r.body);
if (raw === true) {
return r.body;
}
if (r.body.errors === false) {

@@ -86,0 +89,0 @@ return true;

@@ -136,3 +136,3 @@ import get from 'lodash.get';

uniques: (idx, field, opts = {}) => dataUniques(call, idx, getFields(idx), field, opts),
update: (opts) => dataUpdate(call, versions, opts),
update: (actions, raw = false) => dataUpdate(call, versions, actions, raw),
version: (idx, id) => dataVersion(call, idx, getMapping(idx), id)

@@ -139,0 +139,0 @@ }

{
"name": "es-alchemy",
"type": "module",
"version": "10.3.2",
"version": "10.4.0",
"description": "Simplification of Opensearch interactions",

@@ -6,0 +6,0 @@ "main": "lib/index.js",

@@ -414,3 +414,3 @@ # ESAlchemy

- `data.uniques(index: String, fields: String[] || String, opts = { filterBy = {}, limit = 20, cursor = null, count = boolean })` - get unique values from index for field, using filter. When count true, the counts per unique are returned
- `data.update(options: Object)` - update or delete documents in Opensearch (all index versions)
- `data.update(actions: Object, raw: Boolean = false)` - update or delete documents in Opensearch (all index versions), raw flag always resolves with full response
- `data.version(index: String, id: String)` - get version number in alias for document or null if document does not exist

@@ -417,0 +417,0 @@

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