nimbu-js-sdk 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nimbu.js +22 -12
- package/dist/nimbu.min.js +1 -1
- package/dist/sdk/object.js +6 -6
- package/dist/sdk/requests.js +15 -5
- package/dist/sdk/version.js +1 -1
- package/package.json +1 -1
- package/src/sdk/object.coffee +14 -12
- package/src/sdk/requests.coffee +12 -4
- package/build/nimbu.js +0 -8969
- package/build/nimbu.min.js +0 -22
package/dist/nimbu.js
CHANGED
|
@@ -1901,13 +1901,9 @@ _underscore2.default.extend(_NKObject.prototype, _events2.default, {
|
|
|
1901
1901
|
} else {
|
|
1902
1902
|
(attrs = {})[key] = val;
|
|
1903
1903
|
}
|
|
1904
|
-
options = _underscore2.default.extend({
|
|
1905
|
-
validate: true
|
|
1906
|
-
}, options);
|
|
1907
|
-
// Make save({ success: function() {} }) work.
|
|
1908
1904
|
if (!options && attrs) {
|
|
1909
1905
|
extra_keys = _underscore2.default.reject(attrs, function (value, key) {
|
|
1910
|
-
return _underscore2.default.include(["success", "error", "wait"], key);
|
|
1906
|
+
return _underscore2.default.include(["success", "error", "wait", "useACL", "forceChannel", "locale"], key);
|
|
1911
1907
|
});
|
|
1912
1908
|
if (extra_keys.length === 0) {
|
|
1913
1909
|
all_functions = true;
|
|
@@ -1925,6 +1921,9 @@ _underscore2.default.extend(_NKObject.prototype, _events2.default, {
|
|
|
1925
1921
|
}
|
|
1926
1922
|
}
|
|
1927
1923
|
options = _underscore2.default.clone(options) || {};
|
|
1924
|
+
options = _underscore2.default.extend({
|
|
1925
|
+
validate: true
|
|
1926
|
+
}, options);
|
|
1928
1927
|
if (options.wait) {
|
|
1929
1928
|
current = _underscore2.default.clone(this.attributes);
|
|
1930
1929
|
}
|
|
@@ -1963,7 +1962,8 @@ _underscore2.default.extend(_NKObject.prototype, _events2.default, {
|
|
|
1963
1962
|
method: method,
|
|
1964
1963
|
data: json,
|
|
1965
1964
|
useACL: options.useACL,
|
|
1966
|
-
forceChannel: options.forceChannel
|
|
1965
|
+
forceChannel: options.forceChannel,
|
|
1966
|
+
locale: options.locale
|
|
1967
1967
|
});
|
|
1968
1968
|
request = request.then(function (resp, status, xhr) {
|
|
1969
1969
|
var serverAttrs;
|
|
@@ -3792,7 +3792,7 @@ useChaos = false;
|
|
|
3792
3792
|
chaosThreshold = 0.95;
|
|
3793
3793
|
|
|
3794
3794
|
exports.default = _request = function _request(options) {
|
|
3795
|
-
var className, classRoute, currentCustomer, data, dataObject, forceChannel, headers, id, method, path, queryString, route, sessionToken, url, useACL;
|
|
3795
|
+
var className, classRoute, currentCustomer, data, dataObject, forceChannel, headers, id, locale, method, path, queryString, route, sessionToken, url, useACL;
|
|
3796
3796
|
route = options.route;
|
|
3797
3797
|
className = options.className;
|
|
3798
3798
|
id = options.id;
|
|
@@ -3803,6 +3803,7 @@ exports.default = _request = function _request(options) {
|
|
|
3803
3803
|
queryString = options.query;
|
|
3804
3804
|
path = options.path;
|
|
3805
3805
|
forceChannel = options.forceChannel;
|
|
3806
|
+
locale = options.locale;
|
|
3806
3807
|
if (!_global.accessToken) {
|
|
3807
3808
|
throw "You must specify your accessToken using Nimbu.initialize().";
|
|
3808
3809
|
}
|
|
@@ -3816,10 +3817,19 @@ exports.default = _request = function _request(options) {
|
|
|
3816
3817
|
sessionToken = currentCustomer.session_token;
|
|
3817
3818
|
}
|
|
3818
3819
|
}
|
|
3819
|
-
if (useACL
|
|
3820
|
-
queryString
|
|
3821
|
-
|
|
3822
|
-
|
|
3820
|
+
if (useACL) {
|
|
3821
|
+
if (queryString != null) {
|
|
3822
|
+
queryString = queryString + "&use_acl=1";
|
|
3823
|
+
} else {
|
|
3824
|
+
queryString = "use_acl=1";
|
|
3825
|
+
}
|
|
3826
|
+
}
|
|
3827
|
+
if (locale != null) {
|
|
3828
|
+
if (queryString != null) {
|
|
3829
|
+
queryString = queryString + "&content_locale=" + locale;
|
|
3830
|
+
} else {
|
|
3831
|
+
queryString = "content_locale=" + locale;
|
|
3832
|
+
}
|
|
3823
3833
|
}
|
|
3824
3834
|
if (!path) {
|
|
3825
3835
|
if (route !== "batch" && route !== "objects" && route !== "events" && route !== "files" && route !== "functions" && route !== "login" && route !== "push" && route !== "customers" && route !== "jobs") {
|
|
@@ -4886,7 +4896,7 @@ module.exports = function (it) {
|
|
|
4886
4896
|
Object.defineProperty(exports, "__esModule", {
|
|
4887
4897
|
value: true
|
|
4888
4898
|
});
|
|
4889
|
-
exports.default = "1.7.
|
|
4899
|
+
exports.default = "1.7.1";
|
|
4890
4900
|
|
|
4891
4901
|
/***/ }),
|
|
4892
4902
|
/* 24 */
|