stream-chat 8.52.3 → 8.54.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.js CHANGED
@@ -397,7 +397,8 @@ function isOwnUserBaseProperty(property) {
397
397
  unread_threads: true,
398
398
  invisible: true,
399
399
  privacy_settings: true,
400
- roles: true
400
+ roles: true,
401
+ push_preferences: true
401
402
  };
402
403
  return ownUserBaseProperties[property];
403
404
  }
@@ -980,8 +981,8 @@ var messageSetPagination = function messageSetPagination(params) {
980
981
  var DEFAULT_QUERY_CHANNELS_MESSAGE_LIST_PAGE_SIZE = 25;
981
982
  var DEFAULT_QUERY_CHANNEL_MESSAGE_LIST_PAGE_SIZE = 100;
982
983
  var DEFAULT_MESSAGE_SET_PAGINATION = {
983
- hasNext: true,
984
- hasPrev: true
984
+ hasNext: false,
985
+ hasPrev: false
985
986
  };
986
987
 
987
988
  function ownKeys$b(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
@@ -2008,6 +2009,8 @@ var Channel = /*#__PURE__*/function () {
2008
2009
 
2009
2010
  _defineProperty__default['default'](this, "disconnected", void 0);
2010
2011
 
2012
+ _defineProperty__default['default'](this, "push_preferences", void 0);
2013
+
2011
2014
  _defineProperty__default['default'](this, "create", /*#__PURE__*/function () {
2012
2015
  var _ref = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(options) {
2013
2016
  var defaultOptions;
@@ -12627,6 +12630,7 @@ var StreamChat = /*#__PURE__*/function () {
12627
12630
  c.data = channelState.channel;
12628
12631
  c.offlineMode = offlineMode;
12629
12632
  c.initialized = !offlineMode;
12633
+ c.push_preferences = channelState.push_preferences;
12630
12634
  var updatedMessagesSet = void 0;
12631
12635
 
12632
12636
  if (skipInitialization === undefined) {
@@ -12928,6 +12932,44 @@ var StreamChat = /*#__PURE__*/function () {
12928
12932
 
12929
12933
  return getUnreadCountBatch;
12930
12934
  }()
12935
+ /**
12936
+ * setPushPreferences - Applies the list of push preferences.
12937
+ *
12938
+ * @param {PushPreference[]} A list of push preferences.
12939
+ *
12940
+ * @return {<UpsertPushPreferencesResponse>}
12941
+ */
12942
+
12943
+ }, {
12944
+ key: "setPushPreferences",
12945
+ value: function () {
12946
+ var _setPushPreferences = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee27(preferences) {
12947
+ return _regeneratorRuntime__default['default'].wrap(function _callee27$(_context27) {
12948
+ while (1) {
12949
+ switch (_context27.prev = _context27.next) {
12950
+ case 0:
12951
+ _context27.next = 2;
12952
+ return this.post(this.baseURL + '/push_preferences', {
12953
+ preferences: preferences
12954
+ });
12955
+
12956
+ case 2:
12957
+ return _context27.abrupt("return", _context27.sent);
12958
+
12959
+ case 3:
12960
+ case "end":
12961
+ return _context27.stop();
12962
+ }
12963
+ }
12964
+ }, _callee27, this);
12965
+ }));
12966
+
12967
+ function setPushPreferences(_x29) {
12968
+ return _setPushPreferences.apply(this, arguments);
12969
+ }
12970
+
12971
+ return setPushPreferences;
12972
+ }()
12931
12973
  /**
12932
12974
  * removeDevice - Removes the device with the given id. Clientside users can only delete their own devices
12933
12975
  *
@@ -12939,12 +12981,12 @@ var StreamChat = /*#__PURE__*/function () {
12939
12981
  }, {
12940
12982
  key: "removeDevice",
12941
12983
  value: function () {
12942
- var _removeDevice = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee27(id, userID) {
12943
- return _regeneratorRuntime__default['default'].wrap(function _callee27$(_context27) {
12984
+ var _removeDevice = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee28(id, userID) {
12985
+ return _regeneratorRuntime__default['default'].wrap(function _callee28$(_context28) {
12944
12986
  while (1) {
12945
- switch (_context27.prev = _context27.next) {
12987
+ switch (_context28.prev = _context28.next) {
12946
12988
  case 0:
12947
- _context27.next = 2;
12989
+ _context28.next = 2;
12948
12990
  return this.delete(this.baseURL + '/devices', _objectSpread({
12949
12991
  id: id
12950
12992
  }, userID ? {
@@ -12952,17 +12994,17 @@ var StreamChat = /*#__PURE__*/function () {
12952
12994
  } : {}));
12953
12995
 
12954
12996
  case 2:
12955
- return _context27.abrupt("return", _context27.sent);
12997
+ return _context28.abrupt("return", _context28.sent);
12956
12998
 
12957
12999
  case 3:
12958
13000
  case "end":
12959
- return _context27.stop();
13001
+ return _context28.stop();
12960
13002
  }
12961
13003
  }
12962
- }, _callee27, this);
13004
+ }, _callee28, this);
12963
13005
  }));
12964
13006
 
12965
- function removeDevice(_x29, _x30) {
13007
+ function removeDevice(_x30, _x31) {
12966
13008
  return _removeDevice.apply(this, arguments);
12967
13009
  }
12968
13010
 
@@ -12979,15 +13021,15 @@ var StreamChat = /*#__PURE__*/function () {
12979
13021
  }, {
12980
13022
  key: "getRateLimits",
12981
13023
  value: function () {
12982
- var _getRateLimits = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee28(params) {
13024
+ var _getRateLimits = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee29(params) {
12983
13025
  var _ref7, serverSide, web, android, ios, endpoints;
12984
13026
 
12985
- return _regeneratorRuntime__default['default'].wrap(function _callee28$(_context28) {
13027
+ return _regeneratorRuntime__default['default'].wrap(function _callee29$(_context29) {
12986
13028
  while (1) {
12987
- switch (_context28.prev = _context28.next) {
13029
+ switch (_context29.prev = _context29.next) {
12988
13030
  case 0:
12989
13031
  _ref7 = params || {}, serverSide = _ref7.serverSide, web = _ref7.web, android = _ref7.android, ios = _ref7.ios, endpoints = _ref7.endpoints;
12990
- return _context28.abrupt("return", this.get(this.baseURL + '/rate_limits', {
13032
+ return _context29.abrupt("return", this.get(this.baseURL + '/rate_limits', {
12991
13033
  server_side: serverSide,
12992
13034
  web: web,
12993
13035
  android: android,
@@ -12997,13 +13039,13 @@ var StreamChat = /*#__PURE__*/function () {
12997
13039
 
12998
13040
  case 2:
12999
13041
  case "end":
13000
- return _context28.stop();
13042
+ return _context29.stop();
13001
13043
  }
13002
13044
  }
13003
- }, _callee28, this);
13045
+ }, _callee29, this);
13004
13046
  }));
13005
13047
 
13006
- function getRateLimits(_x31) {
13048
+ function getRateLimits(_x32) {
13007
13049
  return _getRateLimits.apply(this, arguments);
13008
13050
  }
13009
13051
 
@@ -13097,26 +13139,26 @@ var StreamChat = /*#__PURE__*/function () {
13097
13139
  * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>} list of updated users
13098
13140
  */
13099
13141
  function () {
13100
- var _partialUpdateUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee29(partialUserObject) {
13101
- return _regeneratorRuntime__default['default'].wrap(function _callee29$(_context29) {
13142
+ var _partialUpdateUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee30(partialUserObject) {
13143
+ return _regeneratorRuntime__default['default'].wrap(function _callee30$(_context30) {
13102
13144
  while (1) {
13103
- switch (_context29.prev = _context29.next) {
13145
+ switch (_context30.prev = _context30.next) {
13104
13146
  case 0:
13105
- _context29.next = 2;
13147
+ _context30.next = 2;
13106
13148
  return this.partialUpdateUsers([partialUserObject]);
13107
13149
 
13108
13150
  case 2:
13109
- return _context29.abrupt("return", _context29.sent);
13151
+ return _context30.abrupt("return", _context30.sent);
13110
13152
 
13111
13153
  case 3:
13112
13154
  case "end":
13113
- return _context29.stop();
13155
+ return _context30.stop();
13114
13156
  }
13115
13157
  }
13116
- }, _callee29, this);
13158
+ }, _callee30, this);
13117
13159
  }));
13118
13160
 
13119
- function partialUpdateUser(_x32) {
13161
+ function partialUpdateUser(_x33) {
13120
13162
  return _partialUpdateUser.apply(this, arguments);
13121
13163
  }
13122
13164
 
@@ -13133,29 +13175,29 @@ var StreamChat = /*#__PURE__*/function () {
13133
13175
  }, {
13134
13176
  key: "upsertUsers",
13135
13177
  value: function () {
13136
- var _upsertUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee30(users) {
13178
+ var _upsertUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee31(users) {
13137
13179
  var userMap, _iterator3, _step3, userObject;
13138
13180
 
13139
- return _regeneratorRuntime__default['default'].wrap(function _callee30$(_context30) {
13181
+ return _regeneratorRuntime__default['default'].wrap(function _callee31$(_context31) {
13140
13182
  while (1) {
13141
- switch (_context30.prev = _context30.next) {
13183
+ switch (_context31.prev = _context31.next) {
13142
13184
  case 0:
13143
13185
  userMap = {};
13144
13186
  _iterator3 = _createForOfIteratorHelper(users);
13145
- _context30.prev = 2;
13187
+ _context31.prev = 2;
13146
13188
 
13147
13189
  _iterator3.s();
13148
13190
 
13149
13191
  case 4:
13150
13192
  if ((_step3 = _iterator3.n()).done) {
13151
- _context30.next = 11;
13193
+ _context31.next = 11;
13152
13194
  break;
13153
13195
  }
13154
13196
 
13155
13197
  userObject = _step3.value;
13156
13198
 
13157
13199
  if (userObject.id) {
13158
- _context30.next = 8;
13200
+ _context31.next = 8;
13159
13201
  break;
13160
13202
  }
13161
13203
 
@@ -13165,44 +13207,44 @@ var StreamChat = /*#__PURE__*/function () {
13165
13207
  userMap[userObject.id] = userObject;
13166
13208
 
13167
13209
  case 9:
13168
- _context30.next = 4;
13210
+ _context31.next = 4;
13169
13211
  break;
13170
13212
 
13171
13213
  case 11:
13172
- _context30.next = 16;
13214
+ _context31.next = 16;
13173
13215
  break;
13174
13216
 
13175
13217
  case 13:
13176
- _context30.prev = 13;
13177
- _context30.t0 = _context30["catch"](2);
13218
+ _context31.prev = 13;
13219
+ _context31.t0 = _context31["catch"](2);
13178
13220
 
13179
- _iterator3.e(_context30.t0);
13221
+ _iterator3.e(_context31.t0);
13180
13222
 
13181
13223
  case 16:
13182
- _context30.prev = 16;
13224
+ _context31.prev = 16;
13183
13225
 
13184
13226
  _iterator3.f();
13185
13227
 
13186
- return _context30.finish(16);
13228
+ return _context31.finish(16);
13187
13229
 
13188
13230
  case 19:
13189
- _context30.next = 21;
13231
+ _context31.next = 21;
13190
13232
  return this.post(this.baseURL + '/users', {
13191
13233
  users: userMap
13192
13234
  });
13193
13235
 
13194
13236
  case 21:
13195
- return _context30.abrupt("return", _context30.sent);
13237
+ return _context31.abrupt("return", _context31.sent);
13196
13238
 
13197
13239
  case 22:
13198
13240
  case "end":
13199
- return _context30.stop();
13241
+ return _context31.stop();
13200
13242
  }
13201
13243
  }
13202
- }, _callee30, this, [[2, 13, 16, 19]]);
13244
+ }, _callee31, this, [[2, 13, 16, 19]]);
13203
13245
  }));
13204
13246
 
13205
- function upsertUsers(_x33) {
13247
+ function upsertUsers(_x34) {
13206
13248
  return _upsertUsers.apply(this, arguments);
13207
13249
  }
13208
13250
 
@@ -13250,72 +13292,72 @@ var StreamChat = /*#__PURE__*/function () {
13250
13292
  * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
13251
13293
  */
13252
13294
  function () {
13253
- var _partialUpdateUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee31(users) {
13295
+ var _partialUpdateUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee32(users) {
13254
13296
  var _iterator4, _step4, userObject;
13255
13297
 
13256
- return _regeneratorRuntime__default['default'].wrap(function _callee31$(_context31) {
13298
+ return _regeneratorRuntime__default['default'].wrap(function _callee32$(_context32) {
13257
13299
  while (1) {
13258
- switch (_context31.prev = _context31.next) {
13300
+ switch (_context32.prev = _context32.next) {
13259
13301
  case 0:
13260
13302
  _iterator4 = _createForOfIteratorHelper(users);
13261
- _context31.prev = 1;
13303
+ _context32.prev = 1;
13262
13304
 
13263
13305
  _iterator4.s();
13264
13306
 
13265
13307
  case 3:
13266
13308
  if ((_step4 = _iterator4.n()).done) {
13267
- _context31.next = 9;
13309
+ _context32.next = 9;
13268
13310
  break;
13269
13311
  }
13270
13312
 
13271
13313
  userObject = _step4.value;
13272
13314
 
13273
13315
  if (userObject.id) {
13274
- _context31.next = 7;
13316
+ _context32.next = 7;
13275
13317
  break;
13276
13318
  }
13277
13319
 
13278
13320
  throw Error('User ID is required when updating a user');
13279
13321
 
13280
13322
  case 7:
13281
- _context31.next = 3;
13323
+ _context32.next = 3;
13282
13324
  break;
13283
13325
 
13284
13326
  case 9:
13285
- _context31.next = 14;
13327
+ _context32.next = 14;
13286
13328
  break;
13287
13329
 
13288
13330
  case 11:
13289
- _context31.prev = 11;
13290
- _context31.t0 = _context31["catch"](1);
13331
+ _context32.prev = 11;
13332
+ _context32.t0 = _context32["catch"](1);
13291
13333
 
13292
- _iterator4.e(_context31.t0);
13334
+ _iterator4.e(_context32.t0);
13293
13335
 
13294
13336
  case 14:
13295
- _context31.prev = 14;
13337
+ _context32.prev = 14;
13296
13338
 
13297
13339
  _iterator4.f();
13298
13340
 
13299
- return _context31.finish(14);
13341
+ return _context32.finish(14);
13300
13342
 
13301
13343
  case 17:
13302
- _context31.next = 19;
13344
+ _context32.next = 19;
13303
13345
  return this.patch(this.baseURL + '/users', {
13304
13346
  users: users
13305
13347
  });
13306
13348
 
13307
13349
  case 19:
13308
- return _context31.abrupt("return", _context31.sent);
13350
+ return _context32.abrupt("return", _context32.sent);
13309
13351
 
13310
13352
  case 20:
13311
13353
  case "end":
13312
- return _context31.stop();
13354
+ return _context32.stop();
13313
13355
  }
13314
13356
  }
13315
- }, _callee31, this, [[1, 11, 14, 17]]);
13357
+ }, _callee32, this, [[1, 11, 14, 17]]);
13316
13358
  }));
13317
13359
 
13318
- function partialUpdateUsers(_x34) {
13360
+ function partialUpdateUsers(_x35) {
13319
13361
  return _partialUpdateUsers.apply(this, arguments);
13320
13362
  }
13321
13363
 
@@ -13324,26 +13366,26 @@ var StreamChat = /*#__PURE__*/function () {
13324
13366
  }, {
13325
13367
  key: "deleteUser",
13326
13368
  value: function () {
13327
- var _deleteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee32(userID, params) {
13328
- return _regeneratorRuntime__default['default'].wrap(function _callee32$(_context32) {
13369
+ var _deleteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee33(userID, params) {
13370
+ return _regeneratorRuntime__default['default'].wrap(function _callee33$(_context33) {
13329
13371
  while (1) {
13330
- switch (_context32.prev = _context32.next) {
13372
+ switch (_context33.prev = _context33.next) {
13331
13373
  case 0:
13332
- _context32.next = 2;
13374
+ _context33.next = 2;
13333
13375
  return this.delete(this.baseURL + "/users/".concat(encodeURIComponent(userID)), params);
13334
13376
 
13335
13377
  case 2:
13336
- return _context32.abrupt("return", _context32.sent);
13378
+ return _context33.abrupt("return", _context33.sent);
13337
13379
 
13338
13380
  case 3:
13339
13381
  case "end":
13340
- return _context32.stop();
13382
+ return _context33.stop();
13341
13383
  }
13342
13384
  }
13343
- }, _callee32, this);
13385
+ }, _callee33, this);
13344
13386
  }));
13345
13387
 
13346
- function deleteUser(_x35, _x36) {
13388
+ function deleteUser(_x36, _x37) {
13347
13389
  return _deleteUser.apply(this, arguments);
13348
13390
  }
13349
13391
 
@@ -13360,28 +13402,28 @@ var StreamChat = /*#__PURE__*/function () {
13360
13402
  }, {
13361
13403
  key: "restoreUsers",
13362
13404
  value: function () {
13363
- var _restoreUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee33(user_ids) {
13364
- return _regeneratorRuntime__default['default'].wrap(function _callee33$(_context33) {
13405
+ var _restoreUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee34(user_ids) {
13406
+ return _regeneratorRuntime__default['default'].wrap(function _callee34$(_context34) {
13365
13407
  while (1) {
13366
- switch (_context33.prev = _context33.next) {
13408
+ switch (_context34.prev = _context34.next) {
13367
13409
  case 0:
13368
- _context33.next = 2;
13410
+ _context34.next = 2;
13369
13411
  return this.post(this.baseURL + "/users/restore", {
13370
13412
  user_ids: user_ids
13371
13413
  });
13372
13414
 
13373
13415
  case 2:
13374
- return _context33.abrupt("return", _context33.sent);
13416
+ return _context34.abrupt("return", _context34.sent);
13375
13417
 
13376
13418
  case 3:
13377
13419
  case "end":
13378
- return _context33.stop();
13420
+ return _context34.stop();
13379
13421
  }
13380
13422
  }
13381
- }, _callee33, this);
13423
+ }, _callee34, this);
13382
13424
  }));
13383
13425
 
13384
- function restoreUsers(_x37) {
13426
+ function restoreUsers(_x38) {
13385
13427
  return _restoreUsers.apply(this, arguments);
13386
13428
  }
13387
13429
 
@@ -13399,26 +13441,26 @@ var StreamChat = /*#__PURE__*/function () {
13399
13441
  }, {
13400
13442
  key: "reactivateUser",
13401
13443
  value: function () {
13402
- var _reactivateUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee34(userID, options) {
13403
- return _regeneratorRuntime__default['default'].wrap(function _callee34$(_context34) {
13444
+ var _reactivateUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee35(userID, options) {
13445
+ return _regeneratorRuntime__default['default'].wrap(function _callee35$(_context35) {
13404
13446
  while (1) {
13405
- switch (_context34.prev = _context34.next) {
13447
+ switch (_context35.prev = _context35.next) {
13406
13448
  case 0:
13407
- _context34.next = 2;
13449
+ _context35.next = 2;
13408
13450
  return this.post(this.baseURL + "/users/".concat(encodeURIComponent(userID), "/reactivate"), _objectSpread({}, options));
13409
13451
 
13410
13452
  case 2:
13411
- return _context34.abrupt("return", _context34.sent);
13453
+ return _context35.abrupt("return", _context35.sent);
13412
13454
 
13413
13455
  case 3:
13414
13456
  case "end":
13415
- return _context34.stop();
13457
+ return _context35.stop();
13416
13458
  }
13417
13459
  }
13418
- }, _callee34, this);
13460
+ }, _callee35, this);
13419
13461
  }));
13420
13462
 
13421
- function reactivateUser(_x38, _x39) {
13463
+ function reactivateUser(_x39, _x40) {
13422
13464
  return _reactivateUser.apply(this, arguments);
13423
13465
  }
13424
13466
 
@@ -13436,28 +13478,28 @@ var StreamChat = /*#__PURE__*/function () {
13436
13478
  }, {
13437
13479
  key: "reactivateUsers",
13438
13480
  value: function () {
13439
- var _reactivateUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee35(user_ids, options) {
13440
- return _regeneratorRuntime__default['default'].wrap(function _callee35$(_context35) {
13481
+ var _reactivateUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee36(user_ids, options) {
13482
+ return _regeneratorRuntime__default['default'].wrap(function _callee36$(_context36) {
13441
13483
  while (1) {
13442
- switch (_context35.prev = _context35.next) {
13484
+ switch (_context36.prev = _context36.next) {
13443
13485
  case 0:
13444
- _context35.next = 2;
13486
+ _context36.next = 2;
13445
13487
  return this.post(this.baseURL + "/users/reactivate", _objectSpread({
13446
13488
  user_ids: user_ids
13447
13489
  }, options));
13448
13490
 
13449
13491
  case 2:
13450
- return _context35.abrupt("return", _context35.sent);
13492
+ return _context36.abrupt("return", _context36.sent);
13451
13493
 
13452
13494
  case 3:
13453
13495
  case "end":
13454
- return _context35.stop();
13496
+ return _context36.stop();
13455
13497
  }
13456
13498
  }
13457
- }, _callee35, this);
13499
+ }, _callee36, this);
13458
13500
  }));
13459
13501
 
13460
- function reactivateUsers(_x40, _x41) {
13502
+ function reactivateUsers(_x41, _x42) {
13461
13503
  return _reactivateUsers.apply(this, arguments);
13462
13504
  }
13463
13505
 
@@ -13475,26 +13517,26 @@ var StreamChat = /*#__PURE__*/function () {
13475
13517
  }, {
13476
13518
  key: "deactivateUser",
13477
13519
  value: function () {
13478
- var _deactivateUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee36(userID, options) {
13479
- return _regeneratorRuntime__default['default'].wrap(function _callee36$(_context36) {
13520
+ var _deactivateUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee37(userID, options) {
13521
+ return _regeneratorRuntime__default['default'].wrap(function _callee37$(_context37) {
13480
13522
  while (1) {
13481
- switch (_context36.prev = _context36.next) {
13523
+ switch (_context37.prev = _context37.next) {
13482
13524
  case 0:
13483
- _context36.next = 2;
13525
+ _context37.next = 2;
13484
13526
  return this.post(this.baseURL + "/users/".concat(encodeURIComponent(userID), "/deactivate"), _objectSpread({}, options));
13485
13527
 
13486
13528
  case 2:
13487
- return _context36.abrupt("return", _context36.sent);
13529
+ return _context37.abrupt("return", _context37.sent);
13488
13530
 
13489
13531
  case 3:
13490
13532
  case "end":
13491
- return _context36.stop();
13533
+ return _context37.stop();
13492
13534
  }
13493
13535
  }
13494
- }, _callee36, this);
13536
+ }, _callee37, this);
13495
13537
  }));
13496
13538
 
13497
- function deactivateUser(_x42, _x43) {
13539
+ function deactivateUser(_x43, _x44) {
13498
13540
  return _deactivateUser.apply(this, arguments);
13499
13541
  }
13500
13542
 
@@ -13512,28 +13554,28 @@ var StreamChat = /*#__PURE__*/function () {
13512
13554
  }, {
13513
13555
  key: "deactivateUsers",
13514
13556
  value: function () {
13515
- var _deactivateUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee37(user_ids, options) {
13516
- return _regeneratorRuntime__default['default'].wrap(function _callee37$(_context37) {
13557
+ var _deactivateUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee38(user_ids, options) {
13558
+ return _regeneratorRuntime__default['default'].wrap(function _callee38$(_context38) {
13517
13559
  while (1) {
13518
- switch (_context37.prev = _context37.next) {
13560
+ switch (_context38.prev = _context38.next) {
13519
13561
  case 0:
13520
- _context37.next = 2;
13562
+ _context38.next = 2;
13521
13563
  return this.post(this.baseURL + "/users/deactivate", _objectSpread({
13522
13564
  user_ids: user_ids
13523
13565
  }, options));
13524
13566
 
13525
13567
  case 2:
13526
- return _context37.abrupt("return", _context37.sent);
13568
+ return _context38.abrupt("return", _context38.sent);
13527
13569
 
13528
13570
  case 3:
13529
13571
  case "end":
13530
- return _context37.stop();
13572
+ return _context38.stop();
13531
13573
  }
13532
13574
  }
13533
- }, _callee37, this);
13575
+ }, _callee38, this);
13534
13576
  }));
13535
13577
 
13536
- function deactivateUsers(_x44, _x45) {
13578
+ function deactivateUsers(_x45, _x46) {
13537
13579
  return _deactivateUsers.apply(this, arguments);
13538
13580
  }
13539
13581
 
@@ -13542,26 +13584,26 @@ var StreamChat = /*#__PURE__*/function () {
13542
13584
  }, {
13543
13585
  key: "exportUser",
13544
13586
  value: function () {
13545
- var _exportUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee38(userID, options) {
13546
- return _regeneratorRuntime__default['default'].wrap(function _callee38$(_context38) {
13587
+ var _exportUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee39(userID, options) {
13588
+ return _regeneratorRuntime__default['default'].wrap(function _callee39$(_context39) {
13547
13589
  while (1) {
13548
- switch (_context38.prev = _context38.next) {
13590
+ switch (_context39.prev = _context39.next) {
13549
13591
  case 0:
13550
- _context38.next = 2;
13592
+ _context39.next = 2;
13551
13593
  return this.get(this.baseURL + "/users/".concat(encodeURIComponent(userID), "/export"), _objectSpread({}, options));
13552
13594
 
13553
13595
  case 2:
13554
- return _context38.abrupt("return", _context38.sent);
13596
+ return _context39.abrupt("return", _context39.sent);
13555
13597
 
13556
13598
  case 3:
13557
13599
  case "end":
13558
- return _context38.stop();
13600
+ return _context39.stop();
13559
13601
  }
13560
13602
  }
13561
- }, _callee38, this);
13603
+ }, _callee39, this);
13562
13604
  }));
13563
13605
 
13564
- function exportUser(_x46, _x47) {
13606
+ function exportUser(_x47, _x48) {
13565
13607
  return _exportUser.apply(this, arguments);
13566
13608
  }
13567
13609
 
@@ -13577,28 +13619,28 @@ var StreamChat = /*#__PURE__*/function () {
13577
13619
  }, {
13578
13620
  key: "banUser",
13579
13621
  value: function () {
13580
- var _banUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee39(targetUserID, options) {
13581
- return _regeneratorRuntime__default['default'].wrap(function _callee39$(_context39) {
13622
+ var _banUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee40(targetUserID, options) {
13623
+ return _regeneratorRuntime__default['default'].wrap(function _callee40$(_context40) {
13582
13624
  while (1) {
13583
- switch (_context39.prev = _context39.next) {
13625
+ switch (_context40.prev = _context40.next) {
13584
13626
  case 0:
13585
- _context39.next = 2;
13627
+ _context40.next = 2;
13586
13628
  return this.post(this.baseURL + '/moderation/ban', _objectSpread({
13587
13629
  target_user_id: targetUserID
13588
13630
  }, options));
13589
13631
 
13590
13632
  case 2:
13591
- return _context39.abrupt("return", _context39.sent);
13633
+ return _context40.abrupt("return", _context40.sent);
13592
13634
 
13593
13635
  case 3:
13594
13636
  case "end":
13595
- return _context39.stop();
13637
+ return _context40.stop();
13596
13638
  }
13597
13639
  }
13598
- }, _callee39, this);
13640
+ }, _callee40, this);
13599
13641
  }));
13600
13642
 
13601
- function banUser(_x48, _x49) {
13643
+ function banUser(_x49, _x50) {
13602
13644
  return _banUser.apply(this, arguments);
13603
13645
  }
13604
13646
 
@@ -13614,28 +13656,28 @@ var StreamChat = /*#__PURE__*/function () {
13614
13656
  }, {
13615
13657
  key: "unbanUser",
13616
13658
  value: function () {
13617
- var _unbanUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee40(targetUserID, options) {
13618
- return _regeneratorRuntime__default['default'].wrap(function _callee40$(_context40) {
13659
+ var _unbanUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee41(targetUserID, options) {
13660
+ return _regeneratorRuntime__default['default'].wrap(function _callee41$(_context41) {
13619
13661
  while (1) {
13620
- switch (_context40.prev = _context40.next) {
13662
+ switch (_context41.prev = _context41.next) {
13621
13663
  case 0:
13622
- _context40.next = 2;
13664
+ _context41.next = 2;
13623
13665
  return this.delete(this.baseURL + '/moderation/ban', _objectSpread({
13624
13666
  target_user_id: targetUserID
13625
13667
  }, options));
13626
13668
 
13627
13669
  case 2:
13628
- return _context40.abrupt("return", _context40.sent);
13670
+ return _context41.abrupt("return", _context41.sent);
13629
13671
 
13630
13672
  case 3:
13631
13673
  case "end":
13632
- return _context40.stop();
13674
+ return _context41.stop();
13633
13675
  }
13634
13676
  }
13635
- }, _callee40, this);
13677
+ }, _callee41, this);
13636
13678
  }));
13637
13679
 
13638
- function unbanUser(_x50, _x51) {
13680
+ function unbanUser(_x51, _x52) {
13639
13681
  return _unbanUser.apply(this, arguments);
13640
13682
  }
13641
13683
 
@@ -13651,28 +13693,28 @@ var StreamChat = /*#__PURE__*/function () {
13651
13693
  }, {
13652
13694
  key: "shadowBan",
13653
13695
  value: function () {
13654
- var _shadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee41(targetUserID, options) {
13655
- return _regeneratorRuntime__default['default'].wrap(function _callee41$(_context41) {
13696
+ var _shadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee42(targetUserID, options) {
13697
+ return _regeneratorRuntime__default['default'].wrap(function _callee42$(_context42) {
13656
13698
  while (1) {
13657
- switch (_context41.prev = _context41.next) {
13699
+ switch (_context42.prev = _context42.next) {
13658
13700
  case 0:
13659
- _context41.next = 2;
13701
+ _context42.next = 2;
13660
13702
  return this.banUser(targetUserID, _objectSpread({
13661
13703
  shadow: true
13662
13704
  }, options));
13663
13705
 
13664
13706
  case 2:
13665
- return _context41.abrupt("return", _context41.sent);
13707
+ return _context42.abrupt("return", _context42.sent);
13666
13708
 
13667
13709
  case 3:
13668
13710
  case "end":
13669
- return _context41.stop();
13711
+ return _context42.stop();
13670
13712
  }
13671
13713
  }
13672
- }, _callee41, this);
13714
+ }, _callee42, this);
13673
13715
  }));
13674
13716
 
13675
- function shadowBan(_x52, _x53) {
13717
+ function shadowBan(_x53, _x54) {
13676
13718
  return _shadowBan.apply(this, arguments);
13677
13719
  }
13678
13720
 
@@ -13688,28 +13730,28 @@ var StreamChat = /*#__PURE__*/function () {
13688
13730
  }, {
13689
13731
  key: "removeShadowBan",
13690
13732
  value: function () {
13691
- var _removeShadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee42(targetUserID, options) {
13692
- return _regeneratorRuntime__default['default'].wrap(function _callee42$(_context42) {
13733
+ var _removeShadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee43(targetUserID, options) {
13734
+ return _regeneratorRuntime__default['default'].wrap(function _callee43$(_context43) {
13693
13735
  while (1) {
13694
- switch (_context42.prev = _context42.next) {
13736
+ switch (_context43.prev = _context43.next) {
13695
13737
  case 0:
13696
- _context42.next = 2;
13738
+ _context43.next = 2;
13697
13739
  return this.unbanUser(targetUserID, _objectSpread({
13698
13740
  shadow: true
13699
13741
  }, options));
13700
13742
 
13701
13743
  case 2:
13702
- return _context42.abrupt("return", _context42.sent);
13744
+ return _context43.abrupt("return", _context43.sent);
13703
13745
 
13704
13746
  case 3:
13705
13747
  case "end":
13706
- return _context42.stop();
13748
+ return _context43.stop();
13707
13749
  }
13708
13750
  }
13709
- }, _callee42, this);
13751
+ }, _callee43, this);
13710
13752
  }));
13711
13753
 
13712
- function removeShadowBan(_x54, _x55) {
13754
+ function removeShadowBan(_x55, _x56) {
13713
13755
  return _removeShadowBan.apply(this, arguments);
13714
13756
  }
13715
13757
 
@@ -13718,12 +13760,12 @@ var StreamChat = /*#__PURE__*/function () {
13718
13760
  }, {
13719
13761
  key: "blockUser",
13720
13762
  value: function () {
13721
- var _blockUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee43(blockedUserID, user_id) {
13722
- return _regeneratorRuntime__default['default'].wrap(function _callee43$(_context43) {
13763
+ var _blockUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee44(blockedUserID, user_id) {
13764
+ return _regeneratorRuntime__default['default'].wrap(function _callee44$(_context44) {
13723
13765
  while (1) {
13724
- switch (_context43.prev = _context43.next) {
13766
+ switch (_context44.prev = _context44.next) {
13725
13767
  case 0:
13726
- _context43.next = 2;
13768
+ _context44.next = 2;
13727
13769
  return this.post(this.baseURL + '/users/block', _objectSpread({
13728
13770
  blocked_user_id: blockedUserID
13729
13771
  }, user_id ? {
@@ -13731,17 +13773,17 @@ var StreamChat = /*#__PURE__*/function () {
13731
13773
  } : {}));
13732
13774
 
13733
13775
  case 2:
13734
- return _context43.abrupt("return", _context43.sent);
13776
+ return _context44.abrupt("return", _context44.sent);
13735
13777
 
13736
13778
  case 3:
13737
13779
  case "end":
13738
- return _context43.stop();
13780
+ return _context44.stop();
13739
13781
  }
13740
13782
  }
13741
- }, _callee43, this);
13783
+ }, _callee44, this);
13742
13784
  }));
13743
13785
 
13744
- function blockUser(_x56, _x57) {
13786
+ function blockUser(_x57, _x58) {
13745
13787
  return _blockUser.apply(this, arguments);
13746
13788
  }
13747
13789
 
@@ -13750,28 +13792,28 @@ var StreamChat = /*#__PURE__*/function () {
13750
13792
  }, {
13751
13793
  key: "getBlockedUsers",
13752
13794
  value: function () {
13753
- var _getBlockedUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee44(user_id) {
13754
- return _regeneratorRuntime__default['default'].wrap(function _callee44$(_context44) {
13795
+ var _getBlockedUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee45(user_id) {
13796
+ return _regeneratorRuntime__default['default'].wrap(function _callee45$(_context45) {
13755
13797
  while (1) {
13756
- switch (_context44.prev = _context44.next) {
13798
+ switch (_context45.prev = _context45.next) {
13757
13799
  case 0:
13758
- _context44.next = 2;
13800
+ _context45.next = 2;
13759
13801
  return this.get(this.baseURL + '/users/block', _objectSpread({}, user_id ? {
13760
13802
  user_id: user_id
13761
13803
  } : {}));
13762
13804
 
13763
13805
  case 2:
13764
- return _context44.abrupt("return", _context44.sent);
13806
+ return _context45.abrupt("return", _context45.sent);
13765
13807
 
13766
13808
  case 3:
13767
13809
  case "end":
13768
- return _context44.stop();
13810
+ return _context45.stop();
13769
13811
  }
13770
13812
  }
13771
- }, _callee44, this);
13813
+ }, _callee45, this);
13772
13814
  }));
13773
13815
 
13774
- function getBlockedUsers(_x58) {
13816
+ function getBlockedUsers(_x59) {
13775
13817
  return _getBlockedUsers.apply(this, arguments);
13776
13818
  }
13777
13819
 
@@ -13780,12 +13822,12 @@ var StreamChat = /*#__PURE__*/function () {
13780
13822
  }, {
13781
13823
  key: "unBlockUser",
13782
13824
  value: function () {
13783
- var _unBlockUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee45(blockedUserID, userID) {
13784
- return _regeneratorRuntime__default['default'].wrap(function _callee45$(_context45) {
13825
+ var _unBlockUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee46(blockedUserID, userID) {
13826
+ return _regeneratorRuntime__default['default'].wrap(function _callee46$(_context46) {
13785
13827
  while (1) {
13786
- switch (_context45.prev = _context45.next) {
13828
+ switch (_context46.prev = _context46.next) {
13787
13829
  case 0:
13788
- _context45.next = 2;
13830
+ _context46.next = 2;
13789
13831
  return this.post(this.baseURL + '/users/unblock', _objectSpread({
13790
13832
  blocked_user_id: blockedUserID
13791
13833
  }, userID ? {
@@ -13793,17 +13835,17 @@ var StreamChat = /*#__PURE__*/function () {
13793
13835
  } : {}));
13794
13836
 
13795
13837
  case 2:
13796
- return _context45.abrupt("return", _context45.sent);
13838
+ return _context46.abrupt("return", _context46.sent);
13797
13839
 
13798
13840
  case 3:
13799
13841
  case "end":
13800
- return _context45.stop();
13842
+ return _context46.stop();
13801
13843
  }
13802
13844
  }
13803
- }, _callee45, this);
13845
+ }, _callee46, this);
13804
13846
  }));
13805
13847
 
13806
- function unBlockUser(_x59, _x60) {
13848
+ function unBlockUser(_x60, _x61) {
13807
13849
  return _unBlockUser.apply(this, arguments);
13808
13850
  }
13809
13851
 
@@ -13820,15 +13862,15 @@ var StreamChat = /*#__PURE__*/function () {
13820
13862
  }, {
13821
13863
  key: "muteUser",
13822
13864
  value: function () {
13823
- var _muteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee46(targetID, userID) {
13865
+ var _muteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee47(targetID, userID) {
13824
13866
  var options,
13825
- _args46 = arguments;
13826
- return _regeneratorRuntime__default['default'].wrap(function _callee46$(_context46) {
13867
+ _args47 = arguments;
13868
+ return _regeneratorRuntime__default['default'].wrap(function _callee47$(_context47) {
13827
13869
  while (1) {
13828
- switch (_context46.prev = _context46.next) {
13870
+ switch (_context47.prev = _context47.next) {
13829
13871
  case 0:
13830
- options = _args46.length > 2 && _args46[2] !== undefined ? _args46[2] : {};
13831
- _context46.next = 3;
13872
+ options = _args47.length > 2 && _args47[2] !== undefined ? _args47[2] : {};
13873
+ _context47.next = 3;
13832
13874
  return this.post(this.baseURL + '/moderation/mute', _objectSpread(_objectSpread({
13833
13875
  target_id: targetID
13834
13876
  }, userID ? {
@@ -13836,17 +13878,17 @@ var StreamChat = /*#__PURE__*/function () {
13836
13878
  } : {}), options));
13837
13879
 
13838
13880
  case 3:
13839
- return _context46.abrupt("return", _context46.sent);
13881
+ return _context47.abrupt("return", _context47.sent);
13840
13882
 
13841
13883
  case 4:
13842
13884
  case "end":
13843
- return _context46.stop();
13885
+ return _context47.stop();
13844
13886
  }
13845
13887
  }
13846
- }, _callee46, this);
13888
+ }, _callee47, this);
13847
13889
  }));
13848
13890
 
13849
- function muteUser(_x61, _x62) {
13891
+ function muteUser(_x62, _x63) {
13850
13892
  return _muteUser.apply(this, arguments);
13851
13893
  }
13852
13894
 
@@ -13862,12 +13904,12 @@ var StreamChat = /*#__PURE__*/function () {
13862
13904
  }, {
13863
13905
  key: "unmuteUser",
13864
13906
  value: function () {
13865
- var _unmuteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee47(targetID, currentUserID) {
13866
- return _regeneratorRuntime__default['default'].wrap(function _callee47$(_context47) {
13907
+ var _unmuteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee48(targetID, currentUserID) {
13908
+ return _regeneratorRuntime__default['default'].wrap(function _callee48$(_context48) {
13867
13909
  while (1) {
13868
- switch (_context47.prev = _context47.next) {
13910
+ switch (_context48.prev = _context48.next) {
13869
13911
  case 0:
13870
- _context47.next = 2;
13912
+ _context48.next = 2;
13871
13913
  return this.post(this.baseURL + '/moderation/unmute', _objectSpread({
13872
13914
  target_id: targetID
13873
13915
  }, currentUserID ? {
@@ -13875,17 +13917,17 @@ var StreamChat = /*#__PURE__*/function () {
13875
13917
  } : {}));
13876
13918
 
13877
13919
  case 2:
13878
- return _context47.abrupt("return", _context47.sent);
13920
+ return _context48.abrupt("return", _context48.sent);
13879
13921
 
13880
13922
  case 3:
13881
13923
  case "end":
13882
- return _context47.stop();
13924
+ return _context48.stop();
13883
13925
  }
13884
13926
  }
13885
- }, _callee47, this);
13927
+ }, _callee48, this);
13886
13928
  }));
13887
13929
 
13888
- function unmuteUser(_x63, _x64) {
13930
+ function unmuteUser(_x64, _x65) {
13889
13931
  return _unmuteUser.apply(this, arguments);
13890
13932
  }
13891
13933
 
@@ -13920,31 +13962,31 @@ var StreamChat = /*#__PURE__*/function () {
13920
13962
  }, {
13921
13963
  key: "flagMessage",
13922
13964
  value: function () {
13923
- var _flagMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee48(targetMessageID) {
13965
+ var _flagMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee49(targetMessageID) {
13924
13966
  var options,
13925
- _args48 = arguments;
13926
- return _regeneratorRuntime__default['default'].wrap(function _callee48$(_context48) {
13967
+ _args49 = arguments;
13968
+ return _regeneratorRuntime__default['default'].wrap(function _callee49$(_context49) {
13927
13969
  while (1) {
13928
- switch (_context48.prev = _context48.next) {
13970
+ switch (_context49.prev = _context49.next) {
13929
13971
  case 0:
13930
- options = _args48.length > 1 && _args48[1] !== undefined ? _args48[1] : {};
13931
- _context48.next = 3;
13972
+ options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
13973
+ _context49.next = 3;
13932
13974
  return this.post(this.baseURL + '/moderation/flag', _objectSpread({
13933
13975
  target_message_id: targetMessageID
13934
13976
  }, options));
13935
13977
 
13936
13978
  case 3:
13937
- return _context48.abrupt("return", _context48.sent);
13979
+ return _context49.abrupt("return", _context49.sent);
13938
13980
 
13939
13981
  case 4:
13940
13982
  case "end":
13941
- return _context48.stop();
13983
+ return _context49.stop();
13942
13984
  }
13943
13985
  }
13944
- }, _callee48, this);
13986
+ }, _callee49, this);
13945
13987
  }));
13946
13988
 
13947
- function flagMessage(_x65) {
13989
+ function flagMessage(_x66) {
13948
13990
  return _flagMessage.apply(this, arguments);
13949
13991
  }
13950
13992
 
@@ -13960,31 +14002,31 @@ var StreamChat = /*#__PURE__*/function () {
13960
14002
  }, {
13961
14003
  key: "flagUser",
13962
14004
  value: function () {
13963
- var _flagUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee49(targetID) {
14005
+ var _flagUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee50(targetID) {
13964
14006
  var options,
13965
- _args49 = arguments;
13966
- return _regeneratorRuntime__default['default'].wrap(function _callee49$(_context49) {
14007
+ _args50 = arguments;
14008
+ return _regeneratorRuntime__default['default'].wrap(function _callee50$(_context50) {
13967
14009
  while (1) {
13968
- switch (_context49.prev = _context49.next) {
14010
+ switch (_context50.prev = _context50.next) {
13969
14011
  case 0:
13970
- options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
13971
- _context49.next = 3;
14012
+ options = _args50.length > 1 && _args50[1] !== undefined ? _args50[1] : {};
14013
+ _context50.next = 3;
13972
14014
  return this.post(this.baseURL + '/moderation/flag', _objectSpread({
13973
14015
  target_user_id: targetID
13974
14016
  }, options));
13975
14017
 
13976
14018
  case 3:
13977
- return _context49.abrupt("return", _context49.sent);
14019
+ return _context50.abrupt("return", _context50.sent);
13978
14020
 
13979
14021
  case 4:
13980
14022
  case "end":
13981
- return _context49.stop();
14023
+ return _context50.stop();
13982
14024
  }
13983
14025
  }
13984
- }, _callee49, this);
14026
+ }, _callee50, this);
13985
14027
  }));
13986
14028
 
13987
- function flagUser(_x66) {
14029
+ function flagUser(_x67) {
13988
14030
  return _flagUser.apply(this, arguments);
13989
14031
  }
13990
14032
 
@@ -14000,31 +14042,31 @@ var StreamChat = /*#__PURE__*/function () {
14000
14042
  }, {
14001
14043
  key: "unflagMessage",
14002
14044
  value: function () {
14003
- var _unflagMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee50(targetMessageID) {
14045
+ var _unflagMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee51(targetMessageID) {
14004
14046
  var options,
14005
- _args50 = arguments;
14006
- return _regeneratorRuntime__default['default'].wrap(function _callee50$(_context50) {
14047
+ _args51 = arguments;
14048
+ return _regeneratorRuntime__default['default'].wrap(function _callee51$(_context51) {
14007
14049
  while (1) {
14008
- switch (_context50.prev = _context50.next) {
14050
+ switch (_context51.prev = _context51.next) {
14009
14051
  case 0:
14010
- options = _args50.length > 1 && _args50[1] !== undefined ? _args50[1] : {};
14011
- _context50.next = 3;
14052
+ options = _args51.length > 1 && _args51[1] !== undefined ? _args51[1] : {};
14053
+ _context51.next = 3;
14012
14054
  return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
14013
14055
  target_message_id: targetMessageID
14014
14056
  }, options));
14015
14057
 
14016
14058
  case 3:
14017
- return _context50.abrupt("return", _context50.sent);
14059
+ return _context51.abrupt("return", _context51.sent);
14018
14060
 
14019
14061
  case 4:
14020
14062
  case "end":
14021
- return _context50.stop();
14063
+ return _context51.stop();
14022
14064
  }
14023
14065
  }
14024
- }, _callee50, this);
14066
+ }, _callee51, this);
14025
14067
  }));
14026
14068
 
14027
- function unflagMessage(_x67) {
14069
+ function unflagMessage(_x68) {
14028
14070
  return _unflagMessage.apply(this, arguments);
14029
14071
  }
14030
14072
 
@@ -14040,31 +14082,31 @@ var StreamChat = /*#__PURE__*/function () {
14040
14082
  }, {
14041
14083
  key: "unflagUser",
14042
14084
  value: function () {
14043
- var _unflagUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee51(targetID) {
14085
+ var _unflagUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee52(targetID) {
14044
14086
  var options,
14045
- _args51 = arguments;
14046
- return _regeneratorRuntime__default['default'].wrap(function _callee51$(_context51) {
14087
+ _args52 = arguments;
14088
+ return _regeneratorRuntime__default['default'].wrap(function _callee52$(_context52) {
14047
14089
  while (1) {
14048
- switch (_context51.prev = _context51.next) {
14090
+ switch (_context52.prev = _context52.next) {
14049
14091
  case 0:
14050
- options = _args51.length > 1 && _args51[1] !== undefined ? _args51[1] : {};
14051
- _context51.next = 3;
14092
+ options = _args52.length > 1 && _args52[1] !== undefined ? _args52[1] : {};
14093
+ _context52.next = 3;
14052
14094
  return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
14053
14095
  target_user_id: targetID
14054
14096
  }, options));
14055
14097
 
14056
14098
  case 3:
14057
- return _context51.abrupt("return", _context51.sent);
14099
+ return _context52.abrupt("return", _context52.sent);
14058
14100
 
14059
14101
  case 4:
14060
14102
  case "end":
14061
- return _context51.stop();
14103
+ return _context52.stop();
14062
14104
  }
14063
14105
  }
14064
- }, _callee51, this);
14106
+ }, _callee52, this);
14065
14107
  }));
14066
14108
 
14067
- function unflagUser(_x68) {
14109
+ function unflagUser(_x69) {
14068
14110
  return _unflagUser.apply(this, arguments);
14069
14111
  }
14070
14112
 
@@ -14081,29 +14123,29 @@ var StreamChat = /*#__PURE__*/function () {
14081
14123
  }, {
14082
14124
  key: "getCallToken",
14083
14125
  value: function () {
14084
- var _getCallToken = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee52(callID) {
14126
+ var _getCallToken = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee53(callID) {
14085
14127
  var options,
14086
- _args52 = arguments;
14087
- return _regeneratorRuntime__default['default'].wrap(function _callee52$(_context52) {
14128
+ _args53 = arguments;
14129
+ return _regeneratorRuntime__default['default'].wrap(function _callee53$(_context53) {
14088
14130
  while (1) {
14089
- switch (_context52.prev = _context52.next) {
14131
+ switch (_context53.prev = _context53.next) {
14090
14132
  case 0:
14091
- options = _args52.length > 1 && _args52[1] !== undefined ? _args52[1] : {};
14092
- _context52.next = 3;
14133
+ options = _args53.length > 1 && _args53[1] !== undefined ? _args53[1] : {};
14134
+ _context53.next = 3;
14093
14135
  return this.post(this.baseURL + "/calls/".concat(encodeURIComponent(callID)), _objectSpread({}, options));
14094
14136
 
14095
14137
  case 3:
14096
- return _context52.abrupt("return", _context52.sent);
14138
+ return _context53.abrupt("return", _context53.sent);
14097
14139
 
14098
14140
  case 4:
14099
14141
  case "end":
14100
- return _context52.stop();
14142
+ return _context53.stop();
14101
14143
  }
14102
14144
  }
14103
- }, _callee52, this);
14145
+ }, _callee53, this);
14104
14146
  }));
14105
14147
 
14106
- function getCallToken(_x69) {
14148
+ function getCallToken(_x70) {
14107
14149
  return _getCallToken.apply(this, arguments);
14108
14150
  }
14109
14151
 
@@ -14126,30 +14168,30 @@ var StreamChat = /*#__PURE__*/function () {
14126
14168
  }, {
14127
14169
  key: "_queryFlags",
14128
14170
  value: function () {
14129
- var _queryFlags2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee53() {
14171
+ var _queryFlags2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee54() {
14130
14172
  var filterConditions,
14131
14173
  options,
14132
- _args53 = arguments;
14133
- return _regeneratorRuntime__default['default'].wrap(function _callee53$(_context53) {
14174
+ _args54 = arguments;
14175
+ return _regeneratorRuntime__default['default'].wrap(function _callee54$(_context54) {
14134
14176
  while (1) {
14135
- switch (_context53.prev = _context53.next) {
14177
+ switch (_context54.prev = _context54.next) {
14136
14178
  case 0:
14137
- filterConditions = _args53.length > 0 && _args53[0] !== undefined ? _args53[0] : {};
14138
- options = _args53.length > 1 && _args53[1] !== undefined ? _args53[1] : {};
14139
- _context53.next = 4;
14179
+ filterConditions = _args54.length > 0 && _args54[0] !== undefined ? _args54[0] : {};
14180
+ options = _args54.length > 1 && _args54[1] !== undefined ? _args54[1] : {};
14181
+ _context54.next = 4;
14140
14182
  return this.post(this.baseURL + '/moderation/flags', _objectSpread({
14141
14183
  filter_conditions: filterConditions
14142
14184
  }, options));
14143
14185
 
14144
14186
  case 4:
14145
- return _context53.abrupt("return", _context53.sent);
14187
+ return _context54.abrupt("return", _context54.sent);
14146
14188
 
14147
14189
  case 5:
14148
14190
  case "end":
14149
- return _context53.stop();
14191
+ return _context54.stop();
14150
14192
  }
14151
14193
  }
14152
- }, _callee53, this);
14194
+ }, _callee54, this);
14153
14195
  }));
14154
14196
 
14155
14197
  function _queryFlags() {
@@ -14175,30 +14217,30 @@ var StreamChat = /*#__PURE__*/function () {
14175
14217
  }, {
14176
14218
  key: "_queryFlagReports",
14177
14219
  value: function () {
14178
- var _queryFlagReports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee54() {
14220
+ var _queryFlagReports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee55() {
14179
14221
  var filterConditions,
14180
14222
  options,
14181
- _args54 = arguments;
14182
- return _regeneratorRuntime__default['default'].wrap(function _callee54$(_context54) {
14223
+ _args55 = arguments;
14224
+ return _regeneratorRuntime__default['default'].wrap(function _callee55$(_context55) {
14183
14225
  while (1) {
14184
- switch (_context54.prev = _context54.next) {
14226
+ switch (_context55.prev = _context55.next) {
14185
14227
  case 0:
14186
- filterConditions = _args54.length > 0 && _args54[0] !== undefined ? _args54[0] : {};
14187
- options = _args54.length > 1 && _args54[1] !== undefined ? _args54[1] : {};
14188
- _context54.next = 4;
14228
+ filterConditions = _args55.length > 0 && _args55[0] !== undefined ? _args55[0] : {};
14229
+ options = _args55.length > 1 && _args55[1] !== undefined ? _args55[1] : {};
14230
+ _context55.next = 4;
14189
14231
  return this.post(this.baseURL + '/moderation/reports', _objectSpread({
14190
14232
  filter_conditions: filterConditions
14191
14233
  }, options));
14192
14234
 
14193
14235
  case 4:
14194
- return _context54.abrupt("return", _context54.sent);
14236
+ return _context55.abrupt("return", _context55.sent);
14195
14237
 
14196
14238
  case 5:
14197
14239
  case "end":
14198
- return _context54.stop();
14240
+ return _context55.stop();
14199
14241
  }
14200
14242
  }
14201
- }, _callee54, this);
14243
+ }, _callee55, this);
14202
14244
  }));
14203
14245
 
14204
14246
  function _queryFlagReports() {
@@ -14225,31 +14267,31 @@ var StreamChat = /*#__PURE__*/function () {
14225
14267
  }, {
14226
14268
  key: "_reviewFlagReport",
14227
14269
  value: function () {
14228
- var _reviewFlagReport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee55(id, reviewResult) {
14270
+ var _reviewFlagReport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee56(id, reviewResult) {
14229
14271
  var options,
14230
- _args55 = arguments;
14231
- return _regeneratorRuntime__default['default'].wrap(function _callee55$(_context55) {
14272
+ _args56 = arguments;
14273
+ return _regeneratorRuntime__default['default'].wrap(function _callee56$(_context56) {
14232
14274
  while (1) {
14233
- switch (_context55.prev = _context55.next) {
14275
+ switch (_context56.prev = _context56.next) {
14234
14276
  case 0:
14235
- options = _args55.length > 2 && _args55[2] !== undefined ? _args55[2] : {};
14236
- _context55.next = 3;
14277
+ options = _args56.length > 2 && _args56[2] !== undefined ? _args56[2] : {};
14278
+ _context56.next = 3;
14237
14279
  return this.patch(this.baseURL + "/moderation/reports/".concat(encodeURIComponent(id)), _objectSpread({
14238
14280
  review_result: reviewResult
14239
14281
  }, options));
14240
14282
 
14241
14283
  case 3:
14242
- return _context55.abrupt("return", _context55.sent);
14284
+ return _context56.abrupt("return", _context56.sent);
14243
14285
 
14244
14286
  case 4:
14245
14287
  case "end":
14246
- return _context55.stop();
14288
+ return _context56.stop();
14247
14289
  }
14248
14290
  }
14249
- }, _callee55, this);
14291
+ }, _callee56, this);
14250
14292
  }));
14251
14293
 
14252
- function _reviewFlagReport(_x70, _x71) {
14294
+ function _reviewFlagReport(_x71, _x72) {
14253
14295
  return _reviewFlagReport2.apply(this, arguments);
14254
14296
  }
14255
14297
 
@@ -14267,31 +14309,31 @@ var StreamChat = /*#__PURE__*/function () {
14267
14309
  }, {
14268
14310
  key: "unblockMessage",
14269
14311
  value: function () {
14270
- var _unblockMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee56(targetMessageID) {
14312
+ var _unblockMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee57(targetMessageID) {
14271
14313
  var options,
14272
- _args56 = arguments;
14273
- return _regeneratorRuntime__default['default'].wrap(function _callee56$(_context56) {
14314
+ _args57 = arguments;
14315
+ return _regeneratorRuntime__default['default'].wrap(function _callee57$(_context57) {
14274
14316
  while (1) {
14275
- switch (_context56.prev = _context56.next) {
14317
+ switch (_context57.prev = _context57.next) {
14276
14318
  case 0:
14277
- options = _args56.length > 1 && _args56[1] !== undefined ? _args56[1] : {};
14278
- _context56.next = 3;
14319
+ options = _args57.length > 1 && _args57[1] !== undefined ? _args57[1] : {};
14320
+ _context57.next = 3;
14279
14321
  return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
14280
14322
  target_message_id: targetMessageID
14281
14323
  }, options));
14282
14324
 
14283
14325
  case 3:
14284
- return _context56.abrupt("return", _context56.sent);
14326
+ return _context57.abrupt("return", _context57.sent);
14285
14327
 
14286
14328
  case 4:
14287
14329
  case "end":
14288
- return _context56.stop();
14330
+ return _context57.stop();
14289
14331
  }
14290
14332
  }
14291
- }, _callee56, this);
14333
+ }, _callee57, this);
14292
14334
  }));
14293
14335
 
14294
- function unblockMessage(_x72) {
14336
+ function unblockMessage(_x73) {
14295
14337
  return _unblockMessage.apply(this, arguments);
14296
14338
  }
14297
14339
 
@@ -14310,23 +14352,23 @@ var StreamChat = /*#__PURE__*/function () {
14310
14352
  * @return {Promise<APIResponse>}
14311
14353
  */
14312
14354
  function () {
14313
- var _markChannelsRead = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee57() {
14355
+ var _markChannelsRead = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee58() {
14314
14356
  var data,
14315
- _args57 = arguments;
14316
- return _regeneratorRuntime__default['default'].wrap(function _callee57$(_context57) {
14357
+ _args58 = arguments;
14358
+ return _regeneratorRuntime__default['default'].wrap(function _callee58$(_context58) {
14317
14359
  while (1) {
14318
- switch (_context57.prev = _context57.next) {
14360
+ switch (_context58.prev = _context58.next) {
14319
14361
  case 0:
14320
- data = _args57.length > 0 && _args57[0] !== undefined ? _args57[0] : {};
14321
- _context57.next = 3;
14362
+ data = _args58.length > 0 && _args58[0] !== undefined ? _args58[0] : {};
14363
+ _context58.next = 3;
14322
14364
  return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
14323
14365
 
14324
14366
  case 3:
14325
14367
  case "end":
14326
- return _context57.stop();
14368
+ return _context58.stop();
14327
14369
  }
14328
14370
  }
14329
- }, _callee57, this);
14371
+ }, _callee58, this);
14330
14372
  }));
14331
14373
 
14332
14374
  function markChannelsRead() {
@@ -14401,28 +14443,28 @@ var StreamChat = /*#__PURE__*/function () {
14401
14443
  }, {
14402
14444
  key: "translateMessage",
14403
14445
  value: function () {
14404
- var _translateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee58(messageId, language) {
14405
- return _regeneratorRuntime__default['default'].wrap(function _callee58$(_context58) {
14446
+ var _translateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee59(messageId, language) {
14447
+ return _regeneratorRuntime__default['default'].wrap(function _callee59$(_context59) {
14406
14448
  while (1) {
14407
- switch (_context58.prev = _context58.next) {
14449
+ switch (_context59.prev = _context59.next) {
14408
14450
  case 0:
14409
- _context58.next = 2;
14451
+ _context59.next = 2;
14410
14452
  return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/translate"), {
14411
14453
  language: language
14412
14454
  });
14413
14455
 
14414
14456
  case 2:
14415
- return _context58.abrupt("return", _context58.sent);
14457
+ return _context59.abrupt("return", _context59.sent);
14416
14458
 
14417
14459
  case 3:
14418
14460
  case "end":
14419
- return _context58.stop();
14461
+ return _context59.stop();
14420
14462
  }
14421
14463
  }
14422
- }, _callee58, this);
14464
+ }, _callee59, this);
14423
14465
  }));
14424
14466
 
14425
- function translateMessage(_x73, _x74) {
14467
+ function translateMessage(_x74, _x75) {
14426
14468
  return _translateMessage.apply(this, arguments);
14427
14469
  }
14428
14470
 
@@ -14441,12 +14483,12 @@ var StreamChat = /*#__PURE__*/function () {
14441
14483
  }, {
14442
14484
  key: "translate",
14443
14485
  value: function () {
14444
- var _translate = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee59(text, destination_language, source_language) {
14445
- return _regeneratorRuntime__default['default'].wrap(function _callee59$(_context59) {
14486
+ var _translate = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee60(text, destination_language, source_language) {
14487
+ return _regeneratorRuntime__default['default'].wrap(function _callee60$(_context60) {
14446
14488
  while (1) {
14447
- switch (_context59.prev = _context59.next) {
14489
+ switch (_context60.prev = _context60.next) {
14448
14490
  case 0:
14449
- _context59.next = 2;
14491
+ _context60.next = 2;
14450
14492
  return this.post(this.baseURL + "/translate", {
14451
14493
  text: text,
14452
14494
  source_language: source_language,
@@ -14454,17 +14496,17 @@ var StreamChat = /*#__PURE__*/function () {
14454
14496
  });
14455
14497
 
14456
14498
  case 2:
14457
- return _context59.abrupt("return", _context59.sent);
14499
+ return _context60.abrupt("return", _context60.sent);
14458
14500
 
14459
14501
  case 3:
14460
14502
  case "end":
14461
- return _context59.stop();
14503
+ return _context60.stop();
14462
14504
  }
14463
14505
  }
14464
- }, _callee59, this);
14506
+ }, _callee60, this);
14465
14507
  }));
14466
14508
 
14467
- function translate(_x75, _x76, _x77) {
14509
+ function translate(_x76, _x77, _x78) {
14468
14510
  return _translate.apply(this, arguments);
14469
14511
  }
14470
14512
 
@@ -14566,14 +14608,14 @@ var StreamChat = /*#__PURE__*/function () {
14566
14608
  }, {
14567
14609
  key: "updateMessage",
14568
14610
  value: function () {
14569
- var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee60(message, userId, options) {
14611
+ var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee61(message, userId, options) {
14570
14612
  var clonedMessage, reservedMessageFields;
14571
- return _regeneratorRuntime__default['default'].wrap(function _callee60$(_context60) {
14613
+ return _regeneratorRuntime__default['default'].wrap(function _callee61$(_context61) {
14572
14614
  while (1) {
14573
- switch (_context60.prev = _context60.next) {
14615
+ switch (_context61.prev = _context61.next) {
14574
14616
  case 0:
14575
14617
  if (message.id) {
14576
- _context60.next = 2;
14618
+ _context61.next = 2;
14577
14619
  break;
14578
14620
  }
14579
14621
 
@@ -14610,23 +14652,23 @@ var StreamChat = /*#__PURE__*/function () {
14610
14652
  });
14611
14653
  }
14612
14654
 
14613
- _context60.next = 10;
14655
+ _context61.next = 10;
14614
14656
  return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(message.id)), _objectSpread({
14615
14657
  message: clonedMessage
14616
14658
  }, options));
14617
14659
 
14618
14660
  case 10:
14619
- return _context60.abrupt("return", _context60.sent);
14661
+ return _context61.abrupt("return", _context61.sent);
14620
14662
 
14621
14663
  case 11:
14622
14664
  case "end":
14623
- return _context60.stop();
14665
+ return _context61.stop();
14624
14666
  }
14625
14667
  }
14626
- }, _callee60, this);
14668
+ }, _callee61, this);
14627
14669
  }));
14628
14670
 
14629
- function updateMessage(_x78, _x79, _x80) {
14671
+ function updateMessage(_x79, _x80, _x81) {
14630
14672
  return _updateMessage.apply(this, arguments);
14631
14673
  }
14632
14674
 
@@ -14649,14 +14691,14 @@ var StreamChat = /*#__PURE__*/function () {
14649
14691
  }, {
14650
14692
  key: "partialUpdateMessage",
14651
14693
  value: function () {
14652
- var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee61(id, partialMessageObject, userId, options) {
14694
+ var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee62(id, partialMessageObject, userId, options) {
14653
14695
  var user;
14654
- return _regeneratorRuntime__default['default'].wrap(function _callee61$(_context61) {
14696
+ return _regeneratorRuntime__default['default'].wrap(function _callee62$(_context62) {
14655
14697
  while (1) {
14656
- switch (_context61.prev = _context61.next) {
14698
+ switch (_context62.prev = _context62.next) {
14657
14699
  case 0:
14658
14700
  if (id) {
14659
- _context61.next = 2;
14701
+ _context62.next = 2;
14660
14702
  break;
14661
14703
  }
14662
14704
 
@@ -14671,23 +14713,23 @@ var StreamChat = /*#__PURE__*/function () {
14671
14713
  };
14672
14714
  }
14673
14715
 
14674
- _context61.next = 6;
14716
+ _context62.next = 6;
14675
14717
  return this.put(this.baseURL + "/messages/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
14676
14718
  user: user
14677
14719
  }));
14678
14720
 
14679
14721
  case 6:
14680
- return _context61.abrupt("return", _context61.sent);
14722
+ return _context62.abrupt("return", _context62.sent);
14681
14723
 
14682
14724
  case 7:
14683
14725
  case "end":
14684
- return _context61.stop();
14726
+ return _context62.stop();
14685
14727
  }
14686
14728
  }
14687
- }, _callee61, this);
14729
+ }, _callee62, this);
14688
14730
  }));
14689
14731
 
14690
- function partialUpdateMessage(_x81, _x82, _x83, _x84) {
14732
+ function partialUpdateMessage(_x82, _x83, _x84, _x85) {
14691
14733
  return _partialUpdateMessage.apply(this, arguments);
14692
14734
  }
14693
14735
 
@@ -14696,11 +14738,11 @@ var StreamChat = /*#__PURE__*/function () {
14696
14738
  }, {
14697
14739
  key: "deleteMessage",
14698
14740
  value: function () {
14699
- var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee62(messageID, hardDelete) {
14741
+ var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee63(messageID, hardDelete) {
14700
14742
  var params;
14701
- return _regeneratorRuntime__default['default'].wrap(function _callee62$(_context62) {
14743
+ return _regeneratorRuntime__default['default'].wrap(function _callee63$(_context63) {
14702
14744
  while (1) {
14703
- switch (_context62.prev = _context62.next) {
14745
+ switch (_context63.prev = _context63.next) {
14704
14746
  case 0:
14705
14747
  params = {};
14706
14748
 
@@ -14710,21 +14752,21 @@ var StreamChat = /*#__PURE__*/function () {
14710
14752
  };
14711
14753
  }
14712
14754
 
14713
- _context62.next = 4;
14755
+ _context63.next = 4;
14714
14756
  return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), params);
14715
14757
 
14716
14758
  case 4:
14717
- return _context62.abrupt("return", _context62.sent);
14759
+ return _context63.abrupt("return", _context63.sent);
14718
14760
 
14719
14761
  case 5:
14720
14762
  case "end":
14721
- return _context62.stop();
14763
+ return _context63.stop();
14722
14764
  }
14723
14765
  }
14724
- }, _callee62, this);
14766
+ }, _callee63, this);
14725
14767
  }));
14726
14768
 
14727
- function deleteMessage(_x85, _x86) {
14769
+ function deleteMessage(_x86, _x87) {
14728
14770
  return _deleteMessage.apply(this, arguments);
14729
14771
  }
14730
14772
 
@@ -14746,28 +14788,28 @@ var StreamChat = /*#__PURE__*/function () {
14746
14788
  }, {
14747
14789
  key: "undeleteMessage",
14748
14790
  value: function () {
14749
- var _undeleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee63(messageID, userID) {
14750
- return _regeneratorRuntime__default['default'].wrap(function _callee63$(_context63) {
14791
+ var _undeleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee64(messageID, userID) {
14792
+ return _regeneratorRuntime__default['default'].wrap(function _callee64$(_context64) {
14751
14793
  while (1) {
14752
- switch (_context63.prev = _context63.next) {
14794
+ switch (_context64.prev = _context64.next) {
14753
14795
  case 0:
14754
- _context63.next = 2;
14796
+ _context64.next = 2;
14755
14797
  return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageID), "/undelete"), {
14756
14798
  undeleted_by: userID
14757
14799
  });
14758
14800
 
14759
14801
  case 2:
14760
- return _context63.abrupt("return", _context63.sent);
14802
+ return _context64.abrupt("return", _context64.sent);
14761
14803
 
14762
14804
  case 3:
14763
14805
  case "end":
14764
- return _context63.stop();
14806
+ return _context64.stop();
14765
14807
  }
14766
14808
  }
14767
- }, _callee63, this);
14809
+ }, _callee64, this);
14768
14810
  }));
14769
14811
 
14770
- function undeleteMessage(_x87, _x88) {
14812
+ function undeleteMessage(_x88, _x89) {
14771
14813
  return _undeleteMessage.apply(this, arguments);
14772
14814
  }
14773
14815
 
@@ -14776,26 +14818,26 @@ var StreamChat = /*#__PURE__*/function () {
14776
14818
  }, {
14777
14819
  key: "getMessage",
14778
14820
  value: function () {
14779
- var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee64(messageID, options) {
14780
- return _regeneratorRuntime__default['default'].wrap(function _callee64$(_context64) {
14821
+ var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee65(messageID, options) {
14822
+ return _regeneratorRuntime__default['default'].wrap(function _callee65$(_context65) {
14781
14823
  while (1) {
14782
- switch (_context64.prev = _context64.next) {
14824
+ switch (_context65.prev = _context65.next) {
14783
14825
  case 0:
14784
- _context64.next = 2;
14826
+ _context65.next = 2;
14785
14827
  return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), _objectSpread({}, options));
14786
14828
 
14787
14829
  case 2:
14788
- return _context64.abrupt("return", _context64.sent);
14830
+ return _context65.abrupt("return", _context65.sent);
14789
14831
 
14790
14832
  case 3:
14791
14833
  case "end":
14792
- return _context64.stop();
14834
+ return _context65.stop();
14793
14835
  }
14794
14836
  }
14795
- }, _callee64, this);
14837
+ }, _callee65, this);
14796
14838
  }));
14797
14839
 
14798
- function getMessage(_x89, _x90) {
14840
+ function getMessage(_x90, _x91) {
14799
14841
  return _getMessage.apply(this, arguments);
14800
14842
  }
14801
14843
 
@@ -14816,30 +14858,30 @@ var StreamChat = /*#__PURE__*/function () {
14816
14858
  }, {
14817
14859
  key: "queryThreads",
14818
14860
  value: function () {
14819
- var _queryThreads = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee65() {
14861
+ var _queryThreads = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee66() {
14820
14862
  var _this5 = this;
14821
14863
 
14822
14864
  var options,
14823
14865
  optionsWithDefaults,
14824
14866
  response,
14825
- _args65 = arguments;
14826
- return _regeneratorRuntime__default['default'].wrap(function _callee65$(_context65) {
14867
+ _args66 = arguments;
14868
+ return _regeneratorRuntime__default['default'].wrap(function _callee66$(_context66) {
14827
14869
  while (1) {
14828
- switch (_context65.prev = _context65.next) {
14870
+ switch (_context66.prev = _context66.next) {
14829
14871
  case 0:
14830
- options = _args65.length > 0 && _args65[0] !== undefined ? _args65[0] : {};
14872
+ options = _args66.length > 0 && _args66[0] !== undefined ? _args66[0] : {};
14831
14873
  optionsWithDefaults = _objectSpread({
14832
14874
  limit: 10,
14833
14875
  participant_limit: 10,
14834
14876
  reply_limit: 3,
14835
14877
  watch: true
14836
14878
  }, options);
14837
- _context65.next = 4;
14879
+ _context66.next = 4;
14838
14880
  return this.post("".concat(this.baseURL, "/threads"), optionsWithDefaults);
14839
14881
 
14840
14882
  case 4:
14841
- response = _context65.sent;
14842
- return _context65.abrupt("return", {
14883
+ response = _context66.sent;
14884
+ return _context66.abrupt("return", {
14843
14885
  threads: response.threads.map(function (thread) {
14844
14886
  return new Thread({
14845
14887
  client: _this5,
@@ -14851,10 +14893,10 @@ var StreamChat = /*#__PURE__*/function () {
14851
14893
 
14852
14894
  case 6:
14853
14895
  case "end":
14854
- return _context65.stop();
14896
+ return _context66.stop();
14855
14897
  }
14856
14898
  }
14857
- }, _callee65, this);
14899
+ }, _callee66, this);
14858
14900
  }));
14859
14901
 
14860
14902
  function queryThreads() {
@@ -14878,19 +14920,19 @@ var StreamChat = /*#__PURE__*/function () {
14878
14920
  }, {
14879
14921
  key: "getThread",
14880
14922
  value: function () {
14881
- var _getThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee66(messageId) {
14923
+ var _getThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee67(messageId) {
14882
14924
  var options,
14883
14925
  optionsWithDefaults,
14884
14926
  response,
14885
- _args66 = arguments;
14886
- return _regeneratorRuntime__default['default'].wrap(function _callee66$(_context66) {
14927
+ _args67 = arguments;
14928
+ return _regeneratorRuntime__default['default'].wrap(function _callee67$(_context67) {
14887
14929
  while (1) {
14888
- switch (_context66.prev = _context66.next) {
14930
+ switch (_context67.prev = _context67.next) {
14889
14931
  case 0:
14890
- options = _args66.length > 1 && _args66[1] !== undefined ? _args66[1] : {};
14932
+ options = _args67.length > 1 && _args67[1] !== undefined ? _args67[1] : {};
14891
14933
 
14892
14934
  if (messageId) {
14893
- _context66.next = 3;
14935
+ _context67.next = 3;
14894
14936
  break;
14895
14937
  }
14896
14938
 
@@ -14902,25 +14944,25 @@ var StreamChat = /*#__PURE__*/function () {
14902
14944
  reply_limit: 3,
14903
14945
  watch: true
14904
14946
  }, options);
14905
- _context66.next = 6;
14947
+ _context67.next = 6;
14906
14948
  return this.get("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), optionsWithDefaults);
14907
14949
 
14908
14950
  case 6:
14909
- response = _context66.sent;
14910
- return _context66.abrupt("return", new Thread({
14951
+ response = _context67.sent;
14952
+ return _context67.abrupt("return", new Thread({
14911
14953
  client: this,
14912
14954
  threadData: response.thread
14913
14955
  }));
14914
14956
 
14915
14957
  case 8:
14916
14958
  case "end":
14917
- return _context66.stop();
14959
+ return _context67.stop();
14918
14960
  }
14919
14961
  }
14920
- }, _callee66, this);
14962
+ }, _callee67, this);
14921
14963
  }));
14922
14964
 
14923
- function getThread(_x91) {
14965
+ function getThread(_x92) {
14924
14966
  return _getThread.apply(this, arguments);
14925
14967
  }
14926
14968
 
@@ -14938,15 +14980,15 @@ var StreamChat = /*#__PURE__*/function () {
14938
14980
  }, {
14939
14981
  key: "partialUpdateThread",
14940
14982
  value: function () {
14941
- var _partialUpdateThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee67(messageId, partialThreadObject) {
14983
+ var _partialUpdateThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee68(messageId, partialThreadObject) {
14942
14984
  var reservedThreadFields, _key5;
14943
14985
 
14944
- return _regeneratorRuntime__default['default'].wrap(function _callee67$(_context67) {
14986
+ return _regeneratorRuntime__default['default'].wrap(function _callee68$(_context68) {
14945
14987
  while (1) {
14946
- switch (_context67.prev = _context67.next) {
14988
+ switch (_context68.prev = _context68.next) {
14947
14989
  case 0:
14948
14990
  if (messageId) {
14949
- _context67.next = 2;
14991
+ _context68.next = 2;
14950
14992
  break;
14951
14993
  }
14952
14994
 
@@ -14956,43 +14998,43 @@ var StreamChat = /*#__PURE__*/function () {
14956
14998
  // check for reserved fields from ThreadResponse type within partialThreadObject's set and unset.
14957
14999
  // Throw error if any of the reserved field is found.
14958
15000
  reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel', 'custom'];
14959
- _context67.t0 = _regeneratorRuntime__default['default'].keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
15001
+ _context68.t0 = _regeneratorRuntime__default['default'].keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
14960
15002
 
14961
15003
  case 4:
14962
- if ((_context67.t1 = _context67.t0()).done) {
14963
- _context67.next = 10;
15004
+ if ((_context68.t1 = _context68.t0()).done) {
15005
+ _context68.next = 10;
14964
15006
  break;
14965
15007
  }
14966
15008
 
14967
- _key5 = _context67.t1.value;
15009
+ _key5 = _context68.t1.value;
14968
15010
 
14969
15011
  if (!reservedThreadFields.includes(_key5)) {
14970
- _context67.next = 8;
15012
+ _context68.next = 8;
14971
15013
  break;
14972
15014
  }
14973
15015
 
14974
15016
  throw Error("You cannot set ".concat(_key5, " field on Thread object. ").concat(_key5, " is reserved for server-side use. Please omit ").concat(_key5, " from your set object."));
14975
15017
 
14976
15018
  case 8:
14977
- _context67.next = 4;
15019
+ _context68.next = 4;
14978
15020
  break;
14979
15021
 
14980
15022
  case 10:
14981
- _context67.next = 12;
15023
+ _context68.next = 12;
14982
15024
  return this.patch("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), partialThreadObject);
14983
15025
 
14984
15026
  case 12:
14985
- return _context67.abrupt("return", _context67.sent);
15027
+ return _context68.abrupt("return", _context68.sent);
14986
15028
 
14987
15029
  case 13:
14988
15030
  case "end":
14989
- return _context67.stop();
15031
+ return _context68.stop();
14990
15032
  }
14991
15033
  }
14992
- }, _callee67, this);
15034
+ }, _callee68, this);
14993
15035
  }));
14994
15036
 
14995
- function partialUpdateThread(_x92, _x93) {
15037
+ function partialUpdateThread(_x93, _x94) {
14996
15038
  return _partialUpdateThread.apply(this, arguments);
14997
15039
  }
14998
15040
 
@@ -15001,7 +15043,7 @@ var StreamChat = /*#__PURE__*/function () {
15001
15043
  }, {
15002
15044
  key: "getUserAgent",
15003
15045
  value: function getUserAgent() {
15004
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.52.3");
15046
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.54.0");
15005
15047
  }
15006
15048
  }, {
15007
15049
  key: "setUserAgent",
@@ -15220,57 +15262,108 @@ var StreamChat = /*#__PURE__*/function () {
15220
15262
  }, {
15221
15263
  key: "sendUserCustomEvent",
15222
15264
  value: function () {
15223
- var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee68(targetUserID, event) {
15224
- return _regeneratorRuntime__default['default'].wrap(function _callee68$(_context68) {
15265
+ var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee69(targetUserID, event) {
15266
+ return _regeneratorRuntime__default['default'].wrap(function _callee69$(_context69) {
15225
15267
  while (1) {
15226
- switch (_context68.prev = _context68.next) {
15268
+ switch (_context69.prev = _context69.next) {
15227
15269
  case 0:
15228
- _context68.next = 2;
15270
+ _context69.next = 2;
15229
15271
  return this.post("".concat(this.baseURL, "/users/").concat(encodeURIComponent(targetUserID), "/event"), {
15230
15272
  event: event
15231
15273
  });
15232
15274
 
15233
15275
  case 2:
15234
- return _context68.abrupt("return", _context68.sent);
15276
+ return _context69.abrupt("return", _context69.sent);
15235
15277
 
15236
15278
  case 3:
15237
15279
  case "end":
15238
- return _context68.stop();
15280
+ return _context69.stop();
15239
15281
  }
15240
15282
  }
15241
- }, _callee68, this);
15283
+ }, _callee69, this);
15242
15284
  }));
15243
15285
 
15244
- function sendUserCustomEvent(_x94, _x95) {
15286
+ function sendUserCustomEvent(_x95, _x96) {
15245
15287
  return _sendUserCustomEvent.apply(this, arguments);
15246
15288
  }
15247
15289
 
15248
15290
  return sendUserCustomEvent;
15249
15291
  }()
15292
+ /**
15293
+ * Creates a new block list
15294
+ *
15295
+ * @param {BlockList} blockList - The block list to create
15296
+ * @param {string} blockList.name - The name of the block list
15297
+ * @param {string[]} blockList.words - List of words to block
15298
+ * @param {string} [blockList.team] - Team ID the block list belongs to
15299
+ *
15300
+ * @returns {Promise<APIResponse>} The server response
15301
+ */
15302
+
15250
15303
  }, {
15251
15304
  key: "createBlockList",
15252
15305
  value: function createBlockList(blockList) {
15253
15306
  return this.post("".concat(this.baseURL, "/blocklists"), blockList);
15254
15307
  }
15308
+ /**
15309
+ * Lists all block lists
15310
+ *
15311
+ * @param {Object} [data] - Query parameters
15312
+ * @param {string} [data.team] - Team ID to filter block lists by
15313
+ *
15314
+ * @returns {Promise<APIResponse & {blocklists: BlockListResponse[]}>} Response containing array of block lists
15315
+ */
15316
+
15255
15317
  }, {
15256
15318
  key: "listBlockLists",
15257
- value: function listBlockLists() {
15258
- return this.get("".concat(this.baseURL, "/blocklists"));
15319
+ value: function listBlockLists(data) {
15320
+ return this.get("".concat(this.baseURL, "/blocklists"), data);
15259
15321
  }
15322
+ /**
15323
+ * Gets a specific block list
15324
+ *
15325
+ * @param {string} name - The name of the block list to retrieve
15326
+ * @param {Object} [data] - Query parameters
15327
+ * @param {string} [data.team] - Team ID that blocklist belongs to
15328
+ *
15329
+ * @returns {Promise<APIResponse & {blocklist: BlockListResponse}>} Response containing the block list
15330
+ */
15331
+
15260
15332
  }, {
15261
15333
  key: "getBlockList",
15262
- value: function getBlockList(name) {
15263
- return this.get("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)));
15334
+ value: function getBlockList(name, data) {
15335
+ return this.get("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
15264
15336
  }
15337
+ /**
15338
+ * Updates an existing block list
15339
+ *
15340
+ * @param {string} name - The name of the block list to update
15341
+ * @param {Object} data - The update data
15342
+ * @param {string[]} data.words - New list of words to block
15343
+ * @param {string} [data.team] - Team ID that blocklist belongs to
15344
+ *
15345
+ * @returns {Promise<APIResponse>} The server response
15346
+ */
15347
+
15265
15348
  }, {
15266
15349
  key: "updateBlockList",
15267
15350
  value: function updateBlockList(name, data) {
15268
15351
  return this.put("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
15269
15352
  }
15353
+ /**
15354
+ * Deletes a block list
15355
+ *
15356
+ * @param {string} name - The name of the block list to delete
15357
+ * @param {Object} [data] - Query parameters
15358
+ * @param {string} [data.team] - Team ID that blocklist belongs to
15359
+ *
15360
+ * @returns {Promise<APIResponse>} The server response
15361
+ */
15362
+
15270
15363
  }, {
15271
15364
  key: "deleteBlockList",
15272
- value: function deleteBlockList(name) {
15273
- return this.delete("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)));
15365
+ value: function deleteBlockList(name, data) {
15366
+ return this.delete("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
15274
15367
  }
15275
15368
  }, {
15276
15369
  key: "exportChannels",
@@ -15338,28 +15431,28 @@ var StreamChat = /*#__PURE__*/function () {
15338
15431
  }, {
15339
15432
  key: "createSegment",
15340
15433
  value: function () {
15341
- var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee69(type, id, data) {
15434
+ var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee70(type, id, data) {
15342
15435
  var body;
15343
- return _regeneratorRuntime__default['default'].wrap(function _callee69$(_context69) {
15436
+ return _regeneratorRuntime__default['default'].wrap(function _callee70$(_context70) {
15344
15437
  while (1) {
15345
- switch (_context69.prev = _context69.next) {
15438
+ switch (_context70.prev = _context70.next) {
15346
15439
  case 0:
15347
15440
  this.validateServerSideAuth();
15348
15441
  body = _objectSpread({
15349
15442
  id: id,
15350
15443
  type: type
15351
15444
  }, data);
15352
- return _context69.abrupt("return", this.post(this.baseURL + "/segments", body));
15445
+ return _context70.abrupt("return", this.post(this.baseURL + "/segments", body));
15353
15446
 
15354
15447
  case 3:
15355
15448
  case "end":
15356
- return _context69.stop();
15449
+ return _context70.stop();
15357
15450
  }
15358
15451
  }
15359
- }, _callee69, this);
15452
+ }, _callee70, this);
15360
15453
  }));
15361
15454
 
15362
- function createSegment(_x96, _x97, _x98) {
15455
+ function createSegment(_x97, _x98, _x99) {
15363
15456
  return _createSegment.apply(this, arguments);
15364
15457
  }
15365
15458
 
@@ -15378,23 +15471,23 @@ var StreamChat = /*#__PURE__*/function () {
15378
15471
  }, {
15379
15472
  key: "createUserSegment",
15380
15473
  value: function () {
15381
- var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee70(id, data) {
15382
- return _regeneratorRuntime__default['default'].wrap(function _callee70$(_context70) {
15474
+ var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee71(id, data) {
15475
+ return _regeneratorRuntime__default['default'].wrap(function _callee71$(_context71) {
15383
15476
  while (1) {
15384
- switch (_context70.prev = _context70.next) {
15477
+ switch (_context71.prev = _context71.next) {
15385
15478
  case 0:
15386
15479
  this.validateServerSideAuth();
15387
- return _context70.abrupt("return", this.createSegment('user', id, data));
15480
+ return _context71.abrupt("return", this.createSegment('user', id, data));
15388
15481
 
15389
15482
  case 2:
15390
15483
  case "end":
15391
- return _context70.stop();
15484
+ return _context71.stop();
15392
15485
  }
15393
15486
  }
15394
- }, _callee70, this);
15487
+ }, _callee71, this);
15395
15488
  }));
15396
15489
 
15397
- function createUserSegment(_x99, _x100) {
15490
+ function createUserSegment(_x100, _x101) {
15398
15491
  return _createUserSegment.apply(this, arguments);
15399
15492
  }
15400
15493
 
@@ -15413,23 +15506,23 @@ var StreamChat = /*#__PURE__*/function () {
15413
15506
  }, {
15414
15507
  key: "createChannelSegment",
15415
15508
  value: function () {
15416
- var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee71(id, data) {
15417
- return _regeneratorRuntime__default['default'].wrap(function _callee71$(_context71) {
15509
+ var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee72(id, data) {
15510
+ return _regeneratorRuntime__default['default'].wrap(function _callee72$(_context72) {
15418
15511
  while (1) {
15419
- switch (_context71.prev = _context71.next) {
15512
+ switch (_context72.prev = _context72.next) {
15420
15513
  case 0:
15421
15514
  this.validateServerSideAuth();
15422
- return _context71.abrupt("return", this.createSegment('channel', id, data));
15515
+ return _context72.abrupt("return", this.createSegment('channel', id, data));
15423
15516
 
15424
15517
  case 2:
15425
15518
  case "end":
15426
- return _context71.stop();
15519
+ return _context72.stop();
15427
15520
  }
15428
15521
  }
15429
- }, _callee71, this);
15522
+ }, _callee72, this);
15430
15523
  }));
15431
15524
 
15432
- function createChannelSegment(_x101, _x102) {
15525
+ function createChannelSegment(_x102, _x103) {
15433
15526
  return _createChannelSegment.apply(this, arguments);
15434
15527
  }
15435
15528
 
@@ -15438,23 +15531,23 @@ var StreamChat = /*#__PURE__*/function () {
15438
15531
  }, {
15439
15532
  key: "getSegment",
15440
15533
  value: function () {
15441
- var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee72(id) {
15442
- return _regeneratorRuntime__default['default'].wrap(function _callee72$(_context72) {
15534
+ var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee73(id) {
15535
+ return _regeneratorRuntime__default['default'].wrap(function _callee73$(_context73) {
15443
15536
  while (1) {
15444
- switch (_context72.prev = _context72.next) {
15537
+ switch (_context73.prev = _context73.next) {
15445
15538
  case 0:
15446
15539
  this.validateServerSideAuth();
15447
- return _context72.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
15540
+ return _context73.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
15448
15541
 
15449
15542
  case 2:
15450
15543
  case "end":
15451
- return _context72.stop();
15544
+ return _context73.stop();
15452
15545
  }
15453
15546
  }
15454
- }, _callee72, this);
15547
+ }, _callee73, this);
15455
15548
  }));
15456
15549
 
15457
- function getSegment(_x103) {
15550
+ function getSegment(_x104) {
15458
15551
  return _getSegment.apply(this, arguments);
15459
15552
  }
15460
15553
 
@@ -15472,23 +15565,23 @@ var StreamChat = /*#__PURE__*/function () {
15472
15565
  }, {
15473
15566
  key: "updateSegment",
15474
15567
  value: function () {
15475
- var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee73(id, data) {
15476
- return _regeneratorRuntime__default['default'].wrap(function _callee73$(_context73) {
15568
+ var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee74(id, data) {
15569
+ return _regeneratorRuntime__default['default'].wrap(function _callee74$(_context74) {
15477
15570
  while (1) {
15478
- switch (_context73.prev = _context73.next) {
15571
+ switch (_context74.prev = _context74.next) {
15479
15572
  case 0:
15480
15573
  this.validateServerSideAuth();
15481
- return _context73.abrupt("return", this.put(this.baseURL + "/segments/".concat(encodeURIComponent(id)), data));
15574
+ return _context74.abrupt("return", this.put(this.baseURL + "/segments/".concat(encodeURIComponent(id)), data));
15482
15575
 
15483
15576
  case 2:
15484
15577
  case "end":
15485
- return _context73.stop();
15578
+ return _context74.stop();
15486
15579
  }
15487
15580
  }
15488
- }, _callee73, this);
15581
+ }, _callee74, this);
15489
15582
  }));
15490
15583
 
15491
- function updateSegment(_x104, _x105) {
15584
+ function updateSegment(_x105, _x106) {
15492
15585
  return _updateSegment.apply(this, arguments);
15493
15586
  }
15494
15587
 
@@ -15506,27 +15599,27 @@ var StreamChat = /*#__PURE__*/function () {
15506
15599
  }, {
15507
15600
  key: "addSegmentTargets",
15508
15601
  value: function () {
15509
- var _addSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee74(id, targets) {
15602
+ var _addSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee75(id, targets) {
15510
15603
  var body;
15511
- return _regeneratorRuntime__default['default'].wrap(function _callee74$(_context74) {
15604
+ return _regeneratorRuntime__default['default'].wrap(function _callee75$(_context75) {
15512
15605
  while (1) {
15513
- switch (_context74.prev = _context74.next) {
15606
+ switch (_context75.prev = _context75.next) {
15514
15607
  case 0:
15515
15608
  this.validateServerSideAuth();
15516
15609
  body = {
15517
15610
  target_ids: targets
15518
15611
  };
15519
- return _context74.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/addtargets"), body));
15612
+ return _context75.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/addtargets"), body));
15520
15613
 
15521
15614
  case 3:
15522
15615
  case "end":
15523
- return _context74.stop();
15616
+ return _context75.stop();
15524
15617
  }
15525
15618
  }
15526
- }, _callee74, this);
15619
+ }, _callee75, this);
15527
15620
  }));
15528
15621
 
15529
- function addSegmentTargets(_x106, _x107) {
15622
+ function addSegmentTargets(_x107, _x108) {
15530
15623
  return _addSegmentTargets.apply(this, arguments);
15531
15624
  }
15532
15625
 
@@ -15535,33 +15628,33 @@ var StreamChat = /*#__PURE__*/function () {
15535
15628
  }, {
15536
15629
  key: "querySegmentTargets",
15537
15630
  value: function () {
15538
- var _querySegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee75(id) {
15631
+ var _querySegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee76(id) {
15539
15632
  var filter,
15540
15633
  sort,
15541
15634
  options,
15542
- _args75 = arguments;
15543
- return _regeneratorRuntime__default['default'].wrap(function _callee75$(_context75) {
15635
+ _args76 = arguments;
15636
+ return _regeneratorRuntime__default['default'].wrap(function _callee76$(_context76) {
15544
15637
  while (1) {
15545
- switch (_context75.prev = _context75.next) {
15638
+ switch (_context76.prev = _context76.next) {
15546
15639
  case 0:
15547
- filter = _args75.length > 1 && _args75[1] !== undefined ? _args75[1] : {};
15548
- sort = _args75.length > 2 && _args75[2] !== undefined ? _args75[2] : [];
15549
- options = _args75.length > 3 && _args75[3] !== undefined ? _args75[3] : {};
15640
+ filter = _args76.length > 1 && _args76[1] !== undefined ? _args76[1] : {};
15641
+ sort = _args76.length > 2 && _args76[2] !== undefined ? _args76[2] : [];
15642
+ options = _args76.length > 3 && _args76[3] !== undefined ? _args76[3] : {};
15550
15643
  this.validateServerSideAuth();
15551
- return _context75.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/targets/query"), _objectSpread({
15644
+ return _context76.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/targets/query"), _objectSpread({
15552
15645
  filter: filter || {},
15553
15646
  sort: sort || []
15554
15647
  }, options)));
15555
15648
 
15556
15649
  case 5:
15557
15650
  case "end":
15558
- return _context75.stop();
15651
+ return _context76.stop();
15559
15652
  }
15560
15653
  }
15561
- }, _callee75, this);
15654
+ }, _callee76, this);
15562
15655
  }));
15563
15656
 
15564
- function querySegmentTargets(_x108) {
15657
+ function querySegmentTargets(_x109) {
15565
15658
  return _querySegmentTargets.apply(this, arguments);
15566
15659
  }
15567
15660
 
@@ -15579,27 +15672,27 @@ var StreamChat = /*#__PURE__*/function () {
15579
15672
  }, {
15580
15673
  key: "removeSegmentTargets",
15581
15674
  value: function () {
15582
- var _removeSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee76(id, targets) {
15675
+ var _removeSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee77(id, targets) {
15583
15676
  var body;
15584
- return _regeneratorRuntime__default['default'].wrap(function _callee76$(_context76) {
15677
+ return _regeneratorRuntime__default['default'].wrap(function _callee77$(_context77) {
15585
15678
  while (1) {
15586
- switch (_context76.prev = _context76.next) {
15679
+ switch (_context77.prev = _context77.next) {
15587
15680
  case 0:
15588
15681
  this.validateServerSideAuth();
15589
15682
  body = {
15590
15683
  target_ids: targets
15591
15684
  };
15592
- return _context76.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/deletetargets"), body));
15685
+ return _context77.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/deletetargets"), body));
15593
15686
 
15594
15687
  case 3:
15595
15688
  case "end":
15596
- return _context76.stop();
15689
+ return _context77.stop();
15597
15690
  }
15598
15691
  }
15599
- }, _callee76, this);
15692
+ }, _callee77, this);
15600
15693
  }));
15601
15694
 
15602
- function removeSegmentTargets(_x109, _x110) {
15695
+ function removeSegmentTargets(_x110, _x111) {
15603
15696
  return _removeSegmentTargets.apply(this, arguments);
15604
15697
  }
15605
15698
 
@@ -15617,29 +15710,29 @@ var StreamChat = /*#__PURE__*/function () {
15617
15710
  }, {
15618
15711
  key: "querySegments",
15619
15712
  value: function () {
15620
- var _querySegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee77(filter, sort) {
15713
+ var _querySegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee78(filter, sort) {
15621
15714
  var options,
15622
- _args77 = arguments;
15623
- return _regeneratorRuntime__default['default'].wrap(function _callee77$(_context77) {
15715
+ _args78 = arguments;
15716
+ return _regeneratorRuntime__default['default'].wrap(function _callee78$(_context78) {
15624
15717
  while (1) {
15625
- switch (_context77.prev = _context77.next) {
15718
+ switch (_context78.prev = _context78.next) {
15626
15719
  case 0:
15627
- options = _args77.length > 2 && _args77[2] !== undefined ? _args77[2] : {};
15720
+ options = _args78.length > 2 && _args78[2] !== undefined ? _args78[2] : {};
15628
15721
  this.validateServerSideAuth();
15629
- return _context77.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
15722
+ return _context78.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
15630
15723
  filter: filter,
15631
15724
  sort: sort
15632
15725
  }, options)));
15633
15726
 
15634
15727
  case 3:
15635
15728
  case "end":
15636
- return _context77.stop();
15729
+ return _context78.stop();
15637
15730
  }
15638
15731
  }
15639
- }, _callee77, this);
15732
+ }, _callee78, this);
15640
15733
  }));
15641
15734
 
15642
- function querySegments(_x111, _x112) {
15735
+ function querySegments(_x112, _x113) {
15643
15736
  return _querySegments.apply(this, arguments);
15644
15737
  }
15645
15738
 
@@ -15656,23 +15749,23 @@ var StreamChat = /*#__PURE__*/function () {
15656
15749
  }, {
15657
15750
  key: "deleteSegment",
15658
15751
  value: function () {
15659
- var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee78(id) {
15660
- return _regeneratorRuntime__default['default'].wrap(function _callee78$(_context78) {
15752
+ var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee79(id) {
15753
+ return _regeneratorRuntime__default['default'].wrap(function _callee79$(_context79) {
15661
15754
  while (1) {
15662
- switch (_context78.prev = _context78.next) {
15755
+ switch (_context79.prev = _context79.next) {
15663
15756
  case 0:
15664
15757
  this.validateServerSideAuth();
15665
- return _context78.abrupt("return", this.delete(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
15758
+ return _context79.abrupt("return", this.delete(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
15666
15759
 
15667
15760
  case 2:
15668
15761
  case "end":
15669
- return _context78.stop();
15762
+ return _context79.stop();
15670
15763
  }
15671
15764
  }
15672
- }, _callee78, this);
15765
+ }, _callee79, this);
15673
15766
  }));
15674
15767
 
15675
- function deleteSegment(_x113) {
15768
+ function deleteSegment(_x114) {
15676
15769
  return _deleteSegment.apply(this, arguments);
15677
15770
  }
15678
15771
 
@@ -15690,23 +15783,23 @@ var StreamChat = /*#__PURE__*/function () {
15690
15783
  }, {
15691
15784
  key: "segmentTargetExists",
15692
15785
  value: function () {
15693
- var _segmentTargetExists = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee79(segmentId, targetId) {
15694
- return _regeneratorRuntime__default['default'].wrap(function _callee79$(_context79) {
15786
+ var _segmentTargetExists = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee80(segmentId, targetId) {
15787
+ return _regeneratorRuntime__default['default'].wrap(function _callee80$(_context80) {
15695
15788
  while (1) {
15696
- switch (_context79.prev = _context79.next) {
15789
+ switch (_context80.prev = _context80.next) {
15697
15790
  case 0:
15698
15791
  this.validateServerSideAuth();
15699
- return _context79.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(segmentId), "/target/").concat(encodeURIComponent(targetId))));
15792
+ return _context80.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(segmentId), "/target/").concat(encodeURIComponent(targetId))));
15700
15793
 
15701
15794
  case 2:
15702
15795
  case "end":
15703
- return _context79.stop();
15796
+ return _context80.stop();
15704
15797
  }
15705
15798
  }
15706
- }, _callee79, this);
15799
+ }, _callee80, this);
15707
15800
  }));
15708
15801
 
15709
- function segmentTargetExists(_x114, _x115) {
15802
+ function segmentTargetExists(_x115, _x116) {
15710
15803
  return _segmentTargetExists.apply(this, arguments);
15711
15804
  }
15712
15805
 
@@ -15723,23 +15816,23 @@ var StreamChat = /*#__PURE__*/function () {
15723
15816
  }, {
15724
15817
  key: "createCampaign",
15725
15818
  value: function () {
15726
- var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee80(params) {
15727
- return _regeneratorRuntime__default['default'].wrap(function _callee80$(_context80) {
15819
+ var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee81(params) {
15820
+ return _regeneratorRuntime__default['default'].wrap(function _callee81$(_context81) {
15728
15821
  while (1) {
15729
- switch (_context80.prev = _context80.next) {
15822
+ switch (_context81.prev = _context81.next) {
15730
15823
  case 0:
15731
15824
  this.validateServerSideAuth();
15732
- return _context80.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
15825
+ return _context81.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
15733
15826
 
15734
15827
  case 2:
15735
15828
  case "end":
15736
- return _context80.stop();
15829
+ return _context81.stop();
15737
15830
  }
15738
15831
  }
15739
- }, _callee80, this);
15832
+ }, _callee81, this);
15740
15833
  }));
15741
15834
 
15742
- function createCampaign(_x116) {
15835
+ function createCampaign(_x117) {
15743
15836
  return _createCampaign.apply(this, arguments);
15744
15837
  }
15745
15838
 
@@ -15748,23 +15841,23 @@ var StreamChat = /*#__PURE__*/function () {
15748
15841
  }, {
15749
15842
  key: "getCampaign",
15750
15843
  value: function () {
15751
- var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee81(id) {
15752
- return _regeneratorRuntime__default['default'].wrap(function _callee81$(_context81) {
15844
+ var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee82(id) {
15845
+ return _regeneratorRuntime__default['default'].wrap(function _callee82$(_context82) {
15753
15846
  while (1) {
15754
- switch (_context81.prev = _context81.next) {
15847
+ switch (_context82.prev = _context82.next) {
15755
15848
  case 0:
15756
15849
  this.validateServerSideAuth();
15757
- return _context81.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
15850
+ return _context82.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
15758
15851
 
15759
15852
  case 2:
15760
15853
  case "end":
15761
- return _context81.stop();
15854
+ return _context82.stop();
15762
15855
  }
15763
15856
  }
15764
- }, _callee81, this);
15857
+ }, _callee82, this);
15765
15858
  }));
15766
15859
 
15767
- function getCampaign(_x117) {
15860
+ function getCampaign(_x118) {
15768
15861
  return _getCampaign.apply(this, arguments);
15769
15862
  }
15770
15863
 
@@ -15773,26 +15866,26 @@ var StreamChat = /*#__PURE__*/function () {
15773
15866
  }, {
15774
15867
  key: "startCampaign",
15775
15868
  value: function () {
15776
- var _startCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee82(id, options) {
15777
- return _regeneratorRuntime__default['default'].wrap(function _callee82$(_context82) {
15869
+ var _startCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee83(id, options) {
15870
+ return _regeneratorRuntime__default['default'].wrap(function _callee83$(_context83) {
15778
15871
  while (1) {
15779
- switch (_context82.prev = _context82.next) {
15872
+ switch (_context83.prev = _context83.next) {
15780
15873
  case 0:
15781
15874
  this.validateServerSideAuth();
15782
- return _context82.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/start"), {
15875
+ return _context83.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/start"), {
15783
15876
  scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
15784
15877
  stop_at: options === null || options === void 0 ? void 0 : options.stopAt
15785
15878
  }));
15786
15879
 
15787
15880
  case 2:
15788
15881
  case "end":
15789
- return _context82.stop();
15882
+ return _context83.stop();
15790
15883
  }
15791
15884
  }
15792
- }, _callee82, this);
15885
+ }, _callee83, this);
15793
15886
  }));
15794
15887
 
15795
- function startCampaign(_x118, _x119) {
15888
+ function startCampaign(_x119, _x120) {
15796
15889
  return _startCampaign.apply(this, arguments);
15797
15890
  }
15798
15891
 
@@ -15808,30 +15901,30 @@ var StreamChat = /*#__PURE__*/function () {
15808
15901
  }, {
15809
15902
  key: "queryCampaigns",
15810
15903
  value: function () {
15811
- var _queryCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee83(filter, sort, options) {
15812
- return _regeneratorRuntime__default['default'].wrap(function _callee83$(_context83) {
15904
+ var _queryCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee84(filter, sort, options) {
15905
+ return _regeneratorRuntime__default['default'].wrap(function _callee84$(_context84) {
15813
15906
  while (1) {
15814
- switch (_context83.prev = _context83.next) {
15907
+ switch (_context84.prev = _context84.next) {
15815
15908
  case 0:
15816
15909
  this.validateServerSideAuth();
15817
- _context83.next = 3;
15910
+ _context84.next = 3;
15818
15911
  return this.post(this.baseURL + "/campaigns/query", _objectSpread({
15819
15912
  filter: filter,
15820
15913
  sort: sort
15821
15914
  }, options || {}));
15822
15915
 
15823
15916
  case 3:
15824
- return _context83.abrupt("return", _context83.sent);
15917
+ return _context84.abrupt("return", _context84.sent);
15825
15918
 
15826
15919
  case 4:
15827
15920
  case "end":
15828
- return _context83.stop();
15921
+ return _context84.stop();
15829
15922
  }
15830
15923
  }
15831
- }, _callee83, this);
15924
+ }, _callee84, this);
15832
15925
  }));
15833
15926
 
15834
- function queryCampaigns(_x120, _x121, _x122) {
15927
+ function queryCampaigns(_x121, _x122, _x123) {
15835
15928
  return _queryCampaigns.apply(this, arguments);
15836
15929
  }
15837
15930
 
@@ -15849,23 +15942,23 @@ var StreamChat = /*#__PURE__*/function () {
15849
15942
  }, {
15850
15943
  key: "updateCampaign",
15851
15944
  value: function () {
15852
- var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee84(id, params) {
15853
- return _regeneratorRuntime__default['default'].wrap(function _callee84$(_context84) {
15945
+ var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee85(id, params) {
15946
+ return _regeneratorRuntime__default['default'].wrap(function _callee85$(_context85) {
15854
15947
  while (1) {
15855
- switch (_context84.prev = _context84.next) {
15948
+ switch (_context85.prev = _context85.next) {
15856
15949
  case 0:
15857
15950
  this.validateServerSideAuth();
15858
- return _context84.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(encodeURIComponent(id)), params));
15951
+ return _context85.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(encodeURIComponent(id)), params));
15859
15952
 
15860
15953
  case 2:
15861
15954
  case "end":
15862
- return _context84.stop();
15955
+ return _context85.stop();
15863
15956
  }
15864
15957
  }
15865
- }, _callee84, this);
15958
+ }, _callee85, this);
15866
15959
  }));
15867
15960
 
15868
- function updateCampaign(_x123, _x124) {
15961
+ function updateCampaign(_x124, _x125) {
15869
15962
  return _updateCampaign.apply(this, arguments);
15870
15963
  }
15871
15964
 
@@ -15882,23 +15975,23 @@ var StreamChat = /*#__PURE__*/function () {
15882
15975
  }, {
15883
15976
  key: "deleteCampaign",
15884
15977
  value: function () {
15885
- var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee85(id) {
15886
- return _regeneratorRuntime__default['default'].wrap(function _callee85$(_context85) {
15978
+ var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee86(id) {
15979
+ return _regeneratorRuntime__default['default'].wrap(function _callee86$(_context86) {
15887
15980
  while (1) {
15888
- switch (_context85.prev = _context85.next) {
15981
+ switch (_context86.prev = _context86.next) {
15889
15982
  case 0:
15890
15983
  this.validateServerSideAuth();
15891
- return _context85.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
15984
+ return _context86.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
15892
15985
 
15893
15986
  case 2:
15894
15987
  case "end":
15895
- return _context85.stop();
15988
+ return _context86.stop();
15896
15989
  }
15897
15990
  }
15898
- }, _callee85, this);
15991
+ }, _callee86, this);
15899
15992
  }));
15900
15993
 
15901
- function deleteCampaign(_x125) {
15994
+ function deleteCampaign(_x126) {
15902
15995
  return _deleteCampaign.apply(this, arguments);
15903
15996
  }
15904
15997
 
@@ -15915,23 +16008,23 @@ var StreamChat = /*#__PURE__*/function () {
15915
16008
  }, {
15916
16009
  key: "stopCampaign",
15917
16010
  value: function () {
15918
- var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee86(id) {
15919
- return _regeneratorRuntime__default['default'].wrap(function _callee86$(_context86) {
16011
+ var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee87(id) {
16012
+ return _regeneratorRuntime__default['default'].wrap(function _callee87$(_context87) {
15920
16013
  while (1) {
15921
- switch (_context86.prev = _context86.next) {
16014
+ switch (_context87.prev = _context87.next) {
15922
16015
  case 0:
15923
16016
  this.validateServerSideAuth();
15924
- return _context86.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/stop")));
16017
+ return _context87.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/stop")));
15925
16018
 
15926
16019
  case 2:
15927
16020
  case "end":
15928
- return _context86.stop();
16021
+ return _context87.stop();
15929
16022
  }
15930
16023
  }
15931
- }, _callee86, this);
16024
+ }, _callee87, this);
15932
16025
  }));
15933
16026
 
15934
- function stopCampaign(_x126) {
16027
+ function stopCampaign(_x127) {
15935
16028
  return _stopCampaign.apply(this, arguments);
15936
16029
  }
15937
16030
 
@@ -15947,24 +16040,24 @@ var StreamChat = /*#__PURE__*/function () {
15947
16040
  }, {
15948
16041
  key: "enrichURL",
15949
16042
  value: function () {
15950
- var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee87(url) {
15951
- return _regeneratorRuntime__default['default'].wrap(function _callee87$(_context87) {
16043
+ var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee88(url) {
16044
+ return _regeneratorRuntime__default['default'].wrap(function _callee88$(_context88) {
15952
16045
  while (1) {
15953
- switch (_context87.prev = _context87.next) {
16046
+ switch (_context88.prev = _context88.next) {
15954
16047
  case 0:
15955
- return _context87.abrupt("return", this.get(this.baseURL + "/og", {
16048
+ return _context88.abrupt("return", this.get(this.baseURL + "/og", {
15956
16049
  url: url
15957
16050
  }));
15958
16051
 
15959
16052
  case 1:
15960
16053
  case "end":
15961
- return _context87.stop();
16054
+ return _context88.stop();
15962
16055
  }
15963
16056
  }
15964
- }, _callee87, this);
16057
+ }, _callee88, this);
15965
16058
  }));
15966
16059
 
15967
- function enrichURL(_x127) {
16060
+ function enrichURL(_x128) {
15968
16061
  return _enrichURL.apply(this, arguments);
15969
16062
  }
15970
16063
 
@@ -15981,22 +16074,22 @@ var StreamChat = /*#__PURE__*/function () {
15981
16074
  }, {
15982
16075
  key: "getTask",
15983
16076
  value: function () {
15984
- var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee88(id) {
15985
- return _regeneratorRuntime__default['default'].wrap(function _callee88$(_context88) {
16077
+ var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee89(id) {
16078
+ return _regeneratorRuntime__default['default'].wrap(function _callee89$(_context89) {
15986
16079
  while (1) {
15987
- switch (_context88.prev = _context88.next) {
16080
+ switch (_context89.prev = _context89.next) {
15988
16081
  case 0:
15989
- return _context88.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(encodeURIComponent(id))));
16082
+ return _context89.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(encodeURIComponent(id))));
15990
16083
 
15991
16084
  case 1:
15992
16085
  case "end":
15993
- return _context88.stop();
16086
+ return _context89.stop();
15994
16087
  }
15995
16088
  }
15996
- }, _callee88, this);
16089
+ }, _callee89, this);
15997
16090
  }));
15998
16091
 
15999
- function getTask(_x128) {
16092
+ function getTask(_x129) {
16000
16093
  return _getTask.apply(this, arguments);
16001
16094
  }
16002
16095
 
@@ -16014,31 +16107,31 @@ var StreamChat = /*#__PURE__*/function () {
16014
16107
  }, {
16015
16108
  key: "deleteChannels",
16016
16109
  value: function () {
16017
- var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee89(cids) {
16110
+ var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee90(cids) {
16018
16111
  var options,
16019
- _args89 = arguments;
16020
- return _regeneratorRuntime__default['default'].wrap(function _callee89$(_context89) {
16112
+ _args90 = arguments;
16113
+ return _regeneratorRuntime__default['default'].wrap(function _callee90$(_context90) {
16021
16114
  while (1) {
16022
- switch (_context89.prev = _context89.next) {
16115
+ switch (_context90.prev = _context90.next) {
16023
16116
  case 0:
16024
- options = _args89.length > 1 && _args89[1] !== undefined ? _args89[1] : {};
16025
- _context89.next = 3;
16117
+ options = _args90.length > 1 && _args90[1] !== undefined ? _args90[1] : {};
16118
+ _context90.next = 3;
16026
16119
  return this.post(this.baseURL + "/channels/delete", _objectSpread({
16027
16120
  cids: cids
16028
16121
  }, options));
16029
16122
 
16030
16123
  case 3:
16031
- return _context89.abrupt("return", _context89.sent);
16124
+ return _context90.abrupt("return", _context90.sent);
16032
16125
 
16033
16126
  case 4:
16034
16127
  case "end":
16035
- return _context89.stop();
16128
+ return _context90.stop();
16036
16129
  }
16037
16130
  }
16038
- }, _callee89, this);
16131
+ }, _callee90, this);
16039
16132
  }));
16040
16133
 
16041
- function deleteChannels(_x129) {
16134
+ function deleteChannels(_x130) {
16042
16135
  return _deleteChannels.apply(this, arguments);
16043
16136
  }
16044
16137
 
@@ -16056,17 +16149,17 @@ var StreamChat = /*#__PURE__*/function () {
16056
16149
  }, {
16057
16150
  key: "deleteUsers",
16058
16151
  value: function () {
16059
- var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee90(user_ids) {
16152
+ var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee91(user_ids) {
16060
16153
  var options,
16061
- _args90 = arguments;
16062
- return _regeneratorRuntime__default['default'].wrap(function _callee90$(_context90) {
16154
+ _args91 = arguments;
16155
+ return _regeneratorRuntime__default['default'].wrap(function _callee91$(_context91) {
16063
16156
  while (1) {
16064
- switch (_context90.prev = _context90.next) {
16157
+ switch (_context91.prev = _context91.next) {
16065
16158
  case 0:
16066
- options = _args90.length > 1 && _args90[1] !== undefined ? _args90[1] : {};
16159
+ options = _args91.length > 1 && _args91[1] !== undefined ? _args91[1] : {};
16067
16160
 
16068
16161
  if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
16069
- _context90.next = 3;
16162
+ _context91.next = 3;
16070
16163
  break;
16071
16164
  }
16072
16165
 
@@ -16074,7 +16167,7 @@ var StreamChat = /*#__PURE__*/function () {
16074
16167
 
16075
16168
  case 3:
16076
16169
  if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
16077
- _context90.next = 5;
16170
+ _context91.next = 5;
16078
16171
  break;
16079
16172
  }
16080
16173
 
@@ -16082,30 +16175,30 @@ var StreamChat = /*#__PURE__*/function () {
16082
16175
 
16083
16176
  case 5:
16084
16177
  if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
16085
- _context90.next = 7;
16178
+ _context91.next = 7;
16086
16179
  break;
16087
16180
  }
16088
16181
 
16089
16182
  throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
16090
16183
 
16091
16184
  case 7:
16092
- _context90.next = 9;
16185
+ _context91.next = 9;
16093
16186
  return this.post(this.baseURL + "/users/delete", _objectSpread({
16094
16187
  user_ids: user_ids
16095
16188
  }, options));
16096
16189
 
16097
16190
  case 9:
16098
- return _context90.abrupt("return", _context90.sent);
16191
+ return _context91.abrupt("return", _context91.sent);
16099
16192
 
16100
16193
  case 10:
16101
16194
  case "end":
16102
- return _context90.stop();
16195
+ return _context91.stop();
16103
16196
  }
16104
16197
  }
16105
- }, _callee90, this);
16198
+ }, _callee91, this);
16106
16199
  }));
16107
16200
 
16108
- function deleteUsers(_x130) {
16201
+ function deleteUsers(_x131) {
16109
16202
  return _deleteUsers.apply(this, arguments);
16110
16203
  }
16111
16204
 
@@ -16126,28 +16219,28 @@ var StreamChat = /*#__PURE__*/function () {
16126
16219
  }, {
16127
16220
  key: "_createImportURL",
16128
16221
  value: function () {
16129
- var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee91(filename) {
16130
- return _regeneratorRuntime__default['default'].wrap(function _callee91$(_context91) {
16222
+ var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee92(filename) {
16223
+ return _regeneratorRuntime__default['default'].wrap(function _callee92$(_context92) {
16131
16224
  while (1) {
16132
- switch (_context91.prev = _context91.next) {
16225
+ switch (_context92.prev = _context92.next) {
16133
16226
  case 0:
16134
- _context91.next = 2;
16227
+ _context92.next = 2;
16135
16228
  return this.post(this.baseURL + "/import_urls", {
16136
16229
  filename: filename
16137
16230
  });
16138
16231
 
16139
16232
  case 2:
16140
- return _context91.abrupt("return", _context91.sent);
16233
+ return _context92.abrupt("return", _context92.sent);
16141
16234
 
16142
16235
  case 3:
16143
16236
  case "end":
16144
- return _context91.stop();
16237
+ return _context92.stop();
16145
16238
  }
16146
16239
  }
16147
- }, _callee91, this);
16240
+ }, _callee92, this);
16148
16241
  }));
16149
16242
 
16150
- function _createImportURL(_x131) {
16243
+ function _createImportURL(_x132) {
16151
16244
  return _createImportURL2.apply(this, arguments);
16152
16245
  }
16153
16246
 
@@ -16169,33 +16262,33 @@ var StreamChat = /*#__PURE__*/function () {
16169
16262
  }, {
16170
16263
  key: "_createImport",
16171
16264
  value: function () {
16172
- var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee92(path) {
16265
+ var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee93(path) {
16173
16266
  var options,
16174
- _args92 = arguments;
16175
- return _regeneratorRuntime__default['default'].wrap(function _callee92$(_context92) {
16267
+ _args93 = arguments;
16268
+ return _regeneratorRuntime__default['default'].wrap(function _callee93$(_context93) {
16176
16269
  while (1) {
16177
- switch (_context92.prev = _context92.next) {
16270
+ switch (_context93.prev = _context93.next) {
16178
16271
  case 0:
16179
- options = _args92.length > 1 && _args92[1] !== undefined ? _args92[1] : {
16272
+ options = _args93.length > 1 && _args93[1] !== undefined ? _args93[1] : {
16180
16273
  mode: 'upsert'
16181
16274
  };
16182
- _context92.next = 3;
16275
+ _context93.next = 3;
16183
16276
  return this.post(this.baseURL + "/imports", _objectSpread({
16184
16277
  path: path
16185
16278
  }, options));
16186
16279
 
16187
16280
  case 3:
16188
- return _context92.abrupt("return", _context92.sent);
16281
+ return _context93.abrupt("return", _context93.sent);
16189
16282
 
16190
16283
  case 4:
16191
16284
  case "end":
16192
- return _context92.stop();
16285
+ return _context93.stop();
16193
16286
  }
16194
16287
  }
16195
- }, _callee92, this);
16288
+ }, _callee93, this);
16196
16289
  }));
16197
16290
 
16198
- function _createImport(_x132) {
16291
+ function _createImport(_x133) {
16199
16292
  return _createImport2.apply(this, arguments);
16200
16293
  }
16201
16294
 
@@ -16217,26 +16310,26 @@ var StreamChat = /*#__PURE__*/function () {
16217
16310
  }, {
16218
16311
  key: "_getImport",
16219
16312
  value: function () {
16220
- var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee93(id) {
16221
- return _regeneratorRuntime__default['default'].wrap(function _callee93$(_context93) {
16313
+ var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee94(id) {
16314
+ return _regeneratorRuntime__default['default'].wrap(function _callee94$(_context94) {
16222
16315
  while (1) {
16223
- switch (_context93.prev = _context93.next) {
16316
+ switch (_context94.prev = _context94.next) {
16224
16317
  case 0:
16225
- _context93.next = 2;
16318
+ _context94.next = 2;
16226
16319
  return this.get(this.baseURL + "/imports/".concat(encodeURIComponent(id)));
16227
16320
 
16228
16321
  case 2:
16229
- return _context93.abrupt("return", _context93.sent);
16322
+ return _context94.abrupt("return", _context94.sent);
16230
16323
 
16231
16324
  case 3:
16232
16325
  case "end":
16233
- return _context93.stop();
16326
+ return _context94.stop();
16234
16327
  }
16235
16328
  }
16236
- }, _callee93, this);
16329
+ }, _callee94, this);
16237
16330
  }));
16238
16331
 
16239
- function _getImport(_x133) {
16332
+ function _getImport(_x134) {
16240
16333
  return _getImport2.apply(this, arguments);
16241
16334
  }
16242
16335
 
@@ -16258,26 +16351,26 @@ var StreamChat = /*#__PURE__*/function () {
16258
16351
  }, {
16259
16352
  key: "_listImports",
16260
16353
  value: function () {
16261
- var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee94(options) {
16262
- return _regeneratorRuntime__default['default'].wrap(function _callee94$(_context94) {
16354
+ var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee95(options) {
16355
+ return _regeneratorRuntime__default['default'].wrap(function _callee95$(_context95) {
16263
16356
  while (1) {
16264
- switch (_context94.prev = _context94.next) {
16357
+ switch (_context95.prev = _context95.next) {
16265
16358
  case 0:
16266
- _context94.next = 2;
16359
+ _context95.next = 2;
16267
16360
  return this.get(this.baseURL + "/imports", options);
16268
16361
 
16269
16362
  case 2:
16270
- return _context94.abrupt("return", _context94.sent);
16363
+ return _context95.abrupt("return", _context95.sent);
16271
16364
 
16272
16365
  case 3:
16273
16366
  case "end":
16274
- return _context94.stop();
16367
+ return _context95.stop();
16275
16368
  }
16276
16369
  }
16277
- }, _callee94, this);
16370
+ }, _callee95, this);
16278
16371
  }));
16279
16372
 
16280
- function _listImports(_x134) {
16373
+ function _listImports(_x135) {
16281
16374
  return _listImports2.apply(this, arguments);
16282
16375
  }
16283
16376
 
@@ -16296,28 +16389,28 @@ var StreamChat = /*#__PURE__*/function () {
16296
16389
  }, {
16297
16390
  key: "upsertPushProvider",
16298
16391
  value: function () {
16299
- var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee95(pushProvider) {
16300
- return _regeneratorRuntime__default['default'].wrap(function _callee95$(_context95) {
16392
+ var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee96(pushProvider) {
16393
+ return _regeneratorRuntime__default['default'].wrap(function _callee96$(_context96) {
16301
16394
  while (1) {
16302
- switch (_context95.prev = _context95.next) {
16395
+ switch (_context96.prev = _context96.next) {
16303
16396
  case 0:
16304
- _context95.next = 2;
16397
+ _context96.next = 2;
16305
16398
  return this.post(this.baseURL + "/push_providers", {
16306
16399
  push_provider: pushProvider
16307
16400
  });
16308
16401
 
16309
16402
  case 2:
16310
- return _context95.abrupt("return", _context95.sent);
16403
+ return _context96.abrupt("return", _context96.sent);
16311
16404
 
16312
16405
  case 3:
16313
16406
  case "end":
16314
- return _context95.stop();
16407
+ return _context96.stop();
16315
16408
  }
16316
16409
  }
16317
- }, _callee95, this);
16410
+ }, _callee96, this);
16318
16411
  }));
16319
16412
 
16320
- function upsertPushProvider(_x135) {
16413
+ function upsertPushProvider(_x136) {
16321
16414
  return _upsertPushProvider.apply(this, arguments);
16322
16415
  }
16323
16416
 
@@ -16336,28 +16429,28 @@ var StreamChat = /*#__PURE__*/function () {
16336
16429
  }, {
16337
16430
  key: "deletePushProvider",
16338
16431
  value: function () {
16339
- var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee96(_ref10) {
16432
+ var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee97(_ref10) {
16340
16433
  var type, name;
16341
- return _regeneratorRuntime__default['default'].wrap(function _callee96$(_context96) {
16434
+ return _regeneratorRuntime__default['default'].wrap(function _callee97$(_context97) {
16342
16435
  while (1) {
16343
- switch (_context96.prev = _context96.next) {
16436
+ switch (_context97.prev = _context97.next) {
16344
16437
  case 0:
16345
16438
  type = _ref10.type, name = _ref10.name;
16346
- _context96.next = 3;
16439
+ _context97.next = 3;
16347
16440
  return this.delete(this.baseURL + "/push_providers/".concat(encodeURIComponent(type), "/").concat(encodeURIComponent(name)));
16348
16441
 
16349
16442
  case 3:
16350
- return _context96.abrupt("return", _context96.sent);
16443
+ return _context97.abrupt("return", _context97.sent);
16351
16444
 
16352
16445
  case 4:
16353
16446
  case "end":
16354
- return _context96.stop();
16447
+ return _context97.stop();
16355
16448
  }
16356
16449
  }
16357
- }, _callee96, this);
16450
+ }, _callee97, this);
16358
16451
  }));
16359
16452
 
16360
- function deletePushProvider(_x136) {
16453
+ function deletePushProvider(_x137) {
16361
16454
  return _deletePushProvider.apply(this, arguments);
16362
16455
  }
16363
16456
 
@@ -16374,23 +16467,23 @@ var StreamChat = /*#__PURE__*/function () {
16374
16467
  }, {
16375
16468
  key: "listPushProviders",
16376
16469
  value: function () {
16377
- var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee97() {
16378
- return _regeneratorRuntime__default['default'].wrap(function _callee97$(_context97) {
16470
+ var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee98() {
16471
+ return _regeneratorRuntime__default['default'].wrap(function _callee98$(_context98) {
16379
16472
  while (1) {
16380
- switch (_context97.prev = _context97.next) {
16473
+ switch (_context98.prev = _context98.next) {
16381
16474
  case 0:
16382
- _context97.next = 2;
16475
+ _context98.next = 2;
16383
16476
  return this.get(this.baseURL + "/push_providers");
16384
16477
 
16385
16478
  case 2:
16386
- return _context97.abrupt("return", _context97.sent);
16479
+ return _context98.abrupt("return", _context98.sent);
16387
16480
 
16388
16481
  case 3:
16389
16482
  case "end":
16390
- return _context97.stop();
16483
+ return _context98.stop();
16391
16484
  }
16392
16485
  }
16393
- }, _callee97, this);
16486
+ }, _callee98, this);
16394
16487
  }));
16395
16488
 
16396
16489
  function listPushProviders() {
@@ -16418,26 +16511,26 @@ var StreamChat = /*#__PURE__*/function () {
16418
16511
  }, {
16419
16512
  key: "commitMessage",
16420
16513
  value: function () {
16421
- var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee98(id) {
16422
- return _regeneratorRuntime__default['default'].wrap(function _callee98$(_context98) {
16514
+ var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee99(id) {
16515
+ return _regeneratorRuntime__default['default'].wrap(function _callee99$(_context99) {
16423
16516
  while (1) {
16424
- switch (_context98.prev = _context98.next) {
16517
+ switch (_context99.prev = _context99.next) {
16425
16518
  case 0:
16426
- _context98.next = 2;
16519
+ _context99.next = 2;
16427
16520
  return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(id), "/commit"));
16428
16521
 
16429
16522
  case 2:
16430
- return _context98.abrupt("return", _context98.sent);
16523
+ return _context99.abrupt("return", _context99.sent);
16431
16524
 
16432
16525
  case 3:
16433
16526
  case "end":
16434
- return _context98.stop();
16527
+ return _context99.stop();
16435
16528
  }
16436
16529
  }
16437
- }, _callee98, this);
16530
+ }, _callee99, this);
16438
16531
  }));
16439
16532
 
16440
- function commitMessage(_x137) {
16533
+ function commitMessage(_x138) {
16441
16534
  return _commitMessage.apply(this, arguments);
16442
16535
  }
16443
16536
 
@@ -16453,28 +16546,28 @@ var StreamChat = /*#__PURE__*/function () {
16453
16546
  }, {
16454
16547
  key: "createPoll",
16455
16548
  value: function () {
16456
- var _createPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee99(poll, userId) {
16457
- return _regeneratorRuntime__default['default'].wrap(function _callee99$(_context99) {
16549
+ var _createPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee100(poll, userId) {
16550
+ return _regeneratorRuntime__default['default'].wrap(function _callee100$(_context100) {
16458
16551
  while (1) {
16459
- switch (_context99.prev = _context99.next) {
16552
+ switch (_context100.prev = _context100.next) {
16460
16553
  case 0:
16461
- _context99.next = 2;
16554
+ _context100.next = 2;
16462
16555
  return this.post(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
16463
16556
  user_id: userId
16464
16557
  } : {}));
16465
16558
 
16466
16559
  case 2:
16467
- return _context99.abrupt("return", _context99.sent);
16560
+ return _context100.abrupt("return", _context100.sent);
16468
16561
 
16469
16562
  case 3:
16470
16563
  case "end":
16471
- return _context99.stop();
16564
+ return _context100.stop();
16472
16565
  }
16473
16566
  }
16474
- }, _callee99, this);
16567
+ }, _callee100, this);
16475
16568
  }));
16476
16569
 
16477
- function createPoll(_x138, _x139) {
16570
+ function createPoll(_x139, _x140) {
16478
16571
  return _createPoll.apply(this, arguments);
16479
16572
  }
16480
16573
 
@@ -16490,28 +16583,28 @@ var StreamChat = /*#__PURE__*/function () {
16490
16583
  }, {
16491
16584
  key: "getPoll",
16492
16585
  value: function () {
16493
- var _getPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee100(id, userId) {
16494
- return _regeneratorRuntime__default['default'].wrap(function _callee100$(_context100) {
16586
+ var _getPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee101(id, userId) {
16587
+ return _regeneratorRuntime__default['default'].wrap(function _callee101$(_context101) {
16495
16588
  while (1) {
16496
- switch (_context100.prev = _context100.next) {
16589
+ switch (_context101.prev = _context101.next) {
16497
16590
  case 0:
16498
- _context100.next = 2;
16591
+ _context101.next = 2;
16499
16592
  return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(id)), userId ? {
16500
16593
  user_id: userId
16501
16594
  } : {});
16502
16595
 
16503
16596
  case 2:
16504
- return _context100.abrupt("return", _context100.sent);
16597
+ return _context101.abrupt("return", _context101.sent);
16505
16598
 
16506
16599
  case 3:
16507
16600
  case "end":
16508
- return _context100.stop();
16601
+ return _context101.stop();
16509
16602
  }
16510
16603
  }
16511
- }, _callee100, this);
16604
+ }, _callee101, this);
16512
16605
  }));
16513
16606
 
16514
- function getPoll(_x140, _x141) {
16607
+ function getPoll(_x141, _x142) {
16515
16608
  return _getPoll.apply(this, arguments);
16516
16609
  }
16517
16610
 
@@ -16527,28 +16620,28 @@ var StreamChat = /*#__PURE__*/function () {
16527
16620
  }, {
16528
16621
  key: "updatePoll",
16529
16622
  value: function () {
16530
- var _updatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee101(poll, userId) {
16531
- return _regeneratorRuntime__default['default'].wrap(function _callee101$(_context101) {
16623
+ var _updatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee102(poll, userId) {
16624
+ return _regeneratorRuntime__default['default'].wrap(function _callee102$(_context102) {
16532
16625
  while (1) {
16533
- switch (_context101.prev = _context101.next) {
16626
+ switch (_context102.prev = _context102.next) {
16534
16627
  case 0:
16535
- _context101.next = 2;
16628
+ _context102.next = 2;
16536
16629
  return this.put(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
16537
16630
  user_id: userId
16538
16631
  } : {}));
16539
16632
 
16540
16633
  case 2:
16541
- return _context101.abrupt("return", _context101.sent);
16634
+ return _context102.abrupt("return", _context102.sent);
16542
16635
 
16543
16636
  case 3:
16544
16637
  case "end":
16545
- return _context101.stop();
16638
+ return _context102.stop();
16546
16639
  }
16547
16640
  }
16548
- }, _callee101, this);
16641
+ }, _callee102, this);
16549
16642
  }));
16550
16643
 
16551
- function updatePoll(_x142, _x143) {
16644
+ function updatePoll(_x143, _x144) {
16552
16645
  return _updatePoll.apply(this, arguments);
16553
16646
  }
16554
16647
 
@@ -16566,28 +16659,28 @@ var StreamChat = /*#__PURE__*/function () {
16566
16659
  }, {
16567
16660
  key: "partialUpdatePoll",
16568
16661
  value: function () {
16569
- var _partialUpdatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee102(id, partialPollObject, userId) {
16570
- return _regeneratorRuntime__default['default'].wrap(function _callee102$(_context102) {
16662
+ var _partialUpdatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee103(id, partialPollObject, userId) {
16663
+ return _regeneratorRuntime__default['default'].wrap(function _callee103$(_context103) {
16571
16664
  while (1) {
16572
- switch (_context102.prev = _context102.next) {
16665
+ switch (_context103.prev = _context103.next) {
16573
16666
  case 0:
16574
- _context102.next = 2;
16667
+ _context103.next = 2;
16575
16668
  return this.patch(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread({}, partialPollObject), userId ? {
16576
16669
  user_id: userId
16577
16670
  } : {}));
16578
16671
 
16579
16672
  case 2:
16580
- return _context102.abrupt("return", _context102.sent);
16673
+ return _context103.abrupt("return", _context103.sent);
16581
16674
 
16582
16675
  case 3:
16583
16676
  case "end":
16584
- return _context102.stop();
16677
+ return _context103.stop();
16585
16678
  }
16586
16679
  }
16587
- }, _callee102, this);
16680
+ }, _callee103, this);
16588
16681
  }));
16589
16682
 
16590
- function partialUpdatePoll(_x144, _x145, _x146) {
16683
+ function partialUpdatePoll(_x145, _x146, _x147) {
16591
16684
  return _partialUpdatePoll.apply(this, arguments);
16592
16685
  }
16593
16686
 
@@ -16603,28 +16696,28 @@ var StreamChat = /*#__PURE__*/function () {
16603
16696
  }, {
16604
16697
  key: "deletePoll",
16605
16698
  value: function () {
16606
- var _deletePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee103(id, userId) {
16607
- return _regeneratorRuntime__default['default'].wrap(function _callee103$(_context103) {
16699
+ var _deletePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee104(id, userId) {
16700
+ return _regeneratorRuntime__default['default'].wrap(function _callee104$(_context104) {
16608
16701
  while (1) {
16609
- switch (_context103.prev = _context103.next) {
16702
+ switch (_context104.prev = _context104.next) {
16610
16703
  case 0:
16611
- _context103.next = 2;
16704
+ _context104.next = 2;
16612
16705
  return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread({}, userId ? {
16613
16706
  user_id: userId
16614
16707
  } : {}));
16615
16708
 
16616
16709
  case 2:
16617
- return _context103.abrupt("return", _context103.sent);
16710
+ return _context104.abrupt("return", _context104.sent);
16618
16711
 
16619
16712
  case 3:
16620
16713
  case "end":
16621
- return _context103.stop();
16714
+ return _context104.stop();
16622
16715
  }
16623
16716
  }
16624
- }, _callee103, this);
16717
+ }, _callee104, this);
16625
16718
  }));
16626
16719
 
16627
- function deletePoll(_x147, _x148) {
16720
+ function deletePoll(_x148, _x149) {
16628
16721
  return _deletePoll.apply(this, arguments);
16629
16722
  }
16630
16723
 
@@ -16640,12 +16733,12 @@ var StreamChat = /*#__PURE__*/function () {
16640
16733
  }, {
16641
16734
  key: "closePoll",
16642
16735
  value: function () {
16643
- var _closePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee104(id, userId) {
16644
- return _regeneratorRuntime__default['default'].wrap(function _callee104$(_context104) {
16736
+ var _closePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee105(id, userId) {
16737
+ return _regeneratorRuntime__default['default'].wrap(function _callee105$(_context105) {
16645
16738
  while (1) {
16646
- switch (_context104.prev = _context104.next) {
16739
+ switch (_context105.prev = _context105.next) {
16647
16740
  case 0:
16648
- return _context104.abrupt("return", this.partialUpdatePoll(id, {
16741
+ return _context105.abrupt("return", this.partialUpdatePoll(id, {
16649
16742
  set: {
16650
16743
  is_closed: true
16651
16744
  }
@@ -16653,13 +16746,13 @@ var StreamChat = /*#__PURE__*/function () {
16653
16746
 
16654
16747
  case 1:
16655
16748
  case "end":
16656
- return _context104.stop();
16749
+ return _context105.stop();
16657
16750
  }
16658
16751
  }
16659
- }, _callee104, this);
16752
+ }, _callee105, this);
16660
16753
  }));
16661
16754
 
16662
- function closePoll(_x149, _x150) {
16755
+ function closePoll(_x150, _x151) {
16663
16756
  return _closePoll.apply(this, arguments);
16664
16757
  }
16665
16758
 
@@ -16676,28 +16769,28 @@ var StreamChat = /*#__PURE__*/function () {
16676
16769
  }, {
16677
16770
  key: "createPollOption",
16678
16771
  value: function () {
16679
- var _createPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee105(pollId, option, userId) {
16680
- return _regeneratorRuntime__default['default'].wrap(function _callee105$(_context105) {
16772
+ var _createPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee106(pollId, option, userId) {
16773
+ return _regeneratorRuntime__default['default'].wrap(function _callee106$(_context106) {
16681
16774
  while (1) {
16682
- switch (_context105.prev = _context105.next) {
16775
+ switch (_context106.prev = _context106.next) {
16683
16776
  case 0:
16684
- _context105.next = 2;
16777
+ _context106.next = 2;
16685
16778
  return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
16686
16779
  user_id: userId
16687
16780
  } : {}));
16688
16781
 
16689
16782
  case 2:
16690
- return _context105.abrupt("return", _context105.sent);
16783
+ return _context106.abrupt("return", _context106.sent);
16691
16784
 
16692
16785
  case 3:
16693
16786
  case "end":
16694
- return _context105.stop();
16787
+ return _context106.stop();
16695
16788
  }
16696
16789
  }
16697
- }, _callee105, this);
16790
+ }, _callee106, this);
16698
16791
  }));
16699
16792
 
16700
- function createPollOption(_x151, _x152, _x153) {
16793
+ function createPollOption(_x152, _x153, _x154) {
16701
16794
  return _createPollOption.apply(this, arguments);
16702
16795
  }
16703
16796
 
@@ -16714,28 +16807,28 @@ var StreamChat = /*#__PURE__*/function () {
16714
16807
  }, {
16715
16808
  key: "getPollOption",
16716
16809
  value: function () {
16717
- var _getPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee106(pollId, optionId, userId) {
16718
- return _regeneratorRuntime__default['default'].wrap(function _callee106$(_context106) {
16810
+ var _getPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee107(pollId, optionId, userId) {
16811
+ return _regeneratorRuntime__default['default'].wrap(function _callee107$(_context107) {
16719
16812
  while (1) {
16720
- switch (_context106.prev = _context106.next) {
16813
+ switch (_context107.prev = _context107.next) {
16721
16814
  case 0:
16722
- _context106.next = 2;
16815
+ _context107.next = 2;
16723
16816
  return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
16724
16817
  user_id: userId
16725
16818
  } : {});
16726
16819
 
16727
16820
  case 2:
16728
- return _context106.abrupt("return", _context106.sent);
16821
+ return _context107.abrupt("return", _context107.sent);
16729
16822
 
16730
16823
  case 3:
16731
16824
  case "end":
16732
- return _context106.stop();
16825
+ return _context107.stop();
16733
16826
  }
16734
16827
  }
16735
- }, _callee106, this);
16828
+ }, _callee107, this);
16736
16829
  }));
16737
16830
 
16738
- function getPollOption(_x154, _x155, _x156) {
16831
+ function getPollOption(_x155, _x156, _x157) {
16739
16832
  return _getPollOption.apply(this, arguments);
16740
16833
  }
16741
16834
 
@@ -16752,28 +16845,28 @@ var StreamChat = /*#__PURE__*/function () {
16752
16845
  }, {
16753
16846
  key: "updatePollOption",
16754
16847
  value: function () {
16755
- var _updatePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee107(pollId, option, userId) {
16756
- return _regeneratorRuntime__default['default'].wrap(function _callee107$(_context107) {
16848
+ var _updatePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee108(pollId, option, userId) {
16849
+ return _regeneratorRuntime__default['default'].wrap(function _callee108$(_context108) {
16757
16850
  while (1) {
16758
- switch (_context107.prev = _context107.next) {
16851
+ switch (_context108.prev = _context108.next) {
16759
16852
  case 0:
16760
- _context107.next = 2;
16853
+ _context108.next = 2;
16761
16854
  return this.put(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
16762
16855
  user_id: userId
16763
16856
  } : {}));
16764
16857
 
16765
16858
  case 2:
16766
- return _context107.abrupt("return", _context107.sent);
16859
+ return _context108.abrupt("return", _context108.sent);
16767
16860
 
16768
16861
  case 3:
16769
16862
  case "end":
16770
- return _context107.stop();
16863
+ return _context108.stop();
16771
16864
  }
16772
16865
  }
16773
- }, _callee107, this);
16866
+ }, _callee108, this);
16774
16867
  }));
16775
16868
 
16776
- function updatePollOption(_x157, _x158, _x159) {
16869
+ function updatePollOption(_x158, _x159, _x160) {
16777
16870
  return _updatePollOption.apply(this, arguments);
16778
16871
  }
16779
16872
 
@@ -16790,28 +16883,28 @@ var StreamChat = /*#__PURE__*/function () {
16790
16883
  }, {
16791
16884
  key: "deletePollOption",
16792
16885
  value: function () {
16793
- var _deletePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee108(pollId, optionId, userId) {
16794
- return _regeneratorRuntime__default['default'].wrap(function _callee108$(_context108) {
16886
+ var _deletePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee109(pollId, optionId, userId) {
16887
+ return _regeneratorRuntime__default['default'].wrap(function _callee109$(_context109) {
16795
16888
  while (1) {
16796
- switch (_context108.prev = _context108.next) {
16889
+ switch (_context109.prev = _context109.next) {
16797
16890
  case 0:
16798
- _context108.next = 2;
16891
+ _context109.next = 2;
16799
16892
  return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
16800
16893
  user_id: userId
16801
16894
  } : {});
16802
16895
 
16803
16896
  case 2:
16804
- return _context108.abrupt("return", _context108.sent);
16897
+ return _context109.abrupt("return", _context109.sent);
16805
16898
 
16806
16899
  case 3:
16807
16900
  case "end":
16808
- return _context108.stop();
16901
+ return _context109.stop();
16809
16902
  }
16810
16903
  }
16811
- }, _callee108, this);
16904
+ }, _callee109, this);
16812
16905
  }));
16813
16906
 
16814
- function deletePollOption(_x160, _x161, _x162) {
16907
+ function deletePollOption(_x161, _x162, _x163) {
16815
16908
  return _deletePollOption.apply(this, arguments);
16816
16909
  }
16817
16910
 
@@ -16829,12 +16922,12 @@ var StreamChat = /*#__PURE__*/function () {
16829
16922
  }, {
16830
16923
  key: "castPollVote",
16831
16924
  value: function () {
16832
- var _castPollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee109(messageId, pollId, vote, userId) {
16833
- return _regeneratorRuntime__default['default'].wrap(function _callee109$(_context109) {
16925
+ var _castPollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee110(messageId, pollId, vote, userId) {
16926
+ return _regeneratorRuntime__default['default'].wrap(function _callee110$(_context110) {
16834
16927
  while (1) {
16835
- switch (_context109.prev = _context109.next) {
16928
+ switch (_context110.prev = _context110.next) {
16836
16929
  case 0:
16837
- _context109.next = 2;
16930
+ _context110.next = 2;
16838
16931
  return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote"), _objectSpread({
16839
16932
  vote: vote
16840
16933
  }, userId ? {
@@ -16842,17 +16935,17 @@ var StreamChat = /*#__PURE__*/function () {
16842
16935
  } : {}));
16843
16936
 
16844
16937
  case 2:
16845
- return _context109.abrupt("return", _context109.sent);
16938
+ return _context110.abrupt("return", _context110.sent);
16846
16939
 
16847
16940
  case 3:
16848
16941
  case "end":
16849
- return _context109.stop();
16942
+ return _context110.stop();
16850
16943
  }
16851
16944
  }
16852
- }, _callee109, this);
16945
+ }, _callee110, this);
16853
16946
  }));
16854
16947
 
16855
- function castPollVote(_x163, _x164, _x165, _x166) {
16948
+ function castPollVote(_x164, _x165, _x166, _x167) {
16856
16949
  return _castPollVote.apply(this, arguments);
16857
16950
  }
16858
16951
 
@@ -16869,24 +16962,24 @@ var StreamChat = /*#__PURE__*/function () {
16869
16962
  }, {
16870
16963
  key: "addPollAnswer",
16871
16964
  value: function () {
16872
- var _addPollAnswer = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee110(messageId, pollId, answerText, userId) {
16873
- return _regeneratorRuntime__default['default'].wrap(function _callee110$(_context110) {
16965
+ var _addPollAnswer = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee111(messageId, pollId, answerText, userId) {
16966
+ return _regeneratorRuntime__default['default'].wrap(function _callee111$(_context111) {
16874
16967
  while (1) {
16875
- switch (_context110.prev = _context110.next) {
16968
+ switch (_context111.prev = _context111.next) {
16876
16969
  case 0:
16877
- return _context110.abrupt("return", this.castPollVote(messageId, pollId, {
16970
+ return _context111.abrupt("return", this.castPollVote(messageId, pollId, {
16878
16971
  answer_text: answerText
16879
16972
  }, userId));
16880
16973
 
16881
16974
  case 1:
16882
16975
  case "end":
16883
- return _context110.stop();
16976
+ return _context111.stop();
16884
16977
  }
16885
16978
  }
16886
- }, _callee110, this);
16979
+ }, _callee111, this);
16887
16980
  }));
16888
16981
 
16889
- function addPollAnswer(_x167, _x168, _x169, _x170) {
16982
+ function addPollAnswer(_x168, _x169, _x170, _x171) {
16890
16983
  return _addPollAnswer.apply(this, arguments);
16891
16984
  }
16892
16985
 
@@ -16895,28 +16988,28 @@ var StreamChat = /*#__PURE__*/function () {
16895
16988
  }, {
16896
16989
  key: "removePollVote",
16897
16990
  value: function () {
16898
- var _removePollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee111(messageId, pollId, voteId, userId) {
16899
- return _regeneratorRuntime__default['default'].wrap(function _callee111$(_context111) {
16991
+ var _removePollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee112(messageId, pollId, voteId, userId) {
16992
+ return _regeneratorRuntime__default['default'].wrap(function _callee112$(_context112) {
16900
16993
  while (1) {
16901
- switch (_context111.prev = _context111.next) {
16994
+ switch (_context112.prev = _context112.next) {
16902
16995
  case 0:
16903
- _context111.next = 2;
16996
+ _context112.next = 2;
16904
16997
  return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote/").concat(encodeURIComponent(voteId)), _objectSpread({}, userId ? {
16905
16998
  user_id: userId
16906
16999
  } : {}));
16907
17000
 
16908
17001
  case 2:
16909
- return _context111.abrupt("return", _context111.sent);
17002
+ return _context112.abrupt("return", _context112.sent);
16910
17003
 
16911
17004
  case 3:
16912
17005
  case "end":
16913
- return _context111.stop();
17006
+ return _context112.stop();
16914
17007
  }
16915
17008
  }
16916
- }, _callee111, this);
17009
+ }, _callee112, this);
16917
17010
  }));
16918
17011
 
16919
- function removePollVote(_x171, _x172, _x173, _x174) {
17012
+ function removePollVote(_x172, _x173, _x174, _x175) {
16920
17013
  return _removePollVote.apply(this, arguments);
16921
17014
  }
16922
17015
 
@@ -16934,37 +17027,37 @@ var StreamChat = /*#__PURE__*/function () {
16934
17027
  }, {
16935
17028
  key: "queryPolls",
16936
17029
  value: function () {
16937
- var _queryPolls = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee112() {
17030
+ var _queryPolls = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee113() {
16938
17031
  var filter,
16939
17032
  sort,
16940
17033
  options,
16941
17034
  userId,
16942
17035
  q,
16943
- _args112 = arguments;
16944
- return _regeneratorRuntime__default['default'].wrap(function _callee112$(_context112) {
17036
+ _args113 = arguments;
17037
+ return _regeneratorRuntime__default['default'].wrap(function _callee113$(_context113) {
16945
17038
  while (1) {
16946
- switch (_context112.prev = _context112.next) {
17039
+ switch (_context113.prev = _context113.next) {
16947
17040
  case 0:
16948
- filter = _args112.length > 0 && _args112[0] !== undefined ? _args112[0] : {};
16949
- sort = _args112.length > 1 && _args112[1] !== undefined ? _args112[1] : [];
16950
- options = _args112.length > 2 && _args112[2] !== undefined ? _args112[2] : {};
16951
- userId = _args112.length > 3 ? _args112[3] : undefined;
17041
+ filter = _args113.length > 0 && _args113[0] !== undefined ? _args113[0] : {};
17042
+ sort = _args113.length > 1 && _args113[1] !== undefined ? _args113[1] : [];
17043
+ options = _args113.length > 2 && _args113[2] !== undefined ? _args113[2] : {};
17044
+ userId = _args113.length > 3 ? _args113[3] : undefined;
16952
17045
  q = userId ? "?user_id=".concat(userId) : '';
16953
- _context112.next = 7;
17046
+ _context113.next = 7;
16954
17047
  return this.post(this.baseURL + "/polls/query".concat(q), _objectSpread({
16955
17048
  filter: filter,
16956
17049
  sort: normalizeQuerySort(sort)
16957
17050
  }, options));
16958
17051
 
16959
17052
  case 7:
16960
- return _context112.abrupt("return", _context112.sent);
17053
+ return _context113.abrupt("return", _context113.sent);
16961
17054
 
16962
17055
  case 8:
16963
17056
  case "end":
16964
- return _context112.stop();
17057
+ return _context113.stop();
16965
17058
  }
16966
17059
  }
16967
- }, _callee112, this);
17060
+ }, _callee113, this);
16968
17061
  }));
16969
17062
 
16970
17063
  function queryPolls() {
@@ -16986,40 +17079,40 @@ var StreamChat = /*#__PURE__*/function () {
16986
17079
  }, {
16987
17080
  key: "queryPollVotes",
16988
17081
  value: function () {
16989
- var _queryPollVotes = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee113(pollId) {
17082
+ var _queryPollVotes = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee114(pollId) {
16990
17083
  var filter,
16991
17084
  sort,
16992
17085
  options,
16993
17086
  userId,
16994
17087
  q,
16995
- _args113 = arguments;
16996
- return _regeneratorRuntime__default['default'].wrap(function _callee113$(_context113) {
17088
+ _args114 = arguments;
17089
+ return _regeneratorRuntime__default['default'].wrap(function _callee114$(_context114) {
16997
17090
  while (1) {
16998
- switch (_context113.prev = _context113.next) {
17091
+ switch (_context114.prev = _context114.next) {
16999
17092
  case 0:
17000
- filter = _args113.length > 1 && _args113[1] !== undefined ? _args113[1] : {};
17001
- sort = _args113.length > 2 && _args113[2] !== undefined ? _args113[2] : [];
17002
- options = _args113.length > 3 && _args113[3] !== undefined ? _args113[3] : {};
17003
- userId = _args113.length > 4 ? _args113[4] : undefined;
17093
+ filter = _args114.length > 1 && _args114[1] !== undefined ? _args114[1] : {};
17094
+ sort = _args114.length > 2 && _args114[2] !== undefined ? _args114[2] : [];
17095
+ options = _args114.length > 3 && _args114[3] !== undefined ? _args114[3] : {};
17096
+ userId = _args114.length > 4 ? _args114[4] : undefined;
17004
17097
  q = userId ? "?user_id=".concat(userId) : '';
17005
- _context113.next = 7;
17098
+ _context114.next = 7;
17006
17099
  return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
17007
17100
  filter: filter,
17008
17101
  sort: normalizeQuerySort(sort)
17009
17102
  }, options));
17010
17103
 
17011
17104
  case 7:
17012
- return _context113.abrupt("return", _context113.sent);
17105
+ return _context114.abrupt("return", _context114.sent);
17013
17106
 
17014
17107
  case 8:
17015
17108
  case "end":
17016
- return _context113.stop();
17109
+ return _context114.stop();
17017
17110
  }
17018
17111
  }
17019
- }, _callee113, this);
17112
+ }, _callee114, this);
17020
17113
  }));
17021
17114
 
17022
- function queryPollVotes(_x175) {
17115
+ function queryPollVotes(_x176) {
17023
17116
  return _queryPollVotes.apply(this, arguments);
17024
17117
  }
17025
17118
 
@@ -17038,23 +17131,23 @@ var StreamChat = /*#__PURE__*/function () {
17038
17131
  }, {
17039
17132
  key: "queryPollAnswers",
17040
17133
  value: function () {
17041
- var _queryPollAnswers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee114(pollId) {
17134
+ var _queryPollAnswers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee115(pollId) {
17042
17135
  var filter,
17043
17136
  sort,
17044
17137
  options,
17045
17138
  userId,
17046
17139
  q,
17047
- _args114 = arguments;
17048
- return _regeneratorRuntime__default['default'].wrap(function _callee114$(_context114) {
17140
+ _args115 = arguments;
17141
+ return _regeneratorRuntime__default['default'].wrap(function _callee115$(_context115) {
17049
17142
  while (1) {
17050
- switch (_context114.prev = _context114.next) {
17143
+ switch (_context115.prev = _context115.next) {
17051
17144
  case 0:
17052
- filter = _args114.length > 1 && _args114[1] !== undefined ? _args114[1] : {};
17053
- sort = _args114.length > 2 && _args114[2] !== undefined ? _args114[2] : [];
17054
- options = _args114.length > 3 && _args114[3] !== undefined ? _args114[3] : {};
17055
- userId = _args114.length > 4 ? _args114[4] : undefined;
17145
+ filter = _args115.length > 1 && _args115[1] !== undefined ? _args115[1] : {};
17146
+ sort = _args115.length > 2 && _args115[2] !== undefined ? _args115[2] : [];
17147
+ options = _args115.length > 3 && _args115[3] !== undefined ? _args115[3] : {};
17148
+ userId = _args115.length > 4 ? _args115[4] : undefined;
17056
17149
  q = userId ? "?user_id=".concat(userId) : '';
17057
- _context114.next = 7;
17150
+ _context115.next = 7;
17058
17151
  return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
17059
17152
  filter: _objectSpread(_objectSpread({}, filter), {}, {
17060
17153
  is_answer: true
@@ -17063,17 +17156,17 @@ var StreamChat = /*#__PURE__*/function () {
17063
17156
  }, options));
17064
17157
 
17065
17158
  case 7:
17066
- return _context114.abrupt("return", _context114.sent);
17159
+ return _context115.abrupt("return", _context115.sent);
17067
17160
 
17068
17161
  case 8:
17069
17162
  case "end":
17070
- return _context114.stop();
17163
+ return _context115.stop();
17071
17164
  }
17072
17165
  }
17073
- }, _callee114, this);
17166
+ }, _callee115, this);
17074
17167
  }));
17075
17168
 
17076
- function queryPollAnswers(_x176) {
17169
+ function queryPollAnswers(_x177) {
17077
17170
  return _queryPollAnswers.apply(this, arguments);
17078
17171
  }
17079
17172
 
@@ -17090,33 +17183,33 @@ var StreamChat = /*#__PURE__*/function () {
17090
17183
  }, {
17091
17184
  key: "queryMessageHistory",
17092
17185
  value: function () {
17093
- var _queryMessageHistory = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee115() {
17186
+ var _queryMessageHistory = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee116() {
17094
17187
  var filter,
17095
17188
  sort,
17096
17189
  options,
17097
- _args115 = arguments;
17098
- return _regeneratorRuntime__default['default'].wrap(function _callee115$(_context115) {
17190
+ _args116 = arguments;
17191
+ return _regeneratorRuntime__default['default'].wrap(function _callee116$(_context116) {
17099
17192
  while (1) {
17100
- switch (_context115.prev = _context115.next) {
17193
+ switch (_context116.prev = _context116.next) {
17101
17194
  case 0:
17102
- filter = _args115.length > 0 && _args115[0] !== undefined ? _args115[0] : {};
17103
- sort = _args115.length > 1 && _args115[1] !== undefined ? _args115[1] : [];
17104
- options = _args115.length > 2 && _args115[2] !== undefined ? _args115[2] : {};
17105
- _context115.next = 5;
17195
+ filter = _args116.length > 0 && _args116[0] !== undefined ? _args116[0] : {};
17196
+ sort = _args116.length > 1 && _args116[1] !== undefined ? _args116[1] : [];
17197
+ options = _args116.length > 2 && _args116[2] !== undefined ? _args116[2] : {};
17198
+ _context116.next = 5;
17106
17199
  return this.post(this.baseURL + '/messages/history', _objectSpread({
17107
17200
  filter: filter,
17108
17201
  sort: normalizeQuerySort(sort)
17109
17202
  }, options));
17110
17203
 
17111
17204
  case 5:
17112
- return _context115.abrupt("return", _context115.sent);
17205
+ return _context116.abrupt("return", _context116.sent);
17113
17206
 
17114
17207
  case 6:
17115
17208
  case "end":
17116
- return _context115.stop();
17209
+ return _context116.stop();
17117
17210
  }
17118
17211
  }
17119
- }, _callee115, this);
17212
+ }, _callee116, this);
17120
17213
  }));
17121
17214
 
17122
17215
  function queryMessageHistory() {
@@ -17137,32 +17230,32 @@ var StreamChat = /*#__PURE__*/function () {
17137
17230
  }, {
17138
17231
  key: "updateFlags",
17139
17232
  value: function () {
17140
- var _updateFlags = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee116(message_ids, reviewed_by) {
17233
+ var _updateFlags = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee117(message_ids, reviewed_by) {
17141
17234
  var options,
17142
- _args116 = arguments;
17143
- return _regeneratorRuntime__default['default'].wrap(function _callee116$(_context116) {
17235
+ _args117 = arguments;
17236
+ return _regeneratorRuntime__default['default'].wrap(function _callee117$(_context117) {
17144
17237
  while (1) {
17145
- switch (_context116.prev = _context116.next) {
17238
+ switch (_context117.prev = _context117.next) {
17146
17239
  case 0:
17147
- options = _args116.length > 2 && _args116[2] !== undefined ? _args116[2] : {};
17148
- _context116.next = 3;
17240
+ options = _args117.length > 2 && _args117[2] !== undefined ? _args117[2] : {};
17241
+ _context117.next = 3;
17149
17242
  return this.post(this.baseURL + '/automod/v1/moderation/update_flags', _objectSpread({
17150
17243
  message_ids: message_ids,
17151
17244
  reviewed_by: reviewed_by
17152
17245
  }, options));
17153
17246
 
17154
17247
  case 3:
17155
- return _context116.abrupt("return", _context116.sent);
17248
+ return _context117.abrupt("return", _context117.sent);
17156
17249
 
17157
17250
  case 4:
17158
17251
  case "end":
17159
- return _context116.stop();
17252
+ return _context117.stop();
17160
17253
  }
17161
17254
  }
17162
- }, _callee116, this);
17255
+ }, _callee117, this);
17163
17256
  }));
17164
17257
 
17165
- function updateFlags(_x177, _x178) {
17258
+ function updateFlags(_x178, _x179) {
17166
17259
  return _updateFlags.apply(this, arguments);
17167
17260
  }
17168
17261