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