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