backendless 7.3.2 → 7.3.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 +3 -1
- package/dist/backendless.js +29 -12
- package/dist/backendless.js.map +1 -1
- package/dist/backendless.min.js +2 -2
- package/es/automations/index.js +9 -10
- package/lib/automations/index.js +9 -10
- package/package.json +2 -2
- package/src/automations/index.js +7 -10
package/es/automations/index.js
CHANGED
|
@@ -133,8 +133,7 @@ var Automations = /*#__PURE__*/function () {
|
|
|
133
133
|
}, {
|
|
134
134
|
key: "activateFlowTriggerById",
|
|
135
135
|
value: function () {
|
|
136
|
-
var _activateFlowTriggerById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(flowId, triggerId, data,
|
|
137
|
-
var query;
|
|
136
|
+
var _activateFlowTriggerById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(flowId, triggerId, data, execution) {
|
|
138
137
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
139
138
|
while (1) switch (_context4.prev = _context4.next) {
|
|
140
139
|
case 0:
|
|
@@ -156,22 +155,22 @@ var Automations = /*#__PURE__*/function () {
|
|
|
156
155
|
}
|
|
157
156
|
throw new Error('The "data" argument must be an object.');
|
|
158
157
|
case 6:
|
|
159
|
-
if (!(
|
|
158
|
+
if (!(execution !== undefined && (typeof execution !== 'string' || !execution))) {
|
|
160
159
|
_context4.next = 8;
|
|
161
160
|
break;
|
|
162
161
|
}
|
|
163
|
-
throw new Error(
|
|
162
|
+
throw new Error(
|
|
163
|
+
// eslint-disable-next-line
|
|
164
|
+
'The "execution" argument must be a non-empty string and must be one of this values: "any", "all" or Execution ID.');
|
|
164
165
|
case 8:
|
|
165
|
-
query = {};
|
|
166
|
-
if (executionId) {
|
|
167
|
-
query.executionId = executionId;
|
|
168
|
-
}
|
|
169
166
|
return _context4.abrupt("return", this.app.request.post({
|
|
170
167
|
url: "".concat(this.app.urls.automationFlow(), "/").concat(flowId, "/trigger/").concat(triggerId, "/activate"),
|
|
171
168
|
data: data || {},
|
|
172
|
-
query:
|
|
169
|
+
query: {
|
|
170
|
+
execution: execution
|
|
171
|
+
}
|
|
173
172
|
}));
|
|
174
|
-
case
|
|
173
|
+
case 9:
|
|
175
174
|
case "end":
|
|
176
175
|
return _context4.stop();
|
|
177
176
|
}
|
package/lib/automations/index.js
CHANGED
|
@@ -133,8 +133,7 @@ var Automations = /*#__PURE__*/function () {
|
|
|
133
133
|
}, {
|
|
134
134
|
key: "activateFlowTriggerById",
|
|
135
135
|
value: function () {
|
|
136
|
-
var _activateFlowTriggerById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(flowId, triggerId, data,
|
|
137
|
-
var query;
|
|
136
|
+
var _activateFlowTriggerById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(flowId, triggerId, data, execution) {
|
|
138
137
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
139
138
|
while (1) switch (_context4.prev = _context4.next) {
|
|
140
139
|
case 0:
|
|
@@ -156,22 +155,22 @@ var Automations = /*#__PURE__*/function () {
|
|
|
156
155
|
}
|
|
157
156
|
throw new Error('The "data" argument must be an object.');
|
|
158
157
|
case 6:
|
|
159
|
-
if (!(
|
|
158
|
+
if (!(execution !== undefined && (typeof execution !== 'string' || !execution))) {
|
|
160
159
|
_context4.next = 8;
|
|
161
160
|
break;
|
|
162
161
|
}
|
|
163
|
-
throw new Error(
|
|
162
|
+
throw new Error(
|
|
163
|
+
// eslint-disable-next-line
|
|
164
|
+
'The "execution" argument must be a non-empty string and must be one of this values: "any", "all" or Execution ID.');
|
|
164
165
|
case 8:
|
|
165
|
-
query = {};
|
|
166
|
-
if (executionId) {
|
|
167
|
-
query.executionId = executionId;
|
|
168
|
-
}
|
|
169
166
|
return _context4.abrupt("return", this.app.request.post({
|
|
170
167
|
url: "".concat(this.app.urls.automationFlow(), "/").concat(flowId, "/trigger/").concat(triggerId, "/activate"),
|
|
171
168
|
data: data || {},
|
|
172
|
-
query:
|
|
169
|
+
query: {
|
|
170
|
+
execution: execution
|
|
171
|
+
}
|
|
173
172
|
}));
|
|
174
|
-
case
|
|
173
|
+
case 9:
|
|
175
174
|
case "end":
|
|
176
175
|
return _context4.stop();
|
|
177
176
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "backendless",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.4",
|
|
4
4
|
"description": "Backendless JavaScript SDK for Node.js and the browser",
|
|
5
5
|
"browser": "dist/backendless.js",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"@babel/runtime": "^7.21.5",
|
|
94
|
-
"backendless-request": "^0.7.
|
|
94
|
+
"backendless-request": "^0.7.5",
|
|
95
95
|
"backendless-rt-client": "0.3.0"
|
|
96
96
|
}
|
|
97
97
|
}
|
package/src/automations/index.js
CHANGED
|
@@ -58,7 +58,7 @@ export default class Automations {
|
|
|
58
58
|
})
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
async activateFlowTriggerById(flowId, triggerId, data,
|
|
61
|
+
async activateFlowTriggerById(flowId, triggerId, data, execution) {
|
|
62
62
|
if (!flowId || typeof flowId !== 'string') {
|
|
63
63
|
throw new Error('The "flowId" argument must be provided and must be a string.')
|
|
64
64
|
}
|
|
@@ -71,20 +71,17 @@ export default class Automations {
|
|
|
71
71
|
throw new Error('The "data" argument must be an object.')
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
if (
|
|
75
|
-
throw new Error(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (executionId) {
|
|
81
|
-
query.executionId = executionId
|
|
74
|
+
if (execution !== undefined && (typeof execution !== 'string' || !execution)) {
|
|
75
|
+
throw new Error(
|
|
76
|
+
// eslint-disable-next-line
|
|
77
|
+
'The "execution" argument must be a non-empty string and must be one of this values: "any", "all" or Execution ID.'
|
|
78
|
+
)
|
|
82
79
|
}
|
|
83
80
|
|
|
84
81
|
return this.app.request.post({
|
|
85
82
|
url : `${this.app.urls.automationFlow()}/${flowId}/trigger/${triggerId}/activate`,
|
|
86
83
|
data : data || {},
|
|
87
|
-
query:
|
|
84
|
+
query: { execution },
|
|
88
85
|
})
|
|
89
86
|
}
|
|
90
87
|
}
|