stream-chat 8.50.0 → 8.52.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.
@@ -7405,6 +7405,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
7405
7405
  /**
7406
7406
  * Response Types
7407
7407
  */
7408
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
7408
7409
  // TODO: Figure out a way to strongly type set and unset.
7409
7410
  // Thumb URL(thumb_url) is added considering video attachments as the backend will return the thumbnail in the response.
7410
7411
 
@@ -7579,7 +7580,43 @@ var DEFAULT_PAGE_LIMIT = 50;
7579
7580
  var DEFAULT_SORT = [{
7580
7581
  created_at: -1
7581
7582
  }];
7582
- var MARK_AS_READ_THROTTLE_TIMEOUT = 1000;
7583
+ var MARK_AS_READ_THROTTLE_TIMEOUT = 1000; // TODO: remove this once we move to API v2
7584
+
7585
+ var THREAD_RESPONSE_RESERVED_KEYS = {
7586
+ channel: true,
7587
+ channel_cid: true,
7588
+ created_at: true,
7589
+ created_by_user_id: true,
7590
+ parent_message_id: true,
7591
+ title: true,
7592
+ updated_at: true,
7593
+ latest_replies: true,
7594
+ active_participant_count: true,
7595
+ deleted_at: true,
7596
+ last_message_at: true,
7597
+ participant_count: true,
7598
+ reply_count: true,
7599
+ read: true,
7600
+ thread_participants: true,
7601
+ created_by: true,
7602
+ parent_message: true
7603
+ }; // TODO: remove this once we move to API v2
7604
+
7605
+ var constructCustomDataObject = function constructCustomDataObject(threadData) {
7606
+ var custom = {};
7607
+
7608
+ for (var key in threadData) {
7609
+ if (THREAD_RESPONSE_RESERVED_KEYS[key]) {
7610
+ continue;
7611
+ }
7612
+
7613
+ var customKey = key;
7614
+ custom[customKey] = threadData[customKey];
7615
+ }
7616
+
7617
+ return custom;
7618
+ };
7619
+
7583
7620
  var Thread = /*#__PURE__*/function () {
7584
7621
  function Thread(_ref) {
7585
7622
  var _this = this,
@@ -7587,7 +7624,7 @@ var Thread = /*#__PURE__*/function () {
7587
7624
  _threadData$reply_cou;
7588
7625
 
7589
7626
  var client = _ref.client,
7590
- threadData = _ref.threadData;
7627
+ _threadData = _ref.threadData;
7591
7628
 
7592
7629
  _classCallCheck(this, Thread);
7593
7630
 
@@ -7701,6 +7738,8 @@ var Thread = /*#__PURE__*/function () {
7701
7738
  return;
7702
7739
  }
7703
7740
 
7741
+ _this.unsubscribeFunctions.add(_this.subscribeThreadUpdated());
7742
+
7704
7743
  _this.unsubscribeFunctions.add(_this.subscribeMarkActiveThreadRead());
7705
7744
 
7706
7745
  _this.unsubscribeFunctions.add(_this.subscribeReloadActiveStaleThread());
@@ -7716,6 +7755,24 @@ var Thread = /*#__PURE__*/function () {
7716
7755
  _this.unsubscribeFunctions.add(_this.subscribeMessageUpdated());
7717
7756
  });
7718
7757
 
7758
+ _defineProperty(this, "subscribeThreadUpdated", function () {
7759
+ return _this.client.on('thread.updated', function (event) {
7760
+ if (!event.thread || event.thread.parent_message_id !== _this.id) {
7761
+ return;
7762
+ }
7763
+
7764
+ var threadData = event.thread;
7765
+
7766
+ _this.state.partialNext({
7767
+ title: threadData.title,
7768
+ updatedAt: new Date(threadData.updated_at),
7769
+ deletedAt: threadData.deleted_at ? new Date(threadData.deleted_at) : null,
7770
+ // TODO: use threadData.custom once we move to API v2
7771
+ custom: constructCustomDataObject(threadData)
7772
+ });
7773
+ }).unsubscribe;
7774
+ });
7775
+
7719
7776
  _defineProperty(this, "subscribeMarkActiveThreadRead", function () {
7720
7777
  return _this.state.subscribeWithSelector(function (nextValue) {
7721
7778
  return {
@@ -8143,12 +8200,12 @@ var Thread = /*#__PURE__*/function () {
8143
8200
  };
8144
8201
  }());
8145
8202
 
8146
- var _channel = client.channel(threadData.channel.type, threadData.channel.id, {
8147
- name: threadData.channel.name
8203
+ var _channel = client.channel(_threadData.channel.type, _threadData.channel.id, {
8204
+ name: _threadData.channel.name
8148
8205
  });
8149
8206
 
8150
8207
  _channel._hydrateMembers({
8151
- members: (_threadData$channel$m = threadData.channel.members) !== null && _threadData$channel$m !== void 0 ? _threadData$channel$m : [],
8208
+ members: (_threadData$channel$m = _threadData.channel.members) !== null && _threadData$channel$m !== void 0 ? _threadData$channel$m : [],
8152
8209
  overrideCurrentState: false
8153
8210
  }); // For when read object is undefined and due to that unreadMessageCount for
8154
8211
  // the current user isn't being incremented on message.new
@@ -8162,21 +8219,26 @@ var Thread = /*#__PURE__*/function () {
8162
8219
  last_read: new Date().toISOString()
8163
8220
  }] : [];
8164
8221
  this.state = new StateStore({
8222
+ // local only
8165
8223
  active: false,
8166
- channel: _channel,
8167
- createdAt: new Date(threadData.created_at),
8168
- deletedAt: threadData.deleted_at ? new Date(threadData.deleted_at) : null,
8169
8224
  isLoading: false,
8170
8225
  isStateStale: false,
8171
- pagination: repliesPaginationFromInitialThread(threadData),
8172
- parentMessage: formatMessage(threadData.parent_message),
8173
- participants: threadData.thread_participants,
8174
- read: formatReadState(!threadData.read || threadData.read.length === 0 ? placeholderReadResponse : threadData.read),
8175
- replies: threadData.latest_replies.map(formatMessage),
8176
- replyCount: (_threadData$reply_cou = threadData.reply_count) !== null && _threadData$reply_cou !== void 0 ? _threadData$reply_cou : 0,
8177
- updatedAt: threadData.updated_at ? new Date(threadData.updated_at) : null
8226
+ // 99.9% should never change
8227
+ channel: _channel,
8228
+ createdAt: new Date(_threadData.created_at),
8229
+ // rest
8230
+ deletedAt: _threadData.deleted_at ? new Date(_threadData.deleted_at) : null,
8231
+ pagination: repliesPaginationFromInitialThread(_threadData),
8232
+ parentMessage: formatMessage(_threadData.parent_message),
8233
+ participants: _threadData.thread_participants,
8234
+ read: formatReadState(!_threadData.read || _threadData.read.length === 0 ? placeholderReadResponse : _threadData.read),
8235
+ replies: _threadData.latest_replies.map(formatMessage),
8236
+ replyCount: (_threadData$reply_cou = _threadData.reply_count) !== null && _threadData$reply_cou !== void 0 ? _threadData$reply_cou : 0,
8237
+ updatedAt: _threadData.updated_at ? new Date(_threadData.updated_at) : null,
8238
+ title: _threadData.title,
8239
+ custom: constructCustomDataObject(_threadData)
8178
8240
  });
8179
- this.id = threadData.parent_message_id;
8241
+ this.id = _threadData.parent_message_id;
8180
8242
  this.client = client;
8181
8243
  }
8182
8244
 
@@ -14304,6 +14366,48 @@ var StreamChat = /*#__PURE__*/function () {
14304
14366
 
14305
14367
  return translateMessage;
14306
14368
  }()
14369
+ /**
14370
+ * translate - translates the given text to provided language
14371
+ *
14372
+ * @param {string} text
14373
+ * @param {string} destination_language
14374
+ * @param {string} source_language
14375
+ *
14376
+ * @return {TranslateResponse} Response that includes the message
14377
+ */
14378
+
14379
+ }, {
14380
+ key: "translate",
14381
+ value: function () {
14382
+ var _translate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(text, destination_language, source_language) {
14383
+ return _regeneratorRuntime.wrap(function _callee59$(_context59) {
14384
+ while (1) {
14385
+ switch (_context59.prev = _context59.next) {
14386
+ case 0:
14387
+ _context59.next = 2;
14388
+ return this.post(this.baseURL + "/translate", {
14389
+ text: text,
14390
+ source_language: source_language,
14391
+ destination_language: destination_language
14392
+ });
14393
+
14394
+ case 2:
14395
+ return _context59.abrupt("return", _context59.sent);
14396
+
14397
+ case 3:
14398
+ case "end":
14399
+ return _context59.stop();
14400
+ }
14401
+ }
14402
+ }, _callee59, this);
14403
+ }));
14404
+
14405
+ function translate(_x75, _x76, _x77) {
14406
+ return _translate.apply(this, arguments);
14407
+ }
14408
+
14409
+ return translate;
14410
+ }()
14307
14411
  /**
14308
14412
  * _normalizeExpiration - transforms expiration value into ISO string
14309
14413
  * @param {undefined|null|number|string|Date} timeoutOrExpirationDate expiration date or timeout. Use number type to set timeout in seconds, string or Date to set exact expiration date
@@ -14400,14 +14504,14 @@ var StreamChat = /*#__PURE__*/function () {
14400
14504
  }, {
14401
14505
  key: "updateMessage",
14402
14506
  value: function () {
14403
- var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(message, userId, options) {
14507
+ var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(message, userId, options) {
14404
14508
  var clonedMessage, reservedMessageFields;
14405
- return _regeneratorRuntime.wrap(function _callee59$(_context59) {
14509
+ return _regeneratorRuntime.wrap(function _callee60$(_context60) {
14406
14510
  while (1) {
14407
- switch (_context59.prev = _context59.next) {
14511
+ switch (_context60.prev = _context60.next) {
14408
14512
  case 0:
14409
14513
  if (message.id) {
14410
- _context59.next = 2;
14514
+ _context60.next = 2;
14411
14515
  break;
14412
14516
  }
14413
14517
 
@@ -14444,23 +14548,23 @@ var StreamChat = /*#__PURE__*/function () {
14444
14548
  });
14445
14549
  }
14446
14550
 
14447
- _context59.next = 10;
14551
+ _context60.next = 10;
14448
14552
  return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(message.id)), _objectSpread({
14449
14553
  message: clonedMessage
14450
14554
  }, options));
14451
14555
 
14452
14556
  case 10:
14453
- return _context59.abrupt("return", _context59.sent);
14557
+ return _context60.abrupt("return", _context60.sent);
14454
14558
 
14455
14559
  case 11:
14456
14560
  case "end":
14457
- return _context59.stop();
14561
+ return _context60.stop();
14458
14562
  }
14459
14563
  }
14460
- }, _callee59, this);
14564
+ }, _callee60, this);
14461
14565
  }));
14462
14566
 
14463
- function updateMessage(_x75, _x76, _x77) {
14567
+ function updateMessage(_x78, _x79, _x80) {
14464
14568
  return _updateMessage.apply(this, arguments);
14465
14569
  }
14466
14570
 
@@ -14483,14 +14587,14 @@ var StreamChat = /*#__PURE__*/function () {
14483
14587
  }, {
14484
14588
  key: "partialUpdateMessage",
14485
14589
  value: function () {
14486
- var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(id, partialMessageObject, userId, options) {
14590
+ var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id, partialMessageObject, userId, options) {
14487
14591
  var user;
14488
- return _regeneratorRuntime.wrap(function _callee60$(_context60) {
14592
+ return _regeneratorRuntime.wrap(function _callee61$(_context61) {
14489
14593
  while (1) {
14490
- switch (_context60.prev = _context60.next) {
14594
+ switch (_context61.prev = _context61.next) {
14491
14595
  case 0:
14492
14596
  if (id) {
14493
- _context60.next = 2;
14597
+ _context61.next = 2;
14494
14598
  break;
14495
14599
  }
14496
14600
 
@@ -14505,23 +14609,23 @@ var StreamChat = /*#__PURE__*/function () {
14505
14609
  };
14506
14610
  }
14507
14611
 
14508
- _context60.next = 6;
14612
+ _context61.next = 6;
14509
14613
  return this.put(this.baseURL + "/messages/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
14510
14614
  user: user
14511
14615
  }));
14512
14616
 
14513
14617
  case 6:
14514
- return _context60.abrupt("return", _context60.sent);
14618
+ return _context61.abrupt("return", _context61.sent);
14515
14619
 
14516
14620
  case 7:
14517
14621
  case "end":
14518
- return _context60.stop();
14622
+ return _context61.stop();
14519
14623
  }
14520
14624
  }
14521
- }, _callee60, this);
14625
+ }, _callee61, this);
14522
14626
  }));
14523
14627
 
14524
- function partialUpdateMessage(_x78, _x79, _x80, _x81) {
14628
+ function partialUpdateMessage(_x81, _x82, _x83, _x84) {
14525
14629
  return _partialUpdateMessage.apply(this, arguments);
14526
14630
  }
14527
14631
 
@@ -14530,11 +14634,11 @@ var StreamChat = /*#__PURE__*/function () {
14530
14634
  }, {
14531
14635
  key: "deleteMessage",
14532
14636
  value: function () {
14533
- var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(messageID, hardDelete) {
14637
+ var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(messageID, hardDelete) {
14534
14638
  var params;
14535
- return _regeneratorRuntime.wrap(function _callee61$(_context61) {
14639
+ return _regeneratorRuntime.wrap(function _callee62$(_context62) {
14536
14640
  while (1) {
14537
- switch (_context61.prev = _context61.next) {
14641
+ switch (_context62.prev = _context62.next) {
14538
14642
  case 0:
14539
14643
  params = {};
14540
14644
 
@@ -14544,21 +14648,21 @@ var StreamChat = /*#__PURE__*/function () {
14544
14648
  };
14545
14649
  }
14546
14650
 
14547
- _context61.next = 4;
14651
+ _context62.next = 4;
14548
14652
  return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), params);
14549
14653
 
14550
14654
  case 4:
14551
- return _context61.abrupt("return", _context61.sent);
14655
+ return _context62.abrupt("return", _context62.sent);
14552
14656
 
14553
14657
  case 5:
14554
14658
  case "end":
14555
- return _context61.stop();
14659
+ return _context62.stop();
14556
14660
  }
14557
14661
  }
14558
- }, _callee61, this);
14662
+ }, _callee62, this);
14559
14663
  }));
14560
14664
 
14561
- function deleteMessage(_x82, _x83) {
14665
+ function deleteMessage(_x85, _x86) {
14562
14666
  return _deleteMessage.apply(this, arguments);
14563
14667
  }
14564
14668
 
@@ -14580,28 +14684,28 @@ var StreamChat = /*#__PURE__*/function () {
14580
14684
  }, {
14581
14685
  key: "undeleteMessage",
14582
14686
  value: function () {
14583
- var _undeleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(messageID, userID) {
14584
- return _regeneratorRuntime.wrap(function _callee62$(_context62) {
14687
+ var _undeleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(messageID, userID) {
14688
+ return _regeneratorRuntime.wrap(function _callee63$(_context63) {
14585
14689
  while (1) {
14586
- switch (_context62.prev = _context62.next) {
14690
+ switch (_context63.prev = _context63.next) {
14587
14691
  case 0:
14588
- _context62.next = 2;
14692
+ _context63.next = 2;
14589
14693
  return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageID), "/undelete"), {
14590
14694
  undeleted_by: userID
14591
14695
  });
14592
14696
 
14593
14697
  case 2:
14594
- return _context62.abrupt("return", _context62.sent);
14698
+ return _context63.abrupt("return", _context63.sent);
14595
14699
 
14596
14700
  case 3:
14597
14701
  case "end":
14598
- return _context62.stop();
14702
+ return _context63.stop();
14599
14703
  }
14600
14704
  }
14601
- }, _callee62, this);
14705
+ }, _callee63, this);
14602
14706
  }));
14603
14707
 
14604
- function undeleteMessage(_x84, _x85) {
14708
+ function undeleteMessage(_x87, _x88) {
14605
14709
  return _undeleteMessage.apply(this, arguments);
14606
14710
  }
14607
14711
 
@@ -14610,26 +14714,26 @@ var StreamChat = /*#__PURE__*/function () {
14610
14714
  }, {
14611
14715
  key: "getMessage",
14612
14716
  value: function () {
14613
- var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(messageID, options) {
14614
- return _regeneratorRuntime.wrap(function _callee63$(_context63) {
14717
+ var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(messageID, options) {
14718
+ return _regeneratorRuntime.wrap(function _callee64$(_context64) {
14615
14719
  while (1) {
14616
- switch (_context63.prev = _context63.next) {
14720
+ switch (_context64.prev = _context64.next) {
14617
14721
  case 0:
14618
- _context63.next = 2;
14722
+ _context64.next = 2;
14619
14723
  return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), _objectSpread({}, options));
14620
14724
 
14621
14725
  case 2:
14622
- return _context63.abrupt("return", _context63.sent);
14726
+ return _context64.abrupt("return", _context64.sent);
14623
14727
 
14624
14728
  case 3:
14625
14729
  case "end":
14626
- return _context63.stop();
14730
+ return _context64.stop();
14627
14731
  }
14628
14732
  }
14629
- }, _callee63, this);
14733
+ }, _callee64, this);
14630
14734
  }));
14631
14735
 
14632
- function getMessage(_x86, _x87) {
14736
+ function getMessage(_x89, _x90) {
14633
14737
  return _getMessage.apply(this, arguments);
14634
14738
  }
14635
14739
 
@@ -14650,44 +14754,48 @@ var StreamChat = /*#__PURE__*/function () {
14650
14754
  }, {
14651
14755
  key: "queryThreads",
14652
14756
  value: function () {
14653
- var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(options) {
14757
+ var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65() {
14654
14758
  var _this5 = this;
14655
14759
 
14656
- var opts, res;
14657
- return _regeneratorRuntime.wrap(function _callee64$(_context64) {
14760
+ var options,
14761
+ optionsWithDefaults,
14762
+ response,
14763
+ _args65 = arguments;
14764
+ return _regeneratorRuntime.wrap(function _callee65$(_context65) {
14658
14765
  while (1) {
14659
- switch (_context64.prev = _context64.next) {
14766
+ switch (_context65.prev = _context65.next) {
14660
14767
  case 0:
14661
- opts = _objectSpread({
14768
+ options = _args65.length > 0 && _args65[0] !== undefined ? _args65[0] : {};
14769
+ optionsWithDefaults = _objectSpread({
14662
14770
  limit: 10,
14663
14771
  participant_limit: 10,
14664
14772
  reply_limit: 3,
14665
14773
  watch: true
14666
14774
  }, options);
14667
- _context64.next = 3;
14668
- return this.post(this.baseURL + "/threads", opts);
14775
+ _context65.next = 4;
14776
+ return this.post("".concat(this.baseURL, "/threads"), optionsWithDefaults);
14669
14777
 
14670
- case 3:
14671
- res = _context64.sent;
14672
- return _context64.abrupt("return", {
14673
- threads: res.threads.map(function (thread) {
14778
+ case 4:
14779
+ response = _context65.sent;
14780
+ return _context65.abrupt("return", {
14781
+ threads: response.threads.map(function (thread) {
14674
14782
  return new Thread({
14675
14783
  client: _this5,
14676
14784
  threadData: thread
14677
14785
  });
14678
14786
  }),
14679
- next: res.next
14787
+ next: response.next
14680
14788
  });
14681
14789
 
14682
- case 5:
14790
+ case 6:
14683
14791
  case "end":
14684
- return _context64.stop();
14792
+ return _context65.stop();
14685
14793
  }
14686
14794
  }
14687
- }, _callee64, this);
14795
+ }, _callee65, this);
14688
14796
  }));
14689
14797
 
14690
- function queryThreads(_x88) {
14798
+ function queryThreads() {
14691
14799
  return _queryThreads.apply(this, arguments);
14692
14800
  }
14693
14801
 
@@ -14708,49 +14816,49 @@ var StreamChat = /*#__PURE__*/function () {
14708
14816
  }, {
14709
14817
  key: "getThread",
14710
14818
  value: function () {
14711
- var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(messageId) {
14819
+ var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(messageId) {
14712
14820
  var options,
14713
- opts,
14714
- res,
14715
- _args65 = arguments;
14716
- return _regeneratorRuntime.wrap(function _callee65$(_context65) {
14821
+ optionsWithDefaults,
14822
+ response,
14823
+ _args66 = arguments;
14824
+ return _regeneratorRuntime.wrap(function _callee66$(_context66) {
14717
14825
  while (1) {
14718
- switch (_context65.prev = _context65.next) {
14826
+ switch (_context66.prev = _context66.next) {
14719
14827
  case 0:
14720
- options = _args65.length > 1 && _args65[1] !== undefined ? _args65[1] : {};
14828
+ options = _args66.length > 1 && _args66[1] !== undefined ? _args66[1] : {};
14721
14829
 
14722
14830
  if (messageId) {
14723
- _context65.next = 3;
14831
+ _context66.next = 3;
14724
14832
  break;
14725
14833
  }
14726
14834
 
14727
- throw Error('Please specify the message id when calling partialUpdateThread');
14835
+ throw Error('Please specify the messageId when calling getThread');
14728
14836
 
14729
14837
  case 3:
14730
- opts = _objectSpread({
14838
+ optionsWithDefaults = _objectSpread({
14731
14839
  participant_limit: 100,
14732
14840
  reply_limit: 3,
14733
14841
  watch: true
14734
14842
  }, options);
14735
- _context65.next = 6;
14736
- return this.get(this.baseURL + "/threads/".concat(encodeURIComponent(messageId)), opts);
14843
+ _context66.next = 6;
14844
+ return this.get("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), optionsWithDefaults);
14737
14845
 
14738
14846
  case 6:
14739
- res = _context65.sent;
14740
- return _context65.abrupt("return", new Thread({
14847
+ response = _context66.sent;
14848
+ return _context66.abrupt("return", new Thread({
14741
14849
  client: this,
14742
- threadData: res.thread
14850
+ threadData: response.thread
14743
14851
  }));
14744
14852
 
14745
14853
  case 8:
14746
14854
  case "end":
14747
- return _context65.stop();
14855
+ return _context66.stop();
14748
14856
  }
14749
14857
  }
14750
- }, _callee65, this);
14858
+ }, _callee66, this);
14751
14859
  }));
14752
14860
 
14753
- function getThread(_x89) {
14861
+ function getThread(_x91) {
14754
14862
  return _getThread.apply(this, arguments);
14755
14863
  }
14756
14864
 
@@ -14768,15 +14876,15 @@ var StreamChat = /*#__PURE__*/function () {
14768
14876
  }, {
14769
14877
  key: "partialUpdateThread",
14770
14878
  value: function () {
14771
- var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(messageId, partialThreadObject) {
14879
+ var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(messageId, partialThreadObject) {
14772
14880
  var reservedThreadFields, _key5;
14773
14881
 
14774
- return _regeneratorRuntime.wrap(function _callee66$(_context66) {
14882
+ return _regeneratorRuntime.wrap(function _callee67$(_context67) {
14775
14883
  while (1) {
14776
- switch (_context66.prev = _context66.next) {
14884
+ switch (_context67.prev = _context67.next) {
14777
14885
  case 0:
14778
14886
  if (messageId) {
14779
- _context66.next = 2;
14887
+ _context67.next = 2;
14780
14888
  break;
14781
14889
  }
14782
14890
 
@@ -14785,44 +14893,44 @@ var StreamChat = /*#__PURE__*/function () {
14785
14893
  case 2:
14786
14894
  // check for reserved fields from ThreadResponse type within partialThreadObject's set and unset.
14787
14895
  // Throw error if any of the reserved field is found.
14788
- reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel'];
14789
- _context66.t0 = _regeneratorRuntime.keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
14896
+ reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel', 'custom'];
14897
+ _context67.t0 = _regeneratorRuntime.keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
14790
14898
 
14791
14899
  case 4:
14792
- if ((_context66.t1 = _context66.t0()).done) {
14793
- _context66.next = 10;
14900
+ if ((_context67.t1 = _context67.t0()).done) {
14901
+ _context67.next = 10;
14794
14902
  break;
14795
14903
  }
14796
14904
 
14797
- _key5 = _context66.t1.value;
14905
+ _key5 = _context67.t1.value;
14798
14906
 
14799
14907
  if (!reservedThreadFields.includes(_key5)) {
14800
- _context66.next = 8;
14908
+ _context67.next = 8;
14801
14909
  break;
14802
14910
  }
14803
14911
 
14804
14912
  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."));
14805
14913
 
14806
14914
  case 8:
14807
- _context66.next = 4;
14915
+ _context67.next = 4;
14808
14916
  break;
14809
14917
 
14810
14918
  case 10:
14811
- _context66.next = 12;
14812
- return this.patch(this.baseURL + "/threads/".concat(encodeURIComponent(messageId)), partialThreadObject);
14919
+ _context67.next = 12;
14920
+ return this.patch("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), partialThreadObject);
14813
14921
 
14814
14922
  case 12:
14815
- return _context66.abrupt("return", _context66.sent);
14923
+ return _context67.abrupt("return", _context67.sent);
14816
14924
 
14817
14925
  case 13:
14818
14926
  case "end":
14819
- return _context66.stop();
14927
+ return _context67.stop();
14820
14928
  }
14821
14929
  }
14822
- }, _callee66, this);
14930
+ }, _callee67, this);
14823
14931
  }));
14824
14932
 
14825
- function partialUpdateThread(_x90, _x91) {
14933
+ function partialUpdateThread(_x92, _x93) {
14826
14934
  return _partialUpdateThread.apply(this, arguments);
14827
14935
  }
14828
14936
 
@@ -14831,7 +14939,7 @@ var StreamChat = /*#__PURE__*/function () {
14831
14939
  }, {
14832
14940
  key: "getUserAgent",
14833
14941
  value: function getUserAgent() {
14834
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.50.0");
14942
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.52.0");
14835
14943
  }
14836
14944
  }, {
14837
14945
  key: "setUserAgent",
@@ -15050,28 +15158,28 @@ var StreamChat = /*#__PURE__*/function () {
15050
15158
  }, {
15051
15159
  key: "sendUserCustomEvent",
15052
15160
  value: function () {
15053
- var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(targetUserID, event) {
15054
- return _regeneratorRuntime.wrap(function _callee67$(_context67) {
15161
+ var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(targetUserID, event) {
15162
+ return _regeneratorRuntime.wrap(function _callee68$(_context68) {
15055
15163
  while (1) {
15056
- switch (_context67.prev = _context67.next) {
15164
+ switch (_context68.prev = _context68.next) {
15057
15165
  case 0:
15058
- _context67.next = 2;
15166
+ _context68.next = 2;
15059
15167
  return this.post("".concat(this.baseURL, "/users/").concat(encodeURIComponent(targetUserID), "/event"), {
15060
15168
  event: event
15061
15169
  });
15062
15170
 
15063
15171
  case 2:
15064
- return _context67.abrupt("return", _context67.sent);
15172
+ return _context68.abrupt("return", _context68.sent);
15065
15173
 
15066
15174
  case 3:
15067
15175
  case "end":
15068
- return _context67.stop();
15176
+ return _context68.stop();
15069
15177
  }
15070
15178
  }
15071
- }, _callee67, this);
15179
+ }, _callee68, this);
15072
15180
  }));
15073
15181
 
15074
- function sendUserCustomEvent(_x92, _x93) {
15182
+ function sendUserCustomEvent(_x94, _x95) {
15075
15183
  return _sendUserCustomEvent.apply(this, arguments);
15076
15184
  }
15077
15185
 
@@ -15168,28 +15276,28 @@ var StreamChat = /*#__PURE__*/function () {
15168
15276
  }, {
15169
15277
  key: "createSegment",
15170
15278
  value: function () {
15171
- var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(type, id, data) {
15279
+ var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(type, id, data) {
15172
15280
  var body;
15173
- return _regeneratorRuntime.wrap(function _callee68$(_context68) {
15281
+ return _regeneratorRuntime.wrap(function _callee69$(_context69) {
15174
15282
  while (1) {
15175
- switch (_context68.prev = _context68.next) {
15283
+ switch (_context69.prev = _context69.next) {
15176
15284
  case 0:
15177
15285
  this.validateServerSideAuth();
15178
15286
  body = _objectSpread({
15179
15287
  id: id,
15180
15288
  type: type
15181
15289
  }, data);
15182
- return _context68.abrupt("return", this.post(this.baseURL + "/segments", body));
15290
+ return _context69.abrupt("return", this.post(this.baseURL + "/segments", body));
15183
15291
 
15184
15292
  case 3:
15185
15293
  case "end":
15186
- return _context68.stop();
15294
+ return _context69.stop();
15187
15295
  }
15188
15296
  }
15189
- }, _callee68, this);
15297
+ }, _callee69, this);
15190
15298
  }));
15191
15299
 
15192
- function createSegment(_x94, _x95, _x96) {
15300
+ function createSegment(_x96, _x97, _x98) {
15193
15301
  return _createSegment.apply(this, arguments);
15194
15302
  }
15195
15303
 
@@ -15208,23 +15316,23 @@ var StreamChat = /*#__PURE__*/function () {
15208
15316
  }, {
15209
15317
  key: "createUserSegment",
15210
15318
  value: function () {
15211
- var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id, data) {
15212
- return _regeneratorRuntime.wrap(function _callee69$(_context69) {
15319
+ var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(id, data) {
15320
+ return _regeneratorRuntime.wrap(function _callee70$(_context70) {
15213
15321
  while (1) {
15214
- switch (_context69.prev = _context69.next) {
15322
+ switch (_context70.prev = _context70.next) {
15215
15323
  case 0:
15216
15324
  this.validateServerSideAuth();
15217
- return _context69.abrupt("return", this.createSegment('user', id, data));
15325
+ return _context70.abrupt("return", this.createSegment('user', id, data));
15218
15326
 
15219
15327
  case 2:
15220
15328
  case "end":
15221
- return _context69.stop();
15329
+ return _context70.stop();
15222
15330
  }
15223
15331
  }
15224
- }, _callee69, this);
15332
+ }, _callee70, this);
15225
15333
  }));
15226
15334
 
15227
- function createUserSegment(_x97, _x98) {
15335
+ function createUserSegment(_x99, _x100) {
15228
15336
  return _createUserSegment.apply(this, arguments);
15229
15337
  }
15230
15338
 
@@ -15243,23 +15351,23 @@ var StreamChat = /*#__PURE__*/function () {
15243
15351
  }, {
15244
15352
  key: "createChannelSegment",
15245
15353
  value: function () {
15246
- var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(id, data) {
15247
- return _regeneratorRuntime.wrap(function _callee70$(_context70) {
15354
+ var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id, data) {
15355
+ return _regeneratorRuntime.wrap(function _callee71$(_context71) {
15248
15356
  while (1) {
15249
- switch (_context70.prev = _context70.next) {
15357
+ switch (_context71.prev = _context71.next) {
15250
15358
  case 0:
15251
15359
  this.validateServerSideAuth();
15252
- return _context70.abrupt("return", this.createSegment('channel', id, data));
15360
+ return _context71.abrupt("return", this.createSegment('channel', id, data));
15253
15361
 
15254
15362
  case 2:
15255
15363
  case "end":
15256
- return _context70.stop();
15364
+ return _context71.stop();
15257
15365
  }
15258
15366
  }
15259
- }, _callee70, this);
15367
+ }, _callee71, this);
15260
15368
  }));
15261
15369
 
15262
- function createChannelSegment(_x99, _x100) {
15370
+ function createChannelSegment(_x101, _x102) {
15263
15371
  return _createChannelSegment.apply(this, arguments);
15264
15372
  }
15265
15373
 
@@ -15268,23 +15376,23 @@ var StreamChat = /*#__PURE__*/function () {
15268
15376
  }, {
15269
15377
  key: "getSegment",
15270
15378
  value: function () {
15271
- var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id) {
15272
- return _regeneratorRuntime.wrap(function _callee71$(_context71) {
15379
+ var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id) {
15380
+ return _regeneratorRuntime.wrap(function _callee72$(_context72) {
15273
15381
  while (1) {
15274
- switch (_context71.prev = _context71.next) {
15382
+ switch (_context72.prev = _context72.next) {
15275
15383
  case 0:
15276
15384
  this.validateServerSideAuth();
15277
- return _context71.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
15385
+ return _context72.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
15278
15386
 
15279
15387
  case 2:
15280
15388
  case "end":
15281
- return _context71.stop();
15389
+ return _context72.stop();
15282
15390
  }
15283
15391
  }
15284
- }, _callee71, this);
15392
+ }, _callee72, this);
15285
15393
  }));
15286
15394
 
15287
- function getSegment(_x101) {
15395
+ function getSegment(_x103) {
15288
15396
  return _getSegment.apply(this, arguments);
15289
15397
  }
15290
15398
 
@@ -15302,23 +15410,23 @@ var StreamChat = /*#__PURE__*/function () {
15302
15410
  }, {
15303
15411
  key: "updateSegment",
15304
15412
  value: function () {
15305
- var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id, data) {
15306
- return _regeneratorRuntime.wrap(function _callee72$(_context72) {
15413
+ var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id, data) {
15414
+ return _regeneratorRuntime.wrap(function _callee73$(_context73) {
15307
15415
  while (1) {
15308
- switch (_context72.prev = _context72.next) {
15416
+ switch (_context73.prev = _context73.next) {
15309
15417
  case 0:
15310
15418
  this.validateServerSideAuth();
15311
- return _context72.abrupt("return", this.put(this.baseURL + "/segments/".concat(encodeURIComponent(id)), data));
15419
+ return _context73.abrupt("return", this.put(this.baseURL + "/segments/".concat(encodeURIComponent(id)), data));
15312
15420
 
15313
15421
  case 2:
15314
15422
  case "end":
15315
- return _context72.stop();
15423
+ return _context73.stop();
15316
15424
  }
15317
15425
  }
15318
- }, _callee72, this);
15426
+ }, _callee73, this);
15319
15427
  }));
15320
15428
 
15321
- function updateSegment(_x102, _x103) {
15429
+ function updateSegment(_x104, _x105) {
15322
15430
  return _updateSegment.apply(this, arguments);
15323
15431
  }
15324
15432
 
@@ -15336,27 +15444,27 @@ var StreamChat = /*#__PURE__*/function () {
15336
15444
  }, {
15337
15445
  key: "addSegmentTargets",
15338
15446
  value: function () {
15339
- var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id, targets) {
15447
+ var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(id, targets) {
15340
15448
  var body;
15341
- return _regeneratorRuntime.wrap(function _callee73$(_context73) {
15449
+ return _regeneratorRuntime.wrap(function _callee74$(_context74) {
15342
15450
  while (1) {
15343
- switch (_context73.prev = _context73.next) {
15451
+ switch (_context74.prev = _context74.next) {
15344
15452
  case 0:
15345
15453
  this.validateServerSideAuth();
15346
15454
  body = {
15347
15455
  target_ids: targets
15348
15456
  };
15349
- return _context73.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/addtargets"), body));
15457
+ return _context74.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/addtargets"), body));
15350
15458
 
15351
15459
  case 3:
15352
15460
  case "end":
15353
- return _context73.stop();
15461
+ return _context74.stop();
15354
15462
  }
15355
15463
  }
15356
- }, _callee73, this);
15464
+ }, _callee74, this);
15357
15465
  }));
15358
15466
 
15359
- function addSegmentTargets(_x104, _x105) {
15467
+ function addSegmentTargets(_x106, _x107) {
15360
15468
  return _addSegmentTargets.apply(this, arguments);
15361
15469
  }
15362
15470
 
@@ -15365,33 +15473,33 @@ var StreamChat = /*#__PURE__*/function () {
15365
15473
  }, {
15366
15474
  key: "querySegmentTargets",
15367
15475
  value: function () {
15368
- var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(id) {
15476
+ var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(id) {
15369
15477
  var filter,
15370
15478
  sort,
15371
15479
  options,
15372
- _args74 = arguments;
15373
- return _regeneratorRuntime.wrap(function _callee74$(_context74) {
15480
+ _args75 = arguments;
15481
+ return _regeneratorRuntime.wrap(function _callee75$(_context75) {
15374
15482
  while (1) {
15375
- switch (_context74.prev = _context74.next) {
15483
+ switch (_context75.prev = _context75.next) {
15376
15484
  case 0:
15377
- filter = _args74.length > 1 && _args74[1] !== undefined ? _args74[1] : {};
15378
- sort = _args74.length > 2 && _args74[2] !== undefined ? _args74[2] : [];
15379
- options = _args74.length > 3 && _args74[3] !== undefined ? _args74[3] : {};
15485
+ filter = _args75.length > 1 && _args75[1] !== undefined ? _args75[1] : {};
15486
+ sort = _args75.length > 2 && _args75[2] !== undefined ? _args75[2] : [];
15487
+ options = _args75.length > 3 && _args75[3] !== undefined ? _args75[3] : {};
15380
15488
  this.validateServerSideAuth();
15381
- return _context74.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/targets/query"), _objectSpread({
15489
+ return _context75.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/targets/query"), _objectSpread({
15382
15490
  filter: filter || {},
15383
15491
  sort: sort || []
15384
15492
  }, options)));
15385
15493
 
15386
15494
  case 5:
15387
15495
  case "end":
15388
- return _context74.stop();
15496
+ return _context75.stop();
15389
15497
  }
15390
15498
  }
15391
- }, _callee74, this);
15499
+ }, _callee75, this);
15392
15500
  }));
15393
15501
 
15394
- function querySegmentTargets(_x106) {
15502
+ function querySegmentTargets(_x108) {
15395
15503
  return _querySegmentTargets.apply(this, arguments);
15396
15504
  }
15397
15505
 
@@ -15409,27 +15517,27 @@ var StreamChat = /*#__PURE__*/function () {
15409
15517
  }, {
15410
15518
  key: "removeSegmentTargets",
15411
15519
  value: function () {
15412
- var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(id, targets) {
15520
+ var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(id, targets) {
15413
15521
  var body;
15414
- return _regeneratorRuntime.wrap(function _callee75$(_context75) {
15522
+ return _regeneratorRuntime.wrap(function _callee76$(_context76) {
15415
15523
  while (1) {
15416
- switch (_context75.prev = _context75.next) {
15524
+ switch (_context76.prev = _context76.next) {
15417
15525
  case 0:
15418
15526
  this.validateServerSideAuth();
15419
15527
  body = {
15420
15528
  target_ids: targets
15421
15529
  };
15422
- return _context75.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/deletetargets"), body));
15530
+ return _context76.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/deletetargets"), body));
15423
15531
 
15424
15532
  case 3:
15425
15533
  case "end":
15426
- return _context75.stop();
15534
+ return _context76.stop();
15427
15535
  }
15428
15536
  }
15429
- }, _callee75, this);
15537
+ }, _callee76, this);
15430
15538
  }));
15431
15539
 
15432
- function removeSegmentTargets(_x107, _x108) {
15540
+ function removeSegmentTargets(_x109, _x110) {
15433
15541
  return _removeSegmentTargets.apply(this, arguments);
15434
15542
  }
15435
15543
 
@@ -15447,29 +15555,29 @@ var StreamChat = /*#__PURE__*/function () {
15447
15555
  }, {
15448
15556
  key: "querySegments",
15449
15557
  value: function () {
15450
- var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(filter, sort) {
15558
+ var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(filter, sort) {
15451
15559
  var options,
15452
- _args76 = arguments;
15453
- return _regeneratorRuntime.wrap(function _callee76$(_context76) {
15560
+ _args77 = arguments;
15561
+ return _regeneratorRuntime.wrap(function _callee77$(_context77) {
15454
15562
  while (1) {
15455
- switch (_context76.prev = _context76.next) {
15563
+ switch (_context77.prev = _context77.next) {
15456
15564
  case 0:
15457
- options = _args76.length > 2 && _args76[2] !== undefined ? _args76[2] : {};
15565
+ options = _args77.length > 2 && _args77[2] !== undefined ? _args77[2] : {};
15458
15566
  this.validateServerSideAuth();
15459
- return _context76.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
15567
+ return _context77.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
15460
15568
  filter: filter,
15461
15569
  sort: sort
15462
15570
  }, options)));
15463
15571
 
15464
15572
  case 3:
15465
15573
  case "end":
15466
- return _context76.stop();
15574
+ return _context77.stop();
15467
15575
  }
15468
15576
  }
15469
- }, _callee76, this);
15577
+ }, _callee77, this);
15470
15578
  }));
15471
15579
 
15472
- function querySegments(_x109, _x110) {
15580
+ function querySegments(_x111, _x112) {
15473
15581
  return _querySegments.apply(this, arguments);
15474
15582
  }
15475
15583
 
@@ -15486,23 +15594,23 @@ var StreamChat = /*#__PURE__*/function () {
15486
15594
  }, {
15487
15595
  key: "deleteSegment",
15488
15596
  value: function () {
15489
- var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(id) {
15490
- return _regeneratorRuntime.wrap(function _callee77$(_context77) {
15597
+ var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(id) {
15598
+ return _regeneratorRuntime.wrap(function _callee78$(_context78) {
15491
15599
  while (1) {
15492
- switch (_context77.prev = _context77.next) {
15600
+ switch (_context78.prev = _context78.next) {
15493
15601
  case 0:
15494
15602
  this.validateServerSideAuth();
15495
- return _context77.abrupt("return", this.delete(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
15603
+ return _context78.abrupt("return", this.delete(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
15496
15604
 
15497
15605
  case 2:
15498
15606
  case "end":
15499
- return _context77.stop();
15607
+ return _context78.stop();
15500
15608
  }
15501
15609
  }
15502
- }, _callee77, this);
15610
+ }, _callee78, this);
15503
15611
  }));
15504
15612
 
15505
- function deleteSegment(_x111) {
15613
+ function deleteSegment(_x113) {
15506
15614
  return _deleteSegment.apply(this, arguments);
15507
15615
  }
15508
15616
 
@@ -15520,23 +15628,23 @@ var StreamChat = /*#__PURE__*/function () {
15520
15628
  }, {
15521
15629
  key: "segmentTargetExists",
15522
15630
  value: function () {
15523
- var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(segmentId, targetId) {
15524
- return _regeneratorRuntime.wrap(function _callee78$(_context78) {
15631
+ var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(segmentId, targetId) {
15632
+ return _regeneratorRuntime.wrap(function _callee79$(_context79) {
15525
15633
  while (1) {
15526
- switch (_context78.prev = _context78.next) {
15634
+ switch (_context79.prev = _context79.next) {
15527
15635
  case 0:
15528
15636
  this.validateServerSideAuth();
15529
- return _context78.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(segmentId), "/target/").concat(encodeURIComponent(targetId))));
15637
+ return _context79.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(segmentId), "/target/").concat(encodeURIComponent(targetId))));
15530
15638
 
15531
15639
  case 2:
15532
15640
  case "end":
15533
- return _context78.stop();
15641
+ return _context79.stop();
15534
15642
  }
15535
15643
  }
15536
- }, _callee78, this);
15644
+ }, _callee79, this);
15537
15645
  }));
15538
15646
 
15539
- function segmentTargetExists(_x112, _x113) {
15647
+ function segmentTargetExists(_x114, _x115) {
15540
15648
  return _segmentTargetExists.apply(this, arguments);
15541
15649
  }
15542
15650
 
@@ -15553,23 +15661,23 @@ var StreamChat = /*#__PURE__*/function () {
15553
15661
  }, {
15554
15662
  key: "createCampaign",
15555
15663
  value: function () {
15556
- var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(params) {
15557
- return _regeneratorRuntime.wrap(function _callee79$(_context79) {
15664
+ var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(params) {
15665
+ return _regeneratorRuntime.wrap(function _callee80$(_context80) {
15558
15666
  while (1) {
15559
- switch (_context79.prev = _context79.next) {
15667
+ switch (_context80.prev = _context80.next) {
15560
15668
  case 0:
15561
15669
  this.validateServerSideAuth();
15562
- return _context79.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
15670
+ return _context80.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
15563
15671
 
15564
15672
  case 2:
15565
15673
  case "end":
15566
- return _context79.stop();
15674
+ return _context80.stop();
15567
15675
  }
15568
15676
  }
15569
- }, _callee79, this);
15677
+ }, _callee80, this);
15570
15678
  }));
15571
15679
 
15572
- function createCampaign(_x114) {
15680
+ function createCampaign(_x116) {
15573
15681
  return _createCampaign.apply(this, arguments);
15574
15682
  }
15575
15683
 
@@ -15578,23 +15686,23 @@ var StreamChat = /*#__PURE__*/function () {
15578
15686
  }, {
15579
15687
  key: "getCampaign",
15580
15688
  value: function () {
15581
- var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(id) {
15582
- return _regeneratorRuntime.wrap(function _callee80$(_context80) {
15689
+ var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(id) {
15690
+ return _regeneratorRuntime.wrap(function _callee81$(_context81) {
15583
15691
  while (1) {
15584
- switch (_context80.prev = _context80.next) {
15692
+ switch (_context81.prev = _context81.next) {
15585
15693
  case 0:
15586
15694
  this.validateServerSideAuth();
15587
- return _context80.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
15695
+ return _context81.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
15588
15696
 
15589
15697
  case 2:
15590
15698
  case "end":
15591
- return _context80.stop();
15699
+ return _context81.stop();
15592
15700
  }
15593
15701
  }
15594
- }, _callee80, this);
15702
+ }, _callee81, this);
15595
15703
  }));
15596
15704
 
15597
- function getCampaign(_x115) {
15705
+ function getCampaign(_x117) {
15598
15706
  return _getCampaign.apply(this, arguments);
15599
15707
  }
15600
15708
 
@@ -15603,26 +15711,26 @@ var StreamChat = /*#__PURE__*/function () {
15603
15711
  }, {
15604
15712
  key: "startCampaign",
15605
15713
  value: function () {
15606
- var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(id, options) {
15607
- return _regeneratorRuntime.wrap(function _callee81$(_context81) {
15714
+ var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(id, options) {
15715
+ return _regeneratorRuntime.wrap(function _callee82$(_context82) {
15608
15716
  while (1) {
15609
- switch (_context81.prev = _context81.next) {
15717
+ switch (_context82.prev = _context82.next) {
15610
15718
  case 0:
15611
15719
  this.validateServerSideAuth();
15612
- return _context81.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/start"), {
15720
+ return _context82.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/start"), {
15613
15721
  scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
15614
15722
  stop_at: options === null || options === void 0 ? void 0 : options.stopAt
15615
15723
  }));
15616
15724
 
15617
15725
  case 2:
15618
15726
  case "end":
15619
- return _context81.stop();
15727
+ return _context82.stop();
15620
15728
  }
15621
15729
  }
15622
- }, _callee81, this);
15730
+ }, _callee82, this);
15623
15731
  }));
15624
15732
 
15625
- function startCampaign(_x116, _x117) {
15733
+ function startCampaign(_x118, _x119) {
15626
15734
  return _startCampaign.apply(this, arguments);
15627
15735
  }
15628
15736
 
@@ -15638,30 +15746,30 @@ var StreamChat = /*#__PURE__*/function () {
15638
15746
  }, {
15639
15747
  key: "queryCampaigns",
15640
15748
  value: function () {
15641
- var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(filter, sort, options) {
15642
- return _regeneratorRuntime.wrap(function _callee82$(_context82) {
15749
+ var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(filter, sort, options) {
15750
+ return _regeneratorRuntime.wrap(function _callee83$(_context83) {
15643
15751
  while (1) {
15644
- switch (_context82.prev = _context82.next) {
15752
+ switch (_context83.prev = _context83.next) {
15645
15753
  case 0:
15646
15754
  this.validateServerSideAuth();
15647
- _context82.next = 3;
15755
+ _context83.next = 3;
15648
15756
  return this.post(this.baseURL + "/campaigns/query", _objectSpread({
15649
15757
  filter: filter,
15650
15758
  sort: sort
15651
15759
  }, options || {}));
15652
15760
 
15653
15761
  case 3:
15654
- return _context82.abrupt("return", _context82.sent);
15762
+ return _context83.abrupt("return", _context83.sent);
15655
15763
 
15656
15764
  case 4:
15657
15765
  case "end":
15658
- return _context82.stop();
15766
+ return _context83.stop();
15659
15767
  }
15660
15768
  }
15661
- }, _callee82, this);
15769
+ }, _callee83, this);
15662
15770
  }));
15663
15771
 
15664
- function queryCampaigns(_x118, _x119, _x120) {
15772
+ function queryCampaigns(_x120, _x121, _x122) {
15665
15773
  return _queryCampaigns.apply(this, arguments);
15666
15774
  }
15667
15775
 
@@ -15679,23 +15787,23 @@ var StreamChat = /*#__PURE__*/function () {
15679
15787
  }, {
15680
15788
  key: "updateCampaign",
15681
15789
  value: function () {
15682
- var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(id, params) {
15683
- return _regeneratorRuntime.wrap(function _callee83$(_context83) {
15790
+ var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(id, params) {
15791
+ return _regeneratorRuntime.wrap(function _callee84$(_context84) {
15684
15792
  while (1) {
15685
- switch (_context83.prev = _context83.next) {
15793
+ switch (_context84.prev = _context84.next) {
15686
15794
  case 0:
15687
15795
  this.validateServerSideAuth();
15688
- return _context83.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(encodeURIComponent(id)), params));
15796
+ return _context84.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(encodeURIComponent(id)), params));
15689
15797
 
15690
15798
  case 2:
15691
15799
  case "end":
15692
- return _context83.stop();
15800
+ return _context84.stop();
15693
15801
  }
15694
15802
  }
15695
- }, _callee83, this);
15803
+ }, _callee84, this);
15696
15804
  }));
15697
15805
 
15698
- function updateCampaign(_x121, _x122) {
15806
+ function updateCampaign(_x123, _x124) {
15699
15807
  return _updateCampaign.apply(this, arguments);
15700
15808
  }
15701
15809
 
@@ -15712,23 +15820,23 @@ var StreamChat = /*#__PURE__*/function () {
15712
15820
  }, {
15713
15821
  key: "deleteCampaign",
15714
15822
  value: function () {
15715
- var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(id) {
15716
- return _regeneratorRuntime.wrap(function _callee84$(_context84) {
15823
+ var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(id) {
15824
+ return _regeneratorRuntime.wrap(function _callee85$(_context85) {
15717
15825
  while (1) {
15718
- switch (_context84.prev = _context84.next) {
15826
+ switch (_context85.prev = _context85.next) {
15719
15827
  case 0:
15720
15828
  this.validateServerSideAuth();
15721
- return _context84.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
15829
+ return _context85.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
15722
15830
 
15723
15831
  case 2:
15724
15832
  case "end":
15725
- return _context84.stop();
15833
+ return _context85.stop();
15726
15834
  }
15727
15835
  }
15728
- }, _callee84, this);
15836
+ }, _callee85, this);
15729
15837
  }));
15730
15838
 
15731
- function deleteCampaign(_x123) {
15839
+ function deleteCampaign(_x125) {
15732
15840
  return _deleteCampaign.apply(this, arguments);
15733
15841
  }
15734
15842
 
@@ -15745,23 +15853,23 @@ var StreamChat = /*#__PURE__*/function () {
15745
15853
  }, {
15746
15854
  key: "stopCampaign",
15747
15855
  value: function () {
15748
- var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(id) {
15749
- return _regeneratorRuntime.wrap(function _callee85$(_context85) {
15856
+ var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(id) {
15857
+ return _regeneratorRuntime.wrap(function _callee86$(_context86) {
15750
15858
  while (1) {
15751
- switch (_context85.prev = _context85.next) {
15859
+ switch (_context86.prev = _context86.next) {
15752
15860
  case 0:
15753
15861
  this.validateServerSideAuth();
15754
- return _context85.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/stop")));
15862
+ return _context86.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/stop")));
15755
15863
 
15756
15864
  case 2:
15757
15865
  case "end":
15758
- return _context85.stop();
15866
+ return _context86.stop();
15759
15867
  }
15760
15868
  }
15761
- }, _callee85, this);
15869
+ }, _callee86, this);
15762
15870
  }));
15763
15871
 
15764
- function stopCampaign(_x124) {
15872
+ function stopCampaign(_x126) {
15765
15873
  return _stopCampaign.apply(this, arguments);
15766
15874
  }
15767
15875
 
@@ -15777,24 +15885,24 @@ var StreamChat = /*#__PURE__*/function () {
15777
15885
  }, {
15778
15886
  key: "enrichURL",
15779
15887
  value: function () {
15780
- var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(url) {
15781
- return _regeneratorRuntime.wrap(function _callee86$(_context86) {
15888
+ var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87(url) {
15889
+ return _regeneratorRuntime.wrap(function _callee87$(_context87) {
15782
15890
  while (1) {
15783
- switch (_context86.prev = _context86.next) {
15891
+ switch (_context87.prev = _context87.next) {
15784
15892
  case 0:
15785
- return _context86.abrupt("return", this.get(this.baseURL + "/og", {
15893
+ return _context87.abrupt("return", this.get(this.baseURL + "/og", {
15786
15894
  url: url
15787
15895
  }));
15788
15896
 
15789
15897
  case 1:
15790
15898
  case "end":
15791
- return _context86.stop();
15899
+ return _context87.stop();
15792
15900
  }
15793
15901
  }
15794
- }, _callee86, this);
15902
+ }, _callee87, this);
15795
15903
  }));
15796
15904
 
15797
- function enrichURL(_x125) {
15905
+ function enrichURL(_x127) {
15798
15906
  return _enrichURL.apply(this, arguments);
15799
15907
  }
15800
15908
 
@@ -15811,22 +15919,22 @@ var StreamChat = /*#__PURE__*/function () {
15811
15919
  }, {
15812
15920
  key: "getTask",
15813
15921
  value: function () {
15814
- var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87(id) {
15815
- return _regeneratorRuntime.wrap(function _callee87$(_context87) {
15922
+ var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(id) {
15923
+ return _regeneratorRuntime.wrap(function _callee88$(_context88) {
15816
15924
  while (1) {
15817
- switch (_context87.prev = _context87.next) {
15925
+ switch (_context88.prev = _context88.next) {
15818
15926
  case 0:
15819
- return _context87.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(encodeURIComponent(id))));
15927
+ return _context88.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(encodeURIComponent(id))));
15820
15928
 
15821
15929
  case 1:
15822
15930
  case "end":
15823
- return _context87.stop();
15931
+ return _context88.stop();
15824
15932
  }
15825
15933
  }
15826
- }, _callee87, this);
15934
+ }, _callee88, this);
15827
15935
  }));
15828
15936
 
15829
- function getTask(_x126) {
15937
+ function getTask(_x128) {
15830
15938
  return _getTask.apply(this, arguments);
15831
15939
  }
15832
15940
 
@@ -15844,31 +15952,31 @@ var StreamChat = /*#__PURE__*/function () {
15844
15952
  }, {
15845
15953
  key: "deleteChannels",
15846
15954
  value: function () {
15847
- var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(cids) {
15955
+ var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee89(cids) {
15848
15956
  var options,
15849
- _args88 = arguments;
15850
- return _regeneratorRuntime.wrap(function _callee88$(_context88) {
15957
+ _args89 = arguments;
15958
+ return _regeneratorRuntime.wrap(function _callee89$(_context89) {
15851
15959
  while (1) {
15852
- switch (_context88.prev = _context88.next) {
15960
+ switch (_context89.prev = _context89.next) {
15853
15961
  case 0:
15854
- options = _args88.length > 1 && _args88[1] !== undefined ? _args88[1] : {};
15855
- _context88.next = 3;
15962
+ options = _args89.length > 1 && _args89[1] !== undefined ? _args89[1] : {};
15963
+ _context89.next = 3;
15856
15964
  return this.post(this.baseURL + "/channels/delete", _objectSpread({
15857
15965
  cids: cids
15858
15966
  }, options));
15859
15967
 
15860
15968
  case 3:
15861
- return _context88.abrupt("return", _context88.sent);
15969
+ return _context89.abrupt("return", _context89.sent);
15862
15970
 
15863
15971
  case 4:
15864
15972
  case "end":
15865
- return _context88.stop();
15973
+ return _context89.stop();
15866
15974
  }
15867
15975
  }
15868
- }, _callee88, this);
15976
+ }, _callee89, this);
15869
15977
  }));
15870
15978
 
15871
- function deleteChannels(_x127) {
15979
+ function deleteChannels(_x129) {
15872
15980
  return _deleteChannels.apply(this, arguments);
15873
15981
  }
15874
15982
 
@@ -15886,17 +15994,17 @@ var StreamChat = /*#__PURE__*/function () {
15886
15994
  }, {
15887
15995
  key: "deleteUsers",
15888
15996
  value: function () {
15889
- var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee89(user_ids) {
15997
+ var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee90(user_ids) {
15890
15998
  var options,
15891
- _args89 = arguments;
15892
- return _regeneratorRuntime.wrap(function _callee89$(_context89) {
15999
+ _args90 = arguments;
16000
+ return _regeneratorRuntime.wrap(function _callee90$(_context90) {
15893
16001
  while (1) {
15894
- switch (_context89.prev = _context89.next) {
16002
+ switch (_context90.prev = _context90.next) {
15895
16003
  case 0:
15896
- options = _args89.length > 1 && _args89[1] !== undefined ? _args89[1] : {};
16004
+ options = _args90.length > 1 && _args90[1] !== undefined ? _args90[1] : {};
15897
16005
 
15898
16006
  if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
15899
- _context89.next = 3;
16007
+ _context90.next = 3;
15900
16008
  break;
15901
16009
  }
15902
16010
 
@@ -15904,7 +16012,7 @@ var StreamChat = /*#__PURE__*/function () {
15904
16012
 
15905
16013
  case 3:
15906
16014
  if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
15907
- _context89.next = 5;
16015
+ _context90.next = 5;
15908
16016
  break;
15909
16017
  }
15910
16018
 
@@ -15912,30 +16020,30 @@ var StreamChat = /*#__PURE__*/function () {
15912
16020
 
15913
16021
  case 5:
15914
16022
  if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
15915
- _context89.next = 7;
16023
+ _context90.next = 7;
15916
16024
  break;
15917
16025
  }
15918
16026
 
15919
16027
  throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
15920
16028
 
15921
16029
  case 7:
15922
- _context89.next = 9;
16030
+ _context90.next = 9;
15923
16031
  return this.post(this.baseURL + "/users/delete", _objectSpread({
15924
16032
  user_ids: user_ids
15925
16033
  }, options));
15926
16034
 
15927
16035
  case 9:
15928
- return _context89.abrupt("return", _context89.sent);
16036
+ return _context90.abrupt("return", _context90.sent);
15929
16037
 
15930
16038
  case 10:
15931
16039
  case "end":
15932
- return _context89.stop();
16040
+ return _context90.stop();
15933
16041
  }
15934
16042
  }
15935
- }, _callee89, this);
16043
+ }, _callee90, this);
15936
16044
  }));
15937
16045
 
15938
- function deleteUsers(_x128) {
16046
+ function deleteUsers(_x130) {
15939
16047
  return _deleteUsers.apply(this, arguments);
15940
16048
  }
15941
16049
 
@@ -15956,28 +16064,28 @@ var StreamChat = /*#__PURE__*/function () {
15956
16064
  }, {
15957
16065
  key: "_createImportURL",
15958
16066
  value: function () {
15959
- var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee90(filename) {
15960
- return _regeneratorRuntime.wrap(function _callee90$(_context90) {
16067
+ var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee91(filename) {
16068
+ return _regeneratorRuntime.wrap(function _callee91$(_context91) {
15961
16069
  while (1) {
15962
- switch (_context90.prev = _context90.next) {
16070
+ switch (_context91.prev = _context91.next) {
15963
16071
  case 0:
15964
- _context90.next = 2;
16072
+ _context91.next = 2;
15965
16073
  return this.post(this.baseURL + "/import_urls", {
15966
16074
  filename: filename
15967
16075
  });
15968
16076
 
15969
16077
  case 2:
15970
- return _context90.abrupt("return", _context90.sent);
16078
+ return _context91.abrupt("return", _context91.sent);
15971
16079
 
15972
16080
  case 3:
15973
16081
  case "end":
15974
- return _context90.stop();
16082
+ return _context91.stop();
15975
16083
  }
15976
16084
  }
15977
- }, _callee90, this);
16085
+ }, _callee91, this);
15978
16086
  }));
15979
16087
 
15980
- function _createImportURL(_x129) {
16088
+ function _createImportURL(_x131) {
15981
16089
  return _createImportURL2.apply(this, arguments);
15982
16090
  }
15983
16091
 
@@ -15999,33 +16107,33 @@ var StreamChat = /*#__PURE__*/function () {
15999
16107
  }, {
16000
16108
  key: "_createImport",
16001
16109
  value: function () {
16002
- var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee91(path) {
16110
+ var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee92(path) {
16003
16111
  var options,
16004
- _args91 = arguments;
16005
- return _regeneratorRuntime.wrap(function _callee91$(_context91) {
16112
+ _args92 = arguments;
16113
+ return _regeneratorRuntime.wrap(function _callee92$(_context92) {
16006
16114
  while (1) {
16007
- switch (_context91.prev = _context91.next) {
16115
+ switch (_context92.prev = _context92.next) {
16008
16116
  case 0:
16009
- options = _args91.length > 1 && _args91[1] !== undefined ? _args91[1] : {
16117
+ options = _args92.length > 1 && _args92[1] !== undefined ? _args92[1] : {
16010
16118
  mode: 'upsert'
16011
16119
  };
16012
- _context91.next = 3;
16120
+ _context92.next = 3;
16013
16121
  return this.post(this.baseURL + "/imports", _objectSpread({
16014
16122
  path: path
16015
16123
  }, options));
16016
16124
 
16017
16125
  case 3:
16018
- return _context91.abrupt("return", _context91.sent);
16126
+ return _context92.abrupt("return", _context92.sent);
16019
16127
 
16020
16128
  case 4:
16021
16129
  case "end":
16022
- return _context91.stop();
16130
+ return _context92.stop();
16023
16131
  }
16024
16132
  }
16025
- }, _callee91, this);
16133
+ }, _callee92, this);
16026
16134
  }));
16027
16135
 
16028
- function _createImport(_x130) {
16136
+ function _createImport(_x132) {
16029
16137
  return _createImport2.apply(this, arguments);
16030
16138
  }
16031
16139
 
@@ -16047,26 +16155,26 @@ var StreamChat = /*#__PURE__*/function () {
16047
16155
  }, {
16048
16156
  key: "_getImport",
16049
16157
  value: function () {
16050
- var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee92(id) {
16051
- return _regeneratorRuntime.wrap(function _callee92$(_context92) {
16158
+ var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee93(id) {
16159
+ return _regeneratorRuntime.wrap(function _callee93$(_context93) {
16052
16160
  while (1) {
16053
- switch (_context92.prev = _context92.next) {
16161
+ switch (_context93.prev = _context93.next) {
16054
16162
  case 0:
16055
- _context92.next = 2;
16163
+ _context93.next = 2;
16056
16164
  return this.get(this.baseURL + "/imports/".concat(encodeURIComponent(id)));
16057
16165
 
16058
16166
  case 2:
16059
- return _context92.abrupt("return", _context92.sent);
16167
+ return _context93.abrupt("return", _context93.sent);
16060
16168
 
16061
16169
  case 3:
16062
16170
  case "end":
16063
- return _context92.stop();
16171
+ return _context93.stop();
16064
16172
  }
16065
16173
  }
16066
- }, _callee92, this);
16174
+ }, _callee93, this);
16067
16175
  }));
16068
16176
 
16069
- function _getImport(_x131) {
16177
+ function _getImport(_x133) {
16070
16178
  return _getImport2.apply(this, arguments);
16071
16179
  }
16072
16180
 
@@ -16088,26 +16196,26 @@ var StreamChat = /*#__PURE__*/function () {
16088
16196
  }, {
16089
16197
  key: "_listImports",
16090
16198
  value: function () {
16091
- var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee93(options) {
16092
- return _regeneratorRuntime.wrap(function _callee93$(_context93) {
16199
+ var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee94(options) {
16200
+ return _regeneratorRuntime.wrap(function _callee94$(_context94) {
16093
16201
  while (1) {
16094
- switch (_context93.prev = _context93.next) {
16202
+ switch (_context94.prev = _context94.next) {
16095
16203
  case 0:
16096
- _context93.next = 2;
16204
+ _context94.next = 2;
16097
16205
  return this.get(this.baseURL + "/imports", options);
16098
16206
 
16099
16207
  case 2:
16100
- return _context93.abrupt("return", _context93.sent);
16208
+ return _context94.abrupt("return", _context94.sent);
16101
16209
 
16102
16210
  case 3:
16103
16211
  case "end":
16104
- return _context93.stop();
16212
+ return _context94.stop();
16105
16213
  }
16106
16214
  }
16107
- }, _callee93, this);
16215
+ }, _callee94, this);
16108
16216
  }));
16109
16217
 
16110
- function _listImports(_x132) {
16218
+ function _listImports(_x134) {
16111
16219
  return _listImports2.apply(this, arguments);
16112
16220
  }
16113
16221
 
@@ -16126,28 +16234,28 @@ var StreamChat = /*#__PURE__*/function () {
16126
16234
  }, {
16127
16235
  key: "upsertPushProvider",
16128
16236
  value: function () {
16129
- var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee94(pushProvider) {
16130
- return _regeneratorRuntime.wrap(function _callee94$(_context94) {
16237
+ var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee95(pushProvider) {
16238
+ return _regeneratorRuntime.wrap(function _callee95$(_context95) {
16131
16239
  while (1) {
16132
- switch (_context94.prev = _context94.next) {
16240
+ switch (_context95.prev = _context95.next) {
16133
16241
  case 0:
16134
- _context94.next = 2;
16242
+ _context95.next = 2;
16135
16243
  return this.post(this.baseURL + "/push_providers", {
16136
16244
  push_provider: pushProvider
16137
16245
  });
16138
16246
 
16139
16247
  case 2:
16140
- return _context94.abrupt("return", _context94.sent);
16248
+ return _context95.abrupt("return", _context95.sent);
16141
16249
 
16142
16250
  case 3:
16143
16251
  case "end":
16144
- return _context94.stop();
16252
+ return _context95.stop();
16145
16253
  }
16146
16254
  }
16147
- }, _callee94, this);
16255
+ }, _callee95, this);
16148
16256
  }));
16149
16257
 
16150
- function upsertPushProvider(_x133) {
16258
+ function upsertPushProvider(_x135) {
16151
16259
  return _upsertPushProvider.apply(this, arguments);
16152
16260
  }
16153
16261
 
@@ -16166,28 +16274,28 @@ var StreamChat = /*#__PURE__*/function () {
16166
16274
  }, {
16167
16275
  key: "deletePushProvider",
16168
16276
  value: function () {
16169
- var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee95(_ref10) {
16277
+ var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee96(_ref10) {
16170
16278
  var type, name;
16171
- return _regeneratorRuntime.wrap(function _callee95$(_context95) {
16279
+ return _regeneratorRuntime.wrap(function _callee96$(_context96) {
16172
16280
  while (1) {
16173
- switch (_context95.prev = _context95.next) {
16281
+ switch (_context96.prev = _context96.next) {
16174
16282
  case 0:
16175
16283
  type = _ref10.type, name = _ref10.name;
16176
- _context95.next = 3;
16284
+ _context96.next = 3;
16177
16285
  return this.delete(this.baseURL + "/push_providers/".concat(encodeURIComponent(type), "/").concat(encodeURIComponent(name)));
16178
16286
 
16179
16287
  case 3:
16180
- return _context95.abrupt("return", _context95.sent);
16288
+ return _context96.abrupt("return", _context96.sent);
16181
16289
 
16182
16290
  case 4:
16183
16291
  case "end":
16184
- return _context95.stop();
16292
+ return _context96.stop();
16185
16293
  }
16186
16294
  }
16187
- }, _callee95, this);
16295
+ }, _callee96, this);
16188
16296
  }));
16189
16297
 
16190
- function deletePushProvider(_x134) {
16298
+ function deletePushProvider(_x136) {
16191
16299
  return _deletePushProvider.apply(this, arguments);
16192
16300
  }
16193
16301
 
@@ -16204,23 +16312,23 @@ var StreamChat = /*#__PURE__*/function () {
16204
16312
  }, {
16205
16313
  key: "listPushProviders",
16206
16314
  value: function () {
16207
- var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee96() {
16208
- return _regeneratorRuntime.wrap(function _callee96$(_context96) {
16315
+ var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee97() {
16316
+ return _regeneratorRuntime.wrap(function _callee97$(_context97) {
16209
16317
  while (1) {
16210
- switch (_context96.prev = _context96.next) {
16318
+ switch (_context97.prev = _context97.next) {
16211
16319
  case 0:
16212
- _context96.next = 2;
16320
+ _context97.next = 2;
16213
16321
  return this.get(this.baseURL + "/push_providers");
16214
16322
 
16215
16323
  case 2:
16216
- return _context96.abrupt("return", _context96.sent);
16324
+ return _context97.abrupt("return", _context97.sent);
16217
16325
 
16218
16326
  case 3:
16219
16327
  case "end":
16220
- return _context96.stop();
16328
+ return _context97.stop();
16221
16329
  }
16222
16330
  }
16223
- }, _callee96, this);
16331
+ }, _callee97, this);
16224
16332
  }));
16225
16333
 
16226
16334
  function listPushProviders() {
@@ -16248,26 +16356,26 @@ var StreamChat = /*#__PURE__*/function () {
16248
16356
  }, {
16249
16357
  key: "commitMessage",
16250
16358
  value: function () {
16251
- var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee97(id) {
16252
- return _regeneratorRuntime.wrap(function _callee97$(_context97) {
16359
+ var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee98(id) {
16360
+ return _regeneratorRuntime.wrap(function _callee98$(_context98) {
16253
16361
  while (1) {
16254
- switch (_context97.prev = _context97.next) {
16362
+ switch (_context98.prev = _context98.next) {
16255
16363
  case 0:
16256
- _context97.next = 2;
16364
+ _context98.next = 2;
16257
16365
  return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(id), "/commit"));
16258
16366
 
16259
16367
  case 2:
16260
- return _context97.abrupt("return", _context97.sent);
16368
+ return _context98.abrupt("return", _context98.sent);
16261
16369
 
16262
16370
  case 3:
16263
16371
  case "end":
16264
- return _context97.stop();
16372
+ return _context98.stop();
16265
16373
  }
16266
16374
  }
16267
- }, _callee97, this);
16375
+ }, _callee98, this);
16268
16376
  }));
16269
16377
 
16270
- function commitMessage(_x135) {
16378
+ function commitMessage(_x137) {
16271
16379
  return _commitMessage.apply(this, arguments);
16272
16380
  }
16273
16381
 
@@ -16283,28 +16391,28 @@ var StreamChat = /*#__PURE__*/function () {
16283
16391
  }, {
16284
16392
  key: "createPoll",
16285
16393
  value: function () {
16286
- var _createPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee98(poll, userId) {
16287
- return _regeneratorRuntime.wrap(function _callee98$(_context98) {
16394
+ var _createPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee99(poll, userId) {
16395
+ return _regeneratorRuntime.wrap(function _callee99$(_context99) {
16288
16396
  while (1) {
16289
- switch (_context98.prev = _context98.next) {
16397
+ switch (_context99.prev = _context99.next) {
16290
16398
  case 0:
16291
- _context98.next = 2;
16399
+ _context99.next = 2;
16292
16400
  return this.post(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
16293
16401
  user_id: userId
16294
16402
  } : {}));
16295
16403
 
16296
16404
  case 2:
16297
- return _context98.abrupt("return", _context98.sent);
16405
+ return _context99.abrupt("return", _context99.sent);
16298
16406
 
16299
16407
  case 3:
16300
16408
  case "end":
16301
- return _context98.stop();
16409
+ return _context99.stop();
16302
16410
  }
16303
16411
  }
16304
- }, _callee98, this);
16412
+ }, _callee99, this);
16305
16413
  }));
16306
16414
 
16307
- function createPoll(_x136, _x137) {
16415
+ function createPoll(_x138, _x139) {
16308
16416
  return _createPoll.apply(this, arguments);
16309
16417
  }
16310
16418
 
@@ -16320,28 +16428,28 @@ var StreamChat = /*#__PURE__*/function () {
16320
16428
  }, {
16321
16429
  key: "getPoll",
16322
16430
  value: function () {
16323
- var _getPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee99(id, userId) {
16324
- return _regeneratorRuntime.wrap(function _callee99$(_context99) {
16431
+ var _getPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee100(id, userId) {
16432
+ return _regeneratorRuntime.wrap(function _callee100$(_context100) {
16325
16433
  while (1) {
16326
- switch (_context99.prev = _context99.next) {
16434
+ switch (_context100.prev = _context100.next) {
16327
16435
  case 0:
16328
- _context99.next = 2;
16436
+ _context100.next = 2;
16329
16437
  return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(id)), userId ? {
16330
16438
  user_id: userId
16331
16439
  } : {});
16332
16440
 
16333
16441
  case 2:
16334
- return _context99.abrupt("return", _context99.sent);
16442
+ return _context100.abrupt("return", _context100.sent);
16335
16443
 
16336
16444
  case 3:
16337
16445
  case "end":
16338
- return _context99.stop();
16446
+ return _context100.stop();
16339
16447
  }
16340
16448
  }
16341
- }, _callee99, this);
16449
+ }, _callee100, this);
16342
16450
  }));
16343
16451
 
16344
- function getPoll(_x138, _x139) {
16452
+ function getPoll(_x140, _x141) {
16345
16453
  return _getPoll.apply(this, arguments);
16346
16454
  }
16347
16455
 
@@ -16357,28 +16465,28 @@ var StreamChat = /*#__PURE__*/function () {
16357
16465
  }, {
16358
16466
  key: "updatePoll",
16359
16467
  value: function () {
16360
- var _updatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee100(poll, userId) {
16361
- return _regeneratorRuntime.wrap(function _callee100$(_context100) {
16468
+ var _updatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee101(poll, userId) {
16469
+ return _regeneratorRuntime.wrap(function _callee101$(_context101) {
16362
16470
  while (1) {
16363
- switch (_context100.prev = _context100.next) {
16471
+ switch (_context101.prev = _context101.next) {
16364
16472
  case 0:
16365
- _context100.next = 2;
16473
+ _context101.next = 2;
16366
16474
  return this.put(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
16367
16475
  user_id: userId
16368
16476
  } : {}));
16369
16477
 
16370
16478
  case 2:
16371
- return _context100.abrupt("return", _context100.sent);
16479
+ return _context101.abrupt("return", _context101.sent);
16372
16480
 
16373
16481
  case 3:
16374
16482
  case "end":
16375
- return _context100.stop();
16483
+ return _context101.stop();
16376
16484
  }
16377
16485
  }
16378
- }, _callee100, this);
16486
+ }, _callee101, this);
16379
16487
  }));
16380
16488
 
16381
- function updatePoll(_x140, _x141) {
16489
+ function updatePoll(_x142, _x143) {
16382
16490
  return _updatePoll.apply(this, arguments);
16383
16491
  }
16384
16492
 
@@ -16396,28 +16504,28 @@ var StreamChat = /*#__PURE__*/function () {
16396
16504
  }, {
16397
16505
  key: "partialUpdatePoll",
16398
16506
  value: function () {
16399
- var _partialUpdatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee101(id, partialPollObject, userId) {
16400
- return _regeneratorRuntime.wrap(function _callee101$(_context101) {
16507
+ var _partialUpdatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee102(id, partialPollObject, userId) {
16508
+ return _regeneratorRuntime.wrap(function _callee102$(_context102) {
16401
16509
  while (1) {
16402
- switch (_context101.prev = _context101.next) {
16510
+ switch (_context102.prev = _context102.next) {
16403
16511
  case 0:
16404
- _context101.next = 2;
16512
+ _context102.next = 2;
16405
16513
  return this.patch(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread({}, partialPollObject), userId ? {
16406
16514
  user_id: userId
16407
16515
  } : {}));
16408
16516
 
16409
16517
  case 2:
16410
- return _context101.abrupt("return", _context101.sent);
16518
+ return _context102.abrupt("return", _context102.sent);
16411
16519
 
16412
16520
  case 3:
16413
16521
  case "end":
16414
- return _context101.stop();
16522
+ return _context102.stop();
16415
16523
  }
16416
16524
  }
16417
- }, _callee101, this);
16525
+ }, _callee102, this);
16418
16526
  }));
16419
16527
 
16420
- function partialUpdatePoll(_x142, _x143, _x144) {
16528
+ function partialUpdatePoll(_x144, _x145, _x146) {
16421
16529
  return _partialUpdatePoll.apply(this, arguments);
16422
16530
  }
16423
16531
 
@@ -16433,28 +16541,28 @@ var StreamChat = /*#__PURE__*/function () {
16433
16541
  }, {
16434
16542
  key: "deletePoll",
16435
16543
  value: function () {
16436
- var _deletePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee102(id, userId) {
16437
- return _regeneratorRuntime.wrap(function _callee102$(_context102) {
16544
+ var _deletePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee103(id, userId) {
16545
+ return _regeneratorRuntime.wrap(function _callee103$(_context103) {
16438
16546
  while (1) {
16439
- switch (_context102.prev = _context102.next) {
16547
+ switch (_context103.prev = _context103.next) {
16440
16548
  case 0:
16441
- _context102.next = 2;
16549
+ _context103.next = 2;
16442
16550
  return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread({}, userId ? {
16443
16551
  user_id: userId
16444
16552
  } : {}));
16445
16553
 
16446
16554
  case 2:
16447
- return _context102.abrupt("return", _context102.sent);
16555
+ return _context103.abrupt("return", _context103.sent);
16448
16556
 
16449
16557
  case 3:
16450
16558
  case "end":
16451
- return _context102.stop();
16559
+ return _context103.stop();
16452
16560
  }
16453
16561
  }
16454
- }, _callee102, this);
16562
+ }, _callee103, this);
16455
16563
  }));
16456
16564
 
16457
- function deletePoll(_x145, _x146) {
16565
+ function deletePoll(_x147, _x148) {
16458
16566
  return _deletePoll.apply(this, arguments);
16459
16567
  }
16460
16568
 
@@ -16470,12 +16578,12 @@ var StreamChat = /*#__PURE__*/function () {
16470
16578
  }, {
16471
16579
  key: "closePoll",
16472
16580
  value: function () {
16473
- var _closePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee103(id, userId) {
16474
- return _regeneratorRuntime.wrap(function _callee103$(_context103) {
16581
+ var _closePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee104(id, userId) {
16582
+ return _regeneratorRuntime.wrap(function _callee104$(_context104) {
16475
16583
  while (1) {
16476
- switch (_context103.prev = _context103.next) {
16584
+ switch (_context104.prev = _context104.next) {
16477
16585
  case 0:
16478
- return _context103.abrupt("return", this.partialUpdatePoll(id, {
16586
+ return _context104.abrupt("return", this.partialUpdatePoll(id, {
16479
16587
  set: {
16480
16588
  is_closed: true
16481
16589
  }
@@ -16483,13 +16591,13 @@ var StreamChat = /*#__PURE__*/function () {
16483
16591
 
16484
16592
  case 1:
16485
16593
  case "end":
16486
- return _context103.stop();
16594
+ return _context104.stop();
16487
16595
  }
16488
16596
  }
16489
- }, _callee103, this);
16597
+ }, _callee104, this);
16490
16598
  }));
16491
16599
 
16492
- function closePoll(_x147, _x148) {
16600
+ function closePoll(_x149, _x150) {
16493
16601
  return _closePoll.apply(this, arguments);
16494
16602
  }
16495
16603
 
@@ -16506,28 +16614,28 @@ var StreamChat = /*#__PURE__*/function () {
16506
16614
  }, {
16507
16615
  key: "createPollOption",
16508
16616
  value: function () {
16509
- var _createPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee104(pollId, option, userId) {
16510
- return _regeneratorRuntime.wrap(function _callee104$(_context104) {
16617
+ var _createPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee105(pollId, option, userId) {
16618
+ return _regeneratorRuntime.wrap(function _callee105$(_context105) {
16511
16619
  while (1) {
16512
- switch (_context104.prev = _context104.next) {
16620
+ switch (_context105.prev = _context105.next) {
16513
16621
  case 0:
16514
- _context104.next = 2;
16622
+ _context105.next = 2;
16515
16623
  return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
16516
16624
  user_id: userId
16517
16625
  } : {}));
16518
16626
 
16519
16627
  case 2:
16520
- return _context104.abrupt("return", _context104.sent);
16628
+ return _context105.abrupt("return", _context105.sent);
16521
16629
 
16522
16630
  case 3:
16523
16631
  case "end":
16524
- return _context104.stop();
16632
+ return _context105.stop();
16525
16633
  }
16526
16634
  }
16527
- }, _callee104, this);
16635
+ }, _callee105, this);
16528
16636
  }));
16529
16637
 
16530
- function createPollOption(_x149, _x150, _x151) {
16638
+ function createPollOption(_x151, _x152, _x153) {
16531
16639
  return _createPollOption.apply(this, arguments);
16532
16640
  }
16533
16641
 
@@ -16544,28 +16652,28 @@ var StreamChat = /*#__PURE__*/function () {
16544
16652
  }, {
16545
16653
  key: "getPollOption",
16546
16654
  value: function () {
16547
- var _getPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee105(pollId, optionId, userId) {
16548
- return _regeneratorRuntime.wrap(function _callee105$(_context105) {
16655
+ var _getPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee106(pollId, optionId, userId) {
16656
+ return _regeneratorRuntime.wrap(function _callee106$(_context106) {
16549
16657
  while (1) {
16550
- switch (_context105.prev = _context105.next) {
16658
+ switch (_context106.prev = _context106.next) {
16551
16659
  case 0:
16552
- _context105.next = 2;
16660
+ _context106.next = 2;
16553
16661
  return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
16554
16662
  user_id: userId
16555
16663
  } : {});
16556
16664
 
16557
16665
  case 2:
16558
- return _context105.abrupt("return", _context105.sent);
16666
+ return _context106.abrupt("return", _context106.sent);
16559
16667
 
16560
16668
  case 3:
16561
16669
  case "end":
16562
- return _context105.stop();
16670
+ return _context106.stop();
16563
16671
  }
16564
16672
  }
16565
- }, _callee105, this);
16673
+ }, _callee106, this);
16566
16674
  }));
16567
16675
 
16568
- function getPollOption(_x152, _x153, _x154) {
16676
+ function getPollOption(_x154, _x155, _x156) {
16569
16677
  return _getPollOption.apply(this, arguments);
16570
16678
  }
16571
16679
 
@@ -16582,28 +16690,28 @@ var StreamChat = /*#__PURE__*/function () {
16582
16690
  }, {
16583
16691
  key: "updatePollOption",
16584
16692
  value: function () {
16585
- var _updatePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee106(pollId, option, userId) {
16586
- return _regeneratorRuntime.wrap(function _callee106$(_context106) {
16693
+ var _updatePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee107(pollId, option, userId) {
16694
+ return _regeneratorRuntime.wrap(function _callee107$(_context107) {
16587
16695
  while (1) {
16588
- switch (_context106.prev = _context106.next) {
16696
+ switch (_context107.prev = _context107.next) {
16589
16697
  case 0:
16590
- _context106.next = 2;
16698
+ _context107.next = 2;
16591
16699
  return this.put(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
16592
16700
  user_id: userId
16593
16701
  } : {}));
16594
16702
 
16595
16703
  case 2:
16596
- return _context106.abrupt("return", _context106.sent);
16704
+ return _context107.abrupt("return", _context107.sent);
16597
16705
 
16598
16706
  case 3:
16599
16707
  case "end":
16600
- return _context106.stop();
16708
+ return _context107.stop();
16601
16709
  }
16602
16710
  }
16603
- }, _callee106, this);
16711
+ }, _callee107, this);
16604
16712
  }));
16605
16713
 
16606
- function updatePollOption(_x155, _x156, _x157) {
16714
+ function updatePollOption(_x157, _x158, _x159) {
16607
16715
  return _updatePollOption.apply(this, arguments);
16608
16716
  }
16609
16717
 
@@ -16620,28 +16728,28 @@ var StreamChat = /*#__PURE__*/function () {
16620
16728
  }, {
16621
16729
  key: "deletePollOption",
16622
16730
  value: function () {
16623
- var _deletePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee107(pollId, optionId, userId) {
16624
- return _regeneratorRuntime.wrap(function _callee107$(_context107) {
16731
+ var _deletePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee108(pollId, optionId, userId) {
16732
+ return _regeneratorRuntime.wrap(function _callee108$(_context108) {
16625
16733
  while (1) {
16626
- switch (_context107.prev = _context107.next) {
16734
+ switch (_context108.prev = _context108.next) {
16627
16735
  case 0:
16628
- _context107.next = 2;
16736
+ _context108.next = 2;
16629
16737
  return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
16630
16738
  user_id: userId
16631
16739
  } : {});
16632
16740
 
16633
16741
  case 2:
16634
- return _context107.abrupt("return", _context107.sent);
16742
+ return _context108.abrupt("return", _context108.sent);
16635
16743
 
16636
16744
  case 3:
16637
16745
  case "end":
16638
- return _context107.stop();
16746
+ return _context108.stop();
16639
16747
  }
16640
16748
  }
16641
- }, _callee107, this);
16749
+ }, _callee108, this);
16642
16750
  }));
16643
16751
 
16644
- function deletePollOption(_x158, _x159, _x160) {
16752
+ function deletePollOption(_x160, _x161, _x162) {
16645
16753
  return _deletePollOption.apply(this, arguments);
16646
16754
  }
16647
16755
 
@@ -16659,12 +16767,12 @@ var StreamChat = /*#__PURE__*/function () {
16659
16767
  }, {
16660
16768
  key: "castPollVote",
16661
16769
  value: function () {
16662
- var _castPollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee108(messageId, pollId, vote, userId) {
16663
- return _regeneratorRuntime.wrap(function _callee108$(_context108) {
16770
+ var _castPollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee109(messageId, pollId, vote, userId) {
16771
+ return _regeneratorRuntime.wrap(function _callee109$(_context109) {
16664
16772
  while (1) {
16665
- switch (_context108.prev = _context108.next) {
16773
+ switch (_context109.prev = _context109.next) {
16666
16774
  case 0:
16667
- _context108.next = 2;
16775
+ _context109.next = 2;
16668
16776
  return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote"), _objectSpread({
16669
16777
  vote: vote
16670
16778
  }, userId ? {
@@ -16672,17 +16780,17 @@ var StreamChat = /*#__PURE__*/function () {
16672
16780
  } : {}));
16673
16781
 
16674
16782
  case 2:
16675
- return _context108.abrupt("return", _context108.sent);
16783
+ return _context109.abrupt("return", _context109.sent);
16676
16784
 
16677
16785
  case 3:
16678
16786
  case "end":
16679
- return _context108.stop();
16787
+ return _context109.stop();
16680
16788
  }
16681
16789
  }
16682
- }, _callee108, this);
16790
+ }, _callee109, this);
16683
16791
  }));
16684
16792
 
16685
- function castPollVote(_x161, _x162, _x163, _x164) {
16793
+ function castPollVote(_x163, _x164, _x165, _x166) {
16686
16794
  return _castPollVote.apply(this, arguments);
16687
16795
  }
16688
16796
 
@@ -16699,24 +16807,24 @@ var StreamChat = /*#__PURE__*/function () {
16699
16807
  }, {
16700
16808
  key: "addPollAnswer",
16701
16809
  value: function () {
16702
- var _addPollAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee109(messageId, pollId, answerText, userId) {
16703
- return _regeneratorRuntime.wrap(function _callee109$(_context109) {
16810
+ var _addPollAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee110(messageId, pollId, answerText, userId) {
16811
+ return _regeneratorRuntime.wrap(function _callee110$(_context110) {
16704
16812
  while (1) {
16705
- switch (_context109.prev = _context109.next) {
16813
+ switch (_context110.prev = _context110.next) {
16706
16814
  case 0:
16707
- return _context109.abrupt("return", this.castPollVote(messageId, pollId, {
16815
+ return _context110.abrupt("return", this.castPollVote(messageId, pollId, {
16708
16816
  answer_text: answerText
16709
16817
  }, userId));
16710
16818
 
16711
16819
  case 1:
16712
16820
  case "end":
16713
- return _context109.stop();
16821
+ return _context110.stop();
16714
16822
  }
16715
16823
  }
16716
- }, _callee109, this);
16824
+ }, _callee110, this);
16717
16825
  }));
16718
16826
 
16719
- function addPollAnswer(_x165, _x166, _x167, _x168) {
16827
+ function addPollAnswer(_x167, _x168, _x169, _x170) {
16720
16828
  return _addPollAnswer.apply(this, arguments);
16721
16829
  }
16722
16830
 
@@ -16725,28 +16833,28 @@ var StreamChat = /*#__PURE__*/function () {
16725
16833
  }, {
16726
16834
  key: "removePollVote",
16727
16835
  value: function () {
16728
- var _removePollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee110(messageId, pollId, voteId, userId) {
16729
- return _regeneratorRuntime.wrap(function _callee110$(_context110) {
16836
+ var _removePollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee111(messageId, pollId, voteId, userId) {
16837
+ return _regeneratorRuntime.wrap(function _callee111$(_context111) {
16730
16838
  while (1) {
16731
- switch (_context110.prev = _context110.next) {
16839
+ switch (_context111.prev = _context111.next) {
16732
16840
  case 0:
16733
- _context110.next = 2;
16841
+ _context111.next = 2;
16734
16842
  return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote/").concat(encodeURIComponent(voteId)), _objectSpread({}, userId ? {
16735
16843
  user_id: userId
16736
16844
  } : {}));
16737
16845
 
16738
16846
  case 2:
16739
- return _context110.abrupt("return", _context110.sent);
16847
+ return _context111.abrupt("return", _context111.sent);
16740
16848
 
16741
16849
  case 3:
16742
16850
  case "end":
16743
- return _context110.stop();
16851
+ return _context111.stop();
16744
16852
  }
16745
16853
  }
16746
- }, _callee110, this);
16854
+ }, _callee111, this);
16747
16855
  }));
16748
16856
 
16749
- function removePollVote(_x169, _x170, _x171, _x172) {
16857
+ function removePollVote(_x171, _x172, _x173, _x174) {
16750
16858
  return _removePollVote.apply(this, arguments);
16751
16859
  }
16752
16860
 
@@ -16764,37 +16872,37 @@ var StreamChat = /*#__PURE__*/function () {
16764
16872
  }, {
16765
16873
  key: "queryPolls",
16766
16874
  value: function () {
16767
- var _queryPolls = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee111() {
16875
+ var _queryPolls = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee112() {
16768
16876
  var filter,
16769
16877
  sort,
16770
16878
  options,
16771
16879
  userId,
16772
16880
  q,
16773
- _args111 = arguments;
16774
- return _regeneratorRuntime.wrap(function _callee111$(_context111) {
16881
+ _args112 = arguments;
16882
+ return _regeneratorRuntime.wrap(function _callee112$(_context112) {
16775
16883
  while (1) {
16776
- switch (_context111.prev = _context111.next) {
16884
+ switch (_context112.prev = _context112.next) {
16777
16885
  case 0:
16778
- filter = _args111.length > 0 && _args111[0] !== undefined ? _args111[0] : {};
16779
- sort = _args111.length > 1 && _args111[1] !== undefined ? _args111[1] : [];
16780
- options = _args111.length > 2 && _args111[2] !== undefined ? _args111[2] : {};
16781
- userId = _args111.length > 3 ? _args111[3] : undefined;
16886
+ filter = _args112.length > 0 && _args112[0] !== undefined ? _args112[0] : {};
16887
+ sort = _args112.length > 1 && _args112[1] !== undefined ? _args112[1] : [];
16888
+ options = _args112.length > 2 && _args112[2] !== undefined ? _args112[2] : {};
16889
+ userId = _args112.length > 3 ? _args112[3] : undefined;
16782
16890
  q = userId ? "?user_id=".concat(userId) : '';
16783
- _context111.next = 7;
16891
+ _context112.next = 7;
16784
16892
  return this.post(this.baseURL + "/polls/query".concat(q), _objectSpread({
16785
16893
  filter: filter,
16786
16894
  sort: normalizeQuerySort(sort)
16787
16895
  }, options));
16788
16896
 
16789
16897
  case 7:
16790
- return _context111.abrupt("return", _context111.sent);
16898
+ return _context112.abrupt("return", _context112.sent);
16791
16899
 
16792
16900
  case 8:
16793
16901
  case "end":
16794
- return _context111.stop();
16902
+ return _context112.stop();
16795
16903
  }
16796
16904
  }
16797
- }, _callee111, this);
16905
+ }, _callee112, this);
16798
16906
  }));
16799
16907
 
16800
16908
  function queryPolls() {
@@ -16816,40 +16924,40 @@ var StreamChat = /*#__PURE__*/function () {
16816
16924
  }, {
16817
16925
  key: "queryPollVotes",
16818
16926
  value: function () {
16819
- var _queryPollVotes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee112(pollId) {
16927
+ var _queryPollVotes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee113(pollId) {
16820
16928
  var filter,
16821
16929
  sort,
16822
16930
  options,
16823
16931
  userId,
16824
16932
  q,
16825
- _args112 = arguments;
16826
- return _regeneratorRuntime.wrap(function _callee112$(_context112) {
16933
+ _args113 = arguments;
16934
+ return _regeneratorRuntime.wrap(function _callee113$(_context113) {
16827
16935
  while (1) {
16828
- switch (_context112.prev = _context112.next) {
16936
+ switch (_context113.prev = _context113.next) {
16829
16937
  case 0:
16830
- filter = _args112.length > 1 && _args112[1] !== undefined ? _args112[1] : {};
16831
- sort = _args112.length > 2 && _args112[2] !== undefined ? _args112[2] : [];
16832
- options = _args112.length > 3 && _args112[3] !== undefined ? _args112[3] : {};
16833
- userId = _args112.length > 4 ? _args112[4] : undefined;
16938
+ filter = _args113.length > 1 && _args113[1] !== undefined ? _args113[1] : {};
16939
+ sort = _args113.length > 2 && _args113[2] !== undefined ? _args113[2] : [];
16940
+ options = _args113.length > 3 && _args113[3] !== undefined ? _args113[3] : {};
16941
+ userId = _args113.length > 4 ? _args113[4] : undefined;
16834
16942
  q = userId ? "?user_id=".concat(userId) : '';
16835
- _context112.next = 7;
16943
+ _context113.next = 7;
16836
16944
  return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
16837
16945
  filter: filter,
16838
16946
  sort: normalizeQuerySort(sort)
16839
16947
  }, options));
16840
16948
 
16841
16949
  case 7:
16842
- return _context112.abrupt("return", _context112.sent);
16950
+ return _context113.abrupt("return", _context113.sent);
16843
16951
 
16844
16952
  case 8:
16845
16953
  case "end":
16846
- return _context112.stop();
16954
+ return _context113.stop();
16847
16955
  }
16848
16956
  }
16849
- }, _callee112, this);
16957
+ }, _callee113, this);
16850
16958
  }));
16851
16959
 
16852
- function queryPollVotes(_x173) {
16960
+ function queryPollVotes(_x175) {
16853
16961
  return _queryPollVotes.apply(this, arguments);
16854
16962
  }
16855
16963
 
@@ -16868,23 +16976,23 @@ var StreamChat = /*#__PURE__*/function () {
16868
16976
  }, {
16869
16977
  key: "queryPollAnswers",
16870
16978
  value: function () {
16871
- var _queryPollAnswers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee113(pollId) {
16979
+ var _queryPollAnswers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee114(pollId) {
16872
16980
  var filter,
16873
16981
  sort,
16874
16982
  options,
16875
16983
  userId,
16876
16984
  q,
16877
- _args113 = arguments;
16878
- return _regeneratorRuntime.wrap(function _callee113$(_context113) {
16985
+ _args114 = arguments;
16986
+ return _regeneratorRuntime.wrap(function _callee114$(_context114) {
16879
16987
  while (1) {
16880
- switch (_context113.prev = _context113.next) {
16988
+ switch (_context114.prev = _context114.next) {
16881
16989
  case 0:
16882
- filter = _args113.length > 1 && _args113[1] !== undefined ? _args113[1] : {};
16883
- sort = _args113.length > 2 && _args113[2] !== undefined ? _args113[2] : [];
16884
- options = _args113.length > 3 && _args113[3] !== undefined ? _args113[3] : {};
16885
- userId = _args113.length > 4 ? _args113[4] : undefined;
16990
+ filter = _args114.length > 1 && _args114[1] !== undefined ? _args114[1] : {};
16991
+ sort = _args114.length > 2 && _args114[2] !== undefined ? _args114[2] : [];
16992
+ options = _args114.length > 3 && _args114[3] !== undefined ? _args114[3] : {};
16993
+ userId = _args114.length > 4 ? _args114[4] : undefined;
16886
16994
  q = userId ? "?user_id=".concat(userId) : '';
16887
- _context113.next = 7;
16995
+ _context114.next = 7;
16888
16996
  return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
16889
16997
  filter: _objectSpread(_objectSpread({}, filter), {}, {
16890
16998
  is_answer: true
@@ -16893,17 +17001,17 @@ var StreamChat = /*#__PURE__*/function () {
16893
17001
  }, options));
16894
17002
 
16895
17003
  case 7:
16896
- return _context113.abrupt("return", _context113.sent);
17004
+ return _context114.abrupt("return", _context114.sent);
16897
17005
 
16898
17006
  case 8:
16899
17007
  case "end":
16900
- return _context113.stop();
17008
+ return _context114.stop();
16901
17009
  }
16902
17010
  }
16903
- }, _callee113, this);
17011
+ }, _callee114, this);
16904
17012
  }));
16905
17013
 
16906
- function queryPollAnswers(_x174) {
17014
+ function queryPollAnswers(_x176) {
16907
17015
  return _queryPollAnswers.apply(this, arguments);
16908
17016
  }
16909
17017
 
@@ -16920,33 +17028,33 @@ var StreamChat = /*#__PURE__*/function () {
16920
17028
  }, {
16921
17029
  key: "queryMessageHistory",
16922
17030
  value: function () {
16923
- var _queryMessageHistory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee114() {
17031
+ var _queryMessageHistory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee115() {
16924
17032
  var filter,
16925
17033
  sort,
16926
17034
  options,
16927
- _args114 = arguments;
16928
- return _regeneratorRuntime.wrap(function _callee114$(_context114) {
17035
+ _args115 = arguments;
17036
+ return _regeneratorRuntime.wrap(function _callee115$(_context115) {
16929
17037
  while (1) {
16930
- switch (_context114.prev = _context114.next) {
17038
+ switch (_context115.prev = _context115.next) {
16931
17039
  case 0:
16932
- filter = _args114.length > 0 && _args114[0] !== undefined ? _args114[0] : {};
16933
- sort = _args114.length > 1 && _args114[1] !== undefined ? _args114[1] : [];
16934
- options = _args114.length > 2 && _args114[2] !== undefined ? _args114[2] : {};
16935
- _context114.next = 5;
17040
+ filter = _args115.length > 0 && _args115[0] !== undefined ? _args115[0] : {};
17041
+ sort = _args115.length > 1 && _args115[1] !== undefined ? _args115[1] : [];
17042
+ options = _args115.length > 2 && _args115[2] !== undefined ? _args115[2] : {};
17043
+ _context115.next = 5;
16936
17044
  return this.post(this.baseURL + '/messages/history', _objectSpread({
16937
17045
  filter: filter,
16938
17046
  sort: normalizeQuerySort(sort)
16939
17047
  }, options));
16940
17048
 
16941
17049
  case 5:
16942
- return _context114.abrupt("return", _context114.sent);
17050
+ return _context115.abrupt("return", _context115.sent);
16943
17051
 
16944
17052
  case 6:
16945
17053
  case "end":
16946
- return _context114.stop();
17054
+ return _context115.stop();
16947
17055
  }
16948
17056
  }
16949
- }, _callee114, this);
17057
+ }, _callee115, this);
16950
17058
  }));
16951
17059
 
16952
17060
  function queryMessageHistory() {
@@ -16967,32 +17075,32 @@ var StreamChat = /*#__PURE__*/function () {
16967
17075
  }, {
16968
17076
  key: "updateFlags",
16969
17077
  value: function () {
16970
- var _updateFlags = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee115(message_ids, reviewed_by) {
17078
+ var _updateFlags = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee116(message_ids, reviewed_by) {
16971
17079
  var options,
16972
- _args115 = arguments;
16973
- return _regeneratorRuntime.wrap(function _callee115$(_context115) {
17080
+ _args116 = arguments;
17081
+ return _regeneratorRuntime.wrap(function _callee116$(_context116) {
16974
17082
  while (1) {
16975
- switch (_context115.prev = _context115.next) {
17083
+ switch (_context116.prev = _context116.next) {
16976
17084
  case 0:
16977
- options = _args115.length > 2 && _args115[2] !== undefined ? _args115[2] : {};
16978
- _context115.next = 3;
17085
+ options = _args116.length > 2 && _args116[2] !== undefined ? _args116[2] : {};
17086
+ _context116.next = 3;
16979
17087
  return this.post(this.baseURL + '/automod/v1/moderation/update_flags', _objectSpread({
16980
17088
  message_ids: message_ids,
16981
17089
  reviewed_by: reviewed_by
16982
17090
  }, options));
16983
17091
 
16984
17092
  case 3:
16985
- return _context115.abrupt("return", _context115.sent);
17093
+ return _context116.abrupt("return", _context116.sent);
16986
17094
 
16987
17095
  case 4:
16988
17096
  case "end":
16989
- return _context115.stop();
17097
+ return _context116.stop();
16990
17098
  }
16991
17099
  }
16992
- }, _callee115, this);
17100
+ }, _callee116, this);
16993
17101
  }));
16994
17102
 
16995
- function updateFlags(_x175, _x176) {
17103
+ function updateFlags(_x177, _x178) {
16996
17104
  return _updateFlags.apply(this, arguments);
16997
17105
  }
16998
17106
 
@@ -17058,6 +17166,7 @@ var EVENT_MAP = {
17058
17166
  'reaction.deleted': true,
17059
17167
  'reaction.new': true,
17060
17168
  'reaction.updated': true,
17169
+ 'thread.updated': true,
17061
17170
  'typing.start': true,
17062
17171
  'typing.stop': true,
17063
17172
  'user.banned': true,