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