stream-chat 8.1.2 → 8.2.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 +539 -434
- 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 +539 -434
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +539 -434
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +539 -434
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/client.d.ts +39 -12
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/types.d.ts +13 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +15 -6
- package/src/client.ts +47 -11
- package/src/types.ts +16 -0
package/dist/browser.es.js
CHANGED
|
@@ -3640,13 +3640,22 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3640
3640
|
channelState.addPinnedMessage(event.message);
|
|
3641
3641
|
}
|
|
3642
3642
|
|
|
3643
|
-
if (
|
|
3643
|
+
if ((_event$user8 = event.user) !== null && _event$user8 !== void 0 && _event$user8.id) {
|
|
3644
|
+
for (var userId in channelState.read) {
|
|
3645
|
+
if (userId === event.user.id) {
|
|
3646
|
+
channelState.read[event.user.id] = {
|
|
3647
|
+
last_read: new Date(event.created_at),
|
|
3648
|
+
user: event.user,
|
|
3649
|
+
unread_messages: 0
|
|
3650
|
+
};
|
|
3651
|
+
} else {
|
|
3652
|
+
channelState.read[userId].unread_messages += 1;
|
|
3653
|
+
}
|
|
3654
|
+
}
|
|
3655
|
+
}
|
|
3656
|
+
|
|
3657
|
+
if (ownMessage) {
|
|
3644
3658
|
channelState.unreadCount = 0;
|
|
3645
|
-
channelState.read[event.user.id] = {
|
|
3646
|
-
last_read: new Date(event.created_at),
|
|
3647
|
-
user: event.user,
|
|
3648
|
-
unread_messages: 0
|
|
3649
|
-
};
|
|
3650
3659
|
} else if (this._countMessageAsUnread(event.message)) {
|
|
3651
3660
|
channelState.unreadCount = channelState.unreadCount + 1;
|
|
3652
3661
|
}
|
|
@@ -8673,7 +8682,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8673
8682
|
*
|
|
8674
8683
|
* @param {string[]} user_ids which users to restore
|
|
8675
8684
|
*
|
|
8676
|
-
* @return {APIResponse}
|
|
8685
|
+
* @return {APIResponse} An API response
|
|
8677
8686
|
*/
|
|
8678
8687
|
|
|
8679
8688
|
}, {
|
|
@@ -8706,6 +8715,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8706
8715
|
|
|
8707
8716
|
return restoreUsers;
|
|
8708
8717
|
}()
|
|
8718
|
+
/**
|
|
8719
|
+
* reactivateUser - Reactivate one user
|
|
8720
|
+
*
|
|
8721
|
+
* @param {string} userID which user to reactivate
|
|
8722
|
+
* @param {ReactivateUserOptions} [options]
|
|
8723
|
+
*
|
|
8724
|
+
* @return {UserResponse} Reactivated user
|
|
8725
|
+
*/
|
|
8726
|
+
|
|
8709
8727
|
}, {
|
|
8710
8728
|
key: "reactivateUser",
|
|
8711
8729
|
value: function () {
|
|
@@ -8734,16 +8752,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8734
8752
|
|
|
8735
8753
|
return reactivateUser;
|
|
8736
8754
|
}()
|
|
8755
|
+
/**
|
|
8756
|
+
* reactivateUsers - Reactivate many users asynchronously
|
|
8757
|
+
*
|
|
8758
|
+
* @param {string[]} user_ids which users to reactivate
|
|
8759
|
+
* @param {ReactivateUsersOptions} [options]
|
|
8760
|
+
*
|
|
8761
|
+
* @return {TaskResponse} A task ID
|
|
8762
|
+
*/
|
|
8763
|
+
|
|
8737
8764
|
}, {
|
|
8738
|
-
key: "
|
|
8765
|
+
key: "reactivateUsers",
|
|
8739
8766
|
value: function () {
|
|
8740
|
-
var
|
|
8767
|
+
var _reactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(user_ids, options) {
|
|
8741
8768
|
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
8742
8769
|
while (1) {
|
|
8743
8770
|
switch (_context31.prev = _context31.next) {
|
|
8744
8771
|
case 0:
|
|
8745
8772
|
_context31.next = 2;
|
|
8746
|
-
return this.post(this.baseURL + "/users/"
|
|
8773
|
+
return this.post(this.baseURL + "/users/reactivate", _objectSpread({
|
|
8774
|
+
user_ids: user_ids
|
|
8775
|
+
}, options));
|
|
8747
8776
|
|
|
8748
8777
|
case 2:
|
|
8749
8778
|
return _context31.abrupt("return", _context31.sent);
|
|
@@ -8756,22 +8785,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8756
8785
|
}, _callee31, this);
|
|
8757
8786
|
}));
|
|
8758
8787
|
|
|
8759
|
-
function
|
|
8760
|
-
return
|
|
8788
|
+
function reactivateUsers(_x36, _x37) {
|
|
8789
|
+
return _reactivateUsers.apply(this, arguments);
|
|
8761
8790
|
}
|
|
8762
8791
|
|
|
8763
|
-
return
|
|
8792
|
+
return reactivateUsers;
|
|
8764
8793
|
}()
|
|
8794
|
+
/**
|
|
8795
|
+
* deactivateUser - Deactivate one user
|
|
8796
|
+
*
|
|
8797
|
+
* @param {string} userID which user to deactivate
|
|
8798
|
+
* @param {DeactivateUsersOptions} [options]
|
|
8799
|
+
*
|
|
8800
|
+
* @return {UserResponse} Deactivated user
|
|
8801
|
+
*/
|
|
8802
|
+
|
|
8765
8803
|
}, {
|
|
8766
|
-
key: "
|
|
8804
|
+
key: "deactivateUser",
|
|
8767
8805
|
value: function () {
|
|
8768
|
-
var
|
|
8806
|
+
var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(userID, options) {
|
|
8769
8807
|
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
8770
8808
|
while (1) {
|
|
8771
8809
|
switch (_context32.prev = _context32.next) {
|
|
8772
8810
|
case 0:
|
|
8773
8811
|
_context32.next = 2;
|
|
8774
|
-
return this.
|
|
8812
|
+
return this.post(this.baseURL + "/users/".concat(userID, "/deactivate"), _objectSpread({}, options));
|
|
8775
8813
|
|
|
8776
8814
|
case 2:
|
|
8777
8815
|
return _context32.abrupt("return", _context32.sent);
|
|
@@ -8784,7 +8822,74 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8784
8822
|
}, _callee32, this);
|
|
8785
8823
|
}));
|
|
8786
8824
|
|
|
8787
|
-
function
|
|
8825
|
+
function deactivateUser(_x38, _x39) {
|
|
8826
|
+
return _deactivateUser.apply(this, arguments);
|
|
8827
|
+
}
|
|
8828
|
+
|
|
8829
|
+
return deactivateUser;
|
|
8830
|
+
}()
|
|
8831
|
+
/**
|
|
8832
|
+
* deactivateUsers - Deactivate many users asynchronously
|
|
8833
|
+
*
|
|
8834
|
+
* @param {string[]} user_ids which users to deactivate
|
|
8835
|
+
* @param {DeactivateUsersOptions} [options]
|
|
8836
|
+
*
|
|
8837
|
+
* @return {TaskResponse} A task ID
|
|
8838
|
+
*/
|
|
8839
|
+
|
|
8840
|
+
}, {
|
|
8841
|
+
key: "deactivateUsers",
|
|
8842
|
+
value: function () {
|
|
8843
|
+
var _deactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(user_ids, options) {
|
|
8844
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
8845
|
+
while (1) {
|
|
8846
|
+
switch (_context33.prev = _context33.next) {
|
|
8847
|
+
case 0:
|
|
8848
|
+
_context33.next = 2;
|
|
8849
|
+
return this.post(this.baseURL + "/users/deactivate", _objectSpread({
|
|
8850
|
+
user_ids: user_ids
|
|
8851
|
+
}, options));
|
|
8852
|
+
|
|
8853
|
+
case 2:
|
|
8854
|
+
return _context33.abrupt("return", _context33.sent);
|
|
8855
|
+
|
|
8856
|
+
case 3:
|
|
8857
|
+
case "end":
|
|
8858
|
+
return _context33.stop();
|
|
8859
|
+
}
|
|
8860
|
+
}
|
|
8861
|
+
}, _callee33, this);
|
|
8862
|
+
}));
|
|
8863
|
+
|
|
8864
|
+
function deactivateUsers(_x40, _x41) {
|
|
8865
|
+
return _deactivateUsers.apply(this, arguments);
|
|
8866
|
+
}
|
|
8867
|
+
|
|
8868
|
+
return deactivateUsers;
|
|
8869
|
+
}()
|
|
8870
|
+
}, {
|
|
8871
|
+
key: "exportUser",
|
|
8872
|
+
value: function () {
|
|
8873
|
+
var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(userID, options) {
|
|
8874
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
8875
|
+
while (1) {
|
|
8876
|
+
switch (_context34.prev = _context34.next) {
|
|
8877
|
+
case 0:
|
|
8878
|
+
_context34.next = 2;
|
|
8879
|
+
return this.get(this.baseURL + "/users/".concat(userID, "/export"), _objectSpread({}, options));
|
|
8880
|
+
|
|
8881
|
+
case 2:
|
|
8882
|
+
return _context34.abrupt("return", _context34.sent);
|
|
8883
|
+
|
|
8884
|
+
case 3:
|
|
8885
|
+
case "end":
|
|
8886
|
+
return _context34.stop();
|
|
8887
|
+
}
|
|
8888
|
+
}
|
|
8889
|
+
}, _callee34, this);
|
|
8890
|
+
}));
|
|
8891
|
+
|
|
8892
|
+
function exportUser(_x42, _x43) {
|
|
8788
8893
|
return _exportUser.apply(this, arguments);
|
|
8789
8894
|
}
|
|
8790
8895
|
|
|
@@ -8800,28 +8905,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8800
8905
|
}, {
|
|
8801
8906
|
key: "banUser",
|
|
8802
8907
|
value: function () {
|
|
8803
|
-
var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8804
|
-
return _regeneratorRuntime.wrap(function
|
|
8908
|
+
var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(targetUserID, options) {
|
|
8909
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
8805
8910
|
while (1) {
|
|
8806
|
-
switch (
|
|
8911
|
+
switch (_context35.prev = _context35.next) {
|
|
8807
8912
|
case 0:
|
|
8808
|
-
|
|
8913
|
+
_context35.next = 2;
|
|
8809
8914
|
return this.post(this.baseURL + '/moderation/ban', _objectSpread({
|
|
8810
8915
|
target_user_id: targetUserID
|
|
8811
8916
|
}, options));
|
|
8812
8917
|
|
|
8813
8918
|
case 2:
|
|
8814
|
-
return
|
|
8919
|
+
return _context35.abrupt("return", _context35.sent);
|
|
8815
8920
|
|
|
8816
8921
|
case 3:
|
|
8817
8922
|
case "end":
|
|
8818
|
-
return
|
|
8923
|
+
return _context35.stop();
|
|
8819
8924
|
}
|
|
8820
8925
|
}
|
|
8821
|
-
},
|
|
8926
|
+
}, _callee35, this);
|
|
8822
8927
|
}));
|
|
8823
8928
|
|
|
8824
|
-
function banUser(
|
|
8929
|
+
function banUser(_x44, _x45) {
|
|
8825
8930
|
return _banUser.apply(this, arguments);
|
|
8826
8931
|
}
|
|
8827
8932
|
|
|
@@ -8837,28 +8942,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8837
8942
|
}, {
|
|
8838
8943
|
key: "unbanUser",
|
|
8839
8944
|
value: function () {
|
|
8840
|
-
var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8841
|
-
return _regeneratorRuntime.wrap(function
|
|
8945
|
+
var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(targetUserID, options) {
|
|
8946
|
+
return _regeneratorRuntime.wrap(function _callee36$(_context36) {
|
|
8842
8947
|
while (1) {
|
|
8843
|
-
switch (
|
|
8948
|
+
switch (_context36.prev = _context36.next) {
|
|
8844
8949
|
case 0:
|
|
8845
|
-
|
|
8950
|
+
_context36.next = 2;
|
|
8846
8951
|
return this.delete(this.baseURL + '/moderation/ban', _objectSpread({
|
|
8847
8952
|
target_user_id: targetUserID
|
|
8848
8953
|
}, options));
|
|
8849
8954
|
|
|
8850
8955
|
case 2:
|
|
8851
|
-
return
|
|
8956
|
+
return _context36.abrupt("return", _context36.sent);
|
|
8852
8957
|
|
|
8853
8958
|
case 3:
|
|
8854
8959
|
case "end":
|
|
8855
|
-
return
|
|
8960
|
+
return _context36.stop();
|
|
8856
8961
|
}
|
|
8857
8962
|
}
|
|
8858
|
-
},
|
|
8963
|
+
}, _callee36, this);
|
|
8859
8964
|
}));
|
|
8860
8965
|
|
|
8861
|
-
function unbanUser(
|
|
8966
|
+
function unbanUser(_x46, _x47) {
|
|
8862
8967
|
return _unbanUser.apply(this, arguments);
|
|
8863
8968
|
}
|
|
8864
8969
|
|
|
@@ -8874,28 +8979,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8874
8979
|
}, {
|
|
8875
8980
|
key: "shadowBan",
|
|
8876
8981
|
value: function () {
|
|
8877
|
-
var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8878
|
-
return _regeneratorRuntime.wrap(function
|
|
8982
|
+
var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(targetUserID, options) {
|
|
8983
|
+
return _regeneratorRuntime.wrap(function _callee37$(_context37) {
|
|
8879
8984
|
while (1) {
|
|
8880
|
-
switch (
|
|
8985
|
+
switch (_context37.prev = _context37.next) {
|
|
8881
8986
|
case 0:
|
|
8882
|
-
|
|
8987
|
+
_context37.next = 2;
|
|
8883
8988
|
return this.banUser(targetUserID, _objectSpread({
|
|
8884
8989
|
shadow: true
|
|
8885
8990
|
}, options));
|
|
8886
8991
|
|
|
8887
8992
|
case 2:
|
|
8888
|
-
return
|
|
8993
|
+
return _context37.abrupt("return", _context37.sent);
|
|
8889
8994
|
|
|
8890
8995
|
case 3:
|
|
8891
8996
|
case "end":
|
|
8892
|
-
return
|
|
8997
|
+
return _context37.stop();
|
|
8893
8998
|
}
|
|
8894
8999
|
}
|
|
8895
|
-
},
|
|
9000
|
+
}, _callee37, this);
|
|
8896
9001
|
}));
|
|
8897
9002
|
|
|
8898
|
-
function shadowBan(
|
|
9003
|
+
function shadowBan(_x48, _x49) {
|
|
8899
9004
|
return _shadowBan.apply(this, arguments);
|
|
8900
9005
|
}
|
|
8901
9006
|
|
|
@@ -8911,28 +9016,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8911
9016
|
}, {
|
|
8912
9017
|
key: "removeShadowBan",
|
|
8913
9018
|
value: function () {
|
|
8914
|
-
var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8915
|
-
return _regeneratorRuntime.wrap(function
|
|
9019
|
+
var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(targetUserID, options) {
|
|
9020
|
+
return _regeneratorRuntime.wrap(function _callee38$(_context38) {
|
|
8916
9021
|
while (1) {
|
|
8917
|
-
switch (
|
|
9022
|
+
switch (_context38.prev = _context38.next) {
|
|
8918
9023
|
case 0:
|
|
8919
|
-
|
|
9024
|
+
_context38.next = 2;
|
|
8920
9025
|
return this.unbanUser(targetUserID, _objectSpread({
|
|
8921
9026
|
shadow: true
|
|
8922
9027
|
}, options));
|
|
8923
9028
|
|
|
8924
9029
|
case 2:
|
|
8925
|
-
return
|
|
9030
|
+
return _context38.abrupt("return", _context38.sent);
|
|
8926
9031
|
|
|
8927
9032
|
case 3:
|
|
8928
9033
|
case "end":
|
|
8929
|
-
return
|
|
9034
|
+
return _context38.stop();
|
|
8930
9035
|
}
|
|
8931
9036
|
}
|
|
8932
|
-
},
|
|
9037
|
+
}, _callee38, this);
|
|
8933
9038
|
}));
|
|
8934
9039
|
|
|
8935
|
-
function removeShadowBan(
|
|
9040
|
+
function removeShadowBan(_x50, _x51) {
|
|
8936
9041
|
return _removeShadowBan.apply(this, arguments);
|
|
8937
9042
|
}
|
|
8938
9043
|
|
|
@@ -8949,15 +9054,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8949
9054
|
}, {
|
|
8950
9055
|
key: "muteUser",
|
|
8951
9056
|
value: function () {
|
|
8952
|
-
var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9057
|
+
var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(targetID, userID) {
|
|
8953
9058
|
var options,
|
|
8954
|
-
|
|
8955
|
-
return _regeneratorRuntime.wrap(function
|
|
9059
|
+
_args39 = arguments;
|
|
9060
|
+
return _regeneratorRuntime.wrap(function _callee39$(_context39) {
|
|
8956
9061
|
while (1) {
|
|
8957
|
-
switch (
|
|
9062
|
+
switch (_context39.prev = _context39.next) {
|
|
8958
9063
|
case 0:
|
|
8959
|
-
options =
|
|
8960
|
-
|
|
9064
|
+
options = _args39.length > 2 && _args39[2] !== undefined ? _args39[2] : {};
|
|
9065
|
+
_context39.next = 3;
|
|
8961
9066
|
return this.post(this.baseURL + '/moderation/mute', _objectSpread(_objectSpread({
|
|
8962
9067
|
target_id: targetID
|
|
8963
9068
|
}, userID ? {
|
|
@@ -8965,17 +9070,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8965
9070
|
} : {}), options));
|
|
8966
9071
|
|
|
8967
9072
|
case 3:
|
|
8968
|
-
return
|
|
9073
|
+
return _context39.abrupt("return", _context39.sent);
|
|
8969
9074
|
|
|
8970
9075
|
case 4:
|
|
8971
9076
|
case "end":
|
|
8972
|
-
return
|
|
9077
|
+
return _context39.stop();
|
|
8973
9078
|
}
|
|
8974
9079
|
}
|
|
8975
|
-
},
|
|
9080
|
+
}, _callee39, this);
|
|
8976
9081
|
}));
|
|
8977
9082
|
|
|
8978
|
-
function muteUser(
|
|
9083
|
+
function muteUser(_x52, _x53) {
|
|
8979
9084
|
return _muteUser.apply(this, arguments);
|
|
8980
9085
|
}
|
|
8981
9086
|
|
|
@@ -8991,12 +9096,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8991
9096
|
}, {
|
|
8992
9097
|
key: "unmuteUser",
|
|
8993
9098
|
value: function () {
|
|
8994
|
-
var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8995
|
-
return _regeneratorRuntime.wrap(function
|
|
9099
|
+
var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(targetID, currentUserID) {
|
|
9100
|
+
return _regeneratorRuntime.wrap(function _callee40$(_context40) {
|
|
8996
9101
|
while (1) {
|
|
8997
|
-
switch (
|
|
9102
|
+
switch (_context40.prev = _context40.next) {
|
|
8998
9103
|
case 0:
|
|
8999
|
-
|
|
9104
|
+
_context40.next = 2;
|
|
9000
9105
|
return this.post(this.baseURL + '/moderation/unmute', _objectSpread({
|
|
9001
9106
|
target_id: targetID
|
|
9002
9107
|
}, currentUserID ? {
|
|
@@ -9004,17 +9109,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9004
9109
|
} : {}));
|
|
9005
9110
|
|
|
9006
9111
|
case 2:
|
|
9007
|
-
return
|
|
9112
|
+
return _context40.abrupt("return", _context40.sent);
|
|
9008
9113
|
|
|
9009
9114
|
case 3:
|
|
9010
9115
|
case "end":
|
|
9011
|
-
return
|
|
9116
|
+
return _context40.stop();
|
|
9012
9117
|
}
|
|
9013
9118
|
}
|
|
9014
|
-
},
|
|
9119
|
+
}, _callee40, this);
|
|
9015
9120
|
}));
|
|
9016
9121
|
|
|
9017
|
-
function unmuteUser(
|
|
9122
|
+
function unmuteUser(_x54, _x55) {
|
|
9018
9123
|
return _unmuteUser.apply(this, arguments);
|
|
9019
9124
|
}
|
|
9020
9125
|
|
|
@@ -9049,31 +9154,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9049
9154
|
}, {
|
|
9050
9155
|
key: "flagMessage",
|
|
9051
9156
|
value: function () {
|
|
9052
|
-
var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9157
|
+
var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(targetMessageID) {
|
|
9053
9158
|
var options,
|
|
9054
|
-
|
|
9055
|
-
return _regeneratorRuntime.wrap(function
|
|
9159
|
+
_args41 = arguments;
|
|
9160
|
+
return _regeneratorRuntime.wrap(function _callee41$(_context41) {
|
|
9056
9161
|
while (1) {
|
|
9057
|
-
switch (
|
|
9162
|
+
switch (_context41.prev = _context41.next) {
|
|
9058
9163
|
case 0:
|
|
9059
|
-
options =
|
|
9060
|
-
|
|
9164
|
+
options = _args41.length > 1 && _args41[1] !== undefined ? _args41[1] : {};
|
|
9165
|
+
_context41.next = 3;
|
|
9061
9166
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
9062
9167
|
target_message_id: targetMessageID
|
|
9063
9168
|
}, options));
|
|
9064
9169
|
|
|
9065
9170
|
case 3:
|
|
9066
|
-
return
|
|
9171
|
+
return _context41.abrupt("return", _context41.sent);
|
|
9067
9172
|
|
|
9068
9173
|
case 4:
|
|
9069
9174
|
case "end":
|
|
9070
|
-
return
|
|
9175
|
+
return _context41.stop();
|
|
9071
9176
|
}
|
|
9072
9177
|
}
|
|
9073
|
-
},
|
|
9178
|
+
}, _callee41, this);
|
|
9074
9179
|
}));
|
|
9075
9180
|
|
|
9076
|
-
function flagMessage(
|
|
9181
|
+
function flagMessage(_x56) {
|
|
9077
9182
|
return _flagMessage.apply(this, arguments);
|
|
9078
9183
|
}
|
|
9079
9184
|
|
|
@@ -9089,31 +9194,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9089
9194
|
}, {
|
|
9090
9195
|
key: "flagUser",
|
|
9091
9196
|
value: function () {
|
|
9092
|
-
var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9197
|
+
var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(targetID) {
|
|
9093
9198
|
var options,
|
|
9094
|
-
|
|
9095
|
-
return _regeneratorRuntime.wrap(function
|
|
9199
|
+
_args42 = arguments;
|
|
9200
|
+
return _regeneratorRuntime.wrap(function _callee42$(_context42) {
|
|
9096
9201
|
while (1) {
|
|
9097
|
-
switch (
|
|
9202
|
+
switch (_context42.prev = _context42.next) {
|
|
9098
9203
|
case 0:
|
|
9099
|
-
options =
|
|
9100
|
-
|
|
9204
|
+
options = _args42.length > 1 && _args42[1] !== undefined ? _args42[1] : {};
|
|
9205
|
+
_context42.next = 3;
|
|
9101
9206
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
9102
9207
|
target_user_id: targetID
|
|
9103
9208
|
}, options));
|
|
9104
9209
|
|
|
9105
9210
|
case 3:
|
|
9106
|
-
return
|
|
9211
|
+
return _context42.abrupt("return", _context42.sent);
|
|
9107
9212
|
|
|
9108
9213
|
case 4:
|
|
9109
9214
|
case "end":
|
|
9110
|
-
return
|
|
9215
|
+
return _context42.stop();
|
|
9111
9216
|
}
|
|
9112
9217
|
}
|
|
9113
|
-
},
|
|
9218
|
+
}, _callee42, this);
|
|
9114
9219
|
}));
|
|
9115
9220
|
|
|
9116
|
-
function flagUser(
|
|
9221
|
+
function flagUser(_x57) {
|
|
9117
9222
|
return _flagUser.apply(this, arguments);
|
|
9118
9223
|
}
|
|
9119
9224
|
|
|
@@ -9129,31 +9234,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9129
9234
|
}, {
|
|
9130
9235
|
key: "unflagMessage",
|
|
9131
9236
|
value: function () {
|
|
9132
|
-
var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9237
|
+
var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(targetMessageID) {
|
|
9133
9238
|
var options,
|
|
9134
|
-
|
|
9135
|
-
return _regeneratorRuntime.wrap(function
|
|
9239
|
+
_args43 = arguments;
|
|
9240
|
+
return _regeneratorRuntime.wrap(function _callee43$(_context43) {
|
|
9136
9241
|
while (1) {
|
|
9137
|
-
switch (
|
|
9242
|
+
switch (_context43.prev = _context43.next) {
|
|
9138
9243
|
case 0:
|
|
9139
|
-
options =
|
|
9140
|
-
|
|
9244
|
+
options = _args43.length > 1 && _args43[1] !== undefined ? _args43[1] : {};
|
|
9245
|
+
_context43.next = 3;
|
|
9141
9246
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
9142
9247
|
target_message_id: targetMessageID
|
|
9143
9248
|
}, options));
|
|
9144
9249
|
|
|
9145
9250
|
case 3:
|
|
9146
|
-
return
|
|
9251
|
+
return _context43.abrupt("return", _context43.sent);
|
|
9147
9252
|
|
|
9148
9253
|
case 4:
|
|
9149
9254
|
case "end":
|
|
9150
|
-
return
|
|
9255
|
+
return _context43.stop();
|
|
9151
9256
|
}
|
|
9152
9257
|
}
|
|
9153
|
-
},
|
|
9258
|
+
}, _callee43, this);
|
|
9154
9259
|
}));
|
|
9155
9260
|
|
|
9156
|
-
function unflagMessage(
|
|
9261
|
+
function unflagMessage(_x58) {
|
|
9157
9262
|
return _unflagMessage.apply(this, arguments);
|
|
9158
9263
|
}
|
|
9159
9264
|
|
|
@@ -9169,31 +9274,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9169
9274
|
}, {
|
|
9170
9275
|
key: "unflagUser",
|
|
9171
9276
|
value: function () {
|
|
9172
|
-
var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9277
|
+
var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(targetID) {
|
|
9173
9278
|
var options,
|
|
9174
|
-
|
|
9175
|
-
return _regeneratorRuntime.wrap(function
|
|
9279
|
+
_args44 = arguments;
|
|
9280
|
+
return _regeneratorRuntime.wrap(function _callee44$(_context44) {
|
|
9176
9281
|
while (1) {
|
|
9177
|
-
switch (
|
|
9282
|
+
switch (_context44.prev = _context44.next) {
|
|
9178
9283
|
case 0:
|
|
9179
|
-
options =
|
|
9180
|
-
|
|
9284
|
+
options = _args44.length > 1 && _args44[1] !== undefined ? _args44[1] : {};
|
|
9285
|
+
_context44.next = 3;
|
|
9181
9286
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
9182
9287
|
target_user_id: targetID
|
|
9183
9288
|
}, options));
|
|
9184
9289
|
|
|
9185
9290
|
case 3:
|
|
9186
|
-
return
|
|
9291
|
+
return _context44.abrupt("return", _context44.sent);
|
|
9187
9292
|
|
|
9188
9293
|
case 4:
|
|
9189
9294
|
case "end":
|
|
9190
|
-
return
|
|
9295
|
+
return _context44.stop();
|
|
9191
9296
|
}
|
|
9192
9297
|
}
|
|
9193
|
-
},
|
|
9298
|
+
}, _callee44, this);
|
|
9194
9299
|
}));
|
|
9195
9300
|
|
|
9196
|
-
function unflagUser(
|
|
9301
|
+
function unflagUser(_x59) {
|
|
9197
9302
|
return _unflagUser.apply(this, arguments);
|
|
9198
9303
|
}
|
|
9199
9304
|
|
|
@@ -9210,29 +9315,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9210
9315
|
}, {
|
|
9211
9316
|
key: "getCallToken",
|
|
9212
9317
|
value: function () {
|
|
9213
|
-
var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9318
|
+
var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(callID) {
|
|
9214
9319
|
var options,
|
|
9215
|
-
|
|
9216
|
-
return _regeneratorRuntime.wrap(function
|
|
9320
|
+
_args45 = arguments;
|
|
9321
|
+
return _regeneratorRuntime.wrap(function _callee45$(_context45) {
|
|
9217
9322
|
while (1) {
|
|
9218
|
-
switch (
|
|
9323
|
+
switch (_context45.prev = _context45.next) {
|
|
9219
9324
|
case 0:
|
|
9220
|
-
options =
|
|
9221
|
-
|
|
9325
|
+
options = _args45.length > 1 && _args45[1] !== undefined ? _args45[1] : {};
|
|
9326
|
+
_context45.next = 3;
|
|
9222
9327
|
return this.post(this.baseURL + "/calls/".concat(callID), _objectSpread({}, options));
|
|
9223
9328
|
|
|
9224
9329
|
case 3:
|
|
9225
|
-
return
|
|
9330
|
+
return _context45.abrupt("return", _context45.sent);
|
|
9226
9331
|
|
|
9227
9332
|
case 4:
|
|
9228
9333
|
case "end":
|
|
9229
|
-
return
|
|
9334
|
+
return _context45.stop();
|
|
9230
9335
|
}
|
|
9231
9336
|
}
|
|
9232
|
-
},
|
|
9337
|
+
}, _callee45, this);
|
|
9233
9338
|
}));
|
|
9234
9339
|
|
|
9235
|
-
function getCallToken(
|
|
9340
|
+
function getCallToken(_x60) {
|
|
9236
9341
|
return _getCallToken.apply(this, arguments);
|
|
9237
9342
|
}
|
|
9238
9343
|
|
|
@@ -9255,30 +9360,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9255
9360
|
}, {
|
|
9256
9361
|
key: "_queryFlags",
|
|
9257
9362
|
value: function () {
|
|
9258
|
-
var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9363
|
+
var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46() {
|
|
9259
9364
|
var filterConditions,
|
|
9260
9365
|
options,
|
|
9261
|
-
|
|
9262
|
-
return _regeneratorRuntime.wrap(function
|
|
9366
|
+
_args46 = arguments;
|
|
9367
|
+
return _regeneratorRuntime.wrap(function _callee46$(_context46) {
|
|
9263
9368
|
while (1) {
|
|
9264
|
-
switch (
|
|
9369
|
+
switch (_context46.prev = _context46.next) {
|
|
9265
9370
|
case 0:
|
|
9266
|
-
filterConditions =
|
|
9267
|
-
options =
|
|
9268
|
-
|
|
9371
|
+
filterConditions = _args46.length > 0 && _args46[0] !== undefined ? _args46[0] : {};
|
|
9372
|
+
options = _args46.length > 1 && _args46[1] !== undefined ? _args46[1] : {};
|
|
9373
|
+
_context46.next = 4;
|
|
9269
9374
|
return this.post(this.baseURL + '/moderation/flags', _objectSpread({
|
|
9270
9375
|
filter_conditions: filterConditions
|
|
9271
9376
|
}, options));
|
|
9272
9377
|
|
|
9273
9378
|
case 4:
|
|
9274
|
-
return
|
|
9379
|
+
return _context46.abrupt("return", _context46.sent);
|
|
9275
9380
|
|
|
9276
9381
|
case 5:
|
|
9277
9382
|
case "end":
|
|
9278
|
-
return
|
|
9383
|
+
return _context46.stop();
|
|
9279
9384
|
}
|
|
9280
9385
|
}
|
|
9281
|
-
},
|
|
9386
|
+
}, _callee46, this);
|
|
9282
9387
|
}));
|
|
9283
9388
|
|
|
9284
9389
|
function _queryFlags() {
|
|
@@ -9304,30 +9409,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9304
9409
|
}, {
|
|
9305
9410
|
key: "_queryFlagReports",
|
|
9306
9411
|
value: function () {
|
|
9307
|
-
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9412
|
+
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47() {
|
|
9308
9413
|
var filterConditions,
|
|
9309
9414
|
options,
|
|
9310
|
-
|
|
9311
|
-
return _regeneratorRuntime.wrap(function
|
|
9415
|
+
_args47 = arguments;
|
|
9416
|
+
return _regeneratorRuntime.wrap(function _callee47$(_context47) {
|
|
9312
9417
|
while (1) {
|
|
9313
|
-
switch (
|
|
9418
|
+
switch (_context47.prev = _context47.next) {
|
|
9314
9419
|
case 0:
|
|
9315
|
-
filterConditions =
|
|
9316
|
-
options =
|
|
9317
|
-
|
|
9420
|
+
filterConditions = _args47.length > 0 && _args47[0] !== undefined ? _args47[0] : {};
|
|
9421
|
+
options = _args47.length > 1 && _args47[1] !== undefined ? _args47[1] : {};
|
|
9422
|
+
_context47.next = 4;
|
|
9318
9423
|
return this.post(this.baseURL + '/moderation/reports', _objectSpread({
|
|
9319
9424
|
filter_conditions: filterConditions
|
|
9320
9425
|
}, options));
|
|
9321
9426
|
|
|
9322
9427
|
case 4:
|
|
9323
|
-
return
|
|
9428
|
+
return _context47.abrupt("return", _context47.sent);
|
|
9324
9429
|
|
|
9325
9430
|
case 5:
|
|
9326
9431
|
case "end":
|
|
9327
|
-
return
|
|
9432
|
+
return _context47.stop();
|
|
9328
9433
|
}
|
|
9329
9434
|
}
|
|
9330
|
-
},
|
|
9435
|
+
}, _callee47, this);
|
|
9331
9436
|
}));
|
|
9332
9437
|
|
|
9333
9438
|
function _queryFlagReports() {
|
|
@@ -9354,31 +9459,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9354
9459
|
}, {
|
|
9355
9460
|
key: "_reviewFlagReport",
|
|
9356
9461
|
value: function () {
|
|
9357
|
-
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9462
|
+
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(id, reviewResult) {
|
|
9358
9463
|
var options,
|
|
9359
|
-
|
|
9360
|
-
return _regeneratorRuntime.wrap(function
|
|
9464
|
+
_args48 = arguments;
|
|
9465
|
+
return _regeneratorRuntime.wrap(function _callee48$(_context48) {
|
|
9361
9466
|
while (1) {
|
|
9362
|
-
switch (
|
|
9467
|
+
switch (_context48.prev = _context48.next) {
|
|
9363
9468
|
case 0:
|
|
9364
|
-
options =
|
|
9365
|
-
|
|
9469
|
+
options = _args48.length > 2 && _args48[2] !== undefined ? _args48[2] : {};
|
|
9470
|
+
_context48.next = 3;
|
|
9366
9471
|
return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
|
|
9367
9472
|
review_result: reviewResult
|
|
9368
9473
|
}, options));
|
|
9369
9474
|
|
|
9370
9475
|
case 3:
|
|
9371
|
-
return
|
|
9476
|
+
return _context48.abrupt("return", _context48.sent);
|
|
9372
9477
|
|
|
9373
9478
|
case 4:
|
|
9374
9479
|
case "end":
|
|
9375
|
-
return
|
|
9480
|
+
return _context48.stop();
|
|
9376
9481
|
}
|
|
9377
9482
|
}
|
|
9378
|
-
},
|
|
9483
|
+
}, _callee48, this);
|
|
9379
9484
|
}));
|
|
9380
9485
|
|
|
9381
|
-
function _reviewFlagReport(
|
|
9486
|
+
function _reviewFlagReport(_x61, _x62) {
|
|
9382
9487
|
return _reviewFlagReport2.apply(this, arguments);
|
|
9383
9488
|
}
|
|
9384
9489
|
|
|
@@ -9400,31 +9505,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9400
9505
|
}, {
|
|
9401
9506
|
key: "_unblockMessage",
|
|
9402
9507
|
value: function () {
|
|
9403
|
-
var _unblockMessage2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9508
|
+
var _unblockMessage2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(targetMessageID) {
|
|
9404
9509
|
var options,
|
|
9405
|
-
|
|
9406
|
-
return _regeneratorRuntime.wrap(function
|
|
9510
|
+
_args49 = arguments;
|
|
9511
|
+
return _regeneratorRuntime.wrap(function _callee49$(_context49) {
|
|
9407
9512
|
while (1) {
|
|
9408
|
-
switch (
|
|
9513
|
+
switch (_context49.prev = _context49.next) {
|
|
9409
9514
|
case 0:
|
|
9410
|
-
options =
|
|
9411
|
-
|
|
9515
|
+
options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
|
|
9516
|
+
_context49.next = 3;
|
|
9412
9517
|
return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
|
|
9413
9518
|
target_message_id: targetMessageID
|
|
9414
9519
|
}, options));
|
|
9415
9520
|
|
|
9416
9521
|
case 3:
|
|
9417
|
-
return
|
|
9522
|
+
return _context49.abrupt("return", _context49.sent);
|
|
9418
9523
|
|
|
9419
9524
|
case 4:
|
|
9420
9525
|
case "end":
|
|
9421
|
-
return
|
|
9526
|
+
return _context49.stop();
|
|
9422
9527
|
}
|
|
9423
9528
|
}
|
|
9424
|
-
},
|
|
9529
|
+
}, _callee49, this);
|
|
9425
9530
|
}));
|
|
9426
9531
|
|
|
9427
|
-
function _unblockMessage(
|
|
9532
|
+
function _unblockMessage(_x63) {
|
|
9428
9533
|
return _unblockMessage2.apply(this, arguments);
|
|
9429
9534
|
}
|
|
9430
9535
|
|
|
@@ -9451,23 +9556,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9451
9556
|
* @return {Promise<APIResponse>}
|
|
9452
9557
|
*/
|
|
9453
9558
|
function () {
|
|
9454
|
-
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9559
|
+
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50() {
|
|
9455
9560
|
var data,
|
|
9456
|
-
|
|
9457
|
-
return _regeneratorRuntime.wrap(function
|
|
9561
|
+
_args50 = arguments;
|
|
9562
|
+
return _regeneratorRuntime.wrap(function _callee50$(_context50) {
|
|
9458
9563
|
while (1) {
|
|
9459
|
-
switch (
|
|
9564
|
+
switch (_context50.prev = _context50.next) {
|
|
9460
9565
|
case 0:
|
|
9461
|
-
data =
|
|
9462
|
-
|
|
9566
|
+
data = _args50.length > 0 && _args50[0] !== undefined ? _args50[0] : {};
|
|
9567
|
+
_context50.next = 3;
|
|
9463
9568
|
return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
|
|
9464
9569
|
|
|
9465
9570
|
case 3:
|
|
9466
9571
|
case "end":
|
|
9467
|
-
return
|
|
9572
|
+
return _context50.stop();
|
|
9468
9573
|
}
|
|
9469
9574
|
}
|
|
9470
|
-
},
|
|
9575
|
+
}, _callee50, this);
|
|
9471
9576
|
}));
|
|
9472
9577
|
|
|
9473
9578
|
function markChannelsRead() {
|
|
@@ -9542,28 +9647,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9542
9647
|
}, {
|
|
9543
9648
|
key: "translateMessage",
|
|
9544
9649
|
value: function () {
|
|
9545
|
-
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9546
|
-
return _regeneratorRuntime.wrap(function
|
|
9650
|
+
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(messageId, language) {
|
|
9651
|
+
return _regeneratorRuntime.wrap(function _callee51$(_context51) {
|
|
9547
9652
|
while (1) {
|
|
9548
|
-
switch (
|
|
9653
|
+
switch (_context51.prev = _context51.next) {
|
|
9549
9654
|
case 0:
|
|
9550
|
-
|
|
9655
|
+
_context51.next = 2;
|
|
9551
9656
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
|
|
9552
9657
|
language: language
|
|
9553
9658
|
});
|
|
9554
9659
|
|
|
9555
9660
|
case 2:
|
|
9556
|
-
return
|
|
9661
|
+
return _context51.abrupt("return", _context51.sent);
|
|
9557
9662
|
|
|
9558
9663
|
case 3:
|
|
9559
9664
|
case "end":
|
|
9560
|
-
return
|
|
9665
|
+
return _context51.stop();
|
|
9561
9666
|
}
|
|
9562
9667
|
}
|
|
9563
|
-
},
|
|
9668
|
+
}, _callee51, this);
|
|
9564
9669
|
}));
|
|
9565
9670
|
|
|
9566
|
-
function translateMessage(
|
|
9671
|
+
function translateMessage(_x64, _x65) {
|
|
9567
9672
|
return _translateMessage.apply(this, arguments);
|
|
9568
9673
|
}
|
|
9569
9674
|
|
|
@@ -9665,14 +9770,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9665
9770
|
}, {
|
|
9666
9771
|
key: "updateMessage",
|
|
9667
9772
|
value: function () {
|
|
9668
|
-
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9773
|
+
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(message, userId, options) {
|
|
9669
9774
|
var clonedMessage, reservedMessageFields;
|
|
9670
|
-
return _regeneratorRuntime.wrap(function
|
|
9775
|
+
return _regeneratorRuntime.wrap(function _callee52$(_context52) {
|
|
9671
9776
|
while (1) {
|
|
9672
|
-
switch (
|
|
9777
|
+
switch (_context52.prev = _context52.next) {
|
|
9673
9778
|
case 0:
|
|
9674
9779
|
if (message.id) {
|
|
9675
|
-
|
|
9780
|
+
_context52.next = 2;
|
|
9676
9781
|
break;
|
|
9677
9782
|
}
|
|
9678
9783
|
|
|
@@ -9709,23 +9814,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9709
9814
|
});
|
|
9710
9815
|
}
|
|
9711
9816
|
|
|
9712
|
-
|
|
9817
|
+
_context52.next = 10;
|
|
9713
9818
|
return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
|
|
9714
9819
|
message: clonedMessage
|
|
9715
9820
|
}, options));
|
|
9716
9821
|
|
|
9717
9822
|
case 10:
|
|
9718
|
-
return
|
|
9823
|
+
return _context52.abrupt("return", _context52.sent);
|
|
9719
9824
|
|
|
9720
9825
|
case 11:
|
|
9721
9826
|
case "end":
|
|
9722
|
-
return
|
|
9827
|
+
return _context52.stop();
|
|
9723
9828
|
}
|
|
9724
9829
|
}
|
|
9725
|
-
},
|
|
9830
|
+
}, _callee52, this);
|
|
9726
9831
|
}));
|
|
9727
9832
|
|
|
9728
|
-
function updateMessage(
|
|
9833
|
+
function updateMessage(_x66, _x67, _x68) {
|
|
9729
9834
|
return _updateMessage.apply(this, arguments);
|
|
9730
9835
|
}
|
|
9731
9836
|
|
|
@@ -9748,14 +9853,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9748
9853
|
}, {
|
|
9749
9854
|
key: "partialUpdateMessage",
|
|
9750
9855
|
value: function () {
|
|
9751
|
-
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9856
|
+
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(id, partialMessageObject, userId, options) {
|
|
9752
9857
|
var user;
|
|
9753
|
-
return _regeneratorRuntime.wrap(function
|
|
9858
|
+
return _regeneratorRuntime.wrap(function _callee53$(_context53) {
|
|
9754
9859
|
while (1) {
|
|
9755
|
-
switch (
|
|
9860
|
+
switch (_context53.prev = _context53.next) {
|
|
9756
9861
|
case 0:
|
|
9757
9862
|
if (id) {
|
|
9758
|
-
|
|
9863
|
+
_context53.next = 2;
|
|
9759
9864
|
break;
|
|
9760
9865
|
}
|
|
9761
9866
|
|
|
@@ -9770,23 +9875,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9770
9875
|
};
|
|
9771
9876
|
}
|
|
9772
9877
|
|
|
9773
|
-
|
|
9878
|
+
_context53.next = 6;
|
|
9774
9879
|
return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
9775
9880
|
user: user
|
|
9776
9881
|
}));
|
|
9777
9882
|
|
|
9778
9883
|
case 6:
|
|
9779
|
-
return
|
|
9884
|
+
return _context53.abrupt("return", _context53.sent);
|
|
9780
9885
|
|
|
9781
9886
|
case 7:
|
|
9782
9887
|
case "end":
|
|
9783
|
-
return
|
|
9888
|
+
return _context53.stop();
|
|
9784
9889
|
}
|
|
9785
9890
|
}
|
|
9786
|
-
},
|
|
9891
|
+
}, _callee53, this);
|
|
9787
9892
|
}));
|
|
9788
9893
|
|
|
9789
|
-
function partialUpdateMessage(
|
|
9894
|
+
function partialUpdateMessage(_x69, _x70, _x71, _x72) {
|
|
9790
9895
|
return _partialUpdateMessage.apply(this, arguments);
|
|
9791
9896
|
}
|
|
9792
9897
|
|
|
@@ -9795,11 +9900,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9795
9900
|
}, {
|
|
9796
9901
|
key: "deleteMessage",
|
|
9797
9902
|
value: function () {
|
|
9798
|
-
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9903
|
+
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(messageID, hardDelete) {
|
|
9799
9904
|
var params;
|
|
9800
|
-
return _regeneratorRuntime.wrap(function
|
|
9905
|
+
return _regeneratorRuntime.wrap(function _callee54$(_context54) {
|
|
9801
9906
|
while (1) {
|
|
9802
|
-
switch (
|
|
9907
|
+
switch (_context54.prev = _context54.next) {
|
|
9803
9908
|
case 0:
|
|
9804
9909
|
params = {};
|
|
9805
9910
|
|
|
@@ -9809,21 +9914,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9809
9914
|
};
|
|
9810
9915
|
}
|
|
9811
9916
|
|
|
9812
|
-
|
|
9917
|
+
_context54.next = 4;
|
|
9813
9918
|
return this.delete(this.baseURL + "/messages/".concat(messageID), params);
|
|
9814
9919
|
|
|
9815
9920
|
case 4:
|
|
9816
|
-
return
|
|
9921
|
+
return _context54.abrupt("return", _context54.sent);
|
|
9817
9922
|
|
|
9818
9923
|
case 5:
|
|
9819
9924
|
case "end":
|
|
9820
|
-
return
|
|
9925
|
+
return _context54.stop();
|
|
9821
9926
|
}
|
|
9822
9927
|
}
|
|
9823
|
-
},
|
|
9928
|
+
}, _callee54, this);
|
|
9824
9929
|
}));
|
|
9825
9930
|
|
|
9826
|
-
function deleteMessage(
|
|
9931
|
+
function deleteMessage(_x73, _x74) {
|
|
9827
9932
|
return _deleteMessage.apply(this, arguments);
|
|
9828
9933
|
}
|
|
9829
9934
|
|
|
@@ -9832,26 +9937,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9832
9937
|
}, {
|
|
9833
9938
|
key: "getMessage",
|
|
9834
9939
|
value: function () {
|
|
9835
|
-
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9836
|
-
return _regeneratorRuntime.wrap(function
|
|
9940
|
+
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(messageID) {
|
|
9941
|
+
return _regeneratorRuntime.wrap(function _callee55$(_context55) {
|
|
9837
9942
|
while (1) {
|
|
9838
|
-
switch (
|
|
9943
|
+
switch (_context55.prev = _context55.next) {
|
|
9839
9944
|
case 0:
|
|
9840
|
-
|
|
9945
|
+
_context55.next = 2;
|
|
9841
9946
|
return this.get(this.baseURL + "/messages/".concat(messageID));
|
|
9842
9947
|
|
|
9843
9948
|
case 2:
|
|
9844
|
-
return
|
|
9949
|
+
return _context55.abrupt("return", _context55.sent);
|
|
9845
9950
|
|
|
9846
9951
|
case 3:
|
|
9847
9952
|
case "end":
|
|
9848
|
-
return
|
|
9953
|
+
return _context55.stop();
|
|
9849
9954
|
}
|
|
9850
9955
|
}
|
|
9851
|
-
},
|
|
9956
|
+
}, _callee55, this);
|
|
9852
9957
|
}));
|
|
9853
9958
|
|
|
9854
|
-
function getMessage(
|
|
9959
|
+
function getMessage(_x75) {
|
|
9855
9960
|
return _getMessage.apply(this, arguments);
|
|
9856
9961
|
}
|
|
9857
9962
|
|
|
@@ -9860,7 +9965,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9860
9965
|
}, {
|
|
9861
9966
|
key: "getUserAgent",
|
|
9862
9967
|
value: function getUserAgent() {
|
|
9863
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
9968
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.2.0");
|
|
9864
9969
|
}
|
|
9865
9970
|
}, {
|
|
9866
9971
|
key: "setUserAgent",
|
|
@@ -10067,28 +10172,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10067
10172
|
}, {
|
|
10068
10173
|
key: "sendUserCustomEvent",
|
|
10069
10174
|
value: function () {
|
|
10070
|
-
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10071
|
-
return _regeneratorRuntime.wrap(function
|
|
10175
|
+
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(targetUserID, event) {
|
|
10176
|
+
return _regeneratorRuntime.wrap(function _callee56$(_context56) {
|
|
10072
10177
|
while (1) {
|
|
10073
|
-
switch (
|
|
10178
|
+
switch (_context56.prev = _context56.next) {
|
|
10074
10179
|
case 0:
|
|
10075
|
-
|
|
10180
|
+
_context56.next = 2;
|
|
10076
10181
|
return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
|
|
10077
10182
|
event: event
|
|
10078
10183
|
});
|
|
10079
10184
|
|
|
10080
10185
|
case 2:
|
|
10081
|
-
return
|
|
10186
|
+
return _context56.abrupt("return", _context56.sent);
|
|
10082
10187
|
|
|
10083
10188
|
case 3:
|
|
10084
10189
|
case "end":
|
|
10085
|
-
return
|
|
10190
|
+
return _context56.stop();
|
|
10086
10191
|
}
|
|
10087
10192
|
}
|
|
10088
|
-
},
|
|
10193
|
+
}, _callee56, this);
|
|
10089
10194
|
}));
|
|
10090
10195
|
|
|
10091
|
-
function sendUserCustomEvent(
|
|
10196
|
+
function sendUserCustomEvent(_x76, _x77) {
|
|
10092
10197
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
10093
10198
|
}
|
|
10094
10199
|
|
|
@@ -10156,32 +10261,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10156
10261
|
}, {
|
|
10157
10262
|
key: "createSegment",
|
|
10158
10263
|
value: function () {
|
|
10159
|
-
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10264
|
+
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(params) {
|
|
10160
10265
|
var _yield$this$post, segment;
|
|
10161
10266
|
|
|
10162
|
-
return _regeneratorRuntime.wrap(function
|
|
10267
|
+
return _regeneratorRuntime.wrap(function _callee57$(_context57) {
|
|
10163
10268
|
while (1) {
|
|
10164
|
-
switch (
|
|
10269
|
+
switch (_context57.prev = _context57.next) {
|
|
10165
10270
|
case 0:
|
|
10166
|
-
|
|
10271
|
+
_context57.next = 2;
|
|
10167
10272
|
return this.post(this.baseURL + "/segments", {
|
|
10168
10273
|
segment: params
|
|
10169
10274
|
});
|
|
10170
10275
|
|
|
10171
10276
|
case 2:
|
|
10172
|
-
_yield$this$post =
|
|
10277
|
+
_yield$this$post = _context57.sent;
|
|
10173
10278
|
segment = _yield$this$post.segment;
|
|
10174
|
-
return
|
|
10279
|
+
return _context57.abrupt("return", segment);
|
|
10175
10280
|
|
|
10176
10281
|
case 5:
|
|
10177
10282
|
case "end":
|
|
10178
|
-
return
|
|
10283
|
+
return _context57.stop();
|
|
10179
10284
|
}
|
|
10180
10285
|
}
|
|
10181
|
-
},
|
|
10286
|
+
}, _callee57, this);
|
|
10182
10287
|
}));
|
|
10183
10288
|
|
|
10184
|
-
function createSegment(
|
|
10289
|
+
function createSegment(_x78) {
|
|
10185
10290
|
return _createSegment.apply(this, arguments);
|
|
10186
10291
|
}
|
|
10187
10292
|
|
|
@@ -10197,15 +10302,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10197
10302
|
}, {
|
|
10198
10303
|
key: "querySegments",
|
|
10199
10304
|
value: function () {
|
|
10200
|
-
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10305
|
+
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(filters) {
|
|
10201
10306
|
var options,
|
|
10202
|
-
|
|
10203
|
-
return _regeneratorRuntime.wrap(function
|
|
10307
|
+
_args58 = arguments;
|
|
10308
|
+
return _regeneratorRuntime.wrap(function _callee58$(_context58) {
|
|
10204
10309
|
while (1) {
|
|
10205
|
-
switch (
|
|
10310
|
+
switch (_context58.prev = _context58.next) {
|
|
10206
10311
|
case 0:
|
|
10207
|
-
options =
|
|
10208
|
-
|
|
10312
|
+
options = _args58.length > 1 && _args58[1] !== undefined ? _args58[1] : {};
|
|
10313
|
+
_context58.next = 3;
|
|
10209
10314
|
return this.get(this.baseURL + "/segments", {
|
|
10210
10315
|
payload: _objectSpread({
|
|
10211
10316
|
filter_conditions: filters
|
|
@@ -10213,17 +10318,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10213
10318
|
});
|
|
10214
10319
|
|
|
10215
10320
|
case 3:
|
|
10216
|
-
return
|
|
10321
|
+
return _context58.abrupt("return", _context58.sent);
|
|
10217
10322
|
|
|
10218
10323
|
case 4:
|
|
10219
10324
|
case "end":
|
|
10220
|
-
return
|
|
10325
|
+
return _context58.stop();
|
|
10221
10326
|
}
|
|
10222
10327
|
}
|
|
10223
|
-
},
|
|
10328
|
+
}, _callee58, this);
|
|
10224
10329
|
}));
|
|
10225
10330
|
|
|
10226
|
-
function querySegments(
|
|
10331
|
+
function querySegments(_x79) {
|
|
10227
10332
|
return _querySegments.apply(this, arguments);
|
|
10228
10333
|
}
|
|
10229
10334
|
|
|
@@ -10241,32 +10346,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10241
10346
|
}, {
|
|
10242
10347
|
key: "updateSegment",
|
|
10243
10348
|
value: function () {
|
|
10244
|
-
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10349
|
+
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(id, params) {
|
|
10245
10350
|
var _yield$this$put, segment;
|
|
10246
10351
|
|
|
10247
|
-
return _regeneratorRuntime.wrap(function
|
|
10352
|
+
return _regeneratorRuntime.wrap(function _callee59$(_context59) {
|
|
10248
10353
|
while (1) {
|
|
10249
|
-
switch (
|
|
10354
|
+
switch (_context59.prev = _context59.next) {
|
|
10250
10355
|
case 0:
|
|
10251
|
-
|
|
10356
|
+
_context59.next = 2;
|
|
10252
10357
|
return this.put(this.baseURL + "/segments/".concat(id), {
|
|
10253
10358
|
segment: params
|
|
10254
10359
|
});
|
|
10255
10360
|
|
|
10256
10361
|
case 2:
|
|
10257
|
-
_yield$this$put =
|
|
10362
|
+
_yield$this$put = _context59.sent;
|
|
10258
10363
|
segment = _yield$this$put.segment;
|
|
10259
|
-
return
|
|
10364
|
+
return _context59.abrupt("return", segment);
|
|
10260
10365
|
|
|
10261
10366
|
case 5:
|
|
10262
10367
|
case "end":
|
|
10263
|
-
return
|
|
10368
|
+
return _context59.stop();
|
|
10264
10369
|
}
|
|
10265
10370
|
}
|
|
10266
|
-
},
|
|
10371
|
+
}, _callee59, this);
|
|
10267
10372
|
}));
|
|
10268
10373
|
|
|
10269
|
-
function updateSegment(
|
|
10374
|
+
function updateSegment(_x80, _x81) {
|
|
10270
10375
|
return _updateSegment.apply(this, arguments);
|
|
10271
10376
|
}
|
|
10272
10377
|
|
|
@@ -10283,22 +10388,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10283
10388
|
}, {
|
|
10284
10389
|
key: "deleteSegment",
|
|
10285
10390
|
value: function () {
|
|
10286
|
-
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10287
|
-
return _regeneratorRuntime.wrap(function
|
|
10391
|
+
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(id) {
|
|
10392
|
+
return _regeneratorRuntime.wrap(function _callee60$(_context60) {
|
|
10288
10393
|
while (1) {
|
|
10289
|
-
switch (
|
|
10394
|
+
switch (_context60.prev = _context60.next) {
|
|
10290
10395
|
case 0:
|
|
10291
|
-
return
|
|
10396
|
+
return _context60.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
|
|
10292
10397
|
|
|
10293
10398
|
case 1:
|
|
10294
10399
|
case "end":
|
|
10295
|
-
return
|
|
10400
|
+
return _context60.stop();
|
|
10296
10401
|
}
|
|
10297
10402
|
}
|
|
10298
|
-
},
|
|
10403
|
+
}, _callee60, this);
|
|
10299
10404
|
}));
|
|
10300
10405
|
|
|
10301
|
-
function deleteSegment(
|
|
10406
|
+
function deleteSegment(_x82) {
|
|
10302
10407
|
return _deleteSegment.apply(this, arguments);
|
|
10303
10408
|
}
|
|
10304
10409
|
|
|
@@ -10315,32 +10420,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10315
10420
|
}, {
|
|
10316
10421
|
key: "createCampaign",
|
|
10317
10422
|
value: function () {
|
|
10318
|
-
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10423
|
+
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(params) {
|
|
10319
10424
|
var _yield$this$post2, campaign;
|
|
10320
10425
|
|
|
10321
|
-
return _regeneratorRuntime.wrap(function
|
|
10426
|
+
return _regeneratorRuntime.wrap(function _callee61$(_context61) {
|
|
10322
10427
|
while (1) {
|
|
10323
|
-
switch (
|
|
10428
|
+
switch (_context61.prev = _context61.next) {
|
|
10324
10429
|
case 0:
|
|
10325
|
-
|
|
10430
|
+
_context61.next = 2;
|
|
10326
10431
|
return this.post(this.baseURL + "/campaigns", {
|
|
10327
10432
|
campaign: params
|
|
10328
10433
|
});
|
|
10329
10434
|
|
|
10330
10435
|
case 2:
|
|
10331
|
-
_yield$this$post2 =
|
|
10436
|
+
_yield$this$post2 = _context61.sent;
|
|
10332
10437
|
campaign = _yield$this$post2.campaign;
|
|
10333
|
-
return
|
|
10438
|
+
return _context61.abrupt("return", campaign);
|
|
10334
10439
|
|
|
10335
10440
|
case 5:
|
|
10336
10441
|
case "end":
|
|
10337
|
-
return
|
|
10442
|
+
return _context61.stop();
|
|
10338
10443
|
}
|
|
10339
10444
|
}
|
|
10340
|
-
},
|
|
10445
|
+
}, _callee61, this);
|
|
10341
10446
|
}));
|
|
10342
10447
|
|
|
10343
|
-
function createCampaign(
|
|
10448
|
+
function createCampaign(_x83) {
|
|
10344
10449
|
return _createCampaign.apply(this, arguments);
|
|
10345
10450
|
}
|
|
10346
10451
|
|
|
@@ -10356,15 +10461,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10356
10461
|
}, {
|
|
10357
10462
|
key: "queryCampaigns",
|
|
10358
10463
|
value: function () {
|
|
10359
|
-
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10464
|
+
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(filters) {
|
|
10360
10465
|
var options,
|
|
10361
|
-
|
|
10362
|
-
return _regeneratorRuntime.wrap(function
|
|
10466
|
+
_args62 = arguments;
|
|
10467
|
+
return _regeneratorRuntime.wrap(function _callee62$(_context62) {
|
|
10363
10468
|
while (1) {
|
|
10364
|
-
switch (
|
|
10469
|
+
switch (_context62.prev = _context62.next) {
|
|
10365
10470
|
case 0:
|
|
10366
|
-
options =
|
|
10367
|
-
|
|
10471
|
+
options = _args62.length > 1 && _args62[1] !== undefined ? _args62[1] : {};
|
|
10472
|
+
_context62.next = 3;
|
|
10368
10473
|
return this.get(this.baseURL + "/campaigns", {
|
|
10369
10474
|
payload: _objectSpread({
|
|
10370
10475
|
filter_conditions: filters
|
|
@@ -10372,17 +10477,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10372
10477
|
});
|
|
10373
10478
|
|
|
10374
10479
|
case 3:
|
|
10375
|
-
return
|
|
10480
|
+
return _context62.abrupt("return", _context62.sent);
|
|
10376
10481
|
|
|
10377
10482
|
case 4:
|
|
10378
10483
|
case "end":
|
|
10379
|
-
return
|
|
10484
|
+
return _context62.stop();
|
|
10380
10485
|
}
|
|
10381
10486
|
}
|
|
10382
|
-
},
|
|
10487
|
+
}, _callee62, this);
|
|
10383
10488
|
}));
|
|
10384
10489
|
|
|
10385
|
-
function queryCampaigns(
|
|
10490
|
+
function queryCampaigns(_x84) {
|
|
10386
10491
|
return _queryCampaigns.apply(this, arguments);
|
|
10387
10492
|
}
|
|
10388
10493
|
|
|
@@ -10400,32 +10505,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10400
10505
|
}, {
|
|
10401
10506
|
key: "updateCampaign",
|
|
10402
10507
|
value: function () {
|
|
10403
|
-
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10508
|
+
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(id, params) {
|
|
10404
10509
|
var _yield$this$put2, campaign;
|
|
10405
10510
|
|
|
10406
|
-
return _regeneratorRuntime.wrap(function
|
|
10511
|
+
return _regeneratorRuntime.wrap(function _callee63$(_context63) {
|
|
10407
10512
|
while (1) {
|
|
10408
|
-
switch (
|
|
10513
|
+
switch (_context63.prev = _context63.next) {
|
|
10409
10514
|
case 0:
|
|
10410
|
-
|
|
10515
|
+
_context63.next = 2;
|
|
10411
10516
|
return this.put(this.baseURL + "/campaigns/".concat(id), {
|
|
10412
10517
|
campaign: params
|
|
10413
10518
|
});
|
|
10414
10519
|
|
|
10415
10520
|
case 2:
|
|
10416
|
-
_yield$this$put2 =
|
|
10521
|
+
_yield$this$put2 = _context63.sent;
|
|
10417
10522
|
campaign = _yield$this$put2.campaign;
|
|
10418
|
-
return
|
|
10523
|
+
return _context63.abrupt("return", campaign);
|
|
10419
10524
|
|
|
10420
10525
|
case 5:
|
|
10421
10526
|
case "end":
|
|
10422
|
-
return
|
|
10527
|
+
return _context63.stop();
|
|
10423
10528
|
}
|
|
10424
10529
|
}
|
|
10425
|
-
},
|
|
10530
|
+
}, _callee63, this);
|
|
10426
10531
|
}));
|
|
10427
10532
|
|
|
10428
|
-
function updateCampaign(
|
|
10533
|
+
function updateCampaign(_x85, _x86) {
|
|
10429
10534
|
return _updateCampaign.apply(this, arguments);
|
|
10430
10535
|
}
|
|
10431
10536
|
|
|
@@ -10442,25 +10547,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10442
10547
|
}, {
|
|
10443
10548
|
key: "deleteCampaign",
|
|
10444
10549
|
value: function () {
|
|
10445
|
-
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10550
|
+
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id) {
|
|
10446
10551
|
var params,
|
|
10447
|
-
|
|
10448
|
-
return _regeneratorRuntime.wrap(function
|
|
10552
|
+
_args64 = arguments;
|
|
10553
|
+
return _regeneratorRuntime.wrap(function _callee64$(_context64) {
|
|
10449
10554
|
while (1) {
|
|
10450
|
-
switch (
|
|
10555
|
+
switch (_context64.prev = _context64.next) {
|
|
10451
10556
|
case 0:
|
|
10452
|
-
params =
|
|
10453
|
-
return
|
|
10557
|
+
params = _args64.length > 1 && _args64[1] !== undefined ? _args64[1] : {};
|
|
10558
|
+
return _context64.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id), params));
|
|
10454
10559
|
|
|
10455
10560
|
case 2:
|
|
10456
10561
|
case "end":
|
|
10457
|
-
return
|
|
10562
|
+
return _context64.stop();
|
|
10458
10563
|
}
|
|
10459
10564
|
}
|
|
10460
|
-
},
|
|
10565
|
+
}, _callee64, this);
|
|
10461
10566
|
}));
|
|
10462
10567
|
|
|
10463
|
-
function deleteCampaign(
|
|
10568
|
+
function deleteCampaign(_x87) {
|
|
10464
10569
|
return _deleteCampaign.apply(this, arguments);
|
|
10465
10570
|
}
|
|
10466
10571
|
|
|
@@ -10478,33 +10583,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10478
10583
|
}, {
|
|
10479
10584
|
key: "scheduleCampaign",
|
|
10480
10585
|
value: function () {
|
|
10481
|
-
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10586
|
+
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id, params) {
|
|
10482
10587
|
var scheduledFor, _yield$this$patch, campaign;
|
|
10483
10588
|
|
|
10484
|
-
return _regeneratorRuntime.wrap(function
|
|
10589
|
+
return _regeneratorRuntime.wrap(function _callee65$(_context65) {
|
|
10485
10590
|
while (1) {
|
|
10486
|
-
switch (
|
|
10591
|
+
switch (_context65.prev = _context65.next) {
|
|
10487
10592
|
case 0:
|
|
10488
10593
|
scheduledFor = params.scheduledFor;
|
|
10489
|
-
|
|
10594
|
+
_context65.next = 3;
|
|
10490
10595
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
|
|
10491
10596
|
scheduled_for: scheduledFor
|
|
10492
10597
|
});
|
|
10493
10598
|
|
|
10494
10599
|
case 3:
|
|
10495
|
-
_yield$this$patch =
|
|
10600
|
+
_yield$this$patch = _context65.sent;
|
|
10496
10601
|
campaign = _yield$this$patch.campaign;
|
|
10497
|
-
return
|
|
10602
|
+
return _context65.abrupt("return", campaign);
|
|
10498
10603
|
|
|
10499
10604
|
case 6:
|
|
10500
10605
|
case "end":
|
|
10501
|
-
return
|
|
10606
|
+
return _context65.stop();
|
|
10502
10607
|
}
|
|
10503
10608
|
}
|
|
10504
|
-
},
|
|
10609
|
+
}, _callee65, this);
|
|
10505
10610
|
}));
|
|
10506
10611
|
|
|
10507
|
-
function scheduleCampaign(
|
|
10612
|
+
function scheduleCampaign(_x88, _x89) {
|
|
10508
10613
|
return _scheduleCampaign.apply(this, arguments);
|
|
10509
10614
|
}
|
|
10510
10615
|
|
|
@@ -10521,30 +10626,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10521
10626
|
}, {
|
|
10522
10627
|
key: "stopCampaign",
|
|
10523
10628
|
value: function () {
|
|
10524
|
-
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10629
|
+
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id) {
|
|
10525
10630
|
var _yield$this$patch2, campaign;
|
|
10526
10631
|
|
|
10527
|
-
return _regeneratorRuntime.wrap(function
|
|
10632
|
+
return _regeneratorRuntime.wrap(function _callee66$(_context66) {
|
|
10528
10633
|
while (1) {
|
|
10529
|
-
switch (
|
|
10634
|
+
switch (_context66.prev = _context66.next) {
|
|
10530
10635
|
case 0:
|
|
10531
|
-
|
|
10636
|
+
_context66.next = 2;
|
|
10532
10637
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
|
|
10533
10638
|
|
|
10534
10639
|
case 2:
|
|
10535
|
-
_yield$this$patch2 =
|
|
10640
|
+
_yield$this$patch2 = _context66.sent;
|
|
10536
10641
|
campaign = _yield$this$patch2.campaign;
|
|
10537
|
-
return
|
|
10642
|
+
return _context66.abrupt("return", campaign);
|
|
10538
10643
|
|
|
10539
10644
|
case 5:
|
|
10540
10645
|
case "end":
|
|
10541
|
-
return
|
|
10646
|
+
return _context66.stop();
|
|
10542
10647
|
}
|
|
10543
10648
|
}
|
|
10544
|
-
},
|
|
10649
|
+
}, _callee66, this);
|
|
10545
10650
|
}));
|
|
10546
10651
|
|
|
10547
|
-
function stopCampaign(
|
|
10652
|
+
function stopCampaign(_x90) {
|
|
10548
10653
|
return _stopCampaign.apply(this, arguments);
|
|
10549
10654
|
}
|
|
10550
10655
|
|
|
@@ -10561,30 +10666,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10561
10666
|
}, {
|
|
10562
10667
|
key: "resumeCampaign",
|
|
10563
10668
|
value: function () {
|
|
10564
|
-
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10669
|
+
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id) {
|
|
10565
10670
|
var _yield$this$patch3, campaign;
|
|
10566
10671
|
|
|
10567
|
-
return _regeneratorRuntime.wrap(function
|
|
10672
|
+
return _regeneratorRuntime.wrap(function _callee67$(_context67) {
|
|
10568
10673
|
while (1) {
|
|
10569
|
-
switch (
|
|
10674
|
+
switch (_context67.prev = _context67.next) {
|
|
10570
10675
|
case 0:
|
|
10571
|
-
|
|
10676
|
+
_context67.next = 2;
|
|
10572
10677
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
|
|
10573
10678
|
|
|
10574
10679
|
case 2:
|
|
10575
|
-
_yield$this$patch3 =
|
|
10680
|
+
_yield$this$patch3 = _context67.sent;
|
|
10576
10681
|
campaign = _yield$this$patch3.campaign;
|
|
10577
|
-
return
|
|
10682
|
+
return _context67.abrupt("return", campaign);
|
|
10578
10683
|
|
|
10579
10684
|
case 5:
|
|
10580
10685
|
case "end":
|
|
10581
|
-
return
|
|
10686
|
+
return _context67.stop();
|
|
10582
10687
|
}
|
|
10583
10688
|
}
|
|
10584
|
-
},
|
|
10689
|
+
}, _callee67, this);
|
|
10585
10690
|
}));
|
|
10586
10691
|
|
|
10587
|
-
function resumeCampaign(
|
|
10692
|
+
function resumeCampaign(_x91) {
|
|
10588
10693
|
return _resumeCampaign.apply(this, arguments);
|
|
10589
10694
|
}
|
|
10590
10695
|
|
|
@@ -10602,30 +10707,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10602
10707
|
}, {
|
|
10603
10708
|
key: "testCampaign",
|
|
10604
10709
|
value: function () {
|
|
10605
|
-
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10710
|
+
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(id, params) {
|
|
10606
10711
|
var users;
|
|
10607
|
-
return _regeneratorRuntime.wrap(function
|
|
10712
|
+
return _regeneratorRuntime.wrap(function _callee68$(_context68) {
|
|
10608
10713
|
while (1) {
|
|
10609
|
-
switch (
|
|
10714
|
+
switch (_context68.prev = _context68.next) {
|
|
10610
10715
|
case 0:
|
|
10611
10716
|
users = params.users;
|
|
10612
|
-
|
|
10717
|
+
_context68.next = 3;
|
|
10613
10718
|
return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
|
|
10614
10719
|
users: users
|
|
10615
10720
|
});
|
|
10616
10721
|
|
|
10617
10722
|
case 3:
|
|
10618
|
-
return
|
|
10723
|
+
return _context68.abrupt("return", _context68.sent);
|
|
10619
10724
|
|
|
10620
10725
|
case 4:
|
|
10621
10726
|
case "end":
|
|
10622
|
-
return
|
|
10727
|
+
return _context68.stop();
|
|
10623
10728
|
}
|
|
10624
10729
|
}
|
|
10625
|
-
},
|
|
10730
|
+
}, _callee68, this);
|
|
10626
10731
|
}));
|
|
10627
10732
|
|
|
10628
|
-
function testCampaign(
|
|
10733
|
+
function testCampaign(_x92, _x93) {
|
|
10629
10734
|
return _testCampaign.apply(this, arguments);
|
|
10630
10735
|
}
|
|
10631
10736
|
|
|
@@ -10641,15 +10746,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10641
10746
|
}, {
|
|
10642
10747
|
key: "queryRecipients",
|
|
10643
10748
|
value: function () {
|
|
10644
|
-
var _queryRecipients = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10749
|
+
var _queryRecipients = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(filters) {
|
|
10645
10750
|
var options,
|
|
10646
|
-
|
|
10647
|
-
return _regeneratorRuntime.wrap(function
|
|
10751
|
+
_args69 = arguments;
|
|
10752
|
+
return _regeneratorRuntime.wrap(function _callee69$(_context69) {
|
|
10648
10753
|
while (1) {
|
|
10649
|
-
switch (
|
|
10754
|
+
switch (_context69.prev = _context69.next) {
|
|
10650
10755
|
case 0:
|
|
10651
|
-
options =
|
|
10652
|
-
|
|
10756
|
+
options = _args69.length > 1 && _args69[1] !== undefined ? _args69[1] : {};
|
|
10757
|
+
_context69.next = 3;
|
|
10653
10758
|
return this.get(this.baseURL + "/recipients", {
|
|
10654
10759
|
payload: _objectSpread({
|
|
10655
10760
|
filter_conditions: filters
|
|
@@ -10657,17 +10762,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10657
10762
|
});
|
|
10658
10763
|
|
|
10659
10764
|
case 3:
|
|
10660
|
-
return
|
|
10765
|
+
return _context69.abrupt("return", _context69.sent);
|
|
10661
10766
|
|
|
10662
10767
|
case 4:
|
|
10663
10768
|
case "end":
|
|
10664
|
-
return
|
|
10769
|
+
return _context69.stop();
|
|
10665
10770
|
}
|
|
10666
10771
|
}
|
|
10667
|
-
},
|
|
10772
|
+
}, _callee69, this);
|
|
10668
10773
|
}));
|
|
10669
10774
|
|
|
10670
|
-
function queryRecipients(
|
|
10775
|
+
function queryRecipients(_x94) {
|
|
10671
10776
|
return _queryRecipients.apply(this, arguments);
|
|
10672
10777
|
}
|
|
10673
10778
|
|
|
@@ -10683,24 +10788,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10683
10788
|
}, {
|
|
10684
10789
|
key: "enrichURL",
|
|
10685
10790
|
value: function () {
|
|
10686
|
-
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10687
|
-
return _regeneratorRuntime.wrap(function
|
|
10791
|
+
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(url) {
|
|
10792
|
+
return _regeneratorRuntime.wrap(function _callee70$(_context70) {
|
|
10688
10793
|
while (1) {
|
|
10689
|
-
switch (
|
|
10794
|
+
switch (_context70.prev = _context70.next) {
|
|
10690
10795
|
case 0:
|
|
10691
|
-
return
|
|
10796
|
+
return _context70.abrupt("return", this.get(this.baseURL + "/og", {
|
|
10692
10797
|
url: url
|
|
10693
10798
|
}));
|
|
10694
10799
|
|
|
10695
10800
|
case 1:
|
|
10696
10801
|
case "end":
|
|
10697
|
-
return
|
|
10802
|
+
return _context70.stop();
|
|
10698
10803
|
}
|
|
10699
10804
|
}
|
|
10700
|
-
},
|
|
10805
|
+
}, _callee70, this);
|
|
10701
10806
|
}));
|
|
10702
10807
|
|
|
10703
|
-
function enrichURL(
|
|
10808
|
+
function enrichURL(_x95) {
|
|
10704
10809
|
return _enrichURL.apply(this, arguments);
|
|
10705
10810
|
}
|
|
10706
10811
|
|
|
@@ -10717,22 +10822,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10717
10822
|
}, {
|
|
10718
10823
|
key: "getTask",
|
|
10719
10824
|
value: function () {
|
|
10720
|
-
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10721
|
-
return _regeneratorRuntime.wrap(function
|
|
10825
|
+
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id) {
|
|
10826
|
+
return _regeneratorRuntime.wrap(function _callee71$(_context71) {
|
|
10722
10827
|
while (1) {
|
|
10723
|
-
switch (
|
|
10828
|
+
switch (_context71.prev = _context71.next) {
|
|
10724
10829
|
case 0:
|
|
10725
|
-
return
|
|
10830
|
+
return _context71.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
10726
10831
|
|
|
10727
10832
|
case 1:
|
|
10728
10833
|
case "end":
|
|
10729
|
-
return
|
|
10834
|
+
return _context71.stop();
|
|
10730
10835
|
}
|
|
10731
10836
|
}
|
|
10732
|
-
},
|
|
10837
|
+
}, _callee71, this);
|
|
10733
10838
|
}));
|
|
10734
10839
|
|
|
10735
|
-
function getTask(
|
|
10840
|
+
function getTask(_x96) {
|
|
10736
10841
|
return _getTask.apply(this, arguments);
|
|
10737
10842
|
}
|
|
10738
10843
|
|
|
@@ -10750,31 +10855,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10750
10855
|
}, {
|
|
10751
10856
|
key: "deleteChannels",
|
|
10752
10857
|
value: function () {
|
|
10753
|
-
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10858
|
+
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(cids) {
|
|
10754
10859
|
var options,
|
|
10755
|
-
|
|
10756
|
-
return _regeneratorRuntime.wrap(function
|
|
10860
|
+
_args72 = arguments;
|
|
10861
|
+
return _regeneratorRuntime.wrap(function _callee72$(_context72) {
|
|
10757
10862
|
while (1) {
|
|
10758
|
-
switch (
|
|
10863
|
+
switch (_context72.prev = _context72.next) {
|
|
10759
10864
|
case 0:
|
|
10760
|
-
options =
|
|
10761
|
-
|
|
10865
|
+
options = _args72.length > 1 && _args72[1] !== undefined ? _args72[1] : {};
|
|
10866
|
+
_context72.next = 3;
|
|
10762
10867
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
10763
10868
|
cids: cids
|
|
10764
10869
|
}, options));
|
|
10765
10870
|
|
|
10766
10871
|
case 3:
|
|
10767
|
-
return
|
|
10872
|
+
return _context72.abrupt("return", _context72.sent);
|
|
10768
10873
|
|
|
10769
10874
|
case 4:
|
|
10770
10875
|
case "end":
|
|
10771
|
-
return
|
|
10876
|
+
return _context72.stop();
|
|
10772
10877
|
}
|
|
10773
10878
|
}
|
|
10774
|
-
},
|
|
10879
|
+
}, _callee72, this);
|
|
10775
10880
|
}));
|
|
10776
10881
|
|
|
10777
|
-
function deleteChannels(
|
|
10882
|
+
function deleteChannels(_x97) {
|
|
10778
10883
|
return _deleteChannels.apply(this, arguments);
|
|
10779
10884
|
}
|
|
10780
10885
|
|
|
@@ -10786,19 +10891,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10786
10891
|
* @param {string[]} user_ids which users to delete
|
|
10787
10892
|
* @param {DeleteUserOptions} options Configuration how to delete users
|
|
10788
10893
|
*
|
|
10789
|
-
* @return {
|
|
10894
|
+
* @return {TaskResponse} A task ID
|
|
10790
10895
|
*/
|
|
10791
10896
|
|
|
10792
10897
|
}, {
|
|
10793
10898
|
key: "deleteUsers",
|
|
10794
10899
|
value: function () {
|
|
10795
|
-
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10796
|
-
return _regeneratorRuntime.wrap(function
|
|
10900
|
+
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(user_ids, options) {
|
|
10901
|
+
return _regeneratorRuntime.wrap(function _callee73$(_context73) {
|
|
10797
10902
|
while (1) {
|
|
10798
|
-
switch (
|
|
10903
|
+
switch (_context73.prev = _context73.next) {
|
|
10799
10904
|
case 0:
|
|
10800
10905
|
if (!((options === null || options === void 0 ? void 0 : options.user) !== 'soft' && (options === null || options === void 0 ? void 0 : options.user) !== 'hard')) {
|
|
10801
|
-
|
|
10906
|
+
_context73.next = 2;
|
|
10802
10907
|
break;
|
|
10803
10908
|
}
|
|
10804
10909
|
|
|
@@ -10806,7 +10911,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10806
10911
|
|
|
10807
10912
|
case 2:
|
|
10808
10913
|
if (!(options.messages !== undefined && options.messages !== 'soft' && options.messages !== 'hard')) {
|
|
10809
|
-
|
|
10914
|
+
_context73.next = 4;
|
|
10810
10915
|
break;
|
|
10811
10916
|
}
|
|
10812
10917
|
|
|
@@ -10814,30 +10919,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10814
10919
|
|
|
10815
10920
|
case 4:
|
|
10816
10921
|
if (!(options.conversations !== undefined && options.conversations !== 'soft' && options.conversations !== 'hard')) {
|
|
10817
|
-
|
|
10922
|
+
_context73.next = 6;
|
|
10818
10923
|
break;
|
|
10819
10924
|
}
|
|
10820
10925
|
|
|
10821
10926
|
throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
|
|
10822
10927
|
|
|
10823
10928
|
case 6:
|
|
10824
|
-
|
|
10929
|
+
_context73.next = 8;
|
|
10825
10930
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
10826
10931
|
user_ids: user_ids
|
|
10827
10932
|
}, options));
|
|
10828
10933
|
|
|
10829
10934
|
case 8:
|
|
10830
|
-
return
|
|
10935
|
+
return _context73.abrupt("return", _context73.sent);
|
|
10831
10936
|
|
|
10832
10937
|
case 9:
|
|
10833
10938
|
case "end":
|
|
10834
|
-
return
|
|
10939
|
+
return _context73.stop();
|
|
10835
10940
|
}
|
|
10836
10941
|
}
|
|
10837
|
-
},
|
|
10942
|
+
}, _callee73, this);
|
|
10838
10943
|
}));
|
|
10839
10944
|
|
|
10840
|
-
function deleteUsers(
|
|
10945
|
+
function deleteUsers(_x98, _x99) {
|
|
10841
10946
|
return _deleteUsers.apply(this, arguments);
|
|
10842
10947
|
}
|
|
10843
10948
|
|
|
@@ -10858,28 +10963,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10858
10963
|
}, {
|
|
10859
10964
|
key: "_createImportURL",
|
|
10860
10965
|
value: function () {
|
|
10861
|
-
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10862
|
-
return _regeneratorRuntime.wrap(function
|
|
10966
|
+
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(filename) {
|
|
10967
|
+
return _regeneratorRuntime.wrap(function _callee74$(_context74) {
|
|
10863
10968
|
while (1) {
|
|
10864
|
-
switch (
|
|
10969
|
+
switch (_context74.prev = _context74.next) {
|
|
10865
10970
|
case 0:
|
|
10866
|
-
|
|
10971
|
+
_context74.next = 2;
|
|
10867
10972
|
return this.post(this.baseURL + "/import_urls", {
|
|
10868
10973
|
filename: filename
|
|
10869
10974
|
});
|
|
10870
10975
|
|
|
10871
10976
|
case 2:
|
|
10872
|
-
return
|
|
10977
|
+
return _context74.abrupt("return", _context74.sent);
|
|
10873
10978
|
|
|
10874
10979
|
case 3:
|
|
10875
10980
|
case "end":
|
|
10876
|
-
return
|
|
10981
|
+
return _context74.stop();
|
|
10877
10982
|
}
|
|
10878
10983
|
}
|
|
10879
|
-
},
|
|
10984
|
+
}, _callee74, this);
|
|
10880
10985
|
}));
|
|
10881
10986
|
|
|
10882
|
-
function _createImportURL(
|
|
10987
|
+
function _createImportURL(_x100) {
|
|
10883
10988
|
return _createImportURL2.apply(this, arguments);
|
|
10884
10989
|
}
|
|
10885
10990
|
|
|
@@ -10901,33 +11006,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10901
11006
|
}, {
|
|
10902
11007
|
key: "_createImport",
|
|
10903
11008
|
value: function () {
|
|
10904
|
-
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11009
|
+
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(path) {
|
|
10905
11010
|
var options,
|
|
10906
|
-
|
|
10907
|
-
return _regeneratorRuntime.wrap(function
|
|
11011
|
+
_args75 = arguments;
|
|
11012
|
+
return _regeneratorRuntime.wrap(function _callee75$(_context75) {
|
|
10908
11013
|
while (1) {
|
|
10909
|
-
switch (
|
|
11014
|
+
switch (_context75.prev = _context75.next) {
|
|
10910
11015
|
case 0:
|
|
10911
|
-
options =
|
|
11016
|
+
options = _args75.length > 1 && _args75[1] !== undefined ? _args75[1] : {
|
|
10912
11017
|
mode: 'upsert'
|
|
10913
11018
|
};
|
|
10914
|
-
|
|
11019
|
+
_context75.next = 3;
|
|
10915
11020
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
10916
11021
|
path: path
|
|
10917
11022
|
}, options));
|
|
10918
11023
|
|
|
10919
11024
|
case 3:
|
|
10920
|
-
return
|
|
11025
|
+
return _context75.abrupt("return", _context75.sent);
|
|
10921
11026
|
|
|
10922
11027
|
case 4:
|
|
10923
11028
|
case "end":
|
|
10924
|
-
return
|
|
11029
|
+
return _context75.stop();
|
|
10925
11030
|
}
|
|
10926
11031
|
}
|
|
10927
|
-
},
|
|
11032
|
+
}, _callee75, this);
|
|
10928
11033
|
}));
|
|
10929
11034
|
|
|
10930
|
-
function _createImport(
|
|
11035
|
+
function _createImport(_x101) {
|
|
10931
11036
|
return _createImport2.apply(this, arguments);
|
|
10932
11037
|
}
|
|
10933
11038
|
|
|
@@ -10949,26 +11054,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10949
11054
|
}, {
|
|
10950
11055
|
key: "_getImport",
|
|
10951
11056
|
value: function () {
|
|
10952
|
-
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10953
|
-
return _regeneratorRuntime.wrap(function
|
|
11057
|
+
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(id) {
|
|
11058
|
+
return _regeneratorRuntime.wrap(function _callee76$(_context76) {
|
|
10954
11059
|
while (1) {
|
|
10955
|
-
switch (
|
|
11060
|
+
switch (_context76.prev = _context76.next) {
|
|
10956
11061
|
case 0:
|
|
10957
|
-
|
|
11062
|
+
_context76.next = 2;
|
|
10958
11063
|
return this.get(this.baseURL + "/imports/".concat(id));
|
|
10959
11064
|
|
|
10960
11065
|
case 2:
|
|
10961
|
-
return
|
|
11066
|
+
return _context76.abrupt("return", _context76.sent);
|
|
10962
11067
|
|
|
10963
11068
|
case 3:
|
|
10964
11069
|
case "end":
|
|
10965
|
-
return
|
|
11070
|
+
return _context76.stop();
|
|
10966
11071
|
}
|
|
10967
11072
|
}
|
|
10968
|
-
},
|
|
11073
|
+
}, _callee76, this);
|
|
10969
11074
|
}));
|
|
10970
11075
|
|
|
10971
|
-
function _getImport(
|
|
11076
|
+
function _getImport(_x102) {
|
|
10972
11077
|
return _getImport2.apply(this, arguments);
|
|
10973
11078
|
}
|
|
10974
11079
|
|
|
@@ -10990,26 +11095,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10990
11095
|
}, {
|
|
10991
11096
|
key: "_listImports",
|
|
10992
11097
|
value: function () {
|
|
10993
|
-
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10994
|
-
return _regeneratorRuntime.wrap(function
|
|
11098
|
+
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(options) {
|
|
11099
|
+
return _regeneratorRuntime.wrap(function _callee77$(_context77) {
|
|
10995
11100
|
while (1) {
|
|
10996
|
-
switch (
|
|
11101
|
+
switch (_context77.prev = _context77.next) {
|
|
10997
11102
|
case 0:
|
|
10998
|
-
|
|
11103
|
+
_context77.next = 2;
|
|
10999
11104
|
return this.get(this.baseURL + "/imports", options);
|
|
11000
11105
|
|
|
11001
11106
|
case 2:
|
|
11002
|
-
return
|
|
11107
|
+
return _context77.abrupt("return", _context77.sent);
|
|
11003
11108
|
|
|
11004
11109
|
case 3:
|
|
11005
11110
|
case "end":
|
|
11006
|
-
return
|
|
11111
|
+
return _context77.stop();
|
|
11007
11112
|
}
|
|
11008
11113
|
}
|
|
11009
|
-
},
|
|
11114
|
+
}, _callee77, this);
|
|
11010
11115
|
}));
|
|
11011
11116
|
|
|
11012
|
-
function _listImports(
|
|
11117
|
+
function _listImports(_x103) {
|
|
11013
11118
|
return _listImports2.apply(this, arguments);
|
|
11014
11119
|
}
|
|
11015
11120
|
|
|
@@ -11028,28 +11133,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11028
11133
|
}, {
|
|
11029
11134
|
key: "upsertPushProvider",
|
|
11030
11135
|
value: function () {
|
|
11031
|
-
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11032
|
-
return _regeneratorRuntime.wrap(function
|
|
11136
|
+
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(pushProvider) {
|
|
11137
|
+
return _regeneratorRuntime.wrap(function _callee78$(_context78) {
|
|
11033
11138
|
while (1) {
|
|
11034
|
-
switch (
|
|
11139
|
+
switch (_context78.prev = _context78.next) {
|
|
11035
11140
|
case 0:
|
|
11036
|
-
|
|
11141
|
+
_context78.next = 2;
|
|
11037
11142
|
return this.post(this.baseURL + "/push_providers", {
|
|
11038
11143
|
push_provider: pushProvider
|
|
11039
11144
|
});
|
|
11040
11145
|
|
|
11041
11146
|
case 2:
|
|
11042
|
-
return
|
|
11147
|
+
return _context78.abrupt("return", _context78.sent);
|
|
11043
11148
|
|
|
11044
11149
|
case 3:
|
|
11045
11150
|
case "end":
|
|
11046
|
-
return
|
|
11151
|
+
return _context78.stop();
|
|
11047
11152
|
}
|
|
11048
11153
|
}
|
|
11049
|
-
},
|
|
11154
|
+
}, _callee78, this);
|
|
11050
11155
|
}));
|
|
11051
11156
|
|
|
11052
|
-
function upsertPushProvider(
|
|
11157
|
+
function upsertPushProvider(_x104) {
|
|
11053
11158
|
return _upsertPushProvider.apply(this, arguments);
|
|
11054
11159
|
}
|
|
11055
11160
|
|
|
@@ -11068,28 +11173,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11068
11173
|
}, {
|
|
11069
11174
|
key: "deletePushProvider",
|
|
11070
11175
|
value: function () {
|
|
11071
|
-
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11176
|
+
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(_ref9) {
|
|
11072
11177
|
var type, name;
|
|
11073
|
-
return _regeneratorRuntime.wrap(function
|
|
11178
|
+
return _regeneratorRuntime.wrap(function _callee79$(_context79) {
|
|
11074
11179
|
while (1) {
|
|
11075
|
-
switch (
|
|
11180
|
+
switch (_context79.prev = _context79.next) {
|
|
11076
11181
|
case 0:
|
|
11077
11182
|
type = _ref9.type, name = _ref9.name;
|
|
11078
|
-
|
|
11183
|
+
_context79.next = 3;
|
|
11079
11184
|
return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
|
|
11080
11185
|
|
|
11081
11186
|
case 3:
|
|
11082
|
-
return
|
|
11187
|
+
return _context79.abrupt("return", _context79.sent);
|
|
11083
11188
|
|
|
11084
11189
|
case 4:
|
|
11085
11190
|
case "end":
|
|
11086
|
-
return
|
|
11191
|
+
return _context79.stop();
|
|
11087
11192
|
}
|
|
11088
11193
|
}
|
|
11089
|
-
},
|
|
11194
|
+
}, _callee79, this);
|
|
11090
11195
|
}));
|
|
11091
11196
|
|
|
11092
|
-
function deletePushProvider(
|
|
11197
|
+
function deletePushProvider(_x105) {
|
|
11093
11198
|
return _deletePushProvider.apply(this, arguments);
|
|
11094
11199
|
}
|
|
11095
11200
|
|
|
@@ -11106,23 +11211,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11106
11211
|
}, {
|
|
11107
11212
|
key: "listPushProviders",
|
|
11108
11213
|
value: function () {
|
|
11109
|
-
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11110
|
-
return _regeneratorRuntime.wrap(function
|
|
11214
|
+
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80() {
|
|
11215
|
+
return _regeneratorRuntime.wrap(function _callee80$(_context80) {
|
|
11111
11216
|
while (1) {
|
|
11112
|
-
switch (
|
|
11217
|
+
switch (_context80.prev = _context80.next) {
|
|
11113
11218
|
case 0:
|
|
11114
|
-
|
|
11219
|
+
_context80.next = 2;
|
|
11115
11220
|
return this.get(this.baseURL + "/push_providers");
|
|
11116
11221
|
|
|
11117
11222
|
case 2:
|
|
11118
|
-
return
|
|
11223
|
+
return _context80.abrupt("return", _context80.sent);
|
|
11119
11224
|
|
|
11120
11225
|
case 3:
|
|
11121
11226
|
case "end":
|
|
11122
|
-
return
|
|
11227
|
+
return _context80.stop();
|
|
11123
11228
|
}
|
|
11124
11229
|
}
|
|
11125
|
-
},
|
|
11230
|
+
}, _callee80, this);
|
|
11126
11231
|
}));
|
|
11127
11232
|
|
|
11128
11233
|
function listPushProviders() {
|
|
@@ -11150,26 +11255,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11150
11255
|
}, {
|
|
11151
11256
|
key: "commitMessage",
|
|
11152
11257
|
value: function () {
|
|
11153
|
-
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11154
|
-
return _regeneratorRuntime.wrap(function
|
|
11258
|
+
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(id) {
|
|
11259
|
+
return _regeneratorRuntime.wrap(function _callee81$(_context81) {
|
|
11155
11260
|
while (1) {
|
|
11156
|
-
switch (
|
|
11261
|
+
switch (_context81.prev = _context81.next) {
|
|
11157
11262
|
case 0:
|
|
11158
|
-
|
|
11263
|
+
_context81.next = 2;
|
|
11159
11264
|
return this.post(this.baseURL + "/messages/".concat(id, "/commit"));
|
|
11160
11265
|
|
|
11161
11266
|
case 2:
|
|
11162
|
-
return
|
|
11267
|
+
return _context81.abrupt("return", _context81.sent);
|
|
11163
11268
|
|
|
11164
11269
|
case 3:
|
|
11165
11270
|
case "end":
|
|
11166
|
-
return
|
|
11271
|
+
return _context81.stop();
|
|
11167
11272
|
}
|
|
11168
11273
|
}
|
|
11169
|
-
},
|
|
11274
|
+
}, _callee81, this);
|
|
11170
11275
|
}));
|
|
11171
11276
|
|
|
11172
|
-
function commitMessage(
|
|
11277
|
+
function commitMessage(_x106) {
|
|
11173
11278
|
return _commitMessage.apply(this, arguments);
|
|
11174
11279
|
}
|
|
11175
11280
|
|