@elastic.io/oih-standard-library
Advanced tools
Comparing version 1.1.0-pre2 to 1.1.0-pre3
# 1.1.0 (May 22, 2020) | ||
Improve lookup objects. Allow overriding fields and order enums | ||
Add Lookup Set of Objects Pattern. | ||
Improve delete object by unique criteria. | ||
# 1.0.3 (April 17, 2020) | ||
@@ -5,0 +6,0 @@ Improve lookup objects. Allow overriding conditions and order enums |
@@ -67,3 +67,3 @@ "use strict"; | ||
this.logger.trace('Incoming snapshot: %j', snapshot); | ||
const criteria = this.getCriteria(msg, cfg); | ||
const criteria = await this.getCriteria(msg, cfg); | ||
const type = this.getType(cfg, msg); | ||
@@ -82,4 +82,4 @@ this.logger.trace('Start deleting object with criteria: %j and type: %j', criteria, type); | ||
this.logger.trace('Start deleting object: %j', object); | ||
const deletedId = await this.deleteObject(object, cfg, msg); | ||
if (deletedId === null) { | ||
const result = await this.deleteObject(object, cfg, msg); | ||
if (result === null) { | ||
this.logger.trace('Object with unique criteria: %j and type: %j was not deleted or not found. Returning empty object', criteria, type); | ||
@@ -91,3 +91,3 @@ this.logger.info('Finished processing deleteByUniqueCriteria action'); | ||
this.logger.info('Finished processing deleteByUniqueCriteria action'); | ||
return messages.newMessageWithBody({ id: deletedId }); | ||
return messages.newMessageWithBody({ result }); | ||
} | ||
@@ -94,0 +94,0 @@ catch (e) { |
@@ -88,3 +88,3 @@ import { ID, OBJECT_TYPE, UNIQUE_CRITERIA } from '../constants'; | ||
this.logger.trace('Incoming snapshot: %j', snapshot); | ||
const criteria = this.getCriteria(msg, cfg); | ||
const criteria = await this.getCriteria(msg, cfg); | ||
const type = this.getType(cfg, msg); | ||
@@ -103,4 +103,4 @@ this.logger.trace('Start deleting object with criteria: %j and type: %j', criteria, type); | ||
this.logger.trace('Start deleting object: %j', object); | ||
const deletedId = await this.deleteObject(object, cfg, msg); | ||
if (deletedId === null) { | ||
const result = await this.deleteObject(object, cfg, msg); | ||
if (result === null) { | ||
this.logger.trace('Object with unique criteria: %j and type: %j was not deleted or not found. Returning empty object', criteria, type); | ||
@@ -112,3 +112,3 @@ this.logger.info('Finished processing deleteByUniqueCriteria action'); | ||
this.logger.info('Finished processing deleteByUniqueCriteria action'); | ||
return messages.newMessageWithBody({ id: deletedId }); | ||
return messages.newMessageWithBody({ result }); | ||
} catch (e) { | ||
@@ -115,0 +115,0 @@ this.logger.error('Unexpected error while processing delete call for message: %j', msg, e); |
{ | ||
"name": "@elastic.io/oih-standard-library", | ||
"version": "1.1.0-pre2", | ||
"version": "1.1.0-pre3", | ||
"description": "Library for OIH standards implementation", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
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
226334