Comparing version 0.7.0 to 0.7.1
@@ -243,5 +243,32 @@ import falcorPathParser from 'falcor-path-syntax'; | ||
}, { | ||
key: 'getOneMyTreeReview', | ||
value: function getOneMyTreeReview() { | ||
var _falcor2; | ||
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
var tree = options.tree; | ||
if (isNil(tree) || isNil(tree.id)) { | ||
return reject(new Error("options.tree.id is required when getting the current user's tree review")); | ||
} | ||
var properties = buildProperties(reviews, options); | ||
var paths = properties.map(function (property) { | ||
var path = falcorPathParser(property); | ||
return concat(['trees', tree.id, 'my_review'], path); | ||
}); | ||
return (_falcor2 = this.falcor).get.apply(_falcor2, _toConsumableArray(paths)).then(function (response) { | ||
return response.json.trees[tree.id].my_review; | ||
}).catch(function (paths) { | ||
var errorMessage = createGetOneErrorMessageFromPaths(paths); | ||
return reject(new Error(errorMessage)); | ||
}); | ||
} | ||
}, { | ||
key: 'getOneTreeReview', | ||
value: function getOneTreeReview() { | ||
var _falcor2; | ||
var _falcor3; | ||
@@ -263,3 +290,3 @@ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
return (_falcor2 = this.falcor).get.apply(_falcor2, _toConsumableArray(paths)).then(function (response) { | ||
return (_falcor3 = this.falcor).get.apply(_falcor3, _toConsumableArray(paths)).then(function (response) { | ||
return response.json.reviews[id]; | ||
@@ -274,3 +301,3 @@ }).catch(function (paths) { | ||
value: function getOneTourTipView() { | ||
var _falcor3; | ||
var _falcor4; | ||
@@ -292,3 +319,3 @@ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
return (_falcor3 = this.falcor).get.apply(_falcor3, _toConsumableArray(paths)).then(function (response) { | ||
return (_falcor4 = this.falcor).get.apply(_falcor4, _toConsumableArray(paths)).then(function (response) { | ||
// TODO: Assumptions | ||
@@ -400,3 +427,3 @@ // - Falcor always returns JSONG in a top level entityName wrapper | ||
value: function updateTreeReview() { | ||
var _falcor4; | ||
var _falcor5; | ||
@@ -430,3 +457,3 @@ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
return (_falcor4 = this.falcor).set.apply(_falcor4, _toConsumableArray(valuePaths)).then(function (response) { | ||
return (_falcor5 = this.falcor).set.apply(_falcor5, _toConsumableArray(valuePaths)).then(function (response) { | ||
var reviews$$1 = response.json.reviews; | ||
@@ -511,2 +538,3 @@ var first = head(keys(reviews$$1)); | ||
401: 'user is not authorized', | ||
403: 'user is forbidden', | ||
404: 'entity does not exist', | ||
@@ -513,0 +541,0 @@ 422: 'entity is not valid', |
{ | ||
"name": "supergloo", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "Easily work with data on the Gloo platform", | ||
@@ -32,3 +32,3 @@ "keywords": [ | ||
"mocha": "3.2.0", | ||
"must": "0.13.2", | ||
"must": "0.13.4", | ||
"nodemon": "1.11.0", | ||
@@ -35,0 +35,0 @@ "rimraf": "2.5.4", |
Sorry, the diff of this file is too big to display
349659
10176