backendless 7.3.0 → 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 +4 -1
- package/dist/backendless.js +42 -8
- package/dist/backendless.js.map +1 -1
- package/dist/backendless.min.js +2 -2
- package/es/automations/index.js +16 -4
- package/es/index.js +24 -2
- package/es/urls.js +1 -1
- package/lib/automations/index.js +16 -4
- package/lib/index.js +24 -2
- package/lib/urls.js +1 -1
- package/package.json +1 -1
- package/src/automations/index.js +14 -3
- package/src/index.js +34 -10
- package/src/urls.js +1 -1
package/backendless.d.ts
CHANGED
|
@@ -7,9 +7,11 @@ declare module Backendless {
|
|
|
7
7
|
|
|
8
8
|
let debugMode: boolean;
|
|
9
9
|
let serverURL: string;
|
|
10
|
+
let automationServerURL: string;
|
|
10
11
|
let appId: string;
|
|
11
12
|
let apiKey: string;
|
|
12
13
|
let appPath: string;
|
|
14
|
+
let automationPath: string;
|
|
13
15
|
let domain: string;
|
|
14
16
|
let apiURI: string;
|
|
15
17
|
let XMLHttpRequest: any;
|
|
@@ -35,6 +37,7 @@ declare module Backendless {
|
|
|
35
37
|
apiKey?: string;
|
|
36
38
|
standalone?: boolean;
|
|
37
39
|
serverURL?: string;
|
|
40
|
+
automationServerURL?: string;
|
|
38
41
|
domain?: string;
|
|
39
42
|
debugMode?: boolean;
|
|
40
43
|
XMLHttpRequest?: XMLHttpRequest;
|
|
@@ -612,7 +615,7 @@ declare module Backendless {
|
|
|
612
615
|
function activateFlow(flowName: string, initialData?: object): Promise<void>
|
|
613
616
|
function activateFlowById(flowId: string, initialData?: object): Promise<void>
|
|
614
617
|
function activateFlowTrigger(flowName: string, triggerName: string, data?: object): Promise<void>
|
|
615
|
-
function activateFlowTriggerById(flowId: string, triggerId: string, data?: object): Promise<void>
|
|
618
|
+
function activateFlowTriggerById(flowId: string, triggerId: string, data?: object, executionId?: string): Promise<void>
|
|
616
619
|
}
|
|
617
620
|
|
|
618
621
|
/**
|
package/dist/backendless.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* ********************************************************************************************************************
|
|
3
|
-
* Backendless SDK for JavaScript. Version: 7.3.
|
|
3
|
+
* Backendless SDK for JavaScript. Version: 7.3.2
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2012-2023 BACKENDLESS.COM. All Rights Reserved.
|
|
6
6
|
*
|
|
@@ -166,7 +166,8 @@ var Automations = /*#__PURE__*/function () {
|
|
|
166
166
|
}, {
|
|
167
167
|
key: "activateFlowTriggerById",
|
|
168
168
|
value: function () {
|
|
169
|
-
var _activateFlowTriggerById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(flowId, triggerId, data) {
|
|
169
|
+
var _activateFlowTriggerById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(flowId, triggerId, data, executionId) {
|
|
170
|
+
var query;
|
|
170
171
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
171
172
|
while (1) switch (_context4.prev = _context4.next) {
|
|
172
173
|
case 0:
|
|
@@ -188,17 +189,28 @@ var Automations = /*#__PURE__*/function () {
|
|
|
188
189
|
}
|
|
189
190
|
throw new Error('The "data" argument must be an object.');
|
|
190
191
|
case 6:
|
|
192
|
+
if (!(executionId !== undefined && (typeof executionId !== 'string' || !executionId))) {
|
|
193
|
+
_context4.next = 8;
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
throw new Error('The "executionId" argument must be a non-empty string.');
|
|
197
|
+
case 8:
|
|
198
|
+
query = {};
|
|
199
|
+
if (executionId) {
|
|
200
|
+
query.executionId = executionId;
|
|
201
|
+
}
|
|
191
202
|
return _context4.abrupt("return", this.app.request.post({
|
|
192
203
|
url: "".concat(this.app.urls.automationFlow(), "/").concat(flowId, "/trigger/").concat(triggerId, "/activate"),
|
|
193
|
-
data: data || {}
|
|
204
|
+
data: data || {},
|
|
205
|
+
query: query
|
|
194
206
|
}));
|
|
195
|
-
case
|
|
207
|
+
case 11:
|
|
196
208
|
case "end":
|
|
197
209
|
return _context4.stop();
|
|
198
210
|
}
|
|
199
211
|
}, _callee4, this);
|
|
200
212
|
}));
|
|
201
|
-
function activateFlowTriggerById(_x8, _x9, _x10) {
|
|
213
|
+
function activateFlowTriggerById(_x8, _x9, _x10, _x11) {
|
|
202
214
|
return _activateFlowTriggerById.apply(this, arguments);
|
|
203
215
|
}
|
|
204
216
|
return activateFlowTriggerById;
|
|
@@ -6481,6 +6493,7 @@ var DEFAULT_PROPS = {
|
|
|
6481
6493
|
appId: null,
|
|
6482
6494
|
apiKey: null,
|
|
6483
6495
|
serverURL: 'https://api.backendless.com',
|
|
6496
|
+
automationServerURL: null,
|
|
6484
6497
|
domain: null,
|
|
6485
6498
|
apiURI: '/api',
|
|
6486
6499
|
debugMode: false,
|
|
@@ -6695,8 +6708,18 @@ var Backendless = /*#__PURE__*/function () {
|
|
|
6695
6708
|
get: function get() {
|
|
6696
6709
|
return this.__serverURL;
|
|
6697
6710
|
},
|
|
6698
|
-
set: function set(
|
|
6699
|
-
this.__serverURL =
|
|
6711
|
+
set: function set(url) {
|
|
6712
|
+
this.__serverURL = url;
|
|
6713
|
+
}
|
|
6714
|
+
|
|
6715
|
+
///--------automationServerURL-------///
|
|
6716
|
+
}, {
|
|
6717
|
+
key: "automationServerURL",
|
|
6718
|
+
get: function get() {
|
|
6719
|
+
return this.__automationServerURL;
|
|
6720
|
+
},
|
|
6721
|
+
set: function set(url) {
|
|
6722
|
+
this.__automationServerURL = url;
|
|
6700
6723
|
}
|
|
6701
6724
|
|
|
6702
6725
|
///--------domain-------///
|
|
@@ -6731,6 +6754,17 @@ var Backendless = /*#__PURE__*/function () {
|
|
|
6731
6754
|
set: function set(appPath) {
|
|
6732
6755
|
throw new Error("Setting '".concat(appPath, "' value to Backendless.appPath directly is not possible, ") + 'instead you must use Backendless.initApp(APP_ID, API_KEY) for setup the value');
|
|
6733
6756
|
}
|
|
6757
|
+
}, {
|
|
6758
|
+
key: "automationPath",
|
|
6759
|
+
get: function get() {
|
|
6760
|
+
if (!this.automationServerURL) {
|
|
6761
|
+
return this.appPath;
|
|
6762
|
+
}
|
|
6763
|
+
return [this.automationServerURL, this.appId, this.apiKey].join('/');
|
|
6764
|
+
},
|
|
6765
|
+
set: function set(automationPath) {
|
|
6766
|
+
throw new Error("Setting '".concat(automationPath, "' value to Backendless.automationPath directly is not possible"));
|
|
6767
|
+
}
|
|
6734
6768
|
|
|
6735
6769
|
///--------debugMode-------///
|
|
6736
6770
|
}, {
|
|
@@ -10304,7 +10338,7 @@ var Urls = /*#__PURE__*/function () {
|
|
|
10304
10338
|
}, {
|
|
10305
10339
|
key: "automation",
|
|
10306
10340
|
value: function automation() {
|
|
10307
|
-
return "".concat(this.
|
|
10341
|
+
return "".concat(this.app.automationPath, "/automation");
|
|
10308
10342
|
}
|
|
10309
10343
|
}, {
|
|
10310
10344
|
key: "automationFlow",
|