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