backendless 7.3.2 → 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 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, executionId?: string): Promise<void>
620
+ function activateFlowTriggerById(flowId: string, triggerId: string, data?: object, execution?: Execution): Promise<void>
619
621
  }
620
622
 
621
623
  /**
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ********************************************************************************************************************
3
- * Backendless SDK for JavaScript. Version: 7.3.2
3
+ * Backendless SDK for JavaScript. Version: 7.3.3
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, executionId) {
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 (!(executionId !== undefined && (typeof executionId !== 'string' || !executionId))) {
191
+ if (!(execution !== undefined && (typeof execution !== 'string' || !execution))) {
193
192
  _context4.next = 8;
194
193
  break;
195
194
  }
196
- throw new Error('The "executionId" argument must be a non-empty string.');
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: query
202
+ query: {
203
+ execution: execution
204
+ }
206
205
  }));
207
- case 11:
206
+ case 9:
208
207
  case "end":
209
208
  return _context4.stop();
210
209
  }