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