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