stream-chat 8.0.0-dev.0 → 8.1.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
@@ -8669,16 +8669,26 @@ var StreamChat = /*#__PURE__*/function () {
8669
8669
 
8670
8670
  return deleteUser;
8671
8671
  }()
8672
+ /**
8673
+ * restoreUsers - Restore soft deleted users
8674
+ *
8675
+ * @param {string[]} user_ids which users to restore
8676
+ *
8677
+ * @return {APIResponse} A task ID
8678
+ */
8679
+
8672
8680
  }, {
8673
- key: "reactivateUser",
8681
+ key: "restoreUsers",
8674
8682
  value: function () {
8675
- var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(userID, options) {
8683
+ var _restoreUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(user_ids) {
8676
8684
  return _regeneratorRuntime.wrap(function _callee29$(_context29) {
8677
8685
  while (1) {
8678
8686
  switch (_context29.prev = _context29.next) {
8679
8687
  case 0:
8680
8688
  _context29.next = 2;
8681
- return this.post(this.baseURL + "/users/".concat(userID, "/reactivate"), _objectSpread({}, options));
8689
+ return this.post(this.baseURL + "/users/restore", {
8690
+ user_ids: user_ids
8691
+ });
8682
8692
 
8683
8693
  case 2:
8684
8694
  return _context29.abrupt("return", _context29.sent);
@@ -8691,22 +8701,22 @@ var StreamChat = /*#__PURE__*/function () {
8691
8701
  }, _callee29, this);
8692
8702
  }));
8693
8703
 
8694
- function reactivateUser(_x33, _x34) {
8695
- return _reactivateUser.apply(this, arguments);
8704
+ function restoreUsers(_x33) {
8705
+ return _restoreUsers.apply(this, arguments);
8696
8706
  }
8697
8707
 
8698
- return reactivateUser;
8708
+ return restoreUsers;
8699
8709
  }()
8700
8710
  }, {
8701
- key: "deactivateUser",
8711
+ key: "reactivateUser",
8702
8712
  value: function () {
8703
- var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(userID, options) {
8713
+ var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(userID, options) {
8704
8714
  return _regeneratorRuntime.wrap(function _callee30$(_context30) {
8705
8715
  while (1) {
8706
8716
  switch (_context30.prev = _context30.next) {
8707
8717
  case 0:
8708
8718
  _context30.next = 2;
8709
- return this.post(this.baseURL + "/users/".concat(userID, "/deactivate"), _objectSpread({}, options));
8719
+ return this.post(this.baseURL + "/users/".concat(userID, "/reactivate"), _objectSpread({}, options));
8710
8720
 
8711
8721
  case 2:
8712
8722
  return _context30.abrupt("return", _context30.sent);
@@ -8719,22 +8729,22 @@ var StreamChat = /*#__PURE__*/function () {
8719
8729
  }, _callee30, this);
8720
8730
  }));
8721
8731
 
8722
- function deactivateUser(_x35, _x36) {
8723
- return _deactivateUser.apply(this, arguments);
8732
+ function reactivateUser(_x34, _x35) {
8733
+ return _reactivateUser.apply(this, arguments);
8724
8734
  }
8725
8735
 
8726
- return deactivateUser;
8736
+ return reactivateUser;
8727
8737
  }()
8728
8738
  }, {
8729
- key: "exportUser",
8739
+ key: "deactivateUser",
8730
8740
  value: function () {
8731
- var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(userID, options) {
8741
+ var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(userID, options) {
8732
8742
  return _regeneratorRuntime.wrap(function _callee31$(_context31) {
8733
8743
  while (1) {
8734
8744
  switch (_context31.prev = _context31.next) {
8735
8745
  case 0:
8736
8746
  _context31.next = 2;
8737
- return this.get(this.baseURL + "/users/".concat(userID, "/export"), _objectSpread({}, options));
8747
+ return this.post(this.baseURL + "/users/".concat(userID, "/deactivate"), _objectSpread({}, options));
8738
8748
 
8739
8749
  case 2:
8740
8750
  return _context31.abrupt("return", _context31.sent);
@@ -8747,7 +8757,35 @@ var StreamChat = /*#__PURE__*/function () {
8747
8757
  }, _callee31, this);
8748
8758
  }));
8749
8759
 
8750
- function exportUser(_x37, _x38) {
8760
+ function deactivateUser(_x36, _x37) {
8761
+ return _deactivateUser.apply(this, arguments);
8762
+ }
8763
+
8764
+ return deactivateUser;
8765
+ }()
8766
+ }, {
8767
+ key: "exportUser",
8768
+ value: function () {
8769
+ var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(userID, options) {
8770
+ return _regeneratorRuntime.wrap(function _callee32$(_context32) {
8771
+ while (1) {
8772
+ switch (_context32.prev = _context32.next) {
8773
+ case 0:
8774
+ _context32.next = 2;
8775
+ return this.get(this.baseURL + "/users/".concat(userID, "/export"), _objectSpread({}, options));
8776
+
8777
+ case 2:
8778
+ return _context32.abrupt("return", _context32.sent);
8779
+
8780
+ case 3:
8781
+ case "end":
8782
+ return _context32.stop();
8783
+ }
8784
+ }
8785
+ }, _callee32, this);
8786
+ }));
8787
+
8788
+ function exportUser(_x38, _x39) {
8751
8789
  return _exportUser.apply(this, arguments);
8752
8790
  }
8753
8791
 
@@ -8763,28 +8801,28 @@ var StreamChat = /*#__PURE__*/function () {
8763
8801
  }, {
8764
8802
  key: "banUser",
8765
8803
  value: function () {
8766
- var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(targetUserID, options) {
8767
- return _regeneratorRuntime.wrap(function _callee32$(_context32) {
8804
+ var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(targetUserID, options) {
8805
+ return _regeneratorRuntime.wrap(function _callee33$(_context33) {
8768
8806
  while (1) {
8769
- switch (_context32.prev = _context32.next) {
8807
+ switch (_context33.prev = _context33.next) {
8770
8808
  case 0:
8771
- _context32.next = 2;
8809
+ _context33.next = 2;
8772
8810
  return this.post(this.baseURL + '/moderation/ban', _objectSpread({
8773
8811
  target_user_id: targetUserID
8774
8812
  }, options));
8775
8813
 
8776
8814
  case 2:
8777
- return _context32.abrupt("return", _context32.sent);
8815
+ return _context33.abrupt("return", _context33.sent);
8778
8816
 
8779
8817
  case 3:
8780
8818
  case "end":
8781
- return _context32.stop();
8819
+ return _context33.stop();
8782
8820
  }
8783
8821
  }
8784
- }, _callee32, this);
8822
+ }, _callee33, this);
8785
8823
  }));
8786
8824
 
8787
- function banUser(_x39, _x40) {
8825
+ function banUser(_x40, _x41) {
8788
8826
  return _banUser.apply(this, arguments);
8789
8827
  }
8790
8828
 
@@ -8800,28 +8838,28 @@ var StreamChat = /*#__PURE__*/function () {
8800
8838
  }, {
8801
8839
  key: "unbanUser",
8802
8840
  value: function () {
8803
- var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(targetUserID, options) {
8804
- return _regeneratorRuntime.wrap(function _callee33$(_context33) {
8841
+ var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(targetUserID, options) {
8842
+ return _regeneratorRuntime.wrap(function _callee34$(_context34) {
8805
8843
  while (1) {
8806
- switch (_context33.prev = _context33.next) {
8844
+ switch (_context34.prev = _context34.next) {
8807
8845
  case 0:
8808
- _context33.next = 2;
8846
+ _context34.next = 2;
8809
8847
  return this.delete(this.baseURL + '/moderation/ban', _objectSpread({
8810
8848
  target_user_id: targetUserID
8811
8849
  }, options));
8812
8850
 
8813
8851
  case 2:
8814
- return _context33.abrupt("return", _context33.sent);
8852
+ return _context34.abrupt("return", _context34.sent);
8815
8853
 
8816
8854
  case 3:
8817
8855
  case "end":
8818
- return _context33.stop();
8856
+ return _context34.stop();
8819
8857
  }
8820
8858
  }
8821
- }, _callee33, this);
8859
+ }, _callee34, this);
8822
8860
  }));
8823
8861
 
8824
- function unbanUser(_x41, _x42) {
8862
+ function unbanUser(_x42, _x43) {
8825
8863
  return _unbanUser.apply(this, arguments);
8826
8864
  }
8827
8865
 
@@ -8837,28 +8875,28 @@ var StreamChat = /*#__PURE__*/function () {
8837
8875
  }, {
8838
8876
  key: "shadowBan",
8839
8877
  value: function () {
8840
- var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(targetUserID, options) {
8841
- return _regeneratorRuntime.wrap(function _callee34$(_context34) {
8878
+ var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(targetUserID, options) {
8879
+ return _regeneratorRuntime.wrap(function _callee35$(_context35) {
8842
8880
  while (1) {
8843
- switch (_context34.prev = _context34.next) {
8881
+ switch (_context35.prev = _context35.next) {
8844
8882
  case 0:
8845
- _context34.next = 2;
8883
+ _context35.next = 2;
8846
8884
  return this.banUser(targetUserID, _objectSpread({
8847
8885
  shadow: true
8848
8886
  }, options));
8849
8887
 
8850
8888
  case 2:
8851
- return _context34.abrupt("return", _context34.sent);
8889
+ return _context35.abrupt("return", _context35.sent);
8852
8890
 
8853
8891
  case 3:
8854
8892
  case "end":
8855
- return _context34.stop();
8893
+ return _context35.stop();
8856
8894
  }
8857
8895
  }
8858
- }, _callee34, this);
8896
+ }, _callee35, this);
8859
8897
  }));
8860
8898
 
8861
- function shadowBan(_x43, _x44) {
8899
+ function shadowBan(_x44, _x45) {
8862
8900
  return _shadowBan.apply(this, arguments);
8863
8901
  }
8864
8902
 
@@ -8874,28 +8912,28 @@ var StreamChat = /*#__PURE__*/function () {
8874
8912
  }, {
8875
8913
  key: "removeShadowBan",
8876
8914
  value: function () {
8877
- var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(targetUserID, options) {
8878
- return _regeneratorRuntime.wrap(function _callee35$(_context35) {
8915
+ var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(targetUserID, options) {
8916
+ return _regeneratorRuntime.wrap(function _callee36$(_context36) {
8879
8917
  while (1) {
8880
- switch (_context35.prev = _context35.next) {
8918
+ switch (_context36.prev = _context36.next) {
8881
8919
  case 0:
8882
- _context35.next = 2;
8920
+ _context36.next = 2;
8883
8921
  return this.unbanUser(targetUserID, _objectSpread({
8884
8922
  shadow: true
8885
8923
  }, options));
8886
8924
 
8887
8925
  case 2:
8888
- return _context35.abrupt("return", _context35.sent);
8926
+ return _context36.abrupt("return", _context36.sent);
8889
8927
 
8890
8928
  case 3:
8891
8929
  case "end":
8892
- return _context35.stop();
8930
+ return _context36.stop();
8893
8931
  }
8894
8932
  }
8895
- }, _callee35, this);
8933
+ }, _callee36, this);
8896
8934
  }));
8897
8935
 
8898
- function removeShadowBan(_x45, _x46) {
8936
+ function removeShadowBan(_x46, _x47) {
8899
8937
  return _removeShadowBan.apply(this, arguments);
8900
8938
  }
8901
8939
 
@@ -8912,15 +8950,15 @@ var StreamChat = /*#__PURE__*/function () {
8912
8950
  }, {
8913
8951
  key: "muteUser",
8914
8952
  value: function () {
8915
- var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(targetID, userID) {
8953
+ var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(targetID, userID) {
8916
8954
  var options,
8917
- _args36 = arguments;
8918
- return _regeneratorRuntime.wrap(function _callee36$(_context36) {
8955
+ _args37 = arguments;
8956
+ return _regeneratorRuntime.wrap(function _callee37$(_context37) {
8919
8957
  while (1) {
8920
- switch (_context36.prev = _context36.next) {
8958
+ switch (_context37.prev = _context37.next) {
8921
8959
  case 0:
8922
- options = _args36.length > 2 && _args36[2] !== undefined ? _args36[2] : {};
8923
- _context36.next = 3;
8960
+ options = _args37.length > 2 && _args37[2] !== undefined ? _args37[2] : {};
8961
+ _context37.next = 3;
8924
8962
  return this.post(this.baseURL + '/moderation/mute', _objectSpread(_objectSpread({
8925
8963
  target_id: targetID
8926
8964
  }, userID ? {
@@ -8928,17 +8966,17 @@ var StreamChat = /*#__PURE__*/function () {
8928
8966
  } : {}), options));
8929
8967
 
8930
8968
  case 3:
8931
- return _context36.abrupt("return", _context36.sent);
8969
+ return _context37.abrupt("return", _context37.sent);
8932
8970
 
8933
8971
  case 4:
8934
8972
  case "end":
8935
- return _context36.stop();
8973
+ return _context37.stop();
8936
8974
  }
8937
8975
  }
8938
- }, _callee36, this);
8976
+ }, _callee37, this);
8939
8977
  }));
8940
8978
 
8941
- function muteUser(_x47, _x48) {
8979
+ function muteUser(_x48, _x49) {
8942
8980
  return _muteUser.apply(this, arguments);
8943
8981
  }
8944
8982
 
@@ -8954,12 +8992,12 @@ var StreamChat = /*#__PURE__*/function () {
8954
8992
  }, {
8955
8993
  key: "unmuteUser",
8956
8994
  value: function () {
8957
- var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(targetID, currentUserID) {
8958
- return _regeneratorRuntime.wrap(function _callee37$(_context37) {
8995
+ var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(targetID, currentUserID) {
8996
+ return _regeneratorRuntime.wrap(function _callee38$(_context38) {
8959
8997
  while (1) {
8960
- switch (_context37.prev = _context37.next) {
8998
+ switch (_context38.prev = _context38.next) {
8961
8999
  case 0:
8962
- _context37.next = 2;
9000
+ _context38.next = 2;
8963
9001
  return this.post(this.baseURL + '/moderation/unmute', _objectSpread({
8964
9002
  target_id: targetID
8965
9003
  }, currentUserID ? {
@@ -8967,17 +9005,17 @@ var StreamChat = /*#__PURE__*/function () {
8967
9005
  } : {}));
8968
9006
 
8969
9007
  case 2:
8970
- return _context37.abrupt("return", _context37.sent);
9008
+ return _context38.abrupt("return", _context38.sent);
8971
9009
 
8972
9010
  case 3:
8973
9011
  case "end":
8974
- return _context37.stop();
9012
+ return _context38.stop();
8975
9013
  }
8976
9014
  }
8977
- }, _callee37, this);
9015
+ }, _callee38, this);
8978
9016
  }));
8979
9017
 
8980
- function unmuteUser(_x49, _x50) {
9018
+ function unmuteUser(_x50, _x51) {
8981
9019
  return _unmuteUser.apply(this, arguments);
8982
9020
  }
8983
9021
 
@@ -9012,31 +9050,31 @@ var StreamChat = /*#__PURE__*/function () {
9012
9050
  }, {
9013
9051
  key: "flagMessage",
9014
9052
  value: function () {
9015
- var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(targetMessageID) {
9053
+ var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(targetMessageID) {
9016
9054
  var options,
9017
- _args38 = arguments;
9018
- return _regeneratorRuntime.wrap(function _callee38$(_context38) {
9055
+ _args39 = arguments;
9056
+ return _regeneratorRuntime.wrap(function _callee39$(_context39) {
9019
9057
  while (1) {
9020
- switch (_context38.prev = _context38.next) {
9058
+ switch (_context39.prev = _context39.next) {
9021
9059
  case 0:
9022
- options = _args38.length > 1 && _args38[1] !== undefined ? _args38[1] : {};
9023
- _context38.next = 3;
9060
+ options = _args39.length > 1 && _args39[1] !== undefined ? _args39[1] : {};
9061
+ _context39.next = 3;
9024
9062
  return this.post(this.baseURL + '/moderation/flag', _objectSpread({
9025
9063
  target_message_id: targetMessageID
9026
9064
  }, options));
9027
9065
 
9028
9066
  case 3:
9029
- return _context38.abrupt("return", _context38.sent);
9067
+ return _context39.abrupt("return", _context39.sent);
9030
9068
 
9031
9069
  case 4:
9032
9070
  case "end":
9033
- return _context38.stop();
9071
+ return _context39.stop();
9034
9072
  }
9035
9073
  }
9036
- }, _callee38, this);
9074
+ }, _callee39, this);
9037
9075
  }));
9038
9076
 
9039
- function flagMessage(_x51) {
9077
+ function flagMessage(_x52) {
9040
9078
  return _flagMessage.apply(this, arguments);
9041
9079
  }
9042
9080
 
@@ -9052,31 +9090,31 @@ var StreamChat = /*#__PURE__*/function () {
9052
9090
  }, {
9053
9091
  key: "flagUser",
9054
9092
  value: function () {
9055
- var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(targetID) {
9093
+ var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(targetID) {
9056
9094
  var options,
9057
- _args39 = arguments;
9058
- return _regeneratorRuntime.wrap(function _callee39$(_context39) {
9095
+ _args40 = arguments;
9096
+ return _regeneratorRuntime.wrap(function _callee40$(_context40) {
9059
9097
  while (1) {
9060
- switch (_context39.prev = _context39.next) {
9098
+ switch (_context40.prev = _context40.next) {
9061
9099
  case 0:
9062
- options = _args39.length > 1 && _args39[1] !== undefined ? _args39[1] : {};
9063
- _context39.next = 3;
9100
+ options = _args40.length > 1 && _args40[1] !== undefined ? _args40[1] : {};
9101
+ _context40.next = 3;
9064
9102
  return this.post(this.baseURL + '/moderation/flag', _objectSpread({
9065
9103
  target_user_id: targetID
9066
9104
  }, options));
9067
9105
 
9068
9106
  case 3:
9069
- return _context39.abrupt("return", _context39.sent);
9107
+ return _context40.abrupt("return", _context40.sent);
9070
9108
 
9071
9109
  case 4:
9072
9110
  case "end":
9073
- return _context39.stop();
9111
+ return _context40.stop();
9074
9112
  }
9075
9113
  }
9076
- }, _callee39, this);
9114
+ }, _callee40, this);
9077
9115
  }));
9078
9116
 
9079
- function flagUser(_x52) {
9117
+ function flagUser(_x53) {
9080
9118
  return _flagUser.apply(this, arguments);
9081
9119
  }
9082
9120
 
@@ -9092,31 +9130,31 @@ var StreamChat = /*#__PURE__*/function () {
9092
9130
  }, {
9093
9131
  key: "unflagMessage",
9094
9132
  value: function () {
9095
- var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(targetMessageID) {
9133
+ var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(targetMessageID) {
9096
9134
  var options,
9097
- _args40 = arguments;
9098
- return _regeneratorRuntime.wrap(function _callee40$(_context40) {
9135
+ _args41 = arguments;
9136
+ return _regeneratorRuntime.wrap(function _callee41$(_context41) {
9099
9137
  while (1) {
9100
- switch (_context40.prev = _context40.next) {
9138
+ switch (_context41.prev = _context41.next) {
9101
9139
  case 0:
9102
- options = _args40.length > 1 && _args40[1] !== undefined ? _args40[1] : {};
9103
- _context40.next = 3;
9140
+ options = _args41.length > 1 && _args41[1] !== undefined ? _args41[1] : {};
9141
+ _context41.next = 3;
9104
9142
  return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
9105
9143
  target_message_id: targetMessageID
9106
9144
  }, options));
9107
9145
 
9108
9146
  case 3:
9109
- return _context40.abrupt("return", _context40.sent);
9147
+ return _context41.abrupt("return", _context41.sent);
9110
9148
 
9111
9149
  case 4:
9112
9150
  case "end":
9113
- return _context40.stop();
9151
+ return _context41.stop();
9114
9152
  }
9115
9153
  }
9116
- }, _callee40, this);
9154
+ }, _callee41, this);
9117
9155
  }));
9118
9156
 
9119
- function unflagMessage(_x53) {
9157
+ function unflagMessage(_x54) {
9120
9158
  return _unflagMessage.apply(this, arguments);
9121
9159
  }
9122
9160
 
@@ -9132,31 +9170,31 @@ var StreamChat = /*#__PURE__*/function () {
9132
9170
  }, {
9133
9171
  key: "unflagUser",
9134
9172
  value: function () {
9135
- var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(targetID) {
9173
+ var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(targetID) {
9136
9174
  var options,
9137
- _args41 = arguments;
9138
- return _regeneratorRuntime.wrap(function _callee41$(_context41) {
9175
+ _args42 = arguments;
9176
+ return _regeneratorRuntime.wrap(function _callee42$(_context42) {
9139
9177
  while (1) {
9140
- switch (_context41.prev = _context41.next) {
9178
+ switch (_context42.prev = _context42.next) {
9141
9179
  case 0:
9142
- options = _args41.length > 1 && _args41[1] !== undefined ? _args41[1] : {};
9143
- _context41.next = 3;
9180
+ options = _args42.length > 1 && _args42[1] !== undefined ? _args42[1] : {};
9181
+ _context42.next = 3;
9144
9182
  return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
9145
9183
  target_user_id: targetID
9146
9184
  }, options));
9147
9185
 
9148
9186
  case 3:
9149
- return _context41.abrupt("return", _context41.sent);
9187
+ return _context42.abrupt("return", _context42.sent);
9150
9188
 
9151
9189
  case 4:
9152
9190
  case "end":
9153
- return _context41.stop();
9191
+ return _context42.stop();
9154
9192
  }
9155
9193
  }
9156
- }, _callee41, this);
9194
+ }, _callee42, this);
9157
9195
  }));
9158
9196
 
9159
- function unflagUser(_x54) {
9197
+ function unflagUser(_x55) {
9160
9198
  return _unflagUser.apply(this, arguments);
9161
9199
  }
9162
9200
 
@@ -9173,29 +9211,29 @@ var StreamChat = /*#__PURE__*/function () {
9173
9211
  }, {
9174
9212
  key: "getCallToken",
9175
9213
  value: function () {
9176
- var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(callID) {
9214
+ var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(callID) {
9177
9215
  var options,
9178
- _args42 = arguments;
9179
- return _regeneratorRuntime.wrap(function _callee42$(_context42) {
9216
+ _args43 = arguments;
9217
+ return _regeneratorRuntime.wrap(function _callee43$(_context43) {
9180
9218
  while (1) {
9181
- switch (_context42.prev = _context42.next) {
9219
+ switch (_context43.prev = _context43.next) {
9182
9220
  case 0:
9183
- options = _args42.length > 1 && _args42[1] !== undefined ? _args42[1] : {};
9184
- _context42.next = 3;
9221
+ options = _args43.length > 1 && _args43[1] !== undefined ? _args43[1] : {};
9222
+ _context43.next = 3;
9185
9223
  return this.post(this.baseURL + "/calls/".concat(callID), _objectSpread({}, options));
9186
9224
 
9187
9225
  case 3:
9188
- return _context42.abrupt("return", _context42.sent);
9226
+ return _context43.abrupt("return", _context43.sent);
9189
9227
 
9190
9228
  case 4:
9191
9229
  case "end":
9192
- return _context42.stop();
9230
+ return _context43.stop();
9193
9231
  }
9194
9232
  }
9195
- }, _callee42, this);
9233
+ }, _callee43, this);
9196
9234
  }));
9197
9235
 
9198
- function getCallToken(_x55) {
9236
+ function getCallToken(_x56) {
9199
9237
  return _getCallToken.apply(this, arguments);
9200
9238
  }
9201
9239
 
@@ -9218,30 +9256,30 @@ var StreamChat = /*#__PURE__*/function () {
9218
9256
  }, {
9219
9257
  key: "_queryFlags",
9220
9258
  value: function () {
9221
- var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43() {
9259
+ var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44() {
9222
9260
  var filterConditions,
9223
9261
  options,
9224
- _args43 = arguments;
9225
- return _regeneratorRuntime.wrap(function _callee43$(_context43) {
9262
+ _args44 = arguments;
9263
+ return _regeneratorRuntime.wrap(function _callee44$(_context44) {
9226
9264
  while (1) {
9227
- switch (_context43.prev = _context43.next) {
9265
+ switch (_context44.prev = _context44.next) {
9228
9266
  case 0:
9229
- filterConditions = _args43.length > 0 && _args43[0] !== undefined ? _args43[0] : {};
9230
- options = _args43.length > 1 && _args43[1] !== undefined ? _args43[1] : {};
9231
- _context43.next = 4;
9267
+ filterConditions = _args44.length > 0 && _args44[0] !== undefined ? _args44[0] : {};
9268
+ options = _args44.length > 1 && _args44[1] !== undefined ? _args44[1] : {};
9269
+ _context44.next = 4;
9232
9270
  return this.post(this.baseURL + '/moderation/flags', _objectSpread({
9233
9271
  filter_conditions: filterConditions
9234
9272
  }, options));
9235
9273
 
9236
9274
  case 4:
9237
- return _context43.abrupt("return", _context43.sent);
9275
+ return _context44.abrupt("return", _context44.sent);
9238
9276
 
9239
9277
  case 5:
9240
9278
  case "end":
9241
- return _context43.stop();
9279
+ return _context44.stop();
9242
9280
  }
9243
9281
  }
9244
- }, _callee43, this);
9282
+ }, _callee44, this);
9245
9283
  }));
9246
9284
 
9247
9285
  function _queryFlags() {
@@ -9267,30 +9305,30 @@ var StreamChat = /*#__PURE__*/function () {
9267
9305
  }, {
9268
9306
  key: "_queryFlagReports",
9269
9307
  value: function () {
9270
- var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44() {
9308
+ var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45() {
9271
9309
  var filterConditions,
9272
9310
  options,
9273
- _args44 = arguments;
9274
- return _regeneratorRuntime.wrap(function _callee44$(_context44) {
9311
+ _args45 = arguments;
9312
+ return _regeneratorRuntime.wrap(function _callee45$(_context45) {
9275
9313
  while (1) {
9276
- switch (_context44.prev = _context44.next) {
9314
+ switch (_context45.prev = _context45.next) {
9277
9315
  case 0:
9278
- filterConditions = _args44.length > 0 && _args44[0] !== undefined ? _args44[0] : {};
9279
- options = _args44.length > 1 && _args44[1] !== undefined ? _args44[1] : {};
9280
- _context44.next = 4;
9316
+ filterConditions = _args45.length > 0 && _args45[0] !== undefined ? _args45[0] : {};
9317
+ options = _args45.length > 1 && _args45[1] !== undefined ? _args45[1] : {};
9318
+ _context45.next = 4;
9281
9319
  return this.post(this.baseURL + '/moderation/reports', _objectSpread({
9282
9320
  filter_conditions: filterConditions
9283
9321
  }, options));
9284
9322
 
9285
9323
  case 4:
9286
- return _context44.abrupt("return", _context44.sent);
9324
+ return _context45.abrupt("return", _context45.sent);
9287
9325
 
9288
9326
  case 5:
9289
9327
  case "end":
9290
- return _context44.stop();
9328
+ return _context45.stop();
9291
9329
  }
9292
9330
  }
9293
- }, _callee44, this);
9331
+ }, _callee45, this);
9294
9332
  }));
9295
9333
 
9296
9334
  function _queryFlagReports() {
@@ -9317,31 +9355,31 @@ var StreamChat = /*#__PURE__*/function () {
9317
9355
  }, {
9318
9356
  key: "_reviewFlagReport",
9319
9357
  value: function () {
9320
- var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(id, reviewResult) {
9358
+ var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(id, reviewResult) {
9321
9359
  var options,
9322
- _args45 = arguments;
9323
- return _regeneratorRuntime.wrap(function _callee45$(_context45) {
9360
+ _args46 = arguments;
9361
+ return _regeneratorRuntime.wrap(function _callee46$(_context46) {
9324
9362
  while (1) {
9325
- switch (_context45.prev = _context45.next) {
9363
+ switch (_context46.prev = _context46.next) {
9326
9364
  case 0:
9327
- options = _args45.length > 2 && _args45[2] !== undefined ? _args45[2] : {};
9328
- _context45.next = 3;
9365
+ options = _args46.length > 2 && _args46[2] !== undefined ? _args46[2] : {};
9366
+ _context46.next = 3;
9329
9367
  return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
9330
9368
  review_result: reviewResult
9331
9369
  }, options));
9332
9370
 
9333
9371
  case 3:
9334
- return _context45.abrupt("return", _context45.sent);
9372
+ return _context46.abrupt("return", _context46.sent);
9335
9373
 
9336
9374
  case 4:
9337
9375
  case "end":
9338
- return _context45.stop();
9376
+ return _context46.stop();
9339
9377
  }
9340
9378
  }
9341
- }, _callee45, this);
9379
+ }, _callee46, this);
9342
9380
  }));
9343
9381
 
9344
- function _reviewFlagReport(_x56, _x57) {
9382
+ function _reviewFlagReport(_x57, _x58) {
9345
9383
  return _reviewFlagReport2.apply(this, arguments);
9346
9384
  }
9347
9385
 
@@ -9363,31 +9401,31 @@ var StreamChat = /*#__PURE__*/function () {
9363
9401
  }, {
9364
9402
  key: "_unblockMessage",
9365
9403
  value: function () {
9366
- var _unblockMessage2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(targetMessageID) {
9404
+ var _unblockMessage2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(targetMessageID) {
9367
9405
  var options,
9368
- _args46 = arguments;
9369
- return _regeneratorRuntime.wrap(function _callee46$(_context46) {
9406
+ _args47 = arguments;
9407
+ return _regeneratorRuntime.wrap(function _callee47$(_context47) {
9370
9408
  while (1) {
9371
- switch (_context46.prev = _context46.next) {
9409
+ switch (_context47.prev = _context47.next) {
9372
9410
  case 0:
9373
- options = _args46.length > 1 && _args46[1] !== undefined ? _args46[1] : {};
9374
- _context46.next = 3;
9411
+ options = _args47.length > 1 && _args47[1] !== undefined ? _args47[1] : {};
9412
+ _context47.next = 3;
9375
9413
  return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
9376
9414
  target_message_id: targetMessageID
9377
9415
  }, options));
9378
9416
 
9379
9417
  case 3:
9380
- return _context46.abrupt("return", _context46.sent);
9418
+ return _context47.abrupt("return", _context47.sent);
9381
9419
 
9382
9420
  case 4:
9383
9421
  case "end":
9384
- return _context46.stop();
9422
+ return _context47.stop();
9385
9423
  }
9386
9424
  }
9387
- }, _callee46, this);
9425
+ }, _callee47, this);
9388
9426
  }));
9389
9427
 
9390
- function _unblockMessage(_x58) {
9428
+ function _unblockMessage(_x59) {
9391
9429
  return _unblockMessage2.apply(this, arguments);
9392
9430
  }
9393
9431
 
@@ -9414,23 +9452,23 @@ var StreamChat = /*#__PURE__*/function () {
9414
9452
  * @return {Promise<APIResponse>}
9415
9453
  */
9416
9454
  function () {
9417
- var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47() {
9455
+ var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48() {
9418
9456
  var data,
9419
- _args47 = arguments;
9420
- return _regeneratorRuntime.wrap(function _callee47$(_context47) {
9457
+ _args48 = arguments;
9458
+ return _regeneratorRuntime.wrap(function _callee48$(_context48) {
9421
9459
  while (1) {
9422
- switch (_context47.prev = _context47.next) {
9460
+ switch (_context48.prev = _context48.next) {
9423
9461
  case 0:
9424
- data = _args47.length > 0 && _args47[0] !== undefined ? _args47[0] : {};
9425
- _context47.next = 3;
9462
+ data = _args48.length > 0 && _args48[0] !== undefined ? _args48[0] : {};
9463
+ _context48.next = 3;
9426
9464
  return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
9427
9465
 
9428
9466
  case 3:
9429
9467
  case "end":
9430
- return _context47.stop();
9468
+ return _context48.stop();
9431
9469
  }
9432
9470
  }
9433
- }, _callee47, this);
9471
+ }, _callee48, this);
9434
9472
  }));
9435
9473
 
9436
9474
  function markChannelsRead() {
@@ -9505,28 +9543,28 @@ var StreamChat = /*#__PURE__*/function () {
9505
9543
  }, {
9506
9544
  key: "translateMessage",
9507
9545
  value: function () {
9508
- var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(messageId, language) {
9509
- return _regeneratorRuntime.wrap(function _callee48$(_context48) {
9546
+ var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(messageId, language) {
9547
+ return _regeneratorRuntime.wrap(function _callee49$(_context49) {
9510
9548
  while (1) {
9511
- switch (_context48.prev = _context48.next) {
9549
+ switch (_context49.prev = _context49.next) {
9512
9550
  case 0:
9513
- _context48.next = 2;
9551
+ _context49.next = 2;
9514
9552
  return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
9515
9553
  language: language
9516
9554
  });
9517
9555
 
9518
9556
  case 2:
9519
- return _context48.abrupt("return", _context48.sent);
9557
+ return _context49.abrupt("return", _context49.sent);
9520
9558
 
9521
9559
  case 3:
9522
9560
  case "end":
9523
- return _context48.stop();
9561
+ return _context49.stop();
9524
9562
  }
9525
9563
  }
9526
- }, _callee48, this);
9564
+ }, _callee49, this);
9527
9565
  }));
9528
9566
 
9529
- function translateMessage(_x59, _x60) {
9567
+ function translateMessage(_x60, _x61) {
9530
9568
  return _translateMessage.apply(this, arguments);
9531
9569
  }
9532
9570
 
@@ -9628,14 +9666,14 @@ var StreamChat = /*#__PURE__*/function () {
9628
9666
  }, {
9629
9667
  key: "updateMessage",
9630
9668
  value: function () {
9631
- var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(message, userId, options) {
9669
+ var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(message, userId, options) {
9632
9670
  var clonedMessage, reservedMessageFields;
9633
- return _regeneratorRuntime.wrap(function _callee49$(_context49) {
9671
+ return _regeneratorRuntime.wrap(function _callee50$(_context50) {
9634
9672
  while (1) {
9635
- switch (_context49.prev = _context49.next) {
9673
+ switch (_context50.prev = _context50.next) {
9636
9674
  case 0:
9637
9675
  if (message.id) {
9638
- _context49.next = 2;
9676
+ _context50.next = 2;
9639
9677
  break;
9640
9678
  }
9641
9679
 
@@ -9672,23 +9710,23 @@ var StreamChat = /*#__PURE__*/function () {
9672
9710
  });
9673
9711
  }
9674
9712
 
9675
- _context49.next = 10;
9713
+ _context50.next = 10;
9676
9714
  return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
9677
9715
  message: clonedMessage
9678
9716
  }, options));
9679
9717
 
9680
9718
  case 10:
9681
- return _context49.abrupt("return", _context49.sent);
9719
+ return _context50.abrupt("return", _context50.sent);
9682
9720
 
9683
9721
  case 11:
9684
9722
  case "end":
9685
- return _context49.stop();
9723
+ return _context50.stop();
9686
9724
  }
9687
9725
  }
9688
- }, _callee49, this);
9726
+ }, _callee50, this);
9689
9727
  }));
9690
9728
 
9691
- function updateMessage(_x61, _x62, _x63) {
9729
+ function updateMessage(_x62, _x63, _x64) {
9692
9730
  return _updateMessage.apply(this, arguments);
9693
9731
  }
9694
9732
 
@@ -9711,14 +9749,14 @@ var StreamChat = /*#__PURE__*/function () {
9711
9749
  }, {
9712
9750
  key: "partialUpdateMessage",
9713
9751
  value: function () {
9714
- var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(id, partialMessageObject, userId, options) {
9752
+ var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(id, partialMessageObject, userId, options) {
9715
9753
  var user;
9716
- return _regeneratorRuntime.wrap(function _callee50$(_context50) {
9754
+ return _regeneratorRuntime.wrap(function _callee51$(_context51) {
9717
9755
  while (1) {
9718
- switch (_context50.prev = _context50.next) {
9756
+ switch (_context51.prev = _context51.next) {
9719
9757
  case 0:
9720
9758
  if (id) {
9721
- _context50.next = 2;
9759
+ _context51.next = 2;
9722
9760
  break;
9723
9761
  }
9724
9762
 
@@ -9733,23 +9771,23 @@ var StreamChat = /*#__PURE__*/function () {
9733
9771
  };
9734
9772
  }
9735
9773
 
9736
- _context50.next = 6;
9774
+ _context51.next = 6;
9737
9775
  return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
9738
9776
  user: user
9739
9777
  }));
9740
9778
 
9741
9779
  case 6:
9742
- return _context50.abrupt("return", _context50.sent);
9780
+ return _context51.abrupt("return", _context51.sent);
9743
9781
 
9744
9782
  case 7:
9745
9783
  case "end":
9746
- return _context50.stop();
9784
+ return _context51.stop();
9747
9785
  }
9748
9786
  }
9749
- }, _callee50, this);
9787
+ }, _callee51, this);
9750
9788
  }));
9751
9789
 
9752
- function partialUpdateMessage(_x64, _x65, _x66, _x67) {
9790
+ function partialUpdateMessage(_x65, _x66, _x67, _x68) {
9753
9791
  return _partialUpdateMessage.apply(this, arguments);
9754
9792
  }
9755
9793
 
@@ -9758,11 +9796,11 @@ var StreamChat = /*#__PURE__*/function () {
9758
9796
  }, {
9759
9797
  key: "deleteMessage",
9760
9798
  value: function () {
9761
- var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(messageID, hardDelete) {
9799
+ var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(messageID, hardDelete) {
9762
9800
  var params;
9763
- return _regeneratorRuntime.wrap(function _callee51$(_context51) {
9801
+ return _regeneratorRuntime.wrap(function _callee52$(_context52) {
9764
9802
  while (1) {
9765
- switch (_context51.prev = _context51.next) {
9803
+ switch (_context52.prev = _context52.next) {
9766
9804
  case 0:
9767
9805
  params = {};
9768
9806
 
@@ -9772,21 +9810,21 @@ var StreamChat = /*#__PURE__*/function () {
9772
9810
  };
9773
9811
  }
9774
9812
 
9775
- _context51.next = 4;
9813
+ _context52.next = 4;
9776
9814
  return this.delete(this.baseURL + "/messages/".concat(messageID), params);
9777
9815
 
9778
9816
  case 4:
9779
- return _context51.abrupt("return", _context51.sent);
9817
+ return _context52.abrupt("return", _context52.sent);
9780
9818
 
9781
9819
  case 5:
9782
9820
  case "end":
9783
- return _context51.stop();
9821
+ return _context52.stop();
9784
9822
  }
9785
9823
  }
9786
- }, _callee51, this);
9824
+ }, _callee52, this);
9787
9825
  }));
9788
9826
 
9789
- function deleteMessage(_x68, _x69) {
9827
+ function deleteMessage(_x69, _x70) {
9790
9828
  return _deleteMessage.apply(this, arguments);
9791
9829
  }
9792
9830
 
@@ -9795,26 +9833,26 @@ var StreamChat = /*#__PURE__*/function () {
9795
9833
  }, {
9796
9834
  key: "getMessage",
9797
9835
  value: function () {
9798
- var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(messageID) {
9799
- return _regeneratorRuntime.wrap(function _callee52$(_context52) {
9836
+ var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(messageID) {
9837
+ return _regeneratorRuntime.wrap(function _callee53$(_context53) {
9800
9838
  while (1) {
9801
- switch (_context52.prev = _context52.next) {
9839
+ switch (_context53.prev = _context53.next) {
9802
9840
  case 0:
9803
- _context52.next = 2;
9841
+ _context53.next = 2;
9804
9842
  return this.get(this.baseURL + "/messages/".concat(messageID));
9805
9843
 
9806
9844
  case 2:
9807
- return _context52.abrupt("return", _context52.sent);
9845
+ return _context53.abrupt("return", _context53.sent);
9808
9846
 
9809
9847
  case 3:
9810
9848
  case "end":
9811
- return _context52.stop();
9849
+ return _context53.stop();
9812
9850
  }
9813
9851
  }
9814
- }, _callee52, this);
9852
+ }, _callee53, this);
9815
9853
  }));
9816
9854
 
9817
- function getMessage(_x70) {
9855
+ function getMessage(_x71) {
9818
9856
  return _getMessage.apply(this, arguments);
9819
9857
  }
9820
9858
 
@@ -9823,7 +9861,7 @@ var StreamChat = /*#__PURE__*/function () {
9823
9861
  }, {
9824
9862
  key: "getUserAgent",
9825
9863
  value: function getUserAgent() {
9826
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.0.0-dev.0");
9864
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.1.0");
9827
9865
  }
9828
9866
  }, {
9829
9867
  key: "setUserAgent",
@@ -10030,28 +10068,28 @@ var StreamChat = /*#__PURE__*/function () {
10030
10068
  }, {
10031
10069
  key: "sendUserCustomEvent",
10032
10070
  value: function () {
10033
- var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(targetUserID, event) {
10034
- return _regeneratorRuntime.wrap(function _callee53$(_context53) {
10071
+ var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(targetUserID, event) {
10072
+ return _regeneratorRuntime.wrap(function _callee54$(_context54) {
10035
10073
  while (1) {
10036
- switch (_context53.prev = _context53.next) {
10074
+ switch (_context54.prev = _context54.next) {
10037
10075
  case 0:
10038
- _context53.next = 2;
10076
+ _context54.next = 2;
10039
10077
  return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
10040
10078
  event: event
10041
10079
  });
10042
10080
 
10043
10081
  case 2:
10044
- return _context53.abrupt("return", _context53.sent);
10082
+ return _context54.abrupt("return", _context54.sent);
10045
10083
 
10046
10084
  case 3:
10047
10085
  case "end":
10048
- return _context53.stop();
10086
+ return _context54.stop();
10049
10087
  }
10050
10088
  }
10051
- }, _callee53, this);
10089
+ }, _callee54, this);
10052
10090
  }));
10053
10091
 
10054
- function sendUserCustomEvent(_x71, _x72) {
10092
+ function sendUserCustomEvent(_x72, _x73) {
10055
10093
  return _sendUserCustomEvent.apply(this, arguments);
10056
10094
  }
10057
10095
 
@@ -10119,32 +10157,32 @@ var StreamChat = /*#__PURE__*/function () {
10119
10157
  }, {
10120
10158
  key: "createSegment",
10121
10159
  value: function () {
10122
- var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(params) {
10160
+ var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(params) {
10123
10161
  var _yield$this$post, segment;
10124
10162
 
10125
- return _regeneratorRuntime.wrap(function _callee54$(_context54) {
10163
+ return _regeneratorRuntime.wrap(function _callee55$(_context55) {
10126
10164
  while (1) {
10127
- switch (_context54.prev = _context54.next) {
10165
+ switch (_context55.prev = _context55.next) {
10128
10166
  case 0:
10129
- _context54.next = 2;
10167
+ _context55.next = 2;
10130
10168
  return this.post(this.baseURL + "/segments", {
10131
10169
  segment: params
10132
10170
  });
10133
10171
 
10134
10172
  case 2:
10135
- _yield$this$post = _context54.sent;
10173
+ _yield$this$post = _context55.sent;
10136
10174
  segment = _yield$this$post.segment;
10137
- return _context54.abrupt("return", segment);
10175
+ return _context55.abrupt("return", segment);
10138
10176
 
10139
10177
  case 5:
10140
10178
  case "end":
10141
- return _context54.stop();
10179
+ return _context55.stop();
10142
10180
  }
10143
10181
  }
10144
- }, _callee54, this);
10182
+ }, _callee55, this);
10145
10183
  }));
10146
10184
 
10147
- function createSegment(_x73) {
10185
+ function createSegment(_x74) {
10148
10186
  return _createSegment.apply(this, arguments);
10149
10187
  }
10150
10188
 
@@ -10160,15 +10198,15 @@ var StreamChat = /*#__PURE__*/function () {
10160
10198
  }, {
10161
10199
  key: "querySegments",
10162
10200
  value: function () {
10163
- var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(filters) {
10201
+ var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(filters) {
10164
10202
  var options,
10165
- _args55 = arguments;
10166
- return _regeneratorRuntime.wrap(function _callee55$(_context55) {
10203
+ _args56 = arguments;
10204
+ return _regeneratorRuntime.wrap(function _callee56$(_context56) {
10167
10205
  while (1) {
10168
- switch (_context55.prev = _context55.next) {
10206
+ switch (_context56.prev = _context56.next) {
10169
10207
  case 0:
10170
- options = _args55.length > 1 && _args55[1] !== undefined ? _args55[1] : {};
10171
- _context55.next = 3;
10208
+ options = _args56.length > 1 && _args56[1] !== undefined ? _args56[1] : {};
10209
+ _context56.next = 3;
10172
10210
  return this.get(this.baseURL + "/segments", {
10173
10211
  payload: _objectSpread({
10174
10212
  filter_conditions: filters
@@ -10176,17 +10214,17 @@ var StreamChat = /*#__PURE__*/function () {
10176
10214
  });
10177
10215
 
10178
10216
  case 3:
10179
- return _context55.abrupt("return", _context55.sent);
10217
+ return _context56.abrupt("return", _context56.sent);
10180
10218
 
10181
10219
  case 4:
10182
10220
  case "end":
10183
- return _context55.stop();
10221
+ return _context56.stop();
10184
10222
  }
10185
10223
  }
10186
- }, _callee55, this);
10224
+ }, _callee56, this);
10187
10225
  }));
10188
10226
 
10189
- function querySegments(_x74) {
10227
+ function querySegments(_x75) {
10190
10228
  return _querySegments.apply(this, arguments);
10191
10229
  }
10192
10230
 
@@ -10204,32 +10242,32 @@ var StreamChat = /*#__PURE__*/function () {
10204
10242
  }, {
10205
10243
  key: "updateSegment",
10206
10244
  value: function () {
10207
- var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(id, params) {
10245
+ var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(id, params) {
10208
10246
  var _yield$this$put, segment;
10209
10247
 
10210
- return _regeneratorRuntime.wrap(function _callee56$(_context56) {
10248
+ return _regeneratorRuntime.wrap(function _callee57$(_context57) {
10211
10249
  while (1) {
10212
- switch (_context56.prev = _context56.next) {
10250
+ switch (_context57.prev = _context57.next) {
10213
10251
  case 0:
10214
- _context56.next = 2;
10252
+ _context57.next = 2;
10215
10253
  return this.put(this.baseURL + "/segments/".concat(id), {
10216
10254
  segment: params
10217
10255
  });
10218
10256
 
10219
10257
  case 2:
10220
- _yield$this$put = _context56.sent;
10258
+ _yield$this$put = _context57.sent;
10221
10259
  segment = _yield$this$put.segment;
10222
- return _context56.abrupt("return", segment);
10260
+ return _context57.abrupt("return", segment);
10223
10261
 
10224
10262
  case 5:
10225
10263
  case "end":
10226
- return _context56.stop();
10264
+ return _context57.stop();
10227
10265
  }
10228
10266
  }
10229
- }, _callee56, this);
10267
+ }, _callee57, this);
10230
10268
  }));
10231
10269
 
10232
- function updateSegment(_x75, _x76) {
10270
+ function updateSegment(_x76, _x77) {
10233
10271
  return _updateSegment.apply(this, arguments);
10234
10272
  }
10235
10273
 
@@ -10246,22 +10284,22 @@ var StreamChat = /*#__PURE__*/function () {
10246
10284
  }, {
10247
10285
  key: "deleteSegment",
10248
10286
  value: function () {
10249
- var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(id) {
10250
- return _regeneratorRuntime.wrap(function _callee57$(_context57) {
10287
+ var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(id) {
10288
+ return _regeneratorRuntime.wrap(function _callee58$(_context58) {
10251
10289
  while (1) {
10252
- switch (_context57.prev = _context57.next) {
10290
+ switch (_context58.prev = _context58.next) {
10253
10291
  case 0:
10254
- return _context57.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
10292
+ return _context58.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
10255
10293
 
10256
10294
  case 1:
10257
10295
  case "end":
10258
- return _context57.stop();
10296
+ return _context58.stop();
10259
10297
  }
10260
10298
  }
10261
- }, _callee57, this);
10299
+ }, _callee58, this);
10262
10300
  }));
10263
10301
 
10264
- function deleteSegment(_x77) {
10302
+ function deleteSegment(_x78) {
10265
10303
  return _deleteSegment.apply(this, arguments);
10266
10304
  }
10267
10305
 
@@ -10278,32 +10316,32 @@ var StreamChat = /*#__PURE__*/function () {
10278
10316
  }, {
10279
10317
  key: "createCampaign",
10280
10318
  value: function () {
10281
- var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(params) {
10319
+ var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(params) {
10282
10320
  var _yield$this$post2, campaign;
10283
10321
 
10284
- return _regeneratorRuntime.wrap(function _callee58$(_context58) {
10322
+ return _regeneratorRuntime.wrap(function _callee59$(_context59) {
10285
10323
  while (1) {
10286
- switch (_context58.prev = _context58.next) {
10324
+ switch (_context59.prev = _context59.next) {
10287
10325
  case 0:
10288
- _context58.next = 2;
10326
+ _context59.next = 2;
10289
10327
  return this.post(this.baseURL + "/campaigns", {
10290
10328
  campaign: params
10291
10329
  });
10292
10330
 
10293
10331
  case 2:
10294
- _yield$this$post2 = _context58.sent;
10332
+ _yield$this$post2 = _context59.sent;
10295
10333
  campaign = _yield$this$post2.campaign;
10296
- return _context58.abrupt("return", campaign);
10334
+ return _context59.abrupt("return", campaign);
10297
10335
 
10298
10336
  case 5:
10299
10337
  case "end":
10300
- return _context58.stop();
10338
+ return _context59.stop();
10301
10339
  }
10302
10340
  }
10303
- }, _callee58, this);
10341
+ }, _callee59, this);
10304
10342
  }));
10305
10343
 
10306
- function createCampaign(_x78) {
10344
+ function createCampaign(_x79) {
10307
10345
  return _createCampaign.apply(this, arguments);
10308
10346
  }
10309
10347
 
@@ -10319,15 +10357,15 @@ var StreamChat = /*#__PURE__*/function () {
10319
10357
  }, {
10320
10358
  key: "queryCampaigns",
10321
10359
  value: function () {
10322
- var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(filters) {
10360
+ var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(filters) {
10323
10361
  var options,
10324
- _args59 = arguments;
10325
- return _regeneratorRuntime.wrap(function _callee59$(_context59) {
10362
+ _args60 = arguments;
10363
+ return _regeneratorRuntime.wrap(function _callee60$(_context60) {
10326
10364
  while (1) {
10327
- switch (_context59.prev = _context59.next) {
10365
+ switch (_context60.prev = _context60.next) {
10328
10366
  case 0:
10329
- options = _args59.length > 1 && _args59[1] !== undefined ? _args59[1] : {};
10330
- _context59.next = 3;
10367
+ options = _args60.length > 1 && _args60[1] !== undefined ? _args60[1] : {};
10368
+ _context60.next = 3;
10331
10369
  return this.get(this.baseURL + "/campaigns", {
10332
10370
  payload: _objectSpread({
10333
10371
  filter_conditions: filters
@@ -10335,17 +10373,17 @@ var StreamChat = /*#__PURE__*/function () {
10335
10373
  });
10336
10374
 
10337
10375
  case 3:
10338
- return _context59.abrupt("return", _context59.sent);
10376
+ return _context60.abrupt("return", _context60.sent);
10339
10377
 
10340
10378
  case 4:
10341
10379
  case "end":
10342
- return _context59.stop();
10380
+ return _context60.stop();
10343
10381
  }
10344
10382
  }
10345
- }, _callee59, this);
10383
+ }, _callee60, this);
10346
10384
  }));
10347
10385
 
10348
- function queryCampaigns(_x79) {
10386
+ function queryCampaigns(_x80) {
10349
10387
  return _queryCampaigns.apply(this, arguments);
10350
10388
  }
10351
10389
 
@@ -10363,32 +10401,32 @@ var StreamChat = /*#__PURE__*/function () {
10363
10401
  }, {
10364
10402
  key: "updateCampaign",
10365
10403
  value: function () {
10366
- var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(id, params) {
10404
+ var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id, params) {
10367
10405
  var _yield$this$put2, campaign;
10368
10406
 
10369
- return _regeneratorRuntime.wrap(function _callee60$(_context60) {
10407
+ return _regeneratorRuntime.wrap(function _callee61$(_context61) {
10370
10408
  while (1) {
10371
- switch (_context60.prev = _context60.next) {
10409
+ switch (_context61.prev = _context61.next) {
10372
10410
  case 0:
10373
- _context60.next = 2;
10411
+ _context61.next = 2;
10374
10412
  return this.put(this.baseURL + "/campaigns/".concat(id), {
10375
10413
  campaign: params
10376
10414
  });
10377
10415
 
10378
10416
  case 2:
10379
- _yield$this$put2 = _context60.sent;
10417
+ _yield$this$put2 = _context61.sent;
10380
10418
  campaign = _yield$this$put2.campaign;
10381
- return _context60.abrupt("return", campaign);
10419
+ return _context61.abrupt("return", campaign);
10382
10420
 
10383
10421
  case 5:
10384
10422
  case "end":
10385
- return _context60.stop();
10423
+ return _context61.stop();
10386
10424
  }
10387
10425
  }
10388
- }, _callee60, this);
10426
+ }, _callee61, this);
10389
10427
  }));
10390
10428
 
10391
- function updateCampaign(_x80, _x81) {
10429
+ function updateCampaign(_x81, _x82) {
10392
10430
  return _updateCampaign.apply(this, arguments);
10393
10431
  }
10394
10432
 
@@ -10405,25 +10443,25 @@ var StreamChat = /*#__PURE__*/function () {
10405
10443
  }, {
10406
10444
  key: "deleteCampaign",
10407
10445
  value: function () {
10408
- var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id) {
10446
+ var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(id) {
10409
10447
  var params,
10410
- _args61 = arguments;
10411
- return _regeneratorRuntime.wrap(function _callee61$(_context61) {
10448
+ _args62 = arguments;
10449
+ return _regeneratorRuntime.wrap(function _callee62$(_context62) {
10412
10450
  while (1) {
10413
- switch (_context61.prev = _context61.next) {
10451
+ switch (_context62.prev = _context62.next) {
10414
10452
  case 0:
10415
- params = _args61.length > 1 && _args61[1] !== undefined ? _args61[1] : {};
10416
- return _context61.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id), params));
10453
+ params = _args62.length > 1 && _args62[1] !== undefined ? _args62[1] : {};
10454
+ return _context62.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id), params));
10417
10455
 
10418
10456
  case 2:
10419
10457
  case "end":
10420
- return _context61.stop();
10458
+ return _context62.stop();
10421
10459
  }
10422
10460
  }
10423
- }, _callee61, this);
10461
+ }, _callee62, this);
10424
10462
  }));
10425
10463
 
10426
- function deleteCampaign(_x82) {
10464
+ function deleteCampaign(_x83) {
10427
10465
  return _deleteCampaign.apply(this, arguments);
10428
10466
  }
10429
10467
 
@@ -10441,33 +10479,33 @@ var StreamChat = /*#__PURE__*/function () {
10441
10479
  }, {
10442
10480
  key: "scheduleCampaign",
10443
10481
  value: function () {
10444
- var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(id, params) {
10482
+ var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(id, params) {
10445
10483
  var scheduledFor, _yield$this$patch, campaign;
10446
10484
 
10447
- return _regeneratorRuntime.wrap(function _callee62$(_context62) {
10485
+ return _regeneratorRuntime.wrap(function _callee63$(_context63) {
10448
10486
  while (1) {
10449
- switch (_context62.prev = _context62.next) {
10487
+ switch (_context63.prev = _context63.next) {
10450
10488
  case 0:
10451
10489
  scheduledFor = params.scheduledFor;
10452
- _context62.next = 3;
10490
+ _context63.next = 3;
10453
10491
  return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
10454
10492
  scheduled_for: scheduledFor
10455
10493
  });
10456
10494
 
10457
10495
  case 3:
10458
- _yield$this$patch = _context62.sent;
10496
+ _yield$this$patch = _context63.sent;
10459
10497
  campaign = _yield$this$patch.campaign;
10460
- return _context62.abrupt("return", campaign);
10498
+ return _context63.abrupt("return", campaign);
10461
10499
 
10462
10500
  case 6:
10463
10501
  case "end":
10464
- return _context62.stop();
10502
+ return _context63.stop();
10465
10503
  }
10466
10504
  }
10467
- }, _callee62, this);
10505
+ }, _callee63, this);
10468
10506
  }));
10469
10507
 
10470
- function scheduleCampaign(_x83, _x84) {
10508
+ function scheduleCampaign(_x84, _x85) {
10471
10509
  return _scheduleCampaign.apply(this, arguments);
10472
10510
  }
10473
10511
 
@@ -10484,30 +10522,30 @@ var StreamChat = /*#__PURE__*/function () {
10484
10522
  }, {
10485
10523
  key: "stopCampaign",
10486
10524
  value: function () {
10487
- var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(id) {
10525
+ var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id) {
10488
10526
  var _yield$this$patch2, campaign;
10489
10527
 
10490
- return _regeneratorRuntime.wrap(function _callee63$(_context63) {
10528
+ return _regeneratorRuntime.wrap(function _callee64$(_context64) {
10491
10529
  while (1) {
10492
- switch (_context63.prev = _context63.next) {
10530
+ switch (_context64.prev = _context64.next) {
10493
10531
  case 0:
10494
- _context63.next = 2;
10532
+ _context64.next = 2;
10495
10533
  return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
10496
10534
 
10497
10535
  case 2:
10498
- _yield$this$patch2 = _context63.sent;
10536
+ _yield$this$patch2 = _context64.sent;
10499
10537
  campaign = _yield$this$patch2.campaign;
10500
- return _context63.abrupt("return", campaign);
10538
+ return _context64.abrupt("return", campaign);
10501
10539
 
10502
10540
  case 5:
10503
10541
  case "end":
10504
- return _context63.stop();
10542
+ return _context64.stop();
10505
10543
  }
10506
10544
  }
10507
- }, _callee63, this);
10545
+ }, _callee64, this);
10508
10546
  }));
10509
10547
 
10510
- function stopCampaign(_x85) {
10548
+ function stopCampaign(_x86) {
10511
10549
  return _stopCampaign.apply(this, arguments);
10512
10550
  }
10513
10551
 
@@ -10524,30 +10562,30 @@ var StreamChat = /*#__PURE__*/function () {
10524
10562
  }, {
10525
10563
  key: "resumeCampaign",
10526
10564
  value: function () {
10527
- var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id) {
10565
+ var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id) {
10528
10566
  var _yield$this$patch3, campaign;
10529
10567
 
10530
- return _regeneratorRuntime.wrap(function _callee64$(_context64) {
10568
+ return _regeneratorRuntime.wrap(function _callee65$(_context65) {
10531
10569
  while (1) {
10532
- switch (_context64.prev = _context64.next) {
10570
+ switch (_context65.prev = _context65.next) {
10533
10571
  case 0:
10534
- _context64.next = 2;
10572
+ _context65.next = 2;
10535
10573
  return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
10536
10574
 
10537
10575
  case 2:
10538
- _yield$this$patch3 = _context64.sent;
10576
+ _yield$this$patch3 = _context65.sent;
10539
10577
  campaign = _yield$this$patch3.campaign;
10540
- return _context64.abrupt("return", campaign);
10578
+ return _context65.abrupt("return", campaign);
10541
10579
 
10542
10580
  case 5:
10543
10581
  case "end":
10544
- return _context64.stop();
10582
+ return _context65.stop();
10545
10583
  }
10546
10584
  }
10547
- }, _callee64, this);
10585
+ }, _callee65, this);
10548
10586
  }));
10549
10587
 
10550
- function resumeCampaign(_x86) {
10588
+ function resumeCampaign(_x87) {
10551
10589
  return _resumeCampaign.apply(this, arguments);
10552
10590
  }
10553
10591
 
@@ -10565,30 +10603,30 @@ var StreamChat = /*#__PURE__*/function () {
10565
10603
  }, {
10566
10604
  key: "testCampaign",
10567
10605
  value: function () {
10568
- var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id, params) {
10606
+ var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id, params) {
10569
10607
  var users;
10570
- return _regeneratorRuntime.wrap(function _callee65$(_context65) {
10608
+ return _regeneratorRuntime.wrap(function _callee66$(_context66) {
10571
10609
  while (1) {
10572
- switch (_context65.prev = _context65.next) {
10610
+ switch (_context66.prev = _context66.next) {
10573
10611
  case 0:
10574
10612
  users = params.users;
10575
- _context65.next = 3;
10613
+ _context66.next = 3;
10576
10614
  return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
10577
10615
  users: users
10578
10616
  });
10579
10617
 
10580
10618
  case 3:
10581
- return _context65.abrupt("return", _context65.sent);
10619
+ return _context66.abrupt("return", _context66.sent);
10582
10620
 
10583
10621
  case 4:
10584
10622
  case "end":
10585
- return _context65.stop();
10623
+ return _context66.stop();
10586
10624
  }
10587
10625
  }
10588
- }, _callee65, this);
10626
+ }, _callee66, this);
10589
10627
  }));
10590
10628
 
10591
- function testCampaign(_x87, _x88) {
10629
+ function testCampaign(_x88, _x89) {
10592
10630
  return _testCampaign.apply(this, arguments);
10593
10631
  }
10594
10632
 
@@ -10604,15 +10642,15 @@ var StreamChat = /*#__PURE__*/function () {
10604
10642
  }, {
10605
10643
  key: "queryRecipients",
10606
10644
  value: function () {
10607
- var _queryRecipients = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(filters) {
10645
+ var _queryRecipients = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(filters) {
10608
10646
  var options,
10609
- _args66 = arguments;
10610
- return _regeneratorRuntime.wrap(function _callee66$(_context66) {
10647
+ _args67 = arguments;
10648
+ return _regeneratorRuntime.wrap(function _callee67$(_context67) {
10611
10649
  while (1) {
10612
- switch (_context66.prev = _context66.next) {
10650
+ switch (_context67.prev = _context67.next) {
10613
10651
  case 0:
10614
- options = _args66.length > 1 && _args66[1] !== undefined ? _args66[1] : {};
10615
- _context66.next = 3;
10652
+ options = _args67.length > 1 && _args67[1] !== undefined ? _args67[1] : {};
10653
+ _context67.next = 3;
10616
10654
  return this.get(this.baseURL + "/recipients", {
10617
10655
  payload: _objectSpread({
10618
10656
  filter_conditions: filters
@@ -10620,17 +10658,17 @@ var StreamChat = /*#__PURE__*/function () {
10620
10658
  });
10621
10659
 
10622
10660
  case 3:
10623
- return _context66.abrupt("return", _context66.sent);
10661
+ return _context67.abrupt("return", _context67.sent);
10624
10662
 
10625
10663
  case 4:
10626
10664
  case "end":
10627
- return _context66.stop();
10665
+ return _context67.stop();
10628
10666
  }
10629
10667
  }
10630
- }, _callee66, this);
10668
+ }, _callee67, this);
10631
10669
  }));
10632
10670
 
10633
- function queryRecipients(_x89) {
10671
+ function queryRecipients(_x90) {
10634
10672
  return _queryRecipients.apply(this, arguments);
10635
10673
  }
10636
10674
 
@@ -10646,24 +10684,24 @@ var StreamChat = /*#__PURE__*/function () {
10646
10684
  }, {
10647
10685
  key: "enrichURL",
10648
10686
  value: function () {
10649
- var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(url) {
10650
- return _regeneratorRuntime.wrap(function _callee67$(_context67) {
10687
+ var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(url) {
10688
+ return _regeneratorRuntime.wrap(function _callee68$(_context68) {
10651
10689
  while (1) {
10652
- switch (_context67.prev = _context67.next) {
10690
+ switch (_context68.prev = _context68.next) {
10653
10691
  case 0:
10654
- return _context67.abrupt("return", this.get(this.baseURL + "/og", {
10692
+ return _context68.abrupt("return", this.get(this.baseURL + "/og", {
10655
10693
  url: url
10656
10694
  }));
10657
10695
 
10658
10696
  case 1:
10659
10697
  case "end":
10660
- return _context67.stop();
10698
+ return _context68.stop();
10661
10699
  }
10662
10700
  }
10663
- }, _callee67, this);
10701
+ }, _callee68, this);
10664
10702
  }));
10665
10703
 
10666
- function enrichURL(_x90) {
10704
+ function enrichURL(_x91) {
10667
10705
  return _enrichURL.apply(this, arguments);
10668
10706
  }
10669
10707
 
@@ -10680,22 +10718,22 @@ var StreamChat = /*#__PURE__*/function () {
10680
10718
  }, {
10681
10719
  key: "getTask",
10682
10720
  value: function () {
10683
- var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(id) {
10684
- return _regeneratorRuntime.wrap(function _callee68$(_context68) {
10721
+ var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id) {
10722
+ return _regeneratorRuntime.wrap(function _callee69$(_context69) {
10685
10723
  while (1) {
10686
- switch (_context68.prev = _context68.next) {
10724
+ switch (_context69.prev = _context69.next) {
10687
10725
  case 0:
10688
- return _context68.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
10726
+ return _context69.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
10689
10727
 
10690
10728
  case 1:
10691
10729
  case "end":
10692
- return _context68.stop();
10730
+ return _context69.stop();
10693
10731
  }
10694
10732
  }
10695
- }, _callee68, this);
10733
+ }, _callee69, this);
10696
10734
  }));
10697
10735
 
10698
- function getTask(_x91) {
10736
+ function getTask(_x92) {
10699
10737
  return _getTask.apply(this, arguments);
10700
10738
  }
10701
10739
 
@@ -10713,31 +10751,31 @@ var StreamChat = /*#__PURE__*/function () {
10713
10751
  }, {
10714
10752
  key: "deleteChannels",
10715
10753
  value: function () {
10716
- var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(cids) {
10754
+ var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(cids) {
10717
10755
  var options,
10718
- _args69 = arguments;
10719
- return _regeneratorRuntime.wrap(function _callee69$(_context69) {
10756
+ _args70 = arguments;
10757
+ return _regeneratorRuntime.wrap(function _callee70$(_context70) {
10720
10758
  while (1) {
10721
- switch (_context69.prev = _context69.next) {
10759
+ switch (_context70.prev = _context70.next) {
10722
10760
  case 0:
10723
- options = _args69.length > 1 && _args69[1] !== undefined ? _args69[1] : {};
10724
- _context69.next = 3;
10761
+ options = _args70.length > 1 && _args70[1] !== undefined ? _args70[1] : {};
10762
+ _context70.next = 3;
10725
10763
  return this.post(this.baseURL + "/channels/delete", _objectSpread({
10726
10764
  cids: cids
10727
10765
  }, options));
10728
10766
 
10729
10767
  case 3:
10730
- return _context69.abrupt("return", _context69.sent);
10768
+ return _context70.abrupt("return", _context70.sent);
10731
10769
 
10732
10770
  case 4:
10733
10771
  case "end":
10734
- return _context69.stop();
10772
+ return _context70.stop();
10735
10773
  }
10736
10774
  }
10737
- }, _callee69, this);
10775
+ }, _callee70, this);
10738
10776
  }));
10739
10777
 
10740
- function deleteChannels(_x92) {
10778
+ function deleteChannels(_x93) {
10741
10779
  return _deleteChannels.apply(this, arguments);
10742
10780
  }
10743
10781
 
@@ -10755,13 +10793,13 @@ var StreamChat = /*#__PURE__*/function () {
10755
10793
  }, {
10756
10794
  key: "deleteUsers",
10757
10795
  value: function () {
10758
- var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(user_ids, options) {
10759
- return _regeneratorRuntime.wrap(function _callee70$(_context70) {
10796
+ var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(user_ids, options) {
10797
+ return _regeneratorRuntime.wrap(function _callee71$(_context71) {
10760
10798
  while (1) {
10761
- switch (_context70.prev = _context70.next) {
10799
+ switch (_context71.prev = _context71.next) {
10762
10800
  case 0:
10763
10801
  if (!((options === null || options === void 0 ? void 0 : options.user) !== 'soft' && (options === null || options === void 0 ? void 0 : options.user) !== 'hard')) {
10764
- _context70.next = 2;
10802
+ _context71.next = 2;
10765
10803
  break;
10766
10804
  }
10767
10805
 
@@ -10769,7 +10807,7 @@ var StreamChat = /*#__PURE__*/function () {
10769
10807
 
10770
10808
  case 2:
10771
10809
  if (!(options.messages !== undefined && options.messages !== 'soft' && options.messages !== 'hard')) {
10772
- _context70.next = 4;
10810
+ _context71.next = 4;
10773
10811
  break;
10774
10812
  }
10775
10813
 
@@ -10777,30 +10815,30 @@ var StreamChat = /*#__PURE__*/function () {
10777
10815
 
10778
10816
  case 4:
10779
10817
  if (!(options.conversations !== undefined && options.conversations !== 'soft' && options.conversations !== 'hard')) {
10780
- _context70.next = 6;
10818
+ _context71.next = 6;
10781
10819
  break;
10782
10820
  }
10783
10821
 
10784
10822
  throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
10785
10823
 
10786
10824
  case 6:
10787
- _context70.next = 8;
10825
+ _context71.next = 8;
10788
10826
  return this.post(this.baseURL + "/users/delete", _objectSpread({
10789
10827
  user_ids: user_ids
10790
10828
  }, options));
10791
10829
 
10792
10830
  case 8:
10793
- return _context70.abrupt("return", _context70.sent);
10831
+ return _context71.abrupt("return", _context71.sent);
10794
10832
 
10795
10833
  case 9:
10796
10834
  case "end":
10797
- return _context70.stop();
10835
+ return _context71.stop();
10798
10836
  }
10799
10837
  }
10800
- }, _callee70, this);
10838
+ }, _callee71, this);
10801
10839
  }));
10802
10840
 
10803
- function deleteUsers(_x93, _x94) {
10841
+ function deleteUsers(_x94, _x95) {
10804
10842
  return _deleteUsers.apply(this, arguments);
10805
10843
  }
10806
10844
 
@@ -10821,28 +10859,28 @@ var StreamChat = /*#__PURE__*/function () {
10821
10859
  }, {
10822
10860
  key: "_createImportURL",
10823
10861
  value: function () {
10824
- var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(filename) {
10825
- return _regeneratorRuntime.wrap(function _callee71$(_context71) {
10862
+ var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(filename) {
10863
+ return _regeneratorRuntime.wrap(function _callee72$(_context72) {
10826
10864
  while (1) {
10827
- switch (_context71.prev = _context71.next) {
10865
+ switch (_context72.prev = _context72.next) {
10828
10866
  case 0:
10829
- _context71.next = 2;
10867
+ _context72.next = 2;
10830
10868
  return this.post(this.baseURL + "/import_urls", {
10831
10869
  filename: filename
10832
10870
  });
10833
10871
 
10834
10872
  case 2:
10835
- return _context71.abrupt("return", _context71.sent);
10873
+ return _context72.abrupt("return", _context72.sent);
10836
10874
 
10837
10875
  case 3:
10838
10876
  case "end":
10839
- return _context71.stop();
10877
+ return _context72.stop();
10840
10878
  }
10841
10879
  }
10842
- }, _callee71, this);
10880
+ }, _callee72, this);
10843
10881
  }));
10844
10882
 
10845
- function _createImportURL(_x95) {
10883
+ function _createImportURL(_x96) {
10846
10884
  return _createImportURL2.apply(this, arguments);
10847
10885
  }
10848
10886
 
@@ -10864,33 +10902,33 @@ var StreamChat = /*#__PURE__*/function () {
10864
10902
  }, {
10865
10903
  key: "_createImport",
10866
10904
  value: function () {
10867
- var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(path) {
10905
+ var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(path) {
10868
10906
  var options,
10869
- _args72 = arguments;
10870
- return _regeneratorRuntime.wrap(function _callee72$(_context72) {
10907
+ _args73 = arguments;
10908
+ return _regeneratorRuntime.wrap(function _callee73$(_context73) {
10871
10909
  while (1) {
10872
- switch (_context72.prev = _context72.next) {
10910
+ switch (_context73.prev = _context73.next) {
10873
10911
  case 0:
10874
- options = _args72.length > 1 && _args72[1] !== undefined ? _args72[1] : {
10912
+ options = _args73.length > 1 && _args73[1] !== undefined ? _args73[1] : {
10875
10913
  mode: 'upsert'
10876
10914
  };
10877
- _context72.next = 3;
10915
+ _context73.next = 3;
10878
10916
  return this.post(this.baseURL + "/imports", _objectSpread({
10879
10917
  path: path
10880
10918
  }, options));
10881
10919
 
10882
10920
  case 3:
10883
- return _context72.abrupt("return", _context72.sent);
10921
+ return _context73.abrupt("return", _context73.sent);
10884
10922
 
10885
10923
  case 4:
10886
10924
  case "end":
10887
- return _context72.stop();
10925
+ return _context73.stop();
10888
10926
  }
10889
10927
  }
10890
- }, _callee72, this);
10928
+ }, _callee73, this);
10891
10929
  }));
10892
10930
 
10893
- function _createImport(_x96) {
10931
+ function _createImport(_x97) {
10894
10932
  return _createImport2.apply(this, arguments);
10895
10933
  }
10896
10934
 
@@ -10912,26 +10950,26 @@ var StreamChat = /*#__PURE__*/function () {
10912
10950
  }, {
10913
10951
  key: "_getImport",
10914
10952
  value: function () {
10915
- var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id) {
10916
- return _regeneratorRuntime.wrap(function _callee73$(_context73) {
10953
+ var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(id) {
10954
+ return _regeneratorRuntime.wrap(function _callee74$(_context74) {
10917
10955
  while (1) {
10918
- switch (_context73.prev = _context73.next) {
10956
+ switch (_context74.prev = _context74.next) {
10919
10957
  case 0:
10920
- _context73.next = 2;
10958
+ _context74.next = 2;
10921
10959
  return this.get(this.baseURL + "/imports/".concat(id));
10922
10960
 
10923
10961
  case 2:
10924
- return _context73.abrupt("return", _context73.sent);
10962
+ return _context74.abrupt("return", _context74.sent);
10925
10963
 
10926
10964
  case 3:
10927
10965
  case "end":
10928
- return _context73.stop();
10966
+ return _context74.stop();
10929
10967
  }
10930
10968
  }
10931
- }, _callee73, this);
10969
+ }, _callee74, this);
10932
10970
  }));
10933
10971
 
10934
- function _getImport(_x97) {
10972
+ function _getImport(_x98) {
10935
10973
  return _getImport2.apply(this, arguments);
10936
10974
  }
10937
10975
 
@@ -10953,26 +10991,26 @@ var StreamChat = /*#__PURE__*/function () {
10953
10991
  }, {
10954
10992
  key: "_listImports",
10955
10993
  value: function () {
10956
- var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(options) {
10957
- return _regeneratorRuntime.wrap(function _callee74$(_context74) {
10994
+ var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(options) {
10995
+ return _regeneratorRuntime.wrap(function _callee75$(_context75) {
10958
10996
  while (1) {
10959
- switch (_context74.prev = _context74.next) {
10997
+ switch (_context75.prev = _context75.next) {
10960
10998
  case 0:
10961
- _context74.next = 2;
10999
+ _context75.next = 2;
10962
11000
  return this.get(this.baseURL + "/imports", options);
10963
11001
 
10964
11002
  case 2:
10965
- return _context74.abrupt("return", _context74.sent);
11003
+ return _context75.abrupt("return", _context75.sent);
10966
11004
 
10967
11005
  case 3:
10968
11006
  case "end":
10969
- return _context74.stop();
11007
+ return _context75.stop();
10970
11008
  }
10971
11009
  }
10972
- }, _callee74, this);
11010
+ }, _callee75, this);
10973
11011
  }));
10974
11012
 
10975
- function _listImports(_x98) {
11013
+ function _listImports(_x99) {
10976
11014
  return _listImports2.apply(this, arguments);
10977
11015
  }
10978
11016
 
@@ -10991,28 +11029,28 @@ var StreamChat = /*#__PURE__*/function () {
10991
11029
  }, {
10992
11030
  key: "upsertPushProvider",
10993
11031
  value: function () {
10994
- var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(pushProvider) {
10995
- return _regeneratorRuntime.wrap(function _callee75$(_context75) {
11032
+ var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(pushProvider) {
11033
+ return _regeneratorRuntime.wrap(function _callee76$(_context76) {
10996
11034
  while (1) {
10997
- switch (_context75.prev = _context75.next) {
11035
+ switch (_context76.prev = _context76.next) {
10998
11036
  case 0:
10999
- _context75.next = 2;
11037
+ _context76.next = 2;
11000
11038
  return this.post(this.baseURL + "/push_providers", {
11001
11039
  push_provider: pushProvider
11002
11040
  });
11003
11041
 
11004
11042
  case 2:
11005
- return _context75.abrupt("return", _context75.sent);
11043
+ return _context76.abrupt("return", _context76.sent);
11006
11044
 
11007
11045
  case 3:
11008
11046
  case "end":
11009
- return _context75.stop();
11047
+ return _context76.stop();
11010
11048
  }
11011
11049
  }
11012
- }, _callee75, this);
11050
+ }, _callee76, this);
11013
11051
  }));
11014
11052
 
11015
- function upsertPushProvider(_x99) {
11053
+ function upsertPushProvider(_x100) {
11016
11054
  return _upsertPushProvider.apply(this, arguments);
11017
11055
  }
11018
11056
 
@@ -11031,28 +11069,28 @@ var StreamChat = /*#__PURE__*/function () {
11031
11069
  }, {
11032
11070
  key: "deletePushProvider",
11033
11071
  value: function () {
11034
- var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(_ref9) {
11072
+ var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(_ref9) {
11035
11073
  var type, name;
11036
- return _regeneratorRuntime.wrap(function _callee76$(_context76) {
11074
+ return _regeneratorRuntime.wrap(function _callee77$(_context77) {
11037
11075
  while (1) {
11038
- switch (_context76.prev = _context76.next) {
11076
+ switch (_context77.prev = _context77.next) {
11039
11077
  case 0:
11040
11078
  type = _ref9.type, name = _ref9.name;
11041
- _context76.next = 3;
11079
+ _context77.next = 3;
11042
11080
  return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
11043
11081
 
11044
11082
  case 3:
11045
- return _context76.abrupt("return", _context76.sent);
11083
+ return _context77.abrupt("return", _context77.sent);
11046
11084
 
11047
11085
  case 4:
11048
11086
  case "end":
11049
- return _context76.stop();
11087
+ return _context77.stop();
11050
11088
  }
11051
11089
  }
11052
- }, _callee76, this);
11090
+ }, _callee77, this);
11053
11091
  }));
11054
11092
 
11055
- function deletePushProvider(_x100) {
11093
+ function deletePushProvider(_x101) {
11056
11094
  return _deletePushProvider.apply(this, arguments);
11057
11095
  }
11058
11096
 
@@ -11069,23 +11107,23 @@ var StreamChat = /*#__PURE__*/function () {
11069
11107
  }, {
11070
11108
  key: "listPushProviders",
11071
11109
  value: function () {
11072
- var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77() {
11073
- return _regeneratorRuntime.wrap(function _callee77$(_context77) {
11110
+ var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78() {
11111
+ return _regeneratorRuntime.wrap(function _callee78$(_context78) {
11074
11112
  while (1) {
11075
- switch (_context77.prev = _context77.next) {
11113
+ switch (_context78.prev = _context78.next) {
11076
11114
  case 0:
11077
- _context77.next = 2;
11115
+ _context78.next = 2;
11078
11116
  return this.get(this.baseURL + "/push_providers");
11079
11117
 
11080
11118
  case 2:
11081
- return _context77.abrupt("return", _context77.sent);
11119
+ return _context78.abrupt("return", _context78.sent);
11082
11120
 
11083
11121
  case 3:
11084
11122
  case "end":
11085
- return _context77.stop();
11123
+ return _context78.stop();
11086
11124
  }
11087
11125
  }
11088
- }, _callee77, this);
11126
+ }, _callee78, this);
11089
11127
  }));
11090
11128
 
11091
11129
  function listPushProviders() {
@@ -11103,6 +11141,41 @@ var StreamChat = /*#__PURE__*/function () {
11103
11141
  value: function createAbortControllerForNextRequest() {
11104
11142
  return this.nextRequestAbortController = new AbortController();
11105
11143
  }
11144
+ /**
11145
+ * commits a pending message, making it visible in the channel and for other users
11146
+ * @param id the message id
11147
+ *
11148
+ * @return {APIResponse & MessageResponse} The message
11149
+ */
11150
+
11151
+ }, {
11152
+ key: "commitMessage",
11153
+ value: function () {
11154
+ var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(id) {
11155
+ return _regeneratorRuntime.wrap(function _callee79$(_context79) {
11156
+ while (1) {
11157
+ switch (_context79.prev = _context79.next) {
11158
+ case 0:
11159
+ _context79.next = 2;
11160
+ return this.post(this.baseURL + "/messages/".concat(id, "/commit"));
11161
+
11162
+ case 2:
11163
+ return _context79.abrupt("return", _context79.sent);
11164
+
11165
+ case 3:
11166
+ case "end":
11167
+ return _context79.stop();
11168
+ }
11169
+ }
11170
+ }, _callee79, this);
11171
+ }));
11172
+
11173
+ function commitMessage(_x102) {
11174
+ return _commitMessage.apply(this, arguments);
11175
+ }
11176
+
11177
+ return commitMessage;
11178
+ }()
11106
11179
  }], [{
11107
11180
  key: "getInstance",
11108
11181
  value: function getInstance(key, secretOrOptions, options) {