backendless 7.2.2 → 7.2.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.
@@ -32,7 +32,7 @@ var Automations = /*#__PURE__*/function () {
32
32
  _context.next = 4;
33
33
  break;
34
34
  }
35
- throw new Error('The "initialData" argument must be an object with an arbitrary structure.');
35
+ throw new Error('The "initialData" argument must be an object.');
36
36
  case 4:
37
37
  return _context.abrupt("return", this.app.request.post({
38
38
  url: "".concat(this.app.urls.automationFlow(), "/activate-by-name"),
@@ -53,31 +53,65 @@ var Automations = /*#__PURE__*/function () {
53
53
  return activateFlow;
54
54
  }()
55
55
  }, {
56
- key: "activateFlowTrigger",
56
+ key: "activateFlowById",
57
57
  value: function () {
58
- var _activateFlowTrigger = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(flowName, triggerName, data) {
58
+ var _activateFlowById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(flowId, initialData) {
59
59
  return _regenerator["default"].wrap(function _callee2$(_context2) {
60
60
  while (1) switch (_context2.prev = _context2.next) {
61
61
  case 0:
62
- if (!(!flowName || typeof flowName !== 'string')) {
62
+ if (!(!flowId || typeof flowId !== 'string')) {
63
63
  _context2.next = 2;
64
64
  break;
65
65
  }
66
+ throw new Error('The "flowId" argument must be provided and must be a string.');
67
+ case 2:
68
+ if (!(initialData !== undefined && !_utils["default"].isObject(initialData))) {
69
+ _context2.next = 4;
70
+ break;
71
+ }
72
+ throw new Error('The "initialData" argument must be an object.');
73
+ case 4:
74
+ return _context2.abrupt("return", this.app.request.post({
75
+ url: "".concat(this.app.urls.automationFlow(), "/").concat(flowId, "/activate"),
76
+ data: initialData || {}
77
+ }));
78
+ case 5:
79
+ case "end":
80
+ return _context2.stop();
81
+ }
82
+ }, _callee2, this);
83
+ }));
84
+ function activateFlowById(_x3, _x4) {
85
+ return _activateFlowById.apply(this, arguments);
86
+ }
87
+ return activateFlowById;
88
+ }()
89
+ }, {
90
+ key: "activateFlowTrigger",
91
+ value: function () {
92
+ var _activateFlowTrigger = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(flowName, triggerName, data) {
93
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
94
+ while (1) switch (_context3.prev = _context3.next) {
95
+ case 0:
96
+ if (!(!flowName || typeof flowName !== 'string')) {
97
+ _context3.next = 2;
98
+ break;
99
+ }
66
100
  throw new Error('The "flowName" argument must be provided and must be a string.');
67
101
  case 2:
68
102
  if (!(!triggerName || typeof triggerName !== 'string')) {
69
- _context2.next = 4;
103
+ _context3.next = 4;
70
104
  break;
71
105
  }
72
106
  throw new Error('The "triggerName" argument must be provided and must be a string.');
73
107
  case 4:
74
108
  if (!(data !== undefined && !_utils["default"].isObject(data))) {
75
- _context2.next = 6;
109
+ _context3.next = 6;
76
110
  break;
77
111
  }
78
- throw new Error('The "data" argument must be an object with an arbitrary structure.');
112
+ throw new Error('The "data" argument must be an object.');
79
113
  case 6:
80
- return _context2.abrupt("return", this.app.request.post({
114
+ return _context3.abrupt("return", this.app.request.post({
81
115
  url: "".concat(this.app.urls.automationFlowTrigger(), "/activate-by-name"),
82
116
  query: {
83
117
  flowName: flowName,
@@ -87,15 +121,55 @@ var Automations = /*#__PURE__*/function () {
87
121
  }));
88
122
  case 7:
89
123
  case "end":
90
- return _context2.stop();
124
+ return _context3.stop();
91
125
  }
92
- }, _callee2, this);
126
+ }, _callee3, this);
93
127
  }));
94
- function activateFlowTrigger(_x3, _x4, _x5) {
128
+ function activateFlowTrigger(_x5, _x6, _x7) {
95
129
  return _activateFlowTrigger.apply(this, arguments);
96
130
  }
97
131
  return activateFlowTrigger;
98
132
  }()
133
+ }, {
134
+ key: "activateFlowTriggerById",
135
+ value: function () {
136
+ var _activateFlowTriggerById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(flowId, triggerId, data) {
137
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
138
+ while (1) switch (_context4.prev = _context4.next) {
139
+ case 0:
140
+ if (!(!flowId || typeof flowId !== 'string')) {
141
+ _context4.next = 2;
142
+ break;
143
+ }
144
+ throw new Error('The "flowId" argument must be provided and must be a string.');
145
+ case 2:
146
+ if (!(!triggerId || typeof triggerId !== 'string')) {
147
+ _context4.next = 4;
148
+ break;
149
+ }
150
+ throw new Error('The "triggerId" argument must be provided and must be a string.');
151
+ case 4:
152
+ if (!(data !== undefined && !_utils["default"].isObject(data))) {
153
+ _context4.next = 6;
154
+ break;
155
+ }
156
+ throw new Error('The "data" argument must be an object.');
157
+ case 6:
158
+ return _context4.abrupt("return", this.app.request.post({
159
+ url: "".concat(this.app.urls.automationFlow(), "/").concat(flowId, "/trigger/").concat(triggerId, "/activate"),
160
+ data: data || {}
161
+ }));
162
+ case 7:
163
+ case "end":
164
+ return _context4.stop();
165
+ }
166
+ }, _callee4, this);
167
+ }));
168
+ function activateFlowTriggerById(_x8, _x9, _x10) {
169
+ return _activateFlowTriggerById.apply(this, arguments);
170
+ }
171
+ return activateFlowTriggerById;
172
+ }()
99
173
  }]);
100
174
  return Automations;
101
175
  }();
@@ -83,15 +83,37 @@ var Messaging = /*#__PURE__*/function () {
83
83
  return publish;
84
84
  }()
85
85
  }, {
86
- key: "pushWithTemplate",
86
+ key: "deleteChannel",
87
87
  value: function () {
88
- var _pushWithTemplate = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(templateName, templateValues) {
89
- var data;
88
+ var _deleteChannel = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(channelName) {
90
89
  return _regenerator["default"].wrap(function _callee2$(_context2) {
91
90
  while (1) switch (_context2.prev = _context2.next) {
91
+ case 0:
92
+ validateChannelName(channelName);
93
+ return _context2.abrupt("return", this.app.request["delete"]({
94
+ url: this.app.urls.messagingChannelName(channelName)
95
+ }));
96
+ case 2:
97
+ case "end":
98
+ return _context2.stop();
99
+ }
100
+ }, _callee2, this);
101
+ }));
102
+ function deleteChannel(_x5) {
103
+ return _deleteChannel.apply(this, arguments);
104
+ }
105
+ return deleteChannel;
106
+ }()
107
+ }, {
108
+ key: "pushWithTemplate",
109
+ value: function () {
110
+ var _pushWithTemplate = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(templateName, templateValues) {
111
+ var data;
112
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
113
+ while (1) switch (_context3.prev = _context3.next) {
92
114
  case 0:
93
115
  if (!(!templateName || typeof templateName !== 'string')) {
94
- _context2.next = 2;
116
+ _context3.next = 2;
95
117
  break;
96
118
  }
97
119
  throw new Error('Push Template Name must be provided and must be a string.');
@@ -100,17 +122,17 @@ var Messaging = /*#__PURE__*/function () {
100
122
  if (templateValues) {
101
123
  data.templateValues = templateValues;
102
124
  }
103
- return _context2.abrupt("return", this.app.request.post({
125
+ return _context3.abrupt("return", this.app.request.post({
104
126
  url: this.app.urls.messagingPushWithTemplate(templateName),
105
127
  data: data
106
128
  }));
107
129
  case 5:
108
130
  case "end":
109
- return _context2.stop();
131
+ return _context3.stop();
110
132
  }
111
- }, _callee2, this);
133
+ }, _callee3, this);
112
134
  }));
113
- function pushWithTemplate(_x5, _x6) {
135
+ function pushWithTemplate(_x6, _x7) {
114
136
  return _pushWithTemplate.apply(this, arguments);
115
137
  }
116
138
  return pushWithTemplate;
@@ -118,31 +140,31 @@ var Messaging = /*#__PURE__*/function () {
118
140
  }, {
119
141
  key: "sendEmail",
120
142
  value: function () {
121
- var _sendEmail = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(subject, bodyParts, recipients, attachments) {
143
+ var _sendEmail = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(subject, bodyParts, recipients, attachments) {
122
144
  var data;
123
- return _regenerator["default"].wrap(function _callee3$(_context3) {
124
- while (1) switch (_context3.prev = _context3.next) {
145
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
146
+ while (1) switch (_context4.prev = _context4.next) {
125
147
  case 0:
126
148
  if (!(!subject || typeof subject !== 'string')) {
127
- _context3.next = 2;
149
+ _context4.next = 2;
128
150
  break;
129
151
  }
130
152
  throw new Error('Email Subject must be provided and must be a string.');
131
153
  case 2:
132
154
  if (!(!bodyParts || Array.isArray(bodyParts) || (0, _typeof2["default"])(bodyParts) !== 'object')) {
133
- _context3.next = 4;
155
+ _context4.next = 4;
134
156
  break;
135
157
  }
136
158
  throw new Error('BodyParts must be an object');
137
159
  case 4:
138
160
  if (!(!bodyParts.textmessage && !bodyParts.htmlmessage)) {
139
- _context3.next = 6;
161
+ _context4.next = 6;
140
162
  break;
141
163
  }
142
164
  throw new Error('BodyParts must contain at least one property of [ textmessage | htmlmessage ]');
143
165
  case 6:
144
166
  if (!(!Array.isArray(recipients) || !recipients.length)) {
145
- _context3.next = 8;
167
+ _context4.next = 8;
146
168
  break;
147
169
  }
148
170
  throw new Error('Recipients must be a non empty array.');
@@ -155,17 +177,17 @@ var Messaging = /*#__PURE__*/function () {
155
177
  if (Array.isArray(attachments) && attachments.length) {
156
178
  data.attachment = attachments;
157
179
  }
158
- return _context3.abrupt("return", this.app.request.post({
180
+ return _context4.abrupt("return", this.app.request.post({
159
181
  url: this.app.urls.messagingEmail(),
160
182
  data: data
161
183
  }));
162
184
  case 11:
163
185
  case "end":
164
- return _context3.stop();
186
+ return _context4.stop();
165
187
  }
166
- }, _callee3, this);
188
+ }, _callee4, this);
167
189
  }));
168
- function sendEmail(_x7, _x8, _x9, _x10) {
190
+ function sendEmail(_x8, _x9, _x10, _x11) {
169
191
  return _sendEmail.apply(this, arguments);
170
192
  }
171
193
  return sendEmail;
@@ -173,19 +195,19 @@ var Messaging = /*#__PURE__*/function () {
173
195
  }, {
174
196
  key: "sendEmailFromTemplate",
175
197
  value: function () {
176
- var _sendEmailFromTemplate = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(templateName, envelopeObject, templateValues, attachments) {
198
+ var _sendEmailFromTemplate = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(templateName, envelopeObject, templateValues, attachments) {
177
199
  var data;
178
- return _regenerator["default"].wrap(function _callee4$(_context4) {
179
- while (1) switch (_context4.prev = _context4.next) {
200
+ return _regenerator["default"].wrap(function _callee5$(_context5) {
201
+ while (1) switch (_context5.prev = _context5.next) {
180
202
  case 0:
181
203
  if (!(!templateName || typeof templateName !== 'string')) {
182
- _context4.next = 2;
204
+ _context5.next = 2;
183
205
  break;
184
206
  }
185
207
  throw new Error('Email Template Name must be provided and must be a string.');
186
208
  case 2:
187
209
  if (envelopeObject instanceof _helpers.EmailEnvelope) {
188
- _context4.next = 4;
210
+ _context5.next = 4;
189
211
  break;
190
212
  }
191
213
  throw new Error('EmailEnvelope is required and should be instance of Backendless.Messaging.EmailEnvelope');
@@ -201,17 +223,17 @@ var Messaging = /*#__PURE__*/function () {
201
223
  if (attachments) {
202
224
  data.attachment = attachments;
203
225
  }
204
- return _context4.abrupt("return", this.app.request.post({
226
+ return _context5.abrupt("return", this.app.request.post({
205
227
  url: this.app.urls.emailTemplateSend(),
206
228
  data: data
207
229
  }));
208
230
  case 10:
209
231
  case "end":
210
- return _context4.stop();
232
+ return _context5.stop();
211
233
  }
212
- }, _callee4, this);
234
+ }, _callee5, this);
213
235
  }));
214
- function sendEmailFromTemplate(_x11, _x12, _x13, _x14) {
236
+ function sendEmailFromTemplate(_x12, _x13, _x14, _x15) {
215
237
  return _sendEmailFromTemplate.apply(this, arguments);
216
238
  }
217
239
  return sendEmailFromTemplate;
@@ -219,26 +241,26 @@ var Messaging = /*#__PURE__*/function () {
219
241
  }, {
220
242
  key: "cancel",
221
243
  value: function () {
222
- var _cancel = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(messageId) {
223
- return _regenerator["default"].wrap(function _callee5$(_context5) {
224
- while (1) switch (_context5.prev = _context5.next) {
244
+ var _cancel = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(messageId) {
245
+ return _regenerator["default"].wrap(function _callee6$(_context6) {
246
+ while (1) switch (_context6.prev = _context6.next) {
225
247
  case 0:
226
248
  if (!(!messageId || typeof messageId !== 'string')) {
227
- _context5.next = 2;
249
+ _context6.next = 2;
228
250
  break;
229
251
  }
230
252
  throw new Error('Message ID must be provided and must be a string.');
231
253
  case 2:
232
- return _context5.abrupt("return", this.app.request["delete"]({
254
+ return _context6.abrupt("return", this.app.request["delete"]({
233
255
  url: this.app.urls.messagingMessage(messageId)
234
256
  }));
235
257
  case 3:
236
258
  case "end":
237
- return _context5.stop();
259
+ return _context6.stop();
238
260
  }
239
- }, _callee5, this);
261
+ }, _callee6, this);
240
262
  }));
241
- function cancel(_x15) {
263
+ function cancel(_x16) {
242
264
  return _cancel.apply(this, arguments);
243
265
  }
244
266
  return cancel;
@@ -246,10 +268,10 @@ var Messaging = /*#__PURE__*/function () {
246
268
  }, {
247
269
  key: "registerDevice",
248
270
  value: function () {
249
- var _registerDevice = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(deviceToken, channels, expiration) {
271
+ var _registerDevice = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(deviceToken, channels, expiration) {
250
272
  var device, data;
251
- return _regenerator["default"].wrap(function _callee6$(_context6) {
252
- while (1) switch (_context6.prev = _context6.next) {
273
+ return _regenerator["default"].wrap(function _callee7$(_context7) {
274
+ while (1) switch (_context7.prev = _context7.next) {
253
275
  case 0:
254
276
  device = this.app.device;
255
277
  data = {
@@ -266,17 +288,17 @@ var Messaging = /*#__PURE__*/function () {
266
288
  } else if (expiration instanceof Date) {
267
289
  data.expiration = expiration.getTime() / 1000;
268
290
  }
269
- return _context6.abrupt("return", this.app.request.post({
291
+ return _context7.abrupt("return", this.app.request.post({
270
292
  url: this.app.urls.messagingRegistrations(),
271
293
  data: data
272
294
  }));
273
295
  case 5:
274
296
  case "end":
275
- return _context6.stop();
297
+ return _context7.stop();
276
298
  }
277
- }, _callee6, this);
299
+ }, _callee7, this);
278
300
  }));
279
- function registerDevice(_x16, _x17, _x18) {
301
+ function registerDevice(_x17, _x18, _x19) {
280
302
  return _registerDevice.apply(this, arguments);
281
303
  }
282
304
  return registerDevice;
@@ -284,20 +306,20 @@ var Messaging = /*#__PURE__*/function () {
284
306
  }, {
285
307
  key: "getRegistrations",
286
308
  value: function () {
287
- var _getRegistrations = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
309
+ var _getRegistrations = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
288
310
  var device;
289
- return _regenerator["default"].wrap(function _callee7$(_context7) {
290
- while (1) switch (_context7.prev = _context7.next) {
311
+ return _regenerator["default"].wrap(function _callee8$(_context8) {
312
+ while (1) switch (_context8.prev = _context8.next) {
291
313
  case 0:
292
314
  device = this.app.device;
293
- return _context7.abrupt("return", this.app.request.get({
315
+ return _context8.abrupt("return", this.app.request.get({
294
316
  url: this.app.urls.messagingRegistrationDevice(device.uuid)
295
317
  }));
296
318
  case 2:
297
319
  case "end":
298
- return _context7.stop();
320
+ return _context8.stop();
299
321
  }
300
- }, _callee7, this);
322
+ }, _callee8, this);
301
323
  }));
302
324
  function getRegistrations() {
303
325
  return _getRegistrations.apply(this, arguments);
@@ -307,20 +329,20 @@ var Messaging = /*#__PURE__*/function () {
307
329
  }, {
308
330
  key: "unregisterDevice",
309
331
  value: function () {
310
- var _unregisterDevice = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
332
+ var _unregisterDevice = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
311
333
  var device;
312
- return _regenerator["default"].wrap(function _callee8$(_context8) {
313
- while (1) switch (_context8.prev = _context8.next) {
334
+ return _regenerator["default"].wrap(function _callee9$(_context9) {
335
+ while (1) switch (_context9.prev = _context9.next) {
314
336
  case 0:
315
337
  device = this.app.device;
316
- return _context8.abrupt("return", this.app.request["delete"]({
338
+ return _context9.abrupt("return", this.app.request["delete"]({
317
339
  url: this.app.urls.messagingRegistrationDevice(device.uuid)
318
340
  }));
319
341
  case 2:
320
342
  case "end":
321
- return _context8.stop();
343
+ return _context9.stop();
322
344
  }
323
- }, _callee8, this);
345
+ }, _callee9, this);
324
346
  }));
325
347
  function unregisterDevice() {
326
348
  return _unregisterDevice.apply(this, arguments);
@@ -330,26 +352,26 @@ var Messaging = /*#__PURE__*/function () {
330
352
  }, {
331
353
  key: "getMessageStatus",
332
354
  value: function () {
333
- var _getMessageStatus = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9(messageId) {
334
- return _regenerator["default"].wrap(function _callee9$(_context9) {
335
- while (1) switch (_context9.prev = _context9.next) {
355
+ var _getMessageStatus = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(messageId) {
356
+ return _regenerator["default"].wrap(function _callee10$(_context10) {
357
+ while (1) switch (_context10.prev = _context10.next) {
336
358
  case 0:
337
359
  if (!(!messageId || typeof messageId !== 'string')) {
338
- _context9.next = 2;
360
+ _context10.next = 2;
339
361
  break;
340
362
  }
341
363
  throw new Error('Message ID must be provided and must be a string.');
342
364
  case 2:
343
- return _context9.abrupt("return", this.app.request.get({
365
+ return _context10.abrupt("return", this.app.request.get({
344
366
  url: this.app.urls.messagingMessage(messageId)
345
367
  }));
346
368
  case 3:
347
369
  case "end":
348
- return _context9.stop();
370
+ return _context10.stop();
349
371
  }
350
- }, _callee9, this);
372
+ }, _callee10, this);
351
373
  }));
352
- function getMessageStatus(_x19) {
374
+ function getMessageStatus(_x20) {
353
375
  return _getMessageStatus.apply(this, arguments);
354
376
  }
355
377
  return getMessageStatus;
@@ -357,26 +379,26 @@ var Messaging = /*#__PURE__*/function () {
357
379
  }, {
358
380
  key: "getPushTemplates",
359
381
  value: function () {
360
- var _getPushTemplates = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(deviceType) {
361
- return _regenerator["default"].wrap(function _callee10$(_context10) {
362
- while (1) switch (_context10.prev = _context10.next) {
382
+ var _getPushTemplates = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(deviceType) {
383
+ return _regenerator["default"].wrap(function _callee11$(_context11) {
384
+ while (1) switch (_context11.prev = _context11.next) {
363
385
  case 0:
364
386
  if (!(!deviceType || typeof deviceType !== 'string')) {
365
- _context10.next = 2;
387
+ _context11.next = 2;
366
388
  break;
367
389
  }
368
390
  throw new Error('Device Type must be provided and must be a string.');
369
391
  case 2:
370
- return _context10.abrupt("return", this.app.request.get({
392
+ return _context11.abrupt("return", this.app.request.get({
371
393
  url: this.app.urls.messagingPushTemplates(deviceType)
372
394
  }));
373
395
  case 3:
374
396
  case "end":
375
- return _context10.stop();
397
+ return _context11.stop();
376
398
  }
377
- }, _callee10, this);
399
+ }, _callee11, this);
378
400
  }));
379
- function getPushTemplates(_x20) {
401
+ function getPushTemplates(_x21) {
380
402
  return _getPushTemplates.apply(this, arguments);
381
403
  }
382
404
  return getPushTemplates;
@@ -30,10 +30,11 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
30
30
  var TransactionOperationError = /*#__PURE__*/function (_Error) {
31
31
  (0, _inherits2["default"])(TransactionOperationError, _Error);
32
32
  var _super = _createSuper(TransactionOperationError);
33
- function TransactionOperationError(message, operation) {
33
+ function TransactionOperationError(error, operation) {
34
34
  var _this;
35
35
  (0, _classCallCheck2["default"])(this, TransactionOperationError);
36
- _this = _super.call(this, message);
36
+ _this = _super.call(this, error.message);
37
+ _this.code = error.code;
37
38
  _this.operation = operation;
38
39
  return _this;
39
40
  }
@@ -193,7 +194,7 @@ var UnitOfWork = /*#__PURE__*/function () {
193
194
  var operation = this.payload.operations.find(function (op) {
194
195
  return result.error.operation.opResultId === op.meta.opResult.getOpResultId();
195
196
  });
196
- result.error = new TransactionOperationError(result.error.message, operation.meta.opResult);
197
+ result.error = new TransactionOperationError(result.error, operation.meta.opResult);
197
198
  operation.meta.opResult.setError(result.error);
198
199
  }
199
200
  return new UnitOfWorkResult(result);
package/es/urls.js CHANGED
@@ -279,6 +279,16 @@ var Urls = /*#__PURE__*/function () {
279
279
  value: function messagingChannel(channel) {
280
280
  return "".concat(this.messaging(), "/").concat(channel);
281
281
  }
282
+ }, {
283
+ key: "messagingChannels",
284
+ value: function messagingChannels() {
285
+ return "".concat(this.messaging(), "/channels");
286
+ }
287
+ }, {
288
+ key: "messagingChannelName",
289
+ value: function messagingChannelName(channelName) {
290
+ return "".concat(this.messagingChannels(), "/").concat(channelName);
291
+ }
282
292
  }, {
283
293
  key: "messagingMessage",
284
294
  value: function messagingMessage(messageId) {