backendless 6.7.1 → 7.0.0
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/backendless.js +20992 -23948
- 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 +314 -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 +0 -8
- 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 +53 -72
- 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 +48 -49
- package/es/logging/logger.js +33 -12
- 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 +23 -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 +314 -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 +0 -8
- 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 +53 -72
- 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 +48 -49
- package/lib/logging/logger.js +33 -12
- 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 +23 -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/files/utils.js +1 -1
- package/src/index.js +5 -0
- package/src/logging/index.js +24 -0
- package/src/logging/logger.js +35 -6
- package/src/urls.js +4 -0
|
@@ -1,76 +1,62 @@
|
|
|
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.OperationJSONAdapter = void 0;
|
|
9
|
-
|
|
10
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
11
|
-
|
|
12
9
|
var _constants = require("./constants");
|
|
13
|
-
|
|
14
10
|
var _opResult = require("./op-result");
|
|
15
|
-
|
|
16
11
|
function resolveOpResultValueReference(uow, value) {
|
|
17
12
|
if (Array.isArray(value)) {
|
|
18
13
|
return value.map(function (item) {
|
|
19
14
|
return resolveOpResultValueReference(uow, item);
|
|
20
15
|
});
|
|
21
16
|
}
|
|
22
|
-
|
|
23
17
|
if (value && (0, _typeof2["default"])(value) === 'object') {
|
|
24
18
|
if (value.___ref) {
|
|
25
19
|
var opResult = uow.getOpResultById(value.opResultId);
|
|
26
|
-
|
|
27
20
|
if (value.resultIndex !== undefined) {
|
|
28
21
|
return opResult.resolveTo(value.resultIndex, value.propName);
|
|
29
22
|
}
|
|
30
|
-
|
|
31
23
|
if (value.propName !== undefined) {
|
|
32
24
|
return opResult.resolveTo(value.propName);
|
|
33
25
|
}
|
|
34
|
-
|
|
35
26
|
return opResult;
|
|
36
27
|
}
|
|
37
|
-
|
|
38
28
|
var result = {};
|
|
39
|
-
|
|
40
29
|
for (var prop in value) {
|
|
41
30
|
result[prop] = resolveOpResultValueReference(uow, value[prop]);
|
|
42
31
|
}
|
|
43
|
-
|
|
44
32
|
return result;
|
|
45
33
|
}
|
|
46
|
-
|
|
47
34
|
return value;
|
|
48
35
|
}
|
|
49
|
-
|
|
50
36
|
var OperationJSONAdapter = {
|
|
51
37
|
CREATE: function CREATE(uow, _ref) {
|
|
52
38
|
var table = _ref.table,
|
|
53
|
-
|
|
39
|
+
payload = _ref.payload;
|
|
54
40
|
return uow.create.call(uow, table, resolveOpResultValueReference(uow, payload));
|
|
55
41
|
},
|
|
56
42
|
DELETE: function DELETE(uow, _ref2) {
|
|
57
43
|
var table = _ref2.table,
|
|
58
|
-
|
|
44
|
+
payload = _ref2.payload;
|
|
59
45
|
return uow["delete"].call(uow, table, resolveOpResultValueReference(uow, payload));
|
|
60
46
|
},
|
|
61
47
|
UPDATE: function UPDATE(uow, _ref3) {
|
|
62
48
|
var table = _ref3.table,
|
|
63
|
-
|
|
49
|
+
payload = _ref3.payload;
|
|
64
50
|
return uow.update.call(uow, table, resolveOpResultValueReference(uow, payload));
|
|
65
51
|
},
|
|
66
52
|
UPSERT: function UPSERT(uow, _ref4) {
|
|
67
53
|
var table = _ref4.table,
|
|
68
|
-
|
|
54
|
+
payload = _ref4.payload;
|
|
69
55
|
return uow.upsert.call(uow, table, resolveOpResultValueReference(uow, payload));
|
|
70
56
|
},
|
|
71
57
|
UPDATE_BULK: function UPDATE_BULK(uow, _ref5) {
|
|
72
58
|
var table = _ref5.table,
|
|
73
|
-
|
|
59
|
+
payload = _ref5.payload;
|
|
74
60
|
var args = baseBulkArgs(uow, {
|
|
75
61
|
table: table,
|
|
76
62
|
payload: payload
|
|
@@ -80,7 +66,7 @@ var OperationJSONAdapter = {
|
|
|
80
66
|
},
|
|
81
67
|
DELETE_BULK: function DELETE_BULK(uow, _ref6) {
|
|
82
68
|
var table = _ref6.table,
|
|
83
|
-
|
|
69
|
+
payload = _ref6.payload;
|
|
84
70
|
var args = baseBulkArgs(uow, {
|
|
85
71
|
table: table,
|
|
86
72
|
payload: payload
|
|
@@ -89,17 +75,17 @@ var OperationJSONAdapter = {
|
|
|
89
75
|
},
|
|
90
76
|
CREATE_BULK: function CREATE_BULK(uow, _ref7) {
|
|
91
77
|
var table = _ref7.table,
|
|
92
|
-
|
|
78
|
+
payload = _ref7.payload;
|
|
93
79
|
return uow.bulkCreate.call(uow, table, resolveOpResultValueReference(uow, payload));
|
|
94
80
|
},
|
|
95
81
|
UPSERT_BULK: function UPSERT_BULK(uow, _ref8) {
|
|
96
82
|
var table = _ref8.table,
|
|
97
|
-
|
|
83
|
+
payload = _ref8.payload;
|
|
98
84
|
return uow.bulkUpsert.call(uow, table, resolveOpResultValueReference(uow, payload));
|
|
99
85
|
},
|
|
100
86
|
SET_RELATION: function SET_RELATION(uow, _ref9) {
|
|
101
87
|
var table = _ref9.table,
|
|
102
|
-
|
|
88
|
+
payload = _ref9.payload;
|
|
103
89
|
return updateRelations(uow, 'setRelation', {
|
|
104
90
|
table: table,
|
|
105
91
|
payload: payload
|
|
@@ -107,7 +93,7 @@ var OperationJSONAdapter = {
|
|
|
107
93
|
},
|
|
108
94
|
DELETE_RELATION: function DELETE_RELATION(uow, _ref10) {
|
|
109
95
|
var table = _ref10.table,
|
|
110
|
-
|
|
96
|
+
payload = _ref10.payload;
|
|
111
97
|
return updateRelations(uow, 'deleteRelation', {
|
|
112
98
|
table: table,
|
|
113
99
|
payload: payload
|
|
@@ -115,7 +101,7 @@ var OperationJSONAdapter = {
|
|
|
115
101
|
},
|
|
116
102
|
ADD_RELATION: function ADD_RELATION(uow, _ref11) {
|
|
117
103
|
var table = _ref11.table,
|
|
118
|
-
|
|
104
|
+
payload = _ref11.payload;
|
|
119
105
|
return updateRelations(uow, 'addToRelation', {
|
|
120
106
|
table: table,
|
|
121
107
|
payload: payload
|
|
@@ -123,23 +109,20 @@ var OperationJSONAdapter = {
|
|
|
123
109
|
},
|
|
124
110
|
FIND: function FIND(uow, _ref12) {
|
|
125
111
|
var table = _ref12.table,
|
|
126
|
-
|
|
112
|
+
payload = _ref12.payload;
|
|
127
113
|
return uow.addOperations(_constants.OperationType.FIND, table, payload);
|
|
128
114
|
}
|
|
129
115
|
};
|
|
130
116
|
exports.OperationJSONAdapter = OperationJSONAdapter;
|
|
131
|
-
|
|
132
117
|
function baseBulkArgs(uow, _ref13) {
|
|
133
118
|
var table = _ref13.table,
|
|
134
|
-
|
|
119
|
+
payload = _ref13.payload;
|
|
135
120
|
var args = [];
|
|
136
|
-
|
|
137
121
|
if (payload.conditional) {
|
|
138
122
|
args.push(table);
|
|
139
123
|
args.push(payload.conditional);
|
|
140
124
|
} else {
|
|
141
125
|
var opRef = resolveOpResultValueReference(uow, payload.unconditional);
|
|
142
|
-
|
|
143
126
|
if (opRef instanceof _opResult.OpResult) {
|
|
144
127
|
args.push(opRef);
|
|
145
128
|
} else {
|
|
@@ -147,15 +130,12 @@ function baseBulkArgs(uow, _ref13) {
|
|
|
147
130
|
args.push(opRef);
|
|
148
131
|
}
|
|
149
132
|
}
|
|
150
|
-
|
|
151
133
|
return args;
|
|
152
134
|
}
|
|
153
|
-
|
|
154
135
|
function updateRelations(uow, method, _ref14) {
|
|
155
136
|
var table = _ref14.table,
|
|
156
|
-
|
|
137
|
+
payload = _ref14.payload;
|
|
157
138
|
var args = [table];
|
|
158
|
-
|
|
159
139
|
if (typeof payload.parentObject === 'string') {
|
|
160
140
|
args.push({
|
|
161
141
|
objectId: payload.parentObject
|
|
@@ -163,7 +143,6 @@ function updateRelations(uow, method, _ref14) {
|
|
|
163
143
|
} else {
|
|
164
144
|
args.push(resolveOpResultValueReference(uow, payload.parentObject));
|
|
165
145
|
}
|
|
166
|
-
|
|
167
146
|
args.push(payload.relationColumn);
|
|
168
147
|
args.push(payload.conditional || resolveOpResultValueReference(uow, payload.unconditional));
|
|
169
148
|
return uow[method].apply(uow, args);
|
|
@@ -1,26 +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.OpResultValueReference = 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 OpResultValueReference = /*#__PURE__*/function () {
|
|
15
11
|
function OpResultValueReference(opResult, _ref) {
|
|
16
12
|
var resultIndex = _ref.resultIndex,
|
|
17
|
-
|
|
13
|
+
propName = _ref.propName;
|
|
18
14
|
(0, _classCallCheck2["default"])(this, OpResultValueReference);
|
|
19
15
|
this.opResult = opResult;
|
|
20
16
|
this.resultIndex = resultIndex;
|
|
21
17
|
this.propName = propName;
|
|
22
18
|
}
|
|
23
|
-
|
|
24
19
|
(0, _createClass2["default"])(OpResultValueReference, [{
|
|
25
20
|
key: "getTableName",
|
|
26
21
|
value: function getTableName() {
|
|
@@ -30,23 +25,18 @@ var OpResultValueReference = /*#__PURE__*/function () {
|
|
|
30
25
|
key: "toJSON",
|
|
31
26
|
value: function toJSON() {
|
|
32
27
|
var result = this.opResult.toJSON();
|
|
33
|
-
|
|
34
28
|
if (this.resultIndex !== undefined) {
|
|
35
29
|
result.resultIndex = this.resultIndex;
|
|
36
30
|
}
|
|
37
|
-
|
|
38
31
|
if (this.propName !== undefined) {
|
|
39
32
|
result.propName = this.propName;
|
|
40
33
|
}
|
|
41
|
-
|
|
42
34
|
if (!result.propName && this.opResult.isFindRef()) {
|
|
43
35
|
result.propName = 'objectId';
|
|
44
36
|
}
|
|
45
|
-
|
|
46
37
|
return result;
|
|
47
38
|
}
|
|
48
39
|
}]);
|
|
49
40
|
return OpResultValueReference;
|
|
50
41
|
}();
|
|
51
|
-
|
|
52
42
|
exports.OpResultValueReference = OpResultValueReference;
|
|
@@ -1,25 +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.OpResult = 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 _constants = require("./constants");
|
|
15
|
-
|
|
16
11
|
var _opResultValueReference = require("./op-result-value-reference");
|
|
17
|
-
|
|
18
12
|
var OpResult = /*#__PURE__*/function () {
|
|
19
13
|
function OpResult(uow, _ref) {
|
|
20
14
|
var operationType = _ref.operationType,
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
table = _ref.table,
|
|
16
|
+
payload = _ref.payload;
|
|
23
17
|
(0, _classCallCheck2["default"])(this, OpResult);
|
|
24
18
|
this.uow = uow;
|
|
25
19
|
this.operationType = operationType;
|
|
@@ -30,7 +24,6 @@ var OpResult = /*#__PURE__*/function () {
|
|
|
30
24
|
this.opResultId = "".concat(stackName).concat(resultIndex);
|
|
31
25
|
this.result = null;
|
|
32
26
|
}
|
|
33
|
-
|
|
34
27
|
(0, _createClass2["default"])(OpResult, [{
|
|
35
28
|
key: "setResult",
|
|
36
29
|
value: function setResult(result) {
|
|
@@ -94,7 +87,6 @@ var OpResult = /*#__PURE__*/function () {
|
|
|
94
87
|
propName = resultIndex;
|
|
95
88
|
resultIndex = undefined;
|
|
96
89
|
}
|
|
97
|
-
|
|
98
90
|
return new _opResultValueReference.OpResultValueReference(this, {
|
|
99
91
|
resultIndex: resultIndex,
|
|
100
92
|
propName: propName
|
|
@@ -107,15 +99,12 @@ var OpResult = /*#__PURE__*/function () {
|
|
|
107
99
|
___ref: true,
|
|
108
100
|
opResultId: this.opResultId
|
|
109
101
|
};
|
|
110
|
-
|
|
111
102
|
if (this.isObjectRef()) {
|
|
112
103
|
result.propName = 'objectId';
|
|
113
104
|
}
|
|
114
|
-
|
|
115
105
|
return result;
|
|
116
106
|
}
|
|
117
107
|
}]);
|
|
118
108
|
return OpResult;
|
|
119
109
|
}();
|
|
120
|
-
|
|
121
110
|
exports.OpResult = OpResult;
|
package/es/urls.js
CHANGED
|
@@ -1,28 +1,24 @@
|
|
|
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 Urls = /*#__PURE__*/function () {
|
|
15
11
|
function Urls(app) {
|
|
16
12
|
(0, _classCallCheck2["default"])(this, Urls);
|
|
17
13
|
this.app = app;
|
|
18
14
|
}
|
|
19
|
-
|
|
20
15
|
(0, _createClass2["default"])(Urls, [{
|
|
21
16
|
key: "root",
|
|
22
17
|
value: function root() {
|
|
23
18
|
return this.app.appPath;
|
|
24
|
-
}
|
|
19
|
+
}
|
|
25
20
|
|
|
21
|
+
//bl
|
|
26
22
|
}, {
|
|
27
23
|
key: "blServices",
|
|
28
24
|
value: function blServices() {
|
|
@@ -37,14 +33,21 @@ var Urls = /*#__PURE__*/function () {
|
|
|
37
33
|
key: "blEvent",
|
|
38
34
|
value: function blEvent(eventName) {
|
|
39
35
|
return "".concat(this.root(), "/servercode/events/").concat(eventName);
|
|
40
|
-
}
|
|
36
|
+
}
|
|
41
37
|
|
|
38
|
+
//logging
|
|
42
39
|
}, {
|
|
43
40
|
key: "logging",
|
|
44
41
|
value: function logging() {
|
|
45
42
|
return "".concat(this.root(), "/log");
|
|
46
|
-
}
|
|
43
|
+
}
|
|
44
|
+
}, {
|
|
45
|
+
key: "loggingLevels",
|
|
46
|
+
value: function loggingLevels() {
|
|
47
|
+
return "".concat(this.logging(), "/logger");
|
|
48
|
+
}
|
|
47
49
|
|
|
50
|
+
//cache
|
|
48
51
|
}, {
|
|
49
52
|
key: "cache",
|
|
50
53
|
value: function cache() {
|
|
@@ -69,8 +72,9 @@ var Urls = /*#__PURE__*/function () {
|
|
|
69
72
|
key: "cacheItemCheck",
|
|
70
73
|
value: function cacheItemCheck(key) {
|
|
71
74
|
return "".concat(this.cacheItem(key), "/check");
|
|
72
|
-
}
|
|
75
|
+
}
|
|
73
76
|
|
|
77
|
+
//counters
|
|
74
78
|
}, {
|
|
75
79
|
key: "counters",
|
|
76
80
|
value: function counters() {
|
|
@@ -125,8 +129,9 @@ var Urls = /*#__PURE__*/function () {
|
|
|
125
129
|
key: "counterReset",
|
|
126
130
|
value: function counterReset(name) {
|
|
127
131
|
return "".concat(this.counter(name), "/reset");
|
|
128
|
-
}
|
|
132
|
+
}
|
|
129
133
|
|
|
134
|
+
//data
|
|
130
135
|
}, {
|
|
131
136
|
key: "data",
|
|
132
137
|
value: function data() {
|
|
@@ -281,8 +286,9 @@ var Urls = /*#__PURE__*/function () {
|
|
|
281
286
|
key: "emailTemplateSend",
|
|
282
287
|
value: function emailTemplateSend() {
|
|
283
288
|
return "".concat(this.emailTemplate(), "/send");
|
|
284
|
-
}
|
|
289
|
+
}
|
|
285
290
|
|
|
291
|
+
//commerce
|
|
286
292
|
}, {
|
|
287
293
|
key: "commerce",
|
|
288
294
|
value: function commerce() {
|
|
@@ -302,8 +308,9 @@ var Urls = /*#__PURE__*/function () {
|
|
|
302
308
|
key: "commerceSubStatus",
|
|
303
309
|
value: function commerceSubStatus(name, subId, token) {
|
|
304
310
|
return "".concat(this.commerce(), "/").concat(name, "/subscription/").concat(subId, "/purchases/").concat(token);
|
|
305
|
-
}
|
|
311
|
+
}
|
|
306
312
|
|
|
313
|
+
//files
|
|
307
314
|
}, {
|
|
308
315
|
key: "files",
|
|
309
316
|
value: function files() {
|
|
@@ -358,8 +365,9 @@ var Urls = /*#__PURE__*/function () {
|
|
|
358
365
|
key: "fileAppendBinaryPath",
|
|
359
366
|
value: function fileAppendBinaryPath(path) {
|
|
360
367
|
return "".concat(this.files(), "/append/binary/").concat(path);
|
|
361
|
-
}
|
|
368
|
+
}
|
|
362
369
|
|
|
370
|
+
//users
|
|
363
371
|
}, {
|
|
364
372
|
key: "users",
|
|
365
373
|
value: function users() {
|
|
@@ -464,8 +472,9 @@ var Urls = /*#__PURE__*/function () {
|
|
|
464
472
|
key: "userStatus",
|
|
465
473
|
value: function userStatus(userId) {
|
|
466
474
|
return "".concat(this.userObject(userId), "/status");
|
|
467
|
-
}
|
|
475
|
+
}
|
|
468
476
|
|
|
477
|
+
//management
|
|
469
478
|
}, {
|
|
470
479
|
key: "management",
|
|
471
480
|
value: function management() {
|
|
@@ -484,5 +493,4 @@ var Urls = /*#__PURE__*/function () {
|
|
|
484
493
|
}]);
|
|
485
494
|
return Urls;
|
|
486
495
|
}();
|
|
487
|
-
|
|
488
496
|
exports["default"] = Urls;
|
package/es/user-agent.js
CHANGED
|
@@ -1,32 +1,25 @@
|
|
|
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.getUserAgent = getUserAgent;
|
|
9
|
-
|
|
10
8
|
var _utils = _interopRequireDefault(require("./utils"));
|
|
11
|
-
|
|
12
9
|
function getUserAgent() {
|
|
13
10
|
var ua = 'NodeJS';
|
|
14
|
-
|
|
15
11
|
if (_utils["default"].isBrowser) {
|
|
16
12
|
ua = navigator.userAgent ? navigator.userAgent.toLowerCase() : 'hybrid-app';
|
|
17
13
|
}
|
|
18
|
-
|
|
19
14
|
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || /(webkit)[ \/]([\w.]+)/.exec(ua) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || /(msie) ([\w.]+)/.exec(ua) || ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || [];
|
|
20
15
|
var matched = {
|
|
21
16
|
browser: match[1] || '',
|
|
22
17
|
version: match[2] || '0'
|
|
23
18
|
};
|
|
24
19
|
var browser = {};
|
|
25
|
-
|
|
26
20
|
if (matched.browser) {
|
|
27
21
|
browser[matched.browser] = true;
|
|
28
22
|
browser.version = matched.version;
|
|
29
23
|
}
|
|
30
|
-
|
|
31
24
|
return browser;
|
|
32
25
|
}
|