stream-chat 8.12.3 → 8.13.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 +635 -595
- 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 +635 -595
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +635 -595
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +635 -595
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/client.d.ts +12 -1
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/types.d.ts +16 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +0 -1
- package/src/client.ts +16 -0
- package/src/types.ts +18 -0
package/dist/browser.es.js
CHANGED
|
@@ -3094,8 +3094,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3094
3094
|
}, {
|
|
3095
3095
|
key: "lastRead",
|
|
3096
3096
|
value: function lastRead() {
|
|
3097
|
-
this._checkInitialized();
|
|
3098
|
-
|
|
3099
3097
|
var _this$getClient = this.getClient(),
|
|
3100
3098
|
userID = _this$getClient.userID;
|
|
3101
3099
|
|
|
@@ -7405,6 +7403,48 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7405
7403
|
|
|
7406
7404
|
return testSQSSettings;
|
|
7407
7405
|
}()
|
|
7406
|
+
/**
|
|
7407
|
+
* testSNSSettings - Tests that the given or configured SNS configuration is valid
|
|
7408
|
+
*
|
|
7409
|
+
* @param {TestSNSDataInput} [data] Overrides SNS settings for testing if needed
|
|
7410
|
+
* IE: {
|
|
7411
|
+
sns_key: 'auth_key',
|
|
7412
|
+
sns_secret: 'auth_secret',
|
|
7413
|
+
sns_topic_arn: 'topic_to_publish_to',
|
|
7414
|
+
}
|
|
7415
|
+
*/
|
|
7416
|
+
|
|
7417
|
+
}, {
|
|
7418
|
+
key: "testSNSSettings",
|
|
7419
|
+
value: function () {
|
|
7420
|
+
var _testSNSSettings = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
|
|
7421
|
+
var data,
|
|
7422
|
+
_args14 = arguments;
|
|
7423
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
7424
|
+
while (1) {
|
|
7425
|
+
switch (_context14.prev = _context14.next) {
|
|
7426
|
+
case 0:
|
|
7427
|
+
data = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
|
|
7428
|
+
_context14.next = 3;
|
|
7429
|
+
return this.post(this.baseURL + '/check_sns', data);
|
|
7430
|
+
|
|
7431
|
+
case 3:
|
|
7432
|
+
return _context14.abrupt("return", _context14.sent);
|
|
7433
|
+
|
|
7434
|
+
case 4:
|
|
7435
|
+
case "end":
|
|
7436
|
+
return _context14.stop();
|
|
7437
|
+
}
|
|
7438
|
+
}
|
|
7439
|
+
}, _callee14, this);
|
|
7440
|
+
}));
|
|
7441
|
+
|
|
7442
|
+
function testSNSSettings() {
|
|
7443
|
+
return _testSNSSettings.apply(this, arguments);
|
|
7444
|
+
}
|
|
7445
|
+
|
|
7446
|
+
return testSNSSettings;
|
|
7447
|
+
}()
|
|
7408
7448
|
/**
|
|
7409
7449
|
* Disconnects the websocket and removes the user from client.
|
|
7410
7450
|
*
|
|
@@ -7423,47 +7463,47 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7423
7463
|
* @return {ConnectAPIResponse<StreamChatGenerics>} Returns a promise that resolves when the connection is setup
|
|
7424
7464
|
*/
|
|
7425
7465
|
function () {
|
|
7426
|
-
var _setGuestUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
7466
|
+
var _setGuestUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(user) {
|
|
7427
7467
|
var response, _response$user, guestUser;
|
|
7428
7468
|
|
|
7429
|
-
return _regeneratorRuntime.wrap(function
|
|
7469
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
7430
7470
|
while (1) {
|
|
7431
|
-
switch (
|
|
7471
|
+
switch (_context15.prev = _context15.next) {
|
|
7432
7472
|
case 0:
|
|
7433
7473
|
this.anonymous = true;
|
|
7434
|
-
|
|
7435
|
-
|
|
7474
|
+
_context15.prev = 1;
|
|
7475
|
+
_context15.next = 4;
|
|
7436
7476
|
return this.post(this.baseURL + '/guest', {
|
|
7437
7477
|
user: user
|
|
7438
7478
|
});
|
|
7439
7479
|
|
|
7440
7480
|
case 4:
|
|
7441
|
-
response =
|
|
7442
|
-
|
|
7481
|
+
response = _context15.sent;
|
|
7482
|
+
_context15.next = 11;
|
|
7443
7483
|
break;
|
|
7444
7484
|
|
|
7445
7485
|
case 7:
|
|
7446
|
-
|
|
7447
|
-
|
|
7486
|
+
_context15.prev = 7;
|
|
7487
|
+
_context15.t0 = _context15["catch"](1);
|
|
7448
7488
|
this.anonymous = false;
|
|
7449
|
-
throw
|
|
7489
|
+
throw _context15.t0;
|
|
7450
7490
|
|
|
7451
7491
|
case 11:
|
|
7452
7492
|
this.anonymous = false; // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7453
7493
|
|
|
7454
7494
|
_response$user = response.user, _response$user.created_at, _response$user.updated_at, _response$user.last_active, _response$user.online, guestUser = _objectWithoutProperties(_response$user, _excluded);
|
|
7455
|
-
|
|
7495
|
+
_context15.next = 15;
|
|
7456
7496
|
return this.connectUser(guestUser, response.access_token);
|
|
7457
7497
|
|
|
7458
7498
|
case 15:
|
|
7459
|
-
return
|
|
7499
|
+
return _context15.abrupt("return", _context15.sent);
|
|
7460
7500
|
|
|
7461
7501
|
case 16:
|
|
7462
7502
|
case "end":
|
|
7463
|
-
return
|
|
7503
|
+
return _context15.stop();
|
|
7464
7504
|
}
|
|
7465
7505
|
}
|
|
7466
|
-
},
|
|
7506
|
+
}, _callee15, this, [[1, 7]]);
|
|
7467
7507
|
}));
|
|
7468
7508
|
|
|
7469
7509
|
function setGuestUser(_x15) {
|
|
@@ -7771,13 +7811,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7771
7811
|
* @private
|
|
7772
7812
|
*/
|
|
7773
7813
|
function () {
|
|
7774
|
-
var _connect = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
7775
|
-
return _regeneratorRuntime.wrap(function
|
|
7814
|
+
var _connect = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16() {
|
|
7815
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
7776
7816
|
while (1) {
|
|
7777
|
-
switch (
|
|
7817
|
+
switch (_context16.prev = _context16.next) {
|
|
7778
7818
|
case 0:
|
|
7779
7819
|
if (!(!this.userID || !this._user)) {
|
|
7780
|
-
|
|
7820
|
+
_context16.next = 2;
|
|
7781
7821
|
break;
|
|
7782
7822
|
}
|
|
7783
7823
|
|
|
@@ -7785,7 +7825,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7785
7825
|
|
|
7786
7826
|
case 2:
|
|
7787
7827
|
if (this.wsBaseURL) {
|
|
7788
|
-
|
|
7828
|
+
_context16.next = 4;
|
|
7789
7829
|
break;
|
|
7790
7830
|
}
|
|
7791
7831
|
|
|
@@ -7793,7 +7833,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7793
7833
|
|
|
7794
7834
|
case 4:
|
|
7795
7835
|
if (this.clientID) {
|
|
7796
|
-
|
|
7836
|
+
_context16.next = 6;
|
|
7797
7837
|
break;
|
|
7798
7838
|
}
|
|
7799
7839
|
|
|
@@ -7815,32 +7855,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7815
7855
|
});
|
|
7816
7856
|
}
|
|
7817
7857
|
|
|
7818
|
-
|
|
7858
|
+
_context16.prev = 8;
|
|
7819
7859
|
|
|
7820
7860
|
if (!this.wsFallback) {
|
|
7821
|
-
|
|
7861
|
+
_context16.next = 13;
|
|
7822
7862
|
break;
|
|
7823
7863
|
}
|
|
7824
7864
|
|
|
7825
|
-
|
|
7865
|
+
_context16.next = 12;
|
|
7826
7866
|
return this.wsFallback.connect();
|
|
7827
7867
|
|
|
7828
7868
|
case 12:
|
|
7829
|
-
return
|
|
7869
|
+
return _context16.abrupt("return", _context16.sent);
|
|
7830
7870
|
|
|
7831
7871
|
case 13:
|
|
7832
|
-
|
|
7872
|
+
_context16.next = 15;
|
|
7833
7873
|
return this.wsConnection.connect(this.options.enableWSFallback ? this.defaultWSTimeoutWithFallback : this.defaultWSTimeout);
|
|
7834
7874
|
|
|
7835
7875
|
case 15:
|
|
7836
|
-
return
|
|
7876
|
+
return _context16.abrupt("return", _context16.sent);
|
|
7837
7877
|
|
|
7838
7878
|
case 18:
|
|
7839
|
-
|
|
7840
|
-
|
|
7879
|
+
_context16.prev = 18;
|
|
7880
|
+
_context16.t0 = _context16["catch"](8);
|
|
7841
7881
|
|
|
7842
|
-
if (!(this.options.enableWSFallback && isWSFailure(
|
|
7843
|
-
|
|
7882
|
+
if (!(this.options.enableWSFallback && isWSFailure(_context16.t0) && isOnline())) {
|
|
7883
|
+
_context16.next = 29;
|
|
7844
7884
|
break;
|
|
7845
7885
|
}
|
|
7846
7886
|
|
|
@@ -7859,21 +7899,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7859
7899
|
this.wsFallback = new WSConnectionFallback({
|
|
7860
7900
|
client: this
|
|
7861
7901
|
});
|
|
7862
|
-
|
|
7902
|
+
_context16.next = 28;
|
|
7863
7903
|
return this.wsFallback.connect();
|
|
7864
7904
|
|
|
7865
7905
|
case 28:
|
|
7866
|
-
return
|
|
7906
|
+
return _context16.abrupt("return", _context16.sent);
|
|
7867
7907
|
|
|
7868
7908
|
case 29:
|
|
7869
|
-
throw
|
|
7909
|
+
throw _context16.t0;
|
|
7870
7910
|
|
|
7871
7911
|
case 30:
|
|
7872
7912
|
case "end":
|
|
7873
|
-
return
|
|
7913
|
+
return _context16.stop();
|
|
7874
7914
|
}
|
|
7875
7915
|
}
|
|
7876
|
-
},
|
|
7916
|
+
}, _callee16, this, [[8, 18]]);
|
|
7877
7917
|
}));
|
|
7878
7918
|
|
|
7879
7919
|
function connect() {
|
|
@@ -7923,23 +7963,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7923
7963
|
}, {
|
|
7924
7964
|
key: "queryUsers",
|
|
7925
7965
|
value: function () {
|
|
7926
|
-
var _queryUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
7966
|
+
var _queryUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(filterConditions) {
|
|
7927
7967
|
var sort,
|
|
7928
7968
|
options,
|
|
7929
7969
|
defaultOptions,
|
|
7930
7970
|
data,
|
|
7931
|
-
|
|
7932
|
-
return _regeneratorRuntime.wrap(function
|
|
7971
|
+
_args17 = arguments;
|
|
7972
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
7933
7973
|
while (1) {
|
|
7934
|
-
switch (
|
|
7974
|
+
switch (_context17.prev = _context17.next) {
|
|
7935
7975
|
case 0:
|
|
7936
|
-
sort =
|
|
7937
|
-
options =
|
|
7976
|
+
sort = _args17.length > 1 && _args17[1] !== undefined ? _args17[1] : [];
|
|
7977
|
+
options = _args17.length > 2 && _args17[2] !== undefined ? _args17[2] : {};
|
|
7938
7978
|
defaultOptions = {
|
|
7939
7979
|
presence: false
|
|
7940
7980
|
}; // Make sure we wait for the connect promise if there is a pending one
|
|
7941
7981
|
|
|
7942
|
-
|
|
7982
|
+
_context17.next = 5;
|
|
7943
7983
|
return this.wsPromise;
|
|
7944
7984
|
|
|
7945
7985
|
case 5:
|
|
@@ -7948,7 +7988,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7948
7988
|
} // Return a list of users
|
|
7949
7989
|
|
|
7950
7990
|
|
|
7951
|
-
|
|
7991
|
+
_context17.next = 8;
|
|
7952
7992
|
return this.get(this.baseURL + '/users', {
|
|
7953
7993
|
payload: _objectSpread(_objectSpread({
|
|
7954
7994
|
filter_conditions: filterConditions,
|
|
@@ -7957,16 +7997,16 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7957
7997
|
});
|
|
7958
7998
|
|
|
7959
7999
|
case 8:
|
|
7960
|
-
data =
|
|
8000
|
+
data = _context17.sent;
|
|
7961
8001
|
this.state.updateUsers(data.users);
|
|
7962
|
-
return
|
|
8002
|
+
return _context17.abrupt("return", data);
|
|
7963
8003
|
|
|
7964
8004
|
case 11:
|
|
7965
8005
|
case "end":
|
|
7966
|
-
return
|
|
8006
|
+
return _context17.stop();
|
|
7967
8007
|
}
|
|
7968
8008
|
}
|
|
7969
|
-
},
|
|
8009
|
+
}, _callee17, this);
|
|
7970
8010
|
}));
|
|
7971
8011
|
|
|
7972
8012
|
function queryUsers(_x16) {
|
|
@@ -7988,19 +8028,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7988
8028
|
}, {
|
|
7989
8029
|
key: "queryBannedUsers",
|
|
7990
8030
|
value: function () {
|
|
7991
|
-
var _queryBannedUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8031
|
+
var _queryBannedUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18() {
|
|
7992
8032
|
var filterConditions,
|
|
7993
8033
|
sort,
|
|
7994
8034
|
options,
|
|
7995
|
-
|
|
7996
|
-
return _regeneratorRuntime.wrap(function
|
|
8035
|
+
_args18 = arguments;
|
|
8036
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
7997
8037
|
while (1) {
|
|
7998
|
-
switch (
|
|
8038
|
+
switch (_context18.prev = _context18.next) {
|
|
7999
8039
|
case 0:
|
|
8000
|
-
filterConditions =
|
|
8001
|
-
sort =
|
|
8002
|
-
options =
|
|
8003
|
-
|
|
8040
|
+
filterConditions = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
|
|
8041
|
+
sort = _args18.length > 1 && _args18[1] !== undefined ? _args18[1] : [];
|
|
8042
|
+
options = _args18.length > 2 && _args18[2] !== undefined ? _args18[2] : {};
|
|
8043
|
+
_context18.next = 5;
|
|
8004
8044
|
return this.get(this.baseURL + '/query_banned_users', {
|
|
8005
8045
|
payload: _objectSpread({
|
|
8006
8046
|
filter_conditions: filterConditions,
|
|
@@ -8009,14 +8049,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8009
8049
|
});
|
|
8010
8050
|
|
|
8011
8051
|
case 5:
|
|
8012
|
-
return
|
|
8052
|
+
return _context18.abrupt("return", _context18.sent);
|
|
8013
8053
|
|
|
8014
8054
|
case 6:
|
|
8015
8055
|
case "end":
|
|
8016
|
-
return
|
|
8056
|
+
return _context18.stop();
|
|
8017
8057
|
}
|
|
8018
8058
|
}
|
|
8019
|
-
},
|
|
8059
|
+
}, _callee18, this);
|
|
8020
8060
|
}));
|
|
8021
8061
|
|
|
8022
8062
|
function queryBannedUsers() {
|
|
@@ -8037,17 +8077,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8037
8077
|
}, {
|
|
8038
8078
|
key: "queryMessageFlags",
|
|
8039
8079
|
value: function () {
|
|
8040
|
-
var _queryMessageFlags = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8080
|
+
var _queryMessageFlags = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19() {
|
|
8041
8081
|
var filterConditions,
|
|
8042
8082
|
options,
|
|
8043
|
-
|
|
8044
|
-
return _regeneratorRuntime.wrap(function
|
|
8083
|
+
_args19 = arguments;
|
|
8084
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
8045
8085
|
while (1) {
|
|
8046
|
-
switch (
|
|
8086
|
+
switch (_context19.prev = _context19.next) {
|
|
8047
8087
|
case 0:
|
|
8048
|
-
filterConditions =
|
|
8049
|
-
options =
|
|
8050
|
-
|
|
8088
|
+
filterConditions = _args19.length > 0 && _args19[0] !== undefined ? _args19[0] : {};
|
|
8089
|
+
options = _args19.length > 1 && _args19[1] !== undefined ? _args19[1] : {};
|
|
8090
|
+
_context19.next = 4;
|
|
8051
8091
|
return this.get(this.baseURL + '/moderation/flags/message', {
|
|
8052
8092
|
payload: _objectSpread({
|
|
8053
8093
|
filter_conditions: filterConditions
|
|
@@ -8055,14 +8095,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8055
8095
|
});
|
|
8056
8096
|
|
|
8057
8097
|
case 4:
|
|
8058
|
-
return
|
|
8098
|
+
return _context19.abrupt("return", _context19.sent);
|
|
8059
8099
|
|
|
8060
8100
|
case 5:
|
|
8061
8101
|
case "end":
|
|
8062
|
-
return
|
|
8102
|
+
return _context19.stop();
|
|
8063
8103
|
}
|
|
8064
8104
|
}
|
|
8065
|
-
},
|
|
8105
|
+
}, _callee19, this);
|
|
8066
8106
|
}));
|
|
8067
8107
|
|
|
8068
8108
|
function queryMessageFlags() {
|
|
@@ -8087,28 +8127,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8087
8127
|
}, {
|
|
8088
8128
|
key: "queryChannels",
|
|
8089
8129
|
value: function () {
|
|
8090
|
-
var _queryChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8130
|
+
var _queryChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(filterConditions) {
|
|
8091
8131
|
var sort,
|
|
8092
8132
|
options,
|
|
8093
8133
|
stateOptions,
|
|
8094
8134
|
defaultOptions,
|
|
8095
8135
|
payload,
|
|
8096
8136
|
data,
|
|
8097
|
-
|
|
8098
|
-
return _regeneratorRuntime.wrap(function
|
|
8137
|
+
_args20 = arguments;
|
|
8138
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
8099
8139
|
while (1) {
|
|
8100
|
-
switch (
|
|
8140
|
+
switch (_context20.prev = _context20.next) {
|
|
8101
8141
|
case 0:
|
|
8102
|
-
sort =
|
|
8103
|
-
options =
|
|
8104
|
-
stateOptions =
|
|
8142
|
+
sort = _args20.length > 1 && _args20[1] !== undefined ? _args20[1] : [];
|
|
8143
|
+
options = _args20.length > 2 && _args20[2] !== undefined ? _args20[2] : {};
|
|
8144
|
+
stateOptions = _args20.length > 3 && _args20[3] !== undefined ? _args20[3] : {};
|
|
8105
8145
|
defaultOptions = {
|
|
8106
8146
|
state: true,
|
|
8107
8147
|
watch: true,
|
|
8108
8148
|
presence: false
|
|
8109
8149
|
}; // Make sure we wait for the connect promise if there is a pending one
|
|
8110
8150
|
|
|
8111
|
-
|
|
8151
|
+
_context20.next = 6;
|
|
8112
8152
|
return this.wsPromise;
|
|
8113
8153
|
|
|
8114
8154
|
case 6:
|
|
@@ -8121,11 +8161,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8121
8161
|
filter_conditions: filterConditions,
|
|
8122
8162
|
sort: normalizeQuerySort(sort)
|
|
8123
8163
|
}, defaultOptions), options);
|
|
8124
|
-
|
|
8164
|
+
_context20.next = 10;
|
|
8125
8165
|
return this.post(this.baseURL + '/channels', payload);
|
|
8126
8166
|
|
|
8127
8167
|
case 10:
|
|
8128
|
-
data =
|
|
8168
|
+
data = _context20.sent;
|
|
8129
8169
|
this.dispatchEvent({
|
|
8130
8170
|
type: 'channels.queried',
|
|
8131
8171
|
queriedChannels: {
|
|
@@ -8133,14 +8173,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8133
8173
|
isLatestMessageSet: true
|
|
8134
8174
|
}
|
|
8135
8175
|
});
|
|
8136
|
-
return
|
|
8176
|
+
return _context20.abrupt("return", this.hydrateActiveChannels(data.channels, stateOptions));
|
|
8137
8177
|
|
|
8138
8178
|
case 13:
|
|
8139
8179
|
case "end":
|
|
8140
|
-
return
|
|
8180
|
+
return _context20.stop();
|
|
8141
8181
|
}
|
|
8142
8182
|
}
|
|
8143
|
-
},
|
|
8183
|
+
}, _callee20, this);
|
|
8144
8184
|
}));
|
|
8145
8185
|
|
|
8146
8186
|
function queryChannels(_x17) {
|
|
@@ -8217,18 +8257,18 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8217
8257
|
}, {
|
|
8218
8258
|
key: "search",
|
|
8219
8259
|
value: function () {
|
|
8220
|
-
var _search = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8260
|
+
var _search = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(filterConditions, query) {
|
|
8221
8261
|
var options,
|
|
8222
8262
|
payload,
|
|
8223
|
-
|
|
8224
|
-
return _regeneratorRuntime.wrap(function
|
|
8263
|
+
_args21 = arguments;
|
|
8264
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
8225
8265
|
while (1) {
|
|
8226
|
-
switch (
|
|
8266
|
+
switch (_context21.prev = _context21.next) {
|
|
8227
8267
|
case 0:
|
|
8228
|
-
options =
|
|
8268
|
+
options = _args21.length > 2 && _args21[2] !== undefined ? _args21[2] : {};
|
|
8229
8269
|
|
|
8230
8270
|
if (!(options.offset && options.next)) {
|
|
8231
|
-
|
|
8271
|
+
_context21.next = 3;
|
|
8232
8272
|
break;
|
|
8233
8273
|
}
|
|
8234
8274
|
|
|
@@ -8242,46 +8282,46 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8242
8282
|
});
|
|
8243
8283
|
|
|
8244
8284
|
if (!(typeof query === 'string')) {
|
|
8245
|
-
|
|
8285
|
+
_context21.next = 8;
|
|
8246
8286
|
break;
|
|
8247
8287
|
}
|
|
8248
8288
|
|
|
8249
8289
|
payload.query = query;
|
|
8250
|
-
|
|
8290
|
+
_context21.next = 13;
|
|
8251
8291
|
break;
|
|
8252
8292
|
|
|
8253
8293
|
case 8:
|
|
8254
8294
|
if (!(_typeof(query) === 'object')) {
|
|
8255
|
-
|
|
8295
|
+
_context21.next = 12;
|
|
8256
8296
|
break;
|
|
8257
8297
|
}
|
|
8258
8298
|
|
|
8259
8299
|
payload.message_filter_conditions = query;
|
|
8260
|
-
|
|
8300
|
+
_context21.next = 13;
|
|
8261
8301
|
break;
|
|
8262
8302
|
|
|
8263
8303
|
case 12:
|
|
8264
8304
|
throw Error("Invalid type ".concat(_typeof(query), " for query parameter"));
|
|
8265
8305
|
|
|
8266
8306
|
case 13:
|
|
8267
|
-
|
|
8307
|
+
_context21.next = 15;
|
|
8268
8308
|
return this.wsPromise;
|
|
8269
8309
|
|
|
8270
8310
|
case 15:
|
|
8271
|
-
|
|
8311
|
+
_context21.next = 17;
|
|
8272
8312
|
return this.get(this.baseURL + '/search', {
|
|
8273
8313
|
payload: payload
|
|
8274
8314
|
});
|
|
8275
8315
|
|
|
8276
8316
|
case 17:
|
|
8277
|
-
return
|
|
8317
|
+
return _context21.abrupt("return", _context21.sent);
|
|
8278
8318
|
|
|
8279
8319
|
case 18:
|
|
8280
8320
|
case "end":
|
|
8281
|
-
return
|
|
8321
|
+
return _context21.stop();
|
|
8282
8322
|
}
|
|
8283
8323
|
}
|
|
8284
|
-
},
|
|
8324
|
+
}, _callee21, this);
|
|
8285
8325
|
}));
|
|
8286
8326
|
|
|
8287
8327
|
function search(_x18, _x19) {
|
|
@@ -8323,12 +8363,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8323
8363
|
}, {
|
|
8324
8364
|
key: "addDevice",
|
|
8325
8365
|
value: function () {
|
|
8326
|
-
var _addDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8327
|
-
return _regeneratorRuntime.wrap(function
|
|
8366
|
+
var _addDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(id, push_provider, userID, push_provider_name) {
|
|
8367
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
8328
8368
|
while (1) {
|
|
8329
|
-
switch (
|
|
8369
|
+
switch (_context22.prev = _context22.next) {
|
|
8330
8370
|
case 0:
|
|
8331
|
-
|
|
8371
|
+
_context22.next = 2;
|
|
8332
8372
|
return this.post(this.baseURL + '/devices', _objectSpread(_objectSpread({
|
|
8333
8373
|
id: id,
|
|
8334
8374
|
push_provider: push_provider
|
|
@@ -8339,14 +8379,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8339
8379
|
} : {}));
|
|
8340
8380
|
|
|
8341
8381
|
case 2:
|
|
8342
|
-
return
|
|
8382
|
+
return _context22.abrupt("return", _context22.sent);
|
|
8343
8383
|
|
|
8344
8384
|
case 3:
|
|
8345
8385
|
case "end":
|
|
8346
|
-
return
|
|
8386
|
+
return _context22.stop();
|
|
8347
8387
|
}
|
|
8348
8388
|
}
|
|
8349
|
-
},
|
|
8389
|
+
}, _callee22, this);
|
|
8350
8390
|
}));
|
|
8351
8391
|
|
|
8352
8392
|
function addDevice(_x20, _x21, _x22, _x23) {
|
|
@@ -8366,25 +8406,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8366
8406
|
}, {
|
|
8367
8407
|
key: "getDevices",
|
|
8368
8408
|
value: function () {
|
|
8369
|
-
var _getDevices = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8370
|
-
return _regeneratorRuntime.wrap(function
|
|
8409
|
+
var _getDevices = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(userID) {
|
|
8410
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
8371
8411
|
while (1) {
|
|
8372
|
-
switch (
|
|
8412
|
+
switch (_context23.prev = _context23.next) {
|
|
8373
8413
|
case 0:
|
|
8374
|
-
|
|
8414
|
+
_context23.next = 2;
|
|
8375
8415
|
return this.get(this.baseURL + '/devices', userID ? {
|
|
8376
8416
|
user_id: userID
|
|
8377
8417
|
} : {});
|
|
8378
8418
|
|
|
8379
8419
|
case 2:
|
|
8380
|
-
return
|
|
8420
|
+
return _context23.abrupt("return", _context23.sent);
|
|
8381
8421
|
|
|
8382
8422
|
case 3:
|
|
8383
8423
|
case "end":
|
|
8384
|
-
return
|
|
8424
|
+
return _context23.stop();
|
|
8385
8425
|
}
|
|
8386
8426
|
}
|
|
8387
|
-
},
|
|
8427
|
+
}, _callee23, this);
|
|
8388
8428
|
}));
|
|
8389
8429
|
|
|
8390
8430
|
function getDevices(_x24) {
|
|
@@ -8396,25 +8436,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8396
8436
|
}, {
|
|
8397
8437
|
key: "getUnreadCount",
|
|
8398
8438
|
value: function () {
|
|
8399
|
-
var _getUnreadCount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8400
|
-
return _regeneratorRuntime.wrap(function
|
|
8439
|
+
var _getUnreadCount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(userID) {
|
|
8440
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
8401
8441
|
while (1) {
|
|
8402
|
-
switch (
|
|
8442
|
+
switch (_context24.prev = _context24.next) {
|
|
8403
8443
|
case 0:
|
|
8404
|
-
|
|
8444
|
+
_context24.next = 2;
|
|
8405
8445
|
return this.get(this.baseURL + '/unread', userID ? {
|
|
8406
8446
|
user_id: userID
|
|
8407
8447
|
} : {});
|
|
8408
8448
|
|
|
8409
8449
|
case 2:
|
|
8410
|
-
return
|
|
8450
|
+
return _context24.abrupt("return", _context24.sent);
|
|
8411
8451
|
|
|
8412
8452
|
case 3:
|
|
8413
8453
|
case "end":
|
|
8414
|
-
return
|
|
8454
|
+
return _context24.stop();
|
|
8415
8455
|
}
|
|
8416
8456
|
}
|
|
8417
|
-
},
|
|
8457
|
+
}, _callee24, this);
|
|
8418
8458
|
}));
|
|
8419
8459
|
|
|
8420
8460
|
function getUnreadCount(_x25) {
|
|
@@ -8434,12 +8474,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8434
8474
|
}, {
|
|
8435
8475
|
key: "removeDevice",
|
|
8436
8476
|
value: function () {
|
|
8437
|
-
var _removeDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8438
|
-
return _regeneratorRuntime.wrap(function
|
|
8477
|
+
var _removeDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(id, userID) {
|
|
8478
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
8439
8479
|
while (1) {
|
|
8440
|
-
switch (
|
|
8480
|
+
switch (_context25.prev = _context25.next) {
|
|
8441
8481
|
case 0:
|
|
8442
|
-
|
|
8482
|
+
_context25.next = 2;
|
|
8443
8483
|
return this.delete(this.baseURL + '/devices', _objectSpread({
|
|
8444
8484
|
id: id
|
|
8445
8485
|
}, userID ? {
|
|
@@ -8447,14 +8487,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8447
8487
|
} : {}));
|
|
8448
8488
|
|
|
8449
8489
|
case 2:
|
|
8450
|
-
return
|
|
8490
|
+
return _context25.abrupt("return", _context25.sent);
|
|
8451
8491
|
|
|
8452
8492
|
case 3:
|
|
8453
8493
|
case "end":
|
|
8454
|
-
return
|
|
8494
|
+
return _context25.stop();
|
|
8455
8495
|
}
|
|
8456
8496
|
}
|
|
8457
|
-
},
|
|
8497
|
+
}, _callee25, this);
|
|
8458
8498
|
}));
|
|
8459
8499
|
|
|
8460
8500
|
function removeDevice(_x26, _x27) {
|
|
@@ -8474,15 +8514,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8474
8514
|
}, {
|
|
8475
8515
|
key: "getRateLimits",
|
|
8476
8516
|
value: function () {
|
|
8477
|
-
var _getRateLimits = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8517
|
+
var _getRateLimits = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(params) {
|
|
8478
8518
|
var _ref7, serverSide, web, android, ios, endpoints;
|
|
8479
8519
|
|
|
8480
|
-
return _regeneratorRuntime.wrap(function
|
|
8520
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
8481
8521
|
while (1) {
|
|
8482
|
-
switch (
|
|
8522
|
+
switch (_context26.prev = _context26.next) {
|
|
8483
8523
|
case 0:
|
|
8484
8524
|
_ref7 = params || {}, serverSide = _ref7.serverSide, web = _ref7.web, android = _ref7.android, ios = _ref7.ios, endpoints = _ref7.endpoints;
|
|
8485
|
-
return
|
|
8525
|
+
return _context26.abrupt("return", this.get(this.baseURL + '/rate_limits', {
|
|
8486
8526
|
server_side: serverSide,
|
|
8487
8527
|
web: web,
|
|
8488
8528
|
android: android,
|
|
@@ -8492,10 +8532,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8492
8532
|
|
|
8493
8533
|
case 2:
|
|
8494
8534
|
case "end":
|
|
8495
|
-
return
|
|
8535
|
+
return _context26.stop();
|
|
8496
8536
|
}
|
|
8497
8537
|
}
|
|
8498
|
-
},
|
|
8538
|
+
}, _callee26, this);
|
|
8499
8539
|
}));
|
|
8500
8540
|
|
|
8501
8541
|
function getRateLimits(_x28) {
|
|
@@ -8589,23 +8629,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8589
8629
|
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>} list of updated users
|
|
8590
8630
|
*/
|
|
8591
8631
|
function () {
|
|
8592
|
-
var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8593
|
-
return _regeneratorRuntime.wrap(function
|
|
8632
|
+
var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(partialUserObject) {
|
|
8633
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
8594
8634
|
while (1) {
|
|
8595
|
-
switch (
|
|
8635
|
+
switch (_context27.prev = _context27.next) {
|
|
8596
8636
|
case 0:
|
|
8597
|
-
|
|
8637
|
+
_context27.next = 2;
|
|
8598
8638
|
return this.partialUpdateUsers([partialUserObject]);
|
|
8599
8639
|
|
|
8600
8640
|
case 2:
|
|
8601
|
-
return
|
|
8641
|
+
return _context27.abrupt("return", _context27.sent);
|
|
8602
8642
|
|
|
8603
8643
|
case 3:
|
|
8604
8644
|
case "end":
|
|
8605
|
-
return
|
|
8645
|
+
return _context27.stop();
|
|
8606
8646
|
}
|
|
8607
8647
|
}
|
|
8608
|
-
},
|
|
8648
|
+
}, _callee27, this);
|
|
8609
8649
|
}));
|
|
8610
8650
|
|
|
8611
8651
|
function partialUpdateUser(_x29) {
|
|
@@ -8625,29 +8665,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8625
8665
|
}, {
|
|
8626
8666
|
key: "upsertUsers",
|
|
8627
8667
|
value: function () {
|
|
8628
|
-
var _upsertUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8668
|
+
var _upsertUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(users) {
|
|
8629
8669
|
var userMap, _iterator4, _step4, userObject;
|
|
8630
8670
|
|
|
8631
|
-
return _regeneratorRuntime.wrap(function
|
|
8671
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
8632
8672
|
while (1) {
|
|
8633
|
-
switch (
|
|
8673
|
+
switch (_context28.prev = _context28.next) {
|
|
8634
8674
|
case 0:
|
|
8635
8675
|
userMap = {};
|
|
8636
8676
|
_iterator4 = _createForOfIteratorHelper(users);
|
|
8637
|
-
|
|
8677
|
+
_context28.prev = 2;
|
|
8638
8678
|
|
|
8639
8679
|
_iterator4.s();
|
|
8640
8680
|
|
|
8641
8681
|
case 4:
|
|
8642
8682
|
if ((_step4 = _iterator4.n()).done) {
|
|
8643
|
-
|
|
8683
|
+
_context28.next = 11;
|
|
8644
8684
|
break;
|
|
8645
8685
|
}
|
|
8646
8686
|
|
|
8647
8687
|
userObject = _step4.value;
|
|
8648
8688
|
|
|
8649
8689
|
if (userObject.id) {
|
|
8650
|
-
|
|
8690
|
+
_context28.next = 8;
|
|
8651
8691
|
break;
|
|
8652
8692
|
}
|
|
8653
8693
|
|
|
@@ -8657,41 +8697,41 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8657
8697
|
userMap[userObject.id] = userObject;
|
|
8658
8698
|
|
|
8659
8699
|
case 9:
|
|
8660
|
-
|
|
8700
|
+
_context28.next = 4;
|
|
8661
8701
|
break;
|
|
8662
8702
|
|
|
8663
8703
|
case 11:
|
|
8664
|
-
|
|
8704
|
+
_context28.next = 16;
|
|
8665
8705
|
break;
|
|
8666
8706
|
|
|
8667
8707
|
case 13:
|
|
8668
|
-
|
|
8669
|
-
|
|
8708
|
+
_context28.prev = 13;
|
|
8709
|
+
_context28.t0 = _context28["catch"](2);
|
|
8670
8710
|
|
|
8671
|
-
_iterator4.e(
|
|
8711
|
+
_iterator4.e(_context28.t0);
|
|
8672
8712
|
|
|
8673
8713
|
case 16:
|
|
8674
|
-
|
|
8714
|
+
_context28.prev = 16;
|
|
8675
8715
|
|
|
8676
8716
|
_iterator4.f();
|
|
8677
8717
|
|
|
8678
|
-
return
|
|
8718
|
+
return _context28.finish(16);
|
|
8679
8719
|
|
|
8680
8720
|
case 19:
|
|
8681
|
-
|
|
8721
|
+
_context28.next = 21;
|
|
8682
8722
|
return this.post(this.baseURL + '/users', {
|
|
8683
8723
|
users: userMap
|
|
8684
8724
|
});
|
|
8685
8725
|
|
|
8686
8726
|
case 21:
|
|
8687
|
-
return
|
|
8727
|
+
return _context28.abrupt("return", _context28.sent);
|
|
8688
8728
|
|
|
8689
8729
|
case 22:
|
|
8690
8730
|
case "end":
|
|
8691
|
-
return
|
|
8731
|
+
return _context28.stop();
|
|
8692
8732
|
}
|
|
8693
8733
|
}
|
|
8694
|
-
},
|
|
8734
|
+
}, _callee28, this, [[2, 13, 16, 19]]);
|
|
8695
8735
|
}));
|
|
8696
8736
|
|
|
8697
8737
|
function upsertUsers(_x30) {
|
|
@@ -8742,69 +8782,69 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8742
8782
|
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
|
|
8743
8783
|
*/
|
|
8744
8784
|
function () {
|
|
8745
|
-
var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8785
|
+
var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(users) {
|
|
8746
8786
|
var _iterator5, _step5, userObject;
|
|
8747
8787
|
|
|
8748
|
-
return _regeneratorRuntime.wrap(function
|
|
8788
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
8749
8789
|
while (1) {
|
|
8750
|
-
switch (
|
|
8790
|
+
switch (_context29.prev = _context29.next) {
|
|
8751
8791
|
case 0:
|
|
8752
8792
|
_iterator5 = _createForOfIteratorHelper(users);
|
|
8753
|
-
|
|
8793
|
+
_context29.prev = 1;
|
|
8754
8794
|
|
|
8755
8795
|
_iterator5.s();
|
|
8756
8796
|
|
|
8757
8797
|
case 3:
|
|
8758
8798
|
if ((_step5 = _iterator5.n()).done) {
|
|
8759
|
-
|
|
8799
|
+
_context29.next = 9;
|
|
8760
8800
|
break;
|
|
8761
8801
|
}
|
|
8762
8802
|
|
|
8763
8803
|
userObject = _step5.value;
|
|
8764
8804
|
|
|
8765
8805
|
if (userObject.id) {
|
|
8766
|
-
|
|
8806
|
+
_context29.next = 7;
|
|
8767
8807
|
break;
|
|
8768
8808
|
}
|
|
8769
8809
|
|
|
8770
8810
|
throw Error('User ID is required when updating a user');
|
|
8771
8811
|
|
|
8772
8812
|
case 7:
|
|
8773
|
-
|
|
8813
|
+
_context29.next = 3;
|
|
8774
8814
|
break;
|
|
8775
8815
|
|
|
8776
8816
|
case 9:
|
|
8777
|
-
|
|
8817
|
+
_context29.next = 14;
|
|
8778
8818
|
break;
|
|
8779
8819
|
|
|
8780
8820
|
case 11:
|
|
8781
|
-
|
|
8782
|
-
|
|
8821
|
+
_context29.prev = 11;
|
|
8822
|
+
_context29.t0 = _context29["catch"](1);
|
|
8783
8823
|
|
|
8784
|
-
_iterator5.e(
|
|
8824
|
+
_iterator5.e(_context29.t0);
|
|
8785
8825
|
|
|
8786
8826
|
case 14:
|
|
8787
|
-
|
|
8827
|
+
_context29.prev = 14;
|
|
8788
8828
|
|
|
8789
8829
|
_iterator5.f();
|
|
8790
8830
|
|
|
8791
|
-
return
|
|
8831
|
+
return _context29.finish(14);
|
|
8792
8832
|
|
|
8793
8833
|
case 17:
|
|
8794
|
-
|
|
8834
|
+
_context29.next = 19;
|
|
8795
8835
|
return this.patch(this.baseURL + '/users', {
|
|
8796
8836
|
users: users
|
|
8797
8837
|
});
|
|
8798
8838
|
|
|
8799
8839
|
case 19:
|
|
8800
|
-
return
|
|
8840
|
+
return _context29.abrupt("return", _context29.sent);
|
|
8801
8841
|
|
|
8802
8842
|
case 20:
|
|
8803
8843
|
case "end":
|
|
8804
|
-
return
|
|
8844
|
+
return _context29.stop();
|
|
8805
8845
|
}
|
|
8806
8846
|
}
|
|
8807
|
-
},
|
|
8847
|
+
}, _callee29, this, [[1, 11, 14, 17]]);
|
|
8808
8848
|
}));
|
|
8809
8849
|
|
|
8810
8850
|
function partialUpdateUsers(_x31) {
|
|
@@ -8816,23 +8856,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8816
8856
|
}, {
|
|
8817
8857
|
key: "deleteUser",
|
|
8818
8858
|
value: function () {
|
|
8819
|
-
var _deleteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8820
|
-
return _regeneratorRuntime.wrap(function
|
|
8859
|
+
var _deleteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(userID, params) {
|
|
8860
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
8821
8861
|
while (1) {
|
|
8822
|
-
switch (
|
|
8862
|
+
switch (_context30.prev = _context30.next) {
|
|
8823
8863
|
case 0:
|
|
8824
|
-
|
|
8864
|
+
_context30.next = 2;
|
|
8825
8865
|
return this.delete(this.baseURL + "/users/".concat(userID), params);
|
|
8826
8866
|
|
|
8827
8867
|
case 2:
|
|
8828
|
-
return
|
|
8868
|
+
return _context30.abrupt("return", _context30.sent);
|
|
8829
8869
|
|
|
8830
8870
|
case 3:
|
|
8831
8871
|
case "end":
|
|
8832
|
-
return
|
|
8872
|
+
return _context30.stop();
|
|
8833
8873
|
}
|
|
8834
8874
|
}
|
|
8835
|
-
},
|
|
8875
|
+
}, _callee30, this);
|
|
8836
8876
|
}));
|
|
8837
8877
|
|
|
8838
8878
|
function deleteUser(_x32, _x33) {
|
|
@@ -8852,25 +8892,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8852
8892
|
}, {
|
|
8853
8893
|
key: "restoreUsers",
|
|
8854
8894
|
value: function () {
|
|
8855
|
-
var _restoreUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8856
|
-
return _regeneratorRuntime.wrap(function
|
|
8895
|
+
var _restoreUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(user_ids) {
|
|
8896
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
8857
8897
|
while (1) {
|
|
8858
|
-
switch (
|
|
8898
|
+
switch (_context31.prev = _context31.next) {
|
|
8859
8899
|
case 0:
|
|
8860
|
-
|
|
8900
|
+
_context31.next = 2;
|
|
8861
8901
|
return this.post(this.baseURL + "/users/restore", {
|
|
8862
8902
|
user_ids: user_ids
|
|
8863
8903
|
});
|
|
8864
8904
|
|
|
8865
8905
|
case 2:
|
|
8866
|
-
return
|
|
8906
|
+
return _context31.abrupt("return", _context31.sent);
|
|
8867
8907
|
|
|
8868
8908
|
case 3:
|
|
8869
8909
|
case "end":
|
|
8870
|
-
return
|
|
8910
|
+
return _context31.stop();
|
|
8871
8911
|
}
|
|
8872
8912
|
}
|
|
8873
|
-
},
|
|
8913
|
+
}, _callee31, this);
|
|
8874
8914
|
}));
|
|
8875
8915
|
|
|
8876
8916
|
function restoreUsers(_x34) {
|
|
@@ -8891,23 +8931,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8891
8931
|
}, {
|
|
8892
8932
|
key: "reactivateUser",
|
|
8893
8933
|
value: function () {
|
|
8894
|
-
var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8895
|
-
return _regeneratorRuntime.wrap(function
|
|
8934
|
+
var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(userID, options) {
|
|
8935
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
8896
8936
|
while (1) {
|
|
8897
|
-
switch (
|
|
8937
|
+
switch (_context32.prev = _context32.next) {
|
|
8898
8938
|
case 0:
|
|
8899
|
-
|
|
8939
|
+
_context32.next = 2;
|
|
8900
8940
|
return this.post(this.baseURL + "/users/".concat(userID, "/reactivate"), _objectSpread({}, options));
|
|
8901
8941
|
|
|
8902
8942
|
case 2:
|
|
8903
|
-
return
|
|
8943
|
+
return _context32.abrupt("return", _context32.sent);
|
|
8904
8944
|
|
|
8905
8945
|
case 3:
|
|
8906
8946
|
case "end":
|
|
8907
|
-
return
|
|
8947
|
+
return _context32.stop();
|
|
8908
8948
|
}
|
|
8909
8949
|
}
|
|
8910
|
-
},
|
|
8950
|
+
}, _callee32, this);
|
|
8911
8951
|
}));
|
|
8912
8952
|
|
|
8913
8953
|
function reactivateUser(_x35, _x36) {
|
|
@@ -8928,25 +8968,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8928
8968
|
}, {
|
|
8929
8969
|
key: "reactivateUsers",
|
|
8930
8970
|
value: function () {
|
|
8931
|
-
var _reactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8932
|
-
return _regeneratorRuntime.wrap(function
|
|
8971
|
+
var _reactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(user_ids, options) {
|
|
8972
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
8933
8973
|
while (1) {
|
|
8934
|
-
switch (
|
|
8974
|
+
switch (_context33.prev = _context33.next) {
|
|
8935
8975
|
case 0:
|
|
8936
|
-
|
|
8976
|
+
_context33.next = 2;
|
|
8937
8977
|
return this.post(this.baseURL + "/users/reactivate", _objectSpread({
|
|
8938
8978
|
user_ids: user_ids
|
|
8939
8979
|
}, options));
|
|
8940
8980
|
|
|
8941
8981
|
case 2:
|
|
8942
|
-
return
|
|
8982
|
+
return _context33.abrupt("return", _context33.sent);
|
|
8943
8983
|
|
|
8944
8984
|
case 3:
|
|
8945
8985
|
case "end":
|
|
8946
|
-
return
|
|
8986
|
+
return _context33.stop();
|
|
8947
8987
|
}
|
|
8948
8988
|
}
|
|
8949
|
-
},
|
|
8989
|
+
}, _callee33, this);
|
|
8950
8990
|
}));
|
|
8951
8991
|
|
|
8952
8992
|
function reactivateUsers(_x37, _x38) {
|
|
@@ -8967,23 +9007,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8967
9007
|
}, {
|
|
8968
9008
|
key: "deactivateUser",
|
|
8969
9009
|
value: function () {
|
|
8970
|
-
var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8971
|
-
return _regeneratorRuntime.wrap(function
|
|
9010
|
+
var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(userID, options) {
|
|
9011
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
8972
9012
|
while (1) {
|
|
8973
|
-
switch (
|
|
9013
|
+
switch (_context34.prev = _context34.next) {
|
|
8974
9014
|
case 0:
|
|
8975
|
-
|
|
9015
|
+
_context34.next = 2;
|
|
8976
9016
|
return this.post(this.baseURL + "/users/".concat(userID, "/deactivate"), _objectSpread({}, options));
|
|
8977
9017
|
|
|
8978
9018
|
case 2:
|
|
8979
|
-
return
|
|
9019
|
+
return _context34.abrupt("return", _context34.sent);
|
|
8980
9020
|
|
|
8981
9021
|
case 3:
|
|
8982
9022
|
case "end":
|
|
8983
|
-
return
|
|
9023
|
+
return _context34.stop();
|
|
8984
9024
|
}
|
|
8985
9025
|
}
|
|
8986
|
-
},
|
|
9026
|
+
}, _callee34, this);
|
|
8987
9027
|
}));
|
|
8988
9028
|
|
|
8989
9029
|
function deactivateUser(_x39, _x40) {
|
|
@@ -9004,25 +9044,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9004
9044
|
}, {
|
|
9005
9045
|
key: "deactivateUsers",
|
|
9006
9046
|
value: function () {
|
|
9007
|
-
var _deactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9008
|
-
return _regeneratorRuntime.wrap(function
|
|
9047
|
+
var _deactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(user_ids, options) {
|
|
9048
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
9009
9049
|
while (1) {
|
|
9010
|
-
switch (
|
|
9050
|
+
switch (_context35.prev = _context35.next) {
|
|
9011
9051
|
case 0:
|
|
9012
|
-
|
|
9052
|
+
_context35.next = 2;
|
|
9013
9053
|
return this.post(this.baseURL + "/users/deactivate", _objectSpread({
|
|
9014
9054
|
user_ids: user_ids
|
|
9015
9055
|
}, options));
|
|
9016
9056
|
|
|
9017
9057
|
case 2:
|
|
9018
|
-
return
|
|
9058
|
+
return _context35.abrupt("return", _context35.sent);
|
|
9019
9059
|
|
|
9020
9060
|
case 3:
|
|
9021
9061
|
case "end":
|
|
9022
|
-
return
|
|
9062
|
+
return _context35.stop();
|
|
9023
9063
|
}
|
|
9024
9064
|
}
|
|
9025
|
-
},
|
|
9065
|
+
}, _callee35, this);
|
|
9026
9066
|
}));
|
|
9027
9067
|
|
|
9028
9068
|
function deactivateUsers(_x41, _x42) {
|
|
@@ -9034,23 +9074,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9034
9074
|
}, {
|
|
9035
9075
|
key: "exportUser",
|
|
9036
9076
|
value: function () {
|
|
9037
|
-
var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9038
|
-
return _regeneratorRuntime.wrap(function
|
|
9077
|
+
var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(userID, options) {
|
|
9078
|
+
return _regeneratorRuntime.wrap(function _callee36$(_context36) {
|
|
9039
9079
|
while (1) {
|
|
9040
|
-
switch (
|
|
9080
|
+
switch (_context36.prev = _context36.next) {
|
|
9041
9081
|
case 0:
|
|
9042
|
-
|
|
9082
|
+
_context36.next = 2;
|
|
9043
9083
|
return this.get(this.baseURL + "/users/".concat(userID, "/export"), _objectSpread({}, options));
|
|
9044
9084
|
|
|
9045
9085
|
case 2:
|
|
9046
|
-
return
|
|
9086
|
+
return _context36.abrupt("return", _context36.sent);
|
|
9047
9087
|
|
|
9048
9088
|
case 3:
|
|
9049
9089
|
case "end":
|
|
9050
|
-
return
|
|
9090
|
+
return _context36.stop();
|
|
9051
9091
|
}
|
|
9052
9092
|
}
|
|
9053
|
-
},
|
|
9093
|
+
}, _callee36, this);
|
|
9054
9094
|
}));
|
|
9055
9095
|
|
|
9056
9096
|
function exportUser(_x43, _x44) {
|
|
@@ -9069,25 +9109,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9069
9109
|
}, {
|
|
9070
9110
|
key: "banUser",
|
|
9071
9111
|
value: function () {
|
|
9072
|
-
var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9073
|
-
return _regeneratorRuntime.wrap(function
|
|
9112
|
+
var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(targetUserID, options) {
|
|
9113
|
+
return _regeneratorRuntime.wrap(function _callee37$(_context37) {
|
|
9074
9114
|
while (1) {
|
|
9075
|
-
switch (
|
|
9115
|
+
switch (_context37.prev = _context37.next) {
|
|
9076
9116
|
case 0:
|
|
9077
|
-
|
|
9117
|
+
_context37.next = 2;
|
|
9078
9118
|
return this.post(this.baseURL + '/moderation/ban', _objectSpread({
|
|
9079
9119
|
target_user_id: targetUserID
|
|
9080
9120
|
}, options));
|
|
9081
9121
|
|
|
9082
9122
|
case 2:
|
|
9083
|
-
return
|
|
9123
|
+
return _context37.abrupt("return", _context37.sent);
|
|
9084
9124
|
|
|
9085
9125
|
case 3:
|
|
9086
9126
|
case "end":
|
|
9087
|
-
return
|
|
9127
|
+
return _context37.stop();
|
|
9088
9128
|
}
|
|
9089
9129
|
}
|
|
9090
|
-
},
|
|
9130
|
+
}, _callee37, this);
|
|
9091
9131
|
}));
|
|
9092
9132
|
|
|
9093
9133
|
function banUser(_x45, _x46) {
|
|
@@ -9106,25 +9146,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9106
9146
|
}, {
|
|
9107
9147
|
key: "unbanUser",
|
|
9108
9148
|
value: function () {
|
|
9109
|
-
var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9110
|
-
return _regeneratorRuntime.wrap(function
|
|
9149
|
+
var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(targetUserID, options) {
|
|
9150
|
+
return _regeneratorRuntime.wrap(function _callee38$(_context38) {
|
|
9111
9151
|
while (1) {
|
|
9112
|
-
switch (
|
|
9152
|
+
switch (_context38.prev = _context38.next) {
|
|
9113
9153
|
case 0:
|
|
9114
|
-
|
|
9154
|
+
_context38.next = 2;
|
|
9115
9155
|
return this.delete(this.baseURL + '/moderation/ban', _objectSpread({
|
|
9116
9156
|
target_user_id: targetUserID
|
|
9117
9157
|
}, options));
|
|
9118
9158
|
|
|
9119
9159
|
case 2:
|
|
9120
|
-
return
|
|
9160
|
+
return _context38.abrupt("return", _context38.sent);
|
|
9121
9161
|
|
|
9122
9162
|
case 3:
|
|
9123
9163
|
case "end":
|
|
9124
|
-
return
|
|
9164
|
+
return _context38.stop();
|
|
9125
9165
|
}
|
|
9126
9166
|
}
|
|
9127
|
-
},
|
|
9167
|
+
}, _callee38, this);
|
|
9128
9168
|
}));
|
|
9129
9169
|
|
|
9130
9170
|
function unbanUser(_x47, _x48) {
|
|
@@ -9143,25 +9183,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9143
9183
|
}, {
|
|
9144
9184
|
key: "shadowBan",
|
|
9145
9185
|
value: function () {
|
|
9146
|
-
var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9147
|
-
return _regeneratorRuntime.wrap(function
|
|
9186
|
+
var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(targetUserID, options) {
|
|
9187
|
+
return _regeneratorRuntime.wrap(function _callee39$(_context39) {
|
|
9148
9188
|
while (1) {
|
|
9149
|
-
switch (
|
|
9189
|
+
switch (_context39.prev = _context39.next) {
|
|
9150
9190
|
case 0:
|
|
9151
|
-
|
|
9191
|
+
_context39.next = 2;
|
|
9152
9192
|
return this.banUser(targetUserID, _objectSpread({
|
|
9153
9193
|
shadow: true
|
|
9154
9194
|
}, options));
|
|
9155
9195
|
|
|
9156
9196
|
case 2:
|
|
9157
|
-
return
|
|
9197
|
+
return _context39.abrupt("return", _context39.sent);
|
|
9158
9198
|
|
|
9159
9199
|
case 3:
|
|
9160
9200
|
case "end":
|
|
9161
|
-
return
|
|
9201
|
+
return _context39.stop();
|
|
9162
9202
|
}
|
|
9163
9203
|
}
|
|
9164
|
-
},
|
|
9204
|
+
}, _callee39, this);
|
|
9165
9205
|
}));
|
|
9166
9206
|
|
|
9167
9207
|
function shadowBan(_x49, _x50) {
|
|
@@ -9180,25 +9220,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9180
9220
|
}, {
|
|
9181
9221
|
key: "removeShadowBan",
|
|
9182
9222
|
value: function () {
|
|
9183
|
-
var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9184
|
-
return _regeneratorRuntime.wrap(function
|
|
9223
|
+
var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(targetUserID, options) {
|
|
9224
|
+
return _regeneratorRuntime.wrap(function _callee40$(_context40) {
|
|
9185
9225
|
while (1) {
|
|
9186
|
-
switch (
|
|
9226
|
+
switch (_context40.prev = _context40.next) {
|
|
9187
9227
|
case 0:
|
|
9188
|
-
|
|
9228
|
+
_context40.next = 2;
|
|
9189
9229
|
return this.unbanUser(targetUserID, _objectSpread({
|
|
9190
9230
|
shadow: true
|
|
9191
9231
|
}, options));
|
|
9192
9232
|
|
|
9193
9233
|
case 2:
|
|
9194
|
-
return
|
|
9234
|
+
return _context40.abrupt("return", _context40.sent);
|
|
9195
9235
|
|
|
9196
9236
|
case 3:
|
|
9197
9237
|
case "end":
|
|
9198
|
-
return
|
|
9238
|
+
return _context40.stop();
|
|
9199
9239
|
}
|
|
9200
9240
|
}
|
|
9201
|
-
},
|
|
9241
|
+
}, _callee40, this);
|
|
9202
9242
|
}));
|
|
9203
9243
|
|
|
9204
9244
|
function removeShadowBan(_x51, _x52) {
|
|
@@ -9218,15 +9258,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9218
9258
|
}, {
|
|
9219
9259
|
key: "muteUser",
|
|
9220
9260
|
value: function () {
|
|
9221
|
-
var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9261
|
+
var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(targetID, userID) {
|
|
9222
9262
|
var options,
|
|
9223
|
-
|
|
9224
|
-
return _regeneratorRuntime.wrap(function
|
|
9263
|
+
_args41 = arguments;
|
|
9264
|
+
return _regeneratorRuntime.wrap(function _callee41$(_context41) {
|
|
9225
9265
|
while (1) {
|
|
9226
|
-
switch (
|
|
9266
|
+
switch (_context41.prev = _context41.next) {
|
|
9227
9267
|
case 0:
|
|
9228
|
-
options =
|
|
9229
|
-
|
|
9268
|
+
options = _args41.length > 2 && _args41[2] !== undefined ? _args41[2] : {};
|
|
9269
|
+
_context41.next = 3;
|
|
9230
9270
|
return this.post(this.baseURL + '/moderation/mute', _objectSpread(_objectSpread({
|
|
9231
9271
|
target_id: targetID
|
|
9232
9272
|
}, userID ? {
|
|
@@ -9234,14 +9274,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9234
9274
|
} : {}), options));
|
|
9235
9275
|
|
|
9236
9276
|
case 3:
|
|
9237
|
-
return
|
|
9277
|
+
return _context41.abrupt("return", _context41.sent);
|
|
9238
9278
|
|
|
9239
9279
|
case 4:
|
|
9240
9280
|
case "end":
|
|
9241
|
-
return
|
|
9281
|
+
return _context41.stop();
|
|
9242
9282
|
}
|
|
9243
9283
|
}
|
|
9244
|
-
},
|
|
9284
|
+
}, _callee41, this);
|
|
9245
9285
|
}));
|
|
9246
9286
|
|
|
9247
9287
|
function muteUser(_x53, _x54) {
|
|
@@ -9260,12 +9300,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9260
9300
|
}, {
|
|
9261
9301
|
key: "unmuteUser",
|
|
9262
9302
|
value: function () {
|
|
9263
|
-
var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9264
|
-
return _regeneratorRuntime.wrap(function
|
|
9303
|
+
var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(targetID, currentUserID) {
|
|
9304
|
+
return _regeneratorRuntime.wrap(function _callee42$(_context42) {
|
|
9265
9305
|
while (1) {
|
|
9266
|
-
switch (
|
|
9306
|
+
switch (_context42.prev = _context42.next) {
|
|
9267
9307
|
case 0:
|
|
9268
|
-
|
|
9308
|
+
_context42.next = 2;
|
|
9269
9309
|
return this.post(this.baseURL + '/moderation/unmute', _objectSpread({
|
|
9270
9310
|
target_id: targetID
|
|
9271
9311
|
}, currentUserID ? {
|
|
@@ -9273,14 +9313,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9273
9313
|
} : {}));
|
|
9274
9314
|
|
|
9275
9315
|
case 2:
|
|
9276
|
-
return
|
|
9316
|
+
return _context42.abrupt("return", _context42.sent);
|
|
9277
9317
|
|
|
9278
9318
|
case 3:
|
|
9279
9319
|
case "end":
|
|
9280
|
-
return
|
|
9320
|
+
return _context42.stop();
|
|
9281
9321
|
}
|
|
9282
9322
|
}
|
|
9283
|
-
},
|
|
9323
|
+
}, _callee42, this);
|
|
9284
9324
|
}));
|
|
9285
9325
|
|
|
9286
9326
|
function unmuteUser(_x55, _x56) {
|
|
@@ -9318,28 +9358,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9318
9358
|
}, {
|
|
9319
9359
|
key: "flagMessage",
|
|
9320
9360
|
value: function () {
|
|
9321
|
-
var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9361
|
+
var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(targetMessageID) {
|
|
9322
9362
|
var options,
|
|
9323
|
-
|
|
9324
|
-
return _regeneratorRuntime.wrap(function
|
|
9363
|
+
_args43 = arguments;
|
|
9364
|
+
return _regeneratorRuntime.wrap(function _callee43$(_context43) {
|
|
9325
9365
|
while (1) {
|
|
9326
|
-
switch (
|
|
9366
|
+
switch (_context43.prev = _context43.next) {
|
|
9327
9367
|
case 0:
|
|
9328
|
-
options =
|
|
9329
|
-
|
|
9368
|
+
options = _args43.length > 1 && _args43[1] !== undefined ? _args43[1] : {};
|
|
9369
|
+
_context43.next = 3;
|
|
9330
9370
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
9331
9371
|
target_message_id: targetMessageID
|
|
9332
9372
|
}, options));
|
|
9333
9373
|
|
|
9334
9374
|
case 3:
|
|
9335
|
-
return
|
|
9375
|
+
return _context43.abrupt("return", _context43.sent);
|
|
9336
9376
|
|
|
9337
9377
|
case 4:
|
|
9338
9378
|
case "end":
|
|
9339
|
-
return
|
|
9379
|
+
return _context43.stop();
|
|
9340
9380
|
}
|
|
9341
9381
|
}
|
|
9342
|
-
},
|
|
9382
|
+
}, _callee43, this);
|
|
9343
9383
|
}));
|
|
9344
9384
|
|
|
9345
9385
|
function flagMessage(_x57) {
|
|
@@ -9358,28 +9398,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9358
9398
|
}, {
|
|
9359
9399
|
key: "flagUser",
|
|
9360
9400
|
value: function () {
|
|
9361
|
-
var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9401
|
+
var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(targetID) {
|
|
9362
9402
|
var options,
|
|
9363
|
-
|
|
9364
|
-
return _regeneratorRuntime.wrap(function
|
|
9403
|
+
_args44 = arguments;
|
|
9404
|
+
return _regeneratorRuntime.wrap(function _callee44$(_context44) {
|
|
9365
9405
|
while (1) {
|
|
9366
|
-
switch (
|
|
9406
|
+
switch (_context44.prev = _context44.next) {
|
|
9367
9407
|
case 0:
|
|
9368
|
-
options =
|
|
9369
|
-
|
|
9408
|
+
options = _args44.length > 1 && _args44[1] !== undefined ? _args44[1] : {};
|
|
9409
|
+
_context44.next = 3;
|
|
9370
9410
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
9371
9411
|
target_user_id: targetID
|
|
9372
9412
|
}, options));
|
|
9373
9413
|
|
|
9374
9414
|
case 3:
|
|
9375
|
-
return
|
|
9415
|
+
return _context44.abrupt("return", _context44.sent);
|
|
9376
9416
|
|
|
9377
9417
|
case 4:
|
|
9378
9418
|
case "end":
|
|
9379
|
-
return
|
|
9419
|
+
return _context44.stop();
|
|
9380
9420
|
}
|
|
9381
9421
|
}
|
|
9382
|
-
},
|
|
9422
|
+
}, _callee44, this);
|
|
9383
9423
|
}));
|
|
9384
9424
|
|
|
9385
9425
|
function flagUser(_x58) {
|
|
@@ -9398,28 +9438,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9398
9438
|
}, {
|
|
9399
9439
|
key: "unflagMessage",
|
|
9400
9440
|
value: function () {
|
|
9401
|
-
var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9441
|
+
var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(targetMessageID) {
|
|
9402
9442
|
var options,
|
|
9403
|
-
|
|
9404
|
-
return _regeneratorRuntime.wrap(function
|
|
9443
|
+
_args45 = arguments;
|
|
9444
|
+
return _regeneratorRuntime.wrap(function _callee45$(_context45) {
|
|
9405
9445
|
while (1) {
|
|
9406
|
-
switch (
|
|
9446
|
+
switch (_context45.prev = _context45.next) {
|
|
9407
9447
|
case 0:
|
|
9408
|
-
options =
|
|
9409
|
-
|
|
9448
|
+
options = _args45.length > 1 && _args45[1] !== undefined ? _args45[1] : {};
|
|
9449
|
+
_context45.next = 3;
|
|
9410
9450
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
9411
9451
|
target_message_id: targetMessageID
|
|
9412
9452
|
}, options));
|
|
9413
9453
|
|
|
9414
9454
|
case 3:
|
|
9415
|
-
return
|
|
9455
|
+
return _context45.abrupt("return", _context45.sent);
|
|
9416
9456
|
|
|
9417
9457
|
case 4:
|
|
9418
9458
|
case "end":
|
|
9419
|
-
return
|
|
9459
|
+
return _context45.stop();
|
|
9420
9460
|
}
|
|
9421
9461
|
}
|
|
9422
|
-
},
|
|
9462
|
+
}, _callee45, this);
|
|
9423
9463
|
}));
|
|
9424
9464
|
|
|
9425
9465
|
function unflagMessage(_x59) {
|
|
@@ -9438,28 +9478,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9438
9478
|
}, {
|
|
9439
9479
|
key: "unflagUser",
|
|
9440
9480
|
value: function () {
|
|
9441
|
-
var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9481
|
+
var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(targetID) {
|
|
9442
9482
|
var options,
|
|
9443
|
-
|
|
9444
|
-
return _regeneratorRuntime.wrap(function
|
|
9483
|
+
_args46 = arguments;
|
|
9484
|
+
return _regeneratorRuntime.wrap(function _callee46$(_context46) {
|
|
9445
9485
|
while (1) {
|
|
9446
|
-
switch (
|
|
9486
|
+
switch (_context46.prev = _context46.next) {
|
|
9447
9487
|
case 0:
|
|
9448
|
-
options =
|
|
9449
|
-
|
|
9488
|
+
options = _args46.length > 1 && _args46[1] !== undefined ? _args46[1] : {};
|
|
9489
|
+
_context46.next = 3;
|
|
9450
9490
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
9451
9491
|
target_user_id: targetID
|
|
9452
9492
|
}, options));
|
|
9453
9493
|
|
|
9454
9494
|
case 3:
|
|
9455
|
-
return
|
|
9495
|
+
return _context46.abrupt("return", _context46.sent);
|
|
9456
9496
|
|
|
9457
9497
|
case 4:
|
|
9458
9498
|
case "end":
|
|
9459
|
-
return
|
|
9499
|
+
return _context46.stop();
|
|
9460
9500
|
}
|
|
9461
9501
|
}
|
|
9462
|
-
},
|
|
9502
|
+
}, _callee46, this);
|
|
9463
9503
|
}));
|
|
9464
9504
|
|
|
9465
9505
|
function unflagUser(_x60) {
|
|
@@ -9479,26 +9519,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9479
9519
|
}, {
|
|
9480
9520
|
key: "getCallToken",
|
|
9481
9521
|
value: function () {
|
|
9482
|
-
var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9522
|
+
var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(callID) {
|
|
9483
9523
|
var options,
|
|
9484
|
-
|
|
9485
|
-
return _regeneratorRuntime.wrap(function
|
|
9524
|
+
_args47 = arguments;
|
|
9525
|
+
return _regeneratorRuntime.wrap(function _callee47$(_context47) {
|
|
9486
9526
|
while (1) {
|
|
9487
|
-
switch (
|
|
9527
|
+
switch (_context47.prev = _context47.next) {
|
|
9488
9528
|
case 0:
|
|
9489
|
-
options =
|
|
9490
|
-
|
|
9529
|
+
options = _args47.length > 1 && _args47[1] !== undefined ? _args47[1] : {};
|
|
9530
|
+
_context47.next = 3;
|
|
9491
9531
|
return this.post(this.baseURL + "/calls/".concat(callID), _objectSpread({}, options));
|
|
9492
9532
|
|
|
9493
9533
|
case 3:
|
|
9494
|
-
return
|
|
9534
|
+
return _context47.abrupt("return", _context47.sent);
|
|
9495
9535
|
|
|
9496
9536
|
case 4:
|
|
9497
9537
|
case "end":
|
|
9498
|
-
return
|
|
9538
|
+
return _context47.stop();
|
|
9499
9539
|
}
|
|
9500
9540
|
}
|
|
9501
|
-
},
|
|
9541
|
+
}, _callee47, this);
|
|
9502
9542
|
}));
|
|
9503
9543
|
|
|
9504
9544
|
function getCallToken(_x61) {
|
|
@@ -9524,30 +9564,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9524
9564
|
}, {
|
|
9525
9565
|
key: "_queryFlags",
|
|
9526
9566
|
value: function () {
|
|
9527
|
-
var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9567
|
+
var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48() {
|
|
9528
9568
|
var filterConditions,
|
|
9529
9569
|
options,
|
|
9530
|
-
|
|
9531
|
-
return _regeneratorRuntime.wrap(function
|
|
9570
|
+
_args48 = arguments;
|
|
9571
|
+
return _regeneratorRuntime.wrap(function _callee48$(_context48) {
|
|
9532
9572
|
while (1) {
|
|
9533
|
-
switch (
|
|
9573
|
+
switch (_context48.prev = _context48.next) {
|
|
9534
9574
|
case 0:
|
|
9535
|
-
filterConditions =
|
|
9536
|
-
options =
|
|
9537
|
-
|
|
9575
|
+
filterConditions = _args48.length > 0 && _args48[0] !== undefined ? _args48[0] : {};
|
|
9576
|
+
options = _args48.length > 1 && _args48[1] !== undefined ? _args48[1] : {};
|
|
9577
|
+
_context48.next = 4;
|
|
9538
9578
|
return this.post(this.baseURL + '/moderation/flags', _objectSpread({
|
|
9539
9579
|
filter_conditions: filterConditions
|
|
9540
9580
|
}, options));
|
|
9541
9581
|
|
|
9542
9582
|
case 4:
|
|
9543
|
-
return
|
|
9583
|
+
return _context48.abrupt("return", _context48.sent);
|
|
9544
9584
|
|
|
9545
9585
|
case 5:
|
|
9546
9586
|
case "end":
|
|
9547
|
-
return
|
|
9587
|
+
return _context48.stop();
|
|
9548
9588
|
}
|
|
9549
9589
|
}
|
|
9550
|
-
},
|
|
9590
|
+
}, _callee48, this);
|
|
9551
9591
|
}));
|
|
9552
9592
|
|
|
9553
9593
|
function _queryFlags() {
|
|
@@ -9573,30 +9613,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9573
9613
|
}, {
|
|
9574
9614
|
key: "_queryFlagReports",
|
|
9575
9615
|
value: function () {
|
|
9576
|
-
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9616
|
+
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49() {
|
|
9577
9617
|
var filterConditions,
|
|
9578
9618
|
options,
|
|
9579
|
-
|
|
9580
|
-
return _regeneratorRuntime.wrap(function
|
|
9619
|
+
_args49 = arguments;
|
|
9620
|
+
return _regeneratorRuntime.wrap(function _callee49$(_context49) {
|
|
9581
9621
|
while (1) {
|
|
9582
|
-
switch (
|
|
9622
|
+
switch (_context49.prev = _context49.next) {
|
|
9583
9623
|
case 0:
|
|
9584
|
-
filterConditions =
|
|
9585
|
-
options =
|
|
9586
|
-
|
|
9624
|
+
filterConditions = _args49.length > 0 && _args49[0] !== undefined ? _args49[0] : {};
|
|
9625
|
+
options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
|
|
9626
|
+
_context49.next = 4;
|
|
9587
9627
|
return this.post(this.baseURL + '/moderation/reports', _objectSpread({
|
|
9588
9628
|
filter_conditions: filterConditions
|
|
9589
9629
|
}, options));
|
|
9590
9630
|
|
|
9591
9631
|
case 4:
|
|
9592
|
-
return
|
|
9632
|
+
return _context49.abrupt("return", _context49.sent);
|
|
9593
9633
|
|
|
9594
9634
|
case 5:
|
|
9595
9635
|
case "end":
|
|
9596
|
-
return
|
|
9636
|
+
return _context49.stop();
|
|
9597
9637
|
}
|
|
9598
9638
|
}
|
|
9599
|
-
},
|
|
9639
|
+
}, _callee49, this);
|
|
9600
9640
|
}));
|
|
9601
9641
|
|
|
9602
9642
|
function _queryFlagReports() {
|
|
@@ -9623,28 +9663,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9623
9663
|
}, {
|
|
9624
9664
|
key: "_reviewFlagReport",
|
|
9625
9665
|
value: function () {
|
|
9626
|
-
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9666
|
+
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(id, reviewResult) {
|
|
9627
9667
|
var options,
|
|
9628
|
-
|
|
9629
|
-
return _regeneratorRuntime.wrap(function
|
|
9668
|
+
_args50 = arguments;
|
|
9669
|
+
return _regeneratorRuntime.wrap(function _callee50$(_context50) {
|
|
9630
9670
|
while (1) {
|
|
9631
|
-
switch (
|
|
9671
|
+
switch (_context50.prev = _context50.next) {
|
|
9632
9672
|
case 0:
|
|
9633
|
-
options =
|
|
9634
|
-
|
|
9673
|
+
options = _args50.length > 2 && _args50[2] !== undefined ? _args50[2] : {};
|
|
9674
|
+
_context50.next = 3;
|
|
9635
9675
|
return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
|
|
9636
9676
|
review_result: reviewResult
|
|
9637
9677
|
}, options));
|
|
9638
9678
|
|
|
9639
9679
|
case 3:
|
|
9640
|
-
return
|
|
9680
|
+
return _context50.abrupt("return", _context50.sent);
|
|
9641
9681
|
|
|
9642
9682
|
case 4:
|
|
9643
9683
|
case "end":
|
|
9644
|
-
return
|
|
9684
|
+
return _context50.stop();
|
|
9645
9685
|
}
|
|
9646
9686
|
}
|
|
9647
|
-
},
|
|
9687
|
+
}, _callee50, this);
|
|
9648
9688
|
}));
|
|
9649
9689
|
|
|
9650
9690
|
function _reviewFlagReport(_x62, _x63) {
|
|
@@ -9665,28 +9705,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9665
9705
|
}, {
|
|
9666
9706
|
key: "unblockMessage",
|
|
9667
9707
|
value: function () {
|
|
9668
|
-
var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9708
|
+
var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(targetMessageID) {
|
|
9669
9709
|
var options,
|
|
9670
|
-
|
|
9671
|
-
return _regeneratorRuntime.wrap(function
|
|
9710
|
+
_args51 = arguments;
|
|
9711
|
+
return _regeneratorRuntime.wrap(function _callee51$(_context51) {
|
|
9672
9712
|
while (1) {
|
|
9673
|
-
switch (
|
|
9713
|
+
switch (_context51.prev = _context51.next) {
|
|
9674
9714
|
case 0:
|
|
9675
|
-
options =
|
|
9676
|
-
|
|
9715
|
+
options = _args51.length > 1 && _args51[1] !== undefined ? _args51[1] : {};
|
|
9716
|
+
_context51.next = 3;
|
|
9677
9717
|
return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
|
|
9678
9718
|
target_message_id: targetMessageID
|
|
9679
9719
|
}, options));
|
|
9680
9720
|
|
|
9681
9721
|
case 3:
|
|
9682
|
-
return
|
|
9722
|
+
return _context51.abrupt("return", _context51.sent);
|
|
9683
9723
|
|
|
9684
9724
|
case 4:
|
|
9685
9725
|
case "end":
|
|
9686
|
-
return
|
|
9726
|
+
return _context51.stop();
|
|
9687
9727
|
}
|
|
9688
9728
|
}
|
|
9689
|
-
},
|
|
9729
|
+
}, _callee51, this);
|
|
9690
9730
|
}));
|
|
9691
9731
|
|
|
9692
9732
|
function unblockMessage(_x64) {
|
|
@@ -9708,23 +9748,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9708
9748
|
* @return {Promise<APIResponse>}
|
|
9709
9749
|
*/
|
|
9710
9750
|
function () {
|
|
9711
|
-
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9751
|
+
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52() {
|
|
9712
9752
|
var data,
|
|
9713
|
-
|
|
9714
|
-
return _regeneratorRuntime.wrap(function
|
|
9753
|
+
_args52 = arguments;
|
|
9754
|
+
return _regeneratorRuntime.wrap(function _callee52$(_context52) {
|
|
9715
9755
|
while (1) {
|
|
9716
|
-
switch (
|
|
9756
|
+
switch (_context52.prev = _context52.next) {
|
|
9717
9757
|
case 0:
|
|
9718
|
-
data =
|
|
9719
|
-
|
|
9758
|
+
data = _args52.length > 0 && _args52[0] !== undefined ? _args52[0] : {};
|
|
9759
|
+
_context52.next = 3;
|
|
9720
9760
|
return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
|
|
9721
9761
|
|
|
9722
9762
|
case 3:
|
|
9723
9763
|
case "end":
|
|
9724
|
-
return
|
|
9764
|
+
return _context52.stop();
|
|
9725
9765
|
}
|
|
9726
9766
|
}
|
|
9727
|
-
},
|
|
9767
|
+
}, _callee52, this);
|
|
9728
9768
|
}));
|
|
9729
9769
|
|
|
9730
9770
|
function markChannelsRead() {
|
|
@@ -9799,25 +9839,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9799
9839
|
}, {
|
|
9800
9840
|
key: "translateMessage",
|
|
9801
9841
|
value: function () {
|
|
9802
|
-
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9803
|
-
return _regeneratorRuntime.wrap(function
|
|
9842
|
+
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(messageId, language) {
|
|
9843
|
+
return _regeneratorRuntime.wrap(function _callee53$(_context53) {
|
|
9804
9844
|
while (1) {
|
|
9805
|
-
switch (
|
|
9845
|
+
switch (_context53.prev = _context53.next) {
|
|
9806
9846
|
case 0:
|
|
9807
|
-
|
|
9847
|
+
_context53.next = 2;
|
|
9808
9848
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
|
|
9809
9849
|
language: language
|
|
9810
9850
|
});
|
|
9811
9851
|
|
|
9812
9852
|
case 2:
|
|
9813
|
-
return
|
|
9853
|
+
return _context53.abrupt("return", _context53.sent);
|
|
9814
9854
|
|
|
9815
9855
|
case 3:
|
|
9816
9856
|
case "end":
|
|
9817
|
-
return
|
|
9857
|
+
return _context53.stop();
|
|
9818
9858
|
}
|
|
9819
9859
|
}
|
|
9820
|
-
},
|
|
9860
|
+
}, _callee53, this);
|
|
9821
9861
|
}));
|
|
9822
9862
|
|
|
9823
9863
|
function translateMessage(_x65, _x66) {
|
|
@@ -9922,14 +9962,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9922
9962
|
}, {
|
|
9923
9963
|
key: "updateMessage",
|
|
9924
9964
|
value: function () {
|
|
9925
|
-
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9965
|
+
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(message, userId, options) {
|
|
9926
9966
|
var clonedMessage, reservedMessageFields;
|
|
9927
|
-
return _regeneratorRuntime.wrap(function
|
|
9967
|
+
return _regeneratorRuntime.wrap(function _callee54$(_context54) {
|
|
9928
9968
|
while (1) {
|
|
9929
|
-
switch (
|
|
9969
|
+
switch (_context54.prev = _context54.next) {
|
|
9930
9970
|
case 0:
|
|
9931
9971
|
if (message.id) {
|
|
9932
|
-
|
|
9972
|
+
_context54.next = 2;
|
|
9933
9973
|
break;
|
|
9934
9974
|
}
|
|
9935
9975
|
|
|
@@ -9966,20 +10006,20 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9966
10006
|
});
|
|
9967
10007
|
}
|
|
9968
10008
|
|
|
9969
|
-
|
|
10009
|
+
_context54.next = 10;
|
|
9970
10010
|
return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
|
|
9971
10011
|
message: clonedMessage
|
|
9972
10012
|
}, options));
|
|
9973
10013
|
|
|
9974
10014
|
case 10:
|
|
9975
|
-
return
|
|
10015
|
+
return _context54.abrupt("return", _context54.sent);
|
|
9976
10016
|
|
|
9977
10017
|
case 11:
|
|
9978
10018
|
case "end":
|
|
9979
|
-
return
|
|
10019
|
+
return _context54.stop();
|
|
9980
10020
|
}
|
|
9981
10021
|
}
|
|
9982
|
-
},
|
|
10022
|
+
}, _callee54, this);
|
|
9983
10023
|
}));
|
|
9984
10024
|
|
|
9985
10025
|
function updateMessage(_x67, _x68, _x69) {
|
|
@@ -10005,14 +10045,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10005
10045
|
}, {
|
|
10006
10046
|
key: "partialUpdateMessage",
|
|
10007
10047
|
value: function () {
|
|
10008
|
-
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10048
|
+
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(id, partialMessageObject, userId, options) {
|
|
10009
10049
|
var user;
|
|
10010
|
-
return _regeneratorRuntime.wrap(function
|
|
10050
|
+
return _regeneratorRuntime.wrap(function _callee55$(_context55) {
|
|
10011
10051
|
while (1) {
|
|
10012
|
-
switch (
|
|
10052
|
+
switch (_context55.prev = _context55.next) {
|
|
10013
10053
|
case 0:
|
|
10014
10054
|
if (id) {
|
|
10015
|
-
|
|
10055
|
+
_context55.next = 2;
|
|
10016
10056
|
break;
|
|
10017
10057
|
}
|
|
10018
10058
|
|
|
@@ -10027,20 +10067,20 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10027
10067
|
};
|
|
10028
10068
|
}
|
|
10029
10069
|
|
|
10030
|
-
|
|
10070
|
+
_context55.next = 6;
|
|
10031
10071
|
return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
10032
10072
|
user: user
|
|
10033
10073
|
}));
|
|
10034
10074
|
|
|
10035
10075
|
case 6:
|
|
10036
|
-
return
|
|
10076
|
+
return _context55.abrupt("return", _context55.sent);
|
|
10037
10077
|
|
|
10038
10078
|
case 7:
|
|
10039
10079
|
case "end":
|
|
10040
|
-
return
|
|
10080
|
+
return _context55.stop();
|
|
10041
10081
|
}
|
|
10042
10082
|
}
|
|
10043
|
-
},
|
|
10083
|
+
}, _callee55, this);
|
|
10044
10084
|
}));
|
|
10045
10085
|
|
|
10046
10086
|
function partialUpdateMessage(_x70, _x71, _x72, _x73) {
|
|
@@ -10052,11 +10092,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10052
10092
|
}, {
|
|
10053
10093
|
key: "deleteMessage",
|
|
10054
10094
|
value: function () {
|
|
10055
|
-
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10095
|
+
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(messageID, hardDelete) {
|
|
10056
10096
|
var params;
|
|
10057
|
-
return _regeneratorRuntime.wrap(function
|
|
10097
|
+
return _regeneratorRuntime.wrap(function _callee56$(_context56) {
|
|
10058
10098
|
while (1) {
|
|
10059
|
-
switch (
|
|
10099
|
+
switch (_context56.prev = _context56.next) {
|
|
10060
10100
|
case 0:
|
|
10061
10101
|
params = {};
|
|
10062
10102
|
|
|
@@ -10066,18 +10106,18 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10066
10106
|
};
|
|
10067
10107
|
}
|
|
10068
10108
|
|
|
10069
|
-
|
|
10109
|
+
_context56.next = 4;
|
|
10070
10110
|
return this.delete(this.baseURL + "/messages/".concat(messageID), params);
|
|
10071
10111
|
|
|
10072
10112
|
case 4:
|
|
10073
|
-
return
|
|
10113
|
+
return _context56.abrupt("return", _context56.sent);
|
|
10074
10114
|
|
|
10075
10115
|
case 5:
|
|
10076
10116
|
case "end":
|
|
10077
|
-
return
|
|
10117
|
+
return _context56.stop();
|
|
10078
10118
|
}
|
|
10079
10119
|
}
|
|
10080
|
-
},
|
|
10120
|
+
}, _callee56, this);
|
|
10081
10121
|
}));
|
|
10082
10122
|
|
|
10083
10123
|
function deleteMessage(_x74, _x75) {
|
|
@@ -10089,23 +10129,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10089
10129
|
}, {
|
|
10090
10130
|
key: "getMessage",
|
|
10091
10131
|
value: function () {
|
|
10092
|
-
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10093
|
-
return _regeneratorRuntime.wrap(function
|
|
10132
|
+
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(messageID) {
|
|
10133
|
+
return _regeneratorRuntime.wrap(function _callee57$(_context57) {
|
|
10094
10134
|
while (1) {
|
|
10095
|
-
switch (
|
|
10135
|
+
switch (_context57.prev = _context57.next) {
|
|
10096
10136
|
case 0:
|
|
10097
|
-
|
|
10137
|
+
_context57.next = 2;
|
|
10098
10138
|
return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)));
|
|
10099
10139
|
|
|
10100
10140
|
case 2:
|
|
10101
|
-
return
|
|
10141
|
+
return _context57.abrupt("return", _context57.sent);
|
|
10102
10142
|
|
|
10103
10143
|
case 3:
|
|
10104
10144
|
case "end":
|
|
10105
|
-
return
|
|
10145
|
+
return _context57.stop();
|
|
10106
10146
|
}
|
|
10107
10147
|
}
|
|
10108
|
-
},
|
|
10148
|
+
}, _callee57, this);
|
|
10109
10149
|
}));
|
|
10110
10150
|
|
|
10111
10151
|
function getMessage(_x76) {
|
|
@@ -10117,7 +10157,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10117
10157
|
}, {
|
|
10118
10158
|
key: "getUserAgent",
|
|
10119
10159
|
value: function getUserAgent() {
|
|
10120
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
10160
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.13.0");
|
|
10121
10161
|
}
|
|
10122
10162
|
}, {
|
|
10123
10163
|
key: "setUserAgent",
|
|
@@ -10336,25 +10376,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10336
10376
|
}, {
|
|
10337
10377
|
key: "sendUserCustomEvent",
|
|
10338
10378
|
value: function () {
|
|
10339
|
-
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10340
|
-
return _regeneratorRuntime.wrap(function
|
|
10379
|
+
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(targetUserID, event) {
|
|
10380
|
+
return _regeneratorRuntime.wrap(function _callee58$(_context58) {
|
|
10341
10381
|
while (1) {
|
|
10342
|
-
switch (
|
|
10382
|
+
switch (_context58.prev = _context58.next) {
|
|
10343
10383
|
case 0:
|
|
10344
|
-
|
|
10384
|
+
_context58.next = 2;
|
|
10345
10385
|
return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
|
|
10346
10386
|
event: event
|
|
10347
10387
|
});
|
|
10348
10388
|
|
|
10349
10389
|
case 2:
|
|
10350
|
-
return
|
|
10390
|
+
return _context58.abrupt("return", _context58.sent);
|
|
10351
10391
|
|
|
10352
10392
|
case 3:
|
|
10353
10393
|
case "end":
|
|
10354
|
-
return
|
|
10394
|
+
return _context58.stop();
|
|
10355
10395
|
}
|
|
10356
10396
|
}
|
|
10357
|
-
},
|
|
10397
|
+
}, _callee58, this);
|
|
10358
10398
|
}));
|
|
10359
10399
|
|
|
10360
10400
|
function sendUserCustomEvent(_x77, _x78) {
|
|
@@ -10425,29 +10465,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10425
10465
|
}, {
|
|
10426
10466
|
key: "createSegment",
|
|
10427
10467
|
value: function () {
|
|
10428
|
-
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10468
|
+
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(params) {
|
|
10429
10469
|
var _yield$this$post, segment;
|
|
10430
10470
|
|
|
10431
|
-
return _regeneratorRuntime.wrap(function
|
|
10471
|
+
return _regeneratorRuntime.wrap(function _callee59$(_context59) {
|
|
10432
10472
|
while (1) {
|
|
10433
|
-
switch (
|
|
10473
|
+
switch (_context59.prev = _context59.next) {
|
|
10434
10474
|
case 0:
|
|
10435
|
-
|
|
10475
|
+
_context59.next = 2;
|
|
10436
10476
|
return this.post(this.baseURL + "/segments", {
|
|
10437
10477
|
segment: params
|
|
10438
10478
|
});
|
|
10439
10479
|
|
|
10440
10480
|
case 2:
|
|
10441
|
-
_yield$this$post =
|
|
10481
|
+
_yield$this$post = _context59.sent;
|
|
10442
10482
|
segment = _yield$this$post.segment;
|
|
10443
|
-
return
|
|
10483
|
+
return _context59.abrupt("return", segment);
|
|
10444
10484
|
|
|
10445
10485
|
case 5:
|
|
10446
10486
|
case "end":
|
|
10447
|
-
return
|
|
10487
|
+
return _context59.stop();
|
|
10448
10488
|
}
|
|
10449
10489
|
}
|
|
10450
|
-
},
|
|
10490
|
+
}, _callee59, this);
|
|
10451
10491
|
}));
|
|
10452
10492
|
|
|
10453
10493
|
function createSegment(_x79) {
|
|
@@ -10466,15 +10506,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10466
10506
|
}, {
|
|
10467
10507
|
key: "querySegments",
|
|
10468
10508
|
value: function () {
|
|
10469
|
-
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10509
|
+
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(filters) {
|
|
10470
10510
|
var options,
|
|
10471
|
-
|
|
10472
|
-
return _regeneratorRuntime.wrap(function
|
|
10511
|
+
_args60 = arguments;
|
|
10512
|
+
return _regeneratorRuntime.wrap(function _callee60$(_context60) {
|
|
10473
10513
|
while (1) {
|
|
10474
|
-
switch (
|
|
10514
|
+
switch (_context60.prev = _context60.next) {
|
|
10475
10515
|
case 0:
|
|
10476
|
-
options =
|
|
10477
|
-
|
|
10516
|
+
options = _args60.length > 1 && _args60[1] !== undefined ? _args60[1] : {};
|
|
10517
|
+
_context60.next = 3;
|
|
10478
10518
|
return this.get(this.baseURL + "/segments", {
|
|
10479
10519
|
payload: _objectSpread({
|
|
10480
10520
|
filter_conditions: filters
|
|
@@ -10482,14 +10522,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10482
10522
|
});
|
|
10483
10523
|
|
|
10484
10524
|
case 3:
|
|
10485
|
-
return
|
|
10525
|
+
return _context60.abrupt("return", _context60.sent);
|
|
10486
10526
|
|
|
10487
10527
|
case 4:
|
|
10488
10528
|
case "end":
|
|
10489
|
-
return
|
|
10529
|
+
return _context60.stop();
|
|
10490
10530
|
}
|
|
10491
10531
|
}
|
|
10492
|
-
},
|
|
10532
|
+
}, _callee60, this);
|
|
10493
10533
|
}));
|
|
10494
10534
|
|
|
10495
10535
|
function querySegments(_x80) {
|
|
@@ -10510,29 +10550,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10510
10550
|
}, {
|
|
10511
10551
|
key: "updateSegment",
|
|
10512
10552
|
value: function () {
|
|
10513
|
-
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10553
|
+
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id, params) {
|
|
10514
10554
|
var _yield$this$put, segment;
|
|
10515
10555
|
|
|
10516
|
-
return _regeneratorRuntime.wrap(function
|
|
10556
|
+
return _regeneratorRuntime.wrap(function _callee61$(_context61) {
|
|
10517
10557
|
while (1) {
|
|
10518
|
-
switch (
|
|
10558
|
+
switch (_context61.prev = _context61.next) {
|
|
10519
10559
|
case 0:
|
|
10520
|
-
|
|
10560
|
+
_context61.next = 2;
|
|
10521
10561
|
return this.put(this.baseURL + "/segments/".concat(id), {
|
|
10522
10562
|
segment: params
|
|
10523
10563
|
});
|
|
10524
10564
|
|
|
10525
10565
|
case 2:
|
|
10526
|
-
_yield$this$put =
|
|
10566
|
+
_yield$this$put = _context61.sent;
|
|
10527
10567
|
segment = _yield$this$put.segment;
|
|
10528
|
-
return
|
|
10568
|
+
return _context61.abrupt("return", segment);
|
|
10529
10569
|
|
|
10530
10570
|
case 5:
|
|
10531
10571
|
case "end":
|
|
10532
|
-
return
|
|
10572
|
+
return _context61.stop();
|
|
10533
10573
|
}
|
|
10534
10574
|
}
|
|
10535
|
-
},
|
|
10575
|
+
}, _callee61, this);
|
|
10536
10576
|
}));
|
|
10537
10577
|
|
|
10538
10578
|
function updateSegment(_x81, _x82) {
|
|
@@ -10552,19 +10592,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10552
10592
|
}, {
|
|
10553
10593
|
key: "deleteSegment",
|
|
10554
10594
|
value: function () {
|
|
10555
|
-
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10556
|
-
return _regeneratorRuntime.wrap(function
|
|
10595
|
+
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(id) {
|
|
10596
|
+
return _regeneratorRuntime.wrap(function _callee62$(_context62) {
|
|
10557
10597
|
while (1) {
|
|
10558
|
-
switch (
|
|
10598
|
+
switch (_context62.prev = _context62.next) {
|
|
10559
10599
|
case 0:
|
|
10560
|
-
return
|
|
10600
|
+
return _context62.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
|
|
10561
10601
|
|
|
10562
10602
|
case 1:
|
|
10563
10603
|
case "end":
|
|
10564
|
-
return
|
|
10604
|
+
return _context62.stop();
|
|
10565
10605
|
}
|
|
10566
10606
|
}
|
|
10567
|
-
},
|
|
10607
|
+
}, _callee62, this);
|
|
10568
10608
|
}));
|
|
10569
10609
|
|
|
10570
10610
|
function deleteSegment(_x83) {
|
|
@@ -10584,29 +10624,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10584
10624
|
}, {
|
|
10585
10625
|
key: "createCampaign",
|
|
10586
10626
|
value: function () {
|
|
10587
|
-
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10627
|
+
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(params) {
|
|
10588
10628
|
var _yield$this$post2, campaign;
|
|
10589
10629
|
|
|
10590
|
-
return _regeneratorRuntime.wrap(function
|
|
10630
|
+
return _regeneratorRuntime.wrap(function _callee63$(_context63) {
|
|
10591
10631
|
while (1) {
|
|
10592
|
-
switch (
|
|
10632
|
+
switch (_context63.prev = _context63.next) {
|
|
10593
10633
|
case 0:
|
|
10594
|
-
|
|
10634
|
+
_context63.next = 2;
|
|
10595
10635
|
return this.post(this.baseURL + "/campaigns", {
|
|
10596
10636
|
campaign: params
|
|
10597
10637
|
});
|
|
10598
10638
|
|
|
10599
10639
|
case 2:
|
|
10600
|
-
_yield$this$post2 =
|
|
10640
|
+
_yield$this$post2 = _context63.sent;
|
|
10601
10641
|
campaign = _yield$this$post2.campaign;
|
|
10602
|
-
return
|
|
10642
|
+
return _context63.abrupt("return", campaign);
|
|
10603
10643
|
|
|
10604
10644
|
case 5:
|
|
10605
10645
|
case "end":
|
|
10606
|
-
return
|
|
10646
|
+
return _context63.stop();
|
|
10607
10647
|
}
|
|
10608
10648
|
}
|
|
10609
|
-
},
|
|
10649
|
+
}, _callee63, this);
|
|
10610
10650
|
}));
|
|
10611
10651
|
|
|
10612
10652
|
function createCampaign(_x84) {
|
|
@@ -10625,15 +10665,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10625
10665
|
}, {
|
|
10626
10666
|
key: "queryCampaigns",
|
|
10627
10667
|
value: function () {
|
|
10628
|
-
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10668
|
+
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(filters) {
|
|
10629
10669
|
var options,
|
|
10630
|
-
|
|
10631
|
-
return _regeneratorRuntime.wrap(function
|
|
10670
|
+
_args64 = arguments;
|
|
10671
|
+
return _regeneratorRuntime.wrap(function _callee64$(_context64) {
|
|
10632
10672
|
while (1) {
|
|
10633
|
-
switch (
|
|
10673
|
+
switch (_context64.prev = _context64.next) {
|
|
10634
10674
|
case 0:
|
|
10635
|
-
options =
|
|
10636
|
-
|
|
10675
|
+
options = _args64.length > 1 && _args64[1] !== undefined ? _args64[1] : {};
|
|
10676
|
+
_context64.next = 3;
|
|
10637
10677
|
return this.get(this.baseURL + "/campaigns", {
|
|
10638
10678
|
payload: _objectSpread({
|
|
10639
10679
|
filter_conditions: filters
|
|
@@ -10641,14 +10681,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10641
10681
|
});
|
|
10642
10682
|
|
|
10643
10683
|
case 3:
|
|
10644
|
-
return
|
|
10684
|
+
return _context64.abrupt("return", _context64.sent);
|
|
10645
10685
|
|
|
10646
10686
|
case 4:
|
|
10647
10687
|
case "end":
|
|
10648
|
-
return
|
|
10688
|
+
return _context64.stop();
|
|
10649
10689
|
}
|
|
10650
10690
|
}
|
|
10651
|
-
},
|
|
10691
|
+
}, _callee64, this);
|
|
10652
10692
|
}));
|
|
10653
10693
|
|
|
10654
10694
|
function queryCampaigns(_x85) {
|
|
@@ -10669,29 +10709,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10669
10709
|
}, {
|
|
10670
10710
|
key: "updateCampaign",
|
|
10671
10711
|
value: function () {
|
|
10672
|
-
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10712
|
+
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id, params) {
|
|
10673
10713
|
var _yield$this$put2, campaign;
|
|
10674
10714
|
|
|
10675
|
-
return _regeneratorRuntime.wrap(function
|
|
10715
|
+
return _regeneratorRuntime.wrap(function _callee65$(_context65) {
|
|
10676
10716
|
while (1) {
|
|
10677
|
-
switch (
|
|
10717
|
+
switch (_context65.prev = _context65.next) {
|
|
10678
10718
|
case 0:
|
|
10679
|
-
|
|
10719
|
+
_context65.next = 2;
|
|
10680
10720
|
return this.put(this.baseURL + "/campaigns/".concat(id), {
|
|
10681
10721
|
campaign: params
|
|
10682
10722
|
});
|
|
10683
10723
|
|
|
10684
10724
|
case 2:
|
|
10685
|
-
_yield$this$put2 =
|
|
10725
|
+
_yield$this$put2 = _context65.sent;
|
|
10686
10726
|
campaign = _yield$this$put2.campaign;
|
|
10687
|
-
return
|
|
10727
|
+
return _context65.abrupt("return", campaign);
|
|
10688
10728
|
|
|
10689
10729
|
case 5:
|
|
10690
10730
|
case "end":
|
|
10691
|
-
return
|
|
10731
|
+
return _context65.stop();
|
|
10692
10732
|
}
|
|
10693
10733
|
}
|
|
10694
|
-
},
|
|
10734
|
+
}, _callee65, this);
|
|
10695
10735
|
}));
|
|
10696
10736
|
|
|
10697
10737
|
function updateCampaign(_x86, _x87) {
|
|
@@ -10711,22 +10751,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10711
10751
|
}, {
|
|
10712
10752
|
key: "deleteCampaign",
|
|
10713
10753
|
value: function () {
|
|
10714
|
-
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10754
|
+
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id) {
|
|
10715
10755
|
var params,
|
|
10716
|
-
|
|
10717
|
-
return _regeneratorRuntime.wrap(function
|
|
10756
|
+
_args66 = arguments;
|
|
10757
|
+
return _regeneratorRuntime.wrap(function _callee66$(_context66) {
|
|
10718
10758
|
while (1) {
|
|
10719
|
-
switch (
|
|
10759
|
+
switch (_context66.prev = _context66.next) {
|
|
10720
10760
|
case 0:
|
|
10721
|
-
params =
|
|
10722
|
-
return
|
|
10761
|
+
params = _args66.length > 1 && _args66[1] !== undefined ? _args66[1] : {};
|
|
10762
|
+
return _context66.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id), params));
|
|
10723
10763
|
|
|
10724
10764
|
case 2:
|
|
10725
10765
|
case "end":
|
|
10726
|
-
return
|
|
10766
|
+
return _context66.stop();
|
|
10727
10767
|
}
|
|
10728
10768
|
}
|
|
10729
|
-
},
|
|
10769
|
+
}, _callee66, this);
|
|
10730
10770
|
}));
|
|
10731
10771
|
|
|
10732
10772
|
function deleteCampaign(_x88) {
|
|
@@ -10747,30 +10787,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10747
10787
|
}, {
|
|
10748
10788
|
key: "scheduleCampaign",
|
|
10749
10789
|
value: function () {
|
|
10750
|
-
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10790
|
+
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id, params) {
|
|
10751
10791
|
var scheduledFor, _yield$this$patch, campaign;
|
|
10752
10792
|
|
|
10753
|
-
return _regeneratorRuntime.wrap(function
|
|
10793
|
+
return _regeneratorRuntime.wrap(function _callee67$(_context67) {
|
|
10754
10794
|
while (1) {
|
|
10755
|
-
switch (
|
|
10795
|
+
switch (_context67.prev = _context67.next) {
|
|
10756
10796
|
case 0:
|
|
10757
10797
|
scheduledFor = params.scheduledFor;
|
|
10758
|
-
|
|
10798
|
+
_context67.next = 3;
|
|
10759
10799
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
|
|
10760
10800
|
scheduled_for: scheduledFor
|
|
10761
10801
|
});
|
|
10762
10802
|
|
|
10763
10803
|
case 3:
|
|
10764
|
-
_yield$this$patch =
|
|
10804
|
+
_yield$this$patch = _context67.sent;
|
|
10765
10805
|
campaign = _yield$this$patch.campaign;
|
|
10766
|
-
return
|
|
10806
|
+
return _context67.abrupt("return", campaign);
|
|
10767
10807
|
|
|
10768
10808
|
case 6:
|
|
10769
10809
|
case "end":
|
|
10770
|
-
return
|
|
10810
|
+
return _context67.stop();
|
|
10771
10811
|
}
|
|
10772
10812
|
}
|
|
10773
|
-
},
|
|
10813
|
+
}, _callee67, this);
|
|
10774
10814
|
}));
|
|
10775
10815
|
|
|
10776
10816
|
function scheduleCampaign(_x89, _x90) {
|
|
@@ -10790,27 +10830,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10790
10830
|
}, {
|
|
10791
10831
|
key: "stopCampaign",
|
|
10792
10832
|
value: function () {
|
|
10793
|
-
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10833
|
+
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(id) {
|
|
10794
10834
|
var _yield$this$patch2, campaign;
|
|
10795
10835
|
|
|
10796
|
-
return _regeneratorRuntime.wrap(function
|
|
10836
|
+
return _regeneratorRuntime.wrap(function _callee68$(_context68) {
|
|
10797
10837
|
while (1) {
|
|
10798
|
-
switch (
|
|
10838
|
+
switch (_context68.prev = _context68.next) {
|
|
10799
10839
|
case 0:
|
|
10800
|
-
|
|
10840
|
+
_context68.next = 2;
|
|
10801
10841
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
|
|
10802
10842
|
|
|
10803
10843
|
case 2:
|
|
10804
|
-
_yield$this$patch2 =
|
|
10844
|
+
_yield$this$patch2 = _context68.sent;
|
|
10805
10845
|
campaign = _yield$this$patch2.campaign;
|
|
10806
|
-
return
|
|
10846
|
+
return _context68.abrupt("return", campaign);
|
|
10807
10847
|
|
|
10808
10848
|
case 5:
|
|
10809
10849
|
case "end":
|
|
10810
|
-
return
|
|
10850
|
+
return _context68.stop();
|
|
10811
10851
|
}
|
|
10812
10852
|
}
|
|
10813
|
-
},
|
|
10853
|
+
}, _callee68, this);
|
|
10814
10854
|
}));
|
|
10815
10855
|
|
|
10816
10856
|
function stopCampaign(_x91) {
|
|
@@ -10830,27 +10870,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10830
10870
|
}, {
|
|
10831
10871
|
key: "resumeCampaign",
|
|
10832
10872
|
value: function () {
|
|
10833
|
-
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10873
|
+
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id) {
|
|
10834
10874
|
var _yield$this$patch3, campaign;
|
|
10835
10875
|
|
|
10836
|
-
return _regeneratorRuntime.wrap(function
|
|
10876
|
+
return _regeneratorRuntime.wrap(function _callee69$(_context69) {
|
|
10837
10877
|
while (1) {
|
|
10838
|
-
switch (
|
|
10878
|
+
switch (_context69.prev = _context69.next) {
|
|
10839
10879
|
case 0:
|
|
10840
|
-
|
|
10880
|
+
_context69.next = 2;
|
|
10841
10881
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
|
|
10842
10882
|
|
|
10843
10883
|
case 2:
|
|
10844
|
-
_yield$this$patch3 =
|
|
10884
|
+
_yield$this$patch3 = _context69.sent;
|
|
10845
10885
|
campaign = _yield$this$patch3.campaign;
|
|
10846
|
-
return
|
|
10886
|
+
return _context69.abrupt("return", campaign);
|
|
10847
10887
|
|
|
10848
10888
|
case 5:
|
|
10849
10889
|
case "end":
|
|
10850
|
-
return
|
|
10890
|
+
return _context69.stop();
|
|
10851
10891
|
}
|
|
10852
10892
|
}
|
|
10853
|
-
},
|
|
10893
|
+
}, _callee69, this);
|
|
10854
10894
|
}));
|
|
10855
10895
|
|
|
10856
10896
|
function resumeCampaign(_x92) {
|
|
@@ -10871,27 +10911,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10871
10911
|
}, {
|
|
10872
10912
|
key: "testCampaign",
|
|
10873
10913
|
value: function () {
|
|
10874
|
-
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10914
|
+
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(id, params) {
|
|
10875
10915
|
var users;
|
|
10876
|
-
return _regeneratorRuntime.wrap(function
|
|
10916
|
+
return _regeneratorRuntime.wrap(function _callee70$(_context70) {
|
|
10877
10917
|
while (1) {
|
|
10878
|
-
switch (
|
|
10918
|
+
switch (_context70.prev = _context70.next) {
|
|
10879
10919
|
case 0:
|
|
10880
10920
|
users = params.users;
|
|
10881
|
-
|
|
10921
|
+
_context70.next = 3;
|
|
10882
10922
|
return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
|
|
10883
10923
|
users: users
|
|
10884
10924
|
});
|
|
10885
10925
|
|
|
10886
10926
|
case 3:
|
|
10887
|
-
return
|
|
10927
|
+
return _context70.abrupt("return", _context70.sent);
|
|
10888
10928
|
|
|
10889
10929
|
case 4:
|
|
10890
10930
|
case "end":
|
|
10891
|
-
return
|
|
10931
|
+
return _context70.stop();
|
|
10892
10932
|
}
|
|
10893
10933
|
}
|
|
10894
|
-
},
|
|
10934
|
+
}, _callee70, this);
|
|
10895
10935
|
}));
|
|
10896
10936
|
|
|
10897
10937
|
function testCampaign(_x93, _x94) {
|
|
@@ -10910,15 +10950,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10910
10950
|
}, {
|
|
10911
10951
|
key: "queryRecipients",
|
|
10912
10952
|
value: function () {
|
|
10913
|
-
var _queryRecipients = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10953
|
+
var _queryRecipients = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(filters) {
|
|
10914
10954
|
var options,
|
|
10915
|
-
|
|
10916
|
-
return _regeneratorRuntime.wrap(function
|
|
10955
|
+
_args71 = arguments;
|
|
10956
|
+
return _regeneratorRuntime.wrap(function _callee71$(_context71) {
|
|
10917
10957
|
while (1) {
|
|
10918
|
-
switch (
|
|
10958
|
+
switch (_context71.prev = _context71.next) {
|
|
10919
10959
|
case 0:
|
|
10920
|
-
options =
|
|
10921
|
-
|
|
10960
|
+
options = _args71.length > 1 && _args71[1] !== undefined ? _args71[1] : {};
|
|
10961
|
+
_context71.next = 3;
|
|
10922
10962
|
return this.get(this.baseURL + "/recipients", {
|
|
10923
10963
|
payload: _objectSpread({
|
|
10924
10964
|
filter_conditions: filters
|
|
@@ -10926,14 +10966,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10926
10966
|
});
|
|
10927
10967
|
|
|
10928
10968
|
case 3:
|
|
10929
|
-
return
|
|
10969
|
+
return _context71.abrupt("return", _context71.sent);
|
|
10930
10970
|
|
|
10931
10971
|
case 4:
|
|
10932
10972
|
case "end":
|
|
10933
|
-
return
|
|
10973
|
+
return _context71.stop();
|
|
10934
10974
|
}
|
|
10935
10975
|
}
|
|
10936
|
-
},
|
|
10976
|
+
}, _callee71, this);
|
|
10937
10977
|
}));
|
|
10938
10978
|
|
|
10939
10979
|
function queryRecipients(_x95) {
|
|
@@ -10952,21 +10992,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10952
10992
|
}, {
|
|
10953
10993
|
key: "enrichURL",
|
|
10954
10994
|
value: function () {
|
|
10955
|
-
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10956
|
-
return _regeneratorRuntime.wrap(function
|
|
10995
|
+
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(url) {
|
|
10996
|
+
return _regeneratorRuntime.wrap(function _callee72$(_context72) {
|
|
10957
10997
|
while (1) {
|
|
10958
|
-
switch (
|
|
10998
|
+
switch (_context72.prev = _context72.next) {
|
|
10959
10999
|
case 0:
|
|
10960
|
-
return
|
|
11000
|
+
return _context72.abrupt("return", this.get(this.baseURL + "/og", {
|
|
10961
11001
|
url: url
|
|
10962
11002
|
}));
|
|
10963
11003
|
|
|
10964
11004
|
case 1:
|
|
10965
11005
|
case "end":
|
|
10966
|
-
return
|
|
11006
|
+
return _context72.stop();
|
|
10967
11007
|
}
|
|
10968
11008
|
}
|
|
10969
|
-
},
|
|
11009
|
+
}, _callee72, this);
|
|
10970
11010
|
}));
|
|
10971
11011
|
|
|
10972
11012
|
function enrichURL(_x96) {
|
|
@@ -10986,19 +11026,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10986
11026
|
}, {
|
|
10987
11027
|
key: "getTask",
|
|
10988
11028
|
value: function () {
|
|
10989
|
-
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10990
|
-
return _regeneratorRuntime.wrap(function
|
|
11029
|
+
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id) {
|
|
11030
|
+
return _regeneratorRuntime.wrap(function _callee73$(_context73) {
|
|
10991
11031
|
while (1) {
|
|
10992
|
-
switch (
|
|
11032
|
+
switch (_context73.prev = _context73.next) {
|
|
10993
11033
|
case 0:
|
|
10994
|
-
return
|
|
11034
|
+
return _context73.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
10995
11035
|
|
|
10996
11036
|
case 1:
|
|
10997
11037
|
case "end":
|
|
10998
|
-
return
|
|
11038
|
+
return _context73.stop();
|
|
10999
11039
|
}
|
|
11000
11040
|
}
|
|
11001
|
-
},
|
|
11041
|
+
}, _callee73, this);
|
|
11002
11042
|
}));
|
|
11003
11043
|
|
|
11004
11044
|
function getTask(_x97) {
|
|
@@ -11019,28 +11059,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11019
11059
|
}, {
|
|
11020
11060
|
key: "deleteChannels",
|
|
11021
11061
|
value: function () {
|
|
11022
|
-
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11062
|
+
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(cids) {
|
|
11023
11063
|
var options,
|
|
11024
|
-
|
|
11025
|
-
return _regeneratorRuntime.wrap(function
|
|
11064
|
+
_args74 = arguments;
|
|
11065
|
+
return _regeneratorRuntime.wrap(function _callee74$(_context74) {
|
|
11026
11066
|
while (1) {
|
|
11027
|
-
switch (
|
|
11067
|
+
switch (_context74.prev = _context74.next) {
|
|
11028
11068
|
case 0:
|
|
11029
|
-
options =
|
|
11030
|
-
|
|
11069
|
+
options = _args74.length > 1 && _args74[1] !== undefined ? _args74[1] : {};
|
|
11070
|
+
_context74.next = 3;
|
|
11031
11071
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
11032
11072
|
cids: cids
|
|
11033
11073
|
}, options));
|
|
11034
11074
|
|
|
11035
11075
|
case 3:
|
|
11036
|
-
return
|
|
11076
|
+
return _context74.abrupt("return", _context74.sent);
|
|
11037
11077
|
|
|
11038
11078
|
case 4:
|
|
11039
11079
|
case "end":
|
|
11040
|
-
return
|
|
11080
|
+
return _context74.stop();
|
|
11041
11081
|
}
|
|
11042
11082
|
}
|
|
11043
|
-
},
|
|
11083
|
+
}, _callee74, this);
|
|
11044
11084
|
}));
|
|
11045
11085
|
|
|
11046
11086
|
function deleteChannels(_x98) {
|
|
@@ -11061,13 +11101,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11061
11101
|
}, {
|
|
11062
11102
|
key: "deleteUsers",
|
|
11063
11103
|
value: function () {
|
|
11064
|
-
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11065
|
-
return _regeneratorRuntime.wrap(function
|
|
11104
|
+
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(user_ids, options) {
|
|
11105
|
+
return _regeneratorRuntime.wrap(function _callee75$(_context75) {
|
|
11066
11106
|
while (1) {
|
|
11067
|
-
switch (
|
|
11107
|
+
switch (_context75.prev = _context75.next) {
|
|
11068
11108
|
case 0:
|
|
11069
11109
|
if (!((options === null || options === void 0 ? void 0 : options.user) !== 'soft' && (options === null || options === void 0 ? void 0 : options.user) !== 'hard')) {
|
|
11070
|
-
|
|
11110
|
+
_context75.next = 2;
|
|
11071
11111
|
break;
|
|
11072
11112
|
}
|
|
11073
11113
|
|
|
@@ -11075,7 +11115,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11075
11115
|
|
|
11076
11116
|
case 2:
|
|
11077
11117
|
if (!(options.messages !== undefined && options.messages !== 'soft' && options.messages !== 'hard')) {
|
|
11078
|
-
|
|
11118
|
+
_context75.next = 4;
|
|
11079
11119
|
break;
|
|
11080
11120
|
}
|
|
11081
11121
|
|
|
@@ -11083,27 +11123,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11083
11123
|
|
|
11084
11124
|
case 4:
|
|
11085
11125
|
if (!(options.conversations !== undefined && options.conversations !== 'soft' && options.conversations !== 'hard')) {
|
|
11086
|
-
|
|
11126
|
+
_context75.next = 6;
|
|
11087
11127
|
break;
|
|
11088
11128
|
}
|
|
11089
11129
|
|
|
11090
11130
|
throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
|
|
11091
11131
|
|
|
11092
11132
|
case 6:
|
|
11093
|
-
|
|
11133
|
+
_context75.next = 8;
|
|
11094
11134
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
11095
11135
|
user_ids: user_ids
|
|
11096
11136
|
}, options));
|
|
11097
11137
|
|
|
11098
11138
|
case 8:
|
|
11099
|
-
return
|
|
11139
|
+
return _context75.abrupt("return", _context75.sent);
|
|
11100
11140
|
|
|
11101
11141
|
case 9:
|
|
11102
11142
|
case "end":
|
|
11103
|
-
return
|
|
11143
|
+
return _context75.stop();
|
|
11104
11144
|
}
|
|
11105
11145
|
}
|
|
11106
|
-
},
|
|
11146
|
+
}, _callee75, this);
|
|
11107
11147
|
}));
|
|
11108
11148
|
|
|
11109
11149
|
function deleteUsers(_x99, _x100) {
|
|
@@ -11127,25 +11167,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11127
11167
|
}, {
|
|
11128
11168
|
key: "_createImportURL",
|
|
11129
11169
|
value: function () {
|
|
11130
|
-
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11131
|
-
return _regeneratorRuntime.wrap(function
|
|
11170
|
+
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(filename) {
|
|
11171
|
+
return _regeneratorRuntime.wrap(function _callee76$(_context76) {
|
|
11132
11172
|
while (1) {
|
|
11133
|
-
switch (
|
|
11173
|
+
switch (_context76.prev = _context76.next) {
|
|
11134
11174
|
case 0:
|
|
11135
|
-
|
|
11175
|
+
_context76.next = 2;
|
|
11136
11176
|
return this.post(this.baseURL + "/import_urls", {
|
|
11137
11177
|
filename: filename
|
|
11138
11178
|
});
|
|
11139
11179
|
|
|
11140
11180
|
case 2:
|
|
11141
|
-
return
|
|
11181
|
+
return _context76.abrupt("return", _context76.sent);
|
|
11142
11182
|
|
|
11143
11183
|
case 3:
|
|
11144
11184
|
case "end":
|
|
11145
|
-
return
|
|
11185
|
+
return _context76.stop();
|
|
11146
11186
|
}
|
|
11147
11187
|
}
|
|
11148
|
-
},
|
|
11188
|
+
}, _callee76, this);
|
|
11149
11189
|
}));
|
|
11150
11190
|
|
|
11151
11191
|
function _createImportURL(_x101) {
|
|
@@ -11170,30 +11210,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11170
11210
|
}, {
|
|
11171
11211
|
key: "_createImport",
|
|
11172
11212
|
value: function () {
|
|
11173
|
-
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11213
|
+
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(path) {
|
|
11174
11214
|
var options,
|
|
11175
|
-
|
|
11176
|
-
return _regeneratorRuntime.wrap(function
|
|
11215
|
+
_args77 = arguments;
|
|
11216
|
+
return _regeneratorRuntime.wrap(function _callee77$(_context77) {
|
|
11177
11217
|
while (1) {
|
|
11178
|
-
switch (
|
|
11218
|
+
switch (_context77.prev = _context77.next) {
|
|
11179
11219
|
case 0:
|
|
11180
|
-
options =
|
|
11220
|
+
options = _args77.length > 1 && _args77[1] !== undefined ? _args77[1] : {
|
|
11181
11221
|
mode: 'upsert'
|
|
11182
11222
|
};
|
|
11183
|
-
|
|
11223
|
+
_context77.next = 3;
|
|
11184
11224
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
11185
11225
|
path: path
|
|
11186
11226
|
}, options));
|
|
11187
11227
|
|
|
11188
11228
|
case 3:
|
|
11189
|
-
return
|
|
11229
|
+
return _context77.abrupt("return", _context77.sent);
|
|
11190
11230
|
|
|
11191
11231
|
case 4:
|
|
11192
11232
|
case "end":
|
|
11193
|
-
return
|
|
11233
|
+
return _context77.stop();
|
|
11194
11234
|
}
|
|
11195
11235
|
}
|
|
11196
|
-
},
|
|
11236
|
+
}, _callee77, this);
|
|
11197
11237
|
}));
|
|
11198
11238
|
|
|
11199
11239
|
function _createImport(_x102) {
|
|
@@ -11218,23 +11258,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11218
11258
|
}, {
|
|
11219
11259
|
key: "_getImport",
|
|
11220
11260
|
value: function () {
|
|
11221
|
-
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11222
|
-
return _regeneratorRuntime.wrap(function
|
|
11261
|
+
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(id) {
|
|
11262
|
+
return _regeneratorRuntime.wrap(function _callee78$(_context78) {
|
|
11223
11263
|
while (1) {
|
|
11224
|
-
switch (
|
|
11264
|
+
switch (_context78.prev = _context78.next) {
|
|
11225
11265
|
case 0:
|
|
11226
|
-
|
|
11266
|
+
_context78.next = 2;
|
|
11227
11267
|
return this.get(this.baseURL + "/imports/".concat(id));
|
|
11228
11268
|
|
|
11229
11269
|
case 2:
|
|
11230
|
-
return
|
|
11270
|
+
return _context78.abrupt("return", _context78.sent);
|
|
11231
11271
|
|
|
11232
11272
|
case 3:
|
|
11233
11273
|
case "end":
|
|
11234
|
-
return
|
|
11274
|
+
return _context78.stop();
|
|
11235
11275
|
}
|
|
11236
11276
|
}
|
|
11237
|
-
},
|
|
11277
|
+
}, _callee78, this);
|
|
11238
11278
|
}));
|
|
11239
11279
|
|
|
11240
11280
|
function _getImport(_x103) {
|
|
@@ -11259,23 +11299,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11259
11299
|
}, {
|
|
11260
11300
|
key: "_listImports",
|
|
11261
11301
|
value: function () {
|
|
11262
|
-
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11263
|
-
return _regeneratorRuntime.wrap(function
|
|
11302
|
+
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(options) {
|
|
11303
|
+
return _regeneratorRuntime.wrap(function _callee79$(_context79) {
|
|
11264
11304
|
while (1) {
|
|
11265
|
-
switch (
|
|
11305
|
+
switch (_context79.prev = _context79.next) {
|
|
11266
11306
|
case 0:
|
|
11267
|
-
|
|
11307
|
+
_context79.next = 2;
|
|
11268
11308
|
return this.get(this.baseURL + "/imports", options);
|
|
11269
11309
|
|
|
11270
11310
|
case 2:
|
|
11271
|
-
return
|
|
11311
|
+
return _context79.abrupt("return", _context79.sent);
|
|
11272
11312
|
|
|
11273
11313
|
case 3:
|
|
11274
11314
|
case "end":
|
|
11275
|
-
return
|
|
11315
|
+
return _context79.stop();
|
|
11276
11316
|
}
|
|
11277
11317
|
}
|
|
11278
|
-
},
|
|
11318
|
+
}, _callee79, this);
|
|
11279
11319
|
}));
|
|
11280
11320
|
|
|
11281
11321
|
function _listImports(_x104) {
|
|
@@ -11297,25 +11337,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11297
11337
|
}, {
|
|
11298
11338
|
key: "upsertPushProvider",
|
|
11299
11339
|
value: function () {
|
|
11300
|
-
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11301
|
-
return _regeneratorRuntime.wrap(function
|
|
11340
|
+
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(pushProvider) {
|
|
11341
|
+
return _regeneratorRuntime.wrap(function _callee80$(_context80) {
|
|
11302
11342
|
while (1) {
|
|
11303
|
-
switch (
|
|
11343
|
+
switch (_context80.prev = _context80.next) {
|
|
11304
11344
|
case 0:
|
|
11305
|
-
|
|
11345
|
+
_context80.next = 2;
|
|
11306
11346
|
return this.post(this.baseURL + "/push_providers", {
|
|
11307
11347
|
push_provider: pushProvider
|
|
11308
11348
|
});
|
|
11309
11349
|
|
|
11310
11350
|
case 2:
|
|
11311
|
-
return
|
|
11351
|
+
return _context80.abrupt("return", _context80.sent);
|
|
11312
11352
|
|
|
11313
11353
|
case 3:
|
|
11314
11354
|
case "end":
|
|
11315
|
-
return
|
|
11355
|
+
return _context80.stop();
|
|
11316
11356
|
}
|
|
11317
11357
|
}
|
|
11318
|
-
},
|
|
11358
|
+
}, _callee80, this);
|
|
11319
11359
|
}));
|
|
11320
11360
|
|
|
11321
11361
|
function upsertPushProvider(_x105) {
|
|
@@ -11337,25 +11377,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11337
11377
|
}, {
|
|
11338
11378
|
key: "deletePushProvider",
|
|
11339
11379
|
value: function () {
|
|
11340
|
-
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11380
|
+
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(_ref10) {
|
|
11341
11381
|
var type, name;
|
|
11342
|
-
return _regeneratorRuntime.wrap(function
|
|
11382
|
+
return _regeneratorRuntime.wrap(function _callee81$(_context81) {
|
|
11343
11383
|
while (1) {
|
|
11344
|
-
switch (
|
|
11384
|
+
switch (_context81.prev = _context81.next) {
|
|
11345
11385
|
case 0:
|
|
11346
11386
|
type = _ref10.type, name = _ref10.name;
|
|
11347
|
-
|
|
11387
|
+
_context81.next = 3;
|
|
11348
11388
|
return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
|
|
11349
11389
|
|
|
11350
11390
|
case 3:
|
|
11351
|
-
return
|
|
11391
|
+
return _context81.abrupt("return", _context81.sent);
|
|
11352
11392
|
|
|
11353
11393
|
case 4:
|
|
11354
11394
|
case "end":
|
|
11355
|
-
return
|
|
11395
|
+
return _context81.stop();
|
|
11356
11396
|
}
|
|
11357
11397
|
}
|
|
11358
|
-
},
|
|
11398
|
+
}, _callee81, this);
|
|
11359
11399
|
}));
|
|
11360
11400
|
|
|
11361
11401
|
function deletePushProvider(_x106) {
|
|
@@ -11375,23 +11415,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11375
11415
|
}, {
|
|
11376
11416
|
key: "listPushProviders",
|
|
11377
11417
|
value: function () {
|
|
11378
|
-
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11379
|
-
return _regeneratorRuntime.wrap(function
|
|
11418
|
+
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82() {
|
|
11419
|
+
return _regeneratorRuntime.wrap(function _callee82$(_context82) {
|
|
11380
11420
|
while (1) {
|
|
11381
|
-
switch (
|
|
11421
|
+
switch (_context82.prev = _context82.next) {
|
|
11382
11422
|
case 0:
|
|
11383
|
-
|
|
11423
|
+
_context82.next = 2;
|
|
11384
11424
|
return this.get(this.baseURL + "/push_providers");
|
|
11385
11425
|
|
|
11386
11426
|
case 2:
|
|
11387
|
-
return
|
|
11427
|
+
return _context82.abrupt("return", _context82.sent);
|
|
11388
11428
|
|
|
11389
11429
|
case 3:
|
|
11390
11430
|
case "end":
|
|
11391
|
-
return
|
|
11431
|
+
return _context82.stop();
|
|
11392
11432
|
}
|
|
11393
11433
|
}
|
|
11394
|
-
},
|
|
11434
|
+
}, _callee82, this);
|
|
11395
11435
|
}));
|
|
11396
11436
|
|
|
11397
11437
|
function listPushProviders() {
|
|
@@ -11419,23 +11459,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11419
11459
|
}, {
|
|
11420
11460
|
key: "commitMessage",
|
|
11421
11461
|
value: function () {
|
|
11422
|
-
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11423
|
-
return _regeneratorRuntime.wrap(function
|
|
11462
|
+
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(id) {
|
|
11463
|
+
return _regeneratorRuntime.wrap(function _callee83$(_context83) {
|
|
11424
11464
|
while (1) {
|
|
11425
|
-
switch (
|
|
11465
|
+
switch (_context83.prev = _context83.next) {
|
|
11426
11466
|
case 0:
|
|
11427
|
-
|
|
11467
|
+
_context83.next = 2;
|
|
11428
11468
|
return this.post(this.baseURL + "/messages/".concat(id, "/commit"));
|
|
11429
11469
|
|
|
11430
11470
|
case 2:
|
|
11431
|
-
return
|
|
11471
|
+
return _context83.abrupt("return", _context83.sent);
|
|
11432
11472
|
|
|
11433
11473
|
case 3:
|
|
11434
11474
|
case "end":
|
|
11435
|
-
return
|
|
11475
|
+
return _context83.stop();
|
|
11436
11476
|
}
|
|
11437
11477
|
}
|
|
11438
|
-
},
|
|
11478
|
+
}, _callee83, this);
|
|
11439
11479
|
}));
|
|
11440
11480
|
|
|
11441
11481
|
function commitMessage(_x107) {
|