backendless 7.3.1 → 7.3.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 +1 -1
- package/dist/backendless.js +17 -5
- package/dist/backendless.js.map +1 -1
- package/dist/backendless.min.js +2 -2
- package/es/automations/index.js +16 -4
- package/lib/automations/index.js +16 -4
- package/package.json +1 -1
- package/src/automations/index.js +14 -3
package/es/automations/index.js
CHANGED
|
@@ -133,7 +133,8 @@ 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) {
|
|
136
|
+
var _activateFlowTriggerById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(flowId, triggerId, data, executionId) {
|
|
137
|
+
var query;
|
|
137
138
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
138
139
|
while (1) switch (_context4.prev = _context4.next) {
|
|
139
140
|
case 0:
|
|
@@ -155,17 +156,28 @@ var Automations = /*#__PURE__*/function () {
|
|
|
155
156
|
}
|
|
156
157
|
throw new Error('The "data" argument must be an object.');
|
|
157
158
|
case 6:
|
|
159
|
+
if (!(executionId !== undefined && (typeof executionId !== 'string' || !executionId))) {
|
|
160
|
+
_context4.next = 8;
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
throw new Error('The "executionId" argument must be a non-empty string.');
|
|
164
|
+
case 8:
|
|
165
|
+
query = {};
|
|
166
|
+
if (executionId) {
|
|
167
|
+
query.executionId = executionId;
|
|
168
|
+
}
|
|
158
169
|
return _context4.abrupt("return", this.app.request.post({
|
|
159
170
|
url: "".concat(this.app.urls.automationFlow(), "/").concat(flowId, "/trigger/").concat(triggerId, "/activate"),
|
|
160
|
-
data: data || {}
|
|
171
|
+
data: data || {},
|
|
172
|
+
query: query
|
|
161
173
|
}));
|
|
162
|
-
case
|
|
174
|
+
case 11:
|
|
163
175
|
case "end":
|
|
164
176
|
return _context4.stop();
|
|
165
177
|
}
|
|
166
178
|
}, _callee4, this);
|
|
167
179
|
}));
|
|
168
|
-
function activateFlowTriggerById(_x8, _x9, _x10) {
|
|
180
|
+
function activateFlowTriggerById(_x8, _x9, _x10, _x11) {
|
|
169
181
|
return _activateFlowTriggerById.apply(this, arguments);
|
|
170
182
|
}
|
|
171
183
|
return activateFlowTriggerById;
|
package/lib/automations/index.js
CHANGED
|
@@ -133,7 +133,8 @@ 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) {
|
|
136
|
+
var _activateFlowTriggerById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(flowId, triggerId, data, executionId) {
|
|
137
|
+
var query;
|
|
137
138
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
138
139
|
while (1) switch (_context4.prev = _context4.next) {
|
|
139
140
|
case 0:
|
|
@@ -155,17 +156,28 @@ var Automations = /*#__PURE__*/function () {
|
|
|
155
156
|
}
|
|
156
157
|
throw new Error('The "data" argument must be an object.');
|
|
157
158
|
case 6:
|
|
159
|
+
if (!(executionId !== undefined && (typeof executionId !== 'string' || !executionId))) {
|
|
160
|
+
_context4.next = 8;
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
throw new Error('The "executionId" argument must be a non-empty string.');
|
|
164
|
+
case 8:
|
|
165
|
+
query = {};
|
|
166
|
+
if (executionId) {
|
|
167
|
+
query.executionId = executionId;
|
|
168
|
+
}
|
|
158
169
|
return _context4.abrupt("return", this.app.request.post({
|
|
159
170
|
url: "".concat(this.app.urls.automationFlow(), "/").concat(flowId, "/trigger/").concat(triggerId, "/activate"),
|
|
160
|
-
data: data || {}
|
|
171
|
+
data: data || {},
|
|
172
|
+
query: query
|
|
161
173
|
}));
|
|
162
|
-
case
|
|
174
|
+
case 11:
|
|
163
175
|
case "end":
|
|
164
176
|
return _context4.stop();
|
|
165
177
|
}
|
|
166
178
|
}, _callee4, this);
|
|
167
179
|
}));
|
|
168
|
-
function activateFlowTriggerById(_x8, _x9, _x10) {
|
|
180
|
+
function activateFlowTriggerById(_x8, _x9, _x10, _x11) {
|
|
169
181
|
return _activateFlowTriggerById.apply(this, arguments);
|
|
170
182
|
}
|
|
171
183
|
return activateFlowTriggerById;
|
package/package.json
CHANGED
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, executionId) {
|
|
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,9 +71,20 @@ export default class Automations {
|
|
|
71
71
|
throw new Error('The "data" argument must be an object.')
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
if (executionId !== undefined && (typeof executionId !== 'string' || !executionId)) {
|
|
75
|
+
throw new Error('The "executionId" argument must be a non-empty string.')
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const query = {}
|
|
79
|
+
|
|
80
|
+
if (executionId) {
|
|
81
|
+
query.executionId = executionId
|
|
82
|
+
}
|
|
83
|
+
|
|
74
84
|
return this.app.request.post({
|
|
75
|
-
url
|
|
76
|
-
data: data || {},
|
|
85
|
+
url : `${this.app.urls.automationFlow()}/${flowId}/trigger/${triggerId}/activate`,
|
|
86
|
+
data : data || {},
|
|
87
|
+
query: query,
|
|
77
88
|
})
|
|
78
89
|
}
|
|
79
90
|
}
|