backendless 6.5.2 → 6.5.4

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/backendless.d.ts CHANGED
@@ -336,7 +336,7 @@ declare module Backendless {
336
336
 
337
337
  delete(keys: Array<string>): Promise<void>;
338
338
 
339
- exists(keys: Array<string>): Promise<number>;
339
+ exist(keys: Array<string>): Promise<number>;
340
340
 
341
341
  touch(keys: Array<string>): Promise<void>;
342
342
  }
@@ -350,7 +350,7 @@ declare module Backendless {
350
350
 
351
351
  rename(newKeyName: string, overwrite?: boolean): Promise<void>;
352
352
 
353
- exists(): Promise<boolean>;
353
+ exist(): Promise<boolean>;
354
354
 
355
355
  getExpiration(): Promise<number>;
356
356
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ********************************************************************************************************************
3
- * Backendless SDK for JavaScript. Version: 6.5.2
3
+ * Backendless SDK for JavaScript. Version: 6.5.4
4
4
  *
5
5
  * Copyright 2012-2022 BACKENDLESS.COM. All Rights Reserved.
6
6
  *
@@ -1245,6 +1245,12 @@ var sendXmlHttpRequest = function sendXmlHttpRequest(path, method, headers, body
1245
1245
  });
1246
1246
  };
1247
1247
 
1248
+ function encodePathname(pathname) {
1249
+ return pathname.split('/').map(function (v) {
1250
+ return encodeURIComponent(decodeURIComponent(v));
1251
+ }).join('/');
1252
+ }
1253
+
1248
1254
  var sendNodeAPIRequest = function sendNodeAPIRequest(path, method, headers, body, encoding, timeout) {
1249
1255
  return new Promise(function (resolve, reject) {
1250
1256
  var u = __webpack_require__(7).parse(path);
@@ -1254,7 +1260,7 @@ var sendNodeAPIRequest = function sendNodeAPIRequest(path, method, headers, body
1254
1260
  var options = {
1255
1261
  host: u.hostname,
1256
1262
  port: u.port || (https ? 443 : 80),
1257
- path: encodeURI(decodeURI(u.pathname)) + (u.search || ''),
1263
+ path: encodePathname(u.pathname) + (u.search || ''),
1258
1264
  method: method,
1259
1265
  headers: headers,
1260
1266
  timeout: timeout
@@ -18713,16 +18719,16 @@ var HiveStore = /*#__PURE__*/function () {
18713
18719
  return this.constructor["delete"].call(_objectSpread(_objectSpread({}, this), this.constructor), [this.storeKey]);
18714
18720
  }
18715
18721
  }, {
18716
- key: "exists",
18722
+ key: "exist",
18717
18723
  value: function () {
18718
- var _exists = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
18724
+ var _exist = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
18719
18725
  var result;
18720
18726
  return _regenerator["default"].wrap(function _callee$(_context) {
18721
18727
  while (1) {
18722
18728
  switch (_context.prev = _context.next) {
18723
18729
  case 0:
18724
18730
  _context.next = 2;
18725
- return this.constructor.exists.call(_objectSpread(_objectSpread({}, this), this.constructor), [this.storeKey]);
18731
+ return this.constructor.exist.call(_objectSpread(_objectSpread({}, this), this.constructor), [this.storeKey]);
18726
18732
 
18727
18733
  case 2:
18728
18734
  result = _context.sent;
@@ -18736,11 +18742,11 @@ var HiveStore = /*#__PURE__*/function () {
18736
18742
  }, _callee, this);
18737
18743
  }));
18738
18744
 
18739
- function exists() {
18740
- return _exists.apply(this, arguments);
18745
+ function exist() {
18746
+ return _exist.apply(this, arguments);
18741
18747
  }
18742
18748
 
18743
- return exists;
18749
+ return exist;
18744
18750
  }()
18745
18751
  }, {
18746
18752
  key: "rename",
@@ -18883,14 +18889,14 @@ var HiveStore = /*#__PURE__*/function () {
18883
18889
  });
18884
18890
  }
18885
18891
  }, {
18886
- key: "exists",
18887
- value: function exists(keys) {
18892
+ key: "exist",
18893
+ value: function exist(keys) {
18888
18894
  if (!Array.isArray(keys)) {
18889
18895
  throw new Error('Keys must be provided and must be a list of strings.');
18890
18896
  }
18891
18897
 
18892
18898
  return this.app.request.post({
18893
- url: "".concat(this.app.urls.hiveStore(this.hiveName, this.TYPE), "/action/exists"),
18899
+ url: "".concat(this.app.urls.hiveStore(this.hiveName, this.TYPE), "/action/exist"),
18894
18900
  data: keys
18895
18901
  });
18896
18902
  }
@@ -18911,7 +18917,7 @@ var HiveStore = /*#__PURE__*/function () {
18911
18917
  }();
18912
18918
 
18913
18919
  exports.HiveStore = HiveStore;
18914
- (0, _defineProperty2["default"])(HiveStore, "STATIC_METHODS", ['keys', 'delete', 'exists', 'touch']);
18920
+ (0, _defineProperty2["default"])(HiveStore, "STATIC_METHODS", ['keys', 'delete', 'exist', 'touch']);
18915
18921
 
18916
18922
  /***/ }),
18917
18923
 
@@ -24943,8 +24949,8 @@ var Urls = /*#__PURE__*/function () {
24943
24949
  }
24944
24950
  }, {
24945
24951
  key: "userRestorePassword",
24946
- value: function userRestorePassword(email) {
24947
- return "".concat(this.users(), "/restorepassword/").concat(encodeURIComponent(email));
24952
+ value: function userRestorePassword(identity) {
24953
+ return "".concat(this.users(), "/restorepassword/").concat(encodeURIComponent(identity));
24948
24954
  }
24949
24955
  }, {
24950
24956
  key: "userTokenCheck",