backendless 7.4.3 → 7.4.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/dist/backendless.js +62 -30
- package/dist/backendless.js.map +1 -1
- package/dist/backendless.min.js +2 -2
- package/es/automations/index.js +56 -29
- package/es/urls.js +5 -0
- package/lib/automations/index.js +56 -29
- package/lib/urls.js +5 -0
- package/package.json +1 -1
- package/src/automations/index.js +10 -0
- package/src/urls.js +4 -0
package/dist/backendless.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* ********************************************************************************************************************
|
|
3
|
-
* Backendless SDK for JavaScript. Version: 7.4.
|
|
3
|
+
* Backendless SDK for JavaScript. Version: 7.4.4
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2012-2023 BACKENDLESS.COM. All Rights Reserved.
|
|
6
6
|
*
|
|
@@ -86,35 +86,62 @@ var Automations = /*#__PURE__*/function () {
|
|
|
86
86
|
return activateFlow;
|
|
87
87
|
}()
|
|
88
88
|
}, {
|
|
89
|
-
key: "
|
|
89
|
+
key: "loadFlowExecutionContext",
|
|
90
90
|
value: function () {
|
|
91
|
-
var
|
|
91
|
+
var _loadFlowExecutionContext = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(executionId) {
|
|
92
92
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
93
93
|
while (1) switch (_context2.prev = _context2.next) {
|
|
94
94
|
case 0:
|
|
95
|
-
if (!(!
|
|
95
|
+
if (!(!executionId || typeof executionId !== 'string')) {
|
|
96
96
|
_context2.next = 2;
|
|
97
97
|
break;
|
|
98
98
|
}
|
|
99
|
+
throw new Error('The "executionId" argument must be provided and must be a string.');
|
|
100
|
+
case 2:
|
|
101
|
+
return _context2.abrupt("return", this.app.request.get({
|
|
102
|
+
url: this.app.urls.automationFlowExecutionContext(executionId)
|
|
103
|
+
}));
|
|
104
|
+
case 3:
|
|
105
|
+
case "end":
|
|
106
|
+
return _context2.stop();
|
|
107
|
+
}
|
|
108
|
+
}, _callee2, this);
|
|
109
|
+
}));
|
|
110
|
+
function loadFlowExecutionContext(_x3) {
|
|
111
|
+
return _loadFlowExecutionContext.apply(this, arguments);
|
|
112
|
+
}
|
|
113
|
+
return loadFlowExecutionContext;
|
|
114
|
+
}()
|
|
115
|
+
}, {
|
|
116
|
+
key: "activateFlowById",
|
|
117
|
+
value: function () {
|
|
118
|
+
var _activateFlowById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(flowId, initialData) {
|
|
119
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
120
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
121
|
+
case 0:
|
|
122
|
+
if (!(!flowId || typeof flowId !== 'string')) {
|
|
123
|
+
_context3.next = 2;
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
99
126
|
throw new Error('The "flowId" argument must be provided and must be a string.');
|
|
100
127
|
case 2:
|
|
101
128
|
if (!(initialData !== undefined && !_utils["default"].isObject(initialData))) {
|
|
102
|
-
|
|
129
|
+
_context3.next = 4;
|
|
103
130
|
break;
|
|
104
131
|
}
|
|
105
132
|
throw new Error('The "initialData" argument must be an object.');
|
|
106
133
|
case 4:
|
|
107
|
-
return
|
|
134
|
+
return _context3.abrupt("return", this.app.request.post({
|
|
108
135
|
url: "".concat(this.app.urls.automationFlow(), "/").concat(flowId, "/activate"),
|
|
109
136
|
data: initialData || {}
|
|
110
137
|
}));
|
|
111
138
|
case 5:
|
|
112
139
|
case "end":
|
|
113
|
-
return
|
|
140
|
+
return _context3.stop();
|
|
114
141
|
}
|
|
115
|
-
},
|
|
142
|
+
}, _callee3, this);
|
|
116
143
|
}));
|
|
117
|
-
function activateFlowById(
|
|
144
|
+
function activateFlowById(_x4, _x5) {
|
|
118
145
|
return _activateFlowById.apply(this, arguments);
|
|
119
146
|
}
|
|
120
147
|
return activateFlowById;
|
|
@@ -122,29 +149,29 @@ var Automations = /*#__PURE__*/function () {
|
|
|
122
149
|
}, {
|
|
123
150
|
key: "activateFlowTrigger",
|
|
124
151
|
value: function () {
|
|
125
|
-
var _activateFlowTrigger = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
126
|
-
return _regenerator["default"].wrap(function
|
|
127
|
-
while (1) switch (
|
|
152
|
+
var _activateFlowTrigger = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(flowName, triggerName, data) {
|
|
153
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
154
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
128
155
|
case 0:
|
|
129
156
|
if (!(!flowName || typeof flowName !== 'string')) {
|
|
130
|
-
|
|
157
|
+
_context4.next = 2;
|
|
131
158
|
break;
|
|
132
159
|
}
|
|
133
160
|
throw new Error('The "flowName" argument must be provided and must be a string.');
|
|
134
161
|
case 2:
|
|
135
162
|
if (!(!triggerName || typeof triggerName !== 'string')) {
|
|
136
|
-
|
|
163
|
+
_context4.next = 4;
|
|
137
164
|
break;
|
|
138
165
|
}
|
|
139
166
|
throw new Error('The "triggerName" argument must be provided and must be a string.');
|
|
140
167
|
case 4:
|
|
141
168
|
if (!(data !== undefined && !_utils["default"].isObject(data))) {
|
|
142
|
-
|
|
169
|
+
_context4.next = 6;
|
|
143
170
|
break;
|
|
144
171
|
}
|
|
145
172
|
throw new Error('The "data" argument must be an object.');
|
|
146
173
|
case 6:
|
|
147
|
-
return
|
|
174
|
+
return _context4.abrupt("return", this.app.request.post({
|
|
148
175
|
url: "".concat(this.app.urls.automationFlowTrigger(), "/activate-by-name"),
|
|
149
176
|
query: {
|
|
150
177
|
flowName: flowName,
|
|
@@ -154,11 +181,11 @@ var Automations = /*#__PURE__*/function () {
|
|
|
154
181
|
}));
|
|
155
182
|
case 7:
|
|
156
183
|
case "end":
|
|
157
|
-
return
|
|
184
|
+
return _context4.stop();
|
|
158
185
|
}
|
|
159
|
-
},
|
|
186
|
+
}, _callee4, this);
|
|
160
187
|
}));
|
|
161
|
-
function activateFlowTrigger(
|
|
188
|
+
function activateFlowTrigger(_x6, _x7, _x8) {
|
|
162
189
|
return _activateFlowTrigger.apply(this, arguments);
|
|
163
190
|
}
|
|
164
191
|
return activateFlowTrigger;
|
|
@@ -166,37 +193,37 @@ var Automations = /*#__PURE__*/function () {
|
|
|
166
193
|
}, {
|
|
167
194
|
key: "activateFlowTriggerById",
|
|
168
195
|
value: function () {
|
|
169
|
-
var _activateFlowTriggerById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
170
|
-
return _regenerator["default"].wrap(function
|
|
171
|
-
while (1) switch (
|
|
196
|
+
var _activateFlowTriggerById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(flowId, triggerId, data, execution) {
|
|
197
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
198
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
172
199
|
case 0:
|
|
173
200
|
if (!(!flowId || typeof flowId !== 'string')) {
|
|
174
|
-
|
|
201
|
+
_context5.next = 2;
|
|
175
202
|
break;
|
|
176
203
|
}
|
|
177
204
|
throw new Error('The "flowId" argument must be provided and must be a string.');
|
|
178
205
|
case 2:
|
|
179
206
|
if (!(!triggerId || typeof triggerId !== 'string')) {
|
|
180
|
-
|
|
207
|
+
_context5.next = 4;
|
|
181
208
|
break;
|
|
182
209
|
}
|
|
183
210
|
throw new Error('The "triggerId" argument must be provided and must be a string.');
|
|
184
211
|
case 4:
|
|
185
212
|
if (!(data !== undefined && !_utils["default"].isObject(data))) {
|
|
186
|
-
|
|
213
|
+
_context5.next = 6;
|
|
187
214
|
break;
|
|
188
215
|
}
|
|
189
216
|
throw new Error('The "data" argument must be an object.');
|
|
190
217
|
case 6:
|
|
191
218
|
if (!(execution !== undefined && (typeof execution !== 'string' || !execution))) {
|
|
192
|
-
|
|
219
|
+
_context5.next = 8;
|
|
193
220
|
break;
|
|
194
221
|
}
|
|
195
222
|
throw new Error(
|
|
196
223
|
// eslint-disable-next-line
|
|
197
224
|
'The "execution" argument must be a non-empty string and must be one of this values: "any", "all" or Execution ID.');
|
|
198
225
|
case 8:
|
|
199
|
-
return
|
|
226
|
+
return _context5.abrupt("return", this.app.request.post({
|
|
200
227
|
url: "".concat(this.app.urls.automationFlow(), "/").concat(flowId, "/trigger/").concat(triggerId, "/activate"),
|
|
201
228
|
data: data || {},
|
|
202
229
|
query: {
|
|
@@ -205,11 +232,11 @@ var Automations = /*#__PURE__*/function () {
|
|
|
205
232
|
}));
|
|
206
233
|
case 9:
|
|
207
234
|
case "end":
|
|
208
|
-
return
|
|
235
|
+
return _context5.stop();
|
|
209
236
|
}
|
|
210
|
-
},
|
|
237
|
+
}, _callee5, this);
|
|
211
238
|
}));
|
|
212
|
-
function activateFlowTriggerById(
|
|
239
|
+
function activateFlowTriggerById(_x9, _x10, _x11, _x12) {
|
|
213
240
|
return _activateFlowTriggerById.apply(this, arguments);
|
|
214
241
|
}
|
|
215
242
|
return activateFlowTriggerById;
|
|
@@ -10363,6 +10390,11 @@ var Urls = /*#__PURE__*/function () {
|
|
|
10363
10390
|
value: function automationFlow() {
|
|
10364
10391
|
return "".concat(this.automation(), "/flow");
|
|
10365
10392
|
}
|
|
10393
|
+
}, {
|
|
10394
|
+
key: "automationFlowExecutionContext",
|
|
10395
|
+
value: function automationFlowExecutionContext(executionId) {
|
|
10396
|
+
return "".concat(this.automation(), "/flow/execution-context/").concat(executionId);
|
|
10397
|
+
}
|
|
10366
10398
|
}, {
|
|
10367
10399
|
key: "automationFlowTrigger",
|
|
10368
10400
|
value: function automationFlowTrigger() {
|