stream-chat 8.25.1 → 8.27.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.
@@ -503,6 +503,117 @@ var ChannelState = /*#__PURE__*/function () {
503
503
  };
504
504
  });
505
505
 
506
+ _defineProperty(this, "updatePollVote", function (pollVote, poll, messageId) {
507
+ var _message$poll;
508
+
509
+ var message = _this.findMessage(messageId);
510
+
511
+ if (!message) return;
512
+ if (message.poll_id !== pollVote.poll_id) return;
513
+
514
+ var updatedPoll = _objectSpread$7({}, poll);
515
+
516
+ var ownVotes = _toConsumableArray(((_message$poll = message.poll) === null || _message$poll === void 0 ? void 0 : _message$poll.own_votes) || []);
517
+
518
+ if (pollVote.user_id === _this._channel.getClient().userID) {
519
+ if (pollVote.option_id && poll.enforce_unique_vote) {
520
+ // remove all previous votes where option_id is not empty
521
+ ownVotes = ownVotes.filter(function (vote) {
522
+ return !vote.option_id;
523
+ });
524
+ } else if (pollVote.answer_text) {
525
+ // remove all previous votes where option_id is empty
526
+ ownVotes = ownVotes.filter(function (vote) {
527
+ return vote.answer_text;
528
+ });
529
+ }
530
+
531
+ ownVotes.push(pollVote);
532
+ }
533
+
534
+ updatedPoll.own_votes = ownVotes;
535
+
536
+ var newMessage = _objectSpread$7(_objectSpread$7({}, message), {}, {
537
+ poll: updatedPoll
538
+ });
539
+
540
+ _this.addMessageSorted(newMessage, false, false);
541
+ });
542
+
543
+ _defineProperty(this, "addPollVote", function (pollVote, poll, messageId) {
544
+ var _message$poll2;
545
+
546
+ var message = _this.findMessage(messageId);
547
+
548
+ if (!message) return;
549
+ if (message.poll_id !== pollVote.poll_id) return;
550
+
551
+ var updatedPoll = _objectSpread$7({}, poll);
552
+
553
+ var ownVotes = _toConsumableArray(((_message$poll2 = message.poll) === null || _message$poll2 === void 0 ? void 0 : _message$poll2.own_votes) || []);
554
+
555
+ if (pollVote.user_id === _this._channel.getClient().userID) {
556
+ ownVotes.push(pollVote);
557
+ }
558
+
559
+ updatedPoll.own_votes = ownVotes;
560
+
561
+ var newMessage = _objectSpread$7(_objectSpread$7({}, message), {}, {
562
+ poll: updatedPoll
563
+ });
564
+
565
+ _this.addMessageSorted(newMessage, false, false);
566
+ });
567
+
568
+ _defineProperty(this, "removePollVote", function (pollVote, poll, messageId) {
569
+ var _message$poll3;
570
+
571
+ var message = _this.findMessage(messageId);
572
+
573
+ if (!message) return;
574
+ if (message.poll_id !== pollVote.poll_id) return;
575
+
576
+ var updatedPoll = _objectSpread$7({}, poll);
577
+
578
+ var ownVotes = _toConsumableArray(((_message$poll3 = message.poll) === null || _message$poll3 === void 0 ? void 0 : _message$poll3.own_votes) || []);
579
+
580
+ if (pollVote.user_id === _this._channel.getClient().userID) {
581
+ var index = ownVotes.findIndex(function (vote) {
582
+ return vote.option_id === pollVote.option_id;
583
+ });
584
+
585
+ if (index > -1) {
586
+ ownVotes.splice(index, 1);
587
+ }
588
+ }
589
+
590
+ updatedPoll.own_votes = ownVotes;
591
+
592
+ var newMessage = _objectSpread$7(_objectSpread$7({}, message), {}, {
593
+ poll: updatedPoll
594
+ });
595
+
596
+ _this.addMessageSorted(newMessage, false, false);
597
+ });
598
+
599
+ _defineProperty(this, "updatePoll", function (poll, messageId) {
600
+ var _message$poll4;
601
+
602
+ var message = _this.findMessage(messageId);
603
+
604
+ if (!message) return;
605
+
606
+ var updatedPoll = _objectSpread$7(_objectSpread$7({}, poll), {}, {
607
+ own_votes: _toConsumableArray(((_message$poll4 = message.poll) === null || _message$poll4 === void 0 ? void 0 : _message$poll4.own_votes) || [])
608
+ });
609
+
610
+ var newMessage = _objectSpread$7(_objectSpread$7({}, message), {}, {
611
+ poll: updatedPoll
612
+ });
613
+
614
+ _this.addMessageSorted(newMessage, false, false);
615
+ });
616
+
506
617
  _defineProperty(this, "updateUserMessages", function (user) {
507
618
  var _updateUserMessages = function _updateUserMessages(messages, user) {
508
619
  for (var i = 0; i < messages.length; i++) {
@@ -3607,6 +3718,69 @@ var Channel = /*#__PURE__*/function () {
3607
3718
 
3608
3719
  return createCall;
3609
3720
  }()
3721
+ /**
3722
+ * Cast or cancel one or more votes on a poll
3723
+ * @param pollId string The poll id
3724
+ * @param votes PollVoteData[] The votes that will be casted (or canceled in case of an empty array)
3725
+ * @returns {APIResponse & PollVoteResponse} The poll votes
3726
+ */
3727
+
3728
+ }, {
3729
+ key: "vote",
3730
+ value: function () {
3731
+ var _vote2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(messageId, pollId, _vote) {
3732
+ return _regeneratorRuntime.wrap(function _callee40$(_context40) {
3733
+ while (1) {
3734
+ switch (_context40.prev = _context40.next) {
3735
+ case 0:
3736
+ _context40.next = 2;
3737
+ return this.getClient().castPollVote(messageId, pollId, _vote);
3738
+
3739
+ case 2:
3740
+ return _context40.abrupt("return", _context40.sent);
3741
+
3742
+ case 3:
3743
+ case "end":
3744
+ return _context40.stop();
3745
+ }
3746
+ }
3747
+ }, _callee40, this);
3748
+ }));
3749
+
3750
+ function vote(_x42, _x43, _x44) {
3751
+ return _vote2.apply(this, arguments);
3752
+ }
3753
+
3754
+ return vote;
3755
+ }()
3756
+ }, {
3757
+ key: "removeVote",
3758
+ value: function () {
3759
+ var _removeVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(messageId, pollId, voteId) {
3760
+ return _regeneratorRuntime.wrap(function _callee41$(_context41) {
3761
+ while (1) {
3762
+ switch (_context41.prev = _context41.next) {
3763
+ case 0:
3764
+ _context41.next = 2;
3765
+ return this.getClient().removePollVote(messageId, pollId, voteId);
3766
+
3767
+ case 2:
3768
+ return _context41.abrupt("return", _context41.sent);
3769
+
3770
+ case 3:
3771
+ case "end":
3772
+ return _context41.stop();
3773
+ }
3774
+ }
3775
+ }, _callee41, this);
3776
+ }));
3777
+
3778
+ function removeVote(_x45, _x46, _x47) {
3779
+ return _removeVote.apply(this, arguments);
3780
+ }
3781
+
3782
+ return removeVote;
3783
+ }()
3610
3784
  /**
3611
3785
  * on - Listen to events on this channel.
3612
3786
  *
@@ -3905,6 +4079,49 @@ var Channel = /*#__PURE__*/function () {
3905
4079
 
3906
4080
  break;
3907
4081
 
4082
+ case 'poll.updated':
4083
+ if (event.poll) {
4084
+ var _event$message;
4085
+
4086
+ channelState.updatePoll(event.poll, ((_event$message = event.message) === null || _event$message === void 0 ? void 0 : _event$message.id) || '');
4087
+ }
4088
+
4089
+ break;
4090
+
4091
+ case 'poll.vote_casted':
4092
+ if (event.poll_vote && event.poll) {
4093
+ var _event$message2;
4094
+
4095
+ channelState.addPollVote(event.poll_vote, event.poll, ((_event$message2 = event.message) === null || _event$message2 === void 0 ? void 0 : _event$message2.id) || '');
4096
+ }
4097
+
4098
+ break;
4099
+
4100
+ case 'poll.vote_changed':
4101
+ if (event.poll_vote && event.poll) {
4102
+ var _event$message3;
4103
+
4104
+ channelState.updatePollVote(event.poll_vote, event.poll, ((_event$message3 = event.message) === null || _event$message3 === void 0 ? void 0 : _event$message3.id) || '');
4105
+ }
4106
+
4107
+ break;
4108
+
4109
+ case 'poll.vote_removed':
4110
+ if (event.poll_vote && event.poll) {
4111
+ var _event$message4;
4112
+
4113
+ channelState.removePollVote(event.poll_vote, event.poll, ((_event$message4 = event.message) === null || _event$message4 === void 0 ? void 0 : _event$message4.id) || '');
4114
+ }
4115
+
4116
+ break;
4117
+
4118
+ case 'poll.closed':
4119
+ if (event.message) {
4120
+ channelState.addMessageSorted(event.message, false, false);
4121
+ }
4122
+
4123
+ break;
4124
+
3908
4125
  case 'reaction.new':
3909
4126
  if (event.message && event.reaction) {
3910
4127
  event.message = channelState.addReaction(event.reaction, event.message);
@@ -6586,8 +6803,8 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
6586
6803
  DeleteUserOptions specifies a collection of one or more `user_ids` to be deleted.
6587
6804
 
6588
6805
  `user`:
6589
- - soft: marks user as deleted and retains all user data
6590
- - pruning: marks user as deleted and nullifies user information
6806
+ - soft: marks user as deleted and retains all user data
6807
+ - pruning: marks user as deleted and nullifies user information
6591
6808
  - hard: deletes user completely - this requires hard option for messages and conversation as well
6592
6809
  `conversations`:
6593
6810
  - soft: marks all conversation channels as deleted (same effect as Delete Channels with 'hard' option disabled)
@@ -6626,6 +6843,14 @@ var ErrorFromResponse = /*#__PURE__*/function (_Error) {
6626
6843
 
6627
6844
  return ErrorFromResponse;
6628
6845
  }( /*#__PURE__*/_wrapNativeSuper(Error));
6846
+ var VotingVisibility;
6847
+
6848
+ (function (VotingVisibility) {
6849
+ VotingVisibility["anonymous"] = "anonymous";
6850
+ VotingVisibility["public"] = "public";
6851
+ })(VotingVisibility || (VotingVisibility = {}));
6852
+
6853
+ var _excluded$1 = ["parent_message_id", "parent_message", "latest_replies", "thread_participants", "reply_count", "channel", "read"];
6629
6854
 
6630
6855
  function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
6631
6856
 
@@ -6637,6 +6862,7 @@ function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o
6637
6862
 
6638
6863
  function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
6639
6864
  var Thread = /*#__PURE__*/function () {
6865
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6640
6866
  function Thread(client, t) {
6641
6867
  _classCallCheck(this, Thread);
6642
6868
 
@@ -6658,17 +6884,28 @@ var Thread = /*#__PURE__*/function () {
6658
6884
 
6659
6885
  _defineProperty(this, "read", {});
6660
6886
 
6661
- this.id = t.parent_message.id;
6662
- this.message = formatMessage(t.parent_message);
6663
- this.latestReplies = t.latest_replies.map(formatMessage);
6664
- this.participants = t.thread_participants;
6665
- this.replyCount = t.reply_count;
6666
- this.channel = t.channel;
6887
+ _defineProperty(this, "data", {});
6888
+
6889
+ var parent_message_id = t.parent_message_id,
6890
+ parent_message = t.parent_message,
6891
+ latest_replies = t.latest_replies,
6892
+ thread_participants = t.thread_participants,
6893
+ reply_count = t.reply_count,
6894
+ channel = t.channel,
6895
+ read = t.read,
6896
+ data = _objectWithoutProperties(t, _excluded$1);
6897
+
6898
+ this.id = parent_message_id;
6899
+ this.message = formatMessage(parent_message);
6900
+ this.latestReplies = latest_replies.map(formatMessage);
6901
+ this.participants = thread_participants;
6902
+ this.replyCount = reply_count;
6903
+ this.channel = channel;
6667
6904
  this._channel = client.channel(t.channel.type, t.channel.id);
6668
6905
  this._client = client;
6669
6906
 
6670
- if (t.read) {
6671
- var _iterator = _createForOfIteratorHelper$1(t.read),
6907
+ if (read) {
6908
+ var _iterator = _createForOfIteratorHelper$1(read),
6672
6909
  _step;
6673
6910
 
6674
6911
  try {
@@ -6684,6 +6921,8 @@ var Thread = /*#__PURE__*/function () {
6684
6921
  _iterator.f();
6685
6922
  }
6686
6923
  }
6924
+
6925
+ this.data = data;
6687
6926
  }
6688
6927
 
6689
6928
  _createClass(Thread, [{
@@ -8856,6 +9095,59 @@ var StreamChat = /*#__PURE__*/function () {
8856
9095
 
8857
9096
  return queryChannels;
8858
9097
  }()
9098
+ /**
9099
+ * queryReactions - Query reactions
9100
+ *
9101
+ * @param {ReactionFilters<StreamChatGenerics>} filter object MongoDB style filters
9102
+ * @param {ReactionSort<StreamChatGenerics>} [sort] Sort options, for instance {created_at: -1}.
9103
+ * @param {QueryReactionsOptions} [options] Pagination object
9104
+ *
9105
+ * @return {Promise<{ QueryReactionsAPIResponse } search channels response
9106
+ */
9107
+
9108
+ }, {
9109
+ key: "queryReactions",
9110
+ value: function () {
9111
+ var _queryReactions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(messageID, filter) {
9112
+ var sort,
9113
+ options,
9114
+ payload,
9115
+ _args21 = arguments;
9116
+ return _regeneratorRuntime.wrap(function _callee21$(_context21) {
9117
+ while (1) {
9118
+ switch (_context21.prev = _context21.next) {
9119
+ case 0:
9120
+ sort = _args21.length > 2 && _args21[2] !== undefined ? _args21[2] : [];
9121
+ options = _args21.length > 3 && _args21[3] !== undefined ? _args21[3] : {};
9122
+ _context21.next = 4;
9123
+ return this.wsPromise;
9124
+
9125
+ case 4:
9126
+ // Return a list of channels
9127
+ payload = _objectSpread({
9128
+ filter: filter,
9129
+ sort: normalizeQuerySort(sort)
9130
+ }, options);
9131
+ _context21.next = 7;
9132
+ return this.post(this.baseURL + '/messages/' + messageID + '/reactions', payload);
9133
+
9134
+ case 7:
9135
+ return _context21.abrupt("return", _context21.sent);
9136
+
9137
+ case 8:
9138
+ case "end":
9139
+ return _context21.stop();
9140
+ }
9141
+ }
9142
+ }, _callee21, this);
9143
+ }));
9144
+
9145
+ function queryReactions(_x18, _x19) {
9146
+ return _queryReactions.apply(this, arguments);
9147
+ }
9148
+
9149
+ return queryReactions;
9150
+ }()
8859
9151
  }, {
8860
9152
  key: "hydrateActiveChannels",
8861
9153
  value: function hydrateActiveChannels() {
@@ -8924,18 +9216,18 @@ var StreamChat = /*#__PURE__*/function () {
8924
9216
  }, {
8925
9217
  key: "search",
8926
9218
  value: function () {
8927
- var _search = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(filterConditions, query) {
9219
+ var _search = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(filterConditions, query) {
8928
9220
  var options,
8929
9221
  payload,
8930
- _args21 = arguments;
8931
- return _regeneratorRuntime.wrap(function _callee21$(_context21) {
9222
+ _args22 = arguments;
9223
+ return _regeneratorRuntime.wrap(function _callee22$(_context22) {
8932
9224
  while (1) {
8933
- switch (_context21.prev = _context21.next) {
9225
+ switch (_context22.prev = _context22.next) {
8934
9226
  case 0:
8935
- options = _args21.length > 2 && _args21[2] !== undefined ? _args21[2] : {};
9227
+ options = _args22.length > 2 && _args22[2] !== undefined ? _args22[2] : {};
8936
9228
 
8937
9229
  if (!(options.offset && options.next)) {
8938
- _context21.next = 3;
9230
+ _context22.next = 3;
8939
9231
  break;
8940
9232
  }
8941
9233
 
@@ -8949,49 +9241,49 @@ var StreamChat = /*#__PURE__*/function () {
8949
9241
  });
8950
9242
 
8951
9243
  if (!(typeof query === 'string')) {
8952
- _context21.next = 8;
9244
+ _context22.next = 8;
8953
9245
  break;
8954
9246
  }
8955
9247
 
8956
9248
  payload.query = query;
8957
- _context21.next = 13;
9249
+ _context22.next = 13;
8958
9250
  break;
8959
9251
 
8960
9252
  case 8:
8961
9253
  if (!(_typeof(query) === 'object')) {
8962
- _context21.next = 12;
9254
+ _context22.next = 12;
8963
9255
  break;
8964
9256
  }
8965
9257
 
8966
9258
  payload.message_filter_conditions = query;
8967
- _context21.next = 13;
9259
+ _context22.next = 13;
8968
9260
  break;
8969
9261
 
8970
9262
  case 12:
8971
9263
  throw Error("Invalid type ".concat(_typeof(query), " for query parameter"));
8972
9264
 
8973
9265
  case 13:
8974
- _context21.next = 15;
9266
+ _context22.next = 15;
8975
9267
  return this.wsPromise;
8976
9268
 
8977
9269
  case 15:
8978
- _context21.next = 17;
9270
+ _context22.next = 17;
8979
9271
  return this.get(this.baseURL + '/search', {
8980
9272
  payload: payload
8981
9273
  });
8982
9274
 
8983
9275
  case 17:
8984
- return _context21.abrupt("return", _context21.sent);
9276
+ return _context22.abrupt("return", _context22.sent);
8985
9277
 
8986
9278
  case 18:
8987
9279
  case "end":
8988
- return _context21.stop();
9280
+ return _context22.stop();
8989
9281
  }
8990
9282
  }
8991
- }, _callee21, this);
9283
+ }, _callee22, this);
8992
9284
  }));
8993
9285
 
8994
- function search(_x18, _x19) {
9286
+ function search(_x20, _x21) {
8995
9287
  return _search.apply(this, arguments);
8996
9288
  }
8997
9289
 
@@ -9030,12 +9322,12 @@ var StreamChat = /*#__PURE__*/function () {
9030
9322
  }, {
9031
9323
  key: "addDevice",
9032
9324
  value: function () {
9033
- var _addDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(id, push_provider, userID, push_provider_name) {
9034
- return _regeneratorRuntime.wrap(function _callee22$(_context22) {
9325
+ var _addDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(id, push_provider, userID, push_provider_name) {
9326
+ return _regeneratorRuntime.wrap(function _callee23$(_context23) {
9035
9327
  while (1) {
9036
- switch (_context22.prev = _context22.next) {
9328
+ switch (_context23.prev = _context23.next) {
9037
9329
  case 0:
9038
- _context22.next = 2;
9330
+ _context23.next = 2;
9039
9331
  return this.post(this.baseURL + '/devices', _objectSpread(_objectSpread({
9040
9332
  id: id,
9041
9333
  push_provider: push_provider
@@ -9046,17 +9338,17 @@ var StreamChat = /*#__PURE__*/function () {
9046
9338
  } : {}));
9047
9339
 
9048
9340
  case 2:
9049
- return _context22.abrupt("return", _context22.sent);
9341
+ return _context23.abrupt("return", _context23.sent);
9050
9342
 
9051
9343
  case 3:
9052
9344
  case "end":
9053
- return _context22.stop();
9345
+ return _context23.stop();
9054
9346
  }
9055
9347
  }
9056
- }, _callee22, this);
9348
+ }, _callee23, this);
9057
9349
  }));
9058
9350
 
9059
- function addDevice(_x20, _x21, _x22, _x23) {
9351
+ function addDevice(_x22, _x23, _x24, _x25) {
9060
9352
  return _addDevice.apply(this, arguments);
9061
9353
  }
9062
9354
 
@@ -9073,28 +9365,28 @@ var StreamChat = /*#__PURE__*/function () {
9073
9365
  }, {
9074
9366
  key: "getDevices",
9075
9367
  value: function () {
9076
- var _getDevices = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(userID) {
9077
- return _regeneratorRuntime.wrap(function _callee23$(_context23) {
9368
+ var _getDevices = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(userID) {
9369
+ return _regeneratorRuntime.wrap(function _callee24$(_context24) {
9078
9370
  while (1) {
9079
- switch (_context23.prev = _context23.next) {
9371
+ switch (_context24.prev = _context24.next) {
9080
9372
  case 0:
9081
- _context23.next = 2;
9373
+ _context24.next = 2;
9082
9374
  return this.get(this.baseURL + '/devices', userID ? {
9083
9375
  user_id: userID
9084
9376
  } : {});
9085
9377
 
9086
9378
  case 2:
9087
- return _context23.abrupt("return", _context23.sent);
9379
+ return _context24.abrupt("return", _context24.sent);
9088
9380
 
9089
9381
  case 3:
9090
9382
  case "end":
9091
- return _context23.stop();
9383
+ return _context24.stop();
9092
9384
  }
9093
9385
  }
9094
- }, _callee23, this);
9386
+ }, _callee24, this);
9095
9387
  }));
9096
9388
 
9097
- function getDevices(_x24) {
9389
+ function getDevices(_x26) {
9098
9390
  return _getDevices.apply(this, arguments);
9099
9391
  }
9100
9392
 
@@ -9111,28 +9403,28 @@ var StreamChat = /*#__PURE__*/function () {
9111
9403
  }, {
9112
9404
  key: "getUnreadCount",
9113
9405
  value: function () {
9114
- var _getUnreadCount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(userID) {
9115
- return _regeneratorRuntime.wrap(function _callee24$(_context24) {
9406
+ var _getUnreadCount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(userID) {
9407
+ return _regeneratorRuntime.wrap(function _callee25$(_context25) {
9116
9408
  while (1) {
9117
- switch (_context24.prev = _context24.next) {
9409
+ switch (_context25.prev = _context25.next) {
9118
9410
  case 0:
9119
- _context24.next = 2;
9411
+ _context25.next = 2;
9120
9412
  return this.get(this.baseURL + '/unread', userID ? {
9121
9413
  user_id: userID
9122
9414
  } : {});
9123
9415
 
9124
9416
  case 2:
9125
- return _context24.abrupt("return", _context24.sent);
9417
+ return _context25.abrupt("return", _context25.sent);
9126
9418
 
9127
9419
  case 3:
9128
9420
  case "end":
9129
- return _context24.stop();
9421
+ return _context25.stop();
9130
9422
  }
9131
9423
  }
9132
- }, _callee24, this);
9424
+ }, _callee25, this);
9133
9425
  }));
9134
9426
 
9135
- function getUnreadCount(_x25) {
9427
+ function getUnreadCount(_x27) {
9136
9428
  return _getUnreadCount.apply(this, arguments);
9137
9429
  }
9138
9430
 
@@ -9149,28 +9441,28 @@ var StreamChat = /*#__PURE__*/function () {
9149
9441
  }, {
9150
9442
  key: "getUnreadCountBatch",
9151
9443
  value: function () {
9152
- var _getUnreadCountBatch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(userIDs) {
9153
- return _regeneratorRuntime.wrap(function _callee25$(_context25) {
9444
+ var _getUnreadCountBatch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(userIDs) {
9445
+ return _regeneratorRuntime.wrap(function _callee26$(_context26) {
9154
9446
  while (1) {
9155
- switch (_context25.prev = _context25.next) {
9447
+ switch (_context26.prev = _context26.next) {
9156
9448
  case 0:
9157
- _context25.next = 2;
9449
+ _context26.next = 2;
9158
9450
  return this.post(this.baseURL + '/unread_batch', {
9159
9451
  user_ids: userIDs
9160
9452
  });
9161
9453
 
9162
9454
  case 2:
9163
- return _context25.abrupt("return", _context25.sent);
9455
+ return _context26.abrupt("return", _context26.sent);
9164
9456
 
9165
9457
  case 3:
9166
9458
  case "end":
9167
- return _context25.stop();
9459
+ return _context26.stop();
9168
9460
  }
9169
9461
  }
9170
- }, _callee25, this);
9462
+ }, _callee26, this);
9171
9463
  }));
9172
9464
 
9173
- function getUnreadCountBatch(_x26) {
9465
+ function getUnreadCountBatch(_x28) {
9174
9466
  return _getUnreadCountBatch.apply(this, arguments);
9175
9467
  }
9176
9468
 
@@ -9187,12 +9479,12 @@ var StreamChat = /*#__PURE__*/function () {
9187
9479
  }, {
9188
9480
  key: "removeDevice",
9189
9481
  value: function () {
9190
- var _removeDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(id, userID) {
9191
- return _regeneratorRuntime.wrap(function _callee26$(_context26) {
9482
+ var _removeDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(id, userID) {
9483
+ return _regeneratorRuntime.wrap(function _callee27$(_context27) {
9192
9484
  while (1) {
9193
- switch (_context26.prev = _context26.next) {
9485
+ switch (_context27.prev = _context27.next) {
9194
9486
  case 0:
9195
- _context26.next = 2;
9487
+ _context27.next = 2;
9196
9488
  return this.delete(this.baseURL + '/devices', _objectSpread({
9197
9489
  id: id
9198
9490
  }, userID ? {
@@ -9200,17 +9492,17 @@ var StreamChat = /*#__PURE__*/function () {
9200
9492
  } : {}));
9201
9493
 
9202
9494
  case 2:
9203
- return _context26.abrupt("return", _context26.sent);
9495
+ return _context27.abrupt("return", _context27.sent);
9204
9496
 
9205
9497
  case 3:
9206
9498
  case "end":
9207
- return _context26.stop();
9499
+ return _context27.stop();
9208
9500
  }
9209
9501
  }
9210
- }, _callee26, this);
9502
+ }, _callee27, this);
9211
9503
  }));
9212
9504
 
9213
- function removeDevice(_x27, _x28) {
9505
+ function removeDevice(_x29, _x30) {
9214
9506
  return _removeDevice.apply(this, arguments);
9215
9507
  }
9216
9508
 
@@ -9227,15 +9519,15 @@ var StreamChat = /*#__PURE__*/function () {
9227
9519
  }, {
9228
9520
  key: "getRateLimits",
9229
9521
  value: function () {
9230
- var _getRateLimits = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(params) {
9522
+ var _getRateLimits = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(params) {
9231
9523
  var _ref7, serverSide, web, android, ios, endpoints;
9232
9524
 
9233
- return _regeneratorRuntime.wrap(function _callee27$(_context27) {
9525
+ return _regeneratorRuntime.wrap(function _callee28$(_context28) {
9234
9526
  while (1) {
9235
- switch (_context27.prev = _context27.next) {
9527
+ switch (_context28.prev = _context28.next) {
9236
9528
  case 0:
9237
9529
  _ref7 = params || {}, serverSide = _ref7.serverSide, web = _ref7.web, android = _ref7.android, ios = _ref7.ios, endpoints = _ref7.endpoints;
9238
- return _context27.abrupt("return", this.get(this.baseURL + '/rate_limits', {
9530
+ return _context28.abrupt("return", this.get(this.baseURL + '/rate_limits', {
9239
9531
  server_side: serverSide,
9240
9532
  web: web,
9241
9533
  android: android,
@@ -9245,13 +9537,13 @@ var StreamChat = /*#__PURE__*/function () {
9245
9537
 
9246
9538
  case 2:
9247
9539
  case "end":
9248
- return _context27.stop();
9540
+ return _context28.stop();
9249
9541
  }
9250
9542
  }
9251
- }, _callee27, this);
9543
+ }, _callee28, this);
9252
9544
  }));
9253
9545
 
9254
- function getRateLimits(_x29) {
9546
+ function getRateLimits(_x31) {
9255
9547
  return _getRateLimits.apply(this, arguments);
9256
9548
  }
9257
9549
 
@@ -9342,26 +9634,26 @@ var StreamChat = /*#__PURE__*/function () {
9342
9634
  * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>} list of updated users
9343
9635
  */
9344
9636
  function () {
9345
- var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(partialUserObject) {
9346
- return _regeneratorRuntime.wrap(function _callee28$(_context28) {
9637
+ var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(partialUserObject) {
9638
+ return _regeneratorRuntime.wrap(function _callee29$(_context29) {
9347
9639
  while (1) {
9348
- switch (_context28.prev = _context28.next) {
9640
+ switch (_context29.prev = _context29.next) {
9349
9641
  case 0:
9350
- _context28.next = 2;
9642
+ _context29.next = 2;
9351
9643
  return this.partialUpdateUsers([partialUserObject]);
9352
9644
 
9353
9645
  case 2:
9354
- return _context28.abrupt("return", _context28.sent);
9646
+ return _context29.abrupt("return", _context29.sent);
9355
9647
 
9356
9648
  case 3:
9357
9649
  case "end":
9358
- return _context28.stop();
9650
+ return _context29.stop();
9359
9651
  }
9360
9652
  }
9361
- }, _callee28, this);
9653
+ }, _callee29, this);
9362
9654
  }));
9363
9655
 
9364
- function partialUpdateUser(_x30) {
9656
+ function partialUpdateUser(_x32) {
9365
9657
  return _partialUpdateUser.apply(this, arguments);
9366
9658
  }
9367
9659
 
@@ -9378,29 +9670,29 @@ var StreamChat = /*#__PURE__*/function () {
9378
9670
  }, {
9379
9671
  key: "upsertUsers",
9380
9672
  value: function () {
9381
- var _upsertUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(users) {
9673
+ var _upsertUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(users) {
9382
9674
  var userMap, _iterator4, _step4, userObject;
9383
9675
 
9384
- return _regeneratorRuntime.wrap(function _callee29$(_context29) {
9676
+ return _regeneratorRuntime.wrap(function _callee30$(_context30) {
9385
9677
  while (1) {
9386
- switch (_context29.prev = _context29.next) {
9678
+ switch (_context30.prev = _context30.next) {
9387
9679
  case 0:
9388
9680
  userMap = {};
9389
9681
  _iterator4 = _createForOfIteratorHelper(users);
9390
- _context29.prev = 2;
9682
+ _context30.prev = 2;
9391
9683
 
9392
9684
  _iterator4.s();
9393
9685
 
9394
9686
  case 4:
9395
9687
  if ((_step4 = _iterator4.n()).done) {
9396
- _context29.next = 11;
9688
+ _context30.next = 11;
9397
9689
  break;
9398
9690
  }
9399
9691
 
9400
9692
  userObject = _step4.value;
9401
9693
 
9402
9694
  if (userObject.id) {
9403
- _context29.next = 8;
9695
+ _context30.next = 8;
9404
9696
  break;
9405
9697
  }
9406
9698
 
@@ -9410,44 +9702,44 @@ var StreamChat = /*#__PURE__*/function () {
9410
9702
  userMap[userObject.id] = userObject;
9411
9703
 
9412
9704
  case 9:
9413
- _context29.next = 4;
9705
+ _context30.next = 4;
9414
9706
  break;
9415
9707
 
9416
9708
  case 11:
9417
- _context29.next = 16;
9709
+ _context30.next = 16;
9418
9710
  break;
9419
9711
 
9420
9712
  case 13:
9421
- _context29.prev = 13;
9422
- _context29.t0 = _context29["catch"](2);
9713
+ _context30.prev = 13;
9714
+ _context30.t0 = _context30["catch"](2);
9423
9715
 
9424
- _iterator4.e(_context29.t0);
9716
+ _iterator4.e(_context30.t0);
9425
9717
 
9426
9718
  case 16:
9427
- _context29.prev = 16;
9719
+ _context30.prev = 16;
9428
9720
 
9429
9721
  _iterator4.f();
9430
9722
 
9431
- return _context29.finish(16);
9723
+ return _context30.finish(16);
9432
9724
 
9433
9725
  case 19:
9434
- _context29.next = 21;
9726
+ _context30.next = 21;
9435
9727
  return this.post(this.baseURL + '/users', {
9436
9728
  users: userMap
9437
9729
  });
9438
9730
 
9439
9731
  case 21:
9440
- return _context29.abrupt("return", _context29.sent);
9732
+ return _context30.abrupt("return", _context30.sent);
9441
9733
 
9442
9734
  case 22:
9443
9735
  case "end":
9444
- return _context29.stop();
9736
+ return _context30.stop();
9445
9737
  }
9446
9738
  }
9447
- }, _callee29, this, [[2, 13, 16, 19]]);
9739
+ }, _callee30, this, [[2, 13, 16, 19]]);
9448
9740
  }));
9449
9741
 
9450
- function upsertUsers(_x31) {
9742
+ function upsertUsers(_x33) {
9451
9743
  return _upsertUsers.apply(this, arguments);
9452
9744
  }
9453
9745
 
@@ -9495,72 +9787,72 @@ var StreamChat = /*#__PURE__*/function () {
9495
9787
  * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
9496
9788
  */
9497
9789
  function () {
9498
- var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(users) {
9790
+ var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(users) {
9499
9791
  var _iterator5, _step5, userObject;
9500
9792
 
9501
- return _regeneratorRuntime.wrap(function _callee30$(_context30) {
9793
+ return _regeneratorRuntime.wrap(function _callee31$(_context31) {
9502
9794
  while (1) {
9503
- switch (_context30.prev = _context30.next) {
9795
+ switch (_context31.prev = _context31.next) {
9504
9796
  case 0:
9505
9797
  _iterator5 = _createForOfIteratorHelper(users);
9506
- _context30.prev = 1;
9798
+ _context31.prev = 1;
9507
9799
 
9508
9800
  _iterator5.s();
9509
9801
 
9510
9802
  case 3:
9511
9803
  if ((_step5 = _iterator5.n()).done) {
9512
- _context30.next = 9;
9804
+ _context31.next = 9;
9513
9805
  break;
9514
9806
  }
9515
9807
 
9516
9808
  userObject = _step5.value;
9517
9809
 
9518
9810
  if (userObject.id) {
9519
- _context30.next = 7;
9811
+ _context31.next = 7;
9520
9812
  break;
9521
9813
  }
9522
9814
 
9523
9815
  throw Error('User ID is required when updating a user');
9524
9816
 
9525
9817
  case 7:
9526
- _context30.next = 3;
9818
+ _context31.next = 3;
9527
9819
  break;
9528
9820
 
9529
9821
  case 9:
9530
- _context30.next = 14;
9822
+ _context31.next = 14;
9531
9823
  break;
9532
9824
 
9533
9825
  case 11:
9534
- _context30.prev = 11;
9535
- _context30.t0 = _context30["catch"](1);
9826
+ _context31.prev = 11;
9827
+ _context31.t0 = _context31["catch"](1);
9536
9828
 
9537
- _iterator5.e(_context30.t0);
9829
+ _iterator5.e(_context31.t0);
9538
9830
 
9539
9831
  case 14:
9540
- _context30.prev = 14;
9832
+ _context31.prev = 14;
9541
9833
 
9542
9834
  _iterator5.f();
9543
9835
 
9544
- return _context30.finish(14);
9836
+ return _context31.finish(14);
9545
9837
 
9546
9838
  case 17:
9547
- _context30.next = 19;
9839
+ _context31.next = 19;
9548
9840
  return this.patch(this.baseURL + '/users', {
9549
9841
  users: users
9550
9842
  });
9551
9843
 
9552
9844
  case 19:
9553
- return _context30.abrupt("return", _context30.sent);
9845
+ return _context31.abrupt("return", _context31.sent);
9554
9846
 
9555
9847
  case 20:
9556
9848
  case "end":
9557
- return _context30.stop();
9849
+ return _context31.stop();
9558
9850
  }
9559
9851
  }
9560
- }, _callee30, this, [[1, 11, 14, 17]]);
9852
+ }, _callee31, this, [[1, 11, 14, 17]]);
9561
9853
  }));
9562
9854
 
9563
- function partialUpdateUsers(_x32) {
9855
+ function partialUpdateUsers(_x34) {
9564
9856
  return _partialUpdateUsers.apply(this, arguments);
9565
9857
  }
9566
9858
 
@@ -9569,26 +9861,26 @@ var StreamChat = /*#__PURE__*/function () {
9569
9861
  }, {
9570
9862
  key: "deleteUser",
9571
9863
  value: function () {
9572
- var _deleteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(userID, params) {
9573
- return _regeneratorRuntime.wrap(function _callee31$(_context31) {
9864
+ var _deleteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(userID, params) {
9865
+ return _regeneratorRuntime.wrap(function _callee32$(_context32) {
9574
9866
  while (1) {
9575
- switch (_context31.prev = _context31.next) {
9867
+ switch (_context32.prev = _context32.next) {
9576
9868
  case 0:
9577
- _context31.next = 2;
9869
+ _context32.next = 2;
9578
9870
  return this.delete(this.baseURL + "/users/".concat(userID), params);
9579
9871
 
9580
9872
  case 2:
9581
- return _context31.abrupt("return", _context31.sent);
9873
+ return _context32.abrupt("return", _context32.sent);
9582
9874
 
9583
9875
  case 3:
9584
9876
  case "end":
9585
- return _context31.stop();
9877
+ return _context32.stop();
9586
9878
  }
9587
9879
  }
9588
- }, _callee31, this);
9880
+ }, _callee32, this);
9589
9881
  }));
9590
9882
 
9591
- function deleteUser(_x33, _x34) {
9883
+ function deleteUser(_x35, _x36) {
9592
9884
  return _deleteUser.apply(this, arguments);
9593
9885
  }
9594
9886
 
@@ -9605,28 +9897,28 @@ var StreamChat = /*#__PURE__*/function () {
9605
9897
  }, {
9606
9898
  key: "restoreUsers",
9607
9899
  value: function () {
9608
- var _restoreUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(user_ids) {
9609
- return _regeneratorRuntime.wrap(function _callee32$(_context32) {
9900
+ var _restoreUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(user_ids) {
9901
+ return _regeneratorRuntime.wrap(function _callee33$(_context33) {
9610
9902
  while (1) {
9611
- switch (_context32.prev = _context32.next) {
9903
+ switch (_context33.prev = _context33.next) {
9612
9904
  case 0:
9613
- _context32.next = 2;
9905
+ _context33.next = 2;
9614
9906
  return this.post(this.baseURL + "/users/restore", {
9615
9907
  user_ids: user_ids
9616
9908
  });
9617
9909
 
9618
9910
  case 2:
9619
- return _context32.abrupt("return", _context32.sent);
9911
+ return _context33.abrupt("return", _context33.sent);
9620
9912
 
9621
9913
  case 3:
9622
9914
  case "end":
9623
- return _context32.stop();
9915
+ return _context33.stop();
9624
9916
  }
9625
9917
  }
9626
- }, _callee32, this);
9918
+ }, _callee33, this);
9627
9919
  }));
9628
9920
 
9629
- function restoreUsers(_x35) {
9921
+ function restoreUsers(_x37) {
9630
9922
  return _restoreUsers.apply(this, arguments);
9631
9923
  }
9632
9924
 
@@ -9644,26 +9936,26 @@ var StreamChat = /*#__PURE__*/function () {
9644
9936
  }, {
9645
9937
  key: "reactivateUser",
9646
9938
  value: function () {
9647
- var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(userID, options) {
9648
- return _regeneratorRuntime.wrap(function _callee33$(_context33) {
9939
+ var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(userID, options) {
9940
+ return _regeneratorRuntime.wrap(function _callee34$(_context34) {
9649
9941
  while (1) {
9650
- switch (_context33.prev = _context33.next) {
9942
+ switch (_context34.prev = _context34.next) {
9651
9943
  case 0:
9652
- _context33.next = 2;
9944
+ _context34.next = 2;
9653
9945
  return this.post(this.baseURL + "/users/".concat(userID, "/reactivate"), _objectSpread({}, options));
9654
9946
 
9655
9947
  case 2:
9656
- return _context33.abrupt("return", _context33.sent);
9948
+ return _context34.abrupt("return", _context34.sent);
9657
9949
 
9658
9950
  case 3:
9659
9951
  case "end":
9660
- return _context33.stop();
9952
+ return _context34.stop();
9661
9953
  }
9662
9954
  }
9663
- }, _callee33, this);
9955
+ }, _callee34, this);
9664
9956
  }));
9665
9957
 
9666
- function reactivateUser(_x36, _x37) {
9958
+ function reactivateUser(_x38, _x39) {
9667
9959
  return _reactivateUser.apply(this, arguments);
9668
9960
  }
9669
9961
 
@@ -9681,28 +9973,28 @@ var StreamChat = /*#__PURE__*/function () {
9681
9973
  }, {
9682
9974
  key: "reactivateUsers",
9683
9975
  value: function () {
9684
- var _reactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(user_ids, options) {
9685
- return _regeneratorRuntime.wrap(function _callee34$(_context34) {
9976
+ var _reactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(user_ids, options) {
9977
+ return _regeneratorRuntime.wrap(function _callee35$(_context35) {
9686
9978
  while (1) {
9687
- switch (_context34.prev = _context34.next) {
9979
+ switch (_context35.prev = _context35.next) {
9688
9980
  case 0:
9689
- _context34.next = 2;
9981
+ _context35.next = 2;
9690
9982
  return this.post(this.baseURL + "/users/reactivate", _objectSpread({
9691
9983
  user_ids: user_ids
9692
9984
  }, options));
9693
9985
 
9694
9986
  case 2:
9695
- return _context34.abrupt("return", _context34.sent);
9987
+ return _context35.abrupt("return", _context35.sent);
9696
9988
 
9697
9989
  case 3:
9698
9990
  case "end":
9699
- return _context34.stop();
9991
+ return _context35.stop();
9700
9992
  }
9701
9993
  }
9702
- }, _callee34, this);
9994
+ }, _callee35, this);
9703
9995
  }));
9704
9996
 
9705
- function reactivateUsers(_x38, _x39) {
9997
+ function reactivateUsers(_x40, _x41) {
9706
9998
  return _reactivateUsers.apply(this, arguments);
9707
9999
  }
9708
10000
 
@@ -9720,26 +10012,26 @@ var StreamChat = /*#__PURE__*/function () {
9720
10012
  }, {
9721
10013
  key: "deactivateUser",
9722
10014
  value: function () {
9723
- var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(userID, options) {
9724
- return _regeneratorRuntime.wrap(function _callee35$(_context35) {
10015
+ var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(userID, options) {
10016
+ return _regeneratorRuntime.wrap(function _callee36$(_context36) {
9725
10017
  while (1) {
9726
- switch (_context35.prev = _context35.next) {
10018
+ switch (_context36.prev = _context36.next) {
9727
10019
  case 0:
9728
- _context35.next = 2;
10020
+ _context36.next = 2;
9729
10021
  return this.post(this.baseURL + "/users/".concat(userID, "/deactivate"), _objectSpread({}, options));
9730
10022
 
9731
10023
  case 2:
9732
- return _context35.abrupt("return", _context35.sent);
10024
+ return _context36.abrupt("return", _context36.sent);
9733
10025
 
9734
10026
  case 3:
9735
10027
  case "end":
9736
- return _context35.stop();
10028
+ return _context36.stop();
9737
10029
  }
9738
10030
  }
9739
- }, _callee35, this);
10031
+ }, _callee36, this);
9740
10032
  }));
9741
10033
 
9742
- function deactivateUser(_x40, _x41) {
10034
+ function deactivateUser(_x42, _x43) {
9743
10035
  return _deactivateUser.apply(this, arguments);
9744
10036
  }
9745
10037
 
@@ -9757,28 +10049,28 @@ var StreamChat = /*#__PURE__*/function () {
9757
10049
  }, {
9758
10050
  key: "deactivateUsers",
9759
10051
  value: function () {
9760
- var _deactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(user_ids, options) {
9761
- return _regeneratorRuntime.wrap(function _callee36$(_context36) {
10052
+ var _deactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(user_ids, options) {
10053
+ return _regeneratorRuntime.wrap(function _callee37$(_context37) {
9762
10054
  while (1) {
9763
- switch (_context36.prev = _context36.next) {
10055
+ switch (_context37.prev = _context37.next) {
9764
10056
  case 0:
9765
- _context36.next = 2;
10057
+ _context37.next = 2;
9766
10058
  return this.post(this.baseURL + "/users/deactivate", _objectSpread({
9767
10059
  user_ids: user_ids
9768
10060
  }, options));
9769
10061
 
9770
10062
  case 2:
9771
- return _context36.abrupt("return", _context36.sent);
10063
+ return _context37.abrupt("return", _context37.sent);
9772
10064
 
9773
10065
  case 3:
9774
10066
  case "end":
9775
- return _context36.stop();
10067
+ return _context37.stop();
9776
10068
  }
9777
10069
  }
9778
- }, _callee36, this);
10070
+ }, _callee37, this);
9779
10071
  }));
9780
10072
 
9781
- function deactivateUsers(_x42, _x43) {
10073
+ function deactivateUsers(_x44, _x45) {
9782
10074
  return _deactivateUsers.apply(this, arguments);
9783
10075
  }
9784
10076
 
@@ -9787,26 +10079,26 @@ var StreamChat = /*#__PURE__*/function () {
9787
10079
  }, {
9788
10080
  key: "exportUser",
9789
10081
  value: function () {
9790
- var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(userID, options) {
9791
- return _regeneratorRuntime.wrap(function _callee37$(_context37) {
10082
+ var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(userID, options) {
10083
+ return _regeneratorRuntime.wrap(function _callee38$(_context38) {
9792
10084
  while (1) {
9793
- switch (_context37.prev = _context37.next) {
10085
+ switch (_context38.prev = _context38.next) {
9794
10086
  case 0:
9795
- _context37.next = 2;
10087
+ _context38.next = 2;
9796
10088
  return this.get(this.baseURL + "/users/".concat(userID, "/export"), _objectSpread({}, options));
9797
10089
 
9798
10090
  case 2:
9799
- return _context37.abrupt("return", _context37.sent);
10091
+ return _context38.abrupt("return", _context38.sent);
9800
10092
 
9801
10093
  case 3:
9802
10094
  case "end":
9803
- return _context37.stop();
10095
+ return _context38.stop();
9804
10096
  }
9805
10097
  }
9806
- }, _callee37, this);
10098
+ }, _callee38, this);
9807
10099
  }));
9808
10100
 
9809
- function exportUser(_x44, _x45) {
10101
+ function exportUser(_x46, _x47) {
9810
10102
  return _exportUser.apply(this, arguments);
9811
10103
  }
9812
10104
 
@@ -9822,28 +10114,28 @@ var StreamChat = /*#__PURE__*/function () {
9822
10114
  }, {
9823
10115
  key: "banUser",
9824
10116
  value: function () {
9825
- var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(targetUserID, options) {
9826
- return _regeneratorRuntime.wrap(function _callee38$(_context38) {
10117
+ var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(targetUserID, options) {
10118
+ return _regeneratorRuntime.wrap(function _callee39$(_context39) {
9827
10119
  while (1) {
9828
- switch (_context38.prev = _context38.next) {
10120
+ switch (_context39.prev = _context39.next) {
9829
10121
  case 0:
9830
- _context38.next = 2;
10122
+ _context39.next = 2;
9831
10123
  return this.post(this.baseURL + '/moderation/ban', _objectSpread({
9832
10124
  target_user_id: targetUserID
9833
10125
  }, options));
9834
10126
 
9835
10127
  case 2:
9836
- return _context38.abrupt("return", _context38.sent);
10128
+ return _context39.abrupt("return", _context39.sent);
9837
10129
 
9838
10130
  case 3:
9839
10131
  case "end":
9840
- return _context38.stop();
10132
+ return _context39.stop();
9841
10133
  }
9842
10134
  }
9843
- }, _callee38, this);
10135
+ }, _callee39, this);
9844
10136
  }));
9845
10137
 
9846
- function banUser(_x46, _x47) {
10138
+ function banUser(_x48, _x49) {
9847
10139
  return _banUser.apply(this, arguments);
9848
10140
  }
9849
10141
 
@@ -9859,28 +10151,28 @@ var StreamChat = /*#__PURE__*/function () {
9859
10151
  }, {
9860
10152
  key: "unbanUser",
9861
10153
  value: function () {
9862
- var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(targetUserID, options) {
9863
- return _regeneratorRuntime.wrap(function _callee39$(_context39) {
10154
+ var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(targetUserID, options) {
10155
+ return _regeneratorRuntime.wrap(function _callee40$(_context40) {
9864
10156
  while (1) {
9865
- switch (_context39.prev = _context39.next) {
10157
+ switch (_context40.prev = _context40.next) {
9866
10158
  case 0:
9867
- _context39.next = 2;
10159
+ _context40.next = 2;
9868
10160
  return this.delete(this.baseURL + '/moderation/ban', _objectSpread({
9869
10161
  target_user_id: targetUserID
9870
10162
  }, options));
9871
10163
 
9872
10164
  case 2:
9873
- return _context39.abrupt("return", _context39.sent);
10165
+ return _context40.abrupt("return", _context40.sent);
9874
10166
 
9875
10167
  case 3:
9876
10168
  case "end":
9877
- return _context39.stop();
10169
+ return _context40.stop();
9878
10170
  }
9879
10171
  }
9880
- }, _callee39, this);
10172
+ }, _callee40, this);
9881
10173
  }));
9882
10174
 
9883
- function unbanUser(_x48, _x49) {
10175
+ function unbanUser(_x50, _x51) {
9884
10176
  return _unbanUser.apply(this, arguments);
9885
10177
  }
9886
10178
 
@@ -9896,28 +10188,28 @@ var StreamChat = /*#__PURE__*/function () {
9896
10188
  }, {
9897
10189
  key: "shadowBan",
9898
10190
  value: function () {
9899
- var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(targetUserID, options) {
9900
- return _regeneratorRuntime.wrap(function _callee40$(_context40) {
10191
+ var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(targetUserID, options) {
10192
+ return _regeneratorRuntime.wrap(function _callee41$(_context41) {
9901
10193
  while (1) {
9902
- switch (_context40.prev = _context40.next) {
10194
+ switch (_context41.prev = _context41.next) {
9903
10195
  case 0:
9904
- _context40.next = 2;
10196
+ _context41.next = 2;
9905
10197
  return this.banUser(targetUserID, _objectSpread({
9906
10198
  shadow: true
9907
10199
  }, options));
9908
10200
 
9909
10201
  case 2:
9910
- return _context40.abrupt("return", _context40.sent);
10202
+ return _context41.abrupt("return", _context41.sent);
9911
10203
 
9912
10204
  case 3:
9913
10205
  case "end":
9914
- return _context40.stop();
10206
+ return _context41.stop();
9915
10207
  }
9916
10208
  }
9917
- }, _callee40, this);
10209
+ }, _callee41, this);
9918
10210
  }));
9919
10211
 
9920
- function shadowBan(_x50, _x51) {
10212
+ function shadowBan(_x52, _x53) {
9921
10213
  return _shadowBan.apply(this, arguments);
9922
10214
  }
9923
10215
 
@@ -9933,28 +10225,28 @@ var StreamChat = /*#__PURE__*/function () {
9933
10225
  }, {
9934
10226
  key: "removeShadowBan",
9935
10227
  value: function () {
9936
- var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(targetUserID, options) {
9937
- return _regeneratorRuntime.wrap(function _callee41$(_context41) {
10228
+ var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(targetUserID, options) {
10229
+ return _regeneratorRuntime.wrap(function _callee42$(_context42) {
9938
10230
  while (1) {
9939
- switch (_context41.prev = _context41.next) {
10231
+ switch (_context42.prev = _context42.next) {
9940
10232
  case 0:
9941
- _context41.next = 2;
10233
+ _context42.next = 2;
9942
10234
  return this.unbanUser(targetUserID, _objectSpread({
9943
10235
  shadow: true
9944
10236
  }, options));
9945
10237
 
9946
10238
  case 2:
9947
- return _context41.abrupt("return", _context41.sent);
10239
+ return _context42.abrupt("return", _context42.sent);
9948
10240
 
9949
10241
  case 3:
9950
10242
  case "end":
9951
- return _context41.stop();
10243
+ return _context42.stop();
9952
10244
  }
9953
10245
  }
9954
- }, _callee41, this);
10246
+ }, _callee42, this);
9955
10247
  }));
9956
10248
 
9957
- function removeShadowBan(_x52, _x53) {
10249
+ function removeShadowBan(_x54, _x55) {
9958
10250
  return _removeShadowBan.apply(this, arguments);
9959
10251
  }
9960
10252
 
@@ -9971,15 +10263,15 @@ var StreamChat = /*#__PURE__*/function () {
9971
10263
  }, {
9972
10264
  key: "muteUser",
9973
10265
  value: function () {
9974
- var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(targetID, userID) {
10266
+ var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(targetID, userID) {
9975
10267
  var options,
9976
- _args42 = arguments;
9977
- return _regeneratorRuntime.wrap(function _callee42$(_context42) {
10268
+ _args43 = arguments;
10269
+ return _regeneratorRuntime.wrap(function _callee43$(_context43) {
9978
10270
  while (1) {
9979
- switch (_context42.prev = _context42.next) {
10271
+ switch (_context43.prev = _context43.next) {
9980
10272
  case 0:
9981
- options = _args42.length > 2 && _args42[2] !== undefined ? _args42[2] : {};
9982
- _context42.next = 3;
10273
+ options = _args43.length > 2 && _args43[2] !== undefined ? _args43[2] : {};
10274
+ _context43.next = 3;
9983
10275
  return this.post(this.baseURL + '/moderation/mute', _objectSpread(_objectSpread({
9984
10276
  target_id: targetID
9985
10277
  }, userID ? {
@@ -9987,17 +10279,17 @@ var StreamChat = /*#__PURE__*/function () {
9987
10279
  } : {}), options));
9988
10280
 
9989
10281
  case 3:
9990
- return _context42.abrupt("return", _context42.sent);
10282
+ return _context43.abrupt("return", _context43.sent);
9991
10283
 
9992
10284
  case 4:
9993
10285
  case "end":
9994
- return _context42.stop();
10286
+ return _context43.stop();
9995
10287
  }
9996
10288
  }
9997
- }, _callee42, this);
10289
+ }, _callee43, this);
9998
10290
  }));
9999
10291
 
10000
- function muteUser(_x54, _x55) {
10292
+ function muteUser(_x56, _x57) {
10001
10293
  return _muteUser.apply(this, arguments);
10002
10294
  }
10003
10295
 
@@ -10013,12 +10305,12 @@ var StreamChat = /*#__PURE__*/function () {
10013
10305
  }, {
10014
10306
  key: "unmuteUser",
10015
10307
  value: function () {
10016
- var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(targetID, currentUserID) {
10017
- return _regeneratorRuntime.wrap(function _callee43$(_context43) {
10308
+ var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(targetID, currentUserID) {
10309
+ return _regeneratorRuntime.wrap(function _callee44$(_context44) {
10018
10310
  while (1) {
10019
- switch (_context43.prev = _context43.next) {
10311
+ switch (_context44.prev = _context44.next) {
10020
10312
  case 0:
10021
- _context43.next = 2;
10313
+ _context44.next = 2;
10022
10314
  return this.post(this.baseURL + '/moderation/unmute', _objectSpread({
10023
10315
  target_id: targetID
10024
10316
  }, currentUserID ? {
@@ -10026,17 +10318,17 @@ var StreamChat = /*#__PURE__*/function () {
10026
10318
  } : {}));
10027
10319
 
10028
10320
  case 2:
10029
- return _context43.abrupt("return", _context43.sent);
10321
+ return _context44.abrupt("return", _context44.sent);
10030
10322
 
10031
10323
  case 3:
10032
10324
  case "end":
10033
- return _context43.stop();
10325
+ return _context44.stop();
10034
10326
  }
10035
10327
  }
10036
- }, _callee43, this);
10328
+ }, _callee44, this);
10037
10329
  }));
10038
10330
 
10039
- function unmuteUser(_x56, _x57) {
10331
+ function unmuteUser(_x58, _x59) {
10040
10332
  return _unmuteUser.apply(this, arguments);
10041
10333
  }
10042
10334
 
@@ -10071,31 +10363,31 @@ var StreamChat = /*#__PURE__*/function () {
10071
10363
  }, {
10072
10364
  key: "flagMessage",
10073
10365
  value: function () {
10074
- var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(targetMessageID) {
10366
+ var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(targetMessageID) {
10075
10367
  var options,
10076
- _args44 = arguments;
10077
- return _regeneratorRuntime.wrap(function _callee44$(_context44) {
10368
+ _args45 = arguments;
10369
+ return _regeneratorRuntime.wrap(function _callee45$(_context45) {
10078
10370
  while (1) {
10079
- switch (_context44.prev = _context44.next) {
10371
+ switch (_context45.prev = _context45.next) {
10080
10372
  case 0:
10081
- options = _args44.length > 1 && _args44[1] !== undefined ? _args44[1] : {};
10082
- _context44.next = 3;
10373
+ options = _args45.length > 1 && _args45[1] !== undefined ? _args45[1] : {};
10374
+ _context45.next = 3;
10083
10375
  return this.post(this.baseURL + '/moderation/flag', _objectSpread({
10084
10376
  target_message_id: targetMessageID
10085
10377
  }, options));
10086
10378
 
10087
10379
  case 3:
10088
- return _context44.abrupt("return", _context44.sent);
10380
+ return _context45.abrupt("return", _context45.sent);
10089
10381
 
10090
10382
  case 4:
10091
10383
  case "end":
10092
- return _context44.stop();
10384
+ return _context45.stop();
10093
10385
  }
10094
10386
  }
10095
- }, _callee44, this);
10387
+ }, _callee45, this);
10096
10388
  }));
10097
10389
 
10098
- function flagMessage(_x58) {
10390
+ function flagMessage(_x60) {
10099
10391
  return _flagMessage.apply(this, arguments);
10100
10392
  }
10101
10393
 
@@ -10111,31 +10403,31 @@ var StreamChat = /*#__PURE__*/function () {
10111
10403
  }, {
10112
10404
  key: "flagUser",
10113
10405
  value: function () {
10114
- var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(targetID) {
10406
+ var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(targetID) {
10115
10407
  var options,
10116
- _args45 = arguments;
10117
- return _regeneratorRuntime.wrap(function _callee45$(_context45) {
10408
+ _args46 = arguments;
10409
+ return _regeneratorRuntime.wrap(function _callee46$(_context46) {
10118
10410
  while (1) {
10119
- switch (_context45.prev = _context45.next) {
10411
+ switch (_context46.prev = _context46.next) {
10120
10412
  case 0:
10121
- options = _args45.length > 1 && _args45[1] !== undefined ? _args45[1] : {};
10122
- _context45.next = 3;
10413
+ options = _args46.length > 1 && _args46[1] !== undefined ? _args46[1] : {};
10414
+ _context46.next = 3;
10123
10415
  return this.post(this.baseURL + '/moderation/flag', _objectSpread({
10124
10416
  target_user_id: targetID
10125
10417
  }, options));
10126
10418
 
10127
10419
  case 3:
10128
- return _context45.abrupt("return", _context45.sent);
10420
+ return _context46.abrupt("return", _context46.sent);
10129
10421
 
10130
10422
  case 4:
10131
10423
  case "end":
10132
- return _context45.stop();
10424
+ return _context46.stop();
10133
10425
  }
10134
10426
  }
10135
- }, _callee45, this);
10427
+ }, _callee46, this);
10136
10428
  }));
10137
10429
 
10138
- function flagUser(_x59) {
10430
+ function flagUser(_x61) {
10139
10431
  return _flagUser.apply(this, arguments);
10140
10432
  }
10141
10433
 
@@ -10151,31 +10443,31 @@ var StreamChat = /*#__PURE__*/function () {
10151
10443
  }, {
10152
10444
  key: "unflagMessage",
10153
10445
  value: function () {
10154
- var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(targetMessageID) {
10446
+ var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(targetMessageID) {
10155
10447
  var options,
10156
- _args46 = arguments;
10157
- return _regeneratorRuntime.wrap(function _callee46$(_context46) {
10448
+ _args47 = arguments;
10449
+ return _regeneratorRuntime.wrap(function _callee47$(_context47) {
10158
10450
  while (1) {
10159
- switch (_context46.prev = _context46.next) {
10451
+ switch (_context47.prev = _context47.next) {
10160
10452
  case 0:
10161
- options = _args46.length > 1 && _args46[1] !== undefined ? _args46[1] : {};
10162
- _context46.next = 3;
10453
+ options = _args47.length > 1 && _args47[1] !== undefined ? _args47[1] : {};
10454
+ _context47.next = 3;
10163
10455
  return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
10164
10456
  target_message_id: targetMessageID
10165
10457
  }, options));
10166
10458
 
10167
10459
  case 3:
10168
- return _context46.abrupt("return", _context46.sent);
10460
+ return _context47.abrupt("return", _context47.sent);
10169
10461
 
10170
10462
  case 4:
10171
10463
  case "end":
10172
- return _context46.stop();
10464
+ return _context47.stop();
10173
10465
  }
10174
10466
  }
10175
- }, _callee46, this);
10467
+ }, _callee47, this);
10176
10468
  }));
10177
10469
 
10178
- function unflagMessage(_x60) {
10470
+ function unflagMessage(_x62) {
10179
10471
  return _unflagMessage.apply(this, arguments);
10180
10472
  }
10181
10473
 
@@ -10191,31 +10483,31 @@ var StreamChat = /*#__PURE__*/function () {
10191
10483
  }, {
10192
10484
  key: "unflagUser",
10193
10485
  value: function () {
10194
- var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(targetID) {
10486
+ var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(targetID) {
10195
10487
  var options,
10196
- _args47 = arguments;
10197
- return _regeneratorRuntime.wrap(function _callee47$(_context47) {
10488
+ _args48 = arguments;
10489
+ return _regeneratorRuntime.wrap(function _callee48$(_context48) {
10198
10490
  while (1) {
10199
- switch (_context47.prev = _context47.next) {
10491
+ switch (_context48.prev = _context48.next) {
10200
10492
  case 0:
10201
- options = _args47.length > 1 && _args47[1] !== undefined ? _args47[1] : {};
10202
- _context47.next = 3;
10493
+ options = _args48.length > 1 && _args48[1] !== undefined ? _args48[1] : {};
10494
+ _context48.next = 3;
10203
10495
  return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
10204
10496
  target_user_id: targetID
10205
10497
  }, options));
10206
10498
 
10207
10499
  case 3:
10208
- return _context47.abrupt("return", _context47.sent);
10500
+ return _context48.abrupt("return", _context48.sent);
10209
10501
 
10210
10502
  case 4:
10211
10503
  case "end":
10212
- return _context47.stop();
10504
+ return _context48.stop();
10213
10505
  }
10214
10506
  }
10215
- }, _callee47, this);
10507
+ }, _callee48, this);
10216
10508
  }));
10217
10509
 
10218
- function unflagUser(_x61) {
10510
+ function unflagUser(_x63) {
10219
10511
  return _unflagUser.apply(this, arguments);
10220
10512
  }
10221
10513
 
@@ -10232,29 +10524,29 @@ var StreamChat = /*#__PURE__*/function () {
10232
10524
  }, {
10233
10525
  key: "getCallToken",
10234
10526
  value: function () {
10235
- var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(callID) {
10527
+ var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(callID) {
10236
10528
  var options,
10237
- _args48 = arguments;
10238
- return _regeneratorRuntime.wrap(function _callee48$(_context48) {
10529
+ _args49 = arguments;
10530
+ return _regeneratorRuntime.wrap(function _callee49$(_context49) {
10239
10531
  while (1) {
10240
- switch (_context48.prev = _context48.next) {
10532
+ switch (_context49.prev = _context49.next) {
10241
10533
  case 0:
10242
- options = _args48.length > 1 && _args48[1] !== undefined ? _args48[1] : {};
10243
- _context48.next = 3;
10534
+ options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
10535
+ _context49.next = 3;
10244
10536
  return this.post(this.baseURL + "/calls/".concat(callID), _objectSpread({}, options));
10245
10537
 
10246
10538
  case 3:
10247
- return _context48.abrupt("return", _context48.sent);
10539
+ return _context49.abrupt("return", _context49.sent);
10248
10540
 
10249
10541
  case 4:
10250
10542
  case "end":
10251
- return _context48.stop();
10543
+ return _context49.stop();
10252
10544
  }
10253
10545
  }
10254
- }, _callee48, this);
10546
+ }, _callee49, this);
10255
10547
  }));
10256
10548
 
10257
- function getCallToken(_x62) {
10549
+ function getCallToken(_x64) {
10258
10550
  return _getCallToken.apply(this, arguments);
10259
10551
  }
10260
10552
 
@@ -10277,30 +10569,30 @@ var StreamChat = /*#__PURE__*/function () {
10277
10569
  }, {
10278
10570
  key: "_queryFlags",
10279
10571
  value: function () {
10280
- var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49() {
10572
+ var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50() {
10281
10573
  var filterConditions,
10282
10574
  options,
10283
- _args49 = arguments;
10284
- return _regeneratorRuntime.wrap(function _callee49$(_context49) {
10575
+ _args50 = arguments;
10576
+ return _regeneratorRuntime.wrap(function _callee50$(_context50) {
10285
10577
  while (1) {
10286
- switch (_context49.prev = _context49.next) {
10578
+ switch (_context50.prev = _context50.next) {
10287
10579
  case 0:
10288
- filterConditions = _args49.length > 0 && _args49[0] !== undefined ? _args49[0] : {};
10289
- options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
10290
- _context49.next = 4;
10580
+ filterConditions = _args50.length > 0 && _args50[0] !== undefined ? _args50[0] : {};
10581
+ options = _args50.length > 1 && _args50[1] !== undefined ? _args50[1] : {};
10582
+ _context50.next = 4;
10291
10583
  return this.post(this.baseURL + '/moderation/flags', _objectSpread({
10292
10584
  filter_conditions: filterConditions
10293
10585
  }, options));
10294
10586
 
10295
10587
  case 4:
10296
- return _context49.abrupt("return", _context49.sent);
10588
+ return _context50.abrupt("return", _context50.sent);
10297
10589
 
10298
10590
  case 5:
10299
10591
  case "end":
10300
- return _context49.stop();
10592
+ return _context50.stop();
10301
10593
  }
10302
10594
  }
10303
- }, _callee49, this);
10595
+ }, _callee50, this);
10304
10596
  }));
10305
10597
 
10306
10598
  function _queryFlags() {
@@ -10326,30 +10618,30 @@ var StreamChat = /*#__PURE__*/function () {
10326
10618
  }, {
10327
10619
  key: "_queryFlagReports",
10328
10620
  value: function () {
10329
- var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50() {
10621
+ var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51() {
10330
10622
  var filterConditions,
10331
10623
  options,
10332
- _args50 = arguments;
10333
- return _regeneratorRuntime.wrap(function _callee50$(_context50) {
10624
+ _args51 = arguments;
10625
+ return _regeneratorRuntime.wrap(function _callee51$(_context51) {
10334
10626
  while (1) {
10335
- switch (_context50.prev = _context50.next) {
10627
+ switch (_context51.prev = _context51.next) {
10336
10628
  case 0:
10337
- filterConditions = _args50.length > 0 && _args50[0] !== undefined ? _args50[0] : {};
10338
- options = _args50.length > 1 && _args50[1] !== undefined ? _args50[1] : {};
10339
- _context50.next = 4;
10629
+ filterConditions = _args51.length > 0 && _args51[0] !== undefined ? _args51[0] : {};
10630
+ options = _args51.length > 1 && _args51[1] !== undefined ? _args51[1] : {};
10631
+ _context51.next = 4;
10340
10632
  return this.post(this.baseURL + '/moderation/reports', _objectSpread({
10341
10633
  filter_conditions: filterConditions
10342
10634
  }, options));
10343
10635
 
10344
10636
  case 4:
10345
- return _context50.abrupt("return", _context50.sent);
10637
+ return _context51.abrupt("return", _context51.sent);
10346
10638
 
10347
10639
  case 5:
10348
10640
  case "end":
10349
- return _context50.stop();
10641
+ return _context51.stop();
10350
10642
  }
10351
10643
  }
10352
- }, _callee50, this);
10644
+ }, _callee51, this);
10353
10645
  }));
10354
10646
 
10355
10647
  function _queryFlagReports() {
@@ -10376,31 +10668,31 @@ var StreamChat = /*#__PURE__*/function () {
10376
10668
  }, {
10377
10669
  key: "_reviewFlagReport",
10378
10670
  value: function () {
10379
- var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(id, reviewResult) {
10671
+ var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(id, reviewResult) {
10380
10672
  var options,
10381
- _args51 = arguments;
10382
- return _regeneratorRuntime.wrap(function _callee51$(_context51) {
10673
+ _args52 = arguments;
10674
+ return _regeneratorRuntime.wrap(function _callee52$(_context52) {
10383
10675
  while (1) {
10384
- switch (_context51.prev = _context51.next) {
10676
+ switch (_context52.prev = _context52.next) {
10385
10677
  case 0:
10386
- options = _args51.length > 2 && _args51[2] !== undefined ? _args51[2] : {};
10387
- _context51.next = 3;
10678
+ options = _args52.length > 2 && _args52[2] !== undefined ? _args52[2] : {};
10679
+ _context52.next = 3;
10388
10680
  return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
10389
10681
  review_result: reviewResult
10390
10682
  }, options));
10391
10683
 
10392
10684
  case 3:
10393
- return _context51.abrupt("return", _context51.sent);
10685
+ return _context52.abrupt("return", _context52.sent);
10394
10686
 
10395
10687
  case 4:
10396
10688
  case "end":
10397
- return _context51.stop();
10689
+ return _context52.stop();
10398
10690
  }
10399
10691
  }
10400
- }, _callee51, this);
10692
+ }, _callee52, this);
10401
10693
  }));
10402
10694
 
10403
- function _reviewFlagReport(_x63, _x64) {
10695
+ function _reviewFlagReport(_x65, _x66) {
10404
10696
  return _reviewFlagReport2.apply(this, arguments);
10405
10697
  }
10406
10698
 
@@ -10418,31 +10710,31 @@ var StreamChat = /*#__PURE__*/function () {
10418
10710
  }, {
10419
10711
  key: "unblockMessage",
10420
10712
  value: function () {
10421
- var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(targetMessageID) {
10713
+ var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(targetMessageID) {
10422
10714
  var options,
10423
- _args52 = arguments;
10424
- return _regeneratorRuntime.wrap(function _callee52$(_context52) {
10715
+ _args53 = arguments;
10716
+ return _regeneratorRuntime.wrap(function _callee53$(_context53) {
10425
10717
  while (1) {
10426
- switch (_context52.prev = _context52.next) {
10718
+ switch (_context53.prev = _context53.next) {
10427
10719
  case 0:
10428
- options = _args52.length > 1 && _args52[1] !== undefined ? _args52[1] : {};
10429
- _context52.next = 3;
10720
+ options = _args53.length > 1 && _args53[1] !== undefined ? _args53[1] : {};
10721
+ _context53.next = 3;
10430
10722
  return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
10431
10723
  target_message_id: targetMessageID
10432
10724
  }, options));
10433
10725
 
10434
10726
  case 3:
10435
- return _context52.abrupt("return", _context52.sent);
10727
+ return _context53.abrupt("return", _context53.sent);
10436
10728
 
10437
10729
  case 4:
10438
10730
  case "end":
10439
- return _context52.stop();
10731
+ return _context53.stop();
10440
10732
  }
10441
10733
  }
10442
- }, _callee52, this);
10734
+ }, _callee53, this);
10443
10735
  }));
10444
10736
 
10445
- function unblockMessage(_x65) {
10737
+ function unblockMessage(_x67) {
10446
10738
  return _unblockMessage.apply(this, arguments);
10447
10739
  }
10448
10740
 
@@ -10461,23 +10753,23 @@ var StreamChat = /*#__PURE__*/function () {
10461
10753
  * @return {Promise<APIResponse>}
10462
10754
  */
10463
10755
  function () {
10464
- var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53() {
10756
+ var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54() {
10465
10757
  var data,
10466
- _args53 = arguments;
10467
- return _regeneratorRuntime.wrap(function _callee53$(_context53) {
10758
+ _args54 = arguments;
10759
+ return _regeneratorRuntime.wrap(function _callee54$(_context54) {
10468
10760
  while (1) {
10469
- switch (_context53.prev = _context53.next) {
10761
+ switch (_context54.prev = _context54.next) {
10470
10762
  case 0:
10471
- data = _args53.length > 0 && _args53[0] !== undefined ? _args53[0] : {};
10472
- _context53.next = 3;
10763
+ data = _args54.length > 0 && _args54[0] !== undefined ? _args54[0] : {};
10764
+ _context54.next = 3;
10473
10765
  return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
10474
10766
 
10475
10767
  case 3:
10476
10768
  case "end":
10477
- return _context53.stop();
10769
+ return _context54.stop();
10478
10770
  }
10479
10771
  }
10480
- }, _callee53, this);
10772
+ }, _callee54, this);
10481
10773
  }));
10482
10774
 
10483
10775
  function markChannelsRead() {
@@ -10552,28 +10844,28 @@ var StreamChat = /*#__PURE__*/function () {
10552
10844
  }, {
10553
10845
  key: "translateMessage",
10554
10846
  value: function () {
10555
- var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(messageId, language) {
10556
- return _regeneratorRuntime.wrap(function _callee54$(_context54) {
10847
+ var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(messageId, language) {
10848
+ return _regeneratorRuntime.wrap(function _callee55$(_context55) {
10557
10849
  while (1) {
10558
- switch (_context54.prev = _context54.next) {
10850
+ switch (_context55.prev = _context55.next) {
10559
10851
  case 0:
10560
- _context54.next = 2;
10852
+ _context55.next = 2;
10561
10853
  return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
10562
10854
  language: language
10563
10855
  });
10564
10856
 
10565
10857
  case 2:
10566
- return _context54.abrupt("return", _context54.sent);
10858
+ return _context55.abrupt("return", _context55.sent);
10567
10859
 
10568
10860
  case 3:
10569
10861
  case "end":
10570
- return _context54.stop();
10862
+ return _context55.stop();
10571
10863
  }
10572
10864
  }
10573
- }, _callee54, this);
10865
+ }, _callee55, this);
10574
10866
  }));
10575
10867
 
10576
- function translateMessage(_x66, _x67) {
10868
+ function translateMessage(_x68, _x69) {
10577
10869
  return _translateMessage.apply(this, arguments);
10578
10870
  }
10579
10871
 
@@ -10675,14 +10967,14 @@ var StreamChat = /*#__PURE__*/function () {
10675
10967
  }, {
10676
10968
  key: "updateMessage",
10677
10969
  value: function () {
10678
- var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(message, userId, options) {
10970
+ var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(message, userId, options) {
10679
10971
  var clonedMessage, reservedMessageFields;
10680
- return _regeneratorRuntime.wrap(function _callee55$(_context55) {
10972
+ return _regeneratorRuntime.wrap(function _callee56$(_context56) {
10681
10973
  while (1) {
10682
- switch (_context55.prev = _context55.next) {
10974
+ switch (_context56.prev = _context56.next) {
10683
10975
  case 0:
10684
10976
  if (message.id) {
10685
- _context55.next = 2;
10977
+ _context56.next = 2;
10686
10978
  break;
10687
10979
  }
10688
10980
 
@@ -10719,23 +11011,23 @@ var StreamChat = /*#__PURE__*/function () {
10719
11011
  });
10720
11012
  }
10721
11013
 
10722
- _context55.next = 10;
11014
+ _context56.next = 10;
10723
11015
  return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
10724
11016
  message: clonedMessage
10725
11017
  }, options));
10726
11018
 
10727
11019
  case 10:
10728
- return _context55.abrupt("return", _context55.sent);
11020
+ return _context56.abrupt("return", _context56.sent);
10729
11021
 
10730
11022
  case 11:
10731
11023
  case "end":
10732
- return _context55.stop();
11024
+ return _context56.stop();
10733
11025
  }
10734
11026
  }
10735
- }, _callee55, this);
11027
+ }, _callee56, this);
10736
11028
  }));
10737
11029
 
10738
- function updateMessage(_x68, _x69, _x70) {
11030
+ function updateMessage(_x70, _x71, _x72) {
10739
11031
  return _updateMessage.apply(this, arguments);
10740
11032
  }
10741
11033
 
@@ -10758,14 +11050,14 @@ var StreamChat = /*#__PURE__*/function () {
10758
11050
  }, {
10759
11051
  key: "partialUpdateMessage",
10760
11052
  value: function () {
10761
- var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(id, partialMessageObject, userId, options) {
11053
+ var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(id, partialMessageObject, userId, options) {
10762
11054
  var user;
10763
- return _regeneratorRuntime.wrap(function _callee56$(_context56) {
11055
+ return _regeneratorRuntime.wrap(function _callee57$(_context57) {
10764
11056
  while (1) {
10765
- switch (_context56.prev = _context56.next) {
11057
+ switch (_context57.prev = _context57.next) {
10766
11058
  case 0:
10767
11059
  if (id) {
10768
- _context56.next = 2;
11060
+ _context57.next = 2;
10769
11061
  break;
10770
11062
  }
10771
11063
 
@@ -10780,23 +11072,23 @@ var StreamChat = /*#__PURE__*/function () {
10780
11072
  };
10781
11073
  }
10782
11074
 
10783
- _context56.next = 6;
11075
+ _context57.next = 6;
10784
11076
  return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
10785
11077
  user: user
10786
11078
  }));
10787
11079
 
10788
11080
  case 6:
10789
- return _context56.abrupt("return", _context56.sent);
11081
+ return _context57.abrupt("return", _context57.sent);
10790
11082
 
10791
11083
  case 7:
10792
11084
  case "end":
10793
- return _context56.stop();
11085
+ return _context57.stop();
10794
11086
  }
10795
11087
  }
10796
- }, _callee56, this);
11088
+ }, _callee57, this);
10797
11089
  }));
10798
11090
 
10799
- function partialUpdateMessage(_x71, _x72, _x73, _x74) {
11091
+ function partialUpdateMessage(_x73, _x74, _x75, _x76) {
10800
11092
  return _partialUpdateMessage.apply(this, arguments);
10801
11093
  }
10802
11094
 
@@ -10805,11 +11097,11 @@ var StreamChat = /*#__PURE__*/function () {
10805
11097
  }, {
10806
11098
  key: "deleteMessage",
10807
11099
  value: function () {
10808
- var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(messageID, hardDelete) {
11100
+ var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(messageID, hardDelete) {
10809
11101
  var params;
10810
- return _regeneratorRuntime.wrap(function _callee57$(_context57) {
11102
+ return _regeneratorRuntime.wrap(function _callee58$(_context58) {
10811
11103
  while (1) {
10812
- switch (_context57.prev = _context57.next) {
11104
+ switch (_context58.prev = _context58.next) {
10813
11105
  case 0:
10814
11106
  params = {};
10815
11107
 
@@ -10819,21 +11111,21 @@ var StreamChat = /*#__PURE__*/function () {
10819
11111
  };
10820
11112
  }
10821
11113
 
10822
- _context57.next = 4;
11114
+ _context58.next = 4;
10823
11115
  return this.delete(this.baseURL + "/messages/".concat(messageID), params);
10824
11116
 
10825
11117
  case 4:
10826
- return _context57.abrupt("return", _context57.sent);
11118
+ return _context58.abrupt("return", _context58.sent);
10827
11119
 
10828
11120
  case 5:
10829
11121
  case "end":
10830
- return _context57.stop();
11122
+ return _context58.stop();
10831
11123
  }
10832
11124
  }
10833
- }, _callee57, this);
11125
+ }, _callee58, this);
10834
11126
  }));
10835
11127
 
10836
- function deleteMessage(_x75, _x76) {
11128
+ function deleteMessage(_x77, _x78) {
10837
11129
  return _deleteMessage.apply(this, arguments);
10838
11130
  }
10839
11131
 
@@ -10855,28 +11147,28 @@ var StreamChat = /*#__PURE__*/function () {
10855
11147
  }, {
10856
11148
  key: "undeleteMessage",
10857
11149
  value: function () {
10858
- var _undeleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(messageID, userID) {
10859
- return _regeneratorRuntime.wrap(function _callee58$(_context58) {
11150
+ var _undeleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(messageID, userID) {
11151
+ return _regeneratorRuntime.wrap(function _callee59$(_context59) {
10860
11152
  while (1) {
10861
- switch (_context58.prev = _context58.next) {
11153
+ switch (_context59.prev = _context59.next) {
10862
11154
  case 0:
10863
- _context58.next = 2;
11155
+ _context59.next = 2;
10864
11156
  return this.post(this.baseURL + "/messages/".concat(messageID, "/undelete"), {
10865
11157
  undeleted_by: userID
10866
11158
  });
10867
11159
 
10868
11160
  case 2:
10869
- return _context58.abrupt("return", _context58.sent);
11161
+ return _context59.abrupt("return", _context59.sent);
10870
11162
 
10871
11163
  case 3:
10872
11164
  case "end":
10873
- return _context58.stop();
11165
+ return _context59.stop();
10874
11166
  }
10875
11167
  }
10876
- }, _callee58, this);
11168
+ }, _callee59, this);
10877
11169
  }));
10878
11170
 
10879
- function undeleteMessage(_x77, _x78) {
11171
+ function undeleteMessage(_x79, _x80) {
10880
11172
  return _undeleteMessage.apply(this, arguments);
10881
11173
  }
10882
11174
 
@@ -10885,26 +11177,26 @@ var StreamChat = /*#__PURE__*/function () {
10885
11177
  }, {
10886
11178
  key: "getMessage",
10887
11179
  value: function () {
10888
- var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(messageID, options) {
10889
- return _regeneratorRuntime.wrap(function _callee59$(_context59) {
11180
+ var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(messageID, options) {
11181
+ return _regeneratorRuntime.wrap(function _callee60$(_context60) {
10890
11182
  while (1) {
10891
- switch (_context59.prev = _context59.next) {
11183
+ switch (_context60.prev = _context60.next) {
10892
11184
  case 0:
10893
- _context59.next = 2;
11185
+ _context60.next = 2;
10894
11186
  return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), _objectSpread({}, options));
10895
11187
 
10896
11188
  case 2:
10897
- return _context59.abrupt("return", _context59.sent);
11189
+ return _context60.abrupt("return", _context60.sent);
10898
11190
 
10899
11191
  case 3:
10900
11192
  case "end":
10901
- return _context59.stop();
11193
+ return _context60.stop();
10902
11194
  }
10903
11195
  }
10904
- }, _callee59, this);
11196
+ }, _callee60, this);
10905
11197
  }));
10906
11198
 
10907
- function getMessage(_x79, _x80) {
11199
+ function getMessage(_x81, _x82) {
10908
11200
  return _getMessage.apply(this, arguments);
10909
11201
  }
10910
11202
 
@@ -10925,13 +11217,13 @@ var StreamChat = /*#__PURE__*/function () {
10925
11217
  }, {
10926
11218
  key: "queryThreads",
10927
11219
  value: function () {
10928
- var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(options) {
11220
+ var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(options) {
10929
11221
  var _this5 = this;
10930
11222
 
10931
11223
  var opts, res;
10932
- return _regeneratorRuntime.wrap(function _callee60$(_context60) {
11224
+ return _regeneratorRuntime.wrap(function _callee61$(_context61) {
10933
11225
  while (1) {
10934
- switch (_context60.prev = _context60.next) {
11226
+ switch (_context61.prev = _context61.next) {
10935
11227
  case 0:
10936
11228
  opts = _objectSpread({
10937
11229
  limit: 10,
@@ -10939,12 +11231,12 @@ var StreamChat = /*#__PURE__*/function () {
10939
11231
  reply_limit: 3,
10940
11232
  watch: true
10941
11233
  }, options);
10942
- _context60.next = 3;
11234
+ _context61.next = 3;
10943
11235
  return this.post(this.baseURL + "/threads", opts);
10944
11236
 
10945
11237
  case 3:
10946
- res = _context60.sent;
10947
- return _context60.abrupt("return", {
11238
+ res = _context61.sent;
11239
+ return _context61.abrupt("return", {
10948
11240
  threads: res.threads.map(function (thread) {
10949
11241
  return new Thread(_this5, thread);
10950
11242
  }),
@@ -10953,13 +11245,13 @@ var StreamChat = /*#__PURE__*/function () {
10953
11245
 
10954
11246
  case 5:
10955
11247
  case "end":
10956
- return _context60.stop();
11248
+ return _context61.stop();
10957
11249
  }
10958
11250
  }
10959
- }, _callee60, this);
11251
+ }, _callee61, this);
10960
11252
  }));
10961
11253
 
10962
- function queryThreads(_x81) {
11254
+ function queryThreads(_x83) {
10963
11255
  return _queryThreads.apply(this, arguments);
10964
11256
  }
10965
11257
 
@@ -10980,19 +11272,19 @@ var StreamChat = /*#__PURE__*/function () {
10980
11272
  }, {
10981
11273
  key: "getThread",
10982
11274
  value: function () {
10983
- var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(messageId) {
11275
+ var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(messageId) {
10984
11276
  var options,
10985
11277
  opts,
10986
11278
  res,
10987
- _args61 = arguments;
10988
- return _regeneratorRuntime.wrap(function _callee61$(_context61) {
11279
+ _args62 = arguments;
11280
+ return _regeneratorRuntime.wrap(function _callee62$(_context62) {
10989
11281
  while (1) {
10990
- switch (_context61.prev = _context61.next) {
11282
+ switch (_context62.prev = _context62.next) {
10991
11283
  case 0:
10992
- options = _args61.length > 1 && _args61[1] !== undefined ? _args61[1] : {};
11284
+ options = _args62.length > 1 && _args62[1] !== undefined ? _args62[1] : {};
10993
11285
 
10994
11286
  if (messageId) {
10995
- _context61.next = 3;
11287
+ _context62.next = 3;
10996
11288
  break;
10997
11289
  }
10998
11290
 
@@ -11004,22 +11296,22 @@ var StreamChat = /*#__PURE__*/function () {
11004
11296
  reply_limit: 3,
11005
11297
  watch: true
11006
11298
  }, options);
11007
- _context61.next = 6;
11299
+ _context62.next = 6;
11008
11300
  return this.get(this.baseURL + "/threads/".concat(messageId), opts);
11009
11301
 
11010
11302
  case 6:
11011
- res = _context61.sent;
11012
- return _context61.abrupt("return", new Thread(this, res.thread));
11303
+ res = _context62.sent;
11304
+ return _context62.abrupt("return", new Thread(this, res.thread));
11013
11305
 
11014
11306
  case 8:
11015
11307
  case "end":
11016
- return _context61.stop();
11308
+ return _context62.stop();
11017
11309
  }
11018
11310
  }
11019
- }, _callee61, this);
11311
+ }, _callee62, this);
11020
11312
  }));
11021
11313
 
11022
- function getThread(_x82) {
11314
+ function getThread(_x84) {
11023
11315
  return _getThread.apply(this, arguments);
11024
11316
  }
11025
11317
 
@@ -11037,15 +11329,15 @@ var StreamChat = /*#__PURE__*/function () {
11037
11329
  }, {
11038
11330
  key: "partialUpdateThread",
11039
11331
  value: function () {
11040
- var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(messageId, partialThreadObject) {
11332
+ var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(messageId, partialThreadObject) {
11041
11333
  var reservedThreadFields, _key5;
11042
11334
 
11043
- return _regeneratorRuntime.wrap(function _callee62$(_context62) {
11335
+ return _regeneratorRuntime.wrap(function _callee63$(_context63) {
11044
11336
  while (1) {
11045
- switch (_context62.prev = _context62.next) {
11337
+ switch (_context63.prev = _context63.next) {
11046
11338
  case 0:
11047
11339
  if (messageId) {
11048
- _context62.next = 2;
11340
+ _context63.next = 2;
11049
11341
  break;
11050
11342
  }
11051
11343
 
@@ -11055,43 +11347,43 @@ var StreamChat = /*#__PURE__*/function () {
11055
11347
  // check for reserved fields from ThreadResponse type within partialThreadObject's set and unset.
11056
11348
  // Throw error if any of the reserved field is found.
11057
11349
  reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel'];
11058
- _context62.t0 = _regeneratorRuntime.keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
11350
+ _context63.t0 = _regeneratorRuntime.keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
11059
11351
 
11060
11352
  case 4:
11061
- if ((_context62.t1 = _context62.t0()).done) {
11062
- _context62.next = 10;
11353
+ if ((_context63.t1 = _context63.t0()).done) {
11354
+ _context63.next = 10;
11063
11355
  break;
11064
11356
  }
11065
11357
 
11066
- _key5 = _context62.t1.value;
11358
+ _key5 = _context63.t1.value;
11067
11359
 
11068
11360
  if (!reservedThreadFields.includes(_key5)) {
11069
- _context62.next = 8;
11361
+ _context63.next = 8;
11070
11362
  break;
11071
11363
  }
11072
11364
 
11073
11365
  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."));
11074
11366
 
11075
11367
  case 8:
11076
- _context62.next = 4;
11368
+ _context63.next = 4;
11077
11369
  break;
11078
11370
 
11079
11371
  case 10:
11080
- _context62.next = 12;
11372
+ _context63.next = 12;
11081
11373
  return this.patch(this.baseURL + "/threads/".concat(messageId), partialThreadObject);
11082
11374
 
11083
11375
  case 12:
11084
- return _context62.abrupt("return", _context62.sent);
11376
+ return _context63.abrupt("return", _context63.sent);
11085
11377
 
11086
11378
  case 13:
11087
11379
  case "end":
11088
- return _context62.stop();
11380
+ return _context63.stop();
11089
11381
  }
11090
11382
  }
11091
- }, _callee62, this);
11383
+ }, _callee63, this);
11092
11384
  }));
11093
11385
 
11094
- function partialUpdateThread(_x83, _x84) {
11386
+ function partialUpdateThread(_x85, _x86) {
11095
11387
  return _partialUpdateThread.apply(this, arguments);
11096
11388
  }
11097
11389
 
@@ -11100,7 +11392,7 @@ var StreamChat = /*#__PURE__*/function () {
11100
11392
  }, {
11101
11393
  key: "getUserAgent",
11102
11394
  value: function getUserAgent() {
11103
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.25.1");
11395
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.27.0");
11104
11396
  }
11105
11397
  }, {
11106
11398
  key: "setUserAgent",
@@ -11319,28 +11611,28 @@ var StreamChat = /*#__PURE__*/function () {
11319
11611
  }, {
11320
11612
  key: "sendUserCustomEvent",
11321
11613
  value: function () {
11322
- var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(targetUserID, event) {
11323
- return _regeneratorRuntime.wrap(function _callee63$(_context63) {
11614
+ var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(targetUserID, event) {
11615
+ return _regeneratorRuntime.wrap(function _callee64$(_context64) {
11324
11616
  while (1) {
11325
- switch (_context63.prev = _context63.next) {
11617
+ switch (_context64.prev = _context64.next) {
11326
11618
  case 0:
11327
- _context63.next = 2;
11619
+ _context64.next = 2;
11328
11620
  return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
11329
11621
  event: event
11330
11622
  });
11331
11623
 
11332
11624
  case 2:
11333
- return _context63.abrupt("return", _context63.sent);
11625
+ return _context64.abrupt("return", _context64.sent);
11334
11626
 
11335
11627
  case 3:
11336
11628
  case "end":
11337
- return _context63.stop();
11629
+ return _context64.stop();
11338
11630
  }
11339
11631
  }
11340
- }, _callee63, this);
11632
+ }, _callee64, this);
11341
11633
  }));
11342
11634
 
11343
- function sendUserCustomEvent(_x85, _x86) {
11635
+ function sendUserCustomEvent(_x87, _x88) {
11344
11636
  return _sendUserCustomEvent.apply(this, arguments);
11345
11637
  }
11346
11638
 
@@ -11437,28 +11729,28 @@ var StreamChat = /*#__PURE__*/function () {
11437
11729
  }, {
11438
11730
  key: "createSegment",
11439
11731
  value: function () {
11440
- var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(type, id, data) {
11732
+ var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(type, id, data) {
11441
11733
  var body;
11442
- return _regeneratorRuntime.wrap(function _callee64$(_context64) {
11734
+ return _regeneratorRuntime.wrap(function _callee65$(_context65) {
11443
11735
  while (1) {
11444
- switch (_context64.prev = _context64.next) {
11736
+ switch (_context65.prev = _context65.next) {
11445
11737
  case 0:
11446
11738
  this.validateServerSideAuth();
11447
11739
  body = _objectSpread({
11448
11740
  id: id,
11449
11741
  type: type
11450
11742
  }, data);
11451
- return _context64.abrupt("return", this.post(this.baseURL + "/segments", body));
11743
+ return _context65.abrupt("return", this.post(this.baseURL + "/segments", body));
11452
11744
 
11453
11745
  case 3:
11454
11746
  case "end":
11455
- return _context64.stop();
11747
+ return _context65.stop();
11456
11748
  }
11457
11749
  }
11458
- }, _callee64, this);
11750
+ }, _callee65, this);
11459
11751
  }));
11460
11752
 
11461
- function createSegment(_x87, _x88, _x89) {
11753
+ function createSegment(_x89, _x90, _x91) {
11462
11754
  return _createSegment.apply(this, arguments);
11463
11755
  }
11464
11756
 
@@ -11477,23 +11769,23 @@ var StreamChat = /*#__PURE__*/function () {
11477
11769
  }, {
11478
11770
  key: "createUserSegment",
11479
11771
  value: function () {
11480
- var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id, data) {
11481
- return _regeneratorRuntime.wrap(function _callee65$(_context65) {
11772
+ var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id, data) {
11773
+ return _regeneratorRuntime.wrap(function _callee66$(_context66) {
11482
11774
  while (1) {
11483
- switch (_context65.prev = _context65.next) {
11775
+ switch (_context66.prev = _context66.next) {
11484
11776
  case 0:
11485
11777
  this.validateServerSideAuth();
11486
- return _context65.abrupt("return", this.createSegment('user', id, data));
11778
+ return _context66.abrupt("return", this.createSegment('user', id, data));
11487
11779
 
11488
11780
  case 2:
11489
11781
  case "end":
11490
- return _context65.stop();
11782
+ return _context66.stop();
11491
11783
  }
11492
11784
  }
11493
- }, _callee65, this);
11785
+ }, _callee66, this);
11494
11786
  }));
11495
11787
 
11496
- function createUserSegment(_x90, _x91) {
11788
+ function createUserSegment(_x92, _x93) {
11497
11789
  return _createUserSegment.apply(this, arguments);
11498
11790
  }
11499
11791
 
@@ -11512,23 +11804,23 @@ var StreamChat = /*#__PURE__*/function () {
11512
11804
  }, {
11513
11805
  key: "createChannelSegment",
11514
11806
  value: function () {
11515
- var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id, data) {
11516
- return _regeneratorRuntime.wrap(function _callee66$(_context66) {
11807
+ var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id, data) {
11808
+ return _regeneratorRuntime.wrap(function _callee67$(_context67) {
11517
11809
  while (1) {
11518
- switch (_context66.prev = _context66.next) {
11810
+ switch (_context67.prev = _context67.next) {
11519
11811
  case 0:
11520
11812
  this.validateServerSideAuth();
11521
- return _context66.abrupt("return", this.createSegment('channel', id, data));
11813
+ return _context67.abrupt("return", this.createSegment('channel', id, data));
11522
11814
 
11523
11815
  case 2:
11524
11816
  case "end":
11525
- return _context66.stop();
11817
+ return _context67.stop();
11526
11818
  }
11527
11819
  }
11528
- }, _callee66, this);
11820
+ }, _callee67, this);
11529
11821
  }));
11530
11822
 
11531
- function createChannelSegment(_x92, _x93) {
11823
+ function createChannelSegment(_x94, _x95) {
11532
11824
  return _createChannelSegment.apply(this, arguments);
11533
11825
  }
11534
11826
 
@@ -11537,23 +11829,23 @@ var StreamChat = /*#__PURE__*/function () {
11537
11829
  }, {
11538
11830
  key: "getSegment",
11539
11831
  value: function () {
11540
- var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id) {
11541
- return _regeneratorRuntime.wrap(function _callee67$(_context67) {
11832
+ var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(id) {
11833
+ return _regeneratorRuntime.wrap(function _callee68$(_context68) {
11542
11834
  while (1) {
11543
- switch (_context67.prev = _context67.next) {
11835
+ switch (_context68.prev = _context68.next) {
11544
11836
  case 0:
11545
11837
  this.validateServerSideAuth();
11546
- return _context67.abrupt("return", this.get(this.baseURL + "/segments/".concat(id)));
11838
+ return _context68.abrupt("return", this.get(this.baseURL + "/segments/".concat(id)));
11547
11839
 
11548
11840
  case 2:
11549
11841
  case "end":
11550
- return _context67.stop();
11842
+ return _context68.stop();
11551
11843
  }
11552
11844
  }
11553
- }, _callee67, this);
11845
+ }, _callee68, this);
11554
11846
  }));
11555
11847
 
11556
- function getSegment(_x94) {
11848
+ function getSegment(_x96) {
11557
11849
  return _getSegment.apply(this, arguments);
11558
11850
  }
11559
11851
 
@@ -11571,23 +11863,23 @@ var StreamChat = /*#__PURE__*/function () {
11571
11863
  }, {
11572
11864
  key: "updateSegment",
11573
11865
  value: function () {
11574
- var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(id, data) {
11575
- return _regeneratorRuntime.wrap(function _callee68$(_context68) {
11866
+ var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id, data) {
11867
+ return _regeneratorRuntime.wrap(function _callee69$(_context69) {
11576
11868
  while (1) {
11577
- switch (_context68.prev = _context68.next) {
11869
+ switch (_context69.prev = _context69.next) {
11578
11870
  case 0:
11579
11871
  this.validateServerSideAuth();
11580
- return _context68.abrupt("return", this.put(this.baseURL + "/segments/".concat(id), data));
11872
+ return _context69.abrupt("return", this.put(this.baseURL + "/segments/".concat(id), data));
11581
11873
 
11582
11874
  case 2:
11583
11875
  case "end":
11584
- return _context68.stop();
11876
+ return _context69.stop();
11585
11877
  }
11586
11878
  }
11587
- }, _callee68, this);
11879
+ }, _callee69, this);
11588
11880
  }));
11589
11881
 
11590
- function updateSegment(_x95, _x96) {
11882
+ function updateSegment(_x97, _x98) {
11591
11883
  return _updateSegment.apply(this, arguments);
11592
11884
  }
11593
11885
 
@@ -11605,27 +11897,27 @@ var StreamChat = /*#__PURE__*/function () {
11605
11897
  }, {
11606
11898
  key: "addSegmentTargets",
11607
11899
  value: function () {
11608
- var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id, targets) {
11900
+ var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(id, targets) {
11609
11901
  var body;
11610
- return _regeneratorRuntime.wrap(function _callee69$(_context69) {
11902
+ return _regeneratorRuntime.wrap(function _callee70$(_context70) {
11611
11903
  while (1) {
11612
- switch (_context69.prev = _context69.next) {
11904
+ switch (_context70.prev = _context70.next) {
11613
11905
  case 0:
11614
11906
  this.validateServerSideAuth();
11615
11907
  body = {
11616
11908
  target_ids: targets
11617
11909
  };
11618
- return _context69.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/addtargets"), body));
11910
+ return _context70.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/addtargets"), body));
11619
11911
 
11620
11912
  case 3:
11621
11913
  case "end":
11622
- return _context69.stop();
11914
+ return _context70.stop();
11623
11915
  }
11624
11916
  }
11625
- }, _callee69, this);
11917
+ }, _callee70, this);
11626
11918
  }));
11627
11919
 
11628
- function addSegmentTargets(_x97, _x98) {
11920
+ function addSegmentTargets(_x99, _x100) {
11629
11921
  return _addSegmentTargets.apply(this, arguments);
11630
11922
  }
11631
11923
 
@@ -11634,33 +11926,33 @@ var StreamChat = /*#__PURE__*/function () {
11634
11926
  }, {
11635
11927
  key: "querySegmentTargets",
11636
11928
  value: function () {
11637
- var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(id) {
11929
+ var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id) {
11638
11930
  var filter,
11639
11931
  sort,
11640
11932
  options,
11641
- _args70 = arguments;
11642
- return _regeneratorRuntime.wrap(function _callee70$(_context70) {
11933
+ _args71 = arguments;
11934
+ return _regeneratorRuntime.wrap(function _callee71$(_context71) {
11643
11935
  while (1) {
11644
- switch (_context70.prev = _context70.next) {
11936
+ switch (_context71.prev = _context71.next) {
11645
11937
  case 0:
11646
- filter = _args70.length > 1 && _args70[1] !== undefined ? _args70[1] : {};
11647
- sort = _args70.length > 2 && _args70[2] !== undefined ? _args70[2] : [];
11648
- options = _args70.length > 3 && _args70[3] !== undefined ? _args70[3] : {};
11938
+ filter = _args71.length > 1 && _args71[1] !== undefined ? _args71[1] : {};
11939
+ sort = _args71.length > 2 && _args71[2] !== undefined ? _args71[2] : [];
11940
+ options = _args71.length > 3 && _args71[3] !== undefined ? _args71[3] : {};
11649
11941
  this.validateServerSideAuth();
11650
- return _context70.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/targets/query"), _objectSpread({
11942
+ return _context71.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/targets/query"), _objectSpread({
11651
11943
  filter: filter || {},
11652
11944
  sort: sort || []
11653
11945
  }, options)));
11654
11946
 
11655
11947
  case 5:
11656
11948
  case "end":
11657
- return _context70.stop();
11949
+ return _context71.stop();
11658
11950
  }
11659
11951
  }
11660
- }, _callee70, this);
11952
+ }, _callee71, this);
11661
11953
  }));
11662
11954
 
11663
- function querySegmentTargets(_x99) {
11955
+ function querySegmentTargets(_x101) {
11664
11956
  return _querySegmentTargets.apply(this, arguments);
11665
11957
  }
11666
11958
 
@@ -11678,27 +11970,27 @@ var StreamChat = /*#__PURE__*/function () {
11678
11970
  }, {
11679
11971
  key: "removeSegmentTargets",
11680
11972
  value: function () {
11681
- var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id, targets) {
11973
+ var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id, targets) {
11682
11974
  var body;
11683
- return _regeneratorRuntime.wrap(function _callee71$(_context71) {
11975
+ return _regeneratorRuntime.wrap(function _callee72$(_context72) {
11684
11976
  while (1) {
11685
- switch (_context71.prev = _context71.next) {
11977
+ switch (_context72.prev = _context72.next) {
11686
11978
  case 0:
11687
11979
  this.validateServerSideAuth();
11688
11980
  body = {
11689
11981
  target_ids: targets
11690
11982
  };
11691
- return _context71.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/deletetargets"), body));
11983
+ return _context72.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/deletetargets"), body));
11692
11984
 
11693
11985
  case 3:
11694
11986
  case "end":
11695
- return _context71.stop();
11987
+ return _context72.stop();
11696
11988
  }
11697
11989
  }
11698
- }, _callee71, this);
11990
+ }, _callee72, this);
11699
11991
  }));
11700
11992
 
11701
- function removeSegmentTargets(_x100, _x101) {
11993
+ function removeSegmentTargets(_x102, _x103) {
11702
11994
  return _removeSegmentTargets.apply(this, arguments);
11703
11995
  }
11704
11996
 
@@ -11716,29 +12008,29 @@ var StreamChat = /*#__PURE__*/function () {
11716
12008
  }, {
11717
12009
  key: "querySegments",
11718
12010
  value: function () {
11719
- var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(filter, sort) {
12011
+ var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(filter, sort) {
11720
12012
  var options,
11721
- _args72 = arguments;
11722
- return _regeneratorRuntime.wrap(function _callee72$(_context72) {
12013
+ _args73 = arguments;
12014
+ return _regeneratorRuntime.wrap(function _callee73$(_context73) {
11723
12015
  while (1) {
11724
- switch (_context72.prev = _context72.next) {
12016
+ switch (_context73.prev = _context73.next) {
11725
12017
  case 0:
11726
- options = _args72.length > 2 && _args72[2] !== undefined ? _args72[2] : {};
12018
+ options = _args73.length > 2 && _args73[2] !== undefined ? _args73[2] : {};
11727
12019
  this.validateServerSideAuth();
11728
- return _context72.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
12020
+ return _context73.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
11729
12021
  filter: filter,
11730
12022
  sort: sort
11731
12023
  }, options)));
11732
12024
 
11733
12025
  case 3:
11734
12026
  case "end":
11735
- return _context72.stop();
12027
+ return _context73.stop();
11736
12028
  }
11737
12029
  }
11738
- }, _callee72, this);
12030
+ }, _callee73, this);
11739
12031
  }));
11740
12032
 
11741
- function querySegments(_x102, _x103) {
12033
+ function querySegments(_x104, _x105) {
11742
12034
  return _querySegments.apply(this, arguments);
11743
12035
  }
11744
12036
 
@@ -11755,23 +12047,23 @@ var StreamChat = /*#__PURE__*/function () {
11755
12047
  }, {
11756
12048
  key: "deleteSegment",
11757
12049
  value: function () {
11758
- var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id) {
11759
- return _regeneratorRuntime.wrap(function _callee73$(_context73) {
12050
+ var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(id) {
12051
+ return _regeneratorRuntime.wrap(function _callee74$(_context74) {
11760
12052
  while (1) {
11761
- switch (_context73.prev = _context73.next) {
12053
+ switch (_context74.prev = _context74.next) {
11762
12054
  case 0:
11763
12055
  this.validateServerSideAuth();
11764
- return _context73.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
12056
+ return _context74.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
11765
12057
 
11766
12058
  case 2:
11767
12059
  case "end":
11768
- return _context73.stop();
12060
+ return _context74.stop();
11769
12061
  }
11770
12062
  }
11771
- }, _callee73, this);
12063
+ }, _callee74, this);
11772
12064
  }));
11773
12065
 
11774
- function deleteSegment(_x104) {
12066
+ function deleteSegment(_x106) {
11775
12067
  return _deleteSegment.apply(this, arguments);
11776
12068
  }
11777
12069
 
@@ -11789,23 +12081,23 @@ var StreamChat = /*#__PURE__*/function () {
11789
12081
  }, {
11790
12082
  key: "segmentTargetExists",
11791
12083
  value: function () {
11792
- var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(segmentId, targetId) {
11793
- return _regeneratorRuntime.wrap(function _callee74$(_context74) {
12084
+ var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(segmentId, targetId) {
12085
+ return _regeneratorRuntime.wrap(function _callee75$(_context75) {
11794
12086
  while (1) {
11795
- switch (_context74.prev = _context74.next) {
12087
+ switch (_context75.prev = _context75.next) {
11796
12088
  case 0:
11797
12089
  this.validateServerSideAuth();
11798
- return _context74.abrupt("return", this.get(this.baseURL + "/segments/".concat(segmentId, "/target/").concat(targetId)));
12090
+ return _context75.abrupt("return", this.get(this.baseURL + "/segments/".concat(segmentId, "/target/").concat(targetId)));
11799
12091
 
11800
12092
  case 2:
11801
12093
  case "end":
11802
- return _context74.stop();
12094
+ return _context75.stop();
11803
12095
  }
11804
12096
  }
11805
- }, _callee74, this);
12097
+ }, _callee75, this);
11806
12098
  }));
11807
12099
 
11808
- function segmentTargetExists(_x105, _x106) {
12100
+ function segmentTargetExists(_x107, _x108) {
11809
12101
  return _segmentTargetExists.apply(this, arguments);
11810
12102
  }
11811
12103
 
@@ -11822,23 +12114,23 @@ var StreamChat = /*#__PURE__*/function () {
11822
12114
  }, {
11823
12115
  key: "createCampaign",
11824
12116
  value: function () {
11825
- var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(params) {
11826
- return _regeneratorRuntime.wrap(function _callee75$(_context75) {
12117
+ var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(params) {
12118
+ return _regeneratorRuntime.wrap(function _callee76$(_context76) {
11827
12119
  while (1) {
11828
- switch (_context75.prev = _context75.next) {
12120
+ switch (_context76.prev = _context76.next) {
11829
12121
  case 0:
11830
12122
  this.validateServerSideAuth();
11831
- return _context75.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
12123
+ return _context76.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
11832
12124
 
11833
12125
  case 2:
11834
12126
  case "end":
11835
- return _context75.stop();
12127
+ return _context76.stop();
11836
12128
  }
11837
12129
  }
11838
- }, _callee75, this);
12130
+ }, _callee76, this);
11839
12131
  }));
11840
12132
 
11841
- function createCampaign(_x107) {
12133
+ function createCampaign(_x109) {
11842
12134
  return _createCampaign.apply(this, arguments);
11843
12135
  }
11844
12136
 
@@ -11847,23 +12139,23 @@ var StreamChat = /*#__PURE__*/function () {
11847
12139
  }, {
11848
12140
  key: "getCampaign",
11849
12141
  value: function () {
11850
- var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(id) {
11851
- return _regeneratorRuntime.wrap(function _callee76$(_context76) {
12142
+ var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(id) {
12143
+ return _regeneratorRuntime.wrap(function _callee77$(_context77) {
11852
12144
  while (1) {
11853
- switch (_context76.prev = _context76.next) {
12145
+ switch (_context77.prev = _context77.next) {
11854
12146
  case 0:
11855
12147
  this.validateServerSideAuth();
11856
- return _context76.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(id)));
12148
+ return _context77.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(id)));
11857
12149
 
11858
12150
  case 2:
11859
12151
  case "end":
11860
- return _context76.stop();
12152
+ return _context77.stop();
11861
12153
  }
11862
12154
  }
11863
- }, _callee76, this);
12155
+ }, _callee77, this);
11864
12156
  }));
11865
12157
 
11866
- function getCampaign(_x108) {
12158
+ function getCampaign(_x110) {
11867
12159
  return _getCampaign.apply(this, arguments);
11868
12160
  }
11869
12161
 
@@ -11872,26 +12164,26 @@ var StreamChat = /*#__PURE__*/function () {
11872
12164
  }, {
11873
12165
  key: "startCampaign",
11874
12166
  value: function () {
11875
- var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(id, options) {
11876
- return _regeneratorRuntime.wrap(function _callee77$(_context77) {
12167
+ var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(id, options) {
12168
+ return _regeneratorRuntime.wrap(function _callee78$(_context78) {
11877
12169
  while (1) {
11878
- switch (_context77.prev = _context77.next) {
12170
+ switch (_context78.prev = _context78.next) {
11879
12171
  case 0:
11880
12172
  this.validateServerSideAuth();
11881
- return _context77.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/start"), {
12173
+ return _context78.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/start"), {
11882
12174
  scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
11883
12175
  stop_at: options === null || options === void 0 ? void 0 : options.stopAt
11884
12176
  }));
11885
12177
 
11886
12178
  case 2:
11887
12179
  case "end":
11888
- return _context77.stop();
12180
+ return _context78.stop();
11889
12181
  }
11890
12182
  }
11891
- }, _callee77, this);
12183
+ }, _callee78, this);
11892
12184
  }));
11893
12185
 
11894
- function startCampaign(_x109, _x110) {
12186
+ function startCampaign(_x111, _x112) {
11895
12187
  return _startCampaign.apply(this, arguments);
11896
12188
  }
11897
12189
 
@@ -11907,30 +12199,30 @@ var StreamChat = /*#__PURE__*/function () {
11907
12199
  }, {
11908
12200
  key: "queryCampaigns",
11909
12201
  value: function () {
11910
- var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(filter, sort, options) {
11911
- return _regeneratorRuntime.wrap(function _callee78$(_context78) {
12202
+ var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(filter, sort, options) {
12203
+ return _regeneratorRuntime.wrap(function _callee79$(_context79) {
11912
12204
  while (1) {
11913
- switch (_context78.prev = _context78.next) {
12205
+ switch (_context79.prev = _context79.next) {
11914
12206
  case 0:
11915
12207
  this.validateServerSideAuth();
11916
- _context78.next = 3;
12208
+ _context79.next = 3;
11917
12209
  return this.post(this.baseURL + "/campaigns/query", _objectSpread({
11918
12210
  filter: filter,
11919
12211
  sort: sort
11920
12212
  }, options || {}));
11921
12213
 
11922
12214
  case 3:
11923
- return _context78.abrupt("return", _context78.sent);
12215
+ return _context79.abrupt("return", _context79.sent);
11924
12216
 
11925
12217
  case 4:
11926
12218
  case "end":
11927
- return _context78.stop();
12219
+ return _context79.stop();
11928
12220
  }
11929
12221
  }
11930
- }, _callee78, this);
12222
+ }, _callee79, this);
11931
12223
  }));
11932
12224
 
11933
- function queryCampaigns(_x111, _x112, _x113) {
12225
+ function queryCampaigns(_x113, _x114, _x115) {
11934
12226
  return _queryCampaigns.apply(this, arguments);
11935
12227
  }
11936
12228
 
@@ -11948,23 +12240,23 @@ var StreamChat = /*#__PURE__*/function () {
11948
12240
  }, {
11949
12241
  key: "updateCampaign",
11950
12242
  value: function () {
11951
- var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(id, params) {
11952
- return _regeneratorRuntime.wrap(function _callee79$(_context79) {
12243
+ var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(id, params) {
12244
+ return _regeneratorRuntime.wrap(function _callee80$(_context80) {
11953
12245
  while (1) {
11954
- switch (_context79.prev = _context79.next) {
12246
+ switch (_context80.prev = _context80.next) {
11955
12247
  case 0:
11956
12248
  this.validateServerSideAuth();
11957
- return _context79.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(id), params));
12249
+ return _context80.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(id), params));
11958
12250
 
11959
12251
  case 2:
11960
12252
  case "end":
11961
- return _context79.stop();
12253
+ return _context80.stop();
11962
12254
  }
11963
12255
  }
11964
- }, _callee79, this);
12256
+ }, _callee80, this);
11965
12257
  }));
11966
12258
 
11967
- function updateCampaign(_x114, _x115) {
12259
+ function updateCampaign(_x116, _x117) {
11968
12260
  return _updateCampaign.apply(this, arguments);
11969
12261
  }
11970
12262
 
@@ -11981,23 +12273,23 @@ var StreamChat = /*#__PURE__*/function () {
11981
12273
  }, {
11982
12274
  key: "deleteCampaign",
11983
12275
  value: function () {
11984
- var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(id) {
11985
- return _regeneratorRuntime.wrap(function _callee80$(_context80) {
12276
+ var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(id) {
12277
+ return _regeneratorRuntime.wrap(function _callee81$(_context81) {
11986
12278
  while (1) {
11987
- switch (_context80.prev = _context80.next) {
12279
+ switch (_context81.prev = _context81.next) {
11988
12280
  case 0:
11989
12281
  this.validateServerSideAuth();
11990
- return _context80.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
12282
+ return _context81.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
11991
12283
 
11992
12284
  case 2:
11993
12285
  case "end":
11994
- return _context80.stop();
12286
+ return _context81.stop();
11995
12287
  }
11996
12288
  }
11997
- }, _callee80, this);
12289
+ }, _callee81, this);
11998
12290
  }));
11999
12291
 
12000
- function deleteCampaign(_x116) {
12292
+ function deleteCampaign(_x118) {
12001
12293
  return _deleteCampaign.apply(this, arguments);
12002
12294
  }
12003
12295
 
@@ -12014,23 +12306,23 @@ var StreamChat = /*#__PURE__*/function () {
12014
12306
  }, {
12015
12307
  key: "stopCampaign",
12016
12308
  value: function () {
12017
- var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(id) {
12018
- return _regeneratorRuntime.wrap(function _callee81$(_context81) {
12309
+ var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(id) {
12310
+ return _regeneratorRuntime.wrap(function _callee82$(_context82) {
12019
12311
  while (1) {
12020
- switch (_context81.prev = _context81.next) {
12312
+ switch (_context82.prev = _context82.next) {
12021
12313
  case 0:
12022
12314
  this.validateServerSideAuth();
12023
- return _context81.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/stop")));
12315
+ return _context82.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/stop")));
12024
12316
 
12025
12317
  case 2:
12026
12318
  case "end":
12027
- return _context81.stop();
12319
+ return _context82.stop();
12028
12320
  }
12029
12321
  }
12030
- }, _callee81, this);
12322
+ }, _callee82, this);
12031
12323
  }));
12032
12324
 
12033
- function stopCampaign(_x117) {
12325
+ function stopCampaign(_x119) {
12034
12326
  return _stopCampaign.apply(this, arguments);
12035
12327
  }
12036
12328
 
@@ -12046,24 +12338,24 @@ var StreamChat = /*#__PURE__*/function () {
12046
12338
  }, {
12047
12339
  key: "enrichURL",
12048
12340
  value: function () {
12049
- var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(url) {
12050
- return _regeneratorRuntime.wrap(function _callee82$(_context82) {
12341
+ var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(url) {
12342
+ return _regeneratorRuntime.wrap(function _callee83$(_context83) {
12051
12343
  while (1) {
12052
- switch (_context82.prev = _context82.next) {
12344
+ switch (_context83.prev = _context83.next) {
12053
12345
  case 0:
12054
- return _context82.abrupt("return", this.get(this.baseURL + "/og", {
12346
+ return _context83.abrupt("return", this.get(this.baseURL + "/og", {
12055
12347
  url: url
12056
12348
  }));
12057
12349
 
12058
12350
  case 1:
12059
12351
  case "end":
12060
- return _context82.stop();
12352
+ return _context83.stop();
12061
12353
  }
12062
12354
  }
12063
- }, _callee82, this);
12355
+ }, _callee83, this);
12064
12356
  }));
12065
12357
 
12066
- function enrichURL(_x118) {
12358
+ function enrichURL(_x120) {
12067
12359
  return _enrichURL.apply(this, arguments);
12068
12360
  }
12069
12361
 
@@ -12080,22 +12372,22 @@ var StreamChat = /*#__PURE__*/function () {
12080
12372
  }, {
12081
12373
  key: "getTask",
12082
12374
  value: function () {
12083
- var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(id) {
12084
- return _regeneratorRuntime.wrap(function _callee83$(_context83) {
12375
+ var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(id) {
12376
+ return _regeneratorRuntime.wrap(function _callee84$(_context84) {
12085
12377
  while (1) {
12086
- switch (_context83.prev = _context83.next) {
12378
+ switch (_context84.prev = _context84.next) {
12087
12379
  case 0:
12088
- return _context83.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
12380
+ return _context84.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
12089
12381
 
12090
12382
  case 1:
12091
12383
  case "end":
12092
- return _context83.stop();
12384
+ return _context84.stop();
12093
12385
  }
12094
12386
  }
12095
- }, _callee83, this);
12387
+ }, _callee84, this);
12096
12388
  }));
12097
12389
 
12098
- function getTask(_x119) {
12390
+ function getTask(_x121) {
12099
12391
  return _getTask.apply(this, arguments);
12100
12392
  }
12101
12393
 
@@ -12113,31 +12405,31 @@ var StreamChat = /*#__PURE__*/function () {
12113
12405
  }, {
12114
12406
  key: "deleteChannels",
12115
12407
  value: function () {
12116
- var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(cids) {
12408
+ var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(cids) {
12117
12409
  var options,
12118
- _args84 = arguments;
12119
- return _regeneratorRuntime.wrap(function _callee84$(_context84) {
12410
+ _args85 = arguments;
12411
+ return _regeneratorRuntime.wrap(function _callee85$(_context85) {
12120
12412
  while (1) {
12121
- switch (_context84.prev = _context84.next) {
12413
+ switch (_context85.prev = _context85.next) {
12122
12414
  case 0:
12123
- options = _args84.length > 1 && _args84[1] !== undefined ? _args84[1] : {};
12124
- _context84.next = 3;
12415
+ options = _args85.length > 1 && _args85[1] !== undefined ? _args85[1] : {};
12416
+ _context85.next = 3;
12125
12417
  return this.post(this.baseURL + "/channels/delete", _objectSpread({
12126
12418
  cids: cids
12127
12419
  }, options));
12128
12420
 
12129
12421
  case 3:
12130
- return _context84.abrupt("return", _context84.sent);
12422
+ return _context85.abrupt("return", _context85.sent);
12131
12423
 
12132
12424
  case 4:
12133
12425
  case "end":
12134
- return _context84.stop();
12426
+ return _context85.stop();
12135
12427
  }
12136
12428
  }
12137
- }, _callee84, this);
12429
+ }, _callee85, this);
12138
12430
  }));
12139
12431
 
12140
- function deleteChannels(_x120) {
12432
+ function deleteChannels(_x122) {
12141
12433
  return _deleteChannels.apply(this, arguments);
12142
12434
  }
12143
12435
 
@@ -12155,17 +12447,17 @@ var StreamChat = /*#__PURE__*/function () {
12155
12447
  }, {
12156
12448
  key: "deleteUsers",
12157
12449
  value: function () {
12158
- var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(user_ids) {
12450
+ var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(user_ids) {
12159
12451
  var options,
12160
- _args85 = arguments;
12161
- return _regeneratorRuntime.wrap(function _callee85$(_context85) {
12452
+ _args86 = arguments;
12453
+ return _regeneratorRuntime.wrap(function _callee86$(_context86) {
12162
12454
  while (1) {
12163
- switch (_context85.prev = _context85.next) {
12455
+ switch (_context86.prev = _context86.next) {
12164
12456
  case 0:
12165
- options = _args85.length > 1 && _args85[1] !== undefined ? _args85[1] : {};
12457
+ options = _args86.length > 1 && _args86[1] !== undefined ? _args86[1] : {};
12166
12458
 
12167
12459
  if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
12168
- _context85.next = 3;
12460
+ _context86.next = 3;
12169
12461
  break;
12170
12462
  }
12171
12463
 
@@ -12173,7 +12465,7 @@ var StreamChat = /*#__PURE__*/function () {
12173
12465
 
12174
12466
  case 3:
12175
12467
  if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
12176
- _context85.next = 5;
12468
+ _context86.next = 5;
12177
12469
  break;
12178
12470
  }
12179
12471
 
@@ -12181,30 +12473,30 @@ var StreamChat = /*#__PURE__*/function () {
12181
12473
 
12182
12474
  case 5:
12183
12475
  if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
12184
- _context85.next = 7;
12476
+ _context86.next = 7;
12185
12477
  break;
12186
12478
  }
12187
12479
 
12188
12480
  throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
12189
12481
 
12190
12482
  case 7:
12191
- _context85.next = 9;
12483
+ _context86.next = 9;
12192
12484
  return this.post(this.baseURL + "/users/delete", _objectSpread({
12193
12485
  user_ids: user_ids
12194
12486
  }, options));
12195
12487
 
12196
12488
  case 9:
12197
- return _context85.abrupt("return", _context85.sent);
12489
+ return _context86.abrupt("return", _context86.sent);
12198
12490
 
12199
12491
  case 10:
12200
12492
  case "end":
12201
- return _context85.stop();
12493
+ return _context86.stop();
12202
12494
  }
12203
12495
  }
12204
- }, _callee85, this);
12496
+ }, _callee86, this);
12205
12497
  }));
12206
12498
 
12207
- function deleteUsers(_x121) {
12499
+ function deleteUsers(_x123) {
12208
12500
  return _deleteUsers.apply(this, arguments);
12209
12501
  }
12210
12502
 
@@ -12225,28 +12517,28 @@ var StreamChat = /*#__PURE__*/function () {
12225
12517
  }, {
12226
12518
  key: "_createImportURL",
12227
12519
  value: function () {
12228
- var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(filename) {
12229
- return _regeneratorRuntime.wrap(function _callee86$(_context86) {
12520
+ var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87(filename) {
12521
+ return _regeneratorRuntime.wrap(function _callee87$(_context87) {
12230
12522
  while (1) {
12231
- switch (_context86.prev = _context86.next) {
12523
+ switch (_context87.prev = _context87.next) {
12232
12524
  case 0:
12233
- _context86.next = 2;
12525
+ _context87.next = 2;
12234
12526
  return this.post(this.baseURL + "/import_urls", {
12235
12527
  filename: filename
12236
12528
  });
12237
12529
 
12238
12530
  case 2:
12239
- return _context86.abrupt("return", _context86.sent);
12531
+ return _context87.abrupt("return", _context87.sent);
12240
12532
 
12241
12533
  case 3:
12242
12534
  case "end":
12243
- return _context86.stop();
12535
+ return _context87.stop();
12244
12536
  }
12245
12537
  }
12246
- }, _callee86, this);
12538
+ }, _callee87, this);
12247
12539
  }));
12248
12540
 
12249
- function _createImportURL(_x122) {
12541
+ function _createImportURL(_x124) {
12250
12542
  return _createImportURL2.apply(this, arguments);
12251
12543
  }
12252
12544
 
@@ -12268,33 +12560,33 @@ var StreamChat = /*#__PURE__*/function () {
12268
12560
  }, {
12269
12561
  key: "_createImport",
12270
12562
  value: function () {
12271
- var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87(path) {
12563
+ var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(path) {
12272
12564
  var options,
12273
- _args87 = arguments;
12274
- return _regeneratorRuntime.wrap(function _callee87$(_context87) {
12565
+ _args88 = arguments;
12566
+ return _regeneratorRuntime.wrap(function _callee88$(_context88) {
12275
12567
  while (1) {
12276
- switch (_context87.prev = _context87.next) {
12568
+ switch (_context88.prev = _context88.next) {
12277
12569
  case 0:
12278
- options = _args87.length > 1 && _args87[1] !== undefined ? _args87[1] : {
12570
+ options = _args88.length > 1 && _args88[1] !== undefined ? _args88[1] : {
12279
12571
  mode: 'upsert'
12280
12572
  };
12281
- _context87.next = 3;
12573
+ _context88.next = 3;
12282
12574
  return this.post(this.baseURL + "/imports", _objectSpread({
12283
12575
  path: path
12284
12576
  }, options));
12285
12577
 
12286
12578
  case 3:
12287
- return _context87.abrupt("return", _context87.sent);
12579
+ return _context88.abrupt("return", _context88.sent);
12288
12580
 
12289
12581
  case 4:
12290
12582
  case "end":
12291
- return _context87.stop();
12583
+ return _context88.stop();
12292
12584
  }
12293
12585
  }
12294
- }, _callee87, this);
12586
+ }, _callee88, this);
12295
12587
  }));
12296
12588
 
12297
- function _createImport(_x123) {
12589
+ function _createImport(_x125) {
12298
12590
  return _createImport2.apply(this, arguments);
12299
12591
  }
12300
12592
 
@@ -12316,26 +12608,26 @@ var StreamChat = /*#__PURE__*/function () {
12316
12608
  }, {
12317
12609
  key: "_getImport",
12318
12610
  value: function () {
12319
- var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(id) {
12320
- return _regeneratorRuntime.wrap(function _callee88$(_context88) {
12611
+ var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee89(id) {
12612
+ return _regeneratorRuntime.wrap(function _callee89$(_context89) {
12321
12613
  while (1) {
12322
- switch (_context88.prev = _context88.next) {
12614
+ switch (_context89.prev = _context89.next) {
12323
12615
  case 0:
12324
- _context88.next = 2;
12616
+ _context89.next = 2;
12325
12617
  return this.get(this.baseURL + "/imports/".concat(id));
12326
12618
 
12327
12619
  case 2:
12328
- return _context88.abrupt("return", _context88.sent);
12620
+ return _context89.abrupt("return", _context89.sent);
12329
12621
 
12330
12622
  case 3:
12331
12623
  case "end":
12332
- return _context88.stop();
12624
+ return _context89.stop();
12333
12625
  }
12334
12626
  }
12335
- }, _callee88, this);
12627
+ }, _callee89, this);
12336
12628
  }));
12337
12629
 
12338
- function _getImport(_x124) {
12630
+ function _getImport(_x126) {
12339
12631
  return _getImport2.apply(this, arguments);
12340
12632
  }
12341
12633
 
@@ -12357,26 +12649,26 @@ var StreamChat = /*#__PURE__*/function () {
12357
12649
  }, {
12358
12650
  key: "_listImports",
12359
12651
  value: function () {
12360
- var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee89(options) {
12361
- return _regeneratorRuntime.wrap(function _callee89$(_context89) {
12652
+ var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee90(options) {
12653
+ return _regeneratorRuntime.wrap(function _callee90$(_context90) {
12362
12654
  while (1) {
12363
- switch (_context89.prev = _context89.next) {
12655
+ switch (_context90.prev = _context90.next) {
12364
12656
  case 0:
12365
- _context89.next = 2;
12657
+ _context90.next = 2;
12366
12658
  return this.get(this.baseURL + "/imports", options);
12367
12659
 
12368
12660
  case 2:
12369
- return _context89.abrupt("return", _context89.sent);
12661
+ return _context90.abrupt("return", _context90.sent);
12370
12662
 
12371
12663
  case 3:
12372
12664
  case "end":
12373
- return _context89.stop();
12665
+ return _context90.stop();
12374
12666
  }
12375
12667
  }
12376
- }, _callee89, this);
12668
+ }, _callee90, this);
12377
12669
  }));
12378
12670
 
12379
- function _listImports(_x125) {
12671
+ function _listImports(_x127) {
12380
12672
  return _listImports2.apply(this, arguments);
12381
12673
  }
12382
12674
 
@@ -12395,28 +12687,28 @@ var StreamChat = /*#__PURE__*/function () {
12395
12687
  }, {
12396
12688
  key: "upsertPushProvider",
12397
12689
  value: function () {
12398
- var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee90(pushProvider) {
12399
- return _regeneratorRuntime.wrap(function _callee90$(_context90) {
12690
+ var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee91(pushProvider) {
12691
+ return _regeneratorRuntime.wrap(function _callee91$(_context91) {
12400
12692
  while (1) {
12401
- switch (_context90.prev = _context90.next) {
12693
+ switch (_context91.prev = _context91.next) {
12402
12694
  case 0:
12403
- _context90.next = 2;
12695
+ _context91.next = 2;
12404
12696
  return this.post(this.baseURL + "/push_providers", {
12405
12697
  push_provider: pushProvider
12406
12698
  });
12407
12699
 
12408
12700
  case 2:
12409
- return _context90.abrupt("return", _context90.sent);
12701
+ return _context91.abrupt("return", _context91.sent);
12410
12702
 
12411
12703
  case 3:
12412
12704
  case "end":
12413
- return _context90.stop();
12705
+ return _context91.stop();
12414
12706
  }
12415
12707
  }
12416
- }, _callee90, this);
12708
+ }, _callee91, this);
12417
12709
  }));
12418
12710
 
12419
- function upsertPushProvider(_x126) {
12711
+ function upsertPushProvider(_x128) {
12420
12712
  return _upsertPushProvider.apply(this, arguments);
12421
12713
  }
12422
12714
 
@@ -12435,28 +12727,28 @@ var StreamChat = /*#__PURE__*/function () {
12435
12727
  }, {
12436
12728
  key: "deletePushProvider",
12437
12729
  value: function () {
12438
- var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee91(_ref10) {
12730
+ var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee92(_ref10) {
12439
12731
  var type, name;
12440
- return _regeneratorRuntime.wrap(function _callee91$(_context91) {
12732
+ return _regeneratorRuntime.wrap(function _callee92$(_context92) {
12441
12733
  while (1) {
12442
- switch (_context91.prev = _context91.next) {
12734
+ switch (_context92.prev = _context92.next) {
12443
12735
  case 0:
12444
12736
  type = _ref10.type, name = _ref10.name;
12445
- _context91.next = 3;
12737
+ _context92.next = 3;
12446
12738
  return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
12447
12739
 
12448
12740
  case 3:
12449
- return _context91.abrupt("return", _context91.sent);
12741
+ return _context92.abrupt("return", _context92.sent);
12450
12742
 
12451
12743
  case 4:
12452
12744
  case "end":
12453
- return _context91.stop();
12745
+ return _context92.stop();
12454
12746
  }
12455
12747
  }
12456
- }, _callee91, this);
12748
+ }, _callee92, this);
12457
12749
  }));
12458
12750
 
12459
- function deletePushProvider(_x127) {
12751
+ function deletePushProvider(_x129) {
12460
12752
  return _deletePushProvider.apply(this, arguments);
12461
12753
  }
12462
12754
 
@@ -12473,23 +12765,23 @@ var StreamChat = /*#__PURE__*/function () {
12473
12765
  }, {
12474
12766
  key: "listPushProviders",
12475
12767
  value: function () {
12476
- var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee92() {
12477
- return _regeneratorRuntime.wrap(function _callee92$(_context92) {
12768
+ var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee93() {
12769
+ return _regeneratorRuntime.wrap(function _callee93$(_context93) {
12478
12770
  while (1) {
12479
- switch (_context92.prev = _context92.next) {
12771
+ switch (_context93.prev = _context93.next) {
12480
12772
  case 0:
12481
- _context92.next = 2;
12773
+ _context93.next = 2;
12482
12774
  return this.get(this.baseURL + "/push_providers");
12483
12775
 
12484
12776
  case 2:
12485
- return _context92.abrupt("return", _context92.sent);
12777
+ return _context93.abrupt("return", _context93.sent);
12486
12778
 
12487
12779
  case 3:
12488
12780
  case "end":
12489
- return _context92.stop();
12781
+ return _context93.stop();
12490
12782
  }
12491
12783
  }
12492
- }, _callee92, this);
12784
+ }, _callee93, this);
12493
12785
  }));
12494
12786
 
12495
12787
  function listPushProviders() {
@@ -12517,31 +12809,577 @@ var StreamChat = /*#__PURE__*/function () {
12517
12809
  }, {
12518
12810
  key: "commitMessage",
12519
12811
  value: function () {
12520
- var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee93(id) {
12521
- return _regeneratorRuntime.wrap(function _callee93$(_context93) {
12812
+ var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee94(id) {
12813
+ return _regeneratorRuntime.wrap(function _callee94$(_context94) {
12522
12814
  while (1) {
12523
- switch (_context93.prev = _context93.next) {
12815
+ switch (_context94.prev = _context94.next) {
12524
12816
  case 0:
12525
- _context93.next = 2;
12817
+ _context94.next = 2;
12526
12818
  return this.post(this.baseURL + "/messages/".concat(id, "/commit"));
12527
12819
 
12528
12820
  case 2:
12529
- return _context93.abrupt("return", _context93.sent);
12821
+ return _context94.abrupt("return", _context94.sent);
12530
12822
 
12531
12823
  case 3:
12532
12824
  case "end":
12533
- return _context93.stop();
12825
+ return _context94.stop();
12534
12826
  }
12535
12827
  }
12536
- }, _callee93, this);
12828
+ }, _callee94, this);
12537
12829
  }));
12538
12830
 
12539
- function commitMessage(_x128) {
12831
+ function commitMessage(_x130) {
12540
12832
  return _commitMessage.apply(this, arguments);
12541
12833
  }
12542
12834
 
12543
12835
  return commitMessage;
12544
12836
  }()
12837
+ /**
12838
+ * Creates a poll
12839
+ * @param params PollData The poll that will be created
12840
+ * @returns {APIResponse & CreatePollAPIResponse} The poll
12841
+ */
12842
+
12843
+ }, {
12844
+ key: "createPoll",
12845
+ value: function () {
12846
+ var _createPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee95(poll) {
12847
+ return _regeneratorRuntime.wrap(function _callee95$(_context95) {
12848
+ while (1) {
12849
+ switch (_context95.prev = _context95.next) {
12850
+ case 0:
12851
+ _context95.next = 2;
12852
+ return this.post(this.baseURL + "/polls", poll);
12853
+
12854
+ case 2:
12855
+ return _context95.abrupt("return", _context95.sent);
12856
+
12857
+ case 3:
12858
+ case "end":
12859
+ return _context95.stop();
12860
+ }
12861
+ }
12862
+ }, _callee95, this);
12863
+ }));
12864
+
12865
+ function createPoll(_x131) {
12866
+ return _createPoll.apply(this, arguments);
12867
+ }
12868
+
12869
+ return createPoll;
12870
+ }()
12871
+ /**
12872
+ * Retrieves a poll
12873
+ * @param id string The poll id
12874
+ * @returns {APIResponse & GetPollAPIResponse} The poll
12875
+ */
12876
+
12877
+ }, {
12878
+ key: "getPoll",
12879
+ value: function () {
12880
+ var _getPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee96(id, userId) {
12881
+ return _regeneratorRuntime.wrap(function _callee96$(_context96) {
12882
+ while (1) {
12883
+ switch (_context96.prev = _context96.next) {
12884
+ case 0:
12885
+ _context96.next = 2;
12886
+ return this.get(this.baseURL + "/polls/".concat(id), _objectSpread({}, userId ? {
12887
+ user_id: userId
12888
+ } : {}));
12889
+
12890
+ case 2:
12891
+ return _context96.abrupt("return", _context96.sent);
12892
+
12893
+ case 3:
12894
+ case "end":
12895
+ return _context96.stop();
12896
+ }
12897
+ }
12898
+ }, _callee96, this);
12899
+ }));
12900
+
12901
+ function getPoll(_x132, _x133) {
12902
+ return _getPoll.apply(this, arguments);
12903
+ }
12904
+
12905
+ return getPoll;
12906
+ }()
12907
+ /**
12908
+ * Updates a poll
12909
+ * @param poll PollData The poll that will be updated
12910
+ * @returns {APIResponse & PollResponse} The poll
12911
+ */
12912
+
12913
+ }, {
12914
+ key: "updatePoll",
12915
+ value: function () {
12916
+ var _updatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee97(poll) {
12917
+ return _regeneratorRuntime.wrap(function _callee97$(_context97) {
12918
+ while (1) {
12919
+ switch (_context97.prev = _context97.next) {
12920
+ case 0:
12921
+ _context97.next = 2;
12922
+ return this.put(this.baseURL + "/polls", poll);
12923
+
12924
+ case 2:
12925
+ return _context97.abrupt("return", _context97.sent);
12926
+
12927
+ case 3:
12928
+ case "end":
12929
+ return _context97.stop();
12930
+ }
12931
+ }
12932
+ }, _callee97, this);
12933
+ }));
12934
+
12935
+ function updatePoll(_x134) {
12936
+ return _updatePoll.apply(this, arguments);
12937
+ }
12938
+
12939
+ return updatePoll;
12940
+ }()
12941
+ /**
12942
+ * Partially updates a poll
12943
+ * @param id string The poll id
12944
+ * @param {PartialPollUpdate<StreamChatGenerics>} partialPollObject which should contain id and any of "set" or "unset" params;
12945
+ * example: {id: "44f26af5-f2be-4fa7-9dac-71cf893781de", set:{field: value}, unset:["field2"]}
12946
+ * @returns {APIResponse & UpdatePollAPIResponse} The poll
12947
+ */
12948
+
12949
+ }, {
12950
+ key: "partialUpdatePoll",
12951
+ value: function () {
12952
+ var _partialUpdatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee98(id, partialPollObject) {
12953
+ return _regeneratorRuntime.wrap(function _callee98$(_context98) {
12954
+ while (1) {
12955
+ switch (_context98.prev = _context98.next) {
12956
+ case 0:
12957
+ _context98.next = 2;
12958
+ return this.patch(this.baseURL + "/polls/".concat(id), partialPollObject);
12959
+
12960
+ case 2:
12961
+ return _context98.abrupt("return", _context98.sent);
12962
+
12963
+ case 3:
12964
+ case "end":
12965
+ return _context98.stop();
12966
+ }
12967
+ }
12968
+ }, _callee98, this);
12969
+ }));
12970
+
12971
+ function partialUpdatePoll(_x135, _x136) {
12972
+ return _partialUpdatePoll.apply(this, arguments);
12973
+ }
12974
+
12975
+ return partialUpdatePoll;
12976
+ }()
12977
+ /**
12978
+ * Delete a poll
12979
+ * @param id string The poll id
12980
+ * @param userId string The user id (only serverside)
12981
+ * @returns
12982
+ */
12983
+
12984
+ }, {
12985
+ key: "deletePoll",
12986
+ value: function () {
12987
+ var _deletePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee99(id, userId) {
12988
+ return _regeneratorRuntime.wrap(function _callee99$(_context99) {
12989
+ while (1) {
12990
+ switch (_context99.prev = _context99.next) {
12991
+ case 0:
12992
+ _context99.next = 2;
12993
+ return this.delete(this.baseURL + "/polls/".concat(id), _objectSpread({}, userId ? {
12994
+ user_id: userId
12995
+ } : {}));
12996
+
12997
+ case 2:
12998
+ return _context99.abrupt("return", _context99.sent);
12999
+
13000
+ case 3:
13001
+ case "end":
13002
+ return _context99.stop();
13003
+ }
13004
+ }
13005
+ }, _callee99, this);
13006
+ }));
13007
+
13008
+ function deletePoll(_x137, _x138) {
13009
+ return _deletePoll.apply(this, arguments);
13010
+ }
13011
+
13012
+ return deletePoll;
13013
+ }()
13014
+ /**
13015
+ * Close a poll
13016
+ * @param id string The poll id
13017
+ * @returns {APIResponse & UpdatePollAPIResponse} The poll
13018
+ */
13019
+
13020
+ }, {
13021
+ key: "closePoll",
13022
+ value: function () {
13023
+ var _closePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee100(id) {
13024
+ return _regeneratorRuntime.wrap(function _callee100$(_context100) {
13025
+ while (1) {
13026
+ switch (_context100.prev = _context100.next) {
13027
+ case 0:
13028
+ return _context100.abrupt("return", this.partialUpdatePoll(id, {
13029
+ set: {
13030
+ is_closed: true
13031
+ }
13032
+ }));
13033
+
13034
+ case 1:
13035
+ case "end":
13036
+ return _context100.stop();
13037
+ }
13038
+ }
13039
+ }, _callee100, this);
13040
+ }));
13041
+
13042
+ function closePoll(_x139) {
13043
+ return _closePoll.apply(this, arguments);
13044
+ }
13045
+
13046
+ return closePoll;
13047
+ }()
13048
+ /**
13049
+ * Creates a poll option
13050
+ * @param pollId string The poll id
13051
+ * @param option PollOptionData The poll option that will be created
13052
+ * @returns {APIResponse & PollOptionResponse} The poll option
13053
+ */
13054
+
13055
+ }, {
13056
+ key: "createPollOption",
13057
+ value: function () {
13058
+ var _createPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee101(pollId, option) {
13059
+ return _regeneratorRuntime.wrap(function _callee101$(_context101) {
13060
+ while (1) {
13061
+ switch (_context101.prev = _context101.next) {
13062
+ case 0:
13063
+ _context101.next = 2;
13064
+ return this.post(this.baseURL + "/polls/".concat(pollId, "/options"), option);
13065
+
13066
+ case 2:
13067
+ return _context101.abrupt("return", _context101.sent);
13068
+
13069
+ case 3:
13070
+ case "end":
13071
+ return _context101.stop();
13072
+ }
13073
+ }
13074
+ }, _callee101, this);
13075
+ }));
13076
+
13077
+ function createPollOption(_x140, _x141) {
13078
+ return _createPollOption.apply(this, arguments);
13079
+ }
13080
+
13081
+ return createPollOption;
13082
+ }()
13083
+ /**
13084
+ * Retrieves a poll option
13085
+ * @param pollId string The poll id
13086
+ * @param optionId string The poll option id
13087
+ * @returns {APIResponse & PollOptionResponse} The poll option
13088
+ */
13089
+
13090
+ }, {
13091
+ key: "getPollOption",
13092
+ value: function () {
13093
+ var _getPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee102(pollId, optionId) {
13094
+ return _regeneratorRuntime.wrap(function _callee102$(_context102) {
13095
+ while (1) {
13096
+ switch (_context102.prev = _context102.next) {
13097
+ case 0:
13098
+ _context102.next = 2;
13099
+ return this.get(this.baseURL + "/polls/".concat(pollId, "/options/").concat(optionId));
13100
+
13101
+ case 2:
13102
+ return _context102.abrupt("return", _context102.sent);
13103
+
13104
+ case 3:
13105
+ case "end":
13106
+ return _context102.stop();
13107
+ }
13108
+ }
13109
+ }, _callee102, this);
13110
+ }));
13111
+
13112
+ function getPollOption(_x142, _x143) {
13113
+ return _getPollOption.apply(this, arguments);
13114
+ }
13115
+
13116
+ return getPollOption;
13117
+ }()
13118
+ /**
13119
+ * Updates a poll option
13120
+ * @param pollId string The poll id
13121
+ * @param option PollOptionData The poll option that will be updated
13122
+ * @returns
13123
+ */
13124
+
13125
+ }, {
13126
+ key: "updatePollOption",
13127
+ value: function () {
13128
+ var _updatePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee103(pollId, option) {
13129
+ return _regeneratorRuntime.wrap(function _callee103$(_context103) {
13130
+ while (1) {
13131
+ switch (_context103.prev = _context103.next) {
13132
+ case 0:
13133
+ _context103.next = 2;
13134
+ return this.put(this.baseURL + "/polls/".concat(pollId, "/options"), option);
13135
+
13136
+ case 2:
13137
+ return _context103.abrupt("return", _context103.sent);
13138
+
13139
+ case 3:
13140
+ case "end":
13141
+ return _context103.stop();
13142
+ }
13143
+ }
13144
+ }, _callee103, this);
13145
+ }));
13146
+
13147
+ function updatePollOption(_x144, _x145) {
13148
+ return _updatePollOption.apply(this, arguments);
13149
+ }
13150
+
13151
+ return updatePollOption;
13152
+ }()
13153
+ /**
13154
+ * Delete a poll option
13155
+ * @param pollId string The poll id
13156
+ * @param optionId string The poll option id
13157
+ * @returns {APIResponse} The poll option
13158
+ */
13159
+
13160
+ }, {
13161
+ key: "deletePollOption",
13162
+ value: function () {
13163
+ var _deletePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee104(pollId, optionId) {
13164
+ return _regeneratorRuntime.wrap(function _callee104$(_context104) {
13165
+ while (1) {
13166
+ switch (_context104.prev = _context104.next) {
13167
+ case 0:
13168
+ _context104.next = 2;
13169
+ return this.delete(this.baseURL + "/polls/".concat(pollId, "/options/").concat(optionId));
13170
+
13171
+ case 2:
13172
+ return _context104.abrupt("return", _context104.sent);
13173
+
13174
+ case 3:
13175
+ case "end":
13176
+ return _context104.stop();
13177
+ }
13178
+ }
13179
+ }, _callee104, this);
13180
+ }));
13181
+
13182
+ function deletePollOption(_x146, _x147) {
13183
+ return _deletePollOption.apply(this, arguments);
13184
+ }
13185
+
13186
+ return deletePollOption;
13187
+ }()
13188
+ /**
13189
+ * Cast vote on a poll
13190
+ * @param messageId string The message id
13191
+ * @param pollId string The poll id
13192
+ * @param vote PollVoteData The vote that will be casted
13193
+ * @returns {APIResponse & CastVoteAPIResponse} The poll vote
13194
+ */
13195
+
13196
+ }, {
13197
+ key: "castPollVote",
13198
+ value: function () {
13199
+ var _castPollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee105(messageId, pollId, vote) {
13200
+ var options,
13201
+ _args105 = arguments;
13202
+ return _regeneratorRuntime.wrap(function _callee105$(_context105) {
13203
+ while (1) {
13204
+ switch (_context105.prev = _context105.next) {
13205
+ case 0:
13206
+ options = _args105.length > 3 && _args105[3] !== undefined ? _args105[3] : {};
13207
+ _context105.next = 3;
13208
+ return this.post(this.baseURL + "/messages/".concat(messageId, "/polls/").concat(pollId, "/vote"), _objectSpread({
13209
+ vote: vote
13210
+ }, options));
13211
+
13212
+ case 3:
13213
+ return _context105.abrupt("return", _context105.sent);
13214
+
13215
+ case 4:
13216
+ case "end":
13217
+ return _context105.stop();
13218
+ }
13219
+ }
13220
+ }, _callee105, this);
13221
+ }));
13222
+
13223
+ function castPollVote(_x148, _x149, _x150) {
13224
+ return _castPollVote.apply(this, arguments);
13225
+ }
13226
+
13227
+ return castPollVote;
13228
+ }()
13229
+ /**
13230
+ * Add a poll answer
13231
+ * @param messageId string The message id
13232
+ * @param pollId string The poll id
13233
+ * @param answerText string The answer text
13234
+ */
13235
+
13236
+ }, {
13237
+ key: "addPollAnswer",
13238
+ value: function () {
13239
+ var _addPollAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee106(messageId, pollId, answerText) {
13240
+ return _regeneratorRuntime.wrap(function _callee106$(_context106) {
13241
+ while (1) {
13242
+ switch (_context106.prev = _context106.next) {
13243
+ case 0:
13244
+ return _context106.abrupt("return", this.castPollVote(messageId, pollId, {
13245
+ answer_text: answerText
13246
+ }));
13247
+
13248
+ case 1:
13249
+ case "end":
13250
+ return _context106.stop();
13251
+ }
13252
+ }
13253
+ }, _callee106, this);
13254
+ }));
13255
+
13256
+ function addPollAnswer(_x151, _x152, _x153) {
13257
+ return _addPollAnswer.apply(this, arguments);
13258
+ }
13259
+
13260
+ return addPollAnswer;
13261
+ }()
13262
+ }, {
13263
+ key: "removePollVote",
13264
+ value: function () {
13265
+ var _removePollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee107(messageId, pollId, voteId) {
13266
+ return _regeneratorRuntime.wrap(function _callee107$(_context107) {
13267
+ while (1) {
13268
+ switch (_context107.prev = _context107.next) {
13269
+ case 0:
13270
+ _context107.next = 2;
13271
+ return this.delete(this.baseURL + "/messages/".concat(messageId, "/polls/").concat(pollId, "/vote/").concat(voteId));
13272
+
13273
+ case 2:
13274
+ return _context107.abrupt("return", _context107.sent);
13275
+
13276
+ case 3:
13277
+ case "end":
13278
+ return _context107.stop();
13279
+ }
13280
+ }
13281
+ }, _callee107, this);
13282
+ }));
13283
+
13284
+ function removePollVote(_x154, _x155, _x156) {
13285
+ return _removePollVote.apply(this, arguments);
13286
+ }
13287
+
13288
+ return removePollVote;
13289
+ }()
13290
+ /**
13291
+ * Queries polls
13292
+ * @param filter
13293
+ * @param sort
13294
+ * @param options Option object, {limit: 10, offset:0}
13295
+ * @returns {APIResponse & QueryPollsResponse} The polls
13296
+ */
13297
+
13298
+ }, {
13299
+ key: "queryPolls",
13300
+ value: function () {
13301
+ var _queryPolls = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee108() {
13302
+ var filter,
13303
+ sort,
13304
+ options,
13305
+ _args108 = arguments;
13306
+ return _regeneratorRuntime.wrap(function _callee108$(_context108) {
13307
+ while (1) {
13308
+ switch (_context108.prev = _context108.next) {
13309
+ case 0:
13310
+ filter = _args108.length > 0 && _args108[0] !== undefined ? _args108[0] : {};
13311
+ sort = _args108.length > 1 && _args108[1] !== undefined ? _args108[1] : [];
13312
+ options = _args108.length > 2 && _args108[2] !== undefined ? _args108[2] : {};
13313
+ _context108.next = 5;
13314
+ return this.post(this.baseURL + '/polls/query', _objectSpread({
13315
+ filter: filter,
13316
+ sort: normalizeQuerySort(sort)
13317
+ }, options));
13318
+
13319
+ case 5:
13320
+ return _context108.abrupt("return", _context108.sent);
13321
+
13322
+ case 6:
13323
+ case "end":
13324
+ return _context108.stop();
13325
+ }
13326
+ }
13327
+ }, _callee108, this);
13328
+ }));
13329
+
13330
+ function queryPolls() {
13331
+ return _queryPolls.apply(this, arguments);
13332
+ }
13333
+
13334
+ return queryPolls;
13335
+ }()
13336
+ /**
13337
+ * Queries poll votes
13338
+ * @param pollId
13339
+ * @param filter
13340
+ * @param sort
13341
+ * @param options Option object, {limit: 10, offset:0}
13342
+ * @returns {APIResponse & PollVotesAPIResponse} The poll votes
13343
+ */
13344
+
13345
+ }, {
13346
+ key: "queryPollVotes",
13347
+ value: function () {
13348
+ var _queryPollVotes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee109(pollId) {
13349
+ var filter,
13350
+ sort,
13351
+ options,
13352
+ _args109 = arguments;
13353
+ return _regeneratorRuntime.wrap(function _callee109$(_context109) {
13354
+ while (1) {
13355
+ switch (_context109.prev = _context109.next) {
13356
+ case 0:
13357
+ filter = _args109.length > 1 && _args109[1] !== undefined ? _args109[1] : {};
13358
+ sort = _args109.length > 2 && _args109[2] !== undefined ? _args109[2] : [];
13359
+ options = _args109.length > 3 && _args109[3] !== undefined ? _args109[3] : {};
13360
+ _context109.next = 5;
13361
+ return this.post(this.baseURL + "/polls/".concat(pollId, "/votes"), _objectSpread({
13362
+ filter: filter,
13363
+ sort: normalizeQuerySort(sort)
13364
+ }, options));
13365
+
13366
+ case 5:
13367
+ return _context109.abrupt("return", _context109.sent);
13368
+
13369
+ case 6:
13370
+ case "end":
13371
+ return _context109.stop();
13372
+ }
13373
+ }
13374
+ }, _callee109, this);
13375
+ }));
13376
+
13377
+ function queryPollVotes(_x157) {
13378
+ return _queryPollVotes.apply(this, arguments);
13379
+ }
13380
+
13381
+ return queryPollVotes;
13382
+ }()
12545
13383
  }], [{
12546
13384
  key: "getInstance",
12547
13385
  value: function getInstance(key, secretOrOptions, options) {
@@ -12594,6 +13432,11 @@ var EVENT_MAP = {
12594
13432
  'notification.mutes_updated': true,
12595
13433
  'notification.removed_from_channel': true,
12596
13434
  'notification.thread_message_new': true,
13435
+ 'poll.closed': true,
13436
+ 'poll.updated': true,
13437
+ 'poll.vote_casted': true,
13438
+ 'poll.vote_changed': true,
13439
+ 'poll.vote_removed': true,
12597
13440
  'reaction.deleted': true,
12598
13441
  'reaction.new': true,
12599
13442
  'reaction.updated': true,
@@ -12689,5 +13532,5 @@ var BuiltinPermissions = {
12689
13532
  UseFrozenChannel: 'Send messages and reactions to frozen channels'
12690
13533
  };
12691
13534
 
12692
- export { Allow, AllowAll, AnyResource, AnyRole, BuiltinPermissions, BuiltinRoles, Campaign, Channel, ChannelState, CheckSignature, ClientState, Deny, DenyAll, DevToken, EVENT_MAP, ErrorFromResponse, InsightMetrics, JWTServerToken, JWTUserToken, MaxPriority, MinPriority, Permission, Segment, StableWSConnection, StreamChat, Thread, TokenManager, UserFromToken, buildWsFatalInsight, buildWsSuccessAfterFailureInsight, chatCodes, decodeBase64, encodeBase64, formatMessage, isOwnUser, logChatPromiseExecution, postInsights };
13535
+ export { Allow, AllowAll, AnyResource, AnyRole, BuiltinPermissions, BuiltinRoles, Campaign, Channel, ChannelState, CheckSignature, ClientState, Deny, DenyAll, DevToken, EVENT_MAP, ErrorFromResponse, InsightMetrics, JWTServerToken, JWTUserToken, MaxPriority, MinPriority, Permission, Segment, StableWSConnection, StreamChat, Thread, TokenManager, UserFromToken, VotingVisibility, buildWsFatalInsight, buildWsSuccessAfterFailureInsight, chatCodes, decodeBase64, encodeBase64, formatMessage, isOwnUser, logChatPromiseExecution, postInsights };
12693
13536
  //# sourceMappingURL=browser.es.js.map