stream-chat 8.33.0 → 8.34.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.
@@ -908,10 +908,7 @@ var ChannelState = /*#__PURE__*/function () {
908
908
 
909
909
  if (parentID && !initializing) {
910
910
  var thread = this.threads[parentID] || [];
911
-
912
- var threadMessages = this._addToMessageList(thread, message, timestampChanged, 'created_at', addIfDoesNotExist);
913
-
914
- this.threads[parentID] = threadMessages;
911
+ this.threads[parentID] = this._addToMessageList(thread, message, timestampChanged, 'created_at', addIfDoesNotExist);
915
912
  }
916
913
  }
917
914
 
@@ -1019,10 +1016,13 @@ var ChannelState = /*#__PURE__*/function () {
1019
1016
  return messageWithReaction;
1020
1017
  }
1021
1018
  }, {
1022
- key: "removeQuotedMessageReferences",
1023
- value: function removeQuotedMessageReferences(message) {
1019
+ key: "_updateQuotedMessageReferences",
1020
+ value: function _updateQuotedMessageReferences(_ref) {
1024
1021
  var _this4 = this;
1025
1022
 
1023
+ var message = _ref.message,
1024
+ remove = _ref.remove;
1025
+
1026
1026
  var parseMessage = function parseMessage(m) {
1027
1027
  var _m$pinned_at, _m$updated_at;
1028
1028
 
@@ -1033,18 +1033,37 @@ var ChannelState = /*#__PURE__*/function () {
1033
1033
  });
1034
1034
  };
1035
1035
 
1036
- this.messageSets.forEach(function (set) {
1037
- var updatedMessages = set.messages.filter(function (msg) {
1038
- return msg.quoted_message_id === message.id;
1039
- }).map(parseMessage).map(function (msg) {
1040
- return _objectSpread$7(_objectSpread$7({}, msg), {}, {
1041
- quoted_message: _objectSpread$7(_objectSpread$7({}, message), {}, {
1042
- attachments: []
1043
- })
1044
- });
1045
- });
1036
+ var update = function update(messages) {
1037
+ var updatedMessages = messages.reduce(function (acc, msg) {
1038
+ if (msg.quoted_message_id === message.id) {
1039
+ acc.push(_objectSpread$7(_objectSpread$7({}, parseMessage(msg)), {}, {
1040
+ quoted_message: remove ? _objectSpread$7(_objectSpread$7({}, message), {}, {
1041
+ attachments: []
1042
+ }) : message
1043
+ }));
1044
+ }
1045
+
1046
+ return acc;
1047
+ }, []);
1046
1048
 
1047
1049
  _this4.addMessagesSorted(updatedMessages, true);
1050
+ };
1051
+
1052
+ if (!message.parent_id) {
1053
+ this.messageSets.forEach(function (set) {
1054
+ return update(set.messages);
1055
+ });
1056
+ } else if (message.parent_id && this.threads[message.parent_id]) {
1057
+ // prevent going through all the threads even though it is possible to quote a message from another thread
1058
+ update(this.threads[message.parent_id]);
1059
+ }
1060
+ }
1061
+ }, {
1062
+ key: "removeQuotedMessageReferences",
1063
+ value: function removeQuotedMessageReferences(message) {
1064
+ this._updateQuotedMessageReferences({
1065
+ message: message,
1066
+ remove: true
1048
1067
  });
1049
1068
  }
1050
1069
  /**
@@ -4008,6 +4027,10 @@ var Channel = /*#__PURE__*/function () {
4008
4027
 
4009
4028
  channelState.addMessageSorted(event.message, false, false);
4010
4029
 
4030
+ channelState._updateQuotedMessageReferences({
4031
+ message: event.message
4032
+ });
4033
+
4011
4034
  if (event.message.pinned) {
4012
4035
  channelState.addPinnedMessage(event.message);
4013
4036
  } else {
@@ -10290,6 +10313,100 @@ var StreamChat = /*#__PURE__*/function () {
10290
10313
 
10291
10314
  return removeShadowBan;
10292
10315
  }()
10316
+ }, {
10317
+ key: "blockUser",
10318
+ value: function () {
10319
+ var _blockUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(blockedUserID, user_id) {
10320
+ return _regeneratorRuntime.wrap(function _callee43$(_context43) {
10321
+ while (1) {
10322
+ switch (_context43.prev = _context43.next) {
10323
+ case 0:
10324
+ _context43.next = 2;
10325
+ return this.post(this.baseURL + '/users/block', _objectSpread({
10326
+ blocked_user_id: blockedUserID
10327
+ }, user_id ? {
10328
+ user_id: user_id
10329
+ } : {}));
10330
+
10331
+ case 2:
10332
+ return _context43.abrupt("return", _context43.sent);
10333
+
10334
+ case 3:
10335
+ case "end":
10336
+ return _context43.stop();
10337
+ }
10338
+ }
10339
+ }, _callee43, this);
10340
+ }));
10341
+
10342
+ function blockUser(_x56, _x57) {
10343
+ return _blockUser.apply(this, arguments);
10344
+ }
10345
+
10346
+ return blockUser;
10347
+ }()
10348
+ }, {
10349
+ key: "getBlockedUsers",
10350
+ value: function () {
10351
+ var _getBlockedUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(user_id) {
10352
+ return _regeneratorRuntime.wrap(function _callee44$(_context44) {
10353
+ while (1) {
10354
+ switch (_context44.prev = _context44.next) {
10355
+ case 0:
10356
+ _context44.next = 2;
10357
+ return this.get(this.baseURL + '/users/block', _objectSpread({}, user_id ? {
10358
+ user_id: user_id
10359
+ } : {}));
10360
+
10361
+ case 2:
10362
+ return _context44.abrupt("return", _context44.sent);
10363
+
10364
+ case 3:
10365
+ case "end":
10366
+ return _context44.stop();
10367
+ }
10368
+ }
10369
+ }, _callee44, this);
10370
+ }));
10371
+
10372
+ function getBlockedUsers(_x58) {
10373
+ return _getBlockedUsers.apply(this, arguments);
10374
+ }
10375
+
10376
+ return getBlockedUsers;
10377
+ }()
10378
+ }, {
10379
+ key: "unBlockUser",
10380
+ value: function () {
10381
+ var _unBlockUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(blockedUserID, userID) {
10382
+ return _regeneratorRuntime.wrap(function _callee45$(_context45) {
10383
+ while (1) {
10384
+ switch (_context45.prev = _context45.next) {
10385
+ case 0:
10386
+ _context45.next = 2;
10387
+ return this.post(this.baseURL + '/users/unblock', _objectSpread({
10388
+ blocked_user_id: blockedUserID
10389
+ }, userID ? {
10390
+ user_id: userID
10391
+ } : {}));
10392
+
10393
+ case 2:
10394
+ return _context45.abrupt("return", _context45.sent);
10395
+
10396
+ case 3:
10397
+ case "end":
10398
+ return _context45.stop();
10399
+ }
10400
+ }
10401
+ }, _callee45, this);
10402
+ }));
10403
+
10404
+ function unBlockUser(_x59, _x60) {
10405
+ return _unBlockUser.apply(this, arguments);
10406
+ }
10407
+
10408
+ return unBlockUser;
10409
+ }()
10293
10410
  /** muteUser - mutes a user
10294
10411
  *
10295
10412
  * @param {string} targetID
@@ -10301,15 +10418,15 @@ var StreamChat = /*#__PURE__*/function () {
10301
10418
  }, {
10302
10419
  key: "muteUser",
10303
10420
  value: function () {
10304
- var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(targetID, userID) {
10421
+ var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(targetID, userID) {
10305
10422
  var options,
10306
- _args43 = arguments;
10307
- return _regeneratorRuntime.wrap(function _callee43$(_context43) {
10423
+ _args46 = arguments;
10424
+ return _regeneratorRuntime.wrap(function _callee46$(_context46) {
10308
10425
  while (1) {
10309
- switch (_context43.prev = _context43.next) {
10426
+ switch (_context46.prev = _context46.next) {
10310
10427
  case 0:
10311
- options = _args43.length > 2 && _args43[2] !== undefined ? _args43[2] : {};
10312
- _context43.next = 3;
10428
+ options = _args46.length > 2 && _args46[2] !== undefined ? _args46[2] : {};
10429
+ _context46.next = 3;
10313
10430
  return this.post(this.baseURL + '/moderation/mute', _objectSpread(_objectSpread({
10314
10431
  target_id: targetID
10315
10432
  }, userID ? {
@@ -10317,17 +10434,17 @@ var StreamChat = /*#__PURE__*/function () {
10317
10434
  } : {}), options));
10318
10435
 
10319
10436
  case 3:
10320
- return _context43.abrupt("return", _context43.sent);
10437
+ return _context46.abrupt("return", _context46.sent);
10321
10438
 
10322
10439
  case 4:
10323
10440
  case "end":
10324
- return _context43.stop();
10441
+ return _context46.stop();
10325
10442
  }
10326
10443
  }
10327
- }, _callee43, this);
10444
+ }, _callee46, this);
10328
10445
  }));
10329
10446
 
10330
- function muteUser(_x56, _x57) {
10447
+ function muteUser(_x61, _x62) {
10331
10448
  return _muteUser.apply(this, arguments);
10332
10449
  }
10333
10450
 
@@ -10343,12 +10460,12 @@ var StreamChat = /*#__PURE__*/function () {
10343
10460
  }, {
10344
10461
  key: "unmuteUser",
10345
10462
  value: function () {
10346
- var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(targetID, currentUserID) {
10347
- return _regeneratorRuntime.wrap(function _callee44$(_context44) {
10463
+ var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(targetID, currentUserID) {
10464
+ return _regeneratorRuntime.wrap(function _callee47$(_context47) {
10348
10465
  while (1) {
10349
- switch (_context44.prev = _context44.next) {
10466
+ switch (_context47.prev = _context47.next) {
10350
10467
  case 0:
10351
- _context44.next = 2;
10468
+ _context47.next = 2;
10352
10469
  return this.post(this.baseURL + '/moderation/unmute', _objectSpread({
10353
10470
  target_id: targetID
10354
10471
  }, currentUserID ? {
@@ -10356,17 +10473,17 @@ var StreamChat = /*#__PURE__*/function () {
10356
10473
  } : {}));
10357
10474
 
10358
10475
  case 2:
10359
- return _context44.abrupt("return", _context44.sent);
10476
+ return _context47.abrupt("return", _context47.sent);
10360
10477
 
10361
10478
  case 3:
10362
10479
  case "end":
10363
- return _context44.stop();
10480
+ return _context47.stop();
10364
10481
  }
10365
10482
  }
10366
- }, _callee44, this);
10483
+ }, _callee47, this);
10367
10484
  }));
10368
10485
 
10369
- function unmuteUser(_x58, _x59) {
10486
+ function unmuteUser(_x63, _x64) {
10370
10487
  return _unmuteUser.apply(this, arguments);
10371
10488
  }
10372
10489
 
@@ -10401,31 +10518,31 @@ var StreamChat = /*#__PURE__*/function () {
10401
10518
  }, {
10402
10519
  key: "flagMessage",
10403
10520
  value: function () {
10404
- var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(targetMessageID) {
10521
+ var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(targetMessageID) {
10405
10522
  var options,
10406
- _args45 = arguments;
10407
- return _regeneratorRuntime.wrap(function _callee45$(_context45) {
10523
+ _args48 = arguments;
10524
+ return _regeneratorRuntime.wrap(function _callee48$(_context48) {
10408
10525
  while (1) {
10409
- switch (_context45.prev = _context45.next) {
10526
+ switch (_context48.prev = _context48.next) {
10410
10527
  case 0:
10411
- options = _args45.length > 1 && _args45[1] !== undefined ? _args45[1] : {};
10412
- _context45.next = 3;
10528
+ options = _args48.length > 1 && _args48[1] !== undefined ? _args48[1] : {};
10529
+ _context48.next = 3;
10413
10530
  return this.post(this.baseURL + '/moderation/flag', _objectSpread({
10414
10531
  target_message_id: targetMessageID
10415
10532
  }, options));
10416
10533
 
10417
10534
  case 3:
10418
- return _context45.abrupt("return", _context45.sent);
10535
+ return _context48.abrupt("return", _context48.sent);
10419
10536
 
10420
10537
  case 4:
10421
10538
  case "end":
10422
- return _context45.stop();
10539
+ return _context48.stop();
10423
10540
  }
10424
10541
  }
10425
- }, _callee45, this);
10542
+ }, _callee48, this);
10426
10543
  }));
10427
10544
 
10428
- function flagMessage(_x60) {
10545
+ function flagMessage(_x65) {
10429
10546
  return _flagMessage.apply(this, arguments);
10430
10547
  }
10431
10548
 
@@ -10441,31 +10558,31 @@ var StreamChat = /*#__PURE__*/function () {
10441
10558
  }, {
10442
10559
  key: "flagUser",
10443
10560
  value: function () {
10444
- var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(targetID) {
10561
+ var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(targetID) {
10445
10562
  var options,
10446
- _args46 = arguments;
10447
- return _regeneratorRuntime.wrap(function _callee46$(_context46) {
10563
+ _args49 = arguments;
10564
+ return _regeneratorRuntime.wrap(function _callee49$(_context49) {
10448
10565
  while (1) {
10449
- switch (_context46.prev = _context46.next) {
10566
+ switch (_context49.prev = _context49.next) {
10450
10567
  case 0:
10451
- options = _args46.length > 1 && _args46[1] !== undefined ? _args46[1] : {};
10452
- _context46.next = 3;
10568
+ options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
10569
+ _context49.next = 3;
10453
10570
  return this.post(this.baseURL + '/moderation/flag', _objectSpread({
10454
10571
  target_user_id: targetID
10455
10572
  }, options));
10456
10573
 
10457
10574
  case 3:
10458
- return _context46.abrupt("return", _context46.sent);
10575
+ return _context49.abrupt("return", _context49.sent);
10459
10576
 
10460
10577
  case 4:
10461
10578
  case "end":
10462
- return _context46.stop();
10579
+ return _context49.stop();
10463
10580
  }
10464
10581
  }
10465
- }, _callee46, this);
10582
+ }, _callee49, this);
10466
10583
  }));
10467
10584
 
10468
- function flagUser(_x61) {
10585
+ function flagUser(_x66) {
10469
10586
  return _flagUser.apply(this, arguments);
10470
10587
  }
10471
10588
 
@@ -10481,31 +10598,31 @@ var StreamChat = /*#__PURE__*/function () {
10481
10598
  }, {
10482
10599
  key: "unflagMessage",
10483
10600
  value: function () {
10484
- var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(targetMessageID) {
10601
+ var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(targetMessageID) {
10485
10602
  var options,
10486
- _args47 = arguments;
10487
- return _regeneratorRuntime.wrap(function _callee47$(_context47) {
10603
+ _args50 = arguments;
10604
+ return _regeneratorRuntime.wrap(function _callee50$(_context50) {
10488
10605
  while (1) {
10489
- switch (_context47.prev = _context47.next) {
10606
+ switch (_context50.prev = _context50.next) {
10490
10607
  case 0:
10491
- options = _args47.length > 1 && _args47[1] !== undefined ? _args47[1] : {};
10492
- _context47.next = 3;
10608
+ options = _args50.length > 1 && _args50[1] !== undefined ? _args50[1] : {};
10609
+ _context50.next = 3;
10493
10610
  return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
10494
10611
  target_message_id: targetMessageID
10495
10612
  }, options));
10496
10613
 
10497
10614
  case 3:
10498
- return _context47.abrupt("return", _context47.sent);
10615
+ return _context50.abrupt("return", _context50.sent);
10499
10616
 
10500
10617
  case 4:
10501
10618
  case "end":
10502
- return _context47.stop();
10619
+ return _context50.stop();
10503
10620
  }
10504
10621
  }
10505
- }, _callee47, this);
10622
+ }, _callee50, this);
10506
10623
  }));
10507
10624
 
10508
- function unflagMessage(_x62) {
10625
+ function unflagMessage(_x67) {
10509
10626
  return _unflagMessage.apply(this, arguments);
10510
10627
  }
10511
10628
 
@@ -10521,31 +10638,31 @@ var StreamChat = /*#__PURE__*/function () {
10521
10638
  }, {
10522
10639
  key: "unflagUser",
10523
10640
  value: function () {
10524
- var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(targetID) {
10641
+ var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(targetID) {
10525
10642
  var options,
10526
- _args48 = arguments;
10527
- return _regeneratorRuntime.wrap(function _callee48$(_context48) {
10643
+ _args51 = arguments;
10644
+ return _regeneratorRuntime.wrap(function _callee51$(_context51) {
10528
10645
  while (1) {
10529
- switch (_context48.prev = _context48.next) {
10646
+ switch (_context51.prev = _context51.next) {
10530
10647
  case 0:
10531
- options = _args48.length > 1 && _args48[1] !== undefined ? _args48[1] : {};
10532
- _context48.next = 3;
10648
+ options = _args51.length > 1 && _args51[1] !== undefined ? _args51[1] : {};
10649
+ _context51.next = 3;
10533
10650
  return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
10534
10651
  target_user_id: targetID
10535
10652
  }, options));
10536
10653
 
10537
10654
  case 3:
10538
- return _context48.abrupt("return", _context48.sent);
10655
+ return _context51.abrupt("return", _context51.sent);
10539
10656
 
10540
10657
  case 4:
10541
10658
  case "end":
10542
- return _context48.stop();
10659
+ return _context51.stop();
10543
10660
  }
10544
10661
  }
10545
- }, _callee48, this);
10662
+ }, _callee51, this);
10546
10663
  }));
10547
10664
 
10548
- function unflagUser(_x63) {
10665
+ function unflagUser(_x68) {
10549
10666
  return _unflagUser.apply(this, arguments);
10550
10667
  }
10551
10668
 
@@ -10562,29 +10679,29 @@ var StreamChat = /*#__PURE__*/function () {
10562
10679
  }, {
10563
10680
  key: "getCallToken",
10564
10681
  value: function () {
10565
- var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(callID) {
10682
+ var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(callID) {
10566
10683
  var options,
10567
- _args49 = arguments;
10568
- return _regeneratorRuntime.wrap(function _callee49$(_context49) {
10684
+ _args52 = arguments;
10685
+ return _regeneratorRuntime.wrap(function _callee52$(_context52) {
10569
10686
  while (1) {
10570
- switch (_context49.prev = _context49.next) {
10687
+ switch (_context52.prev = _context52.next) {
10571
10688
  case 0:
10572
- options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
10573
- _context49.next = 3;
10689
+ options = _args52.length > 1 && _args52[1] !== undefined ? _args52[1] : {};
10690
+ _context52.next = 3;
10574
10691
  return this.post(this.baseURL + "/calls/".concat(callID), _objectSpread({}, options));
10575
10692
 
10576
10693
  case 3:
10577
- return _context49.abrupt("return", _context49.sent);
10694
+ return _context52.abrupt("return", _context52.sent);
10578
10695
 
10579
10696
  case 4:
10580
10697
  case "end":
10581
- return _context49.stop();
10698
+ return _context52.stop();
10582
10699
  }
10583
10700
  }
10584
- }, _callee49, this);
10701
+ }, _callee52, this);
10585
10702
  }));
10586
10703
 
10587
- function getCallToken(_x64) {
10704
+ function getCallToken(_x69) {
10588
10705
  return _getCallToken.apply(this, arguments);
10589
10706
  }
10590
10707
 
@@ -10607,30 +10724,30 @@ var StreamChat = /*#__PURE__*/function () {
10607
10724
  }, {
10608
10725
  key: "_queryFlags",
10609
10726
  value: function () {
10610
- var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50() {
10727
+ var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53() {
10611
10728
  var filterConditions,
10612
10729
  options,
10613
- _args50 = arguments;
10614
- return _regeneratorRuntime.wrap(function _callee50$(_context50) {
10730
+ _args53 = arguments;
10731
+ return _regeneratorRuntime.wrap(function _callee53$(_context53) {
10615
10732
  while (1) {
10616
- switch (_context50.prev = _context50.next) {
10733
+ switch (_context53.prev = _context53.next) {
10617
10734
  case 0:
10618
- filterConditions = _args50.length > 0 && _args50[0] !== undefined ? _args50[0] : {};
10619
- options = _args50.length > 1 && _args50[1] !== undefined ? _args50[1] : {};
10620
- _context50.next = 4;
10735
+ filterConditions = _args53.length > 0 && _args53[0] !== undefined ? _args53[0] : {};
10736
+ options = _args53.length > 1 && _args53[1] !== undefined ? _args53[1] : {};
10737
+ _context53.next = 4;
10621
10738
  return this.post(this.baseURL + '/moderation/flags', _objectSpread({
10622
10739
  filter_conditions: filterConditions
10623
10740
  }, options));
10624
10741
 
10625
10742
  case 4:
10626
- return _context50.abrupt("return", _context50.sent);
10743
+ return _context53.abrupt("return", _context53.sent);
10627
10744
 
10628
10745
  case 5:
10629
10746
  case "end":
10630
- return _context50.stop();
10747
+ return _context53.stop();
10631
10748
  }
10632
10749
  }
10633
- }, _callee50, this);
10750
+ }, _callee53, this);
10634
10751
  }));
10635
10752
 
10636
10753
  function _queryFlags() {
@@ -10656,30 +10773,30 @@ var StreamChat = /*#__PURE__*/function () {
10656
10773
  }, {
10657
10774
  key: "_queryFlagReports",
10658
10775
  value: function () {
10659
- var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51() {
10776
+ var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54() {
10660
10777
  var filterConditions,
10661
10778
  options,
10662
- _args51 = arguments;
10663
- return _regeneratorRuntime.wrap(function _callee51$(_context51) {
10779
+ _args54 = arguments;
10780
+ return _regeneratorRuntime.wrap(function _callee54$(_context54) {
10664
10781
  while (1) {
10665
- switch (_context51.prev = _context51.next) {
10782
+ switch (_context54.prev = _context54.next) {
10666
10783
  case 0:
10667
- filterConditions = _args51.length > 0 && _args51[0] !== undefined ? _args51[0] : {};
10668
- options = _args51.length > 1 && _args51[1] !== undefined ? _args51[1] : {};
10669
- _context51.next = 4;
10784
+ filterConditions = _args54.length > 0 && _args54[0] !== undefined ? _args54[0] : {};
10785
+ options = _args54.length > 1 && _args54[1] !== undefined ? _args54[1] : {};
10786
+ _context54.next = 4;
10670
10787
  return this.post(this.baseURL + '/moderation/reports', _objectSpread({
10671
10788
  filter_conditions: filterConditions
10672
10789
  }, options));
10673
10790
 
10674
10791
  case 4:
10675
- return _context51.abrupt("return", _context51.sent);
10792
+ return _context54.abrupt("return", _context54.sent);
10676
10793
 
10677
10794
  case 5:
10678
10795
  case "end":
10679
- return _context51.stop();
10796
+ return _context54.stop();
10680
10797
  }
10681
10798
  }
10682
- }, _callee51, this);
10799
+ }, _callee54, this);
10683
10800
  }));
10684
10801
 
10685
10802
  function _queryFlagReports() {
@@ -10706,31 +10823,31 @@ var StreamChat = /*#__PURE__*/function () {
10706
10823
  }, {
10707
10824
  key: "_reviewFlagReport",
10708
10825
  value: function () {
10709
- var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(id, reviewResult) {
10826
+ var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(id, reviewResult) {
10710
10827
  var options,
10711
- _args52 = arguments;
10712
- return _regeneratorRuntime.wrap(function _callee52$(_context52) {
10828
+ _args55 = arguments;
10829
+ return _regeneratorRuntime.wrap(function _callee55$(_context55) {
10713
10830
  while (1) {
10714
- switch (_context52.prev = _context52.next) {
10831
+ switch (_context55.prev = _context55.next) {
10715
10832
  case 0:
10716
- options = _args52.length > 2 && _args52[2] !== undefined ? _args52[2] : {};
10717
- _context52.next = 3;
10833
+ options = _args55.length > 2 && _args55[2] !== undefined ? _args55[2] : {};
10834
+ _context55.next = 3;
10718
10835
  return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
10719
10836
  review_result: reviewResult
10720
10837
  }, options));
10721
10838
 
10722
10839
  case 3:
10723
- return _context52.abrupt("return", _context52.sent);
10840
+ return _context55.abrupt("return", _context55.sent);
10724
10841
 
10725
10842
  case 4:
10726
10843
  case "end":
10727
- return _context52.stop();
10844
+ return _context55.stop();
10728
10845
  }
10729
10846
  }
10730
- }, _callee52, this);
10847
+ }, _callee55, this);
10731
10848
  }));
10732
10849
 
10733
- function _reviewFlagReport(_x65, _x66) {
10850
+ function _reviewFlagReport(_x70, _x71) {
10734
10851
  return _reviewFlagReport2.apply(this, arguments);
10735
10852
  }
10736
10853
 
@@ -10748,31 +10865,31 @@ var StreamChat = /*#__PURE__*/function () {
10748
10865
  }, {
10749
10866
  key: "unblockMessage",
10750
10867
  value: function () {
10751
- var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(targetMessageID) {
10868
+ var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(targetMessageID) {
10752
10869
  var options,
10753
- _args53 = arguments;
10754
- return _regeneratorRuntime.wrap(function _callee53$(_context53) {
10870
+ _args56 = arguments;
10871
+ return _regeneratorRuntime.wrap(function _callee56$(_context56) {
10755
10872
  while (1) {
10756
- switch (_context53.prev = _context53.next) {
10873
+ switch (_context56.prev = _context56.next) {
10757
10874
  case 0:
10758
- options = _args53.length > 1 && _args53[1] !== undefined ? _args53[1] : {};
10759
- _context53.next = 3;
10875
+ options = _args56.length > 1 && _args56[1] !== undefined ? _args56[1] : {};
10876
+ _context56.next = 3;
10760
10877
  return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
10761
10878
  target_message_id: targetMessageID
10762
10879
  }, options));
10763
10880
 
10764
10881
  case 3:
10765
- return _context53.abrupt("return", _context53.sent);
10882
+ return _context56.abrupt("return", _context56.sent);
10766
10883
 
10767
10884
  case 4:
10768
10885
  case "end":
10769
- return _context53.stop();
10886
+ return _context56.stop();
10770
10887
  }
10771
10888
  }
10772
- }, _callee53, this);
10889
+ }, _callee56, this);
10773
10890
  }));
10774
10891
 
10775
- function unblockMessage(_x67) {
10892
+ function unblockMessage(_x72) {
10776
10893
  return _unblockMessage.apply(this, arguments);
10777
10894
  }
10778
10895
 
@@ -10791,23 +10908,23 @@ var StreamChat = /*#__PURE__*/function () {
10791
10908
  * @return {Promise<APIResponse>}
10792
10909
  */
10793
10910
  function () {
10794
- var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54() {
10911
+ var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57() {
10795
10912
  var data,
10796
- _args54 = arguments;
10797
- return _regeneratorRuntime.wrap(function _callee54$(_context54) {
10913
+ _args57 = arguments;
10914
+ return _regeneratorRuntime.wrap(function _callee57$(_context57) {
10798
10915
  while (1) {
10799
- switch (_context54.prev = _context54.next) {
10916
+ switch (_context57.prev = _context57.next) {
10800
10917
  case 0:
10801
- data = _args54.length > 0 && _args54[0] !== undefined ? _args54[0] : {};
10802
- _context54.next = 3;
10918
+ data = _args57.length > 0 && _args57[0] !== undefined ? _args57[0] : {};
10919
+ _context57.next = 3;
10803
10920
  return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
10804
10921
 
10805
10922
  case 3:
10806
10923
  case "end":
10807
- return _context54.stop();
10924
+ return _context57.stop();
10808
10925
  }
10809
10926
  }
10810
- }, _callee54, this);
10927
+ }, _callee57, this);
10811
10928
  }));
10812
10929
 
10813
10930
  function markChannelsRead() {
@@ -10882,28 +10999,28 @@ var StreamChat = /*#__PURE__*/function () {
10882
10999
  }, {
10883
11000
  key: "translateMessage",
10884
11001
  value: function () {
10885
- var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(messageId, language) {
10886
- return _regeneratorRuntime.wrap(function _callee55$(_context55) {
11002
+ var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(messageId, language) {
11003
+ return _regeneratorRuntime.wrap(function _callee58$(_context58) {
10887
11004
  while (1) {
10888
- switch (_context55.prev = _context55.next) {
11005
+ switch (_context58.prev = _context58.next) {
10889
11006
  case 0:
10890
- _context55.next = 2;
11007
+ _context58.next = 2;
10891
11008
  return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
10892
11009
  language: language
10893
11010
  });
10894
11011
 
10895
11012
  case 2:
10896
- return _context55.abrupt("return", _context55.sent);
11013
+ return _context58.abrupt("return", _context58.sent);
10897
11014
 
10898
11015
  case 3:
10899
11016
  case "end":
10900
- return _context55.stop();
11017
+ return _context58.stop();
10901
11018
  }
10902
11019
  }
10903
- }, _callee55, this);
11020
+ }, _callee58, this);
10904
11021
  }));
10905
11022
 
10906
- function translateMessage(_x68, _x69) {
11023
+ function translateMessage(_x73, _x74) {
10907
11024
  return _translateMessage.apply(this, arguments);
10908
11025
  }
10909
11026
 
@@ -11005,14 +11122,14 @@ var StreamChat = /*#__PURE__*/function () {
11005
11122
  }, {
11006
11123
  key: "updateMessage",
11007
11124
  value: function () {
11008
- var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(message, userId, options) {
11125
+ var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(message, userId, options) {
11009
11126
  var clonedMessage, reservedMessageFields;
11010
- return _regeneratorRuntime.wrap(function _callee56$(_context56) {
11127
+ return _regeneratorRuntime.wrap(function _callee59$(_context59) {
11011
11128
  while (1) {
11012
- switch (_context56.prev = _context56.next) {
11129
+ switch (_context59.prev = _context59.next) {
11013
11130
  case 0:
11014
11131
  if (message.id) {
11015
- _context56.next = 2;
11132
+ _context59.next = 2;
11016
11133
  break;
11017
11134
  }
11018
11135
 
@@ -11049,23 +11166,23 @@ var StreamChat = /*#__PURE__*/function () {
11049
11166
  });
11050
11167
  }
11051
11168
 
11052
- _context56.next = 10;
11169
+ _context59.next = 10;
11053
11170
  return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
11054
11171
  message: clonedMessage
11055
11172
  }, options));
11056
11173
 
11057
11174
  case 10:
11058
- return _context56.abrupt("return", _context56.sent);
11175
+ return _context59.abrupt("return", _context59.sent);
11059
11176
 
11060
11177
  case 11:
11061
11178
  case "end":
11062
- return _context56.stop();
11179
+ return _context59.stop();
11063
11180
  }
11064
11181
  }
11065
- }, _callee56, this);
11182
+ }, _callee59, this);
11066
11183
  }));
11067
11184
 
11068
- function updateMessage(_x70, _x71, _x72) {
11185
+ function updateMessage(_x75, _x76, _x77) {
11069
11186
  return _updateMessage.apply(this, arguments);
11070
11187
  }
11071
11188
 
@@ -11088,14 +11205,14 @@ var StreamChat = /*#__PURE__*/function () {
11088
11205
  }, {
11089
11206
  key: "partialUpdateMessage",
11090
11207
  value: function () {
11091
- var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(id, partialMessageObject, userId, options) {
11208
+ var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(id, partialMessageObject, userId, options) {
11092
11209
  var user;
11093
- return _regeneratorRuntime.wrap(function _callee57$(_context57) {
11210
+ return _regeneratorRuntime.wrap(function _callee60$(_context60) {
11094
11211
  while (1) {
11095
- switch (_context57.prev = _context57.next) {
11212
+ switch (_context60.prev = _context60.next) {
11096
11213
  case 0:
11097
11214
  if (id) {
11098
- _context57.next = 2;
11215
+ _context60.next = 2;
11099
11216
  break;
11100
11217
  }
11101
11218
 
@@ -11110,23 +11227,23 @@ var StreamChat = /*#__PURE__*/function () {
11110
11227
  };
11111
11228
  }
11112
11229
 
11113
- _context57.next = 6;
11230
+ _context60.next = 6;
11114
11231
  return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
11115
11232
  user: user
11116
11233
  }));
11117
11234
 
11118
11235
  case 6:
11119
- return _context57.abrupt("return", _context57.sent);
11236
+ return _context60.abrupt("return", _context60.sent);
11120
11237
 
11121
11238
  case 7:
11122
11239
  case "end":
11123
- return _context57.stop();
11240
+ return _context60.stop();
11124
11241
  }
11125
11242
  }
11126
- }, _callee57, this);
11243
+ }, _callee60, this);
11127
11244
  }));
11128
11245
 
11129
- function partialUpdateMessage(_x73, _x74, _x75, _x76) {
11246
+ function partialUpdateMessage(_x78, _x79, _x80, _x81) {
11130
11247
  return _partialUpdateMessage.apply(this, arguments);
11131
11248
  }
11132
11249
 
@@ -11135,11 +11252,11 @@ var StreamChat = /*#__PURE__*/function () {
11135
11252
  }, {
11136
11253
  key: "deleteMessage",
11137
11254
  value: function () {
11138
- var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(messageID, hardDelete) {
11255
+ var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(messageID, hardDelete) {
11139
11256
  var params;
11140
- return _regeneratorRuntime.wrap(function _callee58$(_context58) {
11257
+ return _regeneratorRuntime.wrap(function _callee61$(_context61) {
11141
11258
  while (1) {
11142
- switch (_context58.prev = _context58.next) {
11259
+ switch (_context61.prev = _context61.next) {
11143
11260
  case 0:
11144
11261
  params = {};
11145
11262
 
@@ -11149,21 +11266,21 @@ var StreamChat = /*#__PURE__*/function () {
11149
11266
  };
11150
11267
  }
11151
11268
 
11152
- _context58.next = 4;
11269
+ _context61.next = 4;
11153
11270
  return this.delete(this.baseURL + "/messages/".concat(messageID), params);
11154
11271
 
11155
11272
  case 4:
11156
- return _context58.abrupt("return", _context58.sent);
11273
+ return _context61.abrupt("return", _context61.sent);
11157
11274
 
11158
11275
  case 5:
11159
11276
  case "end":
11160
- return _context58.stop();
11277
+ return _context61.stop();
11161
11278
  }
11162
11279
  }
11163
- }, _callee58, this);
11280
+ }, _callee61, this);
11164
11281
  }));
11165
11282
 
11166
- function deleteMessage(_x77, _x78) {
11283
+ function deleteMessage(_x82, _x83) {
11167
11284
  return _deleteMessage.apply(this, arguments);
11168
11285
  }
11169
11286
 
@@ -11185,28 +11302,28 @@ var StreamChat = /*#__PURE__*/function () {
11185
11302
  }, {
11186
11303
  key: "undeleteMessage",
11187
11304
  value: function () {
11188
- var _undeleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(messageID, userID) {
11189
- return _regeneratorRuntime.wrap(function _callee59$(_context59) {
11305
+ var _undeleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(messageID, userID) {
11306
+ return _regeneratorRuntime.wrap(function _callee62$(_context62) {
11190
11307
  while (1) {
11191
- switch (_context59.prev = _context59.next) {
11308
+ switch (_context62.prev = _context62.next) {
11192
11309
  case 0:
11193
- _context59.next = 2;
11310
+ _context62.next = 2;
11194
11311
  return this.post(this.baseURL + "/messages/".concat(messageID, "/undelete"), {
11195
11312
  undeleted_by: userID
11196
11313
  });
11197
11314
 
11198
11315
  case 2:
11199
- return _context59.abrupt("return", _context59.sent);
11316
+ return _context62.abrupt("return", _context62.sent);
11200
11317
 
11201
11318
  case 3:
11202
11319
  case "end":
11203
- return _context59.stop();
11320
+ return _context62.stop();
11204
11321
  }
11205
11322
  }
11206
- }, _callee59, this);
11323
+ }, _callee62, this);
11207
11324
  }));
11208
11325
 
11209
- function undeleteMessage(_x79, _x80) {
11326
+ function undeleteMessage(_x84, _x85) {
11210
11327
  return _undeleteMessage.apply(this, arguments);
11211
11328
  }
11212
11329
 
@@ -11215,26 +11332,26 @@ var StreamChat = /*#__PURE__*/function () {
11215
11332
  }, {
11216
11333
  key: "getMessage",
11217
11334
  value: function () {
11218
- var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(messageID, options) {
11219
- return _regeneratorRuntime.wrap(function _callee60$(_context60) {
11335
+ var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(messageID, options) {
11336
+ return _regeneratorRuntime.wrap(function _callee63$(_context63) {
11220
11337
  while (1) {
11221
- switch (_context60.prev = _context60.next) {
11338
+ switch (_context63.prev = _context63.next) {
11222
11339
  case 0:
11223
- _context60.next = 2;
11340
+ _context63.next = 2;
11224
11341
  return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), _objectSpread({}, options));
11225
11342
 
11226
11343
  case 2:
11227
- return _context60.abrupt("return", _context60.sent);
11344
+ return _context63.abrupt("return", _context63.sent);
11228
11345
 
11229
11346
  case 3:
11230
11347
  case "end":
11231
- return _context60.stop();
11348
+ return _context63.stop();
11232
11349
  }
11233
11350
  }
11234
- }, _callee60, this);
11351
+ }, _callee63, this);
11235
11352
  }));
11236
11353
 
11237
- function getMessage(_x81, _x82) {
11354
+ function getMessage(_x86, _x87) {
11238
11355
  return _getMessage.apply(this, arguments);
11239
11356
  }
11240
11357
 
@@ -11255,13 +11372,13 @@ var StreamChat = /*#__PURE__*/function () {
11255
11372
  }, {
11256
11373
  key: "queryThreads",
11257
11374
  value: function () {
11258
- var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(options) {
11375
+ var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(options) {
11259
11376
  var _this5 = this;
11260
11377
 
11261
11378
  var opts, res;
11262
- return _regeneratorRuntime.wrap(function _callee61$(_context61) {
11379
+ return _regeneratorRuntime.wrap(function _callee64$(_context64) {
11263
11380
  while (1) {
11264
- switch (_context61.prev = _context61.next) {
11381
+ switch (_context64.prev = _context64.next) {
11265
11382
  case 0:
11266
11383
  opts = _objectSpread({
11267
11384
  limit: 10,
@@ -11269,12 +11386,12 @@ var StreamChat = /*#__PURE__*/function () {
11269
11386
  reply_limit: 3,
11270
11387
  watch: true
11271
11388
  }, options);
11272
- _context61.next = 3;
11389
+ _context64.next = 3;
11273
11390
  return this.post(this.baseURL + "/threads", opts);
11274
11391
 
11275
11392
  case 3:
11276
- res = _context61.sent;
11277
- return _context61.abrupt("return", {
11393
+ res = _context64.sent;
11394
+ return _context64.abrupt("return", {
11278
11395
  threads: res.threads.map(function (thread) {
11279
11396
  return new Thread(_this5, thread);
11280
11397
  }),
@@ -11283,13 +11400,13 @@ var StreamChat = /*#__PURE__*/function () {
11283
11400
 
11284
11401
  case 5:
11285
11402
  case "end":
11286
- return _context61.stop();
11403
+ return _context64.stop();
11287
11404
  }
11288
11405
  }
11289
- }, _callee61, this);
11406
+ }, _callee64, this);
11290
11407
  }));
11291
11408
 
11292
- function queryThreads(_x83) {
11409
+ function queryThreads(_x88) {
11293
11410
  return _queryThreads.apply(this, arguments);
11294
11411
  }
11295
11412
 
@@ -11310,19 +11427,19 @@ var StreamChat = /*#__PURE__*/function () {
11310
11427
  }, {
11311
11428
  key: "getThread",
11312
11429
  value: function () {
11313
- var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(messageId) {
11430
+ var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(messageId) {
11314
11431
  var options,
11315
11432
  opts,
11316
11433
  res,
11317
- _args62 = arguments;
11318
- return _regeneratorRuntime.wrap(function _callee62$(_context62) {
11434
+ _args65 = arguments;
11435
+ return _regeneratorRuntime.wrap(function _callee65$(_context65) {
11319
11436
  while (1) {
11320
- switch (_context62.prev = _context62.next) {
11437
+ switch (_context65.prev = _context65.next) {
11321
11438
  case 0:
11322
- options = _args62.length > 1 && _args62[1] !== undefined ? _args62[1] : {};
11439
+ options = _args65.length > 1 && _args65[1] !== undefined ? _args65[1] : {};
11323
11440
 
11324
11441
  if (messageId) {
11325
- _context62.next = 3;
11442
+ _context65.next = 3;
11326
11443
  break;
11327
11444
  }
11328
11445
 
@@ -11334,22 +11451,22 @@ var StreamChat = /*#__PURE__*/function () {
11334
11451
  reply_limit: 3,
11335
11452
  watch: true
11336
11453
  }, options);
11337
- _context62.next = 6;
11454
+ _context65.next = 6;
11338
11455
  return this.get(this.baseURL + "/threads/".concat(messageId), opts);
11339
11456
 
11340
11457
  case 6:
11341
- res = _context62.sent;
11342
- return _context62.abrupt("return", new Thread(this, res.thread));
11458
+ res = _context65.sent;
11459
+ return _context65.abrupt("return", new Thread(this, res.thread));
11343
11460
 
11344
11461
  case 8:
11345
11462
  case "end":
11346
- return _context62.stop();
11463
+ return _context65.stop();
11347
11464
  }
11348
11465
  }
11349
- }, _callee62, this);
11466
+ }, _callee65, this);
11350
11467
  }));
11351
11468
 
11352
- function getThread(_x84) {
11469
+ function getThread(_x89) {
11353
11470
  return _getThread.apply(this, arguments);
11354
11471
  }
11355
11472
 
@@ -11367,15 +11484,15 @@ var StreamChat = /*#__PURE__*/function () {
11367
11484
  }, {
11368
11485
  key: "partialUpdateThread",
11369
11486
  value: function () {
11370
- var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(messageId, partialThreadObject) {
11487
+ var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(messageId, partialThreadObject) {
11371
11488
  var reservedThreadFields, _key5;
11372
11489
 
11373
- return _regeneratorRuntime.wrap(function _callee63$(_context63) {
11490
+ return _regeneratorRuntime.wrap(function _callee66$(_context66) {
11374
11491
  while (1) {
11375
- switch (_context63.prev = _context63.next) {
11492
+ switch (_context66.prev = _context66.next) {
11376
11493
  case 0:
11377
11494
  if (messageId) {
11378
- _context63.next = 2;
11495
+ _context66.next = 2;
11379
11496
  break;
11380
11497
  }
11381
11498
 
@@ -11385,43 +11502,43 @@ var StreamChat = /*#__PURE__*/function () {
11385
11502
  // check for reserved fields from ThreadResponse type within partialThreadObject's set and unset.
11386
11503
  // Throw error if any of the reserved field is found.
11387
11504
  reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel'];
11388
- _context63.t0 = _regeneratorRuntime.keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
11505
+ _context66.t0 = _regeneratorRuntime.keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
11389
11506
 
11390
11507
  case 4:
11391
- if ((_context63.t1 = _context63.t0()).done) {
11392
- _context63.next = 10;
11508
+ if ((_context66.t1 = _context66.t0()).done) {
11509
+ _context66.next = 10;
11393
11510
  break;
11394
11511
  }
11395
11512
 
11396
- _key5 = _context63.t1.value;
11513
+ _key5 = _context66.t1.value;
11397
11514
 
11398
11515
  if (!reservedThreadFields.includes(_key5)) {
11399
- _context63.next = 8;
11516
+ _context66.next = 8;
11400
11517
  break;
11401
11518
  }
11402
11519
 
11403
11520
  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."));
11404
11521
 
11405
11522
  case 8:
11406
- _context63.next = 4;
11523
+ _context66.next = 4;
11407
11524
  break;
11408
11525
 
11409
11526
  case 10:
11410
- _context63.next = 12;
11527
+ _context66.next = 12;
11411
11528
  return this.patch(this.baseURL + "/threads/".concat(messageId), partialThreadObject);
11412
11529
 
11413
11530
  case 12:
11414
- return _context63.abrupt("return", _context63.sent);
11531
+ return _context66.abrupt("return", _context66.sent);
11415
11532
 
11416
11533
  case 13:
11417
11534
  case "end":
11418
- return _context63.stop();
11535
+ return _context66.stop();
11419
11536
  }
11420
11537
  }
11421
- }, _callee63, this);
11538
+ }, _callee66, this);
11422
11539
  }));
11423
11540
 
11424
- function partialUpdateThread(_x85, _x86) {
11541
+ function partialUpdateThread(_x90, _x91) {
11425
11542
  return _partialUpdateThread.apply(this, arguments);
11426
11543
  }
11427
11544
 
@@ -11430,7 +11547,7 @@ var StreamChat = /*#__PURE__*/function () {
11430
11547
  }, {
11431
11548
  key: "getUserAgent",
11432
11549
  value: function getUserAgent() {
11433
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.33.0");
11550
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.34.0");
11434
11551
  }
11435
11552
  }, {
11436
11553
  key: "setUserAgent",
@@ -11649,28 +11766,28 @@ var StreamChat = /*#__PURE__*/function () {
11649
11766
  }, {
11650
11767
  key: "sendUserCustomEvent",
11651
11768
  value: function () {
11652
- var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(targetUserID, event) {
11653
- return _regeneratorRuntime.wrap(function _callee64$(_context64) {
11769
+ var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(targetUserID, event) {
11770
+ return _regeneratorRuntime.wrap(function _callee67$(_context67) {
11654
11771
  while (1) {
11655
- switch (_context64.prev = _context64.next) {
11772
+ switch (_context67.prev = _context67.next) {
11656
11773
  case 0:
11657
- _context64.next = 2;
11774
+ _context67.next = 2;
11658
11775
  return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
11659
11776
  event: event
11660
11777
  });
11661
11778
 
11662
11779
  case 2:
11663
- return _context64.abrupt("return", _context64.sent);
11780
+ return _context67.abrupt("return", _context67.sent);
11664
11781
 
11665
11782
  case 3:
11666
11783
  case "end":
11667
- return _context64.stop();
11784
+ return _context67.stop();
11668
11785
  }
11669
11786
  }
11670
- }, _callee64, this);
11787
+ }, _callee67, this);
11671
11788
  }));
11672
11789
 
11673
- function sendUserCustomEvent(_x87, _x88) {
11790
+ function sendUserCustomEvent(_x92, _x93) {
11674
11791
  return _sendUserCustomEvent.apply(this, arguments);
11675
11792
  }
11676
11793
 
@@ -11767,28 +11884,28 @@ var StreamChat = /*#__PURE__*/function () {
11767
11884
  }, {
11768
11885
  key: "createSegment",
11769
11886
  value: function () {
11770
- var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(type, id, data) {
11887
+ var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(type, id, data) {
11771
11888
  var body;
11772
- return _regeneratorRuntime.wrap(function _callee65$(_context65) {
11889
+ return _regeneratorRuntime.wrap(function _callee68$(_context68) {
11773
11890
  while (1) {
11774
- switch (_context65.prev = _context65.next) {
11891
+ switch (_context68.prev = _context68.next) {
11775
11892
  case 0:
11776
11893
  this.validateServerSideAuth();
11777
11894
  body = _objectSpread({
11778
11895
  id: id,
11779
11896
  type: type
11780
11897
  }, data);
11781
- return _context65.abrupt("return", this.post(this.baseURL + "/segments", body));
11898
+ return _context68.abrupt("return", this.post(this.baseURL + "/segments", body));
11782
11899
 
11783
11900
  case 3:
11784
11901
  case "end":
11785
- return _context65.stop();
11902
+ return _context68.stop();
11786
11903
  }
11787
11904
  }
11788
- }, _callee65, this);
11905
+ }, _callee68, this);
11789
11906
  }));
11790
11907
 
11791
- function createSegment(_x89, _x90, _x91) {
11908
+ function createSegment(_x94, _x95, _x96) {
11792
11909
  return _createSegment.apply(this, arguments);
11793
11910
  }
11794
11911
 
@@ -11807,23 +11924,23 @@ var StreamChat = /*#__PURE__*/function () {
11807
11924
  }, {
11808
11925
  key: "createUserSegment",
11809
11926
  value: function () {
11810
- var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id, data) {
11811
- return _regeneratorRuntime.wrap(function _callee66$(_context66) {
11927
+ var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id, data) {
11928
+ return _regeneratorRuntime.wrap(function _callee69$(_context69) {
11812
11929
  while (1) {
11813
- switch (_context66.prev = _context66.next) {
11930
+ switch (_context69.prev = _context69.next) {
11814
11931
  case 0:
11815
11932
  this.validateServerSideAuth();
11816
- return _context66.abrupt("return", this.createSegment('user', id, data));
11933
+ return _context69.abrupt("return", this.createSegment('user', id, data));
11817
11934
 
11818
11935
  case 2:
11819
11936
  case "end":
11820
- return _context66.stop();
11937
+ return _context69.stop();
11821
11938
  }
11822
11939
  }
11823
- }, _callee66, this);
11940
+ }, _callee69, this);
11824
11941
  }));
11825
11942
 
11826
- function createUserSegment(_x92, _x93) {
11943
+ function createUserSegment(_x97, _x98) {
11827
11944
  return _createUserSegment.apply(this, arguments);
11828
11945
  }
11829
11946
 
@@ -11842,23 +11959,23 @@ var StreamChat = /*#__PURE__*/function () {
11842
11959
  }, {
11843
11960
  key: "createChannelSegment",
11844
11961
  value: function () {
11845
- var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id, data) {
11846
- return _regeneratorRuntime.wrap(function _callee67$(_context67) {
11962
+ var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(id, data) {
11963
+ return _regeneratorRuntime.wrap(function _callee70$(_context70) {
11847
11964
  while (1) {
11848
- switch (_context67.prev = _context67.next) {
11965
+ switch (_context70.prev = _context70.next) {
11849
11966
  case 0:
11850
11967
  this.validateServerSideAuth();
11851
- return _context67.abrupt("return", this.createSegment('channel', id, data));
11968
+ return _context70.abrupt("return", this.createSegment('channel', id, data));
11852
11969
 
11853
11970
  case 2:
11854
11971
  case "end":
11855
- return _context67.stop();
11972
+ return _context70.stop();
11856
11973
  }
11857
11974
  }
11858
- }, _callee67, this);
11975
+ }, _callee70, this);
11859
11976
  }));
11860
11977
 
11861
- function createChannelSegment(_x94, _x95) {
11978
+ function createChannelSegment(_x99, _x100) {
11862
11979
  return _createChannelSegment.apply(this, arguments);
11863
11980
  }
11864
11981
 
@@ -11867,23 +11984,23 @@ var StreamChat = /*#__PURE__*/function () {
11867
11984
  }, {
11868
11985
  key: "getSegment",
11869
11986
  value: function () {
11870
- var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(id) {
11871
- return _regeneratorRuntime.wrap(function _callee68$(_context68) {
11987
+ var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id) {
11988
+ return _regeneratorRuntime.wrap(function _callee71$(_context71) {
11872
11989
  while (1) {
11873
- switch (_context68.prev = _context68.next) {
11990
+ switch (_context71.prev = _context71.next) {
11874
11991
  case 0:
11875
11992
  this.validateServerSideAuth();
11876
- return _context68.abrupt("return", this.get(this.baseURL + "/segments/".concat(id)));
11993
+ return _context71.abrupt("return", this.get(this.baseURL + "/segments/".concat(id)));
11877
11994
 
11878
11995
  case 2:
11879
11996
  case "end":
11880
- return _context68.stop();
11997
+ return _context71.stop();
11881
11998
  }
11882
11999
  }
11883
- }, _callee68, this);
12000
+ }, _callee71, this);
11884
12001
  }));
11885
12002
 
11886
- function getSegment(_x96) {
12003
+ function getSegment(_x101) {
11887
12004
  return _getSegment.apply(this, arguments);
11888
12005
  }
11889
12006
 
@@ -11901,23 +12018,23 @@ var StreamChat = /*#__PURE__*/function () {
11901
12018
  }, {
11902
12019
  key: "updateSegment",
11903
12020
  value: function () {
11904
- var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id, data) {
11905
- return _regeneratorRuntime.wrap(function _callee69$(_context69) {
12021
+ var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id, data) {
12022
+ return _regeneratorRuntime.wrap(function _callee72$(_context72) {
11906
12023
  while (1) {
11907
- switch (_context69.prev = _context69.next) {
12024
+ switch (_context72.prev = _context72.next) {
11908
12025
  case 0:
11909
12026
  this.validateServerSideAuth();
11910
- return _context69.abrupt("return", this.put(this.baseURL + "/segments/".concat(id), data));
12027
+ return _context72.abrupt("return", this.put(this.baseURL + "/segments/".concat(id), data));
11911
12028
 
11912
12029
  case 2:
11913
12030
  case "end":
11914
- return _context69.stop();
12031
+ return _context72.stop();
11915
12032
  }
11916
12033
  }
11917
- }, _callee69, this);
12034
+ }, _callee72, this);
11918
12035
  }));
11919
12036
 
11920
- function updateSegment(_x97, _x98) {
12037
+ function updateSegment(_x102, _x103) {
11921
12038
  return _updateSegment.apply(this, arguments);
11922
12039
  }
11923
12040
 
@@ -11935,27 +12052,27 @@ var StreamChat = /*#__PURE__*/function () {
11935
12052
  }, {
11936
12053
  key: "addSegmentTargets",
11937
12054
  value: function () {
11938
- var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(id, targets) {
12055
+ var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id, targets) {
11939
12056
  var body;
11940
- return _regeneratorRuntime.wrap(function _callee70$(_context70) {
12057
+ return _regeneratorRuntime.wrap(function _callee73$(_context73) {
11941
12058
  while (1) {
11942
- switch (_context70.prev = _context70.next) {
12059
+ switch (_context73.prev = _context73.next) {
11943
12060
  case 0:
11944
12061
  this.validateServerSideAuth();
11945
12062
  body = {
11946
12063
  target_ids: targets
11947
12064
  };
11948
- return _context70.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/addtargets"), body));
12065
+ return _context73.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/addtargets"), body));
11949
12066
 
11950
12067
  case 3:
11951
12068
  case "end":
11952
- return _context70.stop();
12069
+ return _context73.stop();
11953
12070
  }
11954
12071
  }
11955
- }, _callee70, this);
12072
+ }, _callee73, this);
11956
12073
  }));
11957
12074
 
11958
- function addSegmentTargets(_x99, _x100) {
12075
+ function addSegmentTargets(_x104, _x105) {
11959
12076
  return _addSegmentTargets.apply(this, arguments);
11960
12077
  }
11961
12078
 
@@ -11964,33 +12081,33 @@ var StreamChat = /*#__PURE__*/function () {
11964
12081
  }, {
11965
12082
  key: "querySegmentTargets",
11966
12083
  value: function () {
11967
- var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id) {
12084
+ var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(id) {
11968
12085
  var filter,
11969
12086
  sort,
11970
12087
  options,
11971
- _args71 = arguments;
11972
- return _regeneratorRuntime.wrap(function _callee71$(_context71) {
12088
+ _args74 = arguments;
12089
+ return _regeneratorRuntime.wrap(function _callee74$(_context74) {
11973
12090
  while (1) {
11974
- switch (_context71.prev = _context71.next) {
12091
+ switch (_context74.prev = _context74.next) {
11975
12092
  case 0:
11976
- filter = _args71.length > 1 && _args71[1] !== undefined ? _args71[1] : {};
11977
- sort = _args71.length > 2 && _args71[2] !== undefined ? _args71[2] : [];
11978
- options = _args71.length > 3 && _args71[3] !== undefined ? _args71[3] : {};
12093
+ filter = _args74.length > 1 && _args74[1] !== undefined ? _args74[1] : {};
12094
+ sort = _args74.length > 2 && _args74[2] !== undefined ? _args74[2] : [];
12095
+ options = _args74.length > 3 && _args74[3] !== undefined ? _args74[3] : {};
11979
12096
  this.validateServerSideAuth();
11980
- return _context71.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/targets/query"), _objectSpread({
12097
+ return _context74.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/targets/query"), _objectSpread({
11981
12098
  filter: filter || {},
11982
12099
  sort: sort || []
11983
12100
  }, options)));
11984
12101
 
11985
12102
  case 5:
11986
12103
  case "end":
11987
- return _context71.stop();
12104
+ return _context74.stop();
11988
12105
  }
11989
12106
  }
11990
- }, _callee71, this);
12107
+ }, _callee74, this);
11991
12108
  }));
11992
12109
 
11993
- function querySegmentTargets(_x101) {
12110
+ function querySegmentTargets(_x106) {
11994
12111
  return _querySegmentTargets.apply(this, arguments);
11995
12112
  }
11996
12113
 
@@ -12008,27 +12125,27 @@ var StreamChat = /*#__PURE__*/function () {
12008
12125
  }, {
12009
12126
  key: "removeSegmentTargets",
12010
12127
  value: function () {
12011
- var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id, targets) {
12128
+ var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(id, targets) {
12012
12129
  var body;
12013
- return _regeneratorRuntime.wrap(function _callee72$(_context72) {
12130
+ return _regeneratorRuntime.wrap(function _callee75$(_context75) {
12014
12131
  while (1) {
12015
- switch (_context72.prev = _context72.next) {
12132
+ switch (_context75.prev = _context75.next) {
12016
12133
  case 0:
12017
12134
  this.validateServerSideAuth();
12018
12135
  body = {
12019
12136
  target_ids: targets
12020
12137
  };
12021
- return _context72.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/deletetargets"), body));
12138
+ return _context75.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/deletetargets"), body));
12022
12139
 
12023
12140
  case 3:
12024
12141
  case "end":
12025
- return _context72.stop();
12142
+ return _context75.stop();
12026
12143
  }
12027
12144
  }
12028
- }, _callee72, this);
12145
+ }, _callee75, this);
12029
12146
  }));
12030
12147
 
12031
- function removeSegmentTargets(_x102, _x103) {
12148
+ function removeSegmentTargets(_x107, _x108) {
12032
12149
  return _removeSegmentTargets.apply(this, arguments);
12033
12150
  }
12034
12151
 
@@ -12046,29 +12163,29 @@ var StreamChat = /*#__PURE__*/function () {
12046
12163
  }, {
12047
12164
  key: "querySegments",
12048
12165
  value: function () {
12049
- var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(filter, sort) {
12166
+ var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(filter, sort) {
12050
12167
  var options,
12051
- _args73 = arguments;
12052
- return _regeneratorRuntime.wrap(function _callee73$(_context73) {
12168
+ _args76 = arguments;
12169
+ return _regeneratorRuntime.wrap(function _callee76$(_context76) {
12053
12170
  while (1) {
12054
- switch (_context73.prev = _context73.next) {
12171
+ switch (_context76.prev = _context76.next) {
12055
12172
  case 0:
12056
- options = _args73.length > 2 && _args73[2] !== undefined ? _args73[2] : {};
12173
+ options = _args76.length > 2 && _args76[2] !== undefined ? _args76[2] : {};
12057
12174
  this.validateServerSideAuth();
12058
- return _context73.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
12175
+ return _context76.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
12059
12176
  filter: filter,
12060
12177
  sort: sort
12061
12178
  }, options)));
12062
12179
 
12063
12180
  case 3:
12064
12181
  case "end":
12065
- return _context73.stop();
12182
+ return _context76.stop();
12066
12183
  }
12067
12184
  }
12068
- }, _callee73, this);
12185
+ }, _callee76, this);
12069
12186
  }));
12070
12187
 
12071
- function querySegments(_x104, _x105) {
12188
+ function querySegments(_x109, _x110) {
12072
12189
  return _querySegments.apply(this, arguments);
12073
12190
  }
12074
12191
 
@@ -12085,23 +12202,23 @@ var StreamChat = /*#__PURE__*/function () {
12085
12202
  }, {
12086
12203
  key: "deleteSegment",
12087
12204
  value: function () {
12088
- var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(id) {
12089
- return _regeneratorRuntime.wrap(function _callee74$(_context74) {
12205
+ var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(id) {
12206
+ return _regeneratorRuntime.wrap(function _callee77$(_context77) {
12090
12207
  while (1) {
12091
- switch (_context74.prev = _context74.next) {
12208
+ switch (_context77.prev = _context77.next) {
12092
12209
  case 0:
12093
12210
  this.validateServerSideAuth();
12094
- return _context74.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
12211
+ return _context77.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
12095
12212
 
12096
12213
  case 2:
12097
12214
  case "end":
12098
- return _context74.stop();
12215
+ return _context77.stop();
12099
12216
  }
12100
12217
  }
12101
- }, _callee74, this);
12218
+ }, _callee77, this);
12102
12219
  }));
12103
12220
 
12104
- function deleteSegment(_x106) {
12221
+ function deleteSegment(_x111) {
12105
12222
  return _deleteSegment.apply(this, arguments);
12106
12223
  }
12107
12224
 
@@ -12119,23 +12236,23 @@ var StreamChat = /*#__PURE__*/function () {
12119
12236
  }, {
12120
12237
  key: "segmentTargetExists",
12121
12238
  value: function () {
12122
- var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(segmentId, targetId) {
12123
- return _regeneratorRuntime.wrap(function _callee75$(_context75) {
12239
+ var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(segmentId, targetId) {
12240
+ return _regeneratorRuntime.wrap(function _callee78$(_context78) {
12124
12241
  while (1) {
12125
- switch (_context75.prev = _context75.next) {
12242
+ switch (_context78.prev = _context78.next) {
12126
12243
  case 0:
12127
12244
  this.validateServerSideAuth();
12128
- return _context75.abrupt("return", this.get(this.baseURL + "/segments/".concat(segmentId, "/target/").concat(targetId)));
12245
+ return _context78.abrupt("return", this.get(this.baseURL + "/segments/".concat(segmentId, "/target/").concat(targetId)));
12129
12246
 
12130
12247
  case 2:
12131
12248
  case "end":
12132
- return _context75.stop();
12249
+ return _context78.stop();
12133
12250
  }
12134
12251
  }
12135
- }, _callee75, this);
12252
+ }, _callee78, this);
12136
12253
  }));
12137
12254
 
12138
- function segmentTargetExists(_x107, _x108) {
12255
+ function segmentTargetExists(_x112, _x113) {
12139
12256
  return _segmentTargetExists.apply(this, arguments);
12140
12257
  }
12141
12258
 
@@ -12152,23 +12269,23 @@ var StreamChat = /*#__PURE__*/function () {
12152
12269
  }, {
12153
12270
  key: "createCampaign",
12154
12271
  value: function () {
12155
- var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(params) {
12156
- return _regeneratorRuntime.wrap(function _callee76$(_context76) {
12272
+ var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(params) {
12273
+ return _regeneratorRuntime.wrap(function _callee79$(_context79) {
12157
12274
  while (1) {
12158
- switch (_context76.prev = _context76.next) {
12275
+ switch (_context79.prev = _context79.next) {
12159
12276
  case 0:
12160
12277
  this.validateServerSideAuth();
12161
- return _context76.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
12278
+ return _context79.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
12162
12279
 
12163
12280
  case 2:
12164
12281
  case "end":
12165
- return _context76.stop();
12282
+ return _context79.stop();
12166
12283
  }
12167
12284
  }
12168
- }, _callee76, this);
12285
+ }, _callee79, this);
12169
12286
  }));
12170
12287
 
12171
- function createCampaign(_x109) {
12288
+ function createCampaign(_x114) {
12172
12289
  return _createCampaign.apply(this, arguments);
12173
12290
  }
12174
12291
 
@@ -12177,23 +12294,23 @@ var StreamChat = /*#__PURE__*/function () {
12177
12294
  }, {
12178
12295
  key: "getCampaign",
12179
12296
  value: function () {
12180
- var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(id) {
12181
- return _regeneratorRuntime.wrap(function _callee77$(_context77) {
12297
+ var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(id) {
12298
+ return _regeneratorRuntime.wrap(function _callee80$(_context80) {
12182
12299
  while (1) {
12183
- switch (_context77.prev = _context77.next) {
12300
+ switch (_context80.prev = _context80.next) {
12184
12301
  case 0:
12185
12302
  this.validateServerSideAuth();
12186
- return _context77.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(id)));
12303
+ return _context80.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(id)));
12187
12304
 
12188
12305
  case 2:
12189
12306
  case "end":
12190
- return _context77.stop();
12307
+ return _context80.stop();
12191
12308
  }
12192
12309
  }
12193
- }, _callee77, this);
12310
+ }, _callee80, this);
12194
12311
  }));
12195
12312
 
12196
- function getCampaign(_x110) {
12313
+ function getCampaign(_x115) {
12197
12314
  return _getCampaign.apply(this, arguments);
12198
12315
  }
12199
12316
 
@@ -12202,26 +12319,26 @@ var StreamChat = /*#__PURE__*/function () {
12202
12319
  }, {
12203
12320
  key: "startCampaign",
12204
12321
  value: function () {
12205
- var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(id, options) {
12206
- return _regeneratorRuntime.wrap(function _callee78$(_context78) {
12322
+ var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(id, options) {
12323
+ return _regeneratorRuntime.wrap(function _callee81$(_context81) {
12207
12324
  while (1) {
12208
- switch (_context78.prev = _context78.next) {
12325
+ switch (_context81.prev = _context81.next) {
12209
12326
  case 0:
12210
12327
  this.validateServerSideAuth();
12211
- return _context78.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/start"), {
12328
+ return _context81.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/start"), {
12212
12329
  scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
12213
12330
  stop_at: options === null || options === void 0 ? void 0 : options.stopAt
12214
12331
  }));
12215
12332
 
12216
12333
  case 2:
12217
12334
  case "end":
12218
- return _context78.stop();
12335
+ return _context81.stop();
12219
12336
  }
12220
12337
  }
12221
- }, _callee78, this);
12338
+ }, _callee81, this);
12222
12339
  }));
12223
12340
 
12224
- function startCampaign(_x111, _x112) {
12341
+ function startCampaign(_x116, _x117) {
12225
12342
  return _startCampaign.apply(this, arguments);
12226
12343
  }
12227
12344
 
@@ -12237,30 +12354,30 @@ var StreamChat = /*#__PURE__*/function () {
12237
12354
  }, {
12238
12355
  key: "queryCampaigns",
12239
12356
  value: function () {
12240
- var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(filter, sort, options) {
12241
- return _regeneratorRuntime.wrap(function _callee79$(_context79) {
12357
+ var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(filter, sort, options) {
12358
+ return _regeneratorRuntime.wrap(function _callee82$(_context82) {
12242
12359
  while (1) {
12243
- switch (_context79.prev = _context79.next) {
12360
+ switch (_context82.prev = _context82.next) {
12244
12361
  case 0:
12245
12362
  this.validateServerSideAuth();
12246
- _context79.next = 3;
12363
+ _context82.next = 3;
12247
12364
  return this.post(this.baseURL + "/campaigns/query", _objectSpread({
12248
12365
  filter: filter,
12249
12366
  sort: sort
12250
12367
  }, options || {}));
12251
12368
 
12252
12369
  case 3:
12253
- return _context79.abrupt("return", _context79.sent);
12370
+ return _context82.abrupt("return", _context82.sent);
12254
12371
 
12255
12372
  case 4:
12256
12373
  case "end":
12257
- return _context79.stop();
12374
+ return _context82.stop();
12258
12375
  }
12259
12376
  }
12260
- }, _callee79, this);
12377
+ }, _callee82, this);
12261
12378
  }));
12262
12379
 
12263
- function queryCampaigns(_x113, _x114, _x115) {
12380
+ function queryCampaigns(_x118, _x119, _x120) {
12264
12381
  return _queryCampaigns.apply(this, arguments);
12265
12382
  }
12266
12383
 
@@ -12278,23 +12395,23 @@ var StreamChat = /*#__PURE__*/function () {
12278
12395
  }, {
12279
12396
  key: "updateCampaign",
12280
12397
  value: function () {
12281
- var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(id, params) {
12282
- return _regeneratorRuntime.wrap(function _callee80$(_context80) {
12398
+ var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(id, params) {
12399
+ return _regeneratorRuntime.wrap(function _callee83$(_context83) {
12283
12400
  while (1) {
12284
- switch (_context80.prev = _context80.next) {
12401
+ switch (_context83.prev = _context83.next) {
12285
12402
  case 0:
12286
12403
  this.validateServerSideAuth();
12287
- return _context80.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(id), params));
12404
+ return _context83.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(id), params));
12288
12405
 
12289
12406
  case 2:
12290
12407
  case "end":
12291
- return _context80.stop();
12408
+ return _context83.stop();
12292
12409
  }
12293
12410
  }
12294
- }, _callee80, this);
12411
+ }, _callee83, this);
12295
12412
  }));
12296
12413
 
12297
- function updateCampaign(_x116, _x117) {
12414
+ function updateCampaign(_x121, _x122) {
12298
12415
  return _updateCampaign.apply(this, arguments);
12299
12416
  }
12300
12417
 
@@ -12311,23 +12428,23 @@ var StreamChat = /*#__PURE__*/function () {
12311
12428
  }, {
12312
12429
  key: "deleteCampaign",
12313
12430
  value: function () {
12314
- var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(id) {
12315
- return _regeneratorRuntime.wrap(function _callee81$(_context81) {
12431
+ var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(id) {
12432
+ return _regeneratorRuntime.wrap(function _callee84$(_context84) {
12316
12433
  while (1) {
12317
- switch (_context81.prev = _context81.next) {
12434
+ switch (_context84.prev = _context84.next) {
12318
12435
  case 0:
12319
12436
  this.validateServerSideAuth();
12320
- return _context81.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
12437
+ return _context84.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
12321
12438
 
12322
12439
  case 2:
12323
12440
  case "end":
12324
- return _context81.stop();
12441
+ return _context84.stop();
12325
12442
  }
12326
12443
  }
12327
- }, _callee81, this);
12444
+ }, _callee84, this);
12328
12445
  }));
12329
12446
 
12330
- function deleteCampaign(_x118) {
12447
+ function deleteCampaign(_x123) {
12331
12448
  return _deleteCampaign.apply(this, arguments);
12332
12449
  }
12333
12450
 
@@ -12344,23 +12461,23 @@ var StreamChat = /*#__PURE__*/function () {
12344
12461
  }, {
12345
12462
  key: "stopCampaign",
12346
12463
  value: function () {
12347
- var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(id) {
12348
- return _regeneratorRuntime.wrap(function _callee82$(_context82) {
12464
+ var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(id) {
12465
+ return _regeneratorRuntime.wrap(function _callee85$(_context85) {
12349
12466
  while (1) {
12350
- switch (_context82.prev = _context82.next) {
12467
+ switch (_context85.prev = _context85.next) {
12351
12468
  case 0:
12352
12469
  this.validateServerSideAuth();
12353
- return _context82.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/stop")));
12470
+ return _context85.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/stop")));
12354
12471
 
12355
12472
  case 2:
12356
12473
  case "end":
12357
- return _context82.stop();
12474
+ return _context85.stop();
12358
12475
  }
12359
12476
  }
12360
- }, _callee82, this);
12477
+ }, _callee85, this);
12361
12478
  }));
12362
12479
 
12363
- function stopCampaign(_x119) {
12480
+ function stopCampaign(_x124) {
12364
12481
  return _stopCampaign.apply(this, arguments);
12365
12482
  }
12366
12483
 
@@ -12376,24 +12493,24 @@ var StreamChat = /*#__PURE__*/function () {
12376
12493
  }, {
12377
12494
  key: "enrichURL",
12378
12495
  value: function () {
12379
- var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(url) {
12380
- return _regeneratorRuntime.wrap(function _callee83$(_context83) {
12496
+ var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(url) {
12497
+ return _regeneratorRuntime.wrap(function _callee86$(_context86) {
12381
12498
  while (1) {
12382
- switch (_context83.prev = _context83.next) {
12499
+ switch (_context86.prev = _context86.next) {
12383
12500
  case 0:
12384
- return _context83.abrupt("return", this.get(this.baseURL + "/og", {
12501
+ return _context86.abrupt("return", this.get(this.baseURL + "/og", {
12385
12502
  url: url
12386
12503
  }));
12387
12504
 
12388
12505
  case 1:
12389
12506
  case "end":
12390
- return _context83.stop();
12507
+ return _context86.stop();
12391
12508
  }
12392
12509
  }
12393
- }, _callee83, this);
12510
+ }, _callee86, this);
12394
12511
  }));
12395
12512
 
12396
- function enrichURL(_x120) {
12513
+ function enrichURL(_x125) {
12397
12514
  return _enrichURL.apply(this, arguments);
12398
12515
  }
12399
12516
 
@@ -12410,22 +12527,22 @@ var StreamChat = /*#__PURE__*/function () {
12410
12527
  }, {
12411
12528
  key: "getTask",
12412
12529
  value: function () {
12413
- var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(id) {
12414
- return _regeneratorRuntime.wrap(function _callee84$(_context84) {
12530
+ var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87(id) {
12531
+ return _regeneratorRuntime.wrap(function _callee87$(_context87) {
12415
12532
  while (1) {
12416
- switch (_context84.prev = _context84.next) {
12533
+ switch (_context87.prev = _context87.next) {
12417
12534
  case 0:
12418
- return _context84.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
12535
+ return _context87.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
12419
12536
 
12420
12537
  case 1:
12421
12538
  case "end":
12422
- return _context84.stop();
12539
+ return _context87.stop();
12423
12540
  }
12424
12541
  }
12425
- }, _callee84, this);
12542
+ }, _callee87, this);
12426
12543
  }));
12427
12544
 
12428
- function getTask(_x121) {
12545
+ function getTask(_x126) {
12429
12546
  return _getTask.apply(this, arguments);
12430
12547
  }
12431
12548
 
@@ -12443,31 +12560,31 @@ var StreamChat = /*#__PURE__*/function () {
12443
12560
  }, {
12444
12561
  key: "deleteChannels",
12445
12562
  value: function () {
12446
- var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(cids) {
12563
+ var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(cids) {
12447
12564
  var options,
12448
- _args85 = arguments;
12449
- return _regeneratorRuntime.wrap(function _callee85$(_context85) {
12565
+ _args88 = arguments;
12566
+ return _regeneratorRuntime.wrap(function _callee88$(_context88) {
12450
12567
  while (1) {
12451
- switch (_context85.prev = _context85.next) {
12568
+ switch (_context88.prev = _context88.next) {
12452
12569
  case 0:
12453
- options = _args85.length > 1 && _args85[1] !== undefined ? _args85[1] : {};
12454
- _context85.next = 3;
12570
+ options = _args88.length > 1 && _args88[1] !== undefined ? _args88[1] : {};
12571
+ _context88.next = 3;
12455
12572
  return this.post(this.baseURL + "/channels/delete", _objectSpread({
12456
12573
  cids: cids
12457
12574
  }, options));
12458
12575
 
12459
12576
  case 3:
12460
- return _context85.abrupt("return", _context85.sent);
12577
+ return _context88.abrupt("return", _context88.sent);
12461
12578
 
12462
12579
  case 4:
12463
12580
  case "end":
12464
- return _context85.stop();
12581
+ return _context88.stop();
12465
12582
  }
12466
12583
  }
12467
- }, _callee85, this);
12584
+ }, _callee88, this);
12468
12585
  }));
12469
12586
 
12470
- function deleteChannels(_x122) {
12587
+ function deleteChannels(_x127) {
12471
12588
  return _deleteChannels.apply(this, arguments);
12472
12589
  }
12473
12590
 
@@ -12485,17 +12602,17 @@ var StreamChat = /*#__PURE__*/function () {
12485
12602
  }, {
12486
12603
  key: "deleteUsers",
12487
12604
  value: function () {
12488
- var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(user_ids) {
12605
+ var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee89(user_ids) {
12489
12606
  var options,
12490
- _args86 = arguments;
12491
- return _regeneratorRuntime.wrap(function _callee86$(_context86) {
12607
+ _args89 = arguments;
12608
+ return _regeneratorRuntime.wrap(function _callee89$(_context89) {
12492
12609
  while (1) {
12493
- switch (_context86.prev = _context86.next) {
12610
+ switch (_context89.prev = _context89.next) {
12494
12611
  case 0:
12495
- options = _args86.length > 1 && _args86[1] !== undefined ? _args86[1] : {};
12612
+ options = _args89.length > 1 && _args89[1] !== undefined ? _args89[1] : {};
12496
12613
 
12497
12614
  if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
12498
- _context86.next = 3;
12615
+ _context89.next = 3;
12499
12616
  break;
12500
12617
  }
12501
12618
 
@@ -12503,7 +12620,7 @@ var StreamChat = /*#__PURE__*/function () {
12503
12620
 
12504
12621
  case 3:
12505
12622
  if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
12506
- _context86.next = 5;
12623
+ _context89.next = 5;
12507
12624
  break;
12508
12625
  }
12509
12626
 
@@ -12511,30 +12628,30 @@ var StreamChat = /*#__PURE__*/function () {
12511
12628
 
12512
12629
  case 5:
12513
12630
  if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
12514
- _context86.next = 7;
12631
+ _context89.next = 7;
12515
12632
  break;
12516
12633
  }
12517
12634
 
12518
12635
  throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
12519
12636
 
12520
12637
  case 7:
12521
- _context86.next = 9;
12638
+ _context89.next = 9;
12522
12639
  return this.post(this.baseURL + "/users/delete", _objectSpread({
12523
12640
  user_ids: user_ids
12524
12641
  }, options));
12525
12642
 
12526
12643
  case 9:
12527
- return _context86.abrupt("return", _context86.sent);
12644
+ return _context89.abrupt("return", _context89.sent);
12528
12645
 
12529
12646
  case 10:
12530
12647
  case "end":
12531
- return _context86.stop();
12648
+ return _context89.stop();
12532
12649
  }
12533
12650
  }
12534
- }, _callee86, this);
12651
+ }, _callee89, this);
12535
12652
  }));
12536
12653
 
12537
- function deleteUsers(_x123) {
12654
+ function deleteUsers(_x128) {
12538
12655
  return _deleteUsers.apply(this, arguments);
12539
12656
  }
12540
12657
 
@@ -12555,28 +12672,28 @@ var StreamChat = /*#__PURE__*/function () {
12555
12672
  }, {
12556
12673
  key: "_createImportURL",
12557
12674
  value: function () {
12558
- var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87(filename) {
12559
- return _regeneratorRuntime.wrap(function _callee87$(_context87) {
12675
+ var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee90(filename) {
12676
+ return _regeneratorRuntime.wrap(function _callee90$(_context90) {
12560
12677
  while (1) {
12561
- switch (_context87.prev = _context87.next) {
12678
+ switch (_context90.prev = _context90.next) {
12562
12679
  case 0:
12563
- _context87.next = 2;
12680
+ _context90.next = 2;
12564
12681
  return this.post(this.baseURL + "/import_urls", {
12565
12682
  filename: filename
12566
12683
  });
12567
12684
 
12568
12685
  case 2:
12569
- return _context87.abrupt("return", _context87.sent);
12686
+ return _context90.abrupt("return", _context90.sent);
12570
12687
 
12571
12688
  case 3:
12572
12689
  case "end":
12573
- return _context87.stop();
12690
+ return _context90.stop();
12574
12691
  }
12575
12692
  }
12576
- }, _callee87, this);
12693
+ }, _callee90, this);
12577
12694
  }));
12578
12695
 
12579
- function _createImportURL(_x124) {
12696
+ function _createImportURL(_x129) {
12580
12697
  return _createImportURL2.apply(this, arguments);
12581
12698
  }
12582
12699
 
@@ -12598,33 +12715,33 @@ var StreamChat = /*#__PURE__*/function () {
12598
12715
  }, {
12599
12716
  key: "_createImport",
12600
12717
  value: function () {
12601
- var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(path) {
12718
+ var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee91(path) {
12602
12719
  var options,
12603
- _args88 = arguments;
12604
- return _regeneratorRuntime.wrap(function _callee88$(_context88) {
12720
+ _args91 = arguments;
12721
+ return _regeneratorRuntime.wrap(function _callee91$(_context91) {
12605
12722
  while (1) {
12606
- switch (_context88.prev = _context88.next) {
12723
+ switch (_context91.prev = _context91.next) {
12607
12724
  case 0:
12608
- options = _args88.length > 1 && _args88[1] !== undefined ? _args88[1] : {
12725
+ options = _args91.length > 1 && _args91[1] !== undefined ? _args91[1] : {
12609
12726
  mode: 'upsert'
12610
12727
  };
12611
- _context88.next = 3;
12728
+ _context91.next = 3;
12612
12729
  return this.post(this.baseURL + "/imports", _objectSpread({
12613
12730
  path: path
12614
12731
  }, options));
12615
12732
 
12616
12733
  case 3:
12617
- return _context88.abrupt("return", _context88.sent);
12734
+ return _context91.abrupt("return", _context91.sent);
12618
12735
 
12619
12736
  case 4:
12620
12737
  case "end":
12621
- return _context88.stop();
12738
+ return _context91.stop();
12622
12739
  }
12623
12740
  }
12624
- }, _callee88, this);
12741
+ }, _callee91, this);
12625
12742
  }));
12626
12743
 
12627
- function _createImport(_x125) {
12744
+ function _createImport(_x130) {
12628
12745
  return _createImport2.apply(this, arguments);
12629
12746
  }
12630
12747
 
@@ -12646,26 +12763,26 @@ var StreamChat = /*#__PURE__*/function () {
12646
12763
  }, {
12647
12764
  key: "_getImport",
12648
12765
  value: function () {
12649
- var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee89(id) {
12650
- return _regeneratorRuntime.wrap(function _callee89$(_context89) {
12766
+ var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee92(id) {
12767
+ return _regeneratorRuntime.wrap(function _callee92$(_context92) {
12651
12768
  while (1) {
12652
- switch (_context89.prev = _context89.next) {
12769
+ switch (_context92.prev = _context92.next) {
12653
12770
  case 0:
12654
- _context89.next = 2;
12771
+ _context92.next = 2;
12655
12772
  return this.get(this.baseURL + "/imports/".concat(id));
12656
12773
 
12657
12774
  case 2:
12658
- return _context89.abrupt("return", _context89.sent);
12775
+ return _context92.abrupt("return", _context92.sent);
12659
12776
 
12660
12777
  case 3:
12661
12778
  case "end":
12662
- return _context89.stop();
12779
+ return _context92.stop();
12663
12780
  }
12664
12781
  }
12665
- }, _callee89, this);
12782
+ }, _callee92, this);
12666
12783
  }));
12667
12784
 
12668
- function _getImport(_x126) {
12785
+ function _getImport(_x131) {
12669
12786
  return _getImport2.apply(this, arguments);
12670
12787
  }
12671
12788
 
@@ -12687,26 +12804,26 @@ var StreamChat = /*#__PURE__*/function () {
12687
12804
  }, {
12688
12805
  key: "_listImports",
12689
12806
  value: function () {
12690
- var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee90(options) {
12691
- return _regeneratorRuntime.wrap(function _callee90$(_context90) {
12807
+ var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee93(options) {
12808
+ return _regeneratorRuntime.wrap(function _callee93$(_context93) {
12692
12809
  while (1) {
12693
- switch (_context90.prev = _context90.next) {
12810
+ switch (_context93.prev = _context93.next) {
12694
12811
  case 0:
12695
- _context90.next = 2;
12812
+ _context93.next = 2;
12696
12813
  return this.get(this.baseURL + "/imports", options);
12697
12814
 
12698
12815
  case 2:
12699
- return _context90.abrupt("return", _context90.sent);
12816
+ return _context93.abrupt("return", _context93.sent);
12700
12817
 
12701
12818
  case 3:
12702
12819
  case "end":
12703
- return _context90.stop();
12820
+ return _context93.stop();
12704
12821
  }
12705
12822
  }
12706
- }, _callee90, this);
12823
+ }, _callee93, this);
12707
12824
  }));
12708
12825
 
12709
- function _listImports(_x127) {
12826
+ function _listImports(_x132) {
12710
12827
  return _listImports2.apply(this, arguments);
12711
12828
  }
12712
12829
 
@@ -12725,28 +12842,28 @@ var StreamChat = /*#__PURE__*/function () {
12725
12842
  }, {
12726
12843
  key: "upsertPushProvider",
12727
12844
  value: function () {
12728
- var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee91(pushProvider) {
12729
- return _regeneratorRuntime.wrap(function _callee91$(_context91) {
12845
+ var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee94(pushProvider) {
12846
+ return _regeneratorRuntime.wrap(function _callee94$(_context94) {
12730
12847
  while (1) {
12731
- switch (_context91.prev = _context91.next) {
12848
+ switch (_context94.prev = _context94.next) {
12732
12849
  case 0:
12733
- _context91.next = 2;
12850
+ _context94.next = 2;
12734
12851
  return this.post(this.baseURL + "/push_providers", {
12735
12852
  push_provider: pushProvider
12736
12853
  });
12737
12854
 
12738
12855
  case 2:
12739
- return _context91.abrupt("return", _context91.sent);
12856
+ return _context94.abrupt("return", _context94.sent);
12740
12857
 
12741
12858
  case 3:
12742
12859
  case "end":
12743
- return _context91.stop();
12860
+ return _context94.stop();
12744
12861
  }
12745
12862
  }
12746
- }, _callee91, this);
12863
+ }, _callee94, this);
12747
12864
  }));
12748
12865
 
12749
- function upsertPushProvider(_x128) {
12866
+ function upsertPushProvider(_x133) {
12750
12867
  return _upsertPushProvider.apply(this, arguments);
12751
12868
  }
12752
12869
 
@@ -12765,28 +12882,28 @@ var StreamChat = /*#__PURE__*/function () {
12765
12882
  }, {
12766
12883
  key: "deletePushProvider",
12767
12884
  value: function () {
12768
- var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee92(_ref10) {
12885
+ var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee95(_ref10) {
12769
12886
  var type, name;
12770
- return _regeneratorRuntime.wrap(function _callee92$(_context92) {
12887
+ return _regeneratorRuntime.wrap(function _callee95$(_context95) {
12771
12888
  while (1) {
12772
- switch (_context92.prev = _context92.next) {
12889
+ switch (_context95.prev = _context95.next) {
12773
12890
  case 0:
12774
12891
  type = _ref10.type, name = _ref10.name;
12775
- _context92.next = 3;
12892
+ _context95.next = 3;
12776
12893
  return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
12777
12894
 
12778
12895
  case 3:
12779
- return _context92.abrupt("return", _context92.sent);
12896
+ return _context95.abrupt("return", _context95.sent);
12780
12897
 
12781
12898
  case 4:
12782
12899
  case "end":
12783
- return _context92.stop();
12900
+ return _context95.stop();
12784
12901
  }
12785
12902
  }
12786
- }, _callee92, this);
12903
+ }, _callee95, this);
12787
12904
  }));
12788
12905
 
12789
- function deletePushProvider(_x129) {
12906
+ function deletePushProvider(_x134) {
12790
12907
  return _deletePushProvider.apply(this, arguments);
12791
12908
  }
12792
12909
 
@@ -12803,23 +12920,23 @@ var StreamChat = /*#__PURE__*/function () {
12803
12920
  }, {
12804
12921
  key: "listPushProviders",
12805
12922
  value: function () {
12806
- var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee93() {
12807
- return _regeneratorRuntime.wrap(function _callee93$(_context93) {
12923
+ var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee96() {
12924
+ return _regeneratorRuntime.wrap(function _callee96$(_context96) {
12808
12925
  while (1) {
12809
- switch (_context93.prev = _context93.next) {
12926
+ switch (_context96.prev = _context96.next) {
12810
12927
  case 0:
12811
- _context93.next = 2;
12928
+ _context96.next = 2;
12812
12929
  return this.get(this.baseURL + "/push_providers");
12813
12930
 
12814
12931
  case 2:
12815
- return _context93.abrupt("return", _context93.sent);
12932
+ return _context96.abrupt("return", _context96.sent);
12816
12933
 
12817
12934
  case 3:
12818
12935
  case "end":
12819
- return _context93.stop();
12936
+ return _context96.stop();
12820
12937
  }
12821
12938
  }
12822
- }, _callee93, this);
12939
+ }, _callee96, this);
12823
12940
  }));
12824
12941
 
12825
12942
  function listPushProviders() {
@@ -12847,26 +12964,26 @@ var StreamChat = /*#__PURE__*/function () {
12847
12964
  }, {
12848
12965
  key: "commitMessage",
12849
12966
  value: function () {
12850
- var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee94(id) {
12851
- return _regeneratorRuntime.wrap(function _callee94$(_context94) {
12967
+ var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee97(id) {
12968
+ return _regeneratorRuntime.wrap(function _callee97$(_context97) {
12852
12969
  while (1) {
12853
- switch (_context94.prev = _context94.next) {
12970
+ switch (_context97.prev = _context97.next) {
12854
12971
  case 0:
12855
- _context94.next = 2;
12972
+ _context97.next = 2;
12856
12973
  return this.post(this.baseURL + "/messages/".concat(id, "/commit"));
12857
12974
 
12858
12975
  case 2:
12859
- return _context94.abrupt("return", _context94.sent);
12976
+ return _context97.abrupt("return", _context97.sent);
12860
12977
 
12861
12978
  case 3:
12862
12979
  case "end":
12863
- return _context94.stop();
12980
+ return _context97.stop();
12864
12981
  }
12865
12982
  }
12866
- }, _callee94, this);
12983
+ }, _callee97, this);
12867
12984
  }));
12868
12985
 
12869
- function commitMessage(_x130) {
12986
+ function commitMessage(_x135) {
12870
12987
  return _commitMessage.apply(this, arguments);
12871
12988
  }
12872
12989
 
@@ -12881,26 +12998,26 @@ var StreamChat = /*#__PURE__*/function () {
12881
12998
  }, {
12882
12999
  key: "createPoll",
12883
13000
  value: function () {
12884
- var _createPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee95(poll) {
12885
- return _regeneratorRuntime.wrap(function _callee95$(_context95) {
13001
+ var _createPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee98(poll) {
13002
+ return _regeneratorRuntime.wrap(function _callee98$(_context98) {
12886
13003
  while (1) {
12887
- switch (_context95.prev = _context95.next) {
13004
+ switch (_context98.prev = _context98.next) {
12888
13005
  case 0:
12889
- _context95.next = 2;
13006
+ _context98.next = 2;
12890
13007
  return this.post(this.baseURL + "/polls", poll);
12891
13008
 
12892
13009
  case 2:
12893
- return _context95.abrupt("return", _context95.sent);
13010
+ return _context98.abrupt("return", _context98.sent);
12894
13011
 
12895
13012
  case 3:
12896
13013
  case "end":
12897
- return _context95.stop();
13014
+ return _context98.stop();
12898
13015
  }
12899
13016
  }
12900
- }, _callee95, this);
13017
+ }, _callee98, this);
12901
13018
  }));
12902
13019
 
12903
- function createPoll(_x131) {
13020
+ function createPoll(_x136) {
12904
13021
  return _createPoll.apply(this, arguments);
12905
13022
  }
12906
13023
 
@@ -12915,28 +13032,28 @@ var StreamChat = /*#__PURE__*/function () {
12915
13032
  }, {
12916
13033
  key: "getPoll",
12917
13034
  value: function () {
12918
- var _getPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee96(id, userId) {
12919
- return _regeneratorRuntime.wrap(function _callee96$(_context96) {
13035
+ var _getPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee99(id, userId) {
13036
+ return _regeneratorRuntime.wrap(function _callee99$(_context99) {
12920
13037
  while (1) {
12921
- switch (_context96.prev = _context96.next) {
13038
+ switch (_context99.prev = _context99.next) {
12922
13039
  case 0:
12923
- _context96.next = 2;
13040
+ _context99.next = 2;
12924
13041
  return this.get(this.baseURL + "/polls/".concat(id), _objectSpread({}, userId ? {
12925
13042
  user_id: userId
12926
13043
  } : {}));
12927
13044
 
12928
13045
  case 2:
12929
- return _context96.abrupt("return", _context96.sent);
13046
+ return _context99.abrupt("return", _context99.sent);
12930
13047
 
12931
13048
  case 3:
12932
13049
  case "end":
12933
- return _context96.stop();
13050
+ return _context99.stop();
12934
13051
  }
12935
13052
  }
12936
- }, _callee96, this);
13053
+ }, _callee99, this);
12937
13054
  }));
12938
13055
 
12939
- function getPoll(_x132, _x133) {
13056
+ function getPoll(_x137, _x138) {
12940
13057
  return _getPoll.apply(this, arguments);
12941
13058
  }
12942
13059
 
@@ -12951,26 +13068,26 @@ var StreamChat = /*#__PURE__*/function () {
12951
13068
  }, {
12952
13069
  key: "updatePoll",
12953
13070
  value: function () {
12954
- var _updatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee97(poll) {
12955
- return _regeneratorRuntime.wrap(function _callee97$(_context97) {
13071
+ var _updatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee100(poll) {
13072
+ return _regeneratorRuntime.wrap(function _callee100$(_context100) {
12956
13073
  while (1) {
12957
- switch (_context97.prev = _context97.next) {
13074
+ switch (_context100.prev = _context100.next) {
12958
13075
  case 0:
12959
- _context97.next = 2;
13076
+ _context100.next = 2;
12960
13077
  return this.put(this.baseURL + "/polls", poll);
12961
13078
 
12962
13079
  case 2:
12963
- return _context97.abrupt("return", _context97.sent);
13080
+ return _context100.abrupt("return", _context100.sent);
12964
13081
 
12965
13082
  case 3:
12966
13083
  case "end":
12967
- return _context97.stop();
13084
+ return _context100.stop();
12968
13085
  }
12969
13086
  }
12970
- }, _callee97, this);
13087
+ }, _callee100, this);
12971
13088
  }));
12972
13089
 
12973
- function updatePoll(_x134) {
13090
+ function updatePoll(_x139) {
12974
13091
  return _updatePoll.apply(this, arguments);
12975
13092
  }
12976
13093
 
@@ -12987,26 +13104,26 @@ var StreamChat = /*#__PURE__*/function () {
12987
13104
  }, {
12988
13105
  key: "partialUpdatePoll",
12989
13106
  value: function () {
12990
- var _partialUpdatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee98(id, partialPollObject) {
12991
- return _regeneratorRuntime.wrap(function _callee98$(_context98) {
13107
+ var _partialUpdatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee101(id, partialPollObject) {
13108
+ return _regeneratorRuntime.wrap(function _callee101$(_context101) {
12992
13109
  while (1) {
12993
- switch (_context98.prev = _context98.next) {
13110
+ switch (_context101.prev = _context101.next) {
12994
13111
  case 0:
12995
- _context98.next = 2;
13112
+ _context101.next = 2;
12996
13113
  return this.patch(this.baseURL + "/polls/".concat(id), partialPollObject);
12997
13114
 
12998
13115
  case 2:
12999
- return _context98.abrupt("return", _context98.sent);
13116
+ return _context101.abrupt("return", _context101.sent);
13000
13117
 
13001
13118
  case 3:
13002
13119
  case "end":
13003
- return _context98.stop();
13120
+ return _context101.stop();
13004
13121
  }
13005
13122
  }
13006
- }, _callee98, this);
13123
+ }, _callee101, this);
13007
13124
  }));
13008
13125
 
13009
- function partialUpdatePoll(_x135, _x136) {
13126
+ function partialUpdatePoll(_x140, _x141) {
13010
13127
  return _partialUpdatePoll.apply(this, arguments);
13011
13128
  }
13012
13129
 
@@ -13022,28 +13139,28 @@ var StreamChat = /*#__PURE__*/function () {
13022
13139
  }, {
13023
13140
  key: "deletePoll",
13024
13141
  value: function () {
13025
- var _deletePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee99(id, userId) {
13026
- return _regeneratorRuntime.wrap(function _callee99$(_context99) {
13142
+ var _deletePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee102(id, userId) {
13143
+ return _regeneratorRuntime.wrap(function _callee102$(_context102) {
13027
13144
  while (1) {
13028
- switch (_context99.prev = _context99.next) {
13145
+ switch (_context102.prev = _context102.next) {
13029
13146
  case 0:
13030
- _context99.next = 2;
13147
+ _context102.next = 2;
13031
13148
  return this.delete(this.baseURL + "/polls/".concat(id), _objectSpread({}, userId ? {
13032
13149
  user_id: userId
13033
13150
  } : {}));
13034
13151
 
13035
13152
  case 2:
13036
- return _context99.abrupt("return", _context99.sent);
13153
+ return _context102.abrupt("return", _context102.sent);
13037
13154
 
13038
13155
  case 3:
13039
13156
  case "end":
13040
- return _context99.stop();
13157
+ return _context102.stop();
13041
13158
  }
13042
13159
  }
13043
- }, _callee99, this);
13160
+ }, _callee102, this);
13044
13161
  }));
13045
13162
 
13046
- function deletePoll(_x137, _x138) {
13163
+ function deletePoll(_x142, _x143) {
13047
13164
  return _deletePoll.apply(this, arguments);
13048
13165
  }
13049
13166
 
@@ -13058,12 +13175,12 @@ var StreamChat = /*#__PURE__*/function () {
13058
13175
  }, {
13059
13176
  key: "closePoll",
13060
13177
  value: function () {
13061
- var _closePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee100(id) {
13062
- return _regeneratorRuntime.wrap(function _callee100$(_context100) {
13178
+ var _closePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee103(id) {
13179
+ return _regeneratorRuntime.wrap(function _callee103$(_context103) {
13063
13180
  while (1) {
13064
- switch (_context100.prev = _context100.next) {
13181
+ switch (_context103.prev = _context103.next) {
13065
13182
  case 0:
13066
- return _context100.abrupt("return", this.partialUpdatePoll(id, {
13183
+ return _context103.abrupt("return", this.partialUpdatePoll(id, {
13067
13184
  set: {
13068
13185
  is_closed: true
13069
13186
  }
@@ -13071,13 +13188,13 @@ var StreamChat = /*#__PURE__*/function () {
13071
13188
 
13072
13189
  case 1:
13073
13190
  case "end":
13074
- return _context100.stop();
13191
+ return _context103.stop();
13075
13192
  }
13076
13193
  }
13077
- }, _callee100, this);
13194
+ }, _callee103, this);
13078
13195
  }));
13079
13196
 
13080
- function closePoll(_x139) {
13197
+ function closePoll(_x144) {
13081
13198
  return _closePoll.apply(this, arguments);
13082
13199
  }
13083
13200
 
@@ -13093,26 +13210,26 @@ var StreamChat = /*#__PURE__*/function () {
13093
13210
  }, {
13094
13211
  key: "createPollOption",
13095
13212
  value: function () {
13096
- var _createPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee101(pollId, option) {
13097
- return _regeneratorRuntime.wrap(function _callee101$(_context101) {
13213
+ var _createPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee104(pollId, option) {
13214
+ return _regeneratorRuntime.wrap(function _callee104$(_context104) {
13098
13215
  while (1) {
13099
- switch (_context101.prev = _context101.next) {
13216
+ switch (_context104.prev = _context104.next) {
13100
13217
  case 0:
13101
- _context101.next = 2;
13218
+ _context104.next = 2;
13102
13219
  return this.post(this.baseURL + "/polls/".concat(pollId, "/options"), option);
13103
13220
 
13104
13221
  case 2:
13105
- return _context101.abrupt("return", _context101.sent);
13222
+ return _context104.abrupt("return", _context104.sent);
13106
13223
 
13107
13224
  case 3:
13108
13225
  case "end":
13109
- return _context101.stop();
13226
+ return _context104.stop();
13110
13227
  }
13111
13228
  }
13112
- }, _callee101, this);
13229
+ }, _callee104, this);
13113
13230
  }));
13114
13231
 
13115
- function createPollOption(_x140, _x141) {
13232
+ function createPollOption(_x145, _x146) {
13116
13233
  return _createPollOption.apply(this, arguments);
13117
13234
  }
13118
13235
 
@@ -13128,26 +13245,26 @@ var StreamChat = /*#__PURE__*/function () {
13128
13245
  }, {
13129
13246
  key: "getPollOption",
13130
13247
  value: function () {
13131
- var _getPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee102(pollId, optionId) {
13132
- return _regeneratorRuntime.wrap(function _callee102$(_context102) {
13248
+ var _getPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee105(pollId, optionId) {
13249
+ return _regeneratorRuntime.wrap(function _callee105$(_context105) {
13133
13250
  while (1) {
13134
- switch (_context102.prev = _context102.next) {
13251
+ switch (_context105.prev = _context105.next) {
13135
13252
  case 0:
13136
- _context102.next = 2;
13253
+ _context105.next = 2;
13137
13254
  return this.get(this.baseURL + "/polls/".concat(pollId, "/options/").concat(optionId));
13138
13255
 
13139
13256
  case 2:
13140
- return _context102.abrupt("return", _context102.sent);
13257
+ return _context105.abrupt("return", _context105.sent);
13141
13258
 
13142
13259
  case 3:
13143
13260
  case "end":
13144
- return _context102.stop();
13261
+ return _context105.stop();
13145
13262
  }
13146
13263
  }
13147
- }, _callee102, this);
13264
+ }, _callee105, this);
13148
13265
  }));
13149
13266
 
13150
- function getPollOption(_x142, _x143) {
13267
+ function getPollOption(_x147, _x148) {
13151
13268
  return _getPollOption.apply(this, arguments);
13152
13269
  }
13153
13270
 
@@ -13163,26 +13280,26 @@ var StreamChat = /*#__PURE__*/function () {
13163
13280
  }, {
13164
13281
  key: "updatePollOption",
13165
13282
  value: function () {
13166
- var _updatePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee103(pollId, option) {
13167
- return _regeneratorRuntime.wrap(function _callee103$(_context103) {
13283
+ var _updatePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee106(pollId, option) {
13284
+ return _regeneratorRuntime.wrap(function _callee106$(_context106) {
13168
13285
  while (1) {
13169
- switch (_context103.prev = _context103.next) {
13286
+ switch (_context106.prev = _context106.next) {
13170
13287
  case 0:
13171
- _context103.next = 2;
13288
+ _context106.next = 2;
13172
13289
  return this.put(this.baseURL + "/polls/".concat(pollId, "/options"), option);
13173
13290
 
13174
13291
  case 2:
13175
- return _context103.abrupt("return", _context103.sent);
13292
+ return _context106.abrupt("return", _context106.sent);
13176
13293
 
13177
13294
  case 3:
13178
13295
  case "end":
13179
- return _context103.stop();
13296
+ return _context106.stop();
13180
13297
  }
13181
13298
  }
13182
- }, _callee103, this);
13299
+ }, _callee106, this);
13183
13300
  }));
13184
13301
 
13185
- function updatePollOption(_x144, _x145) {
13302
+ function updatePollOption(_x149, _x150) {
13186
13303
  return _updatePollOption.apply(this, arguments);
13187
13304
  }
13188
13305
 
@@ -13198,26 +13315,26 @@ var StreamChat = /*#__PURE__*/function () {
13198
13315
  }, {
13199
13316
  key: "deletePollOption",
13200
13317
  value: function () {
13201
- var _deletePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee104(pollId, optionId) {
13202
- return _regeneratorRuntime.wrap(function _callee104$(_context104) {
13318
+ var _deletePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee107(pollId, optionId) {
13319
+ return _regeneratorRuntime.wrap(function _callee107$(_context107) {
13203
13320
  while (1) {
13204
- switch (_context104.prev = _context104.next) {
13321
+ switch (_context107.prev = _context107.next) {
13205
13322
  case 0:
13206
- _context104.next = 2;
13323
+ _context107.next = 2;
13207
13324
  return this.delete(this.baseURL + "/polls/".concat(pollId, "/options/").concat(optionId));
13208
13325
 
13209
13326
  case 2:
13210
- return _context104.abrupt("return", _context104.sent);
13327
+ return _context107.abrupt("return", _context107.sent);
13211
13328
 
13212
13329
  case 3:
13213
13330
  case "end":
13214
- return _context104.stop();
13331
+ return _context107.stop();
13215
13332
  }
13216
13333
  }
13217
- }, _callee104, this);
13334
+ }, _callee107, this);
13218
13335
  }));
13219
13336
 
13220
- function deletePollOption(_x146, _x147) {
13337
+ function deletePollOption(_x151, _x152) {
13221
13338
  return _deletePollOption.apply(this, arguments);
13222
13339
  }
13223
13340
 
@@ -13234,31 +13351,31 @@ var StreamChat = /*#__PURE__*/function () {
13234
13351
  }, {
13235
13352
  key: "castPollVote",
13236
13353
  value: function () {
13237
- var _castPollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee105(messageId, pollId, vote) {
13354
+ var _castPollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee108(messageId, pollId, vote) {
13238
13355
  var options,
13239
- _args105 = arguments;
13240
- return _regeneratorRuntime.wrap(function _callee105$(_context105) {
13356
+ _args108 = arguments;
13357
+ return _regeneratorRuntime.wrap(function _callee108$(_context108) {
13241
13358
  while (1) {
13242
- switch (_context105.prev = _context105.next) {
13359
+ switch (_context108.prev = _context108.next) {
13243
13360
  case 0:
13244
- options = _args105.length > 3 && _args105[3] !== undefined ? _args105[3] : {};
13245
- _context105.next = 3;
13361
+ options = _args108.length > 3 && _args108[3] !== undefined ? _args108[3] : {};
13362
+ _context108.next = 3;
13246
13363
  return this.post(this.baseURL + "/messages/".concat(messageId, "/polls/").concat(pollId, "/vote"), _objectSpread({
13247
13364
  vote: vote
13248
13365
  }, options));
13249
13366
 
13250
13367
  case 3:
13251
- return _context105.abrupt("return", _context105.sent);
13368
+ return _context108.abrupt("return", _context108.sent);
13252
13369
 
13253
13370
  case 4:
13254
13371
  case "end":
13255
- return _context105.stop();
13372
+ return _context108.stop();
13256
13373
  }
13257
13374
  }
13258
- }, _callee105, this);
13375
+ }, _callee108, this);
13259
13376
  }));
13260
13377
 
13261
- function castPollVote(_x148, _x149, _x150) {
13378
+ function castPollVote(_x153, _x154, _x155) {
13262
13379
  return _castPollVote.apply(this, arguments);
13263
13380
  }
13264
13381
 
@@ -13274,24 +13391,24 @@ var StreamChat = /*#__PURE__*/function () {
13274
13391
  }, {
13275
13392
  key: "addPollAnswer",
13276
13393
  value: function () {
13277
- var _addPollAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee106(messageId, pollId, answerText) {
13278
- return _regeneratorRuntime.wrap(function _callee106$(_context106) {
13394
+ var _addPollAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee109(messageId, pollId, answerText) {
13395
+ return _regeneratorRuntime.wrap(function _callee109$(_context109) {
13279
13396
  while (1) {
13280
- switch (_context106.prev = _context106.next) {
13397
+ switch (_context109.prev = _context109.next) {
13281
13398
  case 0:
13282
- return _context106.abrupt("return", this.castPollVote(messageId, pollId, {
13399
+ return _context109.abrupt("return", this.castPollVote(messageId, pollId, {
13283
13400
  answer_text: answerText
13284
13401
  }));
13285
13402
 
13286
13403
  case 1:
13287
13404
  case "end":
13288
- return _context106.stop();
13405
+ return _context109.stop();
13289
13406
  }
13290
13407
  }
13291
- }, _callee106, this);
13408
+ }, _callee109, this);
13292
13409
  }));
13293
13410
 
13294
- function addPollAnswer(_x151, _x152, _x153) {
13411
+ function addPollAnswer(_x156, _x157, _x158) {
13295
13412
  return _addPollAnswer.apply(this, arguments);
13296
13413
  }
13297
13414
 
@@ -13300,26 +13417,26 @@ var StreamChat = /*#__PURE__*/function () {
13300
13417
  }, {
13301
13418
  key: "removePollVote",
13302
13419
  value: function () {
13303
- var _removePollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee107(messageId, pollId, voteId) {
13304
- return _regeneratorRuntime.wrap(function _callee107$(_context107) {
13420
+ var _removePollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee110(messageId, pollId, voteId) {
13421
+ return _regeneratorRuntime.wrap(function _callee110$(_context110) {
13305
13422
  while (1) {
13306
- switch (_context107.prev = _context107.next) {
13423
+ switch (_context110.prev = _context110.next) {
13307
13424
  case 0:
13308
- _context107.next = 2;
13425
+ _context110.next = 2;
13309
13426
  return this.delete(this.baseURL + "/messages/".concat(messageId, "/polls/").concat(pollId, "/vote/").concat(voteId));
13310
13427
 
13311
13428
  case 2:
13312
- return _context107.abrupt("return", _context107.sent);
13429
+ return _context110.abrupt("return", _context110.sent);
13313
13430
 
13314
13431
  case 3:
13315
13432
  case "end":
13316
- return _context107.stop();
13433
+ return _context110.stop();
13317
13434
  }
13318
13435
  }
13319
- }, _callee107, this);
13436
+ }, _callee110, this);
13320
13437
  }));
13321
13438
 
13322
- function removePollVote(_x154, _x155, _x156) {
13439
+ function removePollVote(_x159, _x160, _x161) {
13323
13440
  return _removePollVote.apply(this, arguments);
13324
13441
  }
13325
13442
 
@@ -13336,33 +13453,33 @@ var StreamChat = /*#__PURE__*/function () {
13336
13453
  }, {
13337
13454
  key: "queryPolls",
13338
13455
  value: function () {
13339
- var _queryPolls = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee108() {
13456
+ var _queryPolls = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee111() {
13340
13457
  var filter,
13341
13458
  sort,
13342
13459
  options,
13343
- _args108 = arguments;
13344
- return _regeneratorRuntime.wrap(function _callee108$(_context108) {
13460
+ _args111 = arguments;
13461
+ return _regeneratorRuntime.wrap(function _callee111$(_context111) {
13345
13462
  while (1) {
13346
- switch (_context108.prev = _context108.next) {
13463
+ switch (_context111.prev = _context111.next) {
13347
13464
  case 0:
13348
- filter = _args108.length > 0 && _args108[0] !== undefined ? _args108[0] : {};
13349
- sort = _args108.length > 1 && _args108[1] !== undefined ? _args108[1] : [];
13350
- options = _args108.length > 2 && _args108[2] !== undefined ? _args108[2] : {};
13351
- _context108.next = 5;
13465
+ filter = _args111.length > 0 && _args111[0] !== undefined ? _args111[0] : {};
13466
+ sort = _args111.length > 1 && _args111[1] !== undefined ? _args111[1] : [];
13467
+ options = _args111.length > 2 && _args111[2] !== undefined ? _args111[2] : {};
13468
+ _context111.next = 5;
13352
13469
  return this.post(this.baseURL + '/polls/query', _objectSpread({
13353
13470
  filter: filter,
13354
13471
  sort: normalizeQuerySort(sort)
13355
13472
  }, options));
13356
13473
 
13357
13474
  case 5:
13358
- return _context108.abrupt("return", _context108.sent);
13475
+ return _context111.abrupt("return", _context111.sent);
13359
13476
 
13360
13477
  case 6:
13361
13478
  case "end":
13362
- return _context108.stop();
13479
+ return _context111.stop();
13363
13480
  }
13364
13481
  }
13365
- }, _callee108, this);
13482
+ }, _callee111, this);
13366
13483
  }));
13367
13484
 
13368
13485
  function queryPolls() {
@@ -13383,36 +13500,36 @@ var StreamChat = /*#__PURE__*/function () {
13383
13500
  }, {
13384
13501
  key: "queryPollVotes",
13385
13502
  value: function () {
13386
- var _queryPollVotes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee109(pollId) {
13503
+ var _queryPollVotes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee112(pollId) {
13387
13504
  var filter,
13388
13505
  sort,
13389
13506
  options,
13390
- _args109 = arguments;
13391
- return _regeneratorRuntime.wrap(function _callee109$(_context109) {
13507
+ _args112 = arguments;
13508
+ return _regeneratorRuntime.wrap(function _callee112$(_context112) {
13392
13509
  while (1) {
13393
- switch (_context109.prev = _context109.next) {
13510
+ switch (_context112.prev = _context112.next) {
13394
13511
  case 0:
13395
- filter = _args109.length > 1 && _args109[1] !== undefined ? _args109[1] : {};
13396
- sort = _args109.length > 2 && _args109[2] !== undefined ? _args109[2] : [];
13397
- options = _args109.length > 3 && _args109[3] !== undefined ? _args109[3] : {};
13398
- _context109.next = 5;
13512
+ filter = _args112.length > 1 && _args112[1] !== undefined ? _args112[1] : {};
13513
+ sort = _args112.length > 2 && _args112[2] !== undefined ? _args112[2] : [];
13514
+ options = _args112.length > 3 && _args112[3] !== undefined ? _args112[3] : {};
13515
+ _context112.next = 5;
13399
13516
  return this.post(this.baseURL + "/polls/".concat(pollId, "/votes"), _objectSpread({
13400
13517
  filter: filter,
13401
13518
  sort: normalizeQuerySort(sort)
13402
13519
  }, options));
13403
13520
 
13404
13521
  case 5:
13405
- return _context109.abrupt("return", _context109.sent);
13522
+ return _context112.abrupt("return", _context112.sent);
13406
13523
 
13407
13524
  case 6:
13408
13525
  case "end":
13409
- return _context109.stop();
13526
+ return _context112.stop();
13410
13527
  }
13411
13528
  }
13412
- }, _callee109, this);
13529
+ }, _callee112, this);
13413
13530
  }));
13414
13531
 
13415
- function queryPollVotes(_x157) {
13532
+ function queryPollVotes(_x162) {
13416
13533
  return _queryPollVotes.apply(this, arguments);
13417
13534
  }
13418
13535
 
@@ -13429,33 +13546,33 @@ var StreamChat = /*#__PURE__*/function () {
13429
13546
  }, {
13430
13547
  key: "queryMessageHistory",
13431
13548
  value: function () {
13432
- var _queryMessageHistory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee110() {
13549
+ var _queryMessageHistory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee113() {
13433
13550
  var filter,
13434
13551
  sort,
13435
13552
  options,
13436
- _args110 = arguments;
13437
- return _regeneratorRuntime.wrap(function _callee110$(_context110) {
13553
+ _args113 = arguments;
13554
+ return _regeneratorRuntime.wrap(function _callee113$(_context113) {
13438
13555
  while (1) {
13439
- switch (_context110.prev = _context110.next) {
13556
+ switch (_context113.prev = _context113.next) {
13440
13557
  case 0:
13441
- filter = _args110.length > 0 && _args110[0] !== undefined ? _args110[0] : {};
13442
- sort = _args110.length > 1 && _args110[1] !== undefined ? _args110[1] : [];
13443
- options = _args110.length > 2 && _args110[2] !== undefined ? _args110[2] : {};
13444
- _context110.next = 5;
13558
+ filter = _args113.length > 0 && _args113[0] !== undefined ? _args113[0] : {};
13559
+ sort = _args113.length > 1 && _args113[1] !== undefined ? _args113[1] : [];
13560
+ options = _args113.length > 2 && _args113[2] !== undefined ? _args113[2] : {};
13561
+ _context113.next = 5;
13445
13562
  return this.post(this.baseURL + '/messages/history', _objectSpread({
13446
13563
  filter: filter,
13447
13564
  sort: normalizeQuerySort(sort)
13448
13565
  }, options));
13449
13566
 
13450
13567
  case 5:
13451
- return _context110.abrupt("return", _context110.sent);
13568
+ return _context113.abrupt("return", _context113.sent);
13452
13569
 
13453
13570
  case 6:
13454
13571
  case "end":
13455
- return _context110.stop();
13572
+ return _context113.stop();
13456
13573
  }
13457
13574
  }
13458
- }, _callee110, this);
13575
+ }, _callee113, this);
13459
13576
  }));
13460
13577
 
13461
13578
  function queryMessageHistory() {