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