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