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/backendless.d.ts
CHANGED
|
@@ -612,10 +612,12 @@ declare module Backendless {
|
|
|
612
612
|
* @type: Function
|
|
613
613
|
*/
|
|
614
614
|
|
|
615
|
+
type Execution = 'any' | 'all' | string
|
|
616
|
+
|
|
615
617
|
function activateFlow(flowName: string, initialData?: object): Promise<void>
|
|
616
618
|
function activateFlowById(flowId: string, initialData?: object): Promise<void>
|
|
617
619
|
function activateFlowTrigger(flowName: string, triggerName: string, data?: object): Promise<void>
|
|
618
|
-
function activateFlowTriggerById(flowId: string, triggerId: string, data?: object,
|
|
620
|
+
function activateFlowTriggerById(flowId: string, triggerId: string, data?: object, execution?: Execution): Promise<void>
|
|
619
621
|
}
|
|
620
622
|
|
|
621
623
|
/**
|
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.4
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2012-2023 BACKENDLESS.COM. All Rights Reserved.
|
|
6
6
|
*
|
|
@@ -166,8 +166,7 @@ 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,
|
|
170
|
-
var query;
|
|
169
|
+
var _activateFlowTriggerById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(flowId, triggerId, data, execution) {
|
|
171
170
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
172
171
|
while (1) switch (_context4.prev = _context4.next) {
|
|
173
172
|
case 0:
|
|
@@ -189,22 +188,22 @@ var Automations = /*#__PURE__*/function () {
|
|
|
189
188
|
}
|
|
190
189
|
throw new Error('The "data" argument must be an object.');
|
|
191
190
|
case 6:
|
|
192
|
-
if (!(
|
|
191
|
+
if (!(execution !== undefined && (typeof execution !== 'string' || !execution))) {
|
|
193
192
|
_context4.next = 8;
|
|
194
193
|
break;
|
|
195
194
|
}
|
|
196
|
-
throw new Error(
|
|
195
|
+
throw new Error(
|
|
196
|
+
// eslint-disable-next-line
|
|
197
|
+
'The "execution" argument must be a non-empty string and must be one of this values: "any", "all" or Execution ID.');
|
|
197
198
|
case 8:
|
|
198
|
-
query = {};
|
|
199
|
-
if (executionId) {
|
|
200
|
-
query.executionId = executionId;
|
|
201
|
-
}
|
|
202
199
|
return _context4.abrupt("return", this.app.request.post({
|
|
203
200
|
url: "".concat(this.app.urls.automationFlow(), "/").concat(flowId, "/trigger/").concat(triggerId, "/activate"),
|
|
204
201
|
data: data || {},
|
|
205
|
-
query:
|
|
202
|
+
query: {
|
|
203
|
+
execution: execution
|
|
204
|
+
}
|
|
206
205
|
}));
|
|
207
|
-
case
|
|
206
|
+
case 9:
|
|
208
207
|
case "end":
|
|
209
208
|
return _context4.stop();
|
|
210
209
|
}
|
|
@@ -12562,6 +12561,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
12562
12561
|
value: true
|
|
12563
12562
|
});
|
|
12564
12563
|
exports.castArray = void 0;
|
|
12564
|
+
exports.ensureEncoding = ensureEncoding;
|
|
12565
12565
|
exports.getFormData = getFormData;
|
|
12566
12566
|
exports.isStream = exports.isObject = exports.isNodeJS = exports.isFormData = exports.isBrowser = void 0;
|
|
12567
12567
|
exports.setFormData = setFormData;
|
|
@@ -12606,6 +12606,23 @@ function getFormData() {
|
|
|
12606
12606
|
function setFormData(value) {
|
|
12607
12607
|
CustomFormData = value;
|
|
12608
12608
|
}
|
|
12609
|
+
function ensureComponentEncoding(uriComponent) {
|
|
12610
|
+
if (uriComponent === decodeURIComponent(uriComponent)) {
|
|
12611
|
+
return encodeURIComponent(uriComponent);
|
|
12612
|
+
}
|
|
12613
|
+
return uriComponent;
|
|
12614
|
+
}
|
|
12615
|
+
function encodePath(path) {
|
|
12616
|
+
return path.split('/').map(ensureComponentEncoding).join('/');
|
|
12617
|
+
}
|
|
12618
|
+
function ensureEncoding(path) {
|
|
12619
|
+
try {
|
|
12620
|
+
var url = new URL(path);
|
|
12621
|
+
return url.origin + encodePath(url.pathname) + url.search;
|
|
12622
|
+
} catch (_unused) {
|
|
12623
|
+
return encodePath(path);
|
|
12624
|
+
}
|
|
12625
|
+
}
|
|
12609
12626
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
|
|
12610
12627
|
|
|
12611
12628
|
/***/ }),
|
|
@@ -12662,7 +12679,7 @@ var Request = exports.Request = /*#__PURE__*/function (_EventEmitter) {
|
|
|
12662
12679
|
_classCallCheck(this, Request);
|
|
12663
12680
|
_this = _super.call(this);
|
|
12664
12681
|
_this.method = method;
|
|
12665
|
-
_this.path = path;
|
|
12682
|
+
_this.path = (0, _utils.ensureEncoding)(path);
|
|
12666
12683
|
_this.body = body;
|
|
12667
12684
|
_this.tags = undefined;
|
|
12668
12685
|
_this.unwrap = true;
|