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