backendless 7.2.3 → 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.
package/backendless.d.ts CHANGED
@@ -610,7 +610,9 @@ declare module Backendless {
610
610
  */
611
611
 
612
612
  function activateFlow(flowName: string, initialData?: object): Promise<void>
613
+ function activateFlowById(flowId: string, initialData?: object): Promise<void>
613
614
  function activateFlowTrigger(flowName: string, triggerName: string, data?: object): Promise<void>
615
+ function activateFlowTriggerById(flowId: string, triggerId: string, data?: object): Promise<void>
614
616
  }
615
617
 
616
618
  /**
@@ -711,6 +713,8 @@ declare module Backendless {
711
713
 
712
714
  function subscribe(channelName: string): ChannelClass;
713
715
 
716
+ function deleteChannel(channelName: string): Promise<object>;
717
+
714
718
  function publish(channelName: string, message: string | Object, publishOptions?: Backendless.PublishOptions, deliveryOptions?: Backendless.DeliveryOptions): Promise<Object>;
715
719
 
716
720
  function sendEmail(subject: string, bodyParts: Backendless.Bodyparts, recipients: string[], attachments?: string[]): Promise<object>;
@@ -1351,6 +1355,7 @@ declare module Backendless {
1351
1355
  removeUpsertListeners(): Backendless.EventHandler;
1352
1356
 
1353
1357
  removeUpsertListener<T = object>(callback: (obj: T) => void): Backendless.EventHandler;
1358
+ removeUpsertListener<T = object>(whereClause: string, callback: (obj: T) => void): Backendless.EventHandler;
1354
1359
 
1355
1360
  addCreateListener<T = object>(whereClause: string, callback: (obj: T) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
1356
1361
  addCreateListener<T = object>(whereClause: string, callback: (obj: T) => void): Backendless.EventHandler;
@@ -1384,17 +1389,24 @@ declare module Backendless {
1384
1389
 
1385
1390
  addBulkUpsertListener(callback: (list: string[]) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
1386
1391
  addBulkUpsertListener(callback: (list: string[]) => void): Backendless.EventHandler;
1392
+ addBulkUpsertListener(whereClause: string, callback: (list: string[]) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
1393
+ addBulkUpsertListener(whereClause: string, callback: (list: string[]) => void): Backendless.EventHandler;
1387
1394
 
1388
1395
  removeBulkUpsertListener(callback: (list: string[]) => void): Backendless.EventHandler;
1389
-
1396
+ removeBulkUpsertListener(whereClause: string, callback: (list: string[]) => void): Backendless.EventHandler;
1397
+ removeBulkUpsertListeners(whereClause: string): Backendless.EventHandler;
1390
1398
  removeBulkUpsertListeners(): Backendless.EventHandler;
1391
1399
 
1392
1400
  addBulkCreateListener(callback: (list: string[]) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
1393
1401
  addBulkCreateListener(callback: (list: string[]) => void): Backendless.EventHandler;
1402
+ addBulkCreateListener(whereClause: string, callback: (list: string[]) => void): Backendless.EventHandler;
1403
+ addBulkCreateListener(whereClause: string, callback: (list: string[]) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
1394
1404
 
1405
+ removeBulkCreateListener(whereClause: string, callback: (list: string[]) => void): Backendless.EventHandler;
1395
1406
  removeBulkCreateListener(callback: (list: string[]) => void): Backendless.EventHandler;
1396
1407
 
1397
1408
  removeBulkCreateListeners(): Backendless.EventHandler;
1409
+ removeBulkCreateListeners(whereClause: string): Backendless.EventHandler;
1398
1410
 
1399
1411
  addBulkUpdateListener(whereClause: string, callback: (obj: RTBulkChangesSubscriptionResult) => void, onError: (error: RTSubscriptionError) => void): Backendless.EventHandler;
1400
1412
  addBulkUpdateListener(whereClause: string, callback: (obj: RTBulkChangesSubscriptionResult) => void): Backendless.EventHandler;
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ********************************************************************************************************************
3
- * Backendless SDK for JavaScript. Version: 7.2.3
3
+ * Backendless SDK for JavaScript. Version: 7.2.4
4
4
  *
5
5
  * Copyright 2012-2023 BACKENDLESS.COM. All Rights Reserved.
6
6
  *
@@ -65,7 +65,7 @@ var Automations = /*#__PURE__*/function () {
65
65
  _context.next = 4;
66
66
  break;
67
67
  }
68
- throw new Error('The "initialData" argument must be an object with an arbitrary structure.');
68
+ throw new Error('The "initialData" argument must be an object.');
69
69
  case 4:
70
70
  return _context.abrupt("return", this.app.request.post({
71
71
  url: "".concat(this.app.urls.automationFlow(), "/activate-by-name"),
@@ -86,31 +86,65 @@ var Automations = /*#__PURE__*/function () {
86
86
  return activateFlow;
87
87
  }()
88
88
  }, {
89
- key: "activateFlowTrigger",
89
+ key: "activateFlowById",
90
90
  value: function () {
91
- var _activateFlowTrigger = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(flowName, triggerName, data) {
91
+ var _activateFlowById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(flowId, initialData) {
92
92
  return _regenerator["default"].wrap(function _callee2$(_context2) {
93
93
  while (1) switch (_context2.prev = _context2.next) {
94
94
  case 0:
95
- if (!(!flowName || typeof flowName !== 'string')) {
95
+ if (!(!flowId || typeof flowId !== 'string')) {
96
96
  _context2.next = 2;
97
97
  break;
98
98
  }
99
+ throw new Error('The "flowId" argument must be provided and must be a string.');
100
+ case 2:
101
+ if (!(initialData !== undefined && !_utils["default"].isObject(initialData))) {
102
+ _context2.next = 4;
103
+ break;
104
+ }
105
+ throw new Error('The "initialData" argument must be an object.');
106
+ case 4:
107
+ return _context2.abrupt("return", this.app.request.post({
108
+ url: "".concat(this.app.urls.automationFlow(), "/").concat(flowId, "/activate"),
109
+ data: initialData || {}
110
+ }));
111
+ case 5:
112
+ case "end":
113
+ return _context2.stop();
114
+ }
115
+ }, _callee2, this);
116
+ }));
117
+ function activateFlowById(_x3, _x4) {
118
+ return _activateFlowById.apply(this, arguments);
119
+ }
120
+ return activateFlowById;
121
+ }()
122
+ }, {
123
+ key: "activateFlowTrigger",
124
+ value: function () {
125
+ var _activateFlowTrigger = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(flowName, triggerName, data) {
126
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
127
+ while (1) switch (_context3.prev = _context3.next) {
128
+ case 0:
129
+ if (!(!flowName || typeof flowName !== 'string')) {
130
+ _context3.next = 2;
131
+ break;
132
+ }
99
133
  throw new Error('The "flowName" argument must be provided and must be a string.');
100
134
  case 2:
101
135
  if (!(!triggerName || typeof triggerName !== 'string')) {
102
- _context2.next = 4;
136
+ _context3.next = 4;
103
137
  break;
104
138
  }
105
139
  throw new Error('The "triggerName" argument must be provided and must be a string.');
106
140
  case 4:
107
141
  if (!(data !== undefined && !_utils["default"].isObject(data))) {
108
- _context2.next = 6;
142
+ _context3.next = 6;
109
143
  break;
110
144
  }
111
- throw new Error('The "data" argument must be an object with an arbitrary structure.');
145
+ throw new Error('The "data" argument must be an object.');
112
146
  case 6:
113
- return _context2.abrupt("return", this.app.request.post({
147
+ return _context3.abrupt("return", this.app.request.post({
114
148
  url: "".concat(this.app.urls.automationFlowTrigger(), "/activate-by-name"),
115
149
  query: {
116
150
  flowName: flowName,
@@ -120,15 +154,55 @@ var Automations = /*#__PURE__*/function () {
120
154
  }));
121
155
  case 7:
122
156
  case "end":
123
- return _context2.stop();
157
+ return _context3.stop();
124
158
  }
125
- }, _callee2, this);
159
+ }, _callee3, this);
126
160
  }));
127
- function activateFlowTrigger(_x3, _x4, _x5) {
161
+ function activateFlowTrigger(_x5, _x6, _x7) {
128
162
  return _activateFlowTrigger.apply(this, arguments);
129
163
  }
130
164
  return activateFlowTrigger;
131
165
  }()
166
+ }, {
167
+ key: "activateFlowTriggerById",
168
+ value: function () {
169
+ var _activateFlowTriggerById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(flowId, triggerId, data) {
170
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
171
+ while (1) switch (_context4.prev = _context4.next) {
172
+ case 0:
173
+ if (!(!flowId || typeof flowId !== 'string')) {
174
+ _context4.next = 2;
175
+ break;
176
+ }
177
+ throw new Error('The "flowId" argument must be provided and must be a string.');
178
+ case 2:
179
+ if (!(!triggerId || typeof triggerId !== 'string')) {
180
+ _context4.next = 4;
181
+ break;
182
+ }
183
+ throw new Error('The "triggerId" argument must be provided and must be a string.');
184
+ case 4:
185
+ if (!(data !== undefined && !_utils["default"].isObject(data))) {
186
+ _context4.next = 6;
187
+ break;
188
+ }
189
+ throw new Error('The "data" argument must be an object.');
190
+ case 6:
191
+ return _context4.abrupt("return", this.app.request.post({
192
+ url: "".concat(this.app.urls.automationFlow(), "/").concat(flowId, "/trigger/").concat(triggerId, "/activate"),
193
+ data: data || {}
194
+ }));
195
+ case 7:
196
+ case "end":
197
+ return _context4.stop();
198
+ }
199
+ }, _callee4, this);
200
+ }));
201
+ function activateFlowTriggerById(_x8, _x9, _x10) {
202
+ return _activateFlowTriggerById.apply(this, arguments);
203
+ }
204
+ return activateFlowTriggerById;
205
+ }()
132
206
  }]);
133
207
  return Automations;
134
208
  }();
@@ -8187,15 +8261,37 @@ var Messaging = /*#__PURE__*/function () {
8187
8261
  return publish;
8188
8262
  }()
8189
8263
  }, {
8190
- key: "pushWithTemplate",
8264
+ key: "deleteChannel",
8191
8265
  value: function () {
8192
- var _pushWithTemplate = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(templateName, templateValues) {
8193
- var data;
8266
+ var _deleteChannel = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(channelName) {
8194
8267
  return _regenerator["default"].wrap(function _callee2$(_context2) {
8195
8268
  while (1) switch (_context2.prev = _context2.next) {
8269
+ case 0:
8270
+ validateChannelName(channelName);
8271
+ return _context2.abrupt("return", this.app.request["delete"]({
8272
+ url: this.app.urls.messagingChannelName(channelName)
8273
+ }));
8274
+ case 2:
8275
+ case "end":
8276
+ return _context2.stop();
8277
+ }
8278
+ }, _callee2, this);
8279
+ }));
8280
+ function deleteChannel(_x5) {
8281
+ return _deleteChannel.apply(this, arguments);
8282
+ }
8283
+ return deleteChannel;
8284
+ }()
8285
+ }, {
8286
+ key: "pushWithTemplate",
8287
+ value: function () {
8288
+ var _pushWithTemplate = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(templateName, templateValues) {
8289
+ var data;
8290
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
8291
+ while (1) switch (_context3.prev = _context3.next) {
8196
8292
  case 0:
8197
8293
  if (!(!templateName || typeof templateName !== 'string')) {
8198
- _context2.next = 2;
8294
+ _context3.next = 2;
8199
8295
  break;
8200
8296
  }
8201
8297
  throw new Error('Push Template Name must be provided and must be a string.');
@@ -8204,17 +8300,17 @@ var Messaging = /*#__PURE__*/function () {
8204
8300
  if (templateValues) {
8205
8301
  data.templateValues = templateValues;
8206
8302
  }
8207
- return _context2.abrupt("return", this.app.request.post({
8303
+ return _context3.abrupt("return", this.app.request.post({
8208
8304
  url: this.app.urls.messagingPushWithTemplate(templateName),
8209
8305
  data: data
8210
8306
  }));
8211
8307
  case 5:
8212
8308
  case "end":
8213
- return _context2.stop();
8309
+ return _context3.stop();
8214
8310
  }
8215
- }, _callee2, this);
8311
+ }, _callee3, this);
8216
8312
  }));
8217
- function pushWithTemplate(_x5, _x6) {
8313
+ function pushWithTemplate(_x6, _x7) {
8218
8314
  return _pushWithTemplate.apply(this, arguments);
8219
8315
  }
8220
8316
  return pushWithTemplate;
@@ -8222,31 +8318,31 @@ var Messaging = /*#__PURE__*/function () {
8222
8318
  }, {
8223
8319
  key: "sendEmail",
8224
8320
  value: function () {
8225
- var _sendEmail = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(subject, bodyParts, recipients, attachments) {
8321
+ var _sendEmail = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(subject, bodyParts, recipients, attachments) {
8226
8322
  var data;
8227
- return _regenerator["default"].wrap(function _callee3$(_context3) {
8228
- while (1) switch (_context3.prev = _context3.next) {
8323
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
8324
+ while (1) switch (_context4.prev = _context4.next) {
8229
8325
  case 0:
8230
8326
  if (!(!subject || typeof subject !== 'string')) {
8231
- _context3.next = 2;
8327
+ _context4.next = 2;
8232
8328
  break;
8233
8329
  }
8234
8330
  throw new Error('Email Subject must be provided and must be a string.');
8235
8331
  case 2:
8236
8332
  if (!(!bodyParts || Array.isArray(bodyParts) || (0, _typeof2["default"])(bodyParts) !== 'object')) {
8237
- _context3.next = 4;
8333
+ _context4.next = 4;
8238
8334
  break;
8239
8335
  }
8240
8336
  throw new Error('BodyParts must be an object');
8241
8337
  case 4:
8242
8338
  if (!(!bodyParts.textmessage && !bodyParts.htmlmessage)) {
8243
- _context3.next = 6;
8339
+ _context4.next = 6;
8244
8340
  break;
8245
8341
  }
8246
8342
  throw new Error('BodyParts must contain at least one property of [ textmessage | htmlmessage ]');
8247
8343
  case 6:
8248
8344
  if (!(!Array.isArray(recipients) || !recipients.length)) {
8249
- _context3.next = 8;
8345
+ _context4.next = 8;
8250
8346
  break;
8251
8347
  }
8252
8348
  throw new Error('Recipients must be a non empty array.');
@@ -8259,17 +8355,17 @@ var Messaging = /*#__PURE__*/function () {
8259
8355
  if (Array.isArray(attachments) && attachments.length) {
8260
8356
  data.attachment = attachments;
8261
8357
  }
8262
- return _context3.abrupt("return", this.app.request.post({
8358
+ return _context4.abrupt("return", this.app.request.post({
8263
8359
  url: this.app.urls.messagingEmail(),
8264
8360
  data: data
8265
8361
  }));
8266
8362
  case 11:
8267
8363
  case "end":
8268
- return _context3.stop();
8364
+ return _context4.stop();
8269
8365
  }
8270
- }, _callee3, this);
8366
+ }, _callee4, this);
8271
8367
  }));
8272
- function sendEmail(_x7, _x8, _x9, _x10) {
8368
+ function sendEmail(_x8, _x9, _x10, _x11) {
8273
8369
  return _sendEmail.apply(this, arguments);
8274
8370
  }
8275
8371
  return sendEmail;
@@ -8277,19 +8373,19 @@ var Messaging = /*#__PURE__*/function () {
8277
8373
  }, {
8278
8374
  key: "sendEmailFromTemplate",
8279
8375
  value: function () {
8280
- var _sendEmailFromTemplate = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(templateName, envelopeObject, templateValues, attachments) {
8376
+ var _sendEmailFromTemplate = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(templateName, envelopeObject, templateValues, attachments) {
8281
8377
  var data;
8282
- return _regenerator["default"].wrap(function _callee4$(_context4) {
8283
- while (1) switch (_context4.prev = _context4.next) {
8378
+ return _regenerator["default"].wrap(function _callee5$(_context5) {
8379
+ while (1) switch (_context5.prev = _context5.next) {
8284
8380
  case 0:
8285
8381
  if (!(!templateName || typeof templateName !== 'string')) {
8286
- _context4.next = 2;
8382
+ _context5.next = 2;
8287
8383
  break;
8288
8384
  }
8289
8385
  throw new Error('Email Template Name must be provided and must be a string.');
8290
8386
  case 2:
8291
8387
  if (envelopeObject instanceof _helpers.EmailEnvelope) {
8292
- _context4.next = 4;
8388
+ _context5.next = 4;
8293
8389
  break;
8294
8390
  }
8295
8391
  throw new Error('EmailEnvelope is required and should be instance of Backendless.Messaging.EmailEnvelope');
@@ -8305,17 +8401,17 @@ var Messaging = /*#__PURE__*/function () {
8305
8401
  if (attachments) {
8306
8402
  data.attachment = attachments;
8307
8403
  }
8308
- return _context4.abrupt("return", this.app.request.post({
8404
+ return _context5.abrupt("return", this.app.request.post({
8309
8405
  url: this.app.urls.emailTemplateSend(),
8310
8406
  data: data
8311
8407
  }));
8312
8408
  case 10:
8313
8409
  case "end":
8314
- return _context4.stop();
8410
+ return _context5.stop();
8315
8411
  }
8316
- }, _callee4, this);
8412
+ }, _callee5, this);
8317
8413
  }));
8318
- function sendEmailFromTemplate(_x11, _x12, _x13, _x14) {
8414
+ function sendEmailFromTemplate(_x12, _x13, _x14, _x15) {
8319
8415
  return _sendEmailFromTemplate.apply(this, arguments);
8320
8416
  }
8321
8417
  return sendEmailFromTemplate;
@@ -8323,26 +8419,26 @@ var Messaging = /*#__PURE__*/function () {
8323
8419
  }, {
8324
8420
  key: "cancel",
8325
8421
  value: function () {
8326
- var _cancel = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(messageId) {
8327
- return _regenerator["default"].wrap(function _callee5$(_context5) {
8328
- while (1) switch (_context5.prev = _context5.next) {
8422
+ var _cancel = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(messageId) {
8423
+ return _regenerator["default"].wrap(function _callee6$(_context6) {
8424
+ while (1) switch (_context6.prev = _context6.next) {
8329
8425
  case 0:
8330
8426
  if (!(!messageId || typeof messageId !== 'string')) {
8331
- _context5.next = 2;
8427
+ _context6.next = 2;
8332
8428
  break;
8333
8429
  }
8334
8430
  throw new Error('Message ID must be provided and must be a string.');
8335
8431
  case 2:
8336
- return _context5.abrupt("return", this.app.request["delete"]({
8432
+ return _context6.abrupt("return", this.app.request["delete"]({
8337
8433
  url: this.app.urls.messagingMessage(messageId)
8338
8434
  }));
8339
8435
  case 3:
8340
8436
  case "end":
8341
- return _context5.stop();
8437
+ return _context6.stop();
8342
8438
  }
8343
- }, _callee5, this);
8439
+ }, _callee6, this);
8344
8440
  }));
8345
- function cancel(_x15) {
8441
+ function cancel(_x16) {
8346
8442
  return _cancel.apply(this, arguments);
8347
8443
  }
8348
8444
  return cancel;
@@ -8350,10 +8446,10 @@ var Messaging = /*#__PURE__*/function () {
8350
8446
  }, {
8351
8447
  key: "registerDevice",
8352
8448
  value: function () {
8353
- var _registerDevice = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(deviceToken, channels, expiration) {
8449
+ var _registerDevice = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(deviceToken, channels, expiration) {
8354
8450
  var device, data;
8355
- return _regenerator["default"].wrap(function _callee6$(_context6) {
8356
- while (1) switch (_context6.prev = _context6.next) {
8451
+ return _regenerator["default"].wrap(function _callee7$(_context7) {
8452
+ while (1) switch (_context7.prev = _context7.next) {
8357
8453
  case 0:
8358
8454
  device = this.app.device;
8359
8455
  data = {
@@ -8370,17 +8466,17 @@ var Messaging = /*#__PURE__*/function () {
8370
8466
  } else if (expiration instanceof Date) {
8371
8467
  data.expiration = expiration.getTime() / 1000;
8372
8468
  }
8373
- return _context6.abrupt("return", this.app.request.post({
8469
+ return _context7.abrupt("return", this.app.request.post({
8374
8470
  url: this.app.urls.messagingRegistrations(),
8375
8471
  data: data
8376
8472
  }));
8377
8473
  case 5:
8378
8474
  case "end":
8379
- return _context6.stop();
8475
+ return _context7.stop();
8380
8476
  }
8381
- }, _callee6, this);
8477
+ }, _callee7, this);
8382
8478
  }));
8383
- function registerDevice(_x16, _x17, _x18) {
8479
+ function registerDevice(_x17, _x18, _x19) {
8384
8480
  return _registerDevice.apply(this, arguments);
8385
8481
  }
8386
8482
  return registerDevice;
@@ -8388,20 +8484,20 @@ var Messaging = /*#__PURE__*/function () {
8388
8484
  }, {
8389
8485
  key: "getRegistrations",
8390
8486
  value: function () {
8391
- var _getRegistrations = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
8487
+ var _getRegistrations = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
8392
8488
  var device;
8393
- return _regenerator["default"].wrap(function _callee7$(_context7) {
8394
- while (1) switch (_context7.prev = _context7.next) {
8489
+ return _regenerator["default"].wrap(function _callee8$(_context8) {
8490
+ while (1) switch (_context8.prev = _context8.next) {
8395
8491
  case 0:
8396
8492
  device = this.app.device;
8397
- return _context7.abrupt("return", this.app.request.get({
8493
+ return _context8.abrupt("return", this.app.request.get({
8398
8494
  url: this.app.urls.messagingRegistrationDevice(device.uuid)
8399
8495
  }));
8400
8496
  case 2:
8401
8497
  case "end":
8402
- return _context7.stop();
8498
+ return _context8.stop();
8403
8499
  }
8404
- }, _callee7, this);
8500
+ }, _callee8, this);
8405
8501
  }));
8406
8502
  function getRegistrations() {
8407
8503
  return _getRegistrations.apply(this, arguments);
@@ -8411,20 +8507,20 @@ var Messaging = /*#__PURE__*/function () {
8411
8507
  }, {
8412
8508
  key: "unregisterDevice",
8413
8509
  value: function () {
8414
- var _unregisterDevice = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
8510
+ var _unregisterDevice = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
8415
8511
  var device;
8416
- return _regenerator["default"].wrap(function _callee8$(_context8) {
8417
- while (1) switch (_context8.prev = _context8.next) {
8512
+ return _regenerator["default"].wrap(function _callee9$(_context9) {
8513
+ while (1) switch (_context9.prev = _context9.next) {
8418
8514
  case 0:
8419
8515
  device = this.app.device;
8420
- return _context8.abrupt("return", this.app.request["delete"]({
8516
+ return _context9.abrupt("return", this.app.request["delete"]({
8421
8517
  url: this.app.urls.messagingRegistrationDevice(device.uuid)
8422
8518
  }));
8423
8519
  case 2:
8424
8520
  case "end":
8425
- return _context8.stop();
8521
+ return _context9.stop();
8426
8522
  }
8427
- }, _callee8, this);
8523
+ }, _callee9, this);
8428
8524
  }));
8429
8525
  function unregisterDevice() {
8430
8526
  return _unregisterDevice.apply(this, arguments);
@@ -8434,26 +8530,26 @@ var Messaging = /*#__PURE__*/function () {
8434
8530
  }, {
8435
8531
  key: "getMessageStatus",
8436
8532
  value: function () {
8437
- var _getMessageStatus = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9(messageId) {
8438
- return _regenerator["default"].wrap(function _callee9$(_context9) {
8439
- while (1) switch (_context9.prev = _context9.next) {
8533
+ var _getMessageStatus = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(messageId) {
8534
+ return _regenerator["default"].wrap(function _callee10$(_context10) {
8535
+ while (1) switch (_context10.prev = _context10.next) {
8440
8536
  case 0:
8441
8537
  if (!(!messageId || typeof messageId !== 'string')) {
8442
- _context9.next = 2;
8538
+ _context10.next = 2;
8443
8539
  break;
8444
8540
  }
8445
8541
  throw new Error('Message ID must be provided and must be a string.');
8446
8542
  case 2:
8447
- return _context9.abrupt("return", this.app.request.get({
8543
+ return _context10.abrupt("return", this.app.request.get({
8448
8544
  url: this.app.urls.messagingMessage(messageId)
8449
8545
  }));
8450
8546
  case 3:
8451
8547
  case "end":
8452
- return _context9.stop();
8548
+ return _context10.stop();
8453
8549
  }
8454
- }, _callee9, this);
8550
+ }, _callee10, this);
8455
8551
  }));
8456
- function getMessageStatus(_x19) {
8552
+ function getMessageStatus(_x20) {
8457
8553
  return _getMessageStatus.apply(this, arguments);
8458
8554
  }
8459
8555
  return getMessageStatus;
@@ -8461,26 +8557,26 @@ var Messaging = /*#__PURE__*/function () {
8461
8557
  }, {
8462
8558
  key: "getPushTemplates",
8463
8559
  value: function () {
8464
- var _getPushTemplates = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(deviceType) {
8465
- return _regenerator["default"].wrap(function _callee10$(_context10) {
8466
- while (1) switch (_context10.prev = _context10.next) {
8560
+ var _getPushTemplates = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(deviceType) {
8561
+ return _regenerator["default"].wrap(function _callee11$(_context11) {
8562
+ while (1) switch (_context11.prev = _context11.next) {
8467
8563
  case 0:
8468
8564
  if (!(!deviceType || typeof deviceType !== 'string')) {
8469
- _context10.next = 2;
8565
+ _context11.next = 2;
8470
8566
  break;
8471
8567
  }
8472
8568
  throw new Error('Device Type must be provided and must be a string.');
8473
8569
  case 2:
8474
- return _context10.abrupt("return", this.app.request.get({
8570
+ return _context11.abrupt("return", this.app.request.get({
8475
8571
  url: this.app.urls.messagingPushTemplates(deviceType)
8476
8572
  }));
8477
8573
  case 3:
8478
8574
  case "end":
8479
- return _context10.stop();
8575
+ return _context11.stop();
8480
8576
  }
8481
- }, _callee10, this);
8577
+ }, _callee11, this);
8482
8578
  }));
8483
- function getPushTemplates(_x20) {
8579
+ function getPushTemplates(_x21) {
8484
8580
  return _getPushTemplates.apply(this, arguments);
8485
8581
  }
8486
8582
  return getPushTemplates;
@@ -10456,6 +10552,16 @@ var Urls = /*#__PURE__*/function () {
10456
10552
  value: function messagingChannel(channel) {
10457
10553
  return "".concat(this.messaging(), "/").concat(channel);
10458
10554
  }
10555
+ }, {
10556
+ key: "messagingChannels",
10557
+ value: function messagingChannels() {
10558
+ return "".concat(this.messaging(), "/channels");
10559
+ }
10560
+ }, {
10561
+ key: "messagingChannelName",
10562
+ value: function messagingChannelName(channelName) {
10563
+ return "".concat(this.messagingChannels(), "/").concat(channelName);
10564
+ }
10459
10565
  }, {
10460
10566
  key: "messagingMessage",
10461
10567
  value: function messagingMessage(messageId) {