stream-chat 8.5.0 → 8.7.0

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.
@@ -3225,6 +3225,7 @@ var Channel = /*#__PURE__*/function () {
3225
3225
 
3226
3226
  _this$_initializeStat = this._initializeState(state, messageSetToAddToIfDoesNotExist), messageSet = _this$_initializeStat.messageSet;
3227
3227
  this.data = state.channel;
3228
+ this.offlineMode = false;
3228
3229
  this.getClient().dispatchEvent({
3229
3230
  type: 'channels.queried',
3230
3231
  queriedChannels: {
@@ -3234,7 +3235,7 @@ var Channel = /*#__PURE__*/function () {
3234
3235
  });
3235
3236
  return _context32.abrupt("return", state);
3236
3237
 
3237
- case 14:
3238
+ case 15:
3238
3239
  case "end":
3239
3240
  return _context32.stop();
3240
3241
  }
@@ -3938,6 +3939,7 @@ var Channel = /*#__PURE__*/function () {
3938
3939
  var read = _step3.value;
3939
3940
  this.state.read[read.user.id] = {
3940
3941
  last_read: new Date(read.last_read),
3942
+ last_read_message_id: read.last_read_message_id,
3941
3943
  unread_messages: (_read$unread_messages = read.unread_messages) !== null && _read$unread_messages !== void 0 ? _read$unread_messages : 0,
3942
3944
  user: read.user
3943
3945
  };
@@ -5223,16 +5225,21 @@ function DevToken(userId) {
5223
5225
  }
5224
5226
  /**
5225
5227
  *
5226
- * @param {string} body the signed message
5228
+ * @param {string | Buffer} body the signed message
5227
5229
  * @param {string} secret the shared secret used to generate the signature (Stream API secret)
5228
5230
  * @param {string} signature the signature to validate
5229
5231
  * @return {boolean}
5230
5232
  */
5231
5233
 
5232
5234
  function CheckSignature(body, secret, signature) {
5233
- var key = Buffer.from(secret, 'ascii');
5235
+ var key = Buffer.from(secret, 'utf8');
5234
5236
  var hash = crypto$1.createHmac('sha256', key).update(body).digest('hex');
5235
- return hash === signature;
5237
+
5238
+ try {
5239
+ return crypto$1.timingSafeEqual(Buffer.from(hash), Buffer.from(signature));
5240
+ } catch (_unused) {
5241
+ return false;
5242
+ }
5236
5243
  }
5237
5244
 
5238
5245
  /**
@@ -8119,18 +8126,6 @@ var StreamChat = /*#__PURE__*/function () {
8119
8126
  _iterator3.f();
8120
8127
  }
8121
8128
 
8122
- if (!offlineMode) {
8123
- // If the channels are coming from server, then clear out the
8124
- // previously help offline channels.
8125
- for (var _key5 in this.activeChannels) {
8126
- var _channel7 = this.activeChannels[_key5];
8127
-
8128
- if (_channel7.offlineMode) {
8129
- delete this.activeChannels[_key5];
8130
- }
8131
- }
8132
- }
8133
-
8134
8129
  return channels;
8135
8130
  }
8136
8131
  /**
@@ -8322,6 +8317,36 @@ var StreamChat = /*#__PURE__*/function () {
8322
8317
 
8323
8318
  return getDevices;
8324
8319
  }()
8320
+ }, {
8321
+ key: "getUnreadCount",
8322
+ value: function () {
8323
+ var _getUnreadCount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(userID) {
8324
+ return _regeneratorRuntime.wrap(function _callee23$(_context23) {
8325
+ while (1) {
8326
+ switch (_context23.prev = _context23.next) {
8327
+ case 0:
8328
+ _context23.next = 2;
8329
+ return this.get(this.baseURL + '/unread', userID ? {
8330
+ user_id: userID
8331
+ } : {});
8332
+
8333
+ case 2:
8334
+ return _context23.abrupt("return", _context23.sent);
8335
+
8336
+ case 3:
8337
+ case "end":
8338
+ return _context23.stop();
8339
+ }
8340
+ }
8341
+ }, _callee23, this);
8342
+ }));
8343
+
8344
+ function getUnreadCount(_x25) {
8345
+ return _getUnreadCount.apply(this, arguments);
8346
+ }
8347
+
8348
+ return getUnreadCount;
8349
+ }()
8325
8350
  /**
8326
8351
  * removeDevice - Removes the device with the given id. Clientside users can only delete their own devices
8327
8352
  *
@@ -8333,12 +8358,12 @@ var StreamChat = /*#__PURE__*/function () {
8333
8358
  }, {
8334
8359
  key: "removeDevice",
8335
8360
  value: function () {
8336
- var _removeDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(id, userID) {
8337
- return _regeneratorRuntime.wrap(function _callee23$(_context23) {
8361
+ var _removeDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(id, userID) {
8362
+ return _regeneratorRuntime.wrap(function _callee24$(_context24) {
8338
8363
  while (1) {
8339
- switch (_context23.prev = _context23.next) {
8364
+ switch (_context24.prev = _context24.next) {
8340
8365
  case 0:
8341
- _context23.next = 2;
8366
+ _context24.next = 2;
8342
8367
  return this.delete(this.baseURL + '/devices', _objectSpread({
8343
8368
  id: id
8344
8369
  }, userID ? {
@@ -8346,17 +8371,17 @@ var StreamChat = /*#__PURE__*/function () {
8346
8371
  } : {}));
8347
8372
 
8348
8373
  case 2:
8349
- return _context23.abrupt("return", _context23.sent);
8374
+ return _context24.abrupt("return", _context24.sent);
8350
8375
 
8351
8376
  case 3:
8352
8377
  case "end":
8353
- return _context23.stop();
8378
+ return _context24.stop();
8354
8379
  }
8355
8380
  }
8356
- }, _callee23, this);
8381
+ }, _callee24, this);
8357
8382
  }));
8358
8383
 
8359
- function removeDevice(_x25, _x26) {
8384
+ function removeDevice(_x26, _x27) {
8360
8385
  return _removeDevice.apply(this, arguments);
8361
8386
  }
8362
8387
 
@@ -8373,15 +8398,15 @@ var StreamChat = /*#__PURE__*/function () {
8373
8398
  }, {
8374
8399
  key: "getRateLimits",
8375
8400
  value: function () {
8376
- var _getRateLimits = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(params) {
8401
+ var _getRateLimits = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(params) {
8377
8402
  var _ref7, serverSide, web, android, ios, endpoints;
8378
8403
 
8379
- return _regeneratorRuntime.wrap(function _callee24$(_context24) {
8404
+ return _regeneratorRuntime.wrap(function _callee25$(_context25) {
8380
8405
  while (1) {
8381
- switch (_context24.prev = _context24.next) {
8406
+ switch (_context25.prev = _context25.next) {
8382
8407
  case 0:
8383
8408
  _ref7 = params || {}, serverSide = _ref7.serverSide, web = _ref7.web, android = _ref7.android, ios = _ref7.ios, endpoints = _ref7.endpoints;
8384
- return _context24.abrupt("return", this.get(this.baseURL + '/rate_limits', {
8409
+ return _context25.abrupt("return", this.get(this.baseURL + '/rate_limits', {
8385
8410
  server_side: serverSide,
8386
8411
  web: web,
8387
8412
  android: android,
@@ -8391,13 +8416,13 @@ var StreamChat = /*#__PURE__*/function () {
8391
8416
 
8392
8417
  case 2:
8393
8418
  case "end":
8394
- return _context24.stop();
8419
+ return _context25.stop();
8395
8420
  }
8396
8421
  }
8397
- }, _callee24, this);
8422
+ }, _callee25, this);
8398
8423
  }));
8399
8424
 
8400
- function getRateLimits(_x27) {
8425
+ function getRateLimits(_x28) {
8401
8426
  return _getRateLimits.apply(this, arguments);
8402
8427
  }
8403
8428
 
@@ -8481,26 +8506,26 @@ var StreamChat = /*#__PURE__*/function () {
8481
8506
  * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>} list of updated users
8482
8507
  */
8483
8508
  function () {
8484
- var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(partialUserObject) {
8485
- return _regeneratorRuntime.wrap(function _callee25$(_context25) {
8509
+ var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(partialUserObject) {
8510
+ return _regeneratorRuntime.wrap(function _callee26$(_context26) {
8486
8511
  while (1) {
8487
- switch (_context25.prev = _context25.next) {
8512
+ switch (_context26.prev = _context26.next) {
8488
8513
  case 0:
8489
- _context25.next = 2;
8514
+ _context26.next = 2;
8490
8515
  return this.partialUpdateUsers([partialUserObject]);
8491
8516
 
8492
8517
  case 2:
8493
- return _context25.abrupt("return", _context25.sent);
8518
+ return _context26.abrupt("return", _context26.sent);
8494
8519
 
8495
8520
  case 3:
8496
8521
  case "end":
8497
- return _context25.stop();
8522
+ return _context26.stop();
8498
8523
  }
8499
8524
  }
8500
- }, _callee25, this);
8525
+ }, _callee26, this);
8501
8526
  }));
8502
8527
 
8503
- function partialUpdateUser(_x28) {
8528
+ function partialUpdateUser(_x29) {
8504
8529
  return _partialUpdateUser.apply(this, arguments);
8505
8530
  }
8506
8531
 
@@ -8517,29 +8542,29 @@ var StreamChat = /*#__PURE__*/function () {
8517
8542
  }, {
8518
8543
  key: "upsertUsers",
8519
8544
  value: function () {
8520
- var _upsertUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(users) {
8545
+ var _upsertUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(users) {
8521
8546
  var userMap, _iterator4, _step4, userObject;
8522
8547
 
8523
- return _regeneratorRuntime.wrap(function _callee26$(_context26) {
8548
+ return _regeneratorRuntime.wrap(function _callee27$(_context27) {
8524
8549
  while (1) {
8525
- switch (_context26.prev = _context26.next) {
8550
+ switch (_context27.prev = _context27.next) {
8526
8551
  case 0:
8527
8552
  userMap = {};
8528
8553
  _iterator4 = _createForOfIteratorHelper(users);
8529
- _context26.prev = 2;
8554
+ _context27.prev = 2;
8530
8555
 
8531
8556
  _iterator4.s();
8532
8557
 
8533
8558
  case 4:
8534
8559
  if ((_step4 = _iterator4.n()).done) {
8535
- _context26.next = 11;
8560
+ _context27.next = 11;
8536
8561
  break;
8537
8562
  }
8538
8563
 
8539
8564
  userObject = _step4.value;
8540
8565
 
8541
8566
  if (userObject.id) {
8542
- _context26.next = 8;
8567
+ _context27.next = 8;
8543
8568
  break;
8544
8569
  }
8545
8570
 
@@ -8549,44 +8574,44 @@ var StreamChat = /*#__PURE__*/function () {
8549
8574
  userMap[userObject.id] = userObject;
8550
8575
 
8551
8576
  case 9:
8552
- _context26.next = 4;
8577
+ _context27.next = 4;
8553
8578
  break;
8554
8579
 
8555
8580
  case 11:
8556
- _context26.next = 16;
8581
+ _context27.next = 16;
8557
8582
  break;
8558
8583
 
8559
8584
  case 13:
8560
- _context26.prev = 13;
8561
- _context26.t0 = _context26["catch"](2);
8585
+ _context27.prev = 13;
8586
+ _context27.t0 = _context27["catch"](2);
8562
8587
 
8563
- _iterator4.e(_context26.t0);
8588
+ _iterator4.e(_context27.t0);
8564
8589
 
8565
8590
  case 16:
8566
- _context26.prev = 16;
8591
+ _context27.prev = 16;
8567
8592
 
8568
8593
  _iterator4.f();
8569
8594
 
8570
- return _context26.finish(16);
8595
+ return _context27.finish(16);
8571
8596
 
8572
8597
  case 19:
8573
- _context26.next = 21;
8598
+ _context27.next = 21;
8574
8599
  return this.post(this.baseURL + '/users', {
8575
8600
  users: userMap
8576
8601
  });
8577
8602
 
8578
8603
  case 21:
8579
- return _context26.abrupt("return", _context26.sent);
8604
+ return _context27.abrupt("return", _context27.sent);
8580
8605
 
8581
8606
  case 22:
8582
8607
  case "end":
8583
- return _context26.stop();
8608
+ return _context27.stop();
8584
8609
  }
8585
8610
  }
8586
- }, _callee26, this, [[2, 13, 16, 19]]);
8611
+ }, _callee27, this, [[2, 13, 16, 19]]);
8587
8612
  }));
8588
8613
 
8589
- function upsertUsers(_x29) {
8614
+ function upsertUsers(_x30) {
8590
8615
  return _upsertUsers.apply(this, arguments);
8591
8616
  }
8592
8617
 
@@ -8634,72 +8659,72 @@ var StreamChat = /*#__PURE__*/function () {
8634
8659
  * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
8635
8660
  */
8636
8661
  function () {
8637
- var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(users) {
8662
+ var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(users) {
8638
8663
  var _iterator5, _step5, userObject;
8639
8664
 
8640
- return _regeneratorRuntime.wrap(function _callee27$(_context27) {
8665
+ return _regeneratorRuntime.wrap(function _callee28$(_context28) {
8641
8666
  while (1) {
8642
- switch (_context27.prev = _context27.next) {
8667
+ switch (_context28.prev = _context28.next) {
8643
8668
  case 0:
8644
8669
  _iterator5 = _createForOfIteratorHelper(users);
8645
- _context27.prev = 1;
8670
+ _context28.prev = 1;
8646
8671
 
8647
8672
  _iterator5.s();
8648
8673
 
8649
8674
  case 3:
8650
8675
  if ((_step5 = _iterator5.n()).done) {
8651
- _context27.next = 9;
8676
+ _context28.next = 9;
8652
8677
  break;
8653
8678
  }
8654
8679
 
8655
8680
  userObject = _step5.value;
8656
8681
 
8657
8682
  if (userObject.id) {
8658
- _context27.next = 7;
8683
+ _context28.next = 7;
8659
8684
  break;
8660
8685
  }
8661
8686
 
8662
8687
  throw Error('User ID is required when updating a user');
8663
8688
 
8664
8689
  case 7:
8665
- _context27.next = 3;
8690
+ _context28.next = 3;
8666
8691
  break;
8667
8692
 
8668
8693
  case 9:
8669
- _context27.next = 14;
8694
+ _context28.next = 14;
8670
8695
  break;
8671
8696
 
8672
8697
  case 11:
8673
- _context27.prev = 11;
8674
- _context27.t0 = _context27["catch"](1);
8698
+ _context28.prev = 11;
8699
+ _context28.t0 = _context28["catch"](1);
8675
8700
 
8676
- _iterator5.e(_context27.t0);
8701
+ _iterator5.e(_context28.t0);
8677
8702
 
8678
8703
  case 14:
8679
- _context27.prev = 14;
8704
+ _context28.prev = 14;
8680
8705
 
8681
8706
  _iterator5.f();
8682
8707
 
8683
- return _context27.finish(14);
8708
+ return _context28.finish(14);
8684
8709
 
8685
8710
  case 17:
8686
- _context27.next = 19;
8711
+ _context28.next = 19;
8687
8712
  return this.patch(this.baseURL + '/users', {
8688
8713
  users: users
8689
8714
  });
8690
8715
 
8691
8716
  case 19:
8692
- return _context27.abrupt("return", _context27.sent);
8717
+ return _context28.abrupt("return", _context28.sent);
8693
8718
 
8694
8719
  case 20:
8695
8720
  case "end":
8696
- return _context27.stop();
8721
+ return _context28.stop();
8697
8722
  }
8698
8723
  }
8699
- }, _callee27, this, [[1, 11, 14, 17]]);
8724
+ }, _callee28, this, [[1, 11, 14, 17]]);
8700
8725
  }));
8701
8726
 
8702
- function partialUpdateUsers(_x30) {
8727
+ function partialUpdateUsers(_x31) {
8703
8728
  return _partialUpdateUsers.apply(this, arguments);
8704
8729
  }
8705
8730
 
@@ -8708,26 +8733,26 @@ var StreamChat = /*#__PURE__*/function () {
8708
8733
  }, {
8709
8734
  key: "deleteUser",
8710
8735
  value: function () {
8711
- var _deleteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(userID, params) {
8712
- return _regeneratorRuntime.wrap(function _callee28$(_context28) {
8736
+ var _deleteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(userID, params) {
8737
+ return _regeneratorRuntime.wrap(function _callee29$(_context29) {
8713
8738
  while (1) {
8714
- switch (_context28.prev = _context28.next) {
8739
+ switch (_context29.prev = _context29.next) {
8715
8740
  case 0:
8716
- _context28.next = 2;
8741
+ _context29.next = 2;
8717
8742
  return this.delete(this.baseURL + "/users/".concat(userID), params);
8718
8743
 
8719
8744
  case 2:
8720
- return _context28.abrupt("return", _context28.sent);
8745
+ return _context29.abrupt("return", _context29.sent);
8721
8746
 
8722
8747
  case 3:
8723
8748
  case "end":
8724
- return _context28.stop();
8749
+ return _context29.stop();
8725
8750
  }
8726
8751
  }
8727
- }, _callee28, this);
8752
+ }, _callee29, this);
8728
8753
  }));
8729
8754
 
8730
- function deleteUser(_x31, _x32) {
8755
+ function deleteUser(_x32, _x33) {
8731
8756
  return _deleteUser.apply(this, arguments);
8732
8757
  }
8733
8758
 
@@ -8744,28 +8769,28 @@ var StreamChat = /*#__PURE__*/function () {
8744
8769
  }, {
8745
8770
  key: "restoreUsers",
8746
8771
  value: function () {
8747
- var _restoreUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(user_ids) {
8748
- return _regeneratorRuntime.wrap(function _callee29$(_context29) {
8772
+ var _restoreUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(user_ids) {
8773
+ return _regeneratorRuntime.wrap(function _callee30$(_context30) {
8749
8774
  while (1) {
8750
- switch (_context29.prev = _context29.next) {
8775
+ switch (_context30.prev = _context30.next) {
8751
8776
  case 0:
8752
- _context29.next = 2;
8777
+ _context30.next = 2;
8753
8778
  return this.post(this.baseURL + "/users/restore", {
8754
8779
  user_ids: user_ids
8755
8780
  });
8756
8781
 
8757
8782
  case 2:
8758
- return _context29.abrupt("return", _context29.sent);
8783
+ return _context30.abrupt("return", _context30.sent);
8759
8784
 
8760
8785
  case 3:
8761
8786
  case "end":
8762
- return _context29.stop();
8787
+ return _context30.stop();
8763
8788
  }
8764
8789
  }
8765
- }, _callee29, this);
8790
+ }, _callee30, this);
8766
8791
  }));
8767
8792
 
8768
- function restoreUsers(_x33) {
8793
+ function restoreUsers(_x34) {
8769
8794
  return _restoreUsers.apply(this, arguments);
8770
8795
  }
8771
8796
 
@@ -8783,26 +8808,26 @@ var StreamChat = /*#__PURE__*/function () {
8783
8808
  }, {
8784
8809
  key: "reactivateUser",
8785
8810
  value: function () {
8786
- var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(userID, options) {
8787
- return _regeneratorRuntime.wrap(function _callee30$(_context30) {
8811
+ var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(userID, options) {
8812
+ return _regeneratorRuntime.wrap(function _callee31$(_context31) {
8788
8813
  while (1) {
8789
- switch (_context30.prev = _context30.next) {
8814
+ switch (_context31.prev = _context31.next) {
8790
8815
  case 0:
8791
- _context30.next = 2;
8816
+ _context31.next = 2;
8792
8817
  return this.post(this.baseURL + "/users/".concat(userID, "/reactivate"), _objectSpread({}, options));
8793
8818
 
8794
8819
  case 2:
8795
- return _context30.abrupt("return", _context30.sent);
8820
+ return _context31.abrupt("return", _context31.sent);
8796
8821
 
8797
8822
  case 3:
8798
8823
  case "end":
8799
- return _context30.stop();
8824
+ return _context31.stop();
8800
8825
  }
8801
8826
  }
8802
- }, _callee30, this);
8827
+ }, _callee31, this);
8803
8828
  }));
8804
8829
 
8805
- function reactivateUser(_x34, _x35) {
8830
+ function reactivateUser(_x35, _x36) {
8806
8831
  return _reactivateUser.apply(this, arguments);
8807
8832
  }
8808
8833
 
@@ -8820,28 +8845,28 @@ var StreamChat = /*#__PURE__*/function () {
8820
8845
  }, {
8821
8846
  key: "reactivateUsers",
8822
8847
  value: function () {
8823
- var _reactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(user_ids, options) {
8824
- return _regeneratorRuntime.wrap(function _callee31$(_context31) {
8848
+ var _reactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(user_ids, options) {
8849
+ return _regeneratorRuntime.wrap(function _callee32$(_context32) {
8825
8850
  while (1) {
8826
- switch (_context31.prev = _context31.next) {
8851
+ switch (_context32.prev = _context32.next) {
8827
8852
  case 0:
8828
- _context31.next = 2;
8853
+ _context32.next = 2;
8829
8854
  return this.post(this.baseURL + "/users/reactivate", _objectSpread({
8830
8855
  user_ids: user_ids
8831
8856
  }, options));
8832
8857
 
8833
8858
  case 2:
8834
- return _context31.abrupt("return", _context31.sent);
8859
+ return _context32.abrupt("return", _context32.sent);
8835
8860
 
8836
8861
  case 3:
8837
8862
  case "end":
8838
- return _context31.stop();
8863
+ return _context32.stop();
8839
8864
  }
8840
8865
  }
8841
- }, _callee31, this);
8866
+ }, _callee32, this);
8842
8867
  }));
8843
8868
 
8844
- function reactivateUsers(_x36, _x37) {
8869
+ function reactivateUsers(_x37, _x38) {
8845
8870
  return _reactivateUsers.apply(this, arguments);
8846
8871
  }
8847
8872
 
@@ -8859,26 +8884,26 @@ var StreamChat = /*#__PURE__*/function () {
8859
8884
  }, {
8860
8885
  key: "deactivateUser",
8861
8886
  value: function () {
8862
- var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(userID, options) {
8863
- return _regeneratorRuntime.wrap(function _callee32$(_context32) {
8887
+ var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(userID, options) {
8888
+ return _regeneratorRuntime.wrap(function _callee33$(_context33) {
8864
8889
  while (1) {
8865
- switch (_context32.prev = _context32.next) {
8890
+ switch (_context33.prev = _context33.next) {
8866
8891
  case 0:
8867
- _context32.next = 2;
8892
+ _context33.next = 2;
8868
8893
  return this.post(this.baseURL + "/users/".concat(userID, "/deactivate"), _objectSpread({}, options));
8869
8894
 
8870
8895
  case 2:
8871
- return _context32.abrupt("return", _context32.sent);
8896
+ return _context33.abrupt("return", _context33.sent);
8872
8897
 
8873
8898
  case 3:
8874
8899
  case "end":
8875
- return _context32.stop();
8900
+ return _context33.stop();
8876
8901
  }
8877
8902
  }
8878
- }, _callee32, this);
8903
+ }, _callee33, this);
8879
8904
  }));
8880
8905
 
8881
- function deactivateUser(_x38, _x39) {
8906
+ function deactivateUser(_x39, _x40) {
8882
8907
  return _deactivateUser.apply(this, arguments);
8883
8908
  }
8884
8909
 
@@ -8896,28 +8921,28 @@ var StreamChat = /*#__PURE__*/function () {
8896
8921
  }, {
8897
8922
  key: "deactivateUsers",
8898
8923
  value: function () {
8899
- var _deactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(user_ids, options) {
8900
- return _regeneratorRuntime.wrap(function _callee33$(_context33) {
8924
+ var _deactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(user_ids, options) {
8925
+ return _regeneratorRuntime.wrap(function _callee34$(_context34) {
8901
8926
  while (1) {
8902
- switch (_context33.prev = _context33.next) {
8927
+ switch (_context34.prev = _context34.next) {
8903
8928
  case 0:
8904
- _context33.next = 2;
8929
+ _context34.next = 2;
8905
8930
  return this.post(this.baseURL + "/users/deactivate", _objectSpread({
8906
8931
  user_ids: user_ids
8907
8932
  }, options));
8908
8933
 
8909
8934
  case 2:
8910
- return _context33.abrupt("return", _context33.sent);
8935
+ return _context34.abrupt("return", _context34.sent);
8911
8936
 
8912
8937
  case 3:
8913
8938
  case "end":
8914
- return _context33.stop();
8939
+ return _context34.stop();
8915
8940
  }
8916
8941
  }
8917
- }, _callee33, this);
8942
+ }, _callee34, this);
8918
8943
  }));
8919
8944
 
8920
- function deactivateUsers(_x40, _x41) {
8945
+ function deactivateUsers(_x41, _x42) {
8921
8946
  return _deactivateUsers.apply(this, arguments);
8922
8947
  }
8923
8948
 
@@ -8926,26 +8951,26 @@ var StreamChat = /*#__PURE__*/function () {
8926
8951
  }, {
8927
8952
  key: "exportUser",
8928
8953
  value: function () {
8929
- var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(userID, options) {
8930
- return _regeneratorRuntime.wrap(function _callee34$(_context34) {
8954
+ var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(userID, options) {
8955
+ return _regeneratorRuntime.wrap(function _callee35$(_context35) {
8931
8956
  while (1) {
8932
- switch (_context34.prev = _context34.next) {
8957
+ switch (_context35.prev = _context35.next) {
8933
8958
  case 0:
8934
- _context34.next = 2;
8959
+ _context35.next = 2;
8935
8960
  return this.get(this.baseURL + "/users/".concat(userID, "/export"), _objectSpread({}, options));
8936
8961
 
8937
8962
  case 2:
8938
- return _context34.abrupt("return", _context34.sent);
8963
+ return _context35.abrupt("return", _context35.sent);
8939
8964
 
8940
8965
  case 3:
8941
8966
  case "end":
8942
- return _context34.stop();
8967
+ return _context35.stop();
8943
8968
  }
8944
8969
  }
8945
- }, _callee34, this);
8970
+ }, _callee35, this);
8946
8971
  }));
8947
8972
 
8948
- function exportUser(_x42, _x43) {
8973
+ function exportUser(_x43, _x44) {
8949
8974
  return _exportUser.apply(this, arguments);
8950
8975
  }
8951
8976
 
@@ -8961,28 +8986,28 @@ var StreamChat = /*#__PURE__*/function () {
8961
8986
  }, {
8962
8987
  key: "banUser",
8963
8988
  value: function () {
8964
- var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(targetUserID, options) {
8965
- return _regeneratorRuntime.wrap(function _callee35$(_context35) {
8989
+ var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(targetUserID, options) {
8990
+ return _regeneratorRuntime.wrap(function _callee36$(_context36) {
8966
8991
  while (1) {
8967
- switch (_context35.prev = _context35.next) {
8992
+ switch (_context36.prev = _context36.next) {
8968
8993
  case 0:
8969
- _context35.next = 2;
8994
+ _context36.next = 2;
8970
8995
  return this.post(this.baseURL + '/moderation/ban', _objectSpread({
8971
8996
  target_user_id: targetUserID
8972
8997
  }, options));
8973
8998
 
8974
8999
  case 2:
8975
- return _context35.abrupt("return", _context35.sent);
9000
+ return _context36.abrupt("return", _context36.sent);
8976
9001
 
8977
9002
  case 3:
8978
9003
  case "end":
8979
- return _context35.stop();
9004
+ return _context36.stop();
8980
9005
  }
8981
9006
  }
8982
- }, _callee35, this);
9007
+ }, _callee36, this);
8983
9008
  }));
8984
9009
 
8985
- function banUser(_x44, _x45) {
9010
+ function banUser(_x45, _x46) {
8986
9011
  return _banUser.apply(this, arguments);
8987
9012
  }
8988
9013
 
@@ -8998,28 +9023,28 @@ var StreamChat = /*#__PURE__*/function () {
8998
9023
  }, {
8999
9024
  key: "unbanUser",
9000
9025
  value: function () {
9001
- var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(targetUserID, options) {
9002
- return _regeneratorRuntime.wrap(function _callee36$(_context36) {
9026
+ var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(targetUserID, options) {
9027
+ return _regeneratorRuntime.wrap(function _callee37$(_context37) {
9003
9028
  while (1) {
9004
- switch (_context36.prev = _context36.next) {
9029
+ switch (_context37.prev = _context37.next) {
9005
9030
  case 0:
9006
- _context36.next = 2;
9031
+ _context37.next = 2;
9007
9032
  return this.delete(this.baseURL + '/moderation/ban', _objectSpread({
9008
9033
  target_user_id: targetUserID
9009
9034
  }, options));
9010
9035
 
9011
9036
  case 2:
9012
- return _context36.abrupt("return", _context36.sent);
9037
+ return _context37.abrupt("return", _context37.sent);
9013
9038
 
9014
9039
  case 3:
9015
9040
  case "end":
9016
- return _context36.stop();
9041
+ return _context37.stop();
9017
9042
  }
9018
9043
  }
9019
- }, _callee36, this);
9044
+ }, _callee37, this);
9020
9045
  }));
9021
9046
 
9022
- function unbanUser(_x46, _x47) {
9047
+ function unbanUser(_x47, _x48) {
9023
9048
  return _unbanUser.apply(this, arguments);
9024
9049
  }
9025
9050
 
@@ -9035,28 +9060,28 @@ var StreamChat = /*#__PURE__*/function () {
9035
9060
  }, {
9036
9061
  key: "shadowBan",
9037
9062
  value: function () {
9038
- var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(targetUserID, options) {
9039
- return _regeneratorRuntime.wrap(function _callee37$(_context37) {
9063
+ var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(targetUserID, options) {
9064
+ return _regeneratorRuntime.wrap(function _callee38$(_context38) {
9040
9065
  while (1) {
9041
- switch (_context37.prev = _context37.next) {
9066
+ switch (_context38.prev = _context38.next) {
9042
9067
  case 0:
9043
- _context37.next = 2;
9068
+ _context38.next = 2;
9044
9069
  return this.banUser(targetUserID, _objectSpread({
9045
9070
  shadow: true
9046
9071
  }, options));
9047
9072
 
9048
9073
  case 2:
9049
- return _context37.abrupt("return", _context37.sent);
9074
+ return _context38.abrupt("return", _context38.sent);
9050
9075
 
9051
9076
  case 3:
9052
9077
  case "end":
9053
- return _context37.stop();
9078
+ return _context38.stop();
9054
9079
  }
9055
9080
  }
9056
- }, _callee37, this);
9081
+ }, _callee38, this);
9057
9082
  }));
9058
9083
 
9059
- function shadowBan(_x48, _x49) {
9084
+ function shadowBan(_x49, _x50) {
9060
9085
  return _shadowBan.apply(this, arguments);
9061
9086
  }
9062
9087
 
@@ -9072,28 +9097,28 @@ var StreamChat = /*#__PURE__*/function () {
9072
9097
  }, {
9073
9098
  key: "removeShadowBan",
9074
9099
  value: function () {
9075
- var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(targetUserID, options) {
9076
- return _regeneratorRuntime.wrap(function _callee38$(_context38) {
9100
+ var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(targetUserID, options) {
9101
+ return _regeneratorRuntime.wrap(function _callee39$(_context39) {
9077
9102
  while (1) {
9078
- switch (_context38.prev = _context38.next) {
9103
+ switch (_context39.prev = _context39.next) {
9079
9104
  case 0:
9080
- _context38.next = 2;
9105
+ _context39.next = 2;
9081
9106
  return this.unbanUser(targetUserID, _objectSpread({
9082
9107
  shadow: true
9083
9108
  }, options));
9084
9109
 
9085
9110
  case 2:
9086
- return _context38.abrupt("return", _context38.sent);
9111
+ return _context39.abrupt("return", _context39.sent);
9087
9112
 
9088
9113
  case 3:
9089
9114
  case "end":
9090
- return _context38.stop();
9115
+ return _context39.stop();
9091
9116
  }
9092
9117
  }
9093
- }, _callee38, this);
9118
+ }, _callee39, this);
9094
9119
  }));
9095
9120
 
9096
- function removeShadowBan(_x50, _x51) {
9121
+ function removeShadowBan(_x51, _x52) {
9097
9122
  return _removeShadowBan.apply(this, arguments);
9098
9123
  }
9099
9124
 
@@ -9110,15 +9135,15 @@ var StreamChat = /*#__PURE__*/function () {
9110
9135
  }, {
9111
9136
  key: "muteUser",
9112
9137
  value: function () {
9113
- var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(targetID, userID) {
9138
+ var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(targetID, userID) {
9114
9139
  var options,
9115
- _args39 = arguments;
9116
- return _regeneratorRuntime.wrap(function _callee39$(_context39) {
9140
+ _args40 = arguments;
9141
+ return _regeneratorRuntime.wrap(function _callee40$(_context40) {
9117
9142
  while (1) {
9118
- switch (_context39.prev = _context39.next) {
9143
+ switch (_context40.prev = _context40.next) {
9119
9144
  case 0:
9120
- options = _args39.length > 2 && _args39[2] !== undefined ? _args39[2] : {};
9121
- _context39.next = 3;
9145
+ options = _args40.length > 2 && _args40[2] !== undefined ? _args40[2] : {};
9146
+ _context40.next = 3;
9122
9147
  return this.post(this.baseURL + '/moderation/mute', _objectSpread(_objectSpread({
9123
9148
  target_id: targetID
9124
9149
  }, userID ? {
@@ -9126,17 +9151,17 @@ var StreamChat = /*#__PURE__*/function () {
9126
9151
  } : {}), options));
9127
9152
 
9128
9153
  case 3:
9129
- return _context39.abrupt("return", _context39.sent);
9154
+ return _context40.abrupt("return", _context40.sent);
9130
9155
 
9131
9156
  case 4:
9132
9157
  case "end":
9133
- return _context39.stop();
9158
+ return _context40.stop();
9134
9159
  }
9135
9160
  }
9136
- }, _callee39, this);
9161
+ }, _callee40, this);
9137
9162
  }));
9138
9163
 
9139
- function muteUser(_x52, _x53) {
9164
+ function muteUser(_x53, _x54) {
9140
9165
  return _muteUser.apply(this, arguments);
9141
9166
  }
9142
9167
 
@@ -9152,12 +9177,12 @@ var StreamChat = /*#__PURE__*/function () {
9152
9177
  }, {
9153
9178
  key: "unmuteUser",
9154
9179
  value: function () {
9155
- var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(targetID, currentUserID) {
9156
- return _regeneratorRuntime.wrap(function _callee40$(_context40) {
9180
+ var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(targetID, currentUserID) {
9181
+ return _regeneratorRuntime.wrap(function _callee41$(_context41) {
9157
9182
  while (1) {
9158
- switch (_context40.prev = _context40.next) {
9183
+ switch (_context41.prev = _context41.next) {
9159
9184
  case 0:
9160
- _context40.next = 2;
9185
+ _context41.next = 2;
9161
9186
  return this.post(this.baseURL + '/moderation/unmute', _objectSpread({
9162
9187
  target_id: targetID
9163
9188
  }, currentUserID ? {
@@ -9165,17 +9190,17 @@ var StreamChat = /*#__PURE__*/function () {
9165
9190
  } : {}));
9166
9191
 
9167
9192
  case 2:
9168
- return _context40.abrupt("return", _context40.sent);
9193
+ return _context41.abrupt("return", _context41.sent);
9169
9194
 
9170
9195
  case 3:
9171
9196
  case "end":
9172
- return _context40.stop();
9197
+ return _context41.stop();
9173
9198
  }
9174
9199
  }
9175
- }, _callee40, this);
9200
+ }, _callee41, this);
9176
9201
  }));
9177
9202
 
9178
- function unmuteUser(_x54, _x55) {
9203
+ function unmuteUser(_x55, _x56) {
9179
9204
  return _unmuteUser.apply(this, arguments);
9180
9205
  }
9181
9206
 
@@ -9210,31 +9235,31 @@ var StreamChat = /*#__PURE__*/function () {
9210
9235
  }, {
9211
9236
  key: "flagMessage",
9212
9237
  value: function () {
9213
- var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(targetMessageID) {
9238
+ var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(targetMessageID) {
9214
9239
  var options,
9215
- _args41 = arguments;
9216
- return _regeneratorRuntime.wrap(function _callee41$(_context41) {
9240
+ _args42 = arguments;
9241
+ return _regeneratorRuntime.wrap(function _callee42$(_context42) {
9217
9242
  while (1) {
9218
- switch (_context41.prev = _context41.next) {
9243
+ switch (_context42.prev = _context42.next) {
9219
9244
  case 0:
9220
- options = _args41.length > 1 && _args41[1] !== undefined ? _args41[1] : {};
9221
- _context41.next = 3;
9245
+ options = _args42.length > 1 && _args42[1] !== undefined ? _args42[1] : {};
9246
+ _context42.next = 3;
9222
9247
  return this.post(this.baseURL + '/moderation/flag', _objectSpread({
9223
9248
  target_message_id: targetMessageID
9224
9249
  }, options));
9225
9250
 
9226
9251
  case 3:
9227
- return _context41.abrupt("return", _context41.sent);
9252
+ return _context42.abrupt("return", _context42.sent);
9228
9253
 
9229
9254
  case 4:
9230
9255
  case "end":
9231
- return _context41.stop();
9256
+ return _context42.stop();
9232
9257
  }
9233
9258
  }
9234
- }, _callee41, this);
9259
+ }, _callee42, this);
9235
9260
  }));
9236
9261
 
9237
- function flagMessage(_x56) {
9262
+ function flagMessage(_x57) {
9238
9263
  return _flagMessage.apply(this, arguments);
9239
9264
  }
9240
9265
 
@@ -9250,31 +9275,31 @@ var StreamChat = /*#__PURE__*/function () {
9250
9275
  }, {
9251
9276
  key: "flagUser",
9252
9277
  value: function () {
9253
- var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(targetID) {
9278
+ var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(targetID) {
9254
9279
  var options,
9255
- _args42 = arguments;
9256
- return _regeneratorRuntime.wrap(function _callee42$(_context42) {
9280
+ _args43 = arguments;
9281
+ return _regeneratorRuntime.wrap(function _callee43$(_context43) {
9257
9282
  while (1) {
9258
- switch (_context42.prev = _context42.next) {
9283
+ switch (_context43.prev = _context43.next) {
9259
9284
  case 0:
9260
- options = _args42.length > 1 && _args42[1] !== undefined ? _args42[1] : {};
9261
- _context42.next = 3;
9285
+ options = _args43.length > 1 && _args43[1] !== undefined ? _args43[1] : {};
9286
+ _context43.next = 3;
9262
9287
  return this.post(this.baseURL + '/moderation/flag', _objectSpread({
9263
9288
  target_user_id: targetID
9264
9289
  }, options));
9265
9290
 
9266
9291
  case 3:
9267
- return _context42.abrupt("return", _context42.sent);
9292
+ return _context43.abrupt("return", _context43.sent);
9268
9293
 
9269
9294
  case 4:
9270
9295
  case "end":
9271
- return _context42.stop();
9296
+ return _context43.stop();
9272
9297
  }
9273
9298
  }
9274
- }, _callee42, this);
9299
+ }, _callee43, this);
9275
9300
  }));
9276
9301
 
9277
- function flagUser(_x57) {
9302
+ function flagUser(_x58) {
9278
9303
  return _flagUser.apply(this, arguments);
9279
9304
  }
9280
9305
 
@@ -9290,31 +9315,31 @@ var StreamChat = /*#__PURE__*/function () {
9290
9315
  }, {
9291
9316
  key: "unflagMessage",
9292
9317
  value: function () {
9293
- var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(targetMessageID) {
9318
+ var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(targetMessageID) {
9294
9319
  var options,
9295
- _args43 = arguments;
9296
- return _regeneratorRuntime.wrap(function _callee43$(_context43) {
9320
+ _args44 = arguments;
9321
+ return _regeneratorRuntime.wrap(function _callee44$(_context44) {
9297
9322
  while (1) {
9298
- switch (_context43.prev = _context43.next) {
9323
+ switch (_context44.prev = _context44.next) {
9299
9324
  case 0:
9300
- options = _args43.length > 1 && _args43[1] !== undefined ? _args43[1] : {};
9301
- _context43.next = 3;
9325
+ options = _args44.length > 1 && _args44[1] !== undefined ? _args44[1] : {};
9326
+ _context44.next = 3;
9302
9327
  return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
9303
9328
  target_message_id: targetMessageID
9304
9329
  }, options));
9305
9330
 
9306
9331
  case 3:
9307
- return _context43.abrupt("return", _context43.sent);
9332
+ return _context44.abrupt("return", _context44.sent);
9308
9333
 
9309
9334
  case 4:
9310
9335
  case "end":
9311
- return _context43.stop();
9336
+ return _context44.stop();
9312
9337
  }
9313
9338
  }
9314
- }, _callee43, this);
9339
+ }, _callee44, this);
9315
9340
  }));
9316
9341
 
9317
- function unflagMessage(_x58) {
9342
+ function unflagMessage(_x59) {
9318
9343
  return _unflagMessage.apply(this, arguments);
9319
9344
  }
9320
9345
 
@@ -9330,31 +9355,31 @@ var StreamChat = /*#__PURE__*/function () {
9330
9355
  }, {
9331
9356
  key: "unflagUser",
9332
9357
  value: function () {
9333
- var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(targetID) {
9358
+ var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(targetID) {
9334
9359
  var options,
9335
- _args44 = arguments;
9336
- return _regeneratorRuntime.wrap(function _callee44$(_context44) {
9360
+ _args45 = arguments;
9361
+ return _regeneratorRuntime.wrap(function _callee45$(_context45) {
9337
9362
  while (1) {
9338
- switch (_context44.prev = _context44.next) {
9363
+ switch (_context45.prev = _context45.next) {
9339
9364
  case 0:
9340
- options = _args44.length > 1 && _args44[1] !== undefined ? _args44[1] : {};
9341
- _context44.next = 3;
9365
+ options = _args45.length > 1 && _args45[1] !== undefined ? _args45[1] : {};
9366
+ _context45.next = 3;
9342
9367
  return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
9343
9368
  target_user_id: targetID
9344
9369
  }, options));
9345
9370
 
9346
9371
  case 3:
9347
- return _context44.abrupt("return", _context44.sent);
9372
+ return _context45.abrupt("return", _context45.sent);
9348
9373
 
9349
9374
  case 4:
9350
9375
  case "end":
9351
- return _context44.stop();
9376
+ return _context45.stop();
9352
9377
  }
9353
9378
  }
9354
- }, _callee44, this);
9379
+ }, _callee45, this);
9355
9380
  }));
9356
9381
 
9357
- function unflagUser(_x59) {
9382
+ function unflagUser(_x60) {
9358
9383
  return _unflagUser.apply(this, arguments);
9359
9384
  }
9360
9385
 
@@ -9371,29 +9396,29 @@ var StreamChat = /*#__PURE__*/function () {
9371
9396
  }, {
9372
9397
  key: "getCallToken",
9373
9398
  value: function () {
9374
- var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(callID) {
9399
+ var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(callID) {
9375
9400
  var options,
9376
- _args45 = arguments;
9377
- return _regeneratorRuntime.wrap(function _callee45$(_context45) {
9401
+ _args46 = arguments;
9402
+ return _regeneratorRuntime.wrap(function _callee46$(_context46) {
9378
9403
  while (1) {
9379
- switch (_context45.prev = _context45.next) {
9404
+ switch (_context46.prev = _context46.next) {
9380
9405
  case 0:
9381
- options = _args45.length > 1 && _args45[1] !== undefined ? _args45[1] : {};
9382
- _context45.next = 3;
9406
+ options = _args46.length > 1 && _args46[1] !== undefined ? _args46[1] : {};
9407
+ _context46.next = 3;
9383
9408
  return this.post(this.baseURL + "/calls/".concat(callID), _objectSpread({}, options));
9384
9409
 
9385
9410
  case 3:
9386
- return _context45.abrupt("return", _context45.sent);
9411
+ return _context46.abrupt("return", _context46.sent);
9387
9412
 
9388
9413
  case 4:
9389
9414
  case "end":
9390
- return _context45.stop();
9415
+ return _context46.stop();
9391
9416
  }
9392
9417
  }
9393
- }, _callee45, this);
9418
+ }, _callee46, this);
9394
9419
  }));
9395
9420
 
9396
- function getCallToken(_x60) {
9421
+ function getCallToken(_x61) {
9397
9422
  return _getCallToken.apply(this, arguments);
9398
9423
  }
9399
9424
 
@@ -9416,30 +9441,30 @@ var StreamChat = /*#__PURE__*/function () {
9416
9441
  }, {
9417
9442
  key: "_queryFlags",
9418
9443
  value: function () {
9419
- var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46() {
9444
+ var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47() {
9420
9445
  var filterConditions,
9421
9446
  options,
9422
- _args46 = arguments;
9423
- return _regeneratorRuntime.wrap(function _callee46$(_context46) {
9447
+ _args47 = arguments;
9448
+ return _regeneratorRuntime.wrap(function _callee47$(_context47) {
9424
9449
  while (1) {
9425
- switch (_context46.prev = _context46.next) {
9450
+ switch (_context47.prev = _context47.next) {
9426
9451
  case 0:
9427
- filterConditions = _args46.length > 0 && _args46[0] !== undefined ? _args46[0] : {};
9428
- options = _args46.length > 1 && _args46[1] !== undefined ? _args46[1] : {};
9429
- _context46.next = 4;
9452
+ filterConditions = _args47.length > 0 && _args47[0] !== undefined ? _args47[0] : {};
9453
+ options = _args47.length > 1 && _args47[1] !== undefined ? _args47[1] : {};
9454
+ _context47.next = 4;
9430
9455
  return this.post(this.baseURL + '/moderation/flags', _objectSpread({
9431
9456
  filter_conditions: filterConditions
9432
9457
  }, options));
9433
9458
 
9434
9459
  case 4:
9435
- return _context46.abrupt("return", _context46.sent);
9460
+ return _context47.abrupt("return", _context47.sent);
9436
9461
 
9437
9462
  case 5:
9438
9463
  case "end":
9439
- return _context46.stop();
9464
+ return _context47.stop();
9440
9465
  }
9441
9466
  }
9442
- }, _callee46, this);
9467
+ }, _callee47, this);
9443
9468
  }));
9444
9469
 
9445
9470
  function _queryFlags() {
@@ -9465,30 +9490,30 @@ var StreamChat = /*#__PURE__*/function () {
9465
9490
  }, {
9466
9491
  key: "_queryFlagReports",
9467
9492
  value: function () {
9468
- var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47() {
9493
+ var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48() {
9469
9494
  var filterConditions,
9470
9495
  options,
9471
- _args47 = arguments;
9472
- return _regeneratorRuntime.wrap(function _callee47$(_context47) {
9496
+ _args48 = arguments;
9497
+ return _regeneratorRuntime.wrap(function _callee48$(_context48) {
9473
9498
  while (1) {
9474
- switch (_context47.prev = _context47.next) {
9499
+ switch (_context48.prev = _context48.next) {
9475
9500
  case 0:
9476
- filterConditions = _args47.length > 0 && _args47[0] !== undefined ? _args47[0] : {};
9477
- options = _args47.length > 1 && _args47[1] !== undefined ? _args47[1] : {};
9478
- _context47.next = 4;
9501
+ filterConditions = _args48.length > 0 && _args48[0] !== undefined ? _args48[0] : {};
9502
+ options = _args48.length > 1 && _args48[1] !== undefined ? _args48[1] : {};
9503
+ _context48.next = 4;
9479
9504
  return this.post(this.baseURL + '/moderation/reports', _objectSpread({
9480
9505
  filter_conditions: filterConditions
9481
9506
  }, options));
9482
9507
 
9483
9508
  case 4:
9484
- return _context47.abrupt("return", _context47.sent);
9509
+ return _context48.abrupt("return", _context48.sent);
9485
9510
 
9486
9511
  case 5:
9487
9512
  case "end":
9488
- return _context47.stop();
9513
+ return _context48.stop();
9489
9514
  }
9490
9515
  }
9491
- }, _callee47, this);
9516
+ }, _callee48, this);
9492
9517
  }));
9493
9518
 
9494
9519
  function _queryFlagReports() {
@@ -9515,31 +9540,31 @@ var StreamChat = /*#__PURE__*/function () {
9515
9540
  }, {
9516
9541
  key: "_reviewFlagReport",
9517
9542
  value: function () {
9518
- var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(id, reviewResult) {
9543
+ var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(id, reviewResult) {
9519
9544
  var options,
9520
- _args48 = arguments;
9521
- return _regeneratorRuntime.wrap(function _callee48$(_context48) {
9545
+ _args49 = arguments;
9546
+ return _regeneratorRuntime.wrap(function _callee49$(_context49) {
9522
9547
  while (1) {
9523
- switch (_context48.prev = _context48.next) {
9548
+ switch (_context49.prev = _context49.next) {
9524
9549
  case 0:
9525
- options = _args48.length > 2 && _args48[2] !== undefined ? _args48[2] : {};
9526
- _context48.next = 3;
9550
+ options = _args49.length > 2 && _args49[2] !== undefined ? _args49[2] : {};
9551
+ _context49.next = 3;
9527
9552
  return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
9528
9553
  review_result: reviewResult
9529
9554
  }, options));
9530
9555
 
9531
9556
  case 3:
9532
- return _context48.abrupt("return", _context48.sent);
9557
+ return _context49.abrupt("return", _context49.sent);
9533
9558
 
9534
9559
  case 4:
9535
9560
  case "end":
9536
- return _context48.stop();
9561
+ return _context49.stop();
9537
9562
  }
9538
9563
  }
9539
- }, _callee48, this);
9564
+ }, _callee49, this);
9540
9565
  }));
9541
9566
 
9542
- function _reviewFlagReport(_x61, _x62) {
9567
+ function _reviewFlagReport(_x62, _x63) {
9543
9568
  return _reviewFlagReport2.apply(this, arguments);
9544
9569
  }
9545
9570
 
@@ -9561,31 +9586,31 @@ var StreamChat = /*#__PURE__*/function () {
9561
9586
  }, {
9562
9587
  key: "_unblockMessage",
9563
9588
  value: function () {
9564
- var _unblockMessage2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(targetMessageID) {
9589
+ var _unblockMessage2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(targetMessageID) {
9565
9590
  var options,
9566
- _args49 = arguments;
9567
- return _regeneratorRuntime.wrap(function _callee49$(_context49) {
9591
+ _args50 = arguments;
9592
+ return _regeneratorRuntime.wrap(function _callee50$(_context50) {
9568
9593
  while (1) {
9569
- switch (_context49.prev = _context49.next) {
9594
+ switch (_context50.prev = _context50.next) {
9570
9595
  case 0:
9571
- options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
9572
- _context49.next = 3;
9596
+ options = _args50.length > 1 && _args50[1] !== undefined ? _args50[1] : {};
9597
+ _context50.next = 3;
9573
9598
  return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
9574
9599
  target_message_id: targetMessageID
9575
9600
  }, options));
9576
9601
 
9577
9602
  case 3:
9578
- return _context49.abrupt("return", _context49.sent);
9603
+ return _context50.abrupt("return", _context50.sent);
9579
9604
 
9580
9605
  case 4:
9581
9606
  case "end":
9582
- return _context49.stop();
9607
+ return _context50.stop();
9583
9608
  }
9584
9609
  }
9585
- }, _callee49, this);
9610
+ }, _callee50, this);
9586
9611
  }));
9587
9612
 
9588
- function _unblockMessage(_x63) {
9613
+ function _unblockMessage(_x64) {
9589
9614
  return _unblockMessage2.apply(this, arguments);
9590
9615
  }
9591
9616
 
@@ -9612,23 +9637,23 @@ var StreamChat = /*#__PURE__*/function () {
9612
9637
  * @return {Promise<APIResponse>}
9613
9638
  */
9614
9639
  function () {
9615
- var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50() {
9640
+ var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51() {
9616
9641
  var data,
9617
- _args50 = arguments;
9618
- return _regeneratorRuntime.wrap(function _callee50$(_context50) {
9642
+ _args51 = arguments;
9643
+ return _regeneratorRuntime.wrap(function _callee51$(_context51) {
9619
9644
  while (1) {
9620
- switch (_context50.prev = _context50.next) {
9645
+ switch (_context51.prev = _context51.next) {
9621
9646
  case 0:
9622
- data = _args50.length > 0 && _args50[0] !== undefined ? _args50[0] : {};
9623
- _context50.next = 3;
9647
+ data = _args51.length > 0 && _args51[0] !== undefined ? _args51[0] : {};
9648
+ _context51.next = 3;
9624
9649
  return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
9625
9650
 
9626
9651
  case 3:
9627
9652
  case "end":
9628
- return _context50.stop();
9653
+ return _context51.stop();
9629
9654
  }
9630
9655
  }
9631
- }, _callee50, this);
9656
+ }, _callee51, this);
9632
9657
  }));
9633
9658
 
9634
9659
  function markChannelsRead() {
@@ -9703,28 +9728,28 @@ var StreamChat = /*#__PURE__*/function () {
9703
9728
  }, {
9704
9729
  key: "translateMessage",
9705
9730
  value: function () {
9706
- var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(messageId, language) {
9707
- return _regeneratorRuntime.wrap(function _callee51$(_context51) {
9731
+ var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(messageId, language) {
9732
+ return _regeneratorRuntime.wrap(function _callee52$(_context52) {
9708
9733
  while (1) {
9709
- switch (_context51.prev = _context51.next) {
9734
+ switch (_context52.prev = _context52.next) {
9710
9735
  case 0:
9711
- _context51.next = 2;
9736
+ _context52.next = 2;
9712
9737
  return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
9713
9738
  language: language
9714
9739
  });
9715
9740
 
9716
9741
  case 2:
9717
- return _context51.abrupt("return", _context51.sent);
9742
+ return _context52.abrupt("return", _context52.sent);
9718
9743
 
9719
9744
  case 3:
9720
9745
  case "end":
9721
- return _context51.stop();
9746
+ return _context52.stop();
9722
9747
  }
9723
9748
  }
9724
- }, _callee51, this);
9749
+ }, _callee52, this);
9725
9750
  }));
9726
9751
 
9727
- function translateMessage(_x64, _x65) {
9752
+ function translateMessage(_x65, _x66) {
9728
9753
  return _translateMessage.apply(this, arguments);
9729
9754
  }
9730
9755
 
@@ -9826,14 +9851,14 @@ var StreamChat = /*#__PURE__*/function () {
9826
9851
  }, {
9827
9852
  key: "updateMessage",
9828
9853
  value: function () {
9829
- var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(message, userId, options) {
9854
+ var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(message, userId, options) {
9830
9855
  var clonedMessage, reservedMessageFields;
9831
- return _regeneratorRuntime.wrap(function _callee52$(_context52) {
9856
+ return _regeneratorRuntime.wrap(function _callee53$(_context53) {
9832
9857
  while (1) {
9833
- switch (_context52.prev = _context52.next) {
9858
+ switch (_context53.prev = _context53.next) {
9834
9859
  case 0:
9835
9860
  if (message.id) {
9836
- _context52.next = 2;
9861
+ _context53.next = 2;
9837
9862
  break;
9838
9863
  }
9839
9864
 
@@ -9870,23 +9895,23 @@ var StreamChat = /*#__PURE__*/function () {
9870
9895
  });
9871
9896
  }
9872
9897
 
9873
- _context52.next = 10;
9898
+ _context53.next = 10;
9874
9899
  return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
9875
9900
  message: clonedMessage
9876
9901
  }, options));
9877
9902
 
9878
9903
  case 10:
9879
- return _context52.abrupt("return", _context52.sent);
9904
+ return _context53.abrupt("return", _context53.sent);
9880
9905
 
9881
9906
  case 11:
9882
9907
  case "end":
9883
- return _context52.stop();
9908
+ return _context53.stop();
9884
9909
  }
9885
9910
  }
9886
- }, _callee52, this);
9911
+ }, _callee53, this);
9887
9912
  }));
9888
9913
 
9889
- function updateMessage(_x66, _x67, _x68) {
9914
+ function updateMessage(_x67, _x68, _x69) {
9890
9915
  return _updateMessage.apply(this, arguments);
9891
9916
  }
9892
9917
 
@@ -9909,14 +9934,14 @@ var StreamChat = /*#__PURE__*/function () {
9909
9934
  }, {
9910
9935
  key: "partialUpdateMessage",
9911
9936
  value: function () {
9912
- var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(id, partialMessageObject, userId, options) {
9937
+ var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(id, partialMessageObject, userId, options) {
9913
9938
  var user;
9914
- return _regeneratorRuntime.wrap(function _callee53$(_context53) {
9939
+ return _regeneratorRuntime.wrap(function _callee54$(_context54) {
9915
9940
  while (1) {
9916
- switch (_context53.prev = _context53.next) {
9941
+ switch (_context54.prev = _context54.next) {
9917
9942
  case 0:
9918
9943
  if (id) {
9919
- _context53.next = 2;
9944
+ _context54.next = 2;
9920
9945
  break;
9921
9946
  }
9922
9947
 
@@ -9931,23 +9956,23 @@ var StreamChat = /*#__PURE__*/function () {
9931
9956
  };
9932
9957
  }
9933
9958
 
9934
- _context53.next = 6;
9959
+ _context54.next = 6;
9935
9960
  return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
9936
9961
  user: user
9937
9962
  }));
9938
9963
 
9939
9964
  case 6:
9940
- return _context53.abrupt("return", _context53.sent);
9965
+ return _context54.abrupt("return", _context54.sent);
9941
9966
 
9942
9967
  case 7:
9943
9968
  case "end":
9944
- return _context53.stop();
9969
+ return _context54.stop();
9945
9970
  }
9946
9971
  }
9947
- }, _callee53, this);
9972
+ }, _callee54, this);
9948
9973
  }));
9949
9974
 
9950
- function partialUpdateMessage(_x69, _x70, _x71, _x72) {
9975
+ function partialUpdateMessage(_x70, _x71, _x72, _x73) {
9951
9976
  return _partialUpdateMessage.apply(this, arguments);
9952
9977
  }
9953
9978
 
@@ -9956,11 +9981,11 @@ var StreamChat = /*#__PURE__*/function () {
9956
9981
  }, {
9957
9982
  key: "deleteMessage",
9958
9983
  value: function () {
9959
- var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(messageID, hardDelete) {
9984
+ var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(messageID, hardDelete) {
9960
9985
  var params;
9961
- return _regeneratorRuntime.wrap(function _callee54$(_context54) {
9986
+ return _regeneratorRuntime.wrap(function _callee55$(_context55) {
9962
9987
  while (1) {
9963
- switch (_context54.prev = _context54.next) {
9988
+ switch (_context55.prev = _context55.next) {
9964
9989
  case 0:
9965
9990
  params = {};
9966
9991
 
@@ -9970,21 +9995,21 @@ var StreamChat = /*#__PURE__*/function () {
9970
9995
  };
9971
9996
  }
9972
9997
 
9973
- _context54.next = 4;
9998
+ _context55.next = 4;
9974
9999
  return this.delete(this.baseURL + "/messages/".concat(messageID), params);
9975
10000
 
9976
10001
  case 4:
9977
- return _context54.abrupt("return", _context54.sent);
10002
+ return _context55.abrupt("return", _context55.sent);
9978
10003
 
9979
10004
  case 5:
9980
10005
  case "end":
9981
- return _context54.stop();
10006
+ return _context55.stop();
9982
10007
  }
9983
10008
  }
9984
- }, _callee54, this);
10009
+ }, _callee55, this);
9985
10010
  }));
9986
10011
 
9987
- function deleteMessage(_x73, _x74) {
10012
+ function deleteMessage(_x74, _x75) {
9988
10013
  return _deleteMessage.apply(this, arguments);
9989
10014
  }
9990
10015
 
@@ -9993,26 +10018,26 @@ var StreamChat = /*#__PURE__*/function () {
9993
10018
  }, {
9994
10019
  key: "getMessage",
9995
10020
  value: function () {
9996
- var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(messageID) {
9997
- return _regeneratorRuntime.wrap(function _callee55$(_context55) {
10021
+ var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(messageID) {
10022
+ return _regeneratorRuntime.wrap(function _callee56$(_context56) {
9998
10023
  while (1) {
9999
- switch (_context55.prev = _context55.next) {
10024
+ switch (_context56.prev = _context56.next) {
10000
10025
  case 0:
10001
- _context55.next = 2;
10026
+ _context56.next = 2;
10002
10027
  return this.get(this.baseURL + "/messages/".concat(messageID));
10003
10028
 
10004
10029
  case 2:
10005
- return _context55.abrupt("return", _context55.sent);
10030
+ return _context56.abrupt("return", _context56.sent);
10006
10031
 
10007
10032
  case 3:
10008
10033
  case "end":
10009
- return _context55.stop();
10034
+ return _context56.stop();
10010
10035
  }
10011
10036
  }
10012
- }, _callee55, this);
10037
+ }, _callee56, this);
10013
10038
  }));
10014
10039
 
10015
- function getMessage(_x75) {
10040
+ function getMessage(_x76) {
10016
10041
  return _getMessage.apply(this, arguments);
10017
10042
  }
10018
10043
 
@@ -10021,7 +10046,7 @@ var StreamChat = /*#__PURE__*/function () {
10021
10046
  }, {
10022
10047
  key: "getUserAgent",
10023
10048
  value: function getUserAgent() {
10024
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.5.0");
10049
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.7.0");
10025
10050
  }
10026
10051
  }, {
10027
10052
  key: "setUserAgent",
@@ -10098,9 +10123,9 @@ var StreamChat = /*#__PURE__*/function () {
10098
10123
  this.cleaningIntervalRef = setInterval(function () {
10099
10124
  // call clean on the channel, used for calling the stop.typing event etc.
10100
10125
  for (var _i3 = 0, _Object$values2 = Object.values(that.activeChannels); _i3 < _Object$values2.length; _i3++) {
10101
- var _channel8 = _Object$values2[_i3];
10126
+ var _channel7 = _Object$values2[_i3];
10102
10127
 
10103
- _channel8.clean();
10128
+ _channel7.clean();
10104
10129
  }
10105
10130
  }, 500);
10106
10131
  }
@@ -10112,7 +10137,14 @@ var StreamChat = /*#__PURE__*/function () {
10112
10137
 
10113
10138
  }, {
10114
10139
  key: "verifyWebhook",
10115
- value: function verifyWebhook(requestBody, xSignature) {
10140
+ value:
10141
+ /**
10142
+ * checks signature of a request
10143
+ * @param {string | Buffer} rawBody
10144
+ * @param {string} signature from HTTP header
10145
+ * @returns {boolean}
10146
+ */
10147
+ function verifyWebhook(requestBody, xSignature) {
10116
10148
  return !!this.secret && CheckSignature(requestBody, this.secret, xSignature);
10117
10149
  }
10118
10150
  /** getPermission - gets the definition for a permission
@@ -10233,28 +10265,28 @@ var StreamChat = /*#__PURE__*/function () {
10233
10265
  }, {
10234
10266
  key: "sendUserCustomEvent",
10235
10267
  value: function () {
10236
- var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(targetUserID, event) {
10237
- return _regeneratorRuntime.wrap(function _callee56$(_context56) {
10268
+ var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(targetUserID, event) {
10269
+ return _regeneratorRuntime.wrap(function _callee57$(_context57) {
10238
10270
  while (1) {
10239
- switch (_context56.prev = _context56.next) {
10271
+ switch (_context57.prev = _context57.next) {
10240
10272
  case 0:
10241
- _context56.next = 2;
10273
+ _context57.next = 2;
10242
10274
  return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
10243
10275
  event: event
10244
10276
  });
10245
10277
 
10246
10278
  case 2:
10247
- return _context56.abrupt("return", _context56.sent);
10279
+ return _context57.abrupt("return", _context57.sent);
10248
10280
 
10249
10281
  case 3:
10250
10282
  case "end":
10251
- return _context56.stop();
10283
+ return _context57.stop();
10252
10284
  }
10253
10285
  }
10254
- }, _callee56, this);
10286
+ }, _callee57, this);
10255
10287
  }));
10256
10288
 
10257
- function sendUserCustomEvent(_x76, _x77) {
10289
+ function sendUserCustomEvent(_x77, _x78) {
10258
10290
  return _sendUserCustomEvent.apply(this, arguments);
10259
10291
  }
10260
10292
 
@@ -10322,32 +10354,32 @@ var StreamChat = /*#__PURE__*/function () {
10322
10354
  }, {
10323
10355
  key: "createSegment",
10324
10356
  value: function () {
10325
- var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(params) {
10357
+ var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(params) {
10326
10358
  var _yield$this$post, segment;
10327
10359
 
10328
- return _regeneratorRuntime.wrap(function _callee57$(_context57) {
10360
+ return _regeneratorRuntime.wrap(function _callee58$(_context58) {
10329
10361
  while (1) {
10330
- switch (_context57.prev = _context57.next) {
10362
+ switch (_context58.prev = _context58.next) {
10331
10363
  case 0:
10332
- _context57.next = 2;
10364
+ _context58.next = 2;
10333
10365
  return this.post(this.baseURL + "/segments", {
10334
10366
  segment: params
10335
10367
  });
10336
10368
 
10337
10369
  case 2:
10338
- _yield$this$post = _context57.sent;
10370
+ _yield$this$post = _context58.sent;
10339
10371
  segment = _yield$this$post.segment;
10340
- return _context57.abrupt("return", segment);
10372
+ return _context58.abrupt("return", segment);
10341
10373
 
10342
10374
  case 5:
10343
10375
  case "end":
10344
- return _context57.stop();
10376
+ return _context58.stop();
10345
10377
  }
10346
10378
  }
10347
- }, _callee57, this);
10379
+ }, _callee58, this);
10348
10380
  }));
10349
10381
 
10350
- function createSegment(_x78) {
10382
+ function createSegment(_x79) {
10351
10383
  return _createSegment.apply(this, arguments);
10352
10384
  }
10353
10385
 
@@ -10363,15 +10395,15 @@ var StreamChat = /*#__PURE__*/function () {
10363
10395
  }, {
10364
10396
  key: "querySegments",
10365
10397
  value: function () {
10366
- var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(filters) {
10398
+ var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(filters) {
10367
10399
  var options,
10368
- _args58 = arguments;
10369
- return _regeneratorRuntime.wrap(function _callee58$(_context58) {
10400
+ _args59 = arguments;
10401
+ return _regeneratorRuntime.wrap(function _callee59$(_context59) {
10370
10402
  while (1) {
10371
- switch (_context58.prev = _context58.next) {
10403
+ switch (_context59.prev = _context59.next) {
10372
10404
  case 0:
10373
- options = _args58.length > 1 && _args58[1] !== undefined ? _args58[1] : {};
10374
- _context58.next = 3;
10405
+ options = _args59.length > 1 && _args59[1] !== undefined ? _args59[1] : {};
10406
+ _context59.next = 3;
10375
10407
  return this.get(this.baseURL + "/segments", {
10376
10408
  payload: _objectSpread({
10377
10409
  filter_conditions: filters
@@ -10379,17 +10411,17 @@ var StreamChat = /*#__PURE__*/function () {
10379
10411
  });
10380
10412
 
10381
10413
  case 3:
10382
- return _context58.abrupt("return", _context58.sent);
10414
+ return _context59.abrupt("return", _context59.sent);
10383
10415
 
10384
10416
  case 4:
10385
10417
  case "end":
10386
- return _context58.stop();
10418
+ return _context59.stop();
10387
10419
  }
10388
10420
  }
10389
- }, _callee58, this);
10421
+ }, _callee59, this);
10390
10422
  }));
10391
10423
 
10392
- function querySegments(_x79) {
10424
+ function querySegments(_x80) {
10393
10425
  return _querySegments.apply(this, arguments);
10394
10426
  }
10395
10427
 
@@ -10407,32 +10439,32 @@ var StreamChat = /*#__PURE__*/function () {
10407
10439
  }, {
10408
10440
  key: "updateSegment",
10409
10441
  value: function () {
10410
- var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(id, params) {
10442
+ var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(id, params) {
10411
10443
  var _yield$this$put, segment;
10412
10444
 
10413
- return _regeneratorRuntime.wrap(function _callee59$(_context59) {
10445
+ return _regeneratorRuntime.wrap(function _callee60$(_context60) {
10414
10446
  while (1) {
10415
- switch (_context59.prev = _context59.next) {
10447
+ switch (_context60.prev = _context60.next) {
10416
10448
  case 0:
10417
- _context59.next = 2;
10449
+ _context60.next = 2;
10418
10450
  return this.put(this.baseURL + "/segments/".concat(id), {
10419
10451
  segment: params
10420
10452
  });
10421
10453
 
10422
10454
  case 2:
10423
- _yield$this$put = _context59.sent;
10455
+ _yield$this$put = _context60.sent;
10424
10456
  segment = _yield$this$put.segment;
10425
- return _context59.abrupt("return", segment);
10457
+ return _context60.abrupt("return", segment);
10426
10458
 
10427
10459
  case 5:
10428
10460
  case "end":
10429
- return _context59.stop();
10461
+ return _context60.stop();
10430
10462
  }
10431
10463
  }
10432
- }, _callee59, this);
10464
+ }, _callee60, this);
10433
10465
  }));
10434
10466
 
10435
- function updateSegment(_x80, _x81) {
10467
+ function updateSegment(_x81, _x82) {
10436
10468
  return _updateSegment.apply(this, arguments);
10437
10469
  }
10438
10470
 
@@ -10449,22 +10481,22 @@ var StreamChat = /*#__PURE__*/function () {
10449
10481
  }, {
10450
10482
  key: "deleteSegment",
10451
10483
  value: function () {
10452
- var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(id) {
10453
- return _regeneratorRuntime.wrap(function _callee60$(_context60) {
10484
+ var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id) {
10485
+ return _regeneratorRuntime.wrap(function _callee61$(_context61) {
10454
10486
  while (1) {
10455
- switch (_context60.prev = _context60.next) {
10487
+ switch (_context61.prev = _context61.next) {
10456
10488
  case 0:
10457
- return _context60.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
10489
+ return _context61.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
10458
10490
 
10459
10491
  case 1:
10460
10492
  case "end":
10461
- return _context60.stop();
10493
+ return _context61.stop();
10462
10494
  }
10463
10495
  }
10464
- }, _callee60, this);
10496
+ }, _callee61, this);
10465
10497
  }));
10466
10498
 
10467
- function deleteSegment(_x82) {
10499
+ function deleteSegment(_x83) {
10468
10500
  return _deleteSegment.apply(this, arguments);
10469
10501
  }
10470
10502
 
@@ -10481,32 +10513,32 @@ var StreamChat = /*#__PURE__*/function () {
10481
10513
  }, {
10482
10514
  key: "createCampaign",
10483
10515
  value: function () {
10484
- var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(params) {
10516
+ var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(params) {
10485
10517
  var _yield$this$post2, campaign;
10486
10518
 
10487
- return _regeneratorRuntime.wrap(function _callee61$(_context61) {
10519
+ return _regeneratorRuntime.wrap(function _callee62$(_context62) {
10488
10520
  while (1) {
10489
- switch (_context61.prev = _context61.next) {
10521
+ switch (_context62.prev = _context62.next) {
10490
10522
  case 0:
10491
- _context61.next = 2;
10523
+ _context62.next = 2;
10492
10524
  return this.post(this.baseURL + "/campaigns", {
10493
10525
  campaign: params
10494
10526
  });
10495
10527
 
10496
10528
  case 2:
10497
- _yield$this$post2 = _context61.sent;
10529
+ _yield$this$post2 = _context62.sent;
10498
10530
  campaign = _yield$this$post2.campaign;
10499
- return _context61.abrupt("return", campaign);
10531
+ return _context62.abrupt("return", campaign);
10500
10532
 
10501
10533
  case 5:
10502
10534
  case "end":
10503
- return _context61.stop();
10535
+ return _context62.stop();
10504
10536
  }
10505
10537
  }
10506
- }, _callee61, this);
10538
+ }, _callee62, this);
10507
10539
  }));
10508
10540
 
10509
- function createCampaign(_x83) {
10541
+ function createCampaign(_x84) {
10510
10542
  return _createCampaign.apply(this, arguments);
10511
10543
  }
10512
10544
 
@@ -10522,15 +10554,15 @@ var StreamChat = /*#__PURE__*/function () {
10522
10554
  }, {
10523
10555
  key: "queryCampaigns",
10524
10556
  value: function () {
10525
- var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(filters) {
10557
+ var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(filters) {
10526
10558
  var options,
10527
- _args62 = arguments;
10528
- return _regeneratorRuntime.wrap(function _callee62$(_context62) {
10559
+ _args63 = arguments;
10560
+ return _regeneratorRuntime.wrap(function _callee63$(_context63) {
10529
10561
  while (1) {
10530
- switch (_context62.prev = _context62.next) {
10562
+ switch (_context63.prev = _context63.next) {
10531
10563
  case 0:
10532
- options = _args62.length > 1 && _args62[1] !== undefined ? _args62[1] : {};
10533
- _context62.next = 3;
10564
+ options = _args63.length > 1 && _args63[1] !== undefined ? _args63[1] : {};
10565
+ _context63.next = 3;
10534
10566
  return this.get(this.baseURL + "/campaigns", {
10535
10567
  payload: _objectSpread({
10536
10568
  filter_conditions: filters
@@ -10538,17 +10570,17 @@ var StreamChat = /*#__PURE__*/function () {
10538
10570
  });
10539
10571
 
10540
10572
  case 3:
10541
- return _context62.abrupt("return", _context62.sent);
10573
+ return _context63.abrupt("return", _context63.sent);
10542
10574
 
10543
10575
  case 4:
10544
10576
  case "end":
10545
- return _context62.stop();
10577
+ return _context63.stop();
10546
10578
  }
10547
10579
  }
10548
- }, _callee62, this);
10580
+ }, _callee63, this);
10549
10581
  }));
10550
10582
 
10551
- function queryCampaigns(_x84) {
10583
+ function queryCampaigns(_x85) {
10552
10584
  return _queryCampaigns.apply(this, arguments);
10553
10585
  }
10554
10586
 
@@ -10566,32 +10598,32 @@ var StreamChat = /*#__PURE__*/function () {
10566
10598
  }, {
10567
10599
  key: "updateCampaign",
10568
10600
  value: function () {
10569
- var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(id, params) {
10601
+ var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id, params) {
10570
10602
  var _yield$this$put2, campaign;
10571
10603
 
10572
- return _regeneratorRuntime.wrap(function _callee63$(_context63) {
10604
+ return _regeneratorRuntime.wrap(function _callee64$(_context64) {
10573
10605
  while (1) {
10574
- switch (_context63.prev = _context63.next) {
10606
+ switch (_context64.prev = _context64.next) {
10575
10607
  case 0:
10576
- _context63.next = 2;
10608
+ _context64.next = 2;
10577
10609
  return this.put(this.baseURL + "/campaigns/".concat(id), {
10578
10610
  campaign: params
10579
10611
  });
10580
10612
 
10581
10613
  case 2:
10582
- _yield$this$put2 = _context63.sent;
10614
+ _yield$this$put2 = _context64.sent;
10583
10615
  campaign = _yield$this$put2.campaign;
10584
- return _context63.abrupt("return", campaign);
10616
+ return _context64.abrupt("return", campaign);
10585
10617
 
10586
10618
  case 5:
10587
10619
  case "end":
10588
- return _context63.stop();
10620
+ return _context64.stop();
10589
10621
  }
10590
10622
  }
10591
- }, _callee63, this);
10623
+ }, _callee64, this);
10592
10624
  }));
10593
10625
 
10594
- function updateCampaign(_x85, _x86) {
10626
+ function updateCampaign(_x86, _x87) {
10595
10627
  return _updateCampaign.apply(this, arguments);
10596
10628
  }
10597
10629
 
@@ -10608,25 +10640,25 @@ var StreamChat = /*#__PURE__*/function () {
10608
10640
  }, {
10609
10641
  key: "deleteCampaign",
10610
10642
  value: function () {
10611
- var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id) {
10643
+ var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id) {
10612
10644
  var params,
10613
- _args64 = arguments;
10614
- return _regeneratorRuntime.wrap(function _callee64$(_context64) {
10645
+ _args65 = arguments;
10646
+ return _regeneratorRuntime.wrap(function _callee65$(_context65) {
10615
10647
  while (1) {
10616
- switch (_context64.prev = _context64.next) {
10648
+ switch (_context65.prev = _context65.next) {
10617
10649
  case 0:
10618
- params = _args64.length > 1 && _args64[1] !== undefined ? _args64[1] : {};
10619
- return _context64.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id), params));
10650
+ params = _args65.length > 1 && _args65[1] !== undefined ? _args65[1] : {};
10651
+ return _context65.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id), params));
10620
10652
 
10621
10653
  case 2:
10622
10654
  case "end":
10623
- return _context64.stop();
10655
+ return _context65.stop();
10624
10656
  }
10625
10657
  }
10626
- }, _callee64, this);
10658
+ }, _callee65, this);
10627
10659
  }));
10628
10660
 
10629
- function deleteCampaign(_x87) {
10661
+ function deleteCampaign(_x88) {
10630
10662
  return _deleteCampaign.apply(this, arguments);
10631
10663
  }
10632
10664
 
@@ -10644,33 +10676,33 @@ var StreamChat = /*#__PURE__*/function () {
10644
10676
  }, {
10645
10677
  key: "scheduleCampaign",
10646
10678
  value: function () {
10647
- var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id, params) {
10679
+ var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id, params) {
10648
10680
  var scheduledFor, _yield$this$patch, campaign;
10649
10681
 
10650
- return _regeneratorRuntime.wrap(function _callee65$(_context65) {
10682
+ return _regeneratorRuntime.wrap(function _callee66$(_context66) {
10651
10683
  while (1) {
10652
- switch (_context65.prev = _context65.next) {
10684
+ switch (_context66.prev = _context66.next) {
10653
10685
  case 0:
10654
10686
  scheduledFor = params.scheduledFor;
10655
- _context65.next = 3;
10687
+ _context66.next = 3;
10656
10688
  return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
10657
10689
  scheduled_for: scheduledFor
10658
10690
  });
10659
10691
 
10660
10692
  case 3:
10661
- _yield$this$patch = _context65.sent;
10693
+ _yield$this$patch = _context66.sent;
10662
10694
  campaign = _yield$this$patch.campaign;
10663
- return _context65.abrupt("return", campaign);
10695
+ return _context66.abrupt("return", campaign);
10664
10696
 
10665
10697
  case 6:
10666
10698
  case "end":
10667
- return _context65.stop();
10699
+ return _context66.stop();
10668
10700
  }
10669
10701
  }
10670
- }, _callee65, this);
10702
+ }, _callee66, this);
10671
10703
  }));
10672
10704
 
10673
- function scheduleCampaign(_x88, _x89) {
10705
+ function scheduleCampaign(_x89, _x90) {
10674
10706
  return _scheduleCampaign.apply(this, arguments);
10675
10707
  }
10676
10708
 
@@ -10687,30 +10719,30 @@ var StreamChat = /*#__PURE__*/function () {
10687
10719
  }, {
10688
10720
  key: "stopCampaign",
10689
10721
  value: function () {
10690
- var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id) {
10722
+ var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id) {
10691
10723
  var _yield$this$patch2, campaign;
10692
10724
 
10693
- return _regeneratorRuntime.wrap(function _callee66$(_context66) {
10725
+ return _regeneratorRuntime.wrap(function _callee67$(_context67) {
10694
10726
  while (1) {
10695
- switch (_context66.prev = _context66.next) {
10727
+ switch (_context67.prev = _context67.next) {
10696
10728
  case 0:
10697
- _context66.next = 2;
10729
+ _context67.next = 2;
10698
10730
  return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
10699
10731
 
10700
10732
  case 2:
10701
- _yield$this$patch2 = _context66.sent;
10733
+ _yield$this$patch2 = _context67.sent;
10702
10734
  campaign = _yield$this$patch2.campaign;
10703
- return _context66.abrupt("return", campaign);
10735
+ return _context67.abrupt("return", campaign);
10704
10736
 
10705
10737
  case 5:
10706
10738
  case "end":
10707
- return _context66.stop();
10739
+ return _context67.stop();
10708
10740
  }
10709
10741
  }
10710
- }, _callee66, this);
10742
+ }, _callee67, this);
10711
10743
  }));
10712
10744
 
10713
- function stopCampaign(_x90) {
10745
+ function stopCampaign(_x91) {
10714
10746
  return _stopCampaign.apply(this, arguments);
10715
10747
  }
10716
10748
 
@@ -10727,30 +10759,30 @@ var StreamChat = /*#__PURE__*/function () {
10727
10759
  }, {
10728
10760
  key: "resumeCampaign",
10729
10761
  value: function () {
10730
- var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id) {
10762
+ var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(id) {
10731
10763
  var _yield$this$patch3, campaign;
10732
10764
 
10733
- return _regeneratorRuntime.wrap(function _callee67$(_context67) {
10765
+ return _regeneratorRuntime.wrap(function _callee68$(_context68) {
10734
10766
  while (1) {
10735
- switch (_context67.prev = _context67.next) {
10767
+ switch (_context68.prev = _context68.next) {
10736
10768
  case 0:
10737
- _context67.next = 2;
10769
+ _context68.next = 2;
10738
10770
  return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
10739
10771
 
10740
10772
  case 2:
10741
- _yield$this$patch3 = _context67.sent;
10773
+ _yield$this$patch3 = _context68.sent;
10742
10774
  campaign = _yield$this$patch3.campaign;
10743
- return _context67.abrupt("return", campaign);
10775
+ return _context68.abrupt("return", campaign);
10744
10776
 
10745
10777
  case 5:
10746
10778
  case "end":
10747
- return _context67.stop();
10779
+ return _context68.stop();
10748
10780
  }
10749
10781
  }
10750
- }, _callee67, this);
10782
+ }, _callee68, this);
10751
10783
  }));
10752
10784
 
10753
- function resumeCampaign(_x91) {
10785
+ function resumeCampaign(_x92) {
10754
10786
  return _resumeCampaign.apply(this, arguments);
10755
10787
  }
10756
10788
 
@@ -10768,30 +10800,30 @@ var StreamChat = /*#__PURE__*/function () {
10768
10800
  }, {
10769
10801
  key: "testCampaign",
10770
10802
  value: function () {
10771
- var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(id, params) {
10803
+ var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id, params) {
10772
10804
  var users;
10773
- return _regeneratorRuntime.wrap(function _callee68$(_context68) {
10805
+ return _regeneratorRuntime.wrap(function _callee69$(_context69) {
10774
10806
  while (1) {
10775
- switch (_context68.prev = _context68.next) {
10807
+ switch (_context69.prev = _context69.next) {
10776
10808
  case 0:
10777
10809
  users = params.users;
10778
- _context68.next = 3;
10810
+ _context69.next = 3;
10779
10811
  return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
10780
10812
  users: users
10781
10813
  });
10782
10814
 
10783
10815
  case 3:
10784
- return _context68.abrupt("return", _context68.sent);
10816
+ return _context69.abrupt("return", _context69.sent);
10785
10817
 
10786
10818
  case 4:
10787
10819
  case "end":
10788
- return _context68.stop();
10820
+ return _context69.stop();
10789
10821
  }
10790
10822
  }
10791
- }, _callee68, this);
10823
+ }, _callee69, this);
10792
10824
  }));
10793
10825
 
10794
- function testCampaign(_x92, _x93) {
10826
+ function testCampaign(_x93, _x94) {
10795
10827
  return _testCampaign.apply(this, arguments);
10796
10828
  }
10797
10829
 
@@ -10807,15 +10839,15 @@ var StreamChat = /*#__PURE__*/function () {
10807
10839
  }, {
10808
10840
  key: "queryRecipients",
10809
10841
  value: function () {
10810
- var _queryRecipients = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(filters) {
10842
+ var _queryRecipients = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(filters) {
10811
10843
  var options,
10812
- _args69 = arguments;
10813
- return _regeneratorRuntime.wrap(function _callee69$(_context69) {
10844
+ _args70 = arguments;
10845
+ return _regeneratorRuntime.wrap(function _callee70$(_context70) {
10814
10846
  while (1) {
10815
- switch (_context69.prev = _context69.next) {
10847
+ switch (_context70.prev = _context70.next) {
10816
10848
  case 0:
10817
- options = _args69.length > 1 && _args69[1] !== undefined ? _args69[1] : {};
10818
- _context69.next = 3;
10849
+ options = _args70.length > 1 && _args70[1] !== undefined ? _args70[1] : {};
10850
+ _context70.next = 3;
10819
10851
  return this.get(this.baseURL + "/recipients", {
10820
10852
  payload: _objectSpread({
10821
10853
  filter_conditions: filters
@@ -10823,17 +10855,17 @@ var StreamChat = /*#__PURE__*/function () {
10823
10855
  });
10824
10856
 
10825
10857
  case 3:
10826
- return _context69.abrupt("return", _context69.sent);
10858
+ return _context70.abrupt("return", _context70.sent);
10827
10859
 
10828
10860
  case 4:
10829
10861
  case "end":
10830
- return _context69.stop();
10862
+ return _context70.stop();
10831
10863
  }
10832
10864
  }
10833
- }, _callee69, this);
10865
+ }, _callee70, this);
10834
10866
  }));
10835
10867
 
10836
- function queryRecipients(_x94) {
10868
+ function queryRecipients(_x95) {
10837
10869
  return _queryRecipients.apply(this, arguments);
10838
10870
  }
10839
10871
 
@@ -10849,24 +10881,24 @@ var StreamChat = /*#__PURE__*/function () {
10849
10881
  }, {
10850
10882
  key: "enrichURL",
10851
10883
  value: function () {
10852
- var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(url) {
10853
- return _regeneratorRuntime.wrap(function _callee70$(_context70) {
10884
+ var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(url) {
10885
+ return _regeneratorRuntime.wrap(function _callee71$(_context71) {
10854
10886
  while (1) {
10855
- switch (_context70.prev = _context70.next) {
10887
+ switch (_context71.prev = _context71.next) {
10856
10888
  case 0:
10857
- return _context70.abrupt("return", this.get(this.baseURL + "/og", {
10889
+ return _context71.abrupt("return", this.get(this.baseURL + "/og", {
10858
10890
  url: url
10859
10891
  }));
10860
10892
 
10861
10893
  case 1:
10862
10894
  case "end":
10863
- return _context70.stop();
10895
+ return _context71.stop();
10864
10896
  }
10865
10897
  }
10866
- }, _callee70, this);
10898
+ }, _callee71, this);
10867
10899
  }));
10868
10900
 
10869
- function enrichURL(_x95) {
10901
+ function enrichURL(_x96) {
10870
10902
  return _enrichURL.apply(this, arguments);
10871
10903
  }
10872
10904
 
@@ -10883,22 +10915,22 @@ var StreamChat = /*#__PURE__*/function () {
10883
10915
  }, {
10884
10916
  key: "getTask",
10885
10917
  value: function () {
10886
- var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id) {
10887
- return _regeneratorRuntime.wrap(function _callee71$(_context71) {
10918
+ var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id) {
10919
+ return _regeneratorRuntime.wrap(function _callee72$(_context72) {
10888
10920
  while (1) {
10889
- switch (_context71.prev = _context71.next) {
10921
+ switch (_context72.prev = _context72.next) {
10890
10922
  case 0:
10891
- return _context71.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
10923
+ return _context72.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
10892
10924
 
10893
10925
  case 1:
10894
10926
  case "end":
10895
- return _context71.stop();
10927
+ return _context72.stop();
10896
10928
  }
10897
10929
  }
10898
- }, _callee71, this);
10930
+ }, _callee72, this);
10899
10931
  }));
10900
10932
 
10901
- function getTask(_x96) {
10933
+ function getTask(_x97) {
10902
10934
  return _getTask.apply(this, arguments);
10903
10935
  }
10904
10936
 
@@ -10916,31 +10948,31 @@ var StreamChat = /*#__PURE__*/function () {
10916
10948
  }, {
10917
10949
  key: "deleteChannels",
10918
10950
  value: function () {
10919
- var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(cids) {
10951
+ var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(cids) {
10920
10952
  var options,
10921
- _args72 = arguments;
10922
- return _regeneratorRuntime.wrap(function _callee72$(_context72) {
10953
+ _args73 = arguments;
10954
+ return _regeneratorRuntime.wrap(function _callee73$(_context73) {
10923
10955
  while (1) {
10924
- switch (_context72.prev = _context72.next) {
10956
+ switch (_context73.prev = _context73.next) {
10925
10957
  case 0:
10926
- options = _args72.length > 1 && _args72[1] !== undefined ? _args72[1] : {};
10927
- _context72.next = 3;
10958
+ options = _args73.length > 1 && _args73[1] !== undefined ? _args73[1] : {};
10959
+ _context73.next = 3;
10928
10960
  return this.post(this.baseURL + "/channels/delete", _objectSpread({
10929
10961
  cids: cids
10930
10962
  }, options));
10931
10963
 
10932
10964
  case 3:
10933
- return _context72.abrupt("return", _context72.sent);
10965
+ return _context73.abrupt("return", _context73.sent);
10934
10966
 
10935
10967
  case 4:
10936
10968
  case "end":
10937
- return _context72.stop();
10969
+ return _context73.stop();
10938
10970
  }
10939
10971
  }
10940
- }, _callee72, this);
10972
+ }, _callee73, this);
10941
10973
  }));
10942
10974
 
10943
- function deleteChannels(_x97) {
10975
+ function deleteChannels(_x98) {
10944
10976
  return _deleteChannels.apply(this, arguments);
10945
10977
  }
10946
10978
 
@@ -10958,13 +10990,13 @@ var StreamChat = /*#__PURE__*/function () {
10958
10990
  }, {
10959
10991
  key: "deleteUsers",
10960
10992
  value: function () {
10961
- var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(user_ids, options) {
10962
- return _regeneratorRuntime.wrap(function _callee73$(_context73) {
10993
+ var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(user_ids, options) {
10994
+ return _regeneratorRuntime.wrap(function _callee74$(_context74) {
10963
10995
  while (1) {
10964
- switch (_context73.prev = _context73.next) {
10996
+ switch (_context74.prev = _context74.next) {
10965
10997
  case 0:
10966
10998
  if (!((options === null || options === void 0 ? void 0 : options.user) !== 'soft' && (options === null || options === void 0 ? void 0 : options.user) !== 'hard')) {
10967
- _context73.next = 2;
10999
+ _context74.next = 2;
10968
11000
  break;
10969
11001
  }
10970
11002
 
@@ -10972,7 +11004,7 @@ var StreamChat = /*#__PURE__*/function () {
10972
11004
 
10973
11005
  case 2:
10974
11006
  if (!(options.messages !== undefined && options.messages !== 'soft' && options.messages !== 'hard')) {
10975
- _context73.next = 4;
11007
+ _context74.next = 4;
10976
11008
  break;
10977
11009
  }
10978
11010
 
@@ -10980,30 +11012,30 @@ var StreamChat = /*#__PURE__*/function () {
10980
11012
 
10981
11013
  case 4:
10982
11014
  if (!(options.conversations !== undefined && options.conversations !== 'soft' && options.conversations !== 'hard')) {
10983
- _context73.next = 6;
11015
+ _context74.next = 6;
10984
11016
  break;
10985
11017
  }
10986
11018
 
10987
11019
  throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
10988
11020
 
10989
11021
  case 6:
10990
- _context73.next = 8;
11022
+ _context74.next = 8;
10991
11023
  return this.post(this.baseURL + "/users/delete", _objectSpread({
10992
11024
  user_ids: user_ids
10993
11025
  }, options));
10994
11026
 
10995
11027
  case 8:
10996
- return _context73.abrupt("return", _context73.sent);
11028
+ return _context74.abrupt("return", _context74.sent);
10997
11029
 
10998
11030
  case 9:
10999
11031
  case "end":
11000
- return _context73.stop();
11032
+ return _context74.stop();
11001
11033
  }
11002
11034
  }
11003
- }, _callee73, this);
11035
+ }, _callee74, this);
11004
11036
  }));
11005
11037
 
11006
- function deleteUsers(_x98, _x99) {
11038
+ function deleteUsers(_x99, _x100) {
11007
11039
  return _deleteUsers.apply(this, arguments);
11008
11040
  }
11009
11041
 
@@ -11024,28 +11056,28 @@ var StreamChat = /*#__PURE__*/function () {
11024
11056
  }, {
11025
11057
  key: "_createImportURL",
11026
11058
  value: function () {
11027
- var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(filename) {
11028
- return _regeneratorRuntime.wrap(function _callee74$(_context74) {
11059
+ var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(filename) {
11060
+ return _regeneratorRuntime.wrap(function _callee75$(_context75) {
11029
11061
  while (1) {
11030
- switch (_context74.prev = _context74.next) {
11062
+ switch (_context75.prev = _context75.next) {
11031
11063
  case 0:
11032
- _context74.next = 2;
11064
+ _context75.next = 2;
11033
11065
  return this.post(this.baseURL + "/import_urls", {
11034
11066
  filename: filename
11035
11067
  });
11036
11068
 
11037
11069
  case 2:
11038
- return _context74.abrupt("return", _context74.sent);
11070
+ return _context75.abrupt("return", _context75.sent);
11039
11071
 
11040
11072
  case 3:
11041
11073
  case "end":
11042
- return _context74.stop();
11074
+ return _context75.stop();
11043
11075
  }
11044
11076
  }
11045
- }, _callee74, this);
11077
+ }, _callee75, this);
11046
11078
  }));
11047
11079
 
11048
- function _createImportURL(_x100) {
11080
+ function _createImportURL(_x101) {
11049
11081
  return _createImportURL2.apply(this, arguments);
11050
11082
  }
11051
11083
 
@@ -11067,33 +11099,33 @@ var StreamChat = /*#__PURE__*/function () {
11067
11099
  }, {
11068
11100
  key: "_createImport",
11069
11101
  value: function () {
11070
- var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(path) {
11102
+ var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(path) {
11071
11103
  var options,
11072
- _args75 = arguments;
11073
- return _regeneratorRuntime.wrap(function _callee75$(_context75) {
11104
+ _args76 = arguments;
11105
+ return _regeneratorRuntime.wrap(function _callee76$(_context76) {
11074
11106
  while (1) {
11075
- switch (_context75.prev = _context75.next) {
11107
+ switch (_context76.prev = _context76.next) {
11076
11108
  case 0:
11077
- options = _args75.length > 1 && _args75[1] !== undefined ? _args75[1] : {
11109
+ options = _args76.length > 1 && _args76[1] !== undefined ? _args76[1] : {
11078
11110
  mode: 'upsert'
11079
11111
  };
11080
- _context75.next = 3;
11112
+ _context76.next = 3;
11081
11113
  return this.post(this.baseURL + "/imports", _objectSpread({
11082
11114
  path: path
11083
11115
  }, options));
11084
11116
 
11085
11117
  case 3:
11086
- return _context75.abrupt("return", _context75.sent);
11118
+ return _context76.abrupt("return", _context76.sent);
11087
11119
 
11088
11120
  case 4:
11089
11121
  case "end":
11090
- return _context75.stop();
11122
+ return _context76.stop();
11091
11123
  }
11092
11124
  }
11093
- }, _callee75, this);
11125
+ }, _callee76, this);
11094
11126
  }));
11095
11127
 
11096
- function _createImport(_x101) {
11128
+ function _createImport(_x102) {
11097
11129
  return _createImport2.apply(this, arguments);
11098
11130
  }
11099
11131
 
@@ -11115,26 +11147,26 @@ var StreamChat = /*#__PURE__*/function () {
11115
11147
  }, {
11116
11148
  key: "_getImport",
11117
11149
  value: function () {
11118
- var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(id) {
11119
- return _regeneratorRuntime.wrap(function _callee76$(_context76) {
11150
+ var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(id) {
11151
+ return _regeneratorRuntime.wrap(function _callee77$(_context77) {
11120
11152
  while (1) {
11121
- switch (_context76.prev = _context76.next) {
11153
+ switch (_context77.prev = _context77.next) {
11122
11154
  case 0:
11123
- _context76.next = 2;
11155
+ _context77.next = 2;
11124
11156
  return this.get(this.baseURL + "/imports/".concat(id));
11125
11157
 
11126
11158
  case 2:
11127
- return _context76.abrupt("return", _context76.sent);
11159
+ return _context77.abrupt("return", _context77.sent);
11128
11160
 
11129
11161
  case 3:
11130
11162
  case "end":
11131
- return _context76.stop();
11163
+ return _context77.stop();
11132
11164
  }
11133
11165
  }
11134
- }, _callee76, this);
11166
+ }, _callee77, this);
11135
11167
  }));
11136
11168
 
11137
- function _getImport(_x102) {
11169
+ function _getImport(_x103) {
11138
11170
  return _getImport2.apply(this, arguments);
11139
11171
  }
11140
11172
 
@@ -11156,26 +11188,26 @@ var StreamChat = /*#__PURE__*/function () {
11156
11188
  }, {
11157
11189
  key: "_listImports",
11158
11190
  value: function () {
11159
- var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(options) {
11160
- return _regeneratorRuntime.wrap(function _callee77$(_context77) {
11191
+ var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(options) {
11192
+ return _regeneratorRuntime.wrap(function _callee78$(_context78) {
11161
11193
  while (1) {
11162
- switch (_context77.prev = _context77.next) {
11194
+ switch (_context78.prev = _context78.next) {
11163
11195
  case 0:
11164
- _context77.next = 2;
11196
+ _context78.next = 2;
11165
11197
  return this.get(this.baseURL + "/imports", options);
11166
11198
 
11167
11199
  case 2:
11168
- return _context77.abrupt("return", _context77.sent);
11200
+ return _context78.abrupt("return", _context78.sent);
11169
11201
 
11170
11202
  case 3:
11171
11203
  case "end":
11172
- return _context77.stop();
11204
+ return _context78.stop();
11173
11205
  }
11174
11206
  }
11175
- }, _callee77, this);
11207
+ }, _callee78, this);
11176
11208
  }));
11177
11209
 
11178
- function _listImports(_x103) {
11210
+ function _listImports(_x104) {
11179
11211
  return _listImports2.apply(this, arguments);
11180
11212
  }
11181
11213
 
@@ -11194,28 +11226,28 @@ var StreamChat = /*#__PURE__*/function () {
11194
11226
  }, {
11195
11227
  key: "upsertPushProvider",
11196
11228
  value: function () {
11197
- var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(pushProvider) {
11198
- return _regeneratorRuntime.wrap(function _callee78$(_context78) {
11229
+ var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(pushProvider) {
11230
+ return _regeneratorRuntime.wrap(function _callee79$(_context79) {
11199
11231
  while (1) {
11200
- switch (_context78.prev = _context78.next) {
11232
+ switch (_context79.prev = _context79.next) {
11201
11233
  case 0:
11202
- _context78.next = 2;
11234
+ _context79.next = 2;
11203
11235
  return this.post(this.baseURL + "/push_providers", {
11204
11236
  push_provider: pushProvider
11205
11237
  });
11206
11238
 
11207
11239
  case 2:
11208
- return _context78.abrupt("return", _context78.sent);
11240
+ return _context79.abrupt("return", _context79.sent);
11209
11241
 
11210
11242
  case 3:
11211
11243
  case "end":
11212
- return _context78.stop();
11244
+ return _context79.stop();
11213
11245
  }
11214
11246
  }
11215
- }, _callee78, this);
11247
+ }, _callee79, this);
11216
11248
  }));
11217
11249
 
11218
- function upsertPushProvider(_x104) {
11250
+ function upsertPushProvider(_x105) {
11219
11251
  return _upsertPushProvider.apply(this, arguments);
11220
11252
  }
11221
11253
 
@@ -11234,28 +11266,28 @@ var StreamChat = /*#__PURE__*/function () {
11234
11266
  }, {
11235
11267
  key: "deletePushProvider",
11236
11268
  value: function () {
11237
- var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(_ref10) {
11269
+ var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(_ref10) {
11238
11270
  var type, name;
11239
- return _regeneratorRuntime.wrap(function _callee79$(_context79) {
11271
+ return _regeneratorRuntime.wrap(function _callee80$(_context80) {
11240
11272
  while (1) {
11241
- switch (_context79.prev = _context79.next) {
11273
+ switch (_context80.prev = _context80.next) {
11242
11274
  case 0:
11243
11275
  type = _ref10.type, name = _ref10.name;
11244
- _context79.next = 3;
11276
+ _context80.next = 3;
11245
11277
  return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
11246
11278
 
11247
11279
  case 3:
11248
- return _context79.abrupt("return", _context79.sent);
11280
+ return _context80.abrupt("return", _context80.sent);
11249
11281
 
11250
11282
  case 4:
11251
11283
  case "end":
11252
- return _context79.stop();
11284
+ return _context80.stop();
11253
11285
  }
11254
11286
  }
11255
- }, _callee79, this);
11287
+ }, _callee80, this);
11256
11288
  }));
11257
11289
 
11258
- function deletePushProvider(_x105) {
11290
+ function deletePushProvider(_x106) {
11259
11291
  return _deletePushProvider.apply(this, arguments);
11260
11292
  }
11261
11293
 
@@ -11272,23 +11304,23 @@ var StreamChat = /*#__PURE__*/function () {
11272
11304
  }, {
11273
11305
  key: "listPushProviders",
11274
11306
  value: function () {
11275
- var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80() {
11276
- return _regeneratorRuntime.wrap(function _callee80$(_context80) {
11307
+ var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81() {
11308
+ return _regeneratorRuntime.wrap(function _callee81$(_context81) {
11277
11309
  while (1) {
11278
- switch (_context80.prev = _context80.next) {
11310
+ switch (_context81.prev = _context81.next) {
11279
11311
  case 0:
11280
- _context80.next = 2;
11312
+ _context81.next = 2;
11281
11313
  return this.get(this.baseURL + "/push_providers");
11282
11314
 
11283
11315
  case 2:
11284
- return _context80.abrupt("return", _context80.sent);
11316
+ return _context81.abrupt("return", _context81.sent);
11285
11317
 
11286
11318
  case 3:
11287
11319
  case "end":
11288
- return _context80.stop();
11320
+ return _context81.stop();
11289
11321
  }
11290
11322
  }
11291
- }, _callee80, this);
11323
+ }, _callee81, this);
11292
11324
  }));
11293
11325
 
11294
11326
  function listPushProviders() {
@@ -11316,26 +11348,26 @@ var StreamChat = /*#__PURE__*/function () {
11316
11348
  }, {
11317
11349
  key: "commitMessage",
11318
11350
  value: function () {
11319
- var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(id) {
11320
- return _regeneratorRuntime.wrap(function _callee81$(_context81) {
11351
+ var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(id) {
11352
+ return _regeneratorRuntime.wrap(function _callee82$(_context82) {
11321
11353
  while (1) {
11322
- switch (_context81.prev = _context81.next) {
11354
+ switch (_context82.prev = _context82.next) {
11323
11355
  case 0:
11324
- _context81.next = 2;
11356
+ _context82.next = 2;
11325
11357
  return this.post(this.baseURL + "/messages/".concat(id, "/commit"));
11326
11358
 
11327
11359
  case 2:
11328
- return _context81.abrupt("return", _context81.sent);
11360
+ return _context82.abrupt("return", _context82.sent);
11329
11361
 
11330
11362
  case 3:
11331
11363
  case "end":
11332
- return _context81.stop();
11364
+ return _context82.stop();
11333
11365
  }
11334
11366
  }
11335
- }, _callee81, this);
11367
+ }, _callee82, this);
11336
11368
  }));
11337
11369
 
11338
- function commitMessage(_x106) {
11370
+ function commitMessage(_x107) {
11339
11371
  return _commitMessage.apply(this, arguments);
11340
11372
  }
11341
11373