stream-chat 8.14.5 → 8.15.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.
@@ -1539,7 +1539,6 @@ var Channel = /*#__PURE__*/function () {
1539
1539
  key: "sendMessage",
1540
1540
  value: function () {
1541
1541
  var _sendMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(message, options) {
1542
- var sendMessageResponse;
1543
1542
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
1544
1543
  while (1) {
1545
1544
  switch (_context2.prev = _context2.next) {
@@ -1550,12 +1549,9 @@ var Channel = /*#__PURE__*/function () {
1550
1549
  }, options));
1551
1550
 
1552
1551
  case 2:
1553
- sendMessageResponse = _context2.sent;
1554
- // Reset unreadCount to 0.
1555
- this.state.unreadCount = 0;
1556
- return _context2.abrupt("return", sendMessageResponse);
1552
+ return _context2.abrupt("return", _context2.sent);
1557
1553
 
1558
- case 5:
1554
+ case 3:
1559
1555
  case "end":
1560
1556
  return _context2.stop();
1561
1557
  }
@@ -3636,7 +3632,7 @@ var Channel = /*#__PURE__*/function () {
3636
3632
  }, {
3637
3633
  key: "_handleChannelEvent",
3638
3634
  value: function _handleChannelEvent(event) {
3639
- var _event$user, _event$user2, _event$user3, _event$user5, _event$user6, _event$channel, _event$member, _event$user9, _event$user10, _channelState$members, _event$user11, _channelState$members2;
3635
+ var _event$user, _event$user2, _event$user3, _event$user5, _event$user6, _event$channel, _event$member, _event$user9, _event$user11, _channelState$members, _event$user12, _channelState$members2;
3640
3636
 
3641
3637
  var channel = this;
3642
3638
 
@@ -3667,7 +3663,6 @@ var Channel = /*#__PURE__*/function () {
3667
3663
  var _event$user4, _this$getClient$user;
3668
3664
 
3669
3665
  channelState.read[event.user.id] = {
3670
- // because in client.ts the handleEvent call that flows to this sets this `event.received_at = new Date();`
3671
3666
  last_read: new Date(event.created_at),
3672
3667
  last_read_message_id: event.last_read_message_id,
3673
3668
  user: event.user,
@@ -3724,7 +3719,13 @@ var Channel = /*#__PURE__*/function () {
3724
3719
 
3725
3720
  if (event.message.pinned) {
3726
3721
  channelState.addPinnedMessage(event.message);
3727
- }
3722
+ } // do not increase the unread count - the back-end does not increase the count neither in the following cases:
3723
+ // 1. the message is mine
3724
+ // 2. the message is a thread reply from any user
3725
+
3726
+
3727
+ var preventUnreadCountUpdate = ownMessage || isThreadMessage;
3728
+ if (preventUnreadCountUpdate) break;
3728
3729
 
3729
3730
  if ((_event$user8 = event.user) !== null && _event$user8 !== void 0 && _event$user8.id) {
3730
3731
  for (var userId in channelState.read) {
@@ -3740,9 +3741,7 @@ var Channel = /*#__PURE__*/function () {
3740
3741
  }
3741
3742
  }
3742
3743
 
3743
- if (ownMessage) {
3744
- channelState.unreadCount = 0;
3745
- } else if (this._countMessageAsUnread(event.message)) {
3744
+ if (this._countMessageAsUnread(event.message)) {
3746
3745
  channelState.unreadCount = channelState.unreadCount + 1;
3747
3746
  }
3748
3747
  }
@@ -3815,6 +3814,25 @@ var Channel = /*#__PURE__*/function () {
3815
3814
 
3816
3815
  break;
3817
3816
 
3817
+ case 'notification.mark_unread':
3818
+ {
3819
+ var _event$user10, _this$getClient$user3, _event$unread_message;
3820
+
3821
+ var _ownMessage = ((_event$user10 = event.user) === null || _event$user10 === void 0 ? void 0 : _event$user10.id) === ((_this$getClient$user3 = this.getClient().user) === null || _this$getClient$user3 === void 0 ? void 0 : _this$getClient$user3.id);
3822
+
3823
+ if (!(_ownMessage && event.user)) break;
3824
+ var unreadCount = (_event$unread_message = event.unread_messages) !== null && _event$unread_message !== void 0 ? _event$unread_message : 0;
3825
+ channelState.read[event.user.id] = {
3826
+ first_unread_message_id: event.first_unread_message_id,
3827
+ last_read: new Date(event.last_read_at),
3828
+ last_read_message_id: event.last_read_message_id,
3829
+ user: event.user,
3830
+ unread_messages: unreadCount
3831
+ };
3832
+ channelState.unreadCount = unreadCount;
3833
+ break;
3834
+ }
3835
+
3818
3836
  case 'channel.updated':
3819
3837
  if (event.channel) {
3820
3838
  var _event$channel2, _channel$data, _event$channel$hidden, _event$channel3, _channel$data2, _event$channel$own_ca, _event$channel4, _channel$data3;
@@ -3881,7 +3899,7 @@ var Channel = /*#__PURE__*/function () {
3881
3899
  break;
3882
3900
 
3883
3901
  case 'user.banned':
3884
- if (!((_event$user10 = event.user) !== null && _event$user10 !== void 0 && _event$user10.id)) break;
3902
+ if (!((_event$user11 = event.user) !== null && _event$user11 !== void 0 && _event$user11.id)) break;
3885
3903
  channelState.members[event.user.id] = _objectSpread$5(_objectSpread$5({}, channelState.members[event.user.id] || {}), {}, {
3886
3904
  shadow_banned: !!event.shadow,
3887
3905
  banned: !event.shadow,
@@ -3890,7 +3908,7 @@ var Channel = /*#__PURE__*/function () {
3890
3908
  break;
3891
3909
 
3892
3910
  case 'user.unbanned':
3893
- if (!((_event$user11 = event.user) !== null && _event$user11 !== void 0 && _event$user11.id)) break;
3911
+ if (!((_event$user12 = event.user) !== null && _event$user12 !== void 0 && _event$user12.id)) break;
3894
3912
  channelState.members[event.user.id] = _objectSpread$5(_objectSpread$5({}, channelState.members[event.user.id] || {}), {}, {
3895
3913
  shadow_banned: false,
3896
3914
  banned: false,
@@ -8455,6 +8473,14 @@ var StreamChat = /*#__PURE__*/function () {
8455
8473
 
8456
8474
  return getDevices;
8457
8475
  }()
8476
+ /**
8477
+ * getUnreadCount - Returns unread counts for a single user
8478
+ *
8479
+ * @param {string} [userID] User ID.
8480
+ *
8481
+ * @return {<GetUnreadCountAPIResponse>}
8482
+ */
8483
+
8458
8484
  }, {
8459
8485
  key: "getUnreadCount",
8460
8486
  value: function () {
@@ -8485,6 +8511,44 @@ var StreamChat = /*#__PURE__*/function () {
8485
8511
 
8486
8512
  return getUnreadCount;
8487
8513
  }()
8514
+ /**
8515
+ * getUnreadCountBatch - Returns unread counts for multiple users at once. Only works server side.
8516
+ *
8517
+ * @param {string[]} [userIDs] List of user IDs to fetch unread counts for.
8518
+ *
8519
+ * @return {<GetUnreadCountBatchAPIResponse>}
8520
+ */
8521
+
8522
+ }, {
8523
+ key: "getUnreadCountBatch",
8524
+ value: function () {
8525
+ var _getUnreadCountBatch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(userIDs) {
8526
+ return _regeneratorRuntime.wrap(function _callee25$(_context25) {
8527
+ while (1) {
8528
+ switch (_context25.prev = _context25.next) {
8529
+ case 0:
8530
+ _context25.next = 2;
8531
+ return this.post(this.baseURL + '/unread_batch', {
8532
+ user_ids: userIDs
8533
+ });
8534
+
8535
+ case 2:
8536
+ return _context25.abrupt("return", _context25.sent);
8537
+
8538
+ case 3:
8539
+ case "end":
8540
+ return _context25.stop();
8541
+ }
8542
+ }
8543
+ }, _callee25, this);
8544
+ }));
8545
+
8546
+ function getUnreadCountBatch(_x26) {
8547
+ return _getUnreadCountBatch.apply(this, arguments);
8548
+ }
8549
+
8550
+ return getUnreadCountBatch;
8551
+ }()
8488
8552
  /**
8489
8553
  * removeDevice - Removes the device with the given id. Clientside users can only delete their own devices
8490
8554
  *
@@ -8496,12 +8560,12 @@ var StreamChat = /*#__PURE__*/function () {
8496
8560
  }, {
8497
8561
  key: "removeDevice",
8498
8562
  value: function () {
8499
- var _removeDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(id, userID) {
8500
- return _regeneratorRuntime.wrap(function _callee25$(_context25) {
8563
+ var _removeDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(id, userID) {
8564
+ return _regeneratorRuntime.wrap(function _callee26$(_context26) {
8501
8565
  while (1) {
8502
- switch (_context25.prev = _context25.next) {
8566
+ switch (_context26.prev = _context26.next) {
8503
8567
  case 0:
8504
- _context25.next = 2;
8568
+ _context26.next = 2;
8505
8569
  return this.delete(this.baseURL + '/devices', _objectSpread({
8506
8570
  id: id
8507
8571
  }, userID ? {
@@ -8509,17 +8573,17 @@ var StreamChat = /*#__PURE__*/function () {
8509
8573
  } : {}));
8510
8574
 
8511
8575
  case 2:
8512
- return _context25.abrupt("return", _context25.sent);
8576
+ return _context26.abrupt("return", _context26.sent);
8513
8577
 
8514
8578
  case 3:
8515
8579
  case "end":
8516
- return _context25.stop();
8580
+ return _context26.stop();
8517
8581
  }
8518
8582
  }
8519
- }, _callee25, this);
8583
+ }, _callee26, this);
8520
8584
  }));
8521
8585
 
8522
- function removeDevice(_x26, _x27) {
8586
+ function removeDevice(_x27, _x28) {
8523
8587
  return _removeDevice.apply(this, arguments);
8524
8588
  }
8525
8589
 
@@ -8536,15 +8600,15 @@ var StreamChat = /*#__PURE__*/function () {
8536
8600
  }, {
8537
8601
  key: "getRateLimits",
8538
8602
  value: function () {
8539
- var _getRateLimits = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(params) {
8603
+ var _getRateLimits = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(params) {
8540
8604
  var _ref7, serverSide, web, android, ios, endpoints;
8541
8605
 
8542
- return _regeneratorRuntime.wrap(function _callee26$(_context26) {
8606
+ return _regeneratorRuntime.wrap(function _callee27$(_context27) {
8543
8607
  while (1) {
8544
- switch (_context26.prev = _context26.next) {
8608
+ switch (_context27.prev = _context27.next) {
8545
8609
  case 0:
8546
8610
  _ref7 = params || {}, serverSide = _ref7.serverSide, web = _ref7.web, android = _ref7.android, ios = _ref7.ios, endpoints = _ref7.endpoints;
8547
- return _context26.abrupt("return", this.get(this.baseURL + '/rate_limits', {
8611
+ return _context27.abrupt("return", this.get(this.baseURL + '/rate_limits', {
8548
8612
  server_side: serverSide,
8549
8613
  web: web,
8550
8614
  android: android,
@@ -8554,13 +8618,13 @@ var StreamChat = /*#__PURE__*/function () {
8554
8618
 
8555
8619
  case 2:
8556
8620
  case "end":
8557
- return _context26.stop();
8621
+ return _context27.stop();
8558
8622
  }
8559
8623
  }
8560
- }, _callee26, this);
8624
+ }, _callee27, this);
8561
8625
  }));
8562
8626
 
8563
- function getRateLimits(_x28) {
8627
+ function getRateLimits(_x29) {
8564
8628
  return _getRateLimits.apply(this, arguments);
8565
8629
  }
8566
8630
 
@@ -8651,26 +8715,26 @@ var StreamChat = /*#__PURE__*/function () {
8651
8715
  * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>} list of updated users
8652
8716
  */
8653
8717
  function () {
8654
- var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(partialUserObject) {
8655
- return _regeneratorRuntime.wrap(function _callee27$(_context27) {
8718
+ var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(partialUserObject) {
8719
+ return _regeneratorRuntime.wrap(function _callee28$(_context28) {
8656
8720
  while (1) {
8657
- switch (_context27.prev = _context27.next) {
8721
+ switch (_context28.prev = _context28.next) {
8658
8722
  case 0:
8659
- _context27.next = 2;
8723
+ _context28.next = 2;
8660
8724
  return this.partialUpdateUsers([partialUserObject]);
8661
8725
 
8662
8726
  case 2:
8663
- return _context27.abrupt("return", _context27.sent);
8727
+ return _context28.abrupt("return", _context28.sent);
8664
8728
 
8665
8729
  case 3:
8666
8730
  case "end":
8667
- return _context27.stop();
8731
+ return _context28.stop();
8668
8732
  }
8669
8733
  }
8670
- }, _callee27, this);
8734
+ }, _callee28, this);
8671
8735
  }));
8672
8736
 
8673
- function partialUpdateUser(_x29) {
8737
+ function partialUpdateUser(_x30) {
8674
8738
  return _partialUpdateUser.apply(this, arguments);
8675
8739
  }
8676
8740
 
@@ -8687,29 +8751,29 @@ var StreamChat = /*#__PURE__*/function () {
8687
8751
  }, {
8688
8752
  key: "upsertUsers",
8689
8753
  value: function () {
8690
- var _upsertUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(users) {
8754
+ var _upsertUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(users) {
8691
8755
  var userMap, _iterator4, _step4, userObject;
8692
8756
 
8693
- return _regeneratorRuntime.wrap(function _callee28$(_context28) {
8757
+ return _regeneratorRuntime.wrap(function _callee29$(_context29) {
8694
8758
  while (1) {
8695
- switch (_context28.prev = _context28.next) {
8759
+ switch (_context29.prev = _context29.next) {
8696
8760
  case 0:
8697
8761
  userMap = {};
8698
8762
  _iterator4 = _createForOfIteratorHelper(users);
8699
- _context28.prev = 2;
8763
+ _context29.prev = 2;
8700
8764
 
8701
8765
  _iterator4.s();
8702
8766
 
8703
8767
  case 4:
8704
8768
  if ((_step4 = _iterator4.n()).done) {
8705
- _context28.next = 11;
8769
+ _context29.next = 11;
8706
8770
  break;
8707
8771
  }
8708
8772
 
8709
8773
  userObject = _step4.value;
8710
8774
 
8711
8775
  if (userObject.id) {
8712
- _context28.next = 8;
8776
+ _context29.next = 8;
8713
8777
  break;
8714
8778
  }
8715
8779
 
@@ -8719,44 +8783,44 @@ var StreamChat = /*#__PURE__*/function () {
8719
8783
  userMap[userObject.id] = userObject;
8720
8784
 
8721
8785
  case 9:
8722
- _context28.next = 4;
8786
+ _context29.next = 4;
8723
8787
  break;
8724
8788
 
8725
8789
  case 11:
8726
- _context28.next = 16;
8790
+ _context29.next = 16;
8727
8791
  break;
8728
8792
 
8729
8793
  case 13:
8730
- _context28.prev = 13;
8731
- _context28.t0 = _context28["catch"](2);
8794
+ _context29.prev = 13;
8795
+ _context29.t0 = _context29["catch"](2);
8732
8796
 
8733
- _iterator4.e(_context28.t0);
8797
+ _iterator4.e(_context29.t0);
8734
8798
 
8735
8799
  case 16:
8736
- _context28.prev = 16;
8800
+ _context29.prev = 16;
8737
8801
 
8738
8802
  _iterator4.f();
8739
8803
 
8740
- return _context28.finish(16);
8804
+ return _context29.finish(16);
8741
8805
 
8742
8806
  case 19:
8743
- _context28.next = 21;
8807
+ _context29.next = 21;
8744
8808
  return this.post(this.baseURL + '/users', {
8745
8809
  users: userMap
8746
8810
  });
8747
8811
 
8748
8812
  case 21:
8749
- return _context28.abrupt("return", _context28.sent);
8813
+ return _context29.abrupt("return", _context29.sent);
8750
8814
 
8751
8815
  case 22:
8752
8816
  case "end":
8753
- return _context28.stop();
8817
+ return _context29.stop();
8754
8818
  }
8755
8819
  }
8756
- }, _callee28, this, [[2, 13, 16, 19]]);
8820
+ }, _callee29, this, [[2, 13, 16, 19]]);
8757
8821
  }));
8758
8822
 
8759
- function upsertUsers(_x30) {
8823
+ function upsertUsers(_x31) {
8760
8824
  return _upsertUsers.apply(this, arguments);
8761
8825
  }
8762
8826
 
@@ -8804,72 +8868,72 @@ var StreamChat = /*#__PURE__*/function () {
8804
8868
  * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
8805
8869
  */
8806
8870
  function () {
8807
- var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(users) {
8871
+ var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(users) {
8808
8872
  var _iterator5, _step5, userObject;
8809
8873
 
8810
- return _regeneratorRuntime.wrap(function _callee29$(_context29) {
8874
+ return _regeneratorRuntime.wrap(function _callee30$(_context30) {
8811
8875
  while (1) {
8812
- switch (_context29.prev = _context29.next) {
8876
+ switch (_context30.prev = _context30.next) {
8813
8877
  case 0:
8814
8878
  _iterator5 = _createForOfIteratorHelper(users);
8815
- _context29.prev = 1;
8879
+ _context30.prev = 1;
8816
8880
 
8817
8881
  _iterator5.s();
8818
8882
 
8819
8883
  case 3:
8820
8884
  if ((_step5 = _iterator5.n()).done) {
8821
- _context29.next = 9;
8885
+ _context30.next = 9;
8822
8886
  break;
8823
8887
  }
8824
8888
 
8825
8889
  userObject = _step5.value;
8826
8890
 
8827
8891
  if (userObject.id) {
8828
- _context29.next = 7;
8892
+ _context30.next = 7;
8829
8893
  break;
8830
8894
  }
8831
8895
 
8832
8896
  throw Error('User ID is required when updating a user');
8833
8897
 
8834
8898
  case 7:
8835
- _context29.next = 3;
8899
+ _context30.next = 3;
8836
8900
  break;
8837
8901
 
8838
8902
  case 9:
8839
- _context29.next = 14;
8903
+ _context30.next = 14;
8840
8904
  break;
8841
8905
 
8842
8906
  case 11:
8843
- _context29.prev = 11;
8844
- _context29.t0 = _context29["catch"](1);
8907
+ _context30.prev = 11;
8908
+ _context30.t0 = _context30["catch"](1);
8845
8909
 
8846
- _iterator5.e(_context29.t0);
8910
+ _iterator5.e(_context30.t0);
8847
8911
 
8848
8912
  case 14:
8849
- _context29.prev = 14;
8913
+ _context30.prev = 14;
8850
8914
 
8851
8915
  _iterator5.f();
8852
8916
 
8853
- return _context29.finish(14);
8917
+ return _context30.finish(14);
8854
8918
 
8855
8919
  case 17:
8856
- _context29.next = 19;
8920
+ _context30.next = 19;
8857
8921
  return this.patch(this.baseURL + '/users', {
8858
8922
  users: users
8859
8923
  });
8860
8924
 
8861
8925
  case 19:
8862
- return _context29.abrupt("return", _context29.sent);
8926
+ return _context30.abrupt("return", _context30.sent);
8863
8927
 
8864
8928
  case 20:
8865
8929
  case "end":
8866
- return _context29.stop();
8930
+ return _context30.stop();
8867
8931
  }
8868
8932
  }
8869
- }, _callee29, this, [[1, 11, 14, 17]]);
8933
+ }, _callee30, this, [[1, 11, 14, 17]]);
8870
8934
  }));
8871
8935
 
8872
- function partialUpdateUsers(_x31) {
8936
+ function partialUpdateUsers(_x32) {
8873
8937
  return _partialUpdateUsers.apply(this, arguments);
8874
8938
  }
8875
8939
 
@@ -8878,26 +8942,26 @@ var StreamChat = /*#__PURE__*/function () {
8878
8942
  }, {
8879
8943
  key: "deleteUser",
8880
8944
  value: function () {
8881
- var _deleteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(userID, params) {
8882
- return _regeneratorRuntime.wrap(function _callee30$(_context30) {
8945
+ var _deleteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(userID, params) {
8946
+ return _regeneratorRuntime.wrap(function _callee31$(_context31) {
8883
8947
  while (1) {
8884
- switch (_context30.prev = _context30.next) {
8948
+ switch (_context31.prev = _context31.next) {
8885
8949
  case 0:
8886
- _context30.next = 2;
8950
+ _context31.next = 2;
8887
8951
  return this.delete(this.baseURL + "/users/".concat(userID), params);
8888
8952
 
8889
8953
  case 2:
8890
- return _context30.abrupt("return", _context30.sent);
8954
+ return _context31.abrupt("return", _context31.sent);
8891
8955
 
8892
8956
  case 3:
8893
8957
  case "end":
8894
- return _context30.stop();
8958
+ return _context31.stop();
8895
8959
  }
8896
8960
  }
8897
- }, _callee30, this);
8961
+ }, _callee31, this);
8898
8962
  }));
8899
8963
 
8900
- function deleteUser(_x32, _x33) {
8964
+ function deleteUser(_x33, _x34) {
8901
8965
  return _deleteUser.apply(this, arguments);
8902
8966
  }
8903
8967
 
@@ -8914,28 +8978,28 @@ var StreamChat = /*#__PURE__*/function () {
8914
8978
  }, {
8915
8979
  key: "restoreUsers",
8916
8980
  value: function () {
8917
- var _restoreUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(user_ids) {
8918
- return _regeneratorRuntime.wrap(function _callee31$(_context31) {
8981
+ var _restoreUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(user_ids) {
8982
+ return _regeneratorRuntime.wrap(function _callee32$(_context32) {
8919
8983
  while (1) {
8920
- switch (_context31.prev = _context31.next) {
8984
+ switch (_context32.prev = _context32.next) {
8921
8985
  case 0:
8922
- _context31.next = 2;
8986
+ _context32.next = 2;
8923
8987
  return this.post(this.baseURL + "/users/restore", {
8924
8988
  user_ids: user_ids
8925
8989
  });
8926
8990
 
8927
8991
  case 2:
8928
- return _context31.abrupt("return", _context31.sent);
8992
+ return _context32.abrupt("return", _context32.sent);
8929
8993
 
8930
8994
  case 3:
8931
8995
  case "end":
8932
- return _context31.stop();
8996
+ return _context32.stop();
8933
8997
  }
8934
8998
  }
8935
- }, _callee31, this);
8999
+ }, _callee32, this);
8936
9000
  }));
8937
9001
 
8938
- function restoreUsers(_x34) {
9002
+ function restoreUsers(_x35) {
8939
9003
  return _restoreUsers.apply(this, arguments);
8940
9004
  }
8941
9005
 
@@ -8953,26 +9017,26 @@ var StreamChat = /*#__PURE__*/function () {
8953
9017
  }, {
8954
9018
  key: "reactivateUser",
8955
9019
  value: function () {
8956
- var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(userID, options) {
8957
- return _regeneratorRuntime.wrap(function _callee32$(_context32) {
9020
+ var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(userID, options) {
9021
+ return _regeneratorRuntime.wrap(function _callee33$(_context33) {
8958
9022
  while (1) {
8959
- switch (_context32.prev = _context32.next) {
9023
+ switch (_context33.prev = _context33.next) {
8960
9024
  case 0:
8961
- _context32.next = 2;
9025
+ _context33.next = 2;
8962
9026
  return this.post(this.baseURL + "/users/".concat(userID, "/reactivate"), _objectSpread({}, options));
8963
9027
 
8964
9028
  case 2:
8965
- return _context32.abrupt("return", _context32.sent);
9029
+ return _context33.abrupt("return", _context33.sent);
8966
9030
 
8967
9031
  case 3:
8968
9032
  case "end":
8969
- return _context32.stop();
9033
+ return _context33.stop();
8970
9034
  }
8971
9035
  }
8972
- }, _callee32, this);
9036
+ }, _callee33, this);
8973
9037
  }));
8974
9038
 
8975
- function reactivateUser(_x35, _x36) {
9039
+ function reactivateUser(_x36, _x37) {
8976
9040
  return _reactivateUser.apply(this, arguments);
8977
9041
  }
8978
9042
 
@@ -8990,28 +9054,28 @@ var StreamChat = /*#__PURE__*/function () {
8990
9054
  }, {
8991
9055
  key: "reactivateUsers",
8992
9056
  value: function () {
8993
- var _reactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(user_ids, options) {
8994
- return _regeneratorRuntime.wrap(function _callee33$(_context33) {
9057
+ var _reactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(user_ids, options) {
9058
+ return _regeneratorRuntime.wrap(function _callee34$(_context34) {
8995
9059
  while (1) {
8996
- switch (_context33.prev = _context33.next) {
9060
+ switch (_context34.prev = _context34.next) {
8997
9061
  case 0:
8998
- _context33.next = 2;
9062
+ _context34.next = 2;
8999
9063
  return this.post(this.baseURL + "/users/reactivate", _objectSpread({
9000
9064
  user_ids: user_ids
9001
9065
  }, options));
9002
9066
 
9003
9067
  case 2:
9004
- return _context33.abrupt("return", _context33.sent);
9068
+ return _context34.abrupt("return", _context34.sent);
9005
9069
 
9006
9070
  case 3:
9007
9071
  case "end":
9008
- return _context33.stop();
9072
+ return _context34.stop();
9009
9073
  }
9010
9074
  }
9011
- }, _callee33, this);
9075
+ }, _callee34, this);
9012
9076
  }));
9013
9077
 
9014
- function reactivateUsers(_x37, _x38) {
9078
+ function reactivateUsers(_x38, _x39) {
9015
9079
  return _reactivateUsers.apply(this, arguments);
9016
9080
  }
9017
9081
 
@@ -9029,26 +9093,26 @@ var StreamChat = /*#__PURE__*/function () {
9029
9093
  }, {
9030
9094
  key: "deactivateUser",
9031
9095
  value: function () {
9032
- var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(userID, options) {
9033
- return _regeneratorRuntime.wrap(function _callee34$(_context34) {
9096
+ var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(userID, options) {
9097
+ return _regeneratorRuntime.wrap(function _callee35$(_context35) {
9034
9098
  while (1) {
9035
- switch (_context34.prev = _context34.next) {
9099
+ switch (_context35.prev = _context35.next) {
9036
9100
  case 0:
9037
- _context34.next = 2;
9101
+ _context35.next = 2;
9038
9102
  return this.post(this.baseURL + "/users/".concat(userID, "/deactivate"), _objectSpread({}, options));
9039
9103
 
9040
9104
  case 2:
9041
- return _context34.abrupt("return", _context34.sent);
9105
+ return _context35.abrupt("return", _context35.sent);
9042
9106
 
9043
9107
  case 3:
9044
9108
  case "end":
9045
- return _context34.stop();
9109
+ return _context35.stop();
9046
9110
  }
9047
9111
  }
9048
- }, _callee34, this);
9112
+ }, _callee35, this);
9049
9113
  }));
9050
9114
 
9051
- function deactivateUser(_x39, _x40) {
9115
+ function deactivateUser(_x40, _x41) {
9052
9116
  return _deactivateUser.apply(this, arguments);
9053
9117
  }
9054
9118
 
@@ -9066,28 +9130,28 @@ var StreamChat = /*#__PURE__*/function () {
9066
9130
  }, {
9067
9131
  key: "deactivateUsers",
9068
9132
  value: function () {
9069
- var _deactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(user_ids, options) {
9070
- return _regeneratorRuntime.wrap(function _callee35$(_context35) {
9133
+ var _deactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(user_ids, options) {
9134
+ return _regeneratorRuntime.wrap(function _callee36$(_context36) {
9071
9135
  while (1) {
9072
- switch (_context35.prev = _context35.next) {
9136
+ switch (_context36.prev = _context36.next) {
9073
9137
  case 0:
9074
- _context35.next = 2;
9138
+ _context36.next = 2;
9075
9139
  return this.post(this.baseURL + "/users/deactivate", _objectSpread({
9076
9140
  user_ids: user_ids
9077
9141
  }, options));
9078
9142
 
9079
9143
  case 2:
9080
- return _context35.abrupt("return", _context35.sent);
9144
+ return _context36.abrupt("return", _context36.sent);
9081
9145
 
9082
9146
  case 3:
9083
9147
  case "end":
9084
- return _context35.stop();
9148
+ return _context36.stop();
9085
9149
  }
9086
9150
  }
9087
- }, _callee35, this);
9151
+ }, _callee36, this);
9088
9152
  }));
9089
9153
 
9090
- function deactivateUsers(_x41, _x42) {
9154
+ function deactivateUsers(_x42, _x43) {
9091
9155
  return _deactivateUsers.apply(this, arguments);
9092
9156
  }
9093
9157
 
@@ -9096,26 +9160,26 @@ var StreamChat = /*#__PURE__*/function () {
9096
9160
  }, {
9097
9161
  key: "exportUser",
9098
9162
  value: function () {
9099
- var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(userID, options) {
9100
- return _regeneratorRuntime.wrap(function _callee36$(_context36) {
9163
+ var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(userID, options) {
9164
+ return _regeneratorRuntime.wrap(function _callee37$(_context37) {
9101
9165
  while (1) {
9102
- switch (_context36.prev = _context36.next) {
9166
+ switch (_context37.prev = _context37.next) {
9103
9167
  case 0:
9104
- _context36.next = 2;
9168
+ _context37.next = 2;
9105
9169
  return this.get(this.baseURL + "/users/".concat(userID, "/export"), _objectSpread({}, options));
9106
9170
 
9107
9171
  case 2:
9108
- return _context36.abrupt("return", _context36.sent);
9172
+ return _context37.abrupt("return", _context37.sent);
9109
9173
 
9110
9174
  case 3:
9111
9175
  case "end":
9112
- return _context36.stop();
9176
+ return _context37.stop();
9113
9177
  }
9114
9178
  }
9115
- }, _callee36, this);
9179
+ }, _callee37, this);
9116
9180
  }));
9117
9181
 
9118
- function exportUser(_x43, _x44) {
9182
+ function exportUser(_x44, _x45) {
9119
9183
  return _exportUser.apply(this, arguments);
9120
9184
  }
9121
9185
 
@@ -9131,28 +9195,28 @@ var StreamChat = /*#__PURE__*/function () {
9131
9195
  }, {
9132
9196
  key: "banUser",
9133
9197
  value: function () {
9134
- var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(targetUserID, options) {
9135
- return _regeneratorRuntime.wrap(function _callee37$(_context37) {
9198
+ var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(targetUserID, options) {
9199
+ return _regeneratorRuntime.wrap(function _callee38$(_context38) {
9136
9200
  while (1) {
9137
- switch (_context37.prev = _context37.next) {
9201
+ switch (_context38.prev = _context38.next) {
9138
9202
  case 0:
9139
- _context37.next = 2;
9203
+ _context38.next = 2;
9140
9204
  return this.post(this.baseURL + '/moderation/ban', _objectSpread({
9141
9205
  target_user_id: targetUserID
9142
9206
  }, options));
9143
9207
 
9144
9208
  case 2:
9145
- return _context37.abrupt("return", _context37.sent);
9209
+ return _context38.abrupt("return", _context38.sent);
9146
9210
 
9147
9211
  case 3:
9148
9212
  case "end":
9149
- return _context37.stop();
9213
+ return _context38.stop();
9150
9214
  }
9151
9215
  }
9152
- }, _callee37, this);
9216
+ }, _callee38, this);
9153
9217
  }));
9154
9218
 
9155
- function banUser(_x45, _x46) {
9219
+ function banUser(_x46, _x47) {
9156
9220
  return _banUser.apply(this, arguments);
9157
9221
  }
9158
9222
 
@@ -9168,28 +9232,28 @@ var StreamChat = /*#__PURE__*/function () {
9168
9232
  }, {
9169
9233
  key: "unbanUser",
9170
9234
  value: function () {
9171
- var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(targetUserID, options) {
9172
- return _regeneratorRuntime.wrap(function _callee38$(_context38) {
9235
+ var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(targetUserID, options) {
9236
+ return _regeneratorRuntime.wrap(function _callee39$(_context39) {
9173
9237
  while (1) {
9174
- switch (_context38.prev = _context38.next) {
9238
+ switch (_context39.prev = _context39.next) {
9175
9239
  case 0:
9176
- _context38.next = 2;
9240
+ _context39.next = 2;
9177
9241
  return this.delete(this.baseURL + '/moderation/ban', _objectSpread({
9178
9242
  target_user_id: targetUserID
9179
9243
  }, options));
9180
9244
 
9181
9245
  case 2:
9182
- return _context38.abrupt("return", _context38.sent);
9246
+ return _context39.abrupt("return", _context39.sent);
9183
9247
 
9184
9248
  case 3:
9185
9249
  case "end":
9186
- return _context38.stop();
9250
+ return _context39.stop();
9187
9251
  }
9188
9252
  }
9189
- }, _callee38, this);
9253
+ }, _callee39, this);
9190
9254
  }));
9191
9255
 
9192
- function unbanUser(_x47, _x48) {
9256
+ function unbanUser(_x48, _x49) {
9193
9257
  return _unbanUser.apply(this, arguments);
9194
9258
  }
9195
9259
 
@@ -9205,28 +9269,28 @@ var StreamChat = /*#__PURE__*/function () {
9205
9269
  }, {
9206
9270
  key: "shadowBan",
9207
9271
  value: function () {
9208
- var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(targetUserID, options) {
9209
- return _regeneratorRuntime.wrap(function _callee39$(_context39) {
9272
+ var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(targetUserID, options) {
9273
+ return _regeneratorRuntime.wrap(function _callee40$(_context40) {
9210
9274
  while (1) {
9211
- switch (_context39.prev = _context39.next) {
9275
+ switch (_context40.prev = _context40.next) {
9212
9276
  case 0:
9213
- _context39.next = 2;
9277
+ _context40.next = 2;
9214
9278
  return this.banUser(targetUserID, _objectSpread({
9215
9279
  shadow: true
9216
9280
  }, options));
9217
9281
 
9218
9282
  case 2:
9219
- return _context39.abrupt("return", _context39.sent);
9283
+ return _context40.abrupt("return", _context40.sent);
9220
9284
 
9221
9285
  case 3:
9222
9286
  case "end":
9223
- return _context39.stop();
9287
+ return _context40.stop();
9224
9288
  }
9225
9289
  }
9226
- }, _callee39, this);
9290
+ }, _callee40, this);
9227
9291
  }));
9228
9292
 
9229
- function shadowBan(_x49, _x50) {
9293
+ function shadowBan(_x50, _x51) {
9230
9294
  return _shadowBan.apply(this, arguments);
9231
9295
  }
9232
9296
 
@@ -9242,28 +9306,28 @@ var StreamChat = /*#__PURE__*/function () {
9242
9306
  }, {
9243
9307
  key: "removeShadowBan",
9244
9308
  value: function () {
9245
- var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(targetUserID, options) {
9246
- return _regeneratorRuntime.wrap(function _callee40$(_context40) {
9309
+ var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(targetUserID, options) {
9310
+ return _regeneratorRuntime.wrap(function _callee41$(_context41) {
9247
9311
  while (1) {
9248
- switch (_context40.prev = _context40.next) {
9312
+ switch (_context41.prev = _context41.next) {
9249
9313
  case 0:
9250
- _context40.next = 2;
9314
+ _context41.next = 2;
9251
9315
  return this.unbanUser(targetUserID, _objectSpread({
9252
9316
  shadow: true
9253
9317
  }, options));
9254
9318
 
9255
9319
  case 2:
9256
- return _context40.abrupt("return", _context40.sent);
9320
+ return _context41.abrupt("return", _context41.sent);
9257
9321
 
9258
9322
  case 3:
9259
9323
  case "end":
9260
- return _context40.stop();
9324
+ return _context41.stop();
9261
9325
  }
9262
9326
  }
9263
- }, _callee40, this);
9327
+ }, _callee41, this);
9264
9328
  }));
9265
9329
 
9266
- function removeShadowBan(_x51, _x52) {
9330
+ function removeShadowBan(_x52, _x53) {
9267
9331
  return _removeShadowBan.apply(this, arguments);
9268
9332
  }
9269
9333
 
@@ -9280,15 +9344,15 @@ var StreamChat = /*#__PURE__*/function () {
9280
9344
  }, {
9281
9345
  key: "muteUser",
9282
9346
  value: function () {
9283
- var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(targetID, userID) {
9347
+ var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(targetID, userID) {
9284
9348
  var options,
9285
- _args41 = arguments;
9286
- return _regeneratorRuntime.wrap(function _callee41$(_context41) {
9349
+ _args42 = arguments;
9350
+ return _regeneratorRuntime.wrap(function _callee42$(_context42) {
9287
9351
  while (1) {
9288
- switch (_context41.prev = _context41.next) {
9352
+ switch (_context42.prev = _context42.next) {
9289
9353
  case 0:
9290
- options = _args41.length > 2 && _args41[2] !== undefined ? _args41[2] : {};
9291
- _context41.next = 3;
9354
+ options = _args42.length > 2 && _args42[2] !== undefined ? _args42[2] : {};
9355
+ _context42.next = 3;
9292
9356
  return this.post(this.baseURL + '/moderation/mute', _objectSpread(_objectSpread({
9293
9357
  target_id: targetID
9294
9358
  }, userID ? {
@@ -9296,17 +9360,17 @@ var StreamChat = /*#__PURE__*/function () {
9296
9360
  } : {}), options));
9297
9361
 
9298
9362
  case 3:
9299
- return _context41.abrupt("return", _context41.sent);
9363
+ return _context42.abrupt("return", _context42.sent);
9300
9364
 
9301
9365
  case 4:
9302
9366
  case "end":
9303
- return _context41.stop();
9367
+ return _context42.stop();
9304
9368
  }
9305
9369
  }
9306
- }, _callee41, this);
9370
+ }, _callee42, this);
9307
9371
  }));
9308
9372
 
9309
- function muteUser(_x53, _x54) {
9373
+ function muteUser(_x54, _x55) {
9310
9374
  return _muteUser.apply(this, arguments);
9311
9375
  }
9312
9376
 
@@ -9322,12 +9386,12 @@ var StreamChat = /*#__PURE__*/function () {
9322
9386
  }, {
9323
9387
  key: "unmuteUser",
9324
9388
  value: function () {
9325
- var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(targetID, currentUserID) {
9326
- return _regeneratorRuntime.wrap(function _callee42$(_context42) {
9389
+ var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(targetID, currentUserID) {
9390
+ return _regeneratorRuntime.wrap(function _callee43$(_context43) {
9327
9391
  while (1) {
9328
- switch (_context42.prev = _context42.next) {
9392
+ switch (_context43.prev = _context43.next) {
9329
9393
  case 0:
9330
- _context42.next = 2;
9394
+ _context43.next = 2;
9331
9395
  return this.post(this.baseURL + '/moderation/unmute', _objectSpread({
9332
9396
  target_id: targetID
9333
9397
  }, currentUserID ? {
@@ -9335,17 +9399,17 @@ var StreamChat = /*#__PURE__*/function () {
9335
9399
  } : {}));
9336
9400
 
9337
9401
  case 2:
9338
- return _context42.abrupt("return", _context42.sent);
9402
+ return _context43.abrupt("return", _context43.sent);
9339
9403
 
9340
9404
  case 3:
9341
9405
  case "end":
9342
- return _context42.stop();
9406
+ return _context43.stop();
9343
9407
  }
9344
9408
  }
9345
- }, _callee42, this);
9409
+ }, _callee43, this);
9346
9410
  }));
9347
9411
 
9348
- function unmuteUser(_x55, _x56) {
9412
+ function unmuteUser(_x56, _x57) {
9349
9413
  return _unmuteUser.apply(this, arguments);
9350
9414
  }
9351
9415
 
@@ -9380,31 +9444,31 @@ var StreamChat = /*#__PURE__*/function () {
9380
9444
  }, {
9381
9445
  key: "flagMessage",
9382
9446
  value: function () {
9383
- var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(targetMessageID) {
9447
+ var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(targetMessageID) {
9384
9448
  var options,
9385
- _args43 = arguments;
9386
- return _regeneratorRuntime.wrap(function _callee43$(_context43) {
9449
+ _args44 = arguments;
9450
+ return _regeneratorRuntime.wrap(function _callee44$(_context44) {
9387
9451
  while (1) {
9388
- switch (_context43.prev = _context43.next) {
9452
+ switch (_context44.prev = _context44.next) {
9389
9453
  case 0:
9390
- options = _args43.length > 1 && _args43[1] !== undefined ? _args43[1] : {};
9391
- _context43.next = 3;
9454
+ options = _args44.length > 1 && _args44[1] !== undefined ? _args44[1] : {};
9455
+ _context44.next = 3;
9392
9456
  return this.post(this.baseURL + '/moderation/flag', _objectSpread({
9393
9457
  target_message_id: targetMessageID
9394
9458
  }, options));
9395
9459
 
9396
9460
  case 3:
9397
- return _context43.abrupt("return", _context43.sent);
9461
+ return _context44.abrupt("return", _context44.sent);
9398
9462
 
9399
9463
  case 4:
9400
9464
  case "end":
9401
- return _context43.stop();
9465
+ return _context44.stop();
9402
9466
  }
9403
9467
  }
9404
- }, _callee43, this);
9468
+ }, _callee44, this);
9405
9469
  }));
9406
9470
 
9407
- function flagMessage(_x57) {
9471
+ function flagMessage(_x58) {
9408
9472
  return _flagMessage.apply(this, arguments);
9409
9473
  }
9410
9474
 
@@ -9420,31 +9484,31 @@ var StreamChat = /*#__PURE__*/function () {
9420
9484
  }, {
9421
9485
  key: "flagUser",
9422
9486
  value: function () {
9423
- var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(targetID) {
9487
+ var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(targetID) {
9424
9488
  var options,
9425
- _args44 = arguments;
9426
- return _regeneratorRuntime.wrap(function _callee44$(_context44) {
9489
+ _args45 = arguments;
9490
+ return _regeneratorRuntime.wrap(function _callee45$(_context45) {
9427
9491
  while (1) {
9428
- switch (_context44.prev = _context44.next) {
9492
+ switch (_context45.prev = _context45.next) {
9429
9493
  case 0:
9430
- options = _args44.length > 1 && _args44[1] !== undefined ? _args44[1] : {};
9431
- _context44.next = 3;
9494
+ options = _args45.length > 1 && _args45[1] !== undefined ? _args45[1] : {};
9495
+ _context45.next = 3;
9432
9496
  return this.post(this.baseURL + '/moderation/flag', _objectSpread({
9433
9497
  target_user_id: targetID
9434
9498
  }, options));
9435
9499
 
9436
9500
  case 3:
9437
- return _context44.abrupt("return", _context44.sent);
9501
+ return _context45.abrupt("return", _context45.sent);
9438
9502
 
9439
9503
  case 4:
9440
9504
  case "end":
9441
- return _context44.stop();
9505
+ return _context45.stop();
9442
9506
  }
9443
9507
  }
9444
- }, _callee44, this);
9508
+ }, _callee45, this);
9445
9509
  }));
9446
9510
 
9447
- function flagUser(_x58) {
9511
+ function flagUser(_x59) {
9448
9512
  return _flagUser.apply(this, arguments);
9449
9513
  }
9450
9514
 
@@ -9460,31 +9524,31 @@ var StreamChat = /*#__PURE__*/function () {
9460
9524
  }, {
9461
9525
  key: "unflagMessage",
9462
9526
  value: function () {
9463
- var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(targetMessageID) {
9527
+ var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(targetMessageID) {
9464
9528
  var options,
9465
- _args45 = arguments;
9466
- return _regeneratorRuntime.wrap(function _callee45$(_context45) {
9529
+ _args46 = arguments;
9530
+ return _regeneratorRuntime.wrap(function _callee46$(_context46) {
9467
9531
  while (1) {
9468
- switch (_context45.prev = _context45.next) {
9532
+ switch (_context46.prev = _context46.next) {
9469
9533
  case 0:
9470
- options = _args45.length > 1 && _args45[1] !== undefined ? _args45[1] : {};
9471
- _context45.next = 3;
9534
+ options = _args46.length > 1 && _args46[1] !== undefined ? _args46[1] : {};
9535
+ _context46.next = 3;
9472
9536
  return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
9473
9537
  target_message_id: targetMessageID
9474
9538
  }, options));
9475
9539
 
9476
9540
  case 3:
9477
- return _context45.abrupt("return", _context45.sent);
9541
+ return _context46.abrupt("return", _context46.sent);
9478
9542
 
9479
9543
  case 4:
9480
9544
  case "end":
9481
- return _context45.stop();
9545
+ return _context46.stop();
9482
9546
  }
9483
9547
  }
9484
- }, _callee45, this);
9548
+ }, _callee46, this);
9485
9549
  }));
9486
9550
 
9487
- function unflagMessage(_x59) {
9551
+ function unflagMessage(_x60) {
9488
9552
  return _unflagMessage.apply(this, arguments);
9489
9553
  }
9490
9554
 
@@ -9500,31 +9564,31 @@ var StreamChat = /*#__PURE__*/function () {
9500
9564
  }, {
9501
9565
  key: "unflagUser",
9502
9566
  value: function () {
9503
- var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(targetID) {
9567
+ var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(targetID) {
9504
9568
  var options,
9505
- _args46 = arguments;
9506
- return _regeneratorRuntime.wrap(function _callee46$(_context46) {
9569
+ _args47 = arguments;
9570
+ return _regeneratorRuntime.wrap(function _callee47$(_context47) {
9507
9571
  while (1) {
9508
- switch (_context46.prev = _context46.next) {
9572
+ switch (_context47.prev = _context47.next) {
9509
9573
  case 0:
9510
- options = _args46.length > 1 && _args46[1] !== undefined ? _args46[1] : {};
9511
- _context46.next = 3;
9574
+ options = _args47.length > 1 && _args47[1] !== undefined ? _args47[1] : {};
9575
+ _context47.next = 3;
9512
9576
  return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
9513
9577
  target_user_id: targetID
9514
9578
  }, options));
9515
9579
 
9516
9580
  case 3:
9517
- return _context46.abrupt("return", _context46.sent);
9581
+ return _context47.abrupt("return", _context47.sent);
9518
9582
 
9519
9583
  case 4:
9520
9584
  case "end":
9521
- return _context46.stop();
9585
+ return _context47.stop();
9522
9586
  }
9523
9587
  }
9524
- }, _callee46, this);
9588
+ }, _callee47, this);
9525
9589
  }));
9526
9590
 
9527
- function unflagUser(_x60) {
9591
+ function unflagUser(_x61) {
9528
9592
  return _unflagUser.apply(this, arguments);
9529
9593
  }
9530
9594
 
@@ -9541,29 +9605,29 @@ var StreamChat = /*#__PURE__*/function () {
9541
9605
  }, {
9542
9606
  key: "getCallToken",
9543
9607
  value: function () {
9544
- var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(callID) {
9608
+ var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(callID) {
9545
9609
  var options,
9546
- _args47 = arguments;
9547
- return _regeneratorRuntime.wrap(function _callee47$(_context47) {
9610
+ _args48 = arguments;
9611
+ return _regeneratorRuntime.wrap(function _callee48$(_context48) {
9548
9612
  while (1) {
9549
- switch (_context47.prev = _context47.next) {
9613
+ switch (_context48.prev = _context48.next) {
9550
9614
  case 0:
9551
- options = _args47.length > 1 && _args47[1] !== undefined ? _args47[1] : {};
9552
- _context47.next = 3;
9615
+ options = _args48.length > 1 && _args48[1] !== undefined ? _args48[1] : {};
9616
+ _context48.next = 3;
9553
9617
  return this.post(this.baseURL + "/calls/".concat(callID), _objectSpread({}, options));
9554
9618
 
9555
9619
  case 3:
9556
- return _context47.abrupt("return", _context47.sent);
9620
+ return _context48.abrupt("return", _context48.sent);
9557
9621
 
9558
9622
  case 4:
9559
9623
  case "end":
9560
- return _context47.stop();
9624
+ return _context48.stop();
9561
9625
  }
9562
9626
  }
9563
- }, _callee47, this);
9627
+ }, _callee48, this);
9564
9628
  }));
9565
9629
 
9566
- function getCallToken(_x61) {
9630
+ function getCallToken(_x62) {
9567
9631
  return _getCallToken.apply(this, arguments);
9568
9632
  }
9569
9633
 
@@ -9586,30 +9650,30 @@ var StreamChat = /*#__PURE__*/function () {
9586
9650
  }, {
9587
9651
  key: "_queryFlags",
9588
9652
  value: function () {
9589
- var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48() {
9653
+ var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49() {
9590
9654
  var filterConditions,
9591
9655
  options,
9592
- _args48 = arguments;
9593
- return _regeneratorRuntime.wrap(function _callee48$(_context48) {
9656
+ _args49 = arguments;
9657
+ return _regeneratorRuntime.wrap(function _callee49$(_context49) {
9594
9658
  while (1) {
9595
- switch (_context48.prev = _context48.next) {
9659
+ switch (_context49.prev = _context49.next) {
9596
9660
  case 0:
9597
- filterConditions = _args48.length > 0 && _args48[0] !== undefined ? _args48[0] : {};
9598
- options = _args48.length > 1 && _args48[1] !== undefined ? _args48[1] : {};
9599
- _context48.next = 4;
9661
+ filterConditions = _args49.length > 0 && _args49[0] !== undefined ? _args49[0] : {};
9662
+ options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
9663
+ _context49.next = 4;
9600
9664
  return this.post(this.baseURL + '/moderation/flags', _objectSpread({
9601
9665
  filter_conditions: filterConditions
9602
9666
  }, options));
9603
9667
 
9604
9668
  case 4:
9605
- return _context48.abrupt("return", _context48.sent);
9669
+ return _context49.abrupt("return", _context49.sent);
9606
9670
 
9607
9671
  case 5:
9608
9672
  case "end":
9609
- return _context48.stop();
9673
+ return _context49.stop();
9610
9674
  }
9611
9675
  }
9612
- }, _callee48, this);
9676
+ }, _callee49, this);
9613
9677
  }));
9614
9678
 
9615
9679
  function _queryFlags() {
@@ -9635,30 +9699,30 @@ var StreamChat = /*#__PURE__*/function () {
9635
9699
  }, {
9636
9700
  key: "_queryFlagReports",
9637
9701
  value: function () {
9638
- var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49() {
9702
+ var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50() {
9639
9703
  var filterConditions,
9640
9704
  options,
9641
- _args49 = arguments;
9642
- return _regeneratorRuntime.wrap(function _callee49$(_context49) {
9705
+ _args50 = arguments;
9706
+ return _regeneratorRuntime.wrap(function _callee50$(_context50) {
9643
9707
  while (1) {
9644
- switch (_context49.prev = _context49.next) {
9708
+ switch (_context50.prev = _context50.next) {
9645
9709
  case 0:
9646
- filterConditions = _args49.length > 0 && _args49[0] !== undefined ? _args49[0] : {};
9647
- options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
9648
- _context49.next = 4;
9710
+ filterConditions = _args50.length > 0 && _args50[0] !== undefined ? _args50[0] : {};
9711
+ options = _args50.length > 1 && _args50[1] !== undefined ? _args50[1] : {};
9712
+ _context50.next = 4;
9649
9713
  return this.post(this.baseURL + '/moderation/reports', _objectSpread({
9650
9714
  filter_conditions: filterConditions
9651
9715
  }, options));
9652
9716
 
9653
9717
  case 4:
9654
- return _context49.abrupt("return", _context49.sent);
9718
+ return _context50.abrupt("return", _context50.sent);
9655
9719
 
9656
9720
  case 5:
9657
9721
  case "end":
9658
- return _context49.stop();
9722
+ return _context50.stop();
9659
9723
  }
9660
9724
  }
9661
- }, _callee49, this);
9725
+ }, _callee50, this);
9662
9726
  }));
9663
9727
 
9664
9728
  function _queryFlagReports() {
@@ -9685,31 +9749,31 @@ var StreamChat = /*#__PURE__*/function () {
9685
9749
  }, {
9686
9750
  key: "_reviewFlagReport",
9687
9751
  value: function () {
9688
- var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(id, reviewResult) {
9752
+ var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(id, reviewResult) {
9689
9753
  var options,
9690
- _args50 = arguments;
9691
- return _regeneratorRuntime.wrap(function _callee50$(_context50) {
9754
+ _args51 = arguments;
9755
+ return _regeneratorRuntime.wrap(function _callee51$(_context51) {
9692
9756
  while (1) {
9693
- switch (_context50.prev = _context50.next) {
9757
+ switch (_context51.prev = _context51.next) {
9694
9758
  case 0:
9695
- options = _args50.length > 2 && _args50[2] !== undefined ? _args50[2] : {};
9696
- _context50.next = 3;
9759
+ options = _args51.length > 2 && _args51[2] !== undefined ? _args51[2] : {};
9760
+ _context51.next = 3;
9697
9761
  return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
9698
9762
  review_result: reviewResult
9699
9763
  }, options));
9700
9764
 
9701
9765
  case 3:
9702
- return _context50.abrupt("return", _context50.sent);
9766
+ return _context51.abrupt("return", _context51.sent);
9703
9767
 
9704
9768
  case 4:
9705
9769
  case "end":
9706
- return _context50.stop();
9770
+ return _context51.stop();
9707
9771
  }
9708
9772
  }
9709
- }, _callee50, this);
9773
+ }, _callee51, this);
9710
9774
  }));
9711
9775
 
9712
- function _reviewFlagReport(_x62, _x63) {
9776
+ function _reviewFlagReport(_x63, _x64) {
9713
9777
  return _reviewFlagReport2.apply(this, arguments);
9714
9778
  }
9715
9779
 
@@ -9727,31 +9791,31 @@ var StreamChat = /*#__PURE__*/function () {
9727
9791
  }, {
9728
9792
  key: "unblockMessage",
9729
9793
  value: function () {
9730
- var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(targetMessageID) {
9794
+ var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(targetMessageID) {
9731
9795
  var options,
9732
- _args51 = arguments;
9733
- return _regeneratorRuntime.wrap(function _callee51$(_context51) {
9796
+ _args52 = arguments;
9797
+ return _regeneratorRuntime.wrap(function _callee52$(_context52) {
9734
9798
  while (1) {
9735
- switch (_context51.prev = _context51.next) {
9799
+ switch (_context52.prev = _context52.next) {
9736
9800
  case 0:
9737
- options = _args51.length > 1 && _args51[1] !== undefined ? _args51[1] : {};
9738
- _context51.next = 3;
9801
+ options = _args52.length > 1 && _args52[1] !== undefined ? _args52[1] : {};
9802
+ _context52.next = 3;
9739
9803
  return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
9740
9804
  target_message_id: targetMessageID
9741
9805
  }, options));
9742
9806
 
9743
9807
  case 3:
9744
- return _context51.abrupt("return", _context51.sent);
9808
+ return _context52.abrupt("return", _context52.sent);
9745
9809
 
9746
9810
  case 4:
9747
9811
  case "end":
9748
- return _context51.stop();
9812
+ return _context52.stop();
9749
9813
  }
9750
9814
  }
9751
- }, _callee51, this);
9815
+ }, _callee52, this);
9752
9816
  }));
9753
9817
 
9754
- function unblockMessage(_x64) {
9818
+ function unblockMessage(_x65) {
9755
9819
  return _unblockMessage.apply(this, arguments);
9756
9820
  }
9757
9821
 
@@ -9770,23 +9834,23 @@ var StreamChat = /*#__PURE__*/function () {
9770
9834
  * @return {Promise<APIResponse>}
9771
9835
  */
9772
9836
  function () {
9773
- var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52() {
9837
+ var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53() {
9774
9838
  var data,
9775
- _args52 = arguments;
9776
- return _regeneratorRuntime.wrap(function _callee52$(_context52) {
9839
+ _args53 = arguments;
9840
+ return _regeneratorRuntime.wrap(function _callee53$(_context53) {
9777
9841
  while (1) {
9778
- switch (_context52.prev = _context52.next) {
9842
+ switch (_context53.prev = _context53.next) {
9779
9843
  case 0:
9780
- data = _args52.length > 0 && _args52[0] !== undefined ? _args52[0] : {};
9781
- _context52.next = 3;
9844
+ data = _args53.length > 0 && _args53[0] !== undefined ? _args53[0] : {};
9845
+ _context53.next = 3;
9782
9846
  return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
9783
9847
 
9784
9848
  case 3:
9785
9849
  case "end":
9786
- return _context52.stop();
9850
+ return _context53.stop();
9787
9851
  }
9788
9852
  }
9789
- }, _callee52, this);
9853
+ }, _callee53, this);
9790
9854
  }));
9791
9855
 
9792
9856
  function markChannelsRead() {
@@ -9861,28 +9925,28 @@ var StreamChat = /*#__PURE__*/function () {
9861
9925
  }, {
9862
9926
  key: "translateMessage",
9863
9927
  value: function () {
9864
- var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(messageId, language) {
9865
- return _regeneratorRuntime.wrap(function _callee53$(_context53) {
9928
+ var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(messageId, language) {
9929
+ return _regeneratorRuntime.wrap(function _callee54$(_context54) {
9866
9930
  while (1) {
9867
- switch (_context53.prev = _context53.next) {
9931
+ switch (_context54.prev = _context54.next) {
9868
9932
  case 0:
9869
- _context53.next = 2;
9933
+ _context54.next = 2;
9870
9934
  return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
9871
9935
  language: language
9872
9936
  });
9873
9937
 
9874
9938
  case 2:
9875
- return _context53.abrupt("return", _context53.sent);
9939
+ return _context54.abrupt("return", _context54.sent);
9876
9940
 
9877
9941
  case 3:
9878
9942
  case "end":
9879
- return _context53.stop();
9943
+ return _context54.stop();
9880
9944
  }
9881
9945
  }
9882
- }, _callee53, this);
9946
+ }, _callee54, this);
9883
9947
  }));
9884
9948
 
9885
- function translateMessage(_x65, _x66) {
9949
+ function translateMessage(_x66, _x67) {
9886
9950
  return _translateMessage.apply(this, arguments);
9887
9951
  }
9888
9952
 
@@ -9984,14 +10048,14 @@ var StreamChat = /*#__PURE__*/function () {
9984
10048
  }, {
9985
10049
  key: "updateMessage",
9986
10050
  value: function () {
9987
- var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(message, userId, options) {
10051
+ var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(message, userId, options) {
9988
10052
  var clonedMessage, reservedMessageFields;
9989
- return _regeneratorRuntime.wrap(function _callee54$(_context54) {
10053
+ return _regeneratorRuntime.wrap(function _callee55$(_context55) {
9990
10054
  while (1) {
9991
- switch (_context54.prev = _context54.next) {
10055
+ switch (_context55.prev = _context55.next) {
9992
10056
  case 0:
9993
10057
  if (message.id) {
9994
- _context54.next = 2;
10058
+ _context55.next = 2;
9995
10059
  break;
9996
10060
  }
9997
10061
 
@@ -10028,23 +10092,23 @@ var StreamChat = /*#__PURE__*/function () {
10028
10092
  });
10029
10093
  }
10030
10094
 
10031
- _context54.next = 10;
10095
+ _context55.next = 10;
10032
10096
  return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
10033
10097
  message: clonedMessage
10034
10098
  }, options));
10035
10099
 
10036
10100
  case 10:
10037
- return _context54.abrupt("return", _context54.sent);
10101
+ return _context55.abrupt("return", _context55.sent);
10038
10102
 
10039
10103
  case 11:
10040
10104
  case "end":
10041
- return _context54.stop();
10105
+ return _context55.stop();
10042
10106
  }
10043
10107
  }
10044
- }, _callee54, this);
10108
+ }, _callee55, this);
10045
10109
  }));
10046
10110
 
10047
- function updateMessage(_x67, _x68, _x69) {
10111
+ function updateMessage(_x68, _x69, _x70) {
10048
10112
  return _updateMessage.apply(this, arguments);
10049
10113
  }
10050
10114
 
@@ -10067,14 +10131,14 @@ var StreamChat = /*#__PURE__*/function () {
10067
10131
  }, {
10068
10132
  key: "partialUpdateMessage",
10069
10133
  value: function () {
10070
- var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(id, partialMessageObject, userId, options) {
10134
+ var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(id, partialMessageObject, userId, options) {
10071
10135
  var user;
10072
- return _regeneratorRuntime.wrap(function _callee55$(_context55) {
10136
+ return _regeneratorRuntime.wrap(function _callee56$(_context56) {
10073
10137
  while (1) {
10074
- switch (_context55.prev = _context55.next) {
10138
+ switch (_context56.prev = _context56.next) {
10075
10139
  case 0:
10076
10140
  if (id) {
10077
- _context55.next = 2;
10141
+ _context56.next = 2;
10078
10142
  break;
10079
10143
  }
10080
10144
 
@@ -10089,23 +10153,23 @@ var StreamChat = /*#__PURE__*/function () {
10089
10153
  };
10090
10154
  }
10091
10155
 
10092
- _context55.next = 6;
10156
+ _context56.next = 6;
10093
10157
  return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
10094
10158
  user: user
10095
10159
  }));
10096
10160
 
10097
10161
  case 6:
10098
- return _context55.abrupt("return", _context55.sent);
10162
+ return _context56.abrupt("return", _context56.sent);
10099
10163
 
10100
10164
  case 7:
10101
10165
  case "end":
10102
- return _context55.stop();
10166
+ return _context56.stop();
10103
10167
  }
10104
10168
  }
10105
- }, _callee55, this);
10169
+ }, _callee56, this);
10106
10170
  }));
10107
10171
 
10108
- function partialUpdateMessage(_x70, _x71, _x72, _x73) {
10172
+ function partialUpdateMessage(_x71, _x72, _x73, _x74) {
10109
10173
  return _partialUpdateMessage.apply(this, arguments);
10110
10174
  }
10111
10175
 
@@ -10114,11 +10178,11 @@ var StreamChat = /*#__PURE__*/function () {
10114
10178
  }, {
10115
10179
  key: "deleteMessage",
10116
10180
  value: function () {
10117
- var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(messageID, hardDelete) {
10181
+ var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(messageID, hardDelete) {
10118
10182
  var params;
10119
- return _regeneratorRuntime.wrap(function _callee56$(_context56) {
10183
+ return _regeneratorRuntime.wrap(function _callee57$(_context57) {
10120
10184
  while (1) {
10121
- switch (_context56.prev = _context56.next) {
10185
+ switch (_context57.prev = _context57.next) {
10122
10186
  case 0:
10123
10187
  params = {};
10124
10188
 
@@ -10128,21 +10192,21 @@ var StreamChat = /*#__PURE__*/function () {
10128
10192
  };
10129
10193
  }
10130
10194
 
10131
- _context56.next = 4;
10195
+ _context57.next = 4;
10132
10196
  return this.delete(this.baseURL + "/messages/".concat(messageID), params);
10133
10197
 
10134
10198
  case 4:
10135
- return _context56.abrupt("return", _context56.sent);
10199
+ return _context57.abrupt("return", _context57.sent);
10136
10200
 
10137
10201
  case 5:
10138
10202
  case "end":
10139
- return _context56.stop();
10203
+ return _context57.stop();
10140
10204
  }
10141
10205
  }
10142
- }, _callee56, this);
10206
+ }, _callee57, this);
10143
10207
  }));
10144
10208
 
10145
- function deleteMessage(_x74, _x75) {
10209
+ function deleteMessage(_x75, _x76) {
10146
10210
  return _deleteMessage.apply(this, arguments);
10147
10211
  }
10148
10212
 
@@ -10151,26 +10215,26 @@ var StreamChat = /*#__PURE__*/function () {
10151
10215
  }, {
10152
10216
  key: "getMessage",
10153
10217
  value: function () {
10154
- var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(messageID) {
10155
- return _regeneratorRuntime.wrap(function _callee57$(_context57) {
10218
+ var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(messageID) {
10219
+ return _regeneratorRuntime.wrap(function _callee58$(_context58) {
10156
10220
  while (1) {
10157
- switch (_context57.prev = _context57.next) {
10221
+ switch (_context58.prev = _context58.next) {
10158
10222
  case 0:
10159
- _context57.next = 2;
10223
+ _context58.next = 2;
10160
10224
  return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)));
10161
10225
 
10162
10226
  case 2:
10163
- return _context57.abrupt("return", _context57.sent);
10227
+ return _context58.abrupt("return", _context58.sent);
10164
10228
 
10165
10229
  case 3:
10166
10230
  case "end":
10167
- return _context57.stop();
10231
+ return _context58.stop();
10168
10232
  }
10169
10233
  }
10170
- }, _callee57, this);
10234
+ }, _callee58, this);
10171
10235
  }));
10172
10236
 
10173
- function getMessage(_x76) {
10237
+ function getMessage(_x77) {
10174
10238
  return _getMessage.apply(this, arguments);
10175
10239
  }
10176
10240
 
@@ -10179,7 +10243,7 @@ var StreamChat = /*#__PURE__*/function () {
10179
10243
  }, {
10180
10244
  key: "getUserAgent",
10181
10245
  value: function getUserAgent() {
10182
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.14.5");
10246
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.15.0");
10183
10247
  }
10184
10248
  }, {
10185
10249
  key: "setUserAgent",
@@ -10398,28 +10462,28 @@ var StreamChat = /*#__PURE__*/function () {
10398
10462
  }, {
10399
10463
  key: "sendUserCustomEvent",
10400
10464
  value: function () {
10401
- var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(targetUserID, event) {
10402
- return _regeneratorRuntime.wrap(function _callee58$(_context58) {
10465
+ var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(targetUserID, event) {
10466
+ return _regeneratorRuntime.wrap(function _callee59$(_context59) {
10403
10467
  while (1) {
10404
- switch (_context58.prev = _context58.next) {
10468
+ switch (_context59.prev = _context59.next) {
10405
10469
  case 0:
10406
- _context58.next = 2;
10470
+ _context59.next = 2;
10407
10471
  return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
10408
10472
  event: event
10409
10473
  });
10410
10474
 
10411
10475
  case 2:
10412
- return _context58.abrupt("return", _context58.sent);
10476
+ return _context59.abrupt("return", _context59.sent);
10413
10477
 
10414
10478
  case 3:
10415
10479
  case "end":
10416
- return _context58.stop();
10480
+ return _context59.stop();
10417
10481
  }
10418
10482
  }
10419
- }, _callee58, this);
10483
+ }, _callee59, this);
10420
10484
  }));
10421
10485
 
10422
- function sendUserCustomEvent(_x77, _x78) {
10486
+ function sendUserCustomEvent(_x78, _x79) {
10423
10487
  return _sendUserCustomEvent.apply(this, arguments);
10424
10488
  }
10425
10489
 
@@ -10477,132 +10541,298 @@ var StreamChat = /*#__PURE__*/function () {
10477
10541
  return this.get("".concat(this.baseURL, "/export_channels/").concat(id));
10478
10542
  }
10479
10543
  /**
10480
- * createSegment - Creates a Campaign Segment
10544
+ * createSegment - Creates a segment
10481
10545
  *
10546
+ * @private
10547
+ * @param {SegmentType} type Segment type
10548
+ * @param {string} id Segment ID (valid UUID)
10549
+ * @param {string} name Segment name (valid UUID)
10482
10550
  * @param {SegmentData} params Segment data
10483
10551
  *
10484
- * @return {Segment} The Created Segment
10552
+ * @return {Segment} The created Segment
10485
10553
  */
10486
10554
 
10487
10555
  }, {
10488
10556
  key: "createSegment",
10489
10557
  value: function () {
10490
- var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(params) {
10491
- var _yield$this$post, segment;
10558
+ var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(type, id, name, data) {
10559
+ var body, _yield$this$post, segment;
10492
10560
 
10493
- return _regeneratorRuntime.wrap(function _callee59$(_context59) {
10561
+ return _regeneratorRuntime.wrap(function _callee60$(_context60) {
10494
10562
  while (1) {
10495
- switch (_context59.prev = _context59.next) {
10563
+ switch (_context60.prev = _context60.next) {
10496
10564
  case 0:
10497
- _context59.next = 2;
10498
- return this.post(this.baseURL + "/segments", {
10499
- segment: params
10500
- });
10565
+ body = {
10566
+ id: id,
10567
+ type: type,
10568
+ name: name,
10569
+ data: data
10570
+ };
10571
+ _context60.next = 3;
10572
+ return this.post(this.baseURL + "/segments", body);
10501
10573
 
10502
- case 2:
10503
- _yield$this$post = _context59.sent;
10574
+ case 3:
10575
+ _yield$this$post = _context60.sent;
10504
10576
  segment = _yield$this$post.segment;
10505
- return _context59.abrupt("return", segment);
10577
+ return _context60.abrupt("return", segment);
10506
10578
 
10507
- case 5:
10579
+ case 6:
10508
10580
  case "end":
10509
- return _context59.stop();
10581
+ return _context60.stop();
10510
10582
  }
10511
10583
  }
10512
- }, _callee59, this);
10584
+ }, _callee60, this);
10513
10585
  }));
10514
10586
 
10515
- function createSegment(_x79) {
10587
+ function createSegment(_x80, _x81, _x82, _x83) {
10516
10588
  return _createSegment.apply(this, arguments);
10517
10589
  }
10518
10590
 
10519
10591
  return createSegment;
10520
10592
  }()
10521
10593
  /**
10522
- * querySegments - Query Campaign Segments
10594
+ * createUserSegment - Creates a user segment
10523
10595
  *
10596
+ * @param {string} id Segment ID (valid UUID)
10597
+ * @param {string} name Segment name
10598
+ * @param {SegmentData} data Segment data
10524
10599
  *
10525
- * @return {Segment[]} Segments
10600
+ * @return {Segment} The created Segment
10526
10601
  */
10527
10602
 
10528
10603
  }, {
10529
- key: "querySegments",
10604
+ key: "createUserSegment",
10530
10605
  value: function () {
10531
- var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(filters) {
10532
- var options,
10533
- _args60 = arguments;
10534
- return _regeneratorRuntime.wrap(function _callee60$(_context60) {
10606
+ var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id, name, data) {
10607
+ return _regeneratorRuntime.wrap(function _callee61$(_context61) {
10535
10608
  while (1) {
10536
- switch (_context60.prev = _context60.next) {
10609
+ switch (_context61.prev = _context61.next) {
10537
10610
  case 0:
10538
- options = _args60.length > 1 && _args60[1] !== undefined ? _args60[1] : {};
10539
- _context60.next = 3;
10540
- return this.get(this.baseURL + "/segments", {
10541
- payload: _objectSpread({
10542
- filter_conditions: filters
10543
- }, options)
10544
- });
10611
+ _context61.next = 2;
10612
+ return this.createSegment('user', id, name, data);
10545
10613
 
10546
- case 3:
10547
- return _context60.abrupt("return", _context60.sent);
10614
+ case 2:
10615
+ return _context61.abrupt("return", _context61.sent);
10548
10616
 
10549
- case 4:
10617
+ case 3:
10550
10618
  case "end":
10551
- return _context60.stop();
10619
+ return _context61.stop();
10552
10620
  }
10553
10621
  }
10554
- }, _callee60, this);
10622
+ }, _callee61, this);
10555
10623
  }));
10556
10624
 
10557
- function querySegments(_x80) {
10558
- return _querySegments.apply(this, arguments);
10625
+ function createUserSegment(_x84, _x85, _x86) {
10626
+ return _createUserSegment.apply(this, arguments);
10559
10627
  }
10560
10628
 
10561
- return querySegments;
10629
+ return createUserSegment;
10562
10630
  }()
10563
10631
  /**
10564
- * updateSegment - Update a Campaign Segment
10632
+ * createChannelSegment - Creates a channel segment
10565
10633
  *
10566
- * @param {string} id Segment ID
10567
- * @param {Partial<SegmentData>} params Segment data
10634
+ * @param {string} id Segment ID (valid UUID)
10635
+ * @param {string} name Segment name
10636
+ * @param {SegmentData} data Segment data
10568
10637
  *
10569
- * @return {Segment} Updated Segment
10638
+ * @return {Segment} The created Segment
10570
10639
  */
10571
10640
 
10572
10641
  }, {
10573
- key: "updateSegment",
10642
+ key: "createChannelSegment",
10574
10643
  value: function () {
10575
- var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id, params) {
10576
- var _yield$this$put, segment;
10577
-
10578
- return _regeneratorRuntime.wrap(function _callee61$(_context61) {
10644
+ var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(id, name, data) {
10645
+ return _regeneratorRuntime.wrap(function _callee62$(_context62) {
10579
10646
  while (1) {
10580
- switch (_context61.prev = _context61.next) {
10647
+ switch (_context62.prev = _context62.next) {
10581
10648
  case 0:
10582
- _context61.next = 2;
10583
- return this.put(this.baseURL + "/segments/".concat(id), {
10584
- segment: params
10585
- });
10649
+ _context62.next = 2;
10650
+ return this.createSegment('channel', id, name, data);
10586
10651
 
10587
10652
  case 2:
10588
- _yield$this$put = _context61.sent;
10589
- segment = _yield$this$put.segment;
10590
- return _context61.abrupt("return", segment);
10653
+ return _context62.abrupt("return", _context62.sent);
10591
10654
 
10592
- case 5:
10655
+ case 3:
10593
10656
  case "end":
10594
- return _context61.stop();
10657
+ return _context62.stop();
10595
10658
  }
10596
10659
  }
10597
- }, _callee61, this);
10660
+ }, _callee62, this);
10598
10661
  }));
10599
10662
 
10600
- function updateSegment(_x81, _x82) {
10663
+ function createChannelSegment(_x87, _x88, _x89) {
10664
+ return _createChannelSegment.apply(this, arguments);
10665
+ }
10666
+
10667
+ return createChannelSegment;
10668
+ }()
10669
+ /**
10670
+ * updateSegment - Update a segment
10671
+ *
10672
+ * @param {string} id Segment ID
10673
+ * @param {Partial<UpdateSegmentData>} data Data to update
10674
+ *
10675
+ * @return {Segment} Updated Segment
10676
+ */
10677
+
10678
+ }, {
10679
+ key: "updateSegment",
10680
+ value: function () {
10681
+ var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(id, data) {
10682
+ var _yield$this$put, segment;
10683
+
10684
+ return _regeneratorRuntime.wrap(function _callee63$(_context63) {
10685
+ while (1) {
10686
+ switch (_context63.prev = _context63.next) {
10687
+ case 0:
10688
+ _context63.next = 2;
10689
+ return this.put(this.baseURL + "/segments/".concat(id), data);
10690
+
10691
+ case 2:
10692
+ _yield$this$put = _context63.sent;
10693
+ segment = _yield$this$put.segment;
10694
+ return _context63.abrupt("return", segment);
10695
+
10696
+ case 5:
10697
+ case "end":
10698
+ return _context63.stop();
10699
+ }
10700
+ }
10701
+ }, _callee63, this);
10702
+ }));
10703
+
10704
+ function updateSegment(_x90, _x91) {
10601
10705
  return _updateSegment.apply(this, arguments);
10602
10706
  }
10603
10707
 
10604
10708
  return updateSegment;
10605
10709
  }()
10710
+ /**
10711
+ * addSegmentTargets - Add targets to a segment
10712
+ *
10713
+ * @param {string} id Segment ID
10714
+ * @param {string[]} targets Targets to add to the segment
10715
+ *
10716
+ * @return {APIResponse} API response
10717
+ */
10718
+
10719
+ }, {
10720
+ key: "addSegmentTargets",
10721
+ value: function () {
10722
+ var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id, targets) {
10723
+ var body;
10724
+ return _regeneratorRuntime.wrap(function _callee64$(_context64) {
10725
+ while (1) {
10726
+ switch (_context64.prev = _context64.next) {
10727
+ case 0:
10728
+ body = {
10729
+ targets: targets
10730
+ };
10731
+ _context64.next = 3;
10732
+ return this.post(this.baseURL + "/segments/".concat(id, "/addtargets"), body);
10733
+
10734
+ case 3:
10735
+ return _context64.abrupt("return", _context64.sent);
10736
+
10737
+ case 4:
10738
+ case "end":
10739
+ return _context64.stop();
10740
+ }
10741
+ }
10742
+ }, _callee64, this);
10743
+ }));
10744
+
10745
+ function addSegmentTargets(_x92, _x93) {
10746
+ return _addSegmentTargets.apply(this, arguments);
10747
+ }
10748
+
10749
+ return addSegmentTargets;
10750
+ }()
10751
+ /**
10752
+ * deleteSegmentTargets - Delete targets from a segment
10753
+ *
10754
+ * @param {string} id Segment ID
10755
+ * @param {string[]} targets Targets to add to the segment
10756
+ *
10757
+ * @return {APIResponse} API response
10758
+ */
10759
+
10760
+ }, {
10761
+ key: "deleteSegmentTargets",
10762
+ value: function () {
10763
+ var _deleteSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id, targets) {
10764
+ var body;
10765
+ return _regeneratorRuntime.wrap(function _callee65$(_context65) {
10766
+ while (1) {
10767
+ switch (_context65.prev = _context65.next) {
10768
+ case 0:
10769
+ body = {
10770
+ targets: targets
10771
+ };
10772
+ _context65.next = 3;
10773
+ return this.post(this.baseURL + "/segments/".concat(id, "/deletetargets"), body);
10774
+
10775
+ case 3:
10776
+ return _context65.abrupt("return", _context65.sent);
10777
+
10778
+ case 4:
10779
+ case "end":
10780
+ return _context65.stop();
10781
+ }
10782
+ }
10783
+ }, _callee65, this);
10784
+ }));
10785
+
10786
+ function deleteSegmentTargets(_x94, _x95) {
10787
+ return _deleteSegmentTargets.apply(this, arguments);
10788
+ }
10789
+
10790
+ return deleteSegmentTargets;
10791
+ }()
10792
+ /**
10793
+ * querySegments - Query Segments
10794
+ *
10795
+ * @param {filter} filter MongoDB style filter conditions
10796
+ * @param {QuerySegmentsOptions} options Options for sorting/paginating the results
10797
+ *
10798
+ * @return {Segment[]} Segments
10799
+ */
10800
+
10801
+ }, {
10802
+ key: "querySegments",
10803
+ value: function () {
10804
+ var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(filter) {
10805
+ var options,
10806
+ _args66 = arguments;
10807
+ return _regeneratorRuntime.wrap(function _callee66$(_context66) {
10808
+ while (1) {
10809
+ switch (_context66.prev = _context66.next) {
10810
+ case 0:
10811
+ options = _args66.length > 1 && _args66[1] !== undefined ? _args66[1] : {};
10812
+ _context66.next = 3;
10813
+ return this.get(this.baseURL + "/segments", {
10814
+ payload: _objectSpread({
10815
+ filter: filter
10816
+ }, options)
10817
+ });
10818
+
10819
+ case 3:
10820
+ return _context66.abrupt("return", _context66.sent);
10821
+
10822
+ case 4:
10823
+ case "end":
10824
+ return _context66.stop();
10825
+ }
10826
+ }
10827
+ }, _callee66, this);
10828
+ }));
10829
+
10830
+ function querySegments(_x96) {
10831
+ return _querySegments.apply(this, arguments);
10832
+ }
10833
+
10834
+ return querySegments;
10835
+ }()
10606
10836
  /**
10607
10837
  * deleteSegment - Delete a Campaign Segment
10608
10838
  *
@@ -10614,27 +10844,68 @@ var StreamChat = /*#__PURE__*/function () {
10614
10844
  }, {
10615
10845
  key: "deleteSegment",
10616
10846
  value: function () {
10617
- var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(id) {
10618
- return _regeneratorRuntime.wrap(function _callee62$(_context62) {
10847
+ var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id) {
10848
+ return _regeneratorRuntime.wrap(function _callee67$(_context67) {
10619
10849
  while (1) {
10620
- switch (_context62.prev = _context62.next) {
10850
+ switch (_context67.prev = _context67.next) {
10621
10851
  case 0:
10622
- return _context62.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
10852
+ _context67.next = 2;
10853
+ return this.delete(this.baseURL + "/segments/".concat(id));
10623
10854
 
10624
- case 1:
10855
+ case 2:
10856
+ return _context67.abrupt("return", _context67.sent);
10857
+
10858
+ case 3:
10625
10859
  case "end":
10626
- return _context62.stop();
10860
+ return _context67.stop();
10627
10861
  }
10628
10862
  }
10629
- }, _callee62, this);
10863
+ }, _callee67, this);
10630
10864
  }));
10631
10865
 
10632
- function deleteSegment(_x83) {
10866
+ function deleteSegment(_x97) {
10633
10867
  return _deleteSegment.apply(this, arguments);
10634
10868
  }
10635
10869
 
10636
10870
  return deleteSegment;
10637
10871
  }()
10872
+ /**
10873
+ * segmentTargetExists - Check if a target exists in a segment
10874
+ *
10875
+ * @param {string} segmentId Segment ID
10876
+ * @param {string} targetId Target ID
10877
+ *
10878
+ * @return {Promise<APIResponse>} The Server Response
10879
+ */
10880
+
10881
+ }, {
10882
+ key: "segmentTargetExists",
10883
+ value: function () {
10884
+ var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(segmentId, targetId) {
10885
+ return _regeneratorRuntime.wrap(function _callee68$(_context68) {
10886
+ while (1) {
10887
+ switch (_context68.prev = _context68.next) {
10888
+ case 0:
10889
+ _context68.next = 2;
10890
+ return this.get(this.baseURL + "/segments/".concat(segmentId, "/target/").concat(targetId));
10891
+
10892
+ case 2:
10893
+ return _context68.abrupt("return", _context68.sent);
10894
+
10895
+ case 3:
10896
+ case "end":
10897
+ return _context68.stop();
10898
+ }
10899
+ }
10900
+ }, _callee68, this);
10901
+ }));
10902
+
10903
+ function segmentTargetExists(_x98, _x99) {
10904
+ return _segmentTargetExists.apply(this, arguments);
10905
+ }
10906
+
10907
+ return segmentTargetExists;
10908
+ }()
10638
10909
  /**
10639
10910
  * createCampaign - Creates a Campaign
10640
10911
  *
@@ -10646,32 +10917,32 @@ var StreamChat = /*#__PURE__*/function () {
10646
10917
  }, {
10647
10918
  key: "createCampaign",
10648
10919
  value: function () {
10649
- var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(params) {
10920
+ var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(params) {
10650
10921
  var _yield$this$post2, campaign;
10651
10922
 
10652
- return _regeneratorRuntime.wrap(function _callee63$(_context63) {
10923
+ return _regeneratorRuntime.wrap(function _callee69$(_context69) {
10653
10924
  while (1) {
10654
- switch (_context63.prev = _context63.next) {
10925
+ switch (_context69.prev = _context69.next) {
10655
10926
  case 0:
10656
- _context63.next = 2;
10927
+ _context69.next = 2;
10657
10928
  return this.post(this.baseURL + "/campaigns", {
10658
10929
  campaign: params
10659
10930
  });
10660
10931
 
10661
10932
  case 2:
10662
- _yield$this$post2 = _context63.sent;
10933
+ _yield$this$post2 = _context69.sent;
10663
10934
  campaign = _yield$this$post2.campaign;
10664
- return _context63.abrupt("return", campaign);
10935
+ return _context69.abrupt("return", campaign);
10665
10936
 
10666
10937
  case 5:
10667
10938
  case "end":
10668
- return _context63.stop();
10939
+ return _context69.stop();
10669
10940
  }
10670
10941
  }
10671
- }, _callee63, this);
10942
+ }, _callee69, this);
10672
10943
  }));
10673
10944
 
10674
- function createCampaign(_x84) {
10945
+ function createCampaign(_x100) {
10675
10946
  return _createCampaign.apply(this, arguments);
10676
10947
  }
10677
10948
 
@@ -10687,15 +10958,15 @@ var StreamChat = /*#__PURE__*/function () {
10687
10958
  }, {
10688
10959
  key: "queryCampaigns",
10689
10960
  value: function () {
10690
- var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(filters) {
10961
+ var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(filters) {
10691
10962
  var options,
10692
- _args64 = arguments;
10693
- return _regeneratorRuntime.wrap(function _callee64$(_context64) {
10963
+ _args70 = arguments;
10964
+ return _regeneratorRuntime.wrap(function _callee70$(_context70) {
10694
10965
  while (1) {
10695
- switch (_context64.prev = _context64.next) {
10966
+ switch (_context70.prev = _context70.next) {
10696
10967
  case 0:
10697
- options = _args64.length > 1 && _args64[1] !== undefined ? _args64[1] : {};
10698
- _context64.next = 3;
10968
+ options = _args70.length > 1 && _args70[1] !== undefined ? _args70[1] : {};
10969
+ _context70.next = 3;
10699
10970
  return this.get(this.baseURL + "/campaigns", {
10700
10971
  payload: _objectSpread({
10701
10972
  filter_conditions: filters
@@ -10703,17 +10974,17 @@ var StreamChat = /*#__PURE__*/function () {
10703
10974
  });
10704
10975
 
10705
10976
  case 3:
10706
- return _context64.abrupt("return", _context64.sent);
10977
+ return _context70.abrupt("return", _context70.sent);
10707
10978
 
10708
10979
  case 4:
10709
10980
  case "end":
10710
- return _context64.stop();
10981
+ return _context70.stop();
10711
10982
  }
10712
10983
  }
10713
- }, _callee64, this);
10984
+ }, _callee70, this);
10714
10985
  }));
10715
10986
 
10716
- function queryCampaigns(_x85) {
10987
+ function queryCampaigns(_x101) {
10717
10988
  return _queryCampaigns.apply(this, arguments);
10718
10989
  }
10719
10990
 
@@ -10731,32 +11002,32 @@ var StreamChat = /*#__PURE__*/function () {
10731
11002
  }, {
10732
11003
  key: "updateCampaign",
10733
11004
  value: function () {
10734
- var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id, params) {
11005
+ var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id, params) {
10735
11006
  var _yield$this$put2, campaign;
10736
11007
 
10737
- return _regeneratorRuntime.wrap(function _callee65$(_context65) {
11008
+ return _regeneratorRuntime.wrap(function _callee71$(_context71) {
10738
11009
  while (1) {
10739
- switch (_context65.prev = _context65.next) {
11010
+ switch (_context71.prev = _context71.next) {
10740
11011
  case 0:
10741
- _context65.next = 2;
11012
+ _context71.next = 2;
10742
11013
  return this.put(this.baseURL + "/campaigns/".concat(id), {
10743
11014
  campaign: params
10744
11015
  });
10745
11016
 
10746
11017
  case 2:
10747
- _yield$this$put2 = _context65.sent;
11018
+ _yield$this$put2 = _context71.sent;
10748
11019
  campaign = _yield$this$put2.campaign;
10749
- return _context65.abrupt("return", campaign);
11020
+ return _context71.abrupt("return", campaign);
10750
11021
 
10751
11022
  case 5:
10752
11023
  case "end":
10753
- return _context65.stop();
11024
+ return _context71.stop();
10754
11025
  }
10755
11026
  }
10756
- }, _callee65, this);
11027
+ }, _callee71, this);
10757
11028
  }));
10758
11029
 
10759
- function updateCampaign(_x86, _x87) {
11030
+ function updateCampaign(_x102, _x103) {
10760
11031
  return _updateCampaign.apply(this, arguments);
10761
11032
  }
10762
11033
 
@@ -10773,25 +11044,25 @@ var StreamChat = /*#__PURE__*/function () {
10773
11044
  }, {
10774
11045
  key: "deleteCampaign",
10775
11046
  value: function () {
10776
- var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id) {
11047
+ var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id) {
10777
11048
  var params,
10778
- _args66 = arguments;
10779
- return _regeneratorRuntime.wrap(function _callee66$(_context66) {
11049
+ _args72 = arguments;
11050
+ return _regeneratorRuntime.wrap(function _callee72$(_context72) {
10780
11051
  while (1) {
10781
- switch (_context66.prev = _context66.next) {
11052
+ switch (_context72.prev = _context72.next) {
10782
11053
  case 0:
10783
- params = _args66.length > 1 && _args66[1] !== undefined ? _args66[1] : {};
10784
- return _context66.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id), params));
11054
+ params = _args72.length > 1 && _args72[1] !== undefined ? _args72[1] : {};
11055
+ return _context72.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id), params));
10785
11056
 
10786
11057
  case 2:
10787
11058
  case "end":
10788
- return _context66.stop();
11059
+ return _context72.stop();
10789
11060
  }
10790
11061
  }
10791
- }, _callee66, this);
11062
+ }, _callee72, this);
10792
11063
  }));
10793
11064
 
10794
- function deleteCampaign(_x88) {
11065
+ function deleteCampaign(_x104) {
10795
11066
  return _deleteCampaign.apply(this, arguments);
10796
11067
  }
10797
11068
 
@@ -10809,33 +11080,33 @@ var StreamChat = /*#__PURE__*/function () {
10809
11080
  }, {
10810
11081
  key: "scheduleCampaign",
10811
11082
  value: function () {
10812
- var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id, params) {
11083
+ var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id, params) {
10813
11084
  var scheduledFor, _yield$this$patch, campaign;
10814
11085
 
10815
- return _regeneratorRuntime.wrap(function _callee67$(_context67) {
11086
+ return _regeneratorRuntime.wrap(function _callee73$(_context73) {
10816
11087
  while (1) {
10817
- switch (_context67.prev = _context67.next) {
11088
+ switch (_context73.prev = _context73.next) {
10818
11089
  case 0:
10819
11090
  scheduledFor = params.scheduledFor;
10820
- _context67.next = 3;
11091
+ _context73.next = 3;
10821
11092
  return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
10822
11093
  scheduled_for: scheduledFor
10823
11094
  });
10824
11095
 
10825
11096
  case 3:
10826
- _yield$this$patch = _context67.sent;
11097
+ _yield$this$patch = _context73.sent;
10827
11098
  campaign = _yield$this$patch.campaign;
10828
- return _context67.abrupt("return", campaign);
11099
+ return _context73.abrupt("return", campaign);
10829
11100
 
10830
11101
  case 6:
10831
11102
  case "end":
10832
- return _context67.stop();
11103
+ return _context73.stop();
10833
11104
  }
10834
11105
  }
10835
- }, _callee67, this);
11106
+ }, _callee73, this);
10836
11107
  }));
10837
11108
 
10838
- function scheduleCampaign(_x89, _x90) {
11109
+ function scheduleCampaign(_x105, _x106) {
10839
11110
  return _scheduleCampaign.apply(this, arguments);
10840
11111
  }
10841
11112
 
@@ -10852,30 +11123,30 @@ var StreamChat = /*#__PURE__*/function () {
10852
11123
  }, {
10853
11124
  key: "stopCampaign",
10854
11125
  value: function () {
10855
- var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(id) {
11126
+ var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(id) {
10856
11127
  var _yield$this$patch2, campaign;
10857
11128
 
10858
- return _regeneratorRuntime.wrap(function _callee68$(_context68) {
11129
+ return _regeneratorRuntime.wrap(function _callee74$(_context74) {
10859
11130
  while (1) {
10860
- switch (_context68.prev = _context68.next) {
11131
+ switch (_context74.prev = _context74.next) {
10861
11132
  case 0:
10862
- _context68.next = 2;
11133
+ _context74.next = 2;
10863
11134
  return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
10864
11135
 
10865
11136
  case 2:
10866
- _yield$this$patch2 = _context68.sent;
11137
+ _yield$this$patch2 = _context74.sent;
10867
11138
  campaign = _yield$this$patch2.campaign;
10868
- return _context68.abrupt("return", campaign);
11139
+ return _context74.abrupt("return", campaign);
10869
11140
 
10870
11141
  case 5:
10871
11142
  case "end":
10872
- return _context68.stop();
11143
+ return _context74.stop();
10873
11144
  }
10874
11145
  }
10875
- }, _callee68, this);
11146
+ }, _callee74, this);
10876
11147
  }));
10877
11148
 
10878
- function stopCampaign(_x91) {
11149
+ function stopCampaign(_x107) {
10879
11150
  return _stopCampaign.apply(this, arguments);
10880
11151
  }
10881
11152
 
@@ -10892,30 +11163,30 @@ var StreamChat = /*#__PURE__*/function () {
10892
11163
  }, {
10893
11164
  key: "resumeCampaign",
10894
11165
  value: function () {
10895
- var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id) {
11166
+ var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(id) {
10896
11167
  var _yield$this$patch3, campaign;
10897
11168
 
10898
- return _regeneratorRuntime.wrap(function _callee69$(_context69) {
11169
+ return _regeneratorRuntime.wrap(function _callee75$(_context75) {
10899
11170
  while (1) {
10900
- switch (_context69.prev = _context69.next) {
11171
+ switch (_context75.prev = _context75.next) {
10901
11172
  case 0:
10902
- _context69.next = 2;
11173
+ _context75.next = 2;
10903
11174
  return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
10904
11175
 
10905
11176
  case 2:
10906
- _yield$this$patch3 = _context69.sent;
11177
+ _yield$this$patch3 = _context75.sent;
10907
11178
  campaign = _yield$this$patch3.campaign;
10908
- return _context69.abrupt("return", campaign);
11179
+ return _context75.abrupt("return", campaign);
10909
11180
 
10910
11181
  case 5:
10911
11182
  case "end":
10912
- return _context69.stop();
11183
+ return _context75.stop();
10913
11184
  }
10914
11185
  }
10915
- }, _callee69, this);
11186
+ }, _callee75, this);
10916
11187
  }));
10917
11188
 
10918
- function resumeCampaign(_x92) {
11189
+ function resumeCampaign(_x108) {
10919
11190
  return _resumeCampaign.apply(this, arguments);
10920
11191
  }
10921
11192
 
@@ -10933,77 +11204,35 @@ var StreamChat = /*#__PURE__*/function () {
10933
11204
  }, {
10934
11205
  key: "testCampaign",
10935
11206
  value: function () {
10936
- var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(id, params) {
11207
+ var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(id, params) {
10937
11208
  var users;
10938
- return _regeneratorRuntime.wrap(function _callee70$(_context70) {
11209
+ return _regeneratorRuntime.wrap(function _callee76$(_context76) {
10939
11210
  while (1) {
10940
- switch (_context70.prev = _context70.next) {
11211
+ switch (_context76.prev = _context76.next) {
10941
11212
  case 0:
10942
11213
  users = params.users;
10943
- _context70.next = 3;
11214
+ _context76.next = 3;
10944
11215
  return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
10945
11216
  users: users
10946
11217
  });
10947
11218
 
10948
11219
  case 3:
10949
- return _context70.abrupt("return", _context70.sent);
11220
+ return _context76.abrupt("return", _context76.sent);
10950
11221
 
10951
11222
  case 4:
10952
11223
  case "end":
10953
- return _context70.stop();
11224
+ return _context76.stop();
10954
11225
  }
10955
11226
  }
10956
- }, _callee70, this);
11227
+ }, _callee76, this);
10957
11228
  }));
10958
11229
 
10959
- function testCampaign(_x93, _x94) {
11230
+ function testCampaign(_x109, _x110) {
10960
11231
  return _testCampaign.apply(this, arguments);
10961
11232
  }
10962
11233
 
10963
11234
  return testCampaign;
10964
11235
  }()
10965
- /**
10966
- * queryRecipients - Query Campaign Recipient Results
10967
- *
10968
- *
10969
- * @return {Recipient[]} Recipients
10970
- */
10971
-
10972
- }, {
10973
- key: "queryRecipients",
10974
- value: function () {
10975
- var _queryRecipients = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(filters) {
10976
- var options,
10977
- _args71 = arguments;
10978
- return _regeneratorRuntime.wrap(function _callee71$(_context71) {
10979
- while (1) {
10980
- switch (_context71.prev = _context71.next) {
10981
- case 0:
10982
- options = _args71.length > 1 && _args71[1] !== undefined ? _args71[1] : {};
10983
- _context71.next = 3;
10984
- return this.get(this.baseURL + "/recipients", {
10985
- payload: _objectSpread({
10986
- filter_conditions: filters
10987
- }, options)
10988
- });
10989
-
10990
- case 3:
10991
- return _context71.abrupt("return", _context71.sent);
10992
-
10993
- case 4:
10994
- case "end":
10995
- return _context71.stop();
10996
- }
10997
- }
10998
- }, _callee71, this);
10999
- }));
11000
-
11001
- function queryRecipients(_x95) {
11002
- return _queryRecipients.apply(this, arguments);
11003
- }
11004
-
11005
- return queryRecipients;
11006
- }()
11007
11236
  /**
11008
11237
  * enrichURL - Get OpenGraph data of the given link
11009
11238
  *
@@ -11014,24 +11243,24 @@ var StreamChat = /*#__PURE__*/function () {
11014
11243
  }, {
11015
11244
  key: "enrichURL",
11016
11245
  value: function () {
11017
- var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(url) {
11018
- return _regeneratorRuntime.wrap(function _callee72$(_context72) {
11246
+ var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(url) {
11247
+ return _regeneratorRuntime.wrap(function _callee77$(_context77) {
11019
11248
  while (1) {
11020
- switch (_context72.prev = _context72.next) {
11249
+ switch (_context77.prev = _context77.next) {
11021
11250
  case 0:
11022
- return _context72.abrupt("return", this.get(this.baseURL + "/og", {
11251
+ return _context77.abrupt("return", this.get(this.baseURL + "/og", {
11023
11252
  url: url
11024
11253
  }));
11025
11254
 
11026
11255
  case 1:
11027
11256
  case "end":
11028
- return _context72.stop();
11257
+ return _context77.stop();
11029
11258
  }
11030
11259
  }
11031
- }, _callee72, this);
11260
+ }, _callee77, this);
11032
11261
  }));
11033
11262
 
11034
- function enrichURL(_x96) {
11263
+ function enrichURL(_x111) {
11035
11264
  return _enrichURL.apply(this, arguments);
11036
11265
  }
11037
11266
 
@@ -11048,22 +11277,22 @@ var StreamChat = /*#__PURE__*/function () {
11048
11277
  }, {
11049
11278
  key: "getTask",
11050
11279
  value: function () {
11051
- var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id) {
11052
- return _regeneratorRuntime.wrap(function _callee73$(_context73) {
11280
+ var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(id) {
11281
+ return _regeneratorRuntime.wrap(function _callee78$(_context78) {
11053
11282
  while (1) {
11054
- switch (_context73.prev = _context73.next) {
11283
+ switch (_context78.prev = _context78.next) {
11055
11284
  case 0:
11056
- return _context73.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
11285
+ return _context78.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
11057
11286
 
11058
11287
  case 1:
11059
11288
  case "end":
11060
- return _context73.stop();
11289
+ return _context78.stop();
11061
11290
  }
11062
11291
  }
11063
- }, _callee73, this);
11292
+ }, _callee78, this);
11064
11293
  }));
11065
11294
 
11066
- function getTask(_x97) {
11295
+ function getTask(_x112) {
11067
11296
  return _getTask.apply(this, arguments);
11068
11297
  }
11069
11298
 
@@ -11081,31 +11310,31 @@ var StreamChat = /*#__PURE__*/function () {
11081
11310
  }, {
11082
11311
  key: "deleteChannels",
11083
11312
  value: function () {
11084
- var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(cids) {
11313
+ var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(cids) {
11085
11314
  var options,
11086
- _args74 = arguments;
11087
- return _regeneratorRuntime.wrap(function _callee74$(_context74) {
11315
+ _args79 = arguments;
11316
+ return _regeneratorRuntime.wrap(function _callee79$(_context79) {
11088
11317
  while (1) {
11089
- switch (_context74.prev = _context74.next) {
11318
+ switch (_context79.prev = _context79.next) {
11090
11319
  case 0:
11091
- options = _args74.length > 1 && _args74[1] !== undefined ? _args74[1] : {};
11092
- _context74.next = 3;
11320
+ options = _args79.length > 1 && _args79[1] !== undefined ? _args79[1] : {};
11321
+ _context79.next = 3;
11093
11322
  return this.post(this.baseURL + "/channels/delete", _objectSpread({
11094
11323
  cids: cids
11095
11324
  }, options));
11096
11325
 
11097
11326
  case 3:
11098
- return _context74.abrupt("return", _context74.sent);
11327
+ return _context79.abrupt("return", _context79.sent);
11099
11328
 
11100
11329
  case 4:
11101
11330
  case "end":
11102
- return _context74.stop();
11331
+ return _context79.stop();
11103
11332
  }
11104
11333
  }
11105
- }, _callee74, this);
11334
+ }, _callee79, this);
11106
11335
  }));
11107
11336
 
11108
- function deleteChannels(_x98) {
11337
+ function deleteChannels(_x113) {
11109
11338
  return _deleteChannels.apply(this, arguments);
11110
11339
  }
11111
11340
 
@@ -11123,17 +11352,17 @@ var StreamChat = /*#__PURE__*/function () {
11123
11352
  }, {
11124
11353
  key: "deleteUsers",
11125
11354
  value: function () {
11126
- var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(user_ids) {
11355
+ var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(user_ids) {
11127
11356
  var options,
11128
- _args75 = arguments;
11129
- return _regeneratorRuntime.wrap(function _callee75$(_context75) {
11357
+ _args80 = arguments;
11358
+ return _regeneratorRuntime.wrap(function _callee80$(_context80) {
11130
11359
  while (1) {
11131
- switch (_context75.prev = _context75.next) {
11360
+ switch (_context80.prev = _context80.next) {
11132
11361
  case 0:
11133
- options = _args75.length > 1 && _args75[1] !== undefined ? _args75[1] : {};
11362
+ options = _args80.length > 1 && _args80[1] !== undefined ? _args80[1] : {};
11134
11363
 
11135
11364
  if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
11136
- _context75.next = 3;
11365
+ _context80.next = 3;
11137
11366
  break;
11138
11367
  }
11139
11368
 
@@ -11141,7 +11370,7 @@ var StreamChat = /*#__PURE__*/function () {
11141
11370
 
11142
11371
  case 3:
11143
11372
  if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
11144
- _context75.next = 5;
11373
+ _context80.next = 5;
11145
11374
  break;
11146
11375
  }
11147
11376
 
@@ -11149,30 +11378,30 @@ var StreamChat = /*#__PURE__*/function () {
11149
11378
 
11150
11379
  case 5:
11151
11380
  if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
11152
- _context75.next = 7;
11381
+ _context80.next = 7;
11153
11382
  break;
11154
11383
  }
11155
11384
 
11156
11385
  throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
11157
11386
 
11158
11387
  case 7:
11159
- _context75.next = 9;
11388
+ _context80.next = 9;
11160
11389
  return this.post(this.baseURL + "/users/delete", _objectSpread({
11161
11390
  user_ids: user_ids
11162
11391
  }, options));
11163
11392
 
11164
11393
  case 9:
11165
- return _context75.abrupt("return", _context75.sent);
11394
+ return _context80.abrupt("return", _context80.sent);
11166
11395
 
11167
11396
  case 10:
11168
11397
  case "end":
11169
- return _context75.stop();
11398
+ return _context80.stop();
11170
11399
  }
11171
11400
  }
11172
- }, _callee75, this);
11401
+ }, _callee80, this);
11173
11402
  }));
11174
11403
 
11175
- function deleteUsers(_x99) {
11404
+ function deleteUsers(_x114) {
11176
11405
  return _deleteUsers.apply(this, arguments);
11177
11406
  }
11178
11407
 
@@ -11193,28 +11422,28 @@ var StreamChat = /*#__PURE__*/function () {
11193
11422
  }, {
11194
11423
  key: "_createImportURL",
11195
11424
  value: function () {
11196
- var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(filename) {
11197
- return _regeneratorRuntime.wrap(function _callee76$(_context76) {
11425
+ var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(filename) {
11426
+ return _regeneratorRuntime.wrap(function _callee81$(_context81) {
11198
11427
  while (1) {
11199
- switch (_context76.prev = _context76.next) {
11428
+ switch (_context81.prev = _context81.next) {
11200
11429
  case 0:
11201
- _context76.next = 2;
11430
+ _context81.next = 2;
11202
11431
  return this.post(this.baseURL + "/import_urls", {
11203
11432
  filename: filename
11204
11433
  });
11205
11434
 
11206
11435
  case 2:
11207
- return _context76.abrupt("return", _context76.sent);
11436
+ return _context81.abrupt("return", _context81.sent);
11208
11437
 
11209
11438
  case 3:
11210
11439
  case "end":
11211
- return _context76.stop();
11440
+ return _context81.stop();
11212
11441
  }
11213
11442
  }
11214
- }, _callee76, this);
11443
+ }, _callee81, this);
11215
11444
  }));
11216
11445
 
11217
- function _createImportURL(_x100) {
11446
+ function _createImportURL(_x115) {
11218
11447
  return _createImportURL2.apply(this, arguments);
11219
11448
  }
11220
11449
 
@@ -11236,33 +11465,33 @@ var StreamChat = /*#__PURE__*/function () {
11236
11465
  }, {
11237
11466
  key: "_createImport",
11238
11467
  value: function () {
11239
- var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(path) {
11468
+ var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(path) {
11240
11469
  var options,
11241
- _args77 = arguments;
11242
- return _regeneratorRuntime.wrap(function _callee77$(_context77) {
11470
+ _args82 = arguments;
11471
+ return _regeneratorRuntime.wrap(function _callee82$(_context82) {
11243
11472
  while (1) {
11244
- switch (_context77.prev = _context77.next) {
11473
+ switch (_context82.prev = _context82.next) {
11245
11474
  case 0:
11246
- options = _args77.length > 1 && _args77[1] !== undefined ? _args77[1] : {
11475
+ options = _args82.length > 1 && _args82[1] !== undefined ? _args82[1] : {
11247
11476
  mode: 'upsert'
11248
11477
  };
11249
- _context77.next = 3;
11478
+ _context82.next = 3;
11250
11479
  return this.post(this.baseURL + "/imports", _objectSpread({
11251
11480
  path: path
11252
11481
  }, options));
11253
11482
 
11254
11483
  case 3:
11255
- return _context77.abrupt("return", _context77.sent);
11484
+ return _context82.abrupt("return", _context82.sent);
11256
11485
 
11257
11486
  case 4:
11258
11487
  case "end":
11259
- return _context77.stop();
11488
+ return _context82.stop();
11260
11489
  }
11261
11490
  }
11262
- }, _callee77, this);
11491
+ }, _callee82, this);
11263
11492
  }));
11264
11493
 
11265
- function _createImport(_x101) {
11494
+ function _createImport(_x116) {
11266
11495
  return _createImport2.apply(this, arguments);
11267
11496
  }
11268
11497
 
@@ -11284,26 +11513,26 @@ var StreamChat = /*#__PURE__*/function () {
11284
11513
  }, {
11285
11514
  key: "_getImport",
11286
11515
  value: function () {
11287
- var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(id) {
11288
- return _regeneratorRuntime.wrap(function _callee78$(_context78) {
11516
+ var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(id) {
11517
+ return _regeneratorRuntime.wrap(function _callee83$(_context83) {
11289
11518
  while (1) {
11290
- switch (_context78.prev = _context78.next) {
11519
+ switch (_context83.prev = _context83.next) {
11291
11520
  case 0:
11292
- _context78.next = 2;
11521
+ _context83.next = 2;
11293
11522
  return this.get(this.baseURL + "/imports/".concat(id));
11294
11523
 
11295
11524
  case 2:
11296
- return _context78.abrupt("return", _context78.sent);
11525
+ return _context83.abrupt("return", _context83.sent);
11297
11526
 
11298
11527
  case 3:
11299
11528
  case "end":
11300
- return _context78.stop();
11529
+ return _context83.stop();
11301
11530
  }
11302
11531
  }
11303
- }, _callee78, this);
11532
+ }, _callee83, this);
11304
11533
  }));
11305
11534
 
11306
- function _getImport(_x102) {
11535
+ function _getImport(_x117) {
11307
11536
  return _getImport2.apply(this, arguments);
11308
11537
  }
11309
11538
 
@@ -11325,26 +11554,26 @@ var StreamChat = /*#__PURE__*/function () {
11325
11554
  }, {
11326
11555
  key: "_listImports",
11327
11556
  value: function () {
11328
- var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(options) {
11329
- return _regeneratorRuntime.wrap(function _callee79$(_context79) {
11557
+ var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(options) {
11558
+ return _regeneratorRuntime.wrap(function _callee84$(_context84) {
11330
11559
  while (1) {
11331
- switch (_context79.prev = _context79.next) {
11560
+ switch (_context84.prev = _context84.next) {
11332
11561
  case 0:
11333
- _context79.next = 2;
11562
+ _context84.next = 2;
11334
11563
  return this.get(this.baseURL + "/imports", options);
11335
11564
 
11336
11565
  case 2:
11337
- return _context79.abrupt("return", _context79.sent);
11566
+ return _context84.abrupt("return", _context84.sent);
11338
11567
 
11339
11568
  case 3:
11340
11569
  case "end":
11341
- return _context79.stop();
11570
+ return _context84.stop();
11342
11571
  }
11343
11572
  }
11344
- }, _callee79, this);
11573
+ }, _callee84, this);
11345
11574
  }));
11346
11575
 
11347
- function _listImports(_x103) {
11576
+ function _listImports(_x118) {
11348
11577
  return _listImports2.apply(this, arguments);
11349
11578
  }
11350
11579
 
@@ -11363,28 +11592,28 @@ var StreamChat = /*#__PURE__*/function () {
11363
11592
  }, {
11364
11593
  key: "upsertPushProvider",
11365
11594
  value: function () {
11366
- var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(pushProvider) {
11367
- return _regeneratorRuntime.wrap(function _callee80$(_context80) {
11595
+ var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(pushProvider) {
11596
+ return _regeneratorRuntime.wrap(function _callee85$(_context85) {
11368
11597
  while (1) {
11369
- switch (_context80.prev = _context80.next) {
11598
+ switch (_context85.prev = _context85.next) {
11370
11599
  case 0:
11371
- _context80.next = 2;
11600
+ _context85.next = 2;
11372
11601
  return this.post(this.baseURL + "/push_providers", {
11373
11602
  push_provider: pushProvider
11374
11603
  });
11375
11604
 
11376
11605
  case 2:
11377
- return _context80.abrupt("return", _context80.sent);
11606
+ return _context85.abrupt("return", _context85.sent);
11378
11607
 
11379
11608
  case 3:
11380
11609
  case "end":
11381
- return _context80.stop();
11610
+ return _context85.stop();
11382
11611
  }
11383
11612
  }
11384
- }, _callee80, this);
11613
+ }, _callee85, this);
11385
11614
  }));
11386
11615
 
11387
- function upsertPushProvider(_x104) {
11616
+ function upsertPushProvider(_x119) {
11388
11617
  return _upsertPushProvider.apply(this, arguments);
11389
11618
  }
11390
11619
 
@@ -11403,28 +11632,28 @@ var StreamChat = /*#__PURE__*/function () {
11403
11632
  }, {
11404
11633
  key: "deletePushProvider",
11405
11634
  value: function () {
11406
- var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(_ref10) {
11635
+ var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(_ref10) {
11407
11636
  var type, name;
11408
- return _regeneratorRuntime.wrap(function _callee81$(_context81) {
11637
+ return _regeneratorRuntime.wrap(function _callee86$(_context86) {
11409
11638
  while (1) {
11410
- switch (_context81.prev = _context81.next) {
11639
+ switch (_context86.prev = _context86.next) {
11411
11640
  case 0:
11412
11641
  type = _ref10.type, name = _ref10.name;
11413
- _context81.next = 3;
11642
+ _context86.next = 3;
11414
11643
  return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
11415
11644
 
11416
11645
  case 3:
11417
- return _context81.abrupt("return", _context81.sent);
11646
+ return _context86.abrupt("return", _context86.sent);
11418
11647
 
11419
11648
  case 4:
11420
11649
  case "end":
11421
- return _context81.stop();
11650
+ return _context86.stop();
11422
11651
  }
11423
11652
  }
11424
- }, _callee81, this);
11653
+ }, _callee86, this);
11425
11654
  }));
11426
11655
 
11427
- function deletePushProvider(_x105) {
11656
+ function deletePushProvider(_x120) {
11428
11657
  return _deletePushProvider.apply(this, arguments);
11429
11658
  }
11430
11659
 
@@ -11441,23 +11670,23 @@ var StreamChat = /*#__PURE__*/function () {
11441
11670
  }, {
11442
11671
  key: "listPushProviders",
11443
11672
  value: function () {
11444
- var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82() {
11445
- return _regeneratorRuntime.wrap(function _callee82$(_context82) {
11673
+ var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87() {
11674
+ return _regeneratorRuntime.wrap(function _callee87$(_context87) {
11446
11675
  while (1) {
11447
- switch (_context82.prev = _context82.next) {
11676
+ switch (_context87.prev = _context87.next) {
11448
11677
  case 0:
11449
- _context82.next = 2;
11678
+ _context87.next = 2;
11450
11679
  return this.get(this.baseURL + "/push_providers");
11451
11680
 
11452
11681
  case 2:
11453
- return _context82.abrupt("return", _context82.sent);
11682
+ return _context87.abrupt("return", _context87.sent);
11454
11683
 
11455
11684
  case 3:
11456
11685
  case "end":
11457
- return _context82.stop();
11686
+ return _context87.stop();
11458
11687
  }
11459
11688
  }
11460
- }, _callee82, this);
11689
+ }, _callee87, this);
11461
11690
  }));
11462
11691
 
11463
11692
  function listPushProviders() {
@@ -11485,26 +11714,26 @@ var StreamChat = /*#__PURE__*/function () {
11485
11714
  }, {
11486
11715
  key: "commitMessage",
11487
11716
  value: function () {
11488
- var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(id) {
11489
- return _regeneratorRuntime.wrap(function _callee83$(_context83) {
11717
+ var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(id) {
11718
+ return _regeneratorRuntime.wrap(function _callee88$(_context88) {
11490
11719
  while (1) {
11491
- switch (_context83.prev = _context83.next) {
11720
+ switch (_context88.prev = _context88.next) {
11492
11721
  case 0:
11493
- _context83.next = 2;
11722
+ _context88.next = 2;
11494
11723
  return this.post(this.baseURL + "/messages/".concat(id, "/commit"));
11495
11724
 
11496
11725
  case 2:
11497
- return _context83.abrupt("return", _context83.sent);
11726
+ return _context88.abrupt("return", _context88.sent);
11498
11727
 
11499
11728
  case 3:
11500
11729
  case "end":
11501
- return _context83.stop();
11730
+ return _context88.stop();
11502
11731
  }
11503
11732
  }
11504
- }, _callee83, this);
11733
+ }, _callee88, this);
11505
11734
  }));
11506
11735
 
11507
- function commitMessage(_x106) {
11736
+ function commitMessage(_x121) {
11508
11737
  return _commitMessage.apply(this, arguments);
11509
11738
  }
11510
11739
 
@@ -11556,6 +11785,7 @@ var EVENT_MAP = {
11556
11785
  'notification.invite_rejected': true,
11557
11786
  'notification.invited': true,
11558
11787
  'notification.mark_read': true,
11788
+ 'notification.mark_unread': true,
11559
11789
  'notification.message_new': true,
11560
11790
  'notification.mutes_updated': true,
11561
11791
  'notification.removed_from_channel': true,