backendless 6.7.0 → 6.7.1-dev.2

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.
Files changed (159) hide show
  1. package/backendless.d.ts +5 -0
  2. package/dist/backendless.js +20966 -23929
  3. package/dist/backendless.js.map +1 -1
  4. package/dist/backendless.min.js +2 -2
  5. package/es/bl/constants.js +0 -2
  6. package/es/bl/custom-services.js +40 -65
  7. package/es/bl/events.js +30 -52
  8. package/es/bl/index.js +3 -9
  9. package/es/cache/index.js +125 -189
  10. package/es/commerce/index.js +78 -119
  11. package/es/counters/counter.js +0 -8
  12. package/es/counters/index.js +171 -258
  13. package/es/data/data-query-builder.js +2 -39
  14. package/es/data/geo/geo-constructor.js +5 -26
  15. package/es/data/geo/geo-json-parser.js +0 -7
  16. package/es/data/geo/geometry.js +4 -13
  17. package/es/data/geo/linestring.js +4 -21
  18. package/es/data/geo/point.js +4 -22
  19. package/es/data/geo/polygon.js +4 -30
  20. package/es/data/geo/spatial-reference-system.js +1 -7
  21. package/es/data/geo/wkt-parser.js +0 -10
  22. package/es/data/geo/wkt-to-geojson.js +4 -44
  23. package/es/data/group-query-builder.js +0 -23
  24. package/es/data/index.js +17 -54
  25. package/es/data/json-update-builder.js +0 -18
  26. package/es/data/load-relations-query-builder.js +0 -16
  27. package/es/data/persmission.js +0 -16
  28. package/es/data/rt-handlers.js +1 -46
  29. package/es/data/store.js +316 -518
  30. package/es/decorators/deprecated.js +2 -5
  31. package/es/decorators/index.js +0 -2
  32. package/es/device/index.js +3 -8
  33. package/es/expression.js +29 -0
  34. package/es/files/index.js +354 -493
  35. package/es/files/persmission.js +0 -15
  36. package/es/files/utils.js +32 -55
  37. package/es/hive/index.js +1 -13
  38. package/es/hive/stores/base-store.js +14 -50
  39. package/es/hive/stores/index.js +0 -10
  40. package/es/hive/stores/key-value.js +4 -37
  41. package/es/hive/stores/list.js +0 -32
  42. package/es/hive/stores/map.js +0 -34
  43. package/es/hive/stores/set.js +0 -29
  44. package/es/hive/stores/sorted-set.js +19 -94
  45. package/es/hive/utils.js +0 -2
  46. package/es/index.js +51 -71
  47. package/es/local-cache/index.js +0 -10
  48. package/es/local-cache/local-storage.js +1 -9
  49. package/es/local-cache/virtual-storage.js +0 -6
  50. package/es/logging/index.js +21 -46
  51. package/es/logging/logger.js +0 -6
  52. package/es/management/data.js +0 -8
  53. package/es/management/index.js +3 -7
  54. package/es/messaging/channel/index.js +0 -27
  55. package/es/messaging/helpers/body-parts.js +3 -6
  56. package/es/messaging/helpers/delivery-options.js +3 -6
  57. package/es/messaging/helpers/email-envelope.js +13 -25
  58. package/es/messaging/helpers/index.js +10 -16
  59. package/es/messaging/helpers/publish-options.js +3 -6
  60. package/es/messaging/index.js +213 -317
  61. package/es/persmission.js +7 -16
  62. package/es/request/index.js +2 -16
  63. package/es/rso/connection.js +3 -34
  64. package/es/rso/index.js +0 -7
  65. package/es/rt.js +21 -52
  66. package/es/unit-of-work/constants.js +1 -1
  67. package/es/unit-of-work/index.js +27 -145
  68. package/es/unit-of-work/json-adapter.js +14 -35
  69. package/es/unit-of-work/op-result-value-reference.js +1 -11
  70. package/es/unit-of-work/op-result.js +2 -13
  71. package/es/urls.js +18 -15
  72. package/es/user-agent.js +0 -7
  73. package/es/users/index.js +345 -552
  74. package/es/users/roles.js +79 -128
  75. package/es/users/social/container.js +0 -16
  76. package/es/users/social/index.js +166 -250
  77. package/es/users/user.js +2 -9
  78. package/es/users/utils.js +0 -3
  79. package/es/utils.js +0 -17
  80. package/lib/bl/constants.js +0 -2
  81. package/lib/bl/custom-services.js +40 -65
  82. package/lib/bl/events.js +30 -52
  83. package/lib/bl/index.js +3 -9
  84. package/lib/cache/index.js +125 -189
  85. package/lib/commerce/index.js +78 -119
  86. package/lib/counters/counter.js +0 -8
  87. package/lib/counters/index.js +171 -258
  88. package/lib/data/data-query-builder.js +2 -39
  89. package/lib/data/geo/geo-constructor.js +5 -26
  90. package/lib/data/geo/geo-json-parser.js +0 -7
  91. package/lib/data/geo/geometry.js +4 -13
  92. package/lib/data/geo/linestring.js +4 -21
  93. package/lib/data/geo/point.js +4 -22
  94. package/lib/data/geo/polygon.js +4 -30
  95. package/lib/data/geo/spatial-reference-system.js +1 -7
  96. package/lib/data/geo/wkt-parser.js +0 -10
  97. package/lib/data/geo/wkt-to-geojson.js +4 -44
  98. package/lib/data/group-query-builder.js +0 -23
  99. package/lib/data/index.js +17 -54
  100. package/lib/data/json-update-builder.js +0 -18
  101. package/lib/data/load-relations-query-builder.js +0 -16
  102. package/lib/data/persmission.js +0 -16
  103. package/lib/data/rt-handlers.js +1 -46
  104. package/lib/data/store.js +316 -518
  105. package/lib/decorators/deprecated.js +2 -5
  106. package/lib/decorators/index.js +0 -2
  107. package/lib/device/index.js +3 -8
  108. package/lib/expression.js +29 -0
  109. package/lib/files/index.js +354 -493
  110. package/lib/files/persmission.js +0 -15
  111. package/lib/files/utils.js +32 -55
  112. package/lib/hive/index.js +1 -13
  113. package/lib/hive/stores/base-store.js +14 -50
  114. package/lib/hive/stores/index.js +0 -10
  115. package/lib/hive/stores/key-value.js +4 -37
  116. package/lib/hive/stores/list.js +0 -32
  117. package/lib/hive/stores/map.js +0 -34
  118. package/lib/hive/stores/set.js +0 -29
  119. package/lib/hive/stores/sorted-set.js +19 -94
  120. package/lib/hive/utils.js +0 -2
  121. package/lib/index.js +51 -71
  122. package/lib/local-cache/index.js +0 -10
  123. package/lib/local-cache/local-storage.js +1 -9
  124. package/lib/local-cache/virtual-storage.js +0 -6
  125. package/lib/logging/index.js +21 -46
  126. package/lib/logging/logger.js +0 -6
  127. package/lib/management/data.js +0 -8
  128. package/lib/management/index.js +3 -7
  129. package/lib/messaging/channel/index.js +0 -27
  130. package/lib/messaging/helpers/body-parts.js +3 -6
  131. package/lib/messaging/helpers/delivery-options.js +3 -6
  132. package/lib/messaging/helpers/email-envelope.js +13 -25
  133. package/lib/messaging/helpers/index.js +10 -16
  134. package/lib/messaging/helpers/publish-options.js +3 -6
  135. package/lib/messaging/index.js +213 -317
  136. package/lib/persmission.js +7 -16
  137. package/lib/request/index.js +2 -16
  138. package/lib/rso/connection.js +3 -34
  139. package/lib/rso/index.js +0 -7
  140. package/lib/rt.js +21 -52
  141. package/lib/unit-of-work/constants.js +1 -1
  142. package/lib/unit-of-work/index.js +27 -145
  143. package/lib/unit-of-work/json-adapter.js +14 -35
  144. package/lib/unit-of-work/op-result-value-reference.js +1 -11
  145. package/lib/unit-of-work/op-result.js +2 -13
  146. package/lib/urls.js +18 -15
  147. package/lib/user-agent.js +0 -7
  148. package/lib/users/index.js +345 -552
  149. package/lib/users/roles.js +79 -128
  150. package/lib/users/social/container.js +0 -16
  151. package/lib/users/social/index.js +166 -250
  152. package/lib/users/user.js +2 -9
  153. package/lib/users/utils.js +0 -3
  154. package/lib/utils.js +0 -17
  155. package/package.json +16 -16
  156. package/src/data/store.js +3 -1
  157. package/src/expression.js +16 -0
  158. package/src/files/utils.js +1 -1
  159. package/src/index.js +5 -0
@@ -15,9 +15,7 @@ exports.ExecutionTypes = ExecutionTypes;
15
15
  var executionTypesList = Object.keys(ExecutionTypes).map(function (k) {
16
16
  return ExecutionTypes[k];
17
17
  });
18
-
19
18
  var isExecutionType = function isExecutionType(type) {
20
19
  return executionTypesList.includes(type);
21
20
  };
22
-
23
21
  exports.isExecutionType = isExecutionType;
@@ -1,101 +1,76 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
-
10
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
-
12
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
-
14
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
15
-
16
11
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
17
-
18
12
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
19
-
20
13
  var _constants = require("./constants");
21
-
22
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
23
-
24
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
25
-
14
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
15
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
26
16
  var CustomServices = /*#__PURE__*/function () {
27
17
  function CustomServices(app) {
28
18
  (0, _classCallCheck2["default"])(this, CustomServices);
29
19
  this.app = app;
30
20
  }
31
-
32
21
  (0, _createClass2["default"])(CustomServices, [{
33
22
  key: "invoke",
34
23
  value: function () {
35
24
  var _invoke = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(serviceName, methodName, parameters, options) {
36
25
  var headers;
37
26
  return _regenerator["default"].wrap(function _callee$(_context) {
38
- while (1) {
39
- switch (_context.prev = _context.next) {
40
- case 0:
41
- if (!(!serviceName || typeof serviceName !== 'string')) {
42
- _context.next = 2;
43
- break;
44
- }
45
-
46
- throw new Error('Service Name must be provided and must be a string.');
47
-
48
- case 2:
49
- if (!(!methodName || typeof methodName !== 'string')) {
50
- _context.next = 4;
51
- break;
52
- }
53
-
54
- throw new Error('Method Name must be provided and must be a string.');
55
-
56
- case 4:
57
- if (typeof options === 'string') {
58
- options = {
59
- executionType: options
60
- };
61
- }
62
-
63
- if (typeof parameters === 'string' && (0, _constants.isExecutionType)(parameters)) {
64
- options = {
65
- executionType: parameters
66
- };
67
- parameters = undefined;
68
- }
69
-
70
- options = options || {};
71
- headers = _objectSpread({}, options.httpRequestHeaders);
72
-
73
- if (options.executionType) {
74
- headers[_constants.EXECUTION_TYPE_HEADER] = options.executionType;
75
- }
76
-
77
- return _context.abrupt("return", this.app.request.post({
78
- url: this.app.urls.blServiceMethod(serviceName, methodName),
79
- data: parameters,
80
- headers: headers
81
- }));
82
-
83
- case 10:
84
- case "end":
85
- return _context.stop();
86
- }
27
+ while (1) switch (_context.prev = _context.next) {
28
+ case 0:
29
+ if (!(!serviceName || typeof serviceName !== 'string')) {
30
+ _context.next = 2;
31
+ break;
32
+ }
33
+ throw new Error('Service Name must be provided and must be a string.');
34
+ case 2:
35
+ if (!(!methodName || typeof methodName !== 'string')) {
36
+ _context.next = 4;
37
+ break;
38
+ }
39
+ throw new Error('Method Name must be provided and must be a string.');
40
+ case 4:
41
+ if (typeof options === 'string') {
42
+ options = {
43
+ executionType: options
44
+ };
45
+ }
46
+ if (typeof parameters === 'string' && (0, _constants.isExecutionType)(parameters)) {
47
+ options = {
48
+ executionType: parameters
49
+ };
50
+ parameters = undefined;
51
+ }
52
+ options = options || {};
53
+ headers = _objectSpread({}, options.httpRequestHeaders);
54
+ if (options.executionType) {
55
+ headers[_constants.EXECUTION_TYPE_HEADER] = options.executionType;
56
+ }
57
+ return _context.abrupt("return", this.app.request.post({
58
+ url: this.app.urls.blServiceMethod(serviceName, methodName),
59
+ data: parameters,
60
+ headers: headers
61
+ }));
62
+ case 10:
63
+ case "end":
64
+ return _context.stop();
87
65
  }
88
66
  }, _callee, this);
89
67
  }));
90
-
91
68
  function invoke(_x, _x2, _x3, _x4) {
92
69
  return _invoke.apply(this, arguments);
93
70
  }
94
-
95
71
  return invoke;
96
72
  }()
97
73
  }]);
98
74
  return CustomServices;
99
75
  }();
100
-
101
76
  exports["default"] = CustomServices;
package/es/bl/events.js CHANGED
@@ -1,88 +1,66 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
-
10
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
-
12
9
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
13
-
14
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
15
-
16
11
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
17
-
18
12
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
19
-
20
13
  var _constants = require("./constants");
21
-
22
14
  var Events = /*#__PURE__*/function () {
23
15
  function Events(app) {
24
16
  (0, _classCallCheck2["default"])(this, Events);
25
17
  this.app = app;
26
18
  }
27
-
28
19
  (0, _createClass2["default"])(Events, [{
29
20
  key: "dispatch",
30
21
  value: function () {
31
22
  var _dispatch = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(eventName, eventArgs, executionType) {
32
23
  var headers;
33
24
  return _regenerator["default"].wrap(function _callee$(_context) {
34
- while (1) {
35
- switch (_context.prev = _context.next) {
36
- case 0:
37
- if (!(!eventName || typeof eventName !== 'string')) {
38
- _context.next = 2;
39
- break;
40
- }
41
-
42
- throw new Error('Event Name must be provided and must be a string.');
43
-
44
- case 2:
45
- if (typeof eventArgs === 'string' && (0, _constants.isExecutionType)(eventArgs)) {
46
- executionType = eventArgs;
47
- eventArgs = undefined;
48
- }
49
-
50
- if (!(eventArgs && ((0, _typeof2["default"])(eventArgs) !== 'object' || Array.isArray(eventArgs)))) {
51
- _context.next = 5;
52
- break;
53
- }
54
-
55
- throw new Error('Event Arguments must be an object.');
56
-
57
- case 5:
58
- headers = {};
59
-
60
- if (executionType) {
61
- headers[_constants.EXECUTION_TYPE_HEADER] = executionType;
62
- }
63
-
64
- return _context.abrupt("return", this.app.request.post({
65
- url: this.app.urls.blEvent(eventName),
66
- data: eventArgs || {},
67
- headers: headers
68
- }));
69
-
70
- case 8:
71
- case "end":
72
- return _context.stop();
73
- }
25
+ while (1) switch (_context.prev = _context.next) {
26
+ case 0:
27
+ if (!(!eventName || typeof eventName !== 'string')) {
28
+ _context.next = 2;
29
+ break;
30
+ }
31
+ throw new Error('Event Name must be provided and must be a string.');
32
+ case 2:
33
+ if (typeof eventArgs === 'string' && (0, _constants.isExecutionType)(eventArgs)) {
34
+ executionType = eventArgs;
35
+ eventArgs = undefined;
36
+ }
37
+ if (!(eventArgs && ((0, _typeof2["default"])(eventArgs) !== 'object' || Array.isArray(eventArgs)))) {
38
+ _context.next = 5;
39
+ break;
40
+ }
41
+ throw new Error('Event Arguments must be an object.');
42
+ case 5:
43
+ headers = {};
44
+ if (executionType) {
45
+ headers[_constants.EXECUTION_TYPE_HEADER] = executionType;
46
+ }
47
+ return _context.abrupt("return", this.app.request.post({
48
+ url: this.app.urls.blEvent(eventName),
49
+ data: eventArgs || {},
50
+ headers: headers
51
+ }));
52
+ case 8:
53
+ case "end":
54
+ return _context.stop();
74
55
  }
75
56
  }, _callee, this);
76
57
  }));
77
-
78
58
  function dispatch(_x, _x2, _x3) {
79
59
  return _dispatch.apply(this, arguments);
80
60
  }
81
-
82
61
  return dispatch;
83
62
  }()
84
63
  }]);
85
64
  return Events;
86
65
  }();
87
-
88
66
  exports["default"] = Events;
package/es/bl/index.js CHANGED
@@ -1,27 +1,21 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
-
8
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
9
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
-
12
10
  var _constants = require("./constants");
13
-
14
11
  var _customServices = _interopRequireDefault(require("./custom-services"));
15
-
16
12
  var _events = _interopRequireDefault(require("./events"));
17
-
18
- var BL = function BL(app) {
13
+ var BL = /*#__PURE__*/(0, _createClass2["default"])(function BL(app) {
19
14
  (0, _classCallCheck2["default"])(this, BL);
20
15
  this.app = app;
21
16
  this.ExecutionTypes = _constants.ExecutionTypes;
22
17
  this.CustomServices = new _customServices["default"](app);
23
18
  this.Events = new _events["default"](app);
24
- };
25
-
19
+ });
26
20
  var _default = BL;
27
21
  exports["default"] = _default;