stream-chat 8.12.4 → 8.13.0

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