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.
- package/backendless.d.ts +5 -0
- package/dist/backendless.js +20966 -23929
- package/dist/backendless.js.map +1 -1
- package/dist/backendless.min.js +2 -2
- package/es/bl/constants.js +0 -2
- package/es/bl/custom-services.js +40 -65
- package/es/bl/events.js +30 -52
- package/es/bl/index.js +3 -9
- package/es/cache/index.js +125 -189
- package/es/commerce/index.js +78 -119
- package/es/counters/counter.js +0 -8
- package/es/counters/index.js +171 -258
- package/es/data/data-query-builder.js +2 -39
- package/es/data/geo/geo-constructor.js +5 -26
- package/es/data/geo/geo-json-parser.js +0 -7
- package/es/data/geo/geometry.js +4 -13
- package/es/data/geo/linestring.js +4 -21
- package/es/data/geo/point.js +4 -22
- package/es/data/geo/polygon.js +4 -30
- package/es/data/geo/spatial-reference-system.js +1 -7
- package/es/data/geo/wkt-parser.js +0 -10
- package/es/data/geo/wkt-to-geojson.js +4 -44
- package/es/data/group-query-builder.js +0 -23
- package/es/data/index.js +17 -54
- package/es/data/json-update-builder.js +0 -18
- package/es/data/load-relations-query-builder.js +0 -16
- package/es/data/persmission.js +0 -16
- package/es/data/rt-handlers.js +1 -46
- package/es/data/store.js +316 -518
- package/es/decorators/deprecated.js +2 -5
- package/es/decorators/index.js +0 -2
- package/es/device/index.js +3 -8
- package/es/expression.js +29 -0
- package/es/files/index.js +354 -493
- package/es/files/persmission.js +0 -15
- package/es/files/utils.js +32 -55
- package/es/hive/index.js +1 -13
- package/es/hive/stores/base-store.js +14 -50
- package/es/hive/stores/index.js +0 -10
- package/es/hive/stores/key-value.js +4 -37
- package/es/hive/stores/list.js +0 -32
- package/es/hive/stores/map.js +0 -34
- package/es/hive/stores/set.js +0 -29
- package/es/hive/stores/sorted-set.js +19 -94
- package/es/hive/utils.js +0 -2
- package/es/index.js +51 -71
- package/es/local-cache/index.js +0 -10
- package/es/local-cache/local-storage.js +1 -9
- package/es/local-cache/virtual-storage.js +0 -6
- package/es/logging/index.js +21 -46
- package/es/logging/logger.js +0 -6
- package/es/management/data.js +0 -8
- package/es/management/index.js +3 -7
- package/es/messaging/channel/index.js +0 -27
- package/es/messaging/helpers/body-parts.js +3 -6
- package/es/messaging/helpers/delivery-options.js +3 -6
- package/es/messaging/helpers/email-envelope.js +13 -25
- package/es/messaging/helpers/index.js +10 -16
- package/es/messaging/helpers/publish-options.js +3 -6
- package/es/messaging/index.js +213 -317
- package/es/persmission.js +7 -16
- package/es/request/index.js +2 -16
- package/es/rso/connection.js +3 -34
- package/es/rso/index.js +0 -7
- package/es/rt.js +21 -52
- package/es/unit-of-work/constants.js +1 -1
- package/es/unit-of-work/index.js +27 -145
- package/es/unit-of-work/json-adapter.js +14 -35
- package/es/unit-of-work/op-result-value-reference.js +1 -11
- package/es/unit-of-work/op-result.js +2 -13
- package/es/urls.js +18 -15
- package/es/user-agent.js +0 -7
- package/es/users/index.js +345 -552
- package/es/users/roles.js +79 -128
- package/es/users/social/container.js +0 -16
- package/es/users/social/index.js +166 -250
- package/es/users/user.js +2 -9
- package/es/users/utils.js +0 -3
- package/es/utils.js +0 -17
- package/lib/bl/constants.js +0 -2
- package/lib/bl/custom-services.js +40 -65
- package/lib/bl/events.js +30 -52
- package/lib/bl/index.js +3 -9
- package/lib/cache/index.js +125 -189
- package/lib/commerce/index.js +78 -119
- package/lib/counters/counter.js +0 -8
- package/lib/counters/index.js +171 -258
- package/lib/data/data-query-builder.js +2 -39
- package/lib/data/geo/geo-constructor.js +5 -26
- package/lib/data/geo/geo-json-parser.js +0 -7
- package/lib/data/geo/geometry.js +4 -13
- package/lib/data/geo/linestring.js +4 -21
- package/lib/data/geo/point.js +4 -22
- package/lib/data/geo/polygon.js +4 -30
- package/lib/data/geo/spatial-reference-system.js +1 -7
- package/lib/data/geo/wkt-parser.js +0 -10
- package/lib/data/geo/wkt-to-geojson.js +4 -44
- package/lib/data/group-query-builder.js +0 -23
- package/lib/data/index.js +17 -54
- package/lib/data/json-update-builder.js +0 -18
- package/lib/data/load-relations-query-builder.js +0 -16
- package/lib/data/persmission.js +0 -16
- package/lib/data/rt-handlers.js +1 -46
- package/lib/data/store.js +316 -518
- package/lib/decorators/deprecated.js +2 -5
- package/lib/decorators/index.js +0 -2
- package/lib/device/index.js +3 -8
- package/lib/expression.js +29 -0
- package/lib/files/index.js +354 -493
- package/lib/files/persmission.js +0 -15
- package/lib/files/utils.js +32 -55
- package/lib/hive/index.js +1 -13
- package/lib/hive/stores/base-store.js +14 -50
- package/lib/hive/stores/index.js +0 -10
- package/lib/hive/stores/key-value.js +4 -37
- package/lib/hive/stores/list.js +0 -32
- package/lib/hive/stores/map.js +0 -34
- package/lib/hive/stores/set.js +0 -29
- package/lib/hive/stores/sorted-set.js +19 -94
- package/lib/hive/utils.js +0 -2
- package/lib/index.js +51 -71
- package/lib/local-cache/index.js +0 -10
- package/lib/local-cache/local-storage.js +1 -9
- package/lib/local-cache/virtual-storage.js +0 -6
- package/lib/logging/index.js +21 -46
- package/lib/logging/logger.js +0 -6
- package/lib/management/data.js +0 -8
- package/lib/management/index.js +3 -7
- package/lib/messaging/channel/index.js +0 -27
- package/lib/messaging/helpers/body-parts.js +3 -6
- package/lib/messaging/helpers/delivery-options.js +3 -6
- package/lib/messaging/helpers/email-envelope.js +13 -25
- package/lib/messaging/helpers/index.js +10 -16
- package/lib/messaging/helpers/publish-options.js +3 -6
- package/lib/messaging/index.js +213 -317
- package/lib/persmission.js +7 -16
- package/lib/request/index.js +2 -16
- package/lib/rso/connection.js +3 -34
- package/lib/rso/index.js +0 -7
- package/lib/rt.js +21 -52
- package/lib/unit-of-work/constants.js +1 -1
- package/lib/unit-of-work/index.js +27 -145
- package/lib/unit-of-work/json-adapter.js +14 -35
- package/lib/unit-of-work/op-result-value-reference.js +1 -11
- package/lib/unit-of-work/op-result.js +2 -13
- package/lib/urls.js +18 -15
- package/lib/user-agent.js +0 -7
- package/lib/users/index.js +345 -552
- package/lib/users/roles.js +79 -128
- package/lib/users/social/container.js +0 -16
- package/lib/users/social/index.js +166 -250
- package/lib/users/user.js +2 -9
- package/lib/users/utils.js +0 -3
- package/lib/utils.js +0 -17
- package/package.json +16 -16
- package/src/data/store.js +3 -1
- package/src/expression.js +16 -0
- package/src/files/utils.js +1 -1
- package/src/index.js +5 -0
package/lib/data/rt-handlers.js
CHANGED
|
@@ -1,30 +1,19 @@
|
|
|
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 _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
10
|
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
15
|
-
|
|
16
11
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
-
|
|
18
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
19
|
-
|
|
20
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
|
-
|
|
22
14
|
var _rt = require("../rt");
|
|
23
|
-
|
|
24
15
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
25
|
-
|
|
26
16
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
27
|
-
|
|
28
17
|
var ChangesTypes = {
|
|
29
18
|
CREATED: 'created',
|
|
30
19
|
UPDATED: 'updated',
|
|
@@ -41,22 +30,17 @@ var RelationsChangesTypes = {
|
|
|
41
30
|
DELETE: 'delete'
|
|
42
31
|
};
|
|
43
32
|
var SingleChangesTypes = [ChangesTypes.CREATED, ChangesTypes.UPDATED, ChangesTypes.DELETED, ChangesTypes.UPSERTED];
|
|
44
|
-
|
|
45
33
|
var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
46
34
|
(0, _inherits2["default"])(RTHandlers, _RTListeners);
|
|
47
|
-
|
|
48
35
|
var _super = _createSuper(RTHandlers);
|
|
49
|
-
|
|
50
36
|
function RTHandlers(dataStore) {
|
|
51
37
|
var _this;
|
|
52
|
-
|
|
53
38
|
(0, _classCallCheck2["default"])(this, RTHandlers);
|
|
54
39
|
_this = _super.call(this);
|
|
55
40
|
_this.dataStore = dataStore;
|
|
56
41
|
_this.app = dataStore.app;
|
|
57
42
|
return _this;
|
|
58
43
|
}
|
|
59
|
-
|
|
60
44
|
(0, _createClass2["default"])(RTHandlers, [{
|
|
61
45
|
key: "getSubscriptionOptions",
|
|
62
46
|
value: function getSubscriptionOptions() {
|
|
@@ -80,7 +64,6 @@ var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
|
80
64
|
if (!callback || typeof callback !== 'function') {
|
|
81
65
|
throw new Error('Listener Function must be passed.');
|
|
82
66
|
}
|
|
83
|
-
|
|
84
67
|
this.removeCreateListeners(undefined, callback);
|
|
85
68
|
}
|
|
86
69
|
}, {
|
|
@@ -99,7 +82,6 @@ var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
|
99
82
|
if (!callback || typeof callback !== 'function') {
|
|
100
83
|
throw new Error('Listener Function must be passed.');
|
|
101
84
|
}
|
|
102
|
-
|
|
103
85
|
this.removeUpsertListeners(undefined, callback);
|
|
104
86
|
}
|
|
105
87
|
}, {
|
|
@@ -118,7 +100,6 @@ var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
|
118
100
|
if (!callback || typeof callback !== 'function') {
|
|
119
101
|
throw new Error('Listener Function must be passed.');
|
|
120
102
|
}
|
|
121
|
-
|
|
122
103
|
this.removeUpdateListeners(undefined, callback);
|
|
123
104
|
}
|
|
124
105
|
}, {
|
|
@@ -137,7 +118,6 @@ var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
|
137
118
|
if (!callback || typeof callback !== 'function') {
|
|
138
119
|
throw new Error('Listener Function must be passed.');
|
|
139
120
|
}
|
|
140
|
-
|
|
141
121
|
this.removeDeleteListeners(undefined, callback);
|
|
142
122
|
}
|
|
143
123
|
}, {
|
|
@@ -156,7 +136,6 @@ var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
|
156
136
|
if (!callback || typeof callback !== 'function') {
|
|
157
137
|
throw new Error('Listener Function must be passed.');
|
|
158
138
|
}
|
|
159
|
-
|
|
160
139
|
this.removeChangesListeners(ChangesTypes.BULK_CREATED, undefined, callback);
|
|
161
140
|
}
|
|
162
141
|
}, {
|
|
@@ -175,7 +154,6 @@ var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
|
175
154
|
if (!callback || typeof callback !== 'function') {
|
|
176
155
|
throw new Error('Listener Function must be passed.');
|
|
177
156
|
}
|
|
178
|
-
|
|
179
157
|
this.removeBulkUpdateListeners(undefined, callback);
|
|
180
158
|
}
|
|
181
159
|
}, {
|
|
@@ -194,7 +172,6 @@ var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
|
194
172
|
if (!callback || typeof callback !== 'function') {
|
|
195
173
|
throw new Error('Listener Function must be passed.');
|
|
196
174
|
}
|
|
197
|
-
|
|
198
175
|
this.removeBulkDeleteListeners(undefined, callback);
|
|
199
176
|
}
|
|
200
177
|
}, {
|
|
@@ -213,7 +190,6 @@ var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
|
213
190
|
if (!callback || typeof callback !== 'function') {
|
|
214
191
|
throw new Error('Listener Function must be passed.');
|
|
215
192
|
}
|
|
216
|
-
|
|
217
193
|
this.removeChangesListeners(ChangesTypes.BULK_UPSERTED, undefined, callback);
|
|
218
194
|
}
|
|
219
195
|
}, {
|
|
@@ -227,7 +203,6 @@ var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
|
227
203
|
if (!callback || typeof callback !== 'function') {
|
|
228
204
|
throw new Error('Listener Function must be passed.');
|
|
229
205
|
}
|
|
230
|
-
|
|
231
206
|
this.removeRelationsChangesListeners(RelationsChangesTypes.SET, undefined, callback);
|
|
232
207
|
}
|
|
233
208
|
}, {
|
|
@@ -246,7 +221,6 @@ var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
|
246
221
|
if (!callback || typeof callback !== 'function') {
|
|
247
222
|
throw new Error('Listener Function must be passed.');
|
|
248
223
|
}
|
|
249
|
-
|
|
250
224
|
this.removeRelationsChangesListeners(RelationsChangesTypes.ADD, undefined, callback);
|
|
251
225
|
}
|
|
252
226
|
}, {
|
|
@@ -265,7 +239,6 @@ var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
|
265
239
|
if (!callback || typeof callback !== 'function') {
|
|
266
240
|
throw new Error('Listener Function must be passed.');
|
|
267
241
|
}
|
|
268
|
-
|
|
269
242
|
this.removeRelationsChangesListeners(RelationsChangesTypes.DELETE, undefined, callback);
|
|
270
243
|
}
|
|
271
244
|
}, {
|
|
@@ -281,11 +254,9 @@ var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
|
281
254
|
callback = whereClause;
|
|
282
255
|
whereClause = undefined;
|
|
283
256
|
}
|
|
284
|
-
|
|
285
257
|
if (typeof callback !== 'function') {
|
|
286
258
|
throw new Error('Listener Function must be passed.');
|
|
287
259
|
}
|
|
288
|
-
|
|
289
260
|
this.addSubscription(event, this.app.RT.subscriptions.onObjectsChanges, {
|
|
290
261
|
callback: callback,
|
|
291
262
|
onError: onError,
|
|
@@ -303,21 +274,16 @@ var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
|
303
274
|
callback = whereClause;
|
|
304
275
|
whereClause = undefined;
|
|
305
276
|
}
|
|
306
|
-
|
|
307
277
|
var matcher = function matcher(subscription) {
|
|
308
278
|
var params = subscription.params;
|
|
309
|
-
|
|
310
279
|
if (whereClause) {
|
|
311
280
|
return params.whereClause === whereClause;
|
|
312
281
|
}
|
|
313
|
-
|
|
314
282
|
if (callback) {
|
|
315
283
|
return subscription.callback === callback;
|
|
316
284
|
}
|
|
317
|
-
|
|
318
285
|
return true;
|
|
319
286
|
};
|
|
320
|
-
|
|
321
287
|
this.stopSubscription(event, {
|
|
322
288
|
matcher: matcher
|
|
323
289
|
});
|
|
@@ -328,27 +294,22 @@ var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
|
328
294
|
if (!relationColumnName || typeof relationColumnName !== 'string') {
|
|
329
295
|
throw new Error('Relation Column Name must be a string.');
|
|
330
296
|
}
|
|
331
|
-
|
|
332
297
|
if (typeof parentObjects === 'function') {
|
|
333
298
|
onError = callback;
|
|
334
299
|
callback = parentObjects;
|
|
335
300
|
parentObjects = undefined;
|
|
336
301
|
}
|
|
337
|
-
|
|
338
302
|
if (typeof callback !== 'function') {
|
|
339
303
|
throw new Error('Listener Function must be passed.');
|
|
340
304
|
}
|
|
341
|
-
|
|
342
305
|
if (parentObjects) {
|
|
343
306
|
if (!Array.isArray(parentObjects)) {
|
|
344
307
|
throw new Error('Parent Objects must be an array');
|
|
345
308
|
}
|
|
346
|
-
|
|
347
309
|
parentObjects = parentObjects.map(function (o) {
|
|
348
310
|
return o.objectId || o;
|
|
349
311
|
});
|
|
350
312
|
}
|
|
351
|
-
|
|
352
313
|
this.addSubscription(event, this.app.RT.subscriptions.onRelationsChanges, {
|
|
353
314
|
callback: callback,
|
|
354
315
|
onError: onError,
|
|
@@ -366,21 +327,16 @@ var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
|
366
327
|
callback = relationColumnName;
|
|
367
328
|
relationColumnName = undefined;
|
|
368
329
|
}
|
|
369
|
-
|
|
370
330
|
var matcher = function matcher(subscription) {
|
|
371
331
|
var params = subscription.params;
|
|
372
|
-
|
|
373
332
|
if (relationColumnName) {
|
|
374
333
|
return params.relationColumnName === relationColumnName;
|
|
375
334
|
}
|
|
376
|
-
|
|
377
335
|
if (callback) {
|
|
378
336
|
return subscription.callback === callback;
|
|
379
337
|
}
|
|
380
|
-
|
|
381
338
|
return true;
|
|
382
339
|
};
|
|
383
|
-
|
|
384
340
|
this.stopSubscription(event, {
|
|
385
341
|
matcher: matcher
|
|
386
342
|
});
|
|
@@ -390,10 +346,10 @@ var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
|
390
346
|
value: function removeAllListeners() {
|
|
391
347
|
(0, _get2["default"])((0, _getPrototypeOf2["default"])(RTHandlers.prototype), "removeAllListeners", this).call(this);
|
|
392
348
|
}
|
|
349
|
+
|
|
393
350
|
/**
|
|
394
351
|
* @private
|
|
395
352
|
* */
|
|
396
|
-
|
|
397
353
|
}, {
|
|
398
354
|
key: "parseObjectToInstance",
|
|
399
355
|
value: function parseObjectToInstance(object) {
|
|
@@ -402,5 +358,4 @@ var RTHandlers = /*#__PURE__*/function (_RTListeners) {
|
|
|
402
358
|
}]);
|
|
403
359
|
return RTHandlers;
|
|
404
360
|
}(_rt.RTListeners);
|
|
405
|
-
|
|
406
361
|
exports["default"] = RTHandlers;
|