stream-chat 8.51.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.
package/dist/index.es.js CHANGED
@@ -14369,6 +14369,48 @@ var StreamChat = /*#__PURE__*/function () {
14369
14369
 
14370
14370
  return translateMessage;
14371
14371
  }()
14372
+ /**
14373
+ * translate - translates the given text to provided language
14374
+ *
14375
+ * @param {string} text
14376
+ * @param {string} destination_language
14377
+ * @param {string} source_language
14378
+ *
14379
+ * @return {TranslateResponse} Response that includes the message
14380
+ */
14381
+
14382
+ }, {
14383
+ key: "translate",
14384
+ value: function () {
14385
+ var _translate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(text, destination_language, source_language) {
14386
+ return _regeneratorRuntime.wrap(function _callee59$(_context59) {
14387
+ while (1) {
14388
+ switch (_context59.prev = _context59.next) {
14389
+ case 0:
14390
+ _context59.next = 2;
14391
+ return this.post(this.baseURL + "/translate", {
14392
+ text: text,
14393
+ source_language: source_language,
14394
+ destination_language: destination_language
14395
+ });
14396
+
14397
+ case 2:
14398
+ return _context59.abrupt("return", _context59.sent);
14399
+
14400
+ case 3:
14401
+ case "end":
14402
+ return _context59.stop();
14403
+ }
14404
+ }
14405
+ }, _callee59, this);
14406
+ }));
14407
+
14408
+ function translate(_x75, _x76, _x77) {
14409
+ return _translate.apply(this, arguments);
14410
+ }
14411
+
14412
+ return translate;
14413
+ }()
14372
14414
  /**
14373
14415
  * _normalizeExpiration - transforms expiration value into ISO string
14374
14416
  * @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
@@ -14465,14 +14507,14 @@ var StreamChat = /*#__PURE__*/function () {
14465
14507
  }, {
14466
14508
  key: "updateMessage",
14467
14509
  value: function () {
14468
- var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(message, userId, options) {
14510
+ var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(message, userId, options) {
14469
14511
  var clonedMessage, reservedMessageFields;
14470
- return _regeneratorRuntime.wrap(function _callee59$(_context59) {
14512
+ return _regeneratorRuntime.wrap(function _callee60$(_context60) {
14471
14513
  while (1) {
14472
- switch (_context59.prev = _context59.next) {
14514
+ switch (_context60.prev = _context60.next) {
14473
14515
  case 0:
14474
14516
  if (message.id) {
14475
- _context59.next = 2;
14517
+ _context60.next = 2;
14476
14518
  break;
14477
14519
  }
14478
14520
 
@@ -14509,23 +14551,23 @@ var StreamChat = /*#__PURE__*/function () {
14509
14551
  });
14510
14552
  }
14511
14553
 
14512
- _context59.next = 10;
14554
+ _context60.next = 10;
14513
14555
  return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(message.id)), _objectSpread({
14514
14556
  message: clonedMessage
14515
14557
  }, options));
14516
14558
 
14517
14559
  case 10:
14518
- return _context59.abrupt("return", _context59.sent);
14560
+ return _context60.abrupt("return", _context60.sent);
14519
14561
 
14520
14562
  case 11:
14521
14563
  case "end":
14522
- return _context59.stop();
14564
+ return _context60.stop();
14523
14565
  }
14524
14566
  }
14525
- }, _callee59, this);
14567
+ }, _callee60, this);
14526
14568
  }));
14527
14569
 
14528
- function updateMessage(_x75, _x76, _x77) {
14570
+ function updateMessage(_x78, _x79, _x80) {
14529
14571
  return _updateMessage.apply(this, arguments);
14530
14572
  }
14531
14573
 
@@ -14548,14 +14590,14 @@ var StreamChat = /*#__PURE__*/function () {
14548
14590
  }, {
14549
14591
  key: "partialUpdateMessage",
14550
14592
  value: function () {
14551
- var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(id, partialMessageObject, userId, options) {
14593
+ var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id, partialMessageObject, userId, options) {
14552
14594
  var user;
14553
- return _regeneratorRuntime.wrap(function _callee60$(_context60) {
14595
+ return _regeneratorRuntime.wrap(function _callee61$(_context61) {
14554
14596
  while (1) {
14555
- switch (_context60.prev = _context60.next) {
14597
+ switch (_context61.prev = _context61.next) {
14556
14598
  case 0:
14557
14599
  if (id) {
14558
- _context60.next = 2;
14600
+ _context61.next = 2;
14559
14601
  break;
14560
14602
  }
14561
14603
 
@@ -14570,23 +14612,23 @@ var StreamChat = /*#__PURE__*/function () {
14570
14612
  };
14571
14613
  }
14572
14614
 
14573
- _context60.next = 6;
14615
+ _context61.next = 6;
14574
14616
  return this.put(this.baseURL + "/messages/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
14575
14617
  user: user
14576
14618
  }));
14577
14619
 
14578
14620
  case 6:
14579
- return _context60.abrupt("return", _context60.sent);
14621
+ return _context61.abrupt("return", _context61.sent);
14580
14622
 
14581
14623
  case 7:
14582
14624
  case "end":
14583
- return _context60.stop();
14625
+ return _context61.stop();
14584
14626
  }
14585
14627
  }
14586
- }, _callee60, this);
14628
+ }, _callee61, this);
14587
14629
  }));
14588
14630
 
14589
- function partialUpdateMessage(_x78, _x79, _x80, _x81) {
14631
+ function partialUpdateMessage(_x81, _x82, _x83, _x84) {
14590
14632
  return _partialUpdateMessage.apply(this, arguments);
14591
14633
  }
14592
14634
 
@@ -14595,11 +14637,11 @@ var StreamChat = /*#__PURE__*/function () {
14595
14637
  }, {
14596
14638
  key: "deleteMessage",
14597
14639
  value: function () {
14598
- var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(messageID, hardDelete) {
14640
+ var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(messageID, hardDelete) {
14599
14641
  var params;
14600
- return _regeneratorRuntime.wrap(function _callee61$(_context61) {
14642
+ return _regeneratorRuntime.wrap(function _callee62$(_context62) {
14601
14643
  while (1) {
14602
- switch (_context61.prev = _context61.next) {
14644
+ switch (_context62.prev = _context62.next) {
14603
14645
  case 0:
14604
14646
  params = {};
14605
14647
 
@@ -14609,21 +14651,21 @@ var StreamChat = /*#__PURE__*/function () {
14609
14651
  };
14610
14652
  }
14611
14653
 
14612
- _context61.next = 4;
14654
+ _context62.next = 4;
14613
14655
  return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), params);
14614
14656
 
14615
14657
  case 4:
14616
- return _context61.abrupt("return", _context61.sent);
14658
+ return _context62.abrupt("return", _context62.sent);
14617
14659
 
14618
14660
  case 5:
14619
14661
  case "end":
14620
- return _context61.stop();
14662
+ return _context62.stop();
14621
14663
  }
14622
14664
  }
14623
- }, _callee61, this);
14665
+ }, _callee62, this);
14624
14666
  }));
14625
14667
 
14626
- function deleteMessage(_x82, _x83) {
14668
+ function deleteMessage(_x85, _x86) {
14627
14669
  return _deleteMessage.apply(this, arguments);
14628
14670
  }
14629
14671
 
@@ -14645,28 +14687,28 @@ var StreamChat = /*#__PURE__*/function () {
14645
14687
  }, {
14646
14688
  key: "undeleteMessage",
14647
14689
  value: function () {
14648
- var _undeleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(messageID, userID) {
14649
- return _regeneratorRuntime.wrap(function _callee62$(_context62) {
14690
+ var _undeleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(messageID, userID) {
14691
+ return _regeneratorRuntime.wrap(function _callee63$(_context63) {
14650
14692
  while (1) {
14651
- switch (_context62.prev = _context62.next) {
14693
+ switch (_context63.prev = _context63.next) {
14652
14694
  case 0:
14653
- _context62.next = 2;
14695
+ _context63.next = 2;
14654
14696
  return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageID), "/undelete"), {
14655
14697
  undeleted_by: userID
14656
14698
  });
14657
14699
 
14658
14700
  case 2:
14659
- return _context62.abrupt("return", _context62.sent);
14701
+ return _context63.abrupt("return", _context63.sent);
14660
14702
 
14661
14703
  case 3:
14662
14704
  case "end":
14663
- return _context62.stop();
14705
+ return _context63.stop();
14664
14706
  }
14665
14707
  }
14666
- }, _callee62, this);
14708
+ }, _callee63, this);
14667
14709
  }));
14668
14710
 
14669
- function undeleteMessage(_x84, _x85) {
14711
+ function undeleteMessage(_x87, _x88) {
14670
14712
  return _undeleteMessage.apply(this, arguments);
14671
14713
  }
14672
14714
 
@@ -14675,26 +14717,26 @@ var StreamChat = /*#__PURE__*/function () {
14675
14717
  }, {
14676
14718
  key: "getMessage",
14677
14719
  value: function () {
14678
- var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(messageID, options) {
14679
- return _regeneratorRuntime.wrap(function _callee63$(_context63) {
14720
+ var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(messageID, options) {
14721
+ return _regeneratorRuntime.wrap(function _callee64$(_context64) {
14680
14722
  while (1) {
14681
- switch (_context63.prev = _context63.next) {
14723
+ switch (_context64.prev = _context64.next) {
14682
14724
  case 0:
14683
- _context63.next = 2;
14725
+ _context64.next = 2;
14684
14726
  return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), _objectSpread({}, options));
14685
14727
 
14686
14728
  case 2:
14687
- return _context63.abrupt("return", _context63.sent);
14729
+ return _context64.abrupt("return", _context64.sent);
14688
14730
 
14689
14731
  case 3:
14690
14732
  case "end":
14691
- return _context63.stop();
14733
+ return _context64.stop();
14692
14734
  }
14693
14735
  }
14694
- }, _callee63, this);
14736
+ }, _callee64, this);
14695
14737
  }));
14696
14738
 
14697
- function getMessage(_x86, _x87) {
14739
+ function getMessage(_x89, _x90) {
14698
14740
  return _getMessage.apply(this, arguments);
14699
14741
  }
14700
14742
 
@@ -14715,30 +14757,30 @@ var StreamChat = /*#__PURE__*/function () {
14715
14757
  }, {
14716
14758
  key: "queryThreads",
14717
14759
  value: function () {
14718
- var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64() {
14760
+ var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65() {
14719
14761
  var _this5 = this;
14720
14762
 
14721
14763
  var options,
14722
14764
  optionsWithDefaults,
14723
14765
  response,
14724
- _args64 = arguments;
14725
- return _regeneratorRuntime.wrap(function _callee64$(_context64) {
14766
+ _args65 = arguments;
14767
+ return _regeneratorRuntime.wrap(function _callee65$(_context65) {
14726
14768
  while (1) {
14727
- switch (_context64.prev = _context64.next) {
14769
+ switch (_context65.prev = _context65.next) {
14728
14770
  case 0:
14729
- options = _args64.length > 0 && _args64[0] !== undefined ? _args64[0] : {};
14771
+ options = _args65.length > 0 && _args65[0] !== undefined ? _args65[0] : {};
14730
14772
  optionsWithDefaults = _objectSpread({
14731
14773
  limit: 10,
14732
14774
  participant_limit: 10,
14733
14775
  reply_limit: 3,
14734
14776
  watch: true
14735
14777
  }, options);
14736
- _context64.next = 4;
14778
+ _context65.next = 4;
14737
14779
  return this.post("".concat(this.baseURL, "/threads"), optionsWithDefaults);
14738
14780
 
14739
14781
  case 4:
14740
- response = _context64.sent;
14741
- return _context64.abrupt("return", {
14782
+ response = _context65.sent;
14783
+ return _context65.abrupt("return", {
14742
14784
  threads: response.threads.map(function (thread) {
14743
14785
  return new Thread({
14744
14786
  client: _this5,
@@ -14750,10 +14792,10 @@ var StreamChat = /*#__PURE__*/function () {
14750
14792
 
14751
14793
  case 6:
14752
14794
  case "end":
14753
- return _context64.stop();
14795
+ return _context65.stop();
14754
14796
  }
14755
14797
  }
14756
- }, _callee64, this);
14798
+ }, _callee65, this);
14757
14799
  }));
14758
14800
 
14759
14801
  function queryThreads() {
@@ -14777,19 +14819,19 @@ var StreamChat = /*#__PURE__*/function () {
14777
14819
  }, {
14778
14820
  key: "getThread",
14779
14821
  value: function () {
14780
- var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(messageId) {
14822
+ var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(messageId) {
14781
14823
  var options,
14782
14824
  optionsWithDefaults,
14783
14825
  response,
14784
- _args65 = arguments;
14785
- return _regeneratorRuntime.wrap(function _callee65$(_context65) {
14826
+ _args66 = arguments;
14827
+ return _regeneratorRuntime.wrap(function _callee66$(_context66) {
14786
14828
  while (1) {
14787
- switch (_context65.prev = _context65.next) {
14829
+ switch (_context66.prev = _context66.next) {
14788
14830
  case 0:
14789
- options = _args65.length > 1 && _args65[1] !== undefined ? _args65[1] : {};
14831
+ options = _args66.length > 1 && _args66[1] !== undefined ? _args66[1] : {};
14790
14832
 
14791
14833
  if (messageId) {
14792
- _context65.next = 3;
14834
+ _context66.next = 3;
14793
14835
  break;
14794
14836
  }
14795
14837
 
@@ -14801,25 +14843,25 @@ var StreamChat = /*#__PURE__*/function () {
14801
14843
  reply_limit: 3,
14802
14844
  watch: true
14803
14845
  }, options);
14804
- _context65.next = 6;
14846
+ _context66.next = 6;
14805
14847
  return this.get("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), optionsWithDefaults);
14806
14848
 
14807
14849
  case 6:
14808
- response = _context65.sent;
14809
- return _context65.abrupt("return", new Thread({
14850
+ response = _context66.sent;
14851
+ return _context66.abrupt("return", new Thread({
14810
14852
  client: this,
14811
14853
  threadData: response.thread
14812
14854
  }));
14813
14855
 
14814
14856
  case 8:
14815
14857
  case "end":
14816
- return _context65.stop();
14858
+ return _context66.stop();
14817
14859
  }
14818
14860
  }
14819
- }, _callee65, this);
14861
+ }, _callee66, this);
14820
14862
  }));
14821
14863
 
14822
- function getThread(_x88) {
14864
+ function getThread(_x91) {
14823
14865
  return _getThread.apply(this, arguments);
14824
14866
  }
14825
14867
 
@@ -14837,15 +14879,15 @@ var StreamChat = /*#__PURE__*/function () {
14837
14879
  }, {
14838
14880
  key: "partialUpdateThread",
14839
14881
  value: function () {
14840
- var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(messageId, partialThreadObject) {
14882
+ var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(messageId, partialThreadObject) {
14841
14883
  var reservedThreadFields, _key5;
14842
14884
 
14843
- return _regeneratorRuntime.wrap(function _callee66$(_context66) {
14885
+ return _regeneratorRuntime.wrap(function _callee67$(_context67) {
14844
14886
  while (1) {
14845
- switch (_context66.prev = _context66.next) {
14887
+ switch (_context67.prev = _context67.next) {
14846
14888
  case 0:
14847
14889
  if (messageId) {
14848
- _context66.next = 2;
14890
+ _context67.next = 2;
14849
14891
  break;
14850
14892
  }
14851
14893
 
@@ -14855,43 +14897,43 @@ var StreamChat = /*#__PURE__*/function () {
14855
14897
  // check for reserved fields from ThreadResponse type within partialThreadObject's set and unset.
14856
14898
  // Throw error if any of the reserved field is found.
14857
14899
  reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel', 'custom'];
14858
- _context66.t0 = _regeneratorRuntime.keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
14900
+ _context67.t0 = _regeneratorRuntime.keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
14859
14901
 
14860
14902
  case 4:
14861
- if ((_context66.t1 = _context66.t0()).done) {
14862
- _context66.next = 10;
14903
+ if ((_context67.t1 = _context67.t0()).done) {
14904
+ _context67.next = 10;
14863
14905
  break;
14864
14906
  }
14865
14907
 
14866
- _key5 = _context66.t1.value;
14908
+ _key5 = _context67.t1.value;
14867
14909
 
14868
14910
  if (!reservedThreadFields.includes(_key5)) {
14869
- _context66.next = 8;
14911
+ _context67.next = 8;
14870
14912
  break;
14871
14913
  }
14872
14914
 
14873
14915
  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."));
14874
14916
 
14875
14917
  case 8:
14876
- _context66.next = 4;
14918
+ _context67.next = 4;
14877
14919
  break;
14878
14920
 
14879
14921
  case 10:
14880
- _context66.next = 12;
14922
+ _context67.next = 12;
14881
14923
  return this.patch("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), partialThreadObject);
14882
14924
 
14883
14925
  case 12:
14884
- return _context66.abrupt("return", _context66.sent);
14926
+ return _context67.abrupt("return", _context67.sent);
14885
14927
 
14886
14928
  case 13:
14887
14929
  case "end":
14888
- return _context66.stop();
14930
+ return _context67.stop();
14889
14931
  }
14890
14932
  }
14891
- }, _callee66, this);
14933
+ }, _callee67, this);
14892
14934
  }));
14893
14935
 
14894
- function partialUpdateThread(_x89, _x90) {
14936
+ function partialUpdateThread(_x92, _x93) {
14895
14937
  return _partialUpdateThread.apply(this, arguments);
14896
14938
  }
14897
14939
 
@@ -14900,7 +14942,7 @@ var StreamChat = /*#__PURE__*/function () {
14900
14942
  }, {
14901
14943
  key: "getUserAgent",
14902
14944
  value: function getUserAgent() {
14903
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.51.0");
14945
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.52.0");
14904
14946
  }
14905
14947
  }, {
14906
14948
  key: "setUserAgent",
@@ -15119,28 +15161,28 @@ var StreamChat = /*#__PURE__*/function () {
15119
15161
  }, {
15120
15162
  key: "sendUserCustomEvent",
15121
15163
  value: function () {
15122
- var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(targetUserID, event) {
15123
- return _regeneratorRuntime.wrap(function _callee67$(_context67) {
15164
+ var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(targetUserID, event) {
15165
+ return _regeneratorRuntime.wrap(function _callee68$(_context68) {
15124
15166
  while (1) {
15125
- switch (_context67.prev = _context67.next) {
15167
+ switch (_context68.prev = _context68.next) {
15126
15168
  case 0:
15127
- _context67.next = 2;
15169
+ _context68.next = 2;
15128
15170
  return this.post("".concat(this.baseURL, "/users/").concat(encodeURIComponent(targetUserID), "/event"), {
15129
15171
  event: event
15130
15172
  });
15131
15173
 
15132
15174
  case 2:
15133
- return _context67.abrupt("return", _context67.sent);
15175
+ return _context68.abrupt("return", _context68.sent);
15134
15176
 
15135
15177
  case 3:
15136
15178
  case "end":
15137
- return _context67.stop();
15179
+ return _context68.stop();
15138
15180
  }
15139
15181
  }
15140
- }, _callee67, this);
15182
+ }, _callee68, this);
15141
15183
  }));
15142
15184
 
15143
- function sendUserCustomEvent(_x91, _x92) {
15185
+ function sendUserCustomEvent(_x94, _x95) {
15144
15186
  return _sendUserCustomEvent.apply(this, arguments);
15145
15187
  }
15146
15188
 
@@ -15237,28 +15279,28 @@ var StreamChat = /*#__PURE__*/function () {
15237
15279
  }, {
15238
15280
  key: "createSegment",
15239
15281
  value: function () {
15240
- var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(type, id, data) {
15282
+ var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(type, id, data) {
15241
15283
  var body;
15242
- return _regeneratorRuntime.wrap(function _callee68$(_context68) {
15284
+ return _regeneratorRuntime.wrap(function _callee69$(_context69) {
15243
15285
  while (1) {
15244
- switch (_context68.prev = _context68.next) {
15286
+ switch (_context69.prev = _context69.next) {
15245
15287
  case 0:
15246
15288
  this.validateServerSideAuth();
15247
15289
  body = _objectSpread({
15248
15290
  id: id,
15249
15291
  type: type
15250
15292
  }, data);
15251
- return _context68.abrupt("return", this.post(this.baseURL + "/segments", body));
15293
+ return _context69.abrupt("return", this.post(this.baseURL + "/segments", body));
15252
15294
 
15253
15295
  case 3:
15254
15296
  case "end":
15255
- return _context68.stop();
15297
+ return _context69.stop();
15256
15298
  }
15257
15299
  }
15258
- }, _callee68, this);
15300
+ }, _callee69, this);
15259
15301
  }));
15260
15302
 
15261
- function createSegment(_x93, _x94, _x95) {
15303
+ function createSegment(_x96, _x97, _x98) {
15262
15304
  return _createSegment.apply(this, arguments);
15263
15305
  }
15264
15306
 
@@ -15277,23 +15319,23 @@ var StreamChat = /*#__PURE__*/function () {
15277
15319
  }, {
15278
15320
  key: "createUserSegment",
15279
15321
  value: function () {
15280
- var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id, data) {
15281
- return _regeneratorRuntime.wrap(function _callee69$(_context69) {
15322
+ var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(id, data) {
15323
+ return _regeneratorRuntime.wrap(function _callee70$(_context70) {
15282
15324
  while (1) {
15283
- switch (_context69.prev = _context69.next) {
15325
+ switch (_context70.prev = _context70.next) {
15284
15326
  case 0:
15285
15327
  this.validateServerSideAuth();
15286
- return _context69.abrupt("return", this.createSegment('user', id, data));
15328
+ return _context70.abrupt("return", this.createSegment('user', id, data));
15287
15329
 
15288
15330
  case 2:
15289
15331
  case "end":
15290
- return _context69.stop();
15332
+ return _context70.stop();
15291
15333
  }
15292
15334
  }
15293
- }, _callee69, this);
15335
+ }, _callee70, this);
15294
15336
  }));
15295
15337
 
15296
- function createUserSegment(_x96, _x97) {
15338
+ function createUserSegment(_x99, _x100) {
15297
15339
  return _createUserSegment.apply(this, arguments);
15298
15340
  }
15299
15341
 
@@ -15312,23 +15354,23 @@ var StreamChat = /*#__PURE__*/function () {
15312
15354
  }, {
15313
15355
  key: "createChannelSegment",
15314
15356
  value: function () {
15315
- var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(id, data) {
15316
- return _regeneratorRuntime.wrap(function _callee70$(_context70) {
15357
+ var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id, data) {
15358
+ return _regeneratorRuntime.wrap(function _callee71$(_context71) {
15317
15359
  while (1) {
15318
- switch (_context70.prev = _context70.next) {
15360
+ switch (_context71.prev = _context71.next) {
15319
15361
  case 0:
15320
15362
  this.validateServerSideAuth();
15321
- return _context70.abrupt("return", this.createSegment('channel', id, data));
15363
+ return _context71.abrupt("return", this.createSegment('channel', id, data));
15322
15364
 
15323
15365
  case 2:
15324
15366
  case "end":
15325
- return _context70.stop();
15367
+ return _context71.stop();
15326
15368
  }
15327
15369
  }
15328
- }, _callee70, this);
15370
+ }, _callee71, this);
15329
15371
  }));
15330
15372
 
15331
- function createChannelSegment(_x98, _x99) {
15373
+ function createChannelSegment(_x101, _x102) {
15332
15374
  return _createChannelSegment.apply(this, arguments);
15333
15375
  }
15334
15376
 
@@ -15337,23 +15379,23 @@ var StreamChat = /*#__PURE__*/function () {
15337
15379
  }, {
15338
15380
  key: "getSegment",
15339
15381
  value: function () {
15340
- var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id) {
15341
- return _regeneratorRuntime.wrap(function _callee71$(_context71) {
15382
+ var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id) {
15383
+ return _regeneratorRuntime.wrap(function _callee72$(_context72) {
15342
15384
  while (1) {
15343
- switch (_context71.prev = _context71.next) {
15385
+ switch (_context72.prev = _context72.next) {
15344
15386
  case 0:
15345
15387
  this.validateServerSideAuth();
15346
- return _context71.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
15388
+ return _context72.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
15347
15389
 
15348
15390
  case 2:
15349
15391
  case "end":
15350
- return _context71.stop();
15392
+ return _context72.stop();
15351
15393
  }
15352
15394
  }
15353
- }, _callee71, this);
15395
+ }, _callee72, this);
15354
15396
  }));
15355
15397
 
15356
- function getSegment(_x100) {
15398
+ function getSegment(_x103) {
15357
15399
  return _getSegment.apply(this, arguments);
15358
15400
  }
15359
15401
 
@@ -15371,23 +15413,23 @@ var StreamChat = /*#__PURE__*/function () {
15371
15413
  }, {
15372
15414
  key: "updateSegment",
15373
15415
  value: function () {
15374
- var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id, data) {
15375
- return _regeneratorRuntime.wrap(function _callee72$(_context72) {
15416
+ var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id, data) {
15417
+ return _regeneratorRuntime.wrap(function _callee73$(_context73) {
15376
15418
  while (1) {
15377
- switch (_context72.prev = _context72.next) {
15419
+ switch (_context73.prev = _context73.next) {
15378
15420
  case 0:
15379
15421
  this.validateServerSideAuth();
15380
- return _context72.abrupt("return", this.put(this.baseURL + "/segments/".concat(encodeURIComponent(id)), data));
15422
+ return _context73.abrupt("return", this.put(this.baseURL + "/segments/".concat(encodeURIComponent(id)), data));
15381
15423
 
15382
15424
  case 2:
15383
15425
  case "end":
15384
- return _context72.stop();
15426
+ return _context73.stop();
15385
15427
  }
15386
15428
  }
15387
- }, _callee72, this);
15429
+ }, _callee73, this);
15388
15430
  }));
15389
15431
 
15390
- function updateSegment(_x101, _x102) {
15432
+ function updateSegment(_x104, _x105) {
15391
15433
  return _updateSegment.apply(this, arguments);
15392
15434
  }
15393
15435
 
@@ -15405,27 +15447,27 @@ var StreamChat = /*#__PURE__*/function () {
15405
15447
  }, {
15406
15448
  key: "addSegmentTargets",
15407
15449
  value: function () {
15408
- var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id, targets) {
15450
+ var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(id, targets) {
15409
15451
  var body;
15410
- return _regeneratorRuntime.wrap(function _callee73$(_context73) {
15452
+ return _regeneratorRuntime.wrap(function _callee74$(_context74) {
15411
15453
  while (1) {
15412
- switch (_context73.prev = _context73.next) {
15454
+ switch (_context74.prev = _context74.next) {
15413
15455
  case 0:
15414
15456
  this.validateServerSideAuth();
15415
15457
  body = {
15416
15458
  target_ids: targets
15417
15459
  };
15418
- return _context73.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/addtargets"), body));
15460
+ return _context74.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/addtargets"), body));
15419
15461
 
15420
15462
  case 3:
15421
15463
  case "end":
15422
- return _context73.stop();
15464
+ return _context74.stop();
15423
15465
  }
15424
15466
  }
15425
- }, _callee73, this);
15467
+ }, _callee74, this);
15426
15468
  }));
15427
15469
 
15428
- function addSegmentTargets(_x103, _x104) {
15470
+ function addSegmentTargets(_x106, _x107) {
15429
15471
  return _addSegmentTargets.apply(this, arguments);
15430
15472
  }
15431
15473
 
@@ -15434,33 +15476,33 @@ var StreamChat = /*#__PURE__*/function () {
15434
15476
  }, {
15435
15477
  key: "querySegmentTargets",
15436
15478
  value: function () {
15437
- var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(id) {
15479
+ var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(id) {
15438
15480
  var filter,
15439
15481
  sort,
15440
15482
  options,
15441
- _args74 = arguments;
15442
- return _regeneratorRuntime.wrap(function _callee74$(_context74) {
15483
+ _args75 = arguments;
15484
+ return _regeneratorRuntime.wrap(function _callee75$(_context75) {
15443
15485
  while (1) {
15444
- switch (_context74.prev = _context74.next) {
15486
+ switch (_context75.prev = _context75.next) {
15445
15487
  case 0:
15446
- filter = _args74.length > 1 && _args74[1] !== undefined ? _args74[1] : {};
15447
- sort = _args74.length > 2 && _args74[2] !== undefined ? _args74[2] : [];
15448
- options = _args74.length > 3 && _args74[3] !== undefined ? _args74[3] : {};
15488
+ filter = _args75.length > 1 && _args75[1] !== undefined ? _args75[1] : {};
15489
+ sort = _args75.length > 2 && _args75[2] !== undefined ? _args75[2] : [];
15490
+ options = _args75.length > 3 && _args75[3] !== undefined ? _args75[3] : {};
15449
15491
  this.validateServerSideAuth();
15450
- return _context74.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/targets/query"), _objectSpread({
15492
+ return _context75.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/targets/query"), _objectSpread({
15451
15493
  filter: filter || {},
15452
15494
  sort: sort || []
15453
15495
  }, options)));
15454
15496
 
15455
15497
  case 5:
15456
15498
  case "end":
15457
- return _context74.stop();
15499
+ return _context75.stop();
15458
15500
  }
15459
15501
  }
15460
- }, _callee74, this);
15502
+ }, _callee75, this);
15461
15503
  }));
15462
15504
 
15463
- function querySegmentTargets(_x105) {
15505
+ function querySegmentTargets(_x108) {
15464
15506
  return _querySegmentTargets.apply(this, arguments);
15465
15507
  }
15466
15508
 
@@ -15478,27 +15520,27 @@ var StreamChat = /*#__PURE__*/function () {
15478
15520
  }, {
15479
15521
  key: "removeSegmentTargets",
15480
15522
  value: function () {
15481
- var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(id, targets) {
15523
+ var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(id, targets) {
15482
15524
  var body;
15483
- return _regeneratorRuntime.wrap(function _callee75$(_context75) {
15525
+ return _regeneratorRuntime.wrap(function _callee76$(_context76) {
15484
15526
  while (1) {
15485
- switch (_context75.prev = _context75.next) {
15527
+ switch (_context76.prev = _context76.next) {
15486
15528
  case 0:
15487
15529
  this.validateServerSideAuth();
15488
15530
  body = {
15489
15531
  target_ids: targets
15490
15532
  };
15491
- return _context75.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/deletetargets"), body));
15533
+ return _context76.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/deletetargets"), body));
15492
15534
 
15493
15535
  case 3:
15494
15536
  case "end":
15495
- return _context75.stop();
15537
+ return _context76.stop();
15496
15538
  }
15497
15539
  }
15498
- }, _callee75, this);
15540
+ }, _callee76, this);
15499
15541
  }));
15500
15542
 
15501
- function removeSegmentTargets(_x106, _x107) {
15543
+ function removeSegmentTargets(_x109, _x110) {
15502
15544
  return _removeSegmentTargets.apply(this, arguments);
15503
15545
  }
15504
15546
 
@@ -15516,29 +15558,29 @@ var StreamChat = /*#__PURE__*/function () {
15516
15558
  }, {
15517
15559
  key: "querySegments",
15518
15560
  value: function () {
15519
- var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(filter, sort) {
15561
+ var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(filter, sort) {
15520
15562
  var options,
15521
- _args76 = arguments;
15522
- return _regeneratorRuntime.wrap(function _callee76$(_context76) {
15563
+ _args77 = arguments;
15564
+ return _regeneratorRuntime.wrap(function _callee77$(_context77) {
15523
15565
  while (1) {
15524
- switch (_context76.prev = _context76.next) {
15566
+ switch (_context77.prev = _context77.next) {
15525
15567
  case 0:
15526
- options = _args76.length > 2 && _args76[2] !== undefined ? _args76[2] : {};
15568
+ options = _args77.length > 2 && _args77[2] !== undefined ? _args77[2] : {};
15527
15569
  this.validateServerSideAuth();
15528
- return _context76.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
15570
+ return _context77.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
15529
15571
  filter: filter,
15530
15572
  sort: sort
15531
15573
  }, options)));
15532
15574
 
15533
15575
  case 3:
15534
15576
  case "end":
15535
- return _context76.stop();
15577
+ return _context77.stop();
15536
15578
  }
15537
15579
  }
15538
- }, _callee76, this);
15580
+ }, _callee77, this);
15539
15581
  }));
15540
15582
 
15541
- function querySegments(_x108, _x109) {
15583
+ function querySegments(_x111, _x112) {
15542
15584
  return _querySegments.apply(this, arguments);
15543
15585
  }
15544
15586
 
@@ -15555,23 +15597,23 @@ var StreamChat = /*#__PURE__*/function () {
15555
15597
  }, {
15556
15598
  key: "deleteSegment",
15557
15599
  value: function () {
15558
- var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(id) {
15559
- return _regeneratorRuntime.wrap(function _callee77$(_context77) {
15600
+ var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(id) {
15601
+ return _regeneratorRuntime.wrap(function _callee78$(_context78) {
15560
15602
  while (1) {
15561
- switch (_context77.prev = _context77.next) {
15603
+ switch (_context78.prev = _context78.next) {
15562
15604
  case 0:
15563
15605
  this.validateServerSideAuth();
15564
- return _context77.abrupt("return", this.delete(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
15606
+ return _context78.abrupt("return", this.delete(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
15565
15607
 
15566
15608
  case 2:
15567
15609
  case "end":
15568
- return _context77.stop();
15610
+ return _context78.stop();
15569
15611
  }
15570
15612
  }
15571
- }, _callee77, this);
15613
+ }, _callee78, this);
15572
15614
  }));
15573
15615
 
15574
- function deleteSegment(_x110) {
15616
+ function deleteSegment(_x113) {
15575
15617
  return _deleteSegment.apply(this, arguments);
15576
15618
  }
15577
15619
 
@@ -15589,23 +15631,23 @@ var StreamChat = /*#__PURE__*/function () {
15589
15631
  }, {
15590
15632
  key: "segmentTargetExists",
15591
15633
  value: function () {
15592
- var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(segmentId, targetId) {
15593
- return _regeneratorRuntime.wrap(function _callee78$(_context78) {
15634
+ var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(segmentId, targetId) {
15635
+ return _regeneratorRuntime.wrap(function _callee79$(_context79) {
15594
15636
  while (1) {
15595
- switch (_context78.prev = _context78.next) {
15637
+ switch (_context79.prev = _context79.next) {
15596
15638
  case 0:
15597
15639
  this.validateServerSideAuth();
15598
- return _context78.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(segmentId), "/target/").concat(encodeURIComponent(targetId))));
15640
+ return _context79.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(segmentId), "/target/").concat(encodeURIComponent(targetId))));
15599
15641
 
15600
15642
  case 2:
15601
15643
  case "end":
15602
- return _context78.stop();
15644
+ return _context79.stop();
15603
15645
  }
15604
15646
  }
15605
- }, _callee78, this);
15647
+ }, _callee79, this);
15606
15648
  }));
15607
15649
 
15608
- function segmentTargetExists(_x111, _x112) {
15650
+ function segmentTargetExists(_x114, _x115) {
15609
15651
  return _segmentTargetExists.apply(this, arguments);
15610
15652
  }
15611
15653
 
@@ -15622,23 +15664,23 @@ var StreamChat = /*#__PURE__*/function () {
15622
15664
  }, {
15623
15665
  key: "createCampaign",
15624
15666
  value: function () {
15625
- var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(params) {
15626
- return _regeneratorRuntime.wrap(function _callee79$(_context79) {
15667
+ var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(params) {
15668
+ return _regeneratorRuntime.wrap(function _callee80$(_context80) {
15627
15669
  while (1) {
15628
- switch (_context79.prev = _context79.next) {
15670
+ switch (_context80.prev = _context80.next) {
15629
15671
  case 0:
15630
15672
  this.validateServerSideAuth();
15631
- return _context79.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
15673
+ return _context80.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
15632
15674
 
15633
15675
  case 2:
15634
15676
  case "end":
15635
- return _context79.stop();
15677
+ return _context80.stop();
15636
15678
  }
15637
15679
  }
15638
- }, _callee79, this);
15680
+ }, _callee80, this);
15639
15681
  }));
15640
15682
 
15641
- function createCampaign(_x113) {
15683
+ function createCampaign(_x116) {
15642
15684
  return _createCampaign.apply(this, arguments);
15643
15685
  }
15644
15686
 
@@ -15647,23 +15689,23 @@ var StreamChat = /*#__PURE__*/function () {
15647
15689
  }, {
15648
15690
  key: "getCampaign",
15649
15691
  value: function () {
15650
- var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(id) {
15651
- return _regeneratorRuntime.wrap(function _callee80$(_context80) {
15692
+ var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(id) {
15693
+ return _regeneratorRuntime.wrap(function _callee81$(_context81) {
15652
15694
  while (1) {
15653
- switch (_context80.prev = _context80.next) {
15695
+ switch (_context81.prev = _context81.next) {
15654
15696
  case 0:
15655
15697
  this.validateServerSideAuth();
15656
- return _context80.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
15698
+ return _context81.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
15657
15699
 
15658
15700
  case 2:
15659
15701
  case "end":
15660
- return _context80.stop();
15702
+ return _context81.stop();
15661
15703
  }
15662
15704
  }
15663
- }, _callee80, this);
15705
+ }, _callee81, this);
15664
15706
  }));
15665
15707
 
15666
- function getCampaign(_x114) {
15708
+ function getCampaign(_x117) {
15667
15709
  return _getCampaign.apply(this, arguments);
15668
15710
  }
15669
15711
 
@@ -15672,26 +15714,26 @@ var StreamChat = /*#__PURE__*/function () {
15672
15714
  }, {
15673
15715
  key: "startCampaign",
15674
15716
  value: function () {
15675
- var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(id, options) {
15676
- return _regeneratorRuntime.wrap(function _callee81$(_context81) {
15717
+ var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(id, options) {
15718
+ return _regeneratorRuntime.wrap(function _callee82$(_context82) {
15677
15719
  while (1) {
15678
- switch (_context81.prev = _context81.next) {
15720
+ switch (_context82.prev = _context82.next) {
15679
15721
  case 0:
15680
15722
  this.validateServerSideAuth();
15681
- return _context81.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/start"), {
15723
+ return _context82.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/start"), {
15682
15724
  scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
15683
15725
  stop_at: options === null || options === void 0 ? void 0 : options.stopAt
15684
15726
  }));
15685
15727
 
15686
15728
  case 2:
15687
15729
  case "end":
15688
- return _context81.stop();
15730
+ return _context82.stop();
15689
15731
  }
15690
15732
  }
15691
- }, _callee81, this);
15733
+ }, _callee82, this);
15692
15734
  }));
15693
15735
 
15694
- function startCampaign(_x115, _x116) {
15736
+ function startCampaign(_x118, _x119) {
15695
15737
  return _startCampaign.apply(this, arguments);
15696
15738
  }
15697
15739
 
@@ -15707,30 +15749,30 @@ var StreamChat = /*#__PURE__*/function () {
15707
15749
  }, {
15708
15750
  key: "queryCampaigns",
15709
15751
  value: function () {
15710
- var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(filter, sort, options) {
15711
- return _regeneratorRuntime.wrap(function _callee82$(_context82) {
15752
+ var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(filter, sort, options) {
15753
+ return _regeneratorRuntime.wrap(function _callee83$(_context83) {
15712
15754
  while (1) {
15713
- switch (_context82.prev = _context82.next) {
15755
+ switch (_context83.prev = _context83.next) {
15714
15756
  case 0:
15715
15757
  this.validateServerSideAuth();
15716
- _context82.next = 3;
15758
+ _context83.next = 3;
15717
15759
  return this.post(this.baseURL + "/campaigns/query", _objectSpread({
15718
15760
  filter: filter,
15719
15761
  sort: sort
15720
15762
  }, options || {}));
15721
15763
 
15722
15764
  case 3:
15723
- return _context82.abrupt("return", _context82.sent);
15765
+ return _context83.abrupt("return", _context83.sent);
15724
15766
 
15725
15767
  case 4:
15726
15768
  case "end":
15727
- return _context82.stop();
15769
+ return _context83.stop();
15728
15770
  }
15729
15771
  }
15730
- }, _callee82, this);
15772
+ }, _callee83, this);
15731
15773
  }));
15732
15774
 
15733
- function queryCampaigns(_x117, _x118, _x119) {
15775
+ function queryCampaigns(_x120, _x121, _x122) {
15734
15776
  return _queryCampaigns.apply(this, arguments);
15735
15777
  }
15736
15778
 
@@ -15748,23 +15790,23 @@ var StreamChat = /*#__PURE__*/function () {
15748
15790
  }, {
15749
15791
  key: "updateCampaign",
15750
15792
  value: function () {
15751
- var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(id, params) {
15752
- return _regeneratorRuntime.wrap(function _callee83$(_context83) {
15793
+ var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(id, params) {
15794
+ return _regeneratorRuntime.wrap(function _callee84$(_context84) {
15753
15795
  while (1) {
15754
- switch (_context83.prev = _context83.next) {
15796
+ switch (_context84.prev = _context84.next) {
15755
15797
  case 0:
15756
15798
  this.validateServerSideAuth();
15757
- return _context83.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(encodeURIComponent(id)), params));
15799
+ return _context84.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(encodeURIComponent(id)), params));
15758
15800
 
15759
15801
  case 2:
15760
15802
  case "end":
15761
- return _context83.stop();
15803
+ return _context84.stop();
15762
15804
  }
15763
15805
  }
15764
- }, _callee83, this);
15806
+ }, _callee84, this);
15765
15807
  }));
15766
15808
 
15767
- function updateCampaign(_x120, _x121) {
15809
+ function updateCampaign(_x123, _x124) {
15768
15810
  return _updateCampaign.apply(this, arguments);
15769
15811
  }
15770
15812
 
@@ -15781,23 +15823,23 @@ var StreamChat = /*#__PURE__*/function () {
15781
15823
  }, {
15782
15824
  key: "deleteCampaign",
15783
15825
  value: function () {
15784
- var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(id) {
15785
- return _regeneratorRuntime.wrap(function _callee84$(_context84) {
15826
+ var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(id) {
15827
+ return _regeneratorRuntime.wrap(function _callee85$(_context85) {
15786
15828
  while (1) {
15787
- switch (_context84.prev = _context84.next) {
15829
+ switch (_context85.prev = _context85.next) {
15788
15830
  case 0:
15789
15831
  this.validateServerSideAuth();
15790
- return _context84.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
15832
+ return _context85.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
15791
15833
 
15792
15834
  case 2:
15793
15835
  case "end":
15794
- return _context84.stop();
15836
+ return _context85.stop();
15795
15837
  }
15796
15838
  }
15797
- }, _callee84, this);
15839
+ }, _callee85, this);
15798
15840
  }));
15799
15841
 
15800
- function deleteCampaign(_x122) {
15842
+ function deleteCampaign(_x125) {
15801
15843
  return _deleteCampaign.apply(this, arguments);
15802
15844
  }
15803
15845
 
@@ -15814,23 +15856,23 @@ var StreamChat = /*#__PURE__*/function () {
15814
15856
  }, {
15815
15857
  key: "stopCampaign",
15816
15858
  value: function () {
15817
- var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(id) {
15818
- return _regeneratorRuntime.wrap(function _callee85$(_context85) {
15859
+ var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(id) {
15860
+ return _regeneratorRuntime.wrap(function _callee86$(_context86) {
15819
15861
  while (1) {
15820
- switch (_context85.prev = _context85.next) {
15862
+ switch (_context86.prev = _context86.next) {
15821
15863
  case 0:
15822
15864
  this.validateServerSideAuth();
15823
- return _context85.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/stop")));
15865
+ return _context86.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/stop")));
15824
15866
 
15825
15867
  case 2:
15826
15868
  case "end":
15827
- return _context85.stop();
15869
+ return _context86.stop();
15828
15870
  }
15829
15871
  }
15830
- }, _callee85, this);
15872
+ }, _callee86, this);
15831
15873
  }));
15832
15874
 
15833
- function stopCampaign(_x123) {
15875
+ function stopCampaign(_x126) {
15834
15876
  return _stopCampaign.apply(this, arguments);
15835
15877
  }
15836
15878
 
@@ -15846,24 +15888,24 @@ var StreamChat = /*#__PURE__*/function () {
15846
15888
  }, {
15847
15889
  key: "enrichURL",
15848
15890
  value: function () {
15849
- var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(url) {
15850
- return _regeneratorRuntime.wrap(function _callee86$(_context86) {
15891
+ var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87(url) {
15892
+ return _regeneratorRuntime.wrap(function _callee87$(_context87) {
15851
15893
  while (1) {
15852
- switch (_context86.prev = _context86.next) {
15894
+ switch (_context87.prev = _context87.next) {
15853
15895
  case 0:
15854
- return _context86.abrupt("return", this.get(this.baseURL + "/og", {
15896
+ return _context87.abrupt("return", this.get(this.baseURL + "/og", {
15855
15897
  url: url
15856
15898
  }));
15857
15899
 
15858
15900
  case 1:
15859
15901
  case "end":
15860
- return _context86.stop();
15902
+ return _context87.stop();
15861
15903
  }
15862
15904
  }
15863
- }, _callee86, this);
15905
+ }, _callee87, this);
15864
15906
  }));
15865
15907
 
15866
- function enrichURL(_x124) {
15908
+ function enrichURL(_x127) {
15867
15909
  return _enrichURL.apply(this, arguments);
15868
15910
  }
15869
15911
 
@@ -15880,22 +15922,22 @@ var StreamChat = /*#__PURE__*/function () {
15880
15922
  }, {
15881
15923
  key: "getTask",
15882
15924
  value: function () {
15883
- var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87(id) {
15884
- return _regeneratorRuntime.wrap(function _callee87$(_context87) {
15925
+ var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(id) {
15926
+ return _regeneratorRuntime.wrap(function _callee88$(_context88) {
15885
15927
  while (1) {
15886
- switch (_context87.prev = _context87.next) {
15928
+ switch (_context88.prev = _context88.next) {
15887
15929
  case 0:
15888
- return _context87.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(encodeURIComponent(id))));
15930
+ return _context88.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(encodeURIComponent(id))));
15889
15931
 
15890
15932
  case 1:
15891
15933
  case "end":
15892
- return _context87.stop();
15934
+ return _context88.stop();
15893
15935
  }
15894
15936
  }
15895
- }, _callee87, this);
15937
+ }, _callee88, this);
15896
15938
  }));
15897
15939
 
15898
- function getTask(_x125) {
15940
+ function getTask(_x128) {
15899
15941
  return _getTask.apply(this, arguments);
15900
15942
  }
15901
15943
 
@@ -15913,31 +15955,31 @@ var StreamChat = /*#__PURE__*/function () {
15913
15955
  }, {
15914
15956
  key: "deleteChannels",
15915
15957
  value: function () {
15916
- var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(cids) {
15958
+ var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee89(cids) {
15917
15959
  var options,
15918
- _args88 = arguments;
15919
- return _regeneratorRuntime.wrap(function _callee88$(_context88) {
15960
+ _args89 = arguments;
15961
+ return _regeneratorRuntime.wrap(function _callee89$(_context89) {
15920
15962
  while (1) {
15921
- switch (_context88.prev = _context88.next) {
15963
+ switch (_context89.prev = _context89.next) {
15922
15964
  case 0:
15923
- options = _args88.length > 1 && _args88[1] !== undefined ? _args88[1] : {};
15924
- _context88.next = 3;
15965
+ options = _args89.length > 1 && _args89[1] !== undefined ? _args89[1] : {};
15966
+ _context89.next = 3;
15925
15967
  return this.post(this.baseURL + "/channels/delete", _objectSpread({
15926
15968
  cids: cids
15927
15969
  }, options));
15928
15970
 
15929
15971
  case 3:
15930
- return _context88.abrupt("return", _context88.sent);
15972
+ return _context89.abrupt("return", _context89.sent);
15931
15973
 
15932
15974
  case 4:
15933
15975
  case "end":
15934
- return _context88.stop();
15976
+ return _context89.stop();
15935
15977
  }
15936
15978
  }
15937
- }, _callee88, this);
15979
+ }, _callee89, this);
15938
15980
  }));
15939
15981
 
15940
- function deleteChannels(_x126) {
15982
+ function deleteChannels(_x129) {
15941
15983
  return _deleteChannels.apply(this, arguments);
15942
15984
  }
15943
15985
 
@@ -15955,17 +15997,17 @@ var StreamChat = /*#__PURE__*/function () {
15955
15997
  }, {
15956
15998
  key: "deleteUsers",
15957
15999
  value: function () {
15958
- var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee89(user_ids) {
16000
+ var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee90(user_ids) {
15959
16001
  var options,
15960
- _args89 = arguments;
15961
- return _regeneratorRuntime.wrap(function _callee89$(_context89) {
16002
+ _args90 = arguments;
16003
+ return _regeneratorRuntime.wrap(function _callee90$(_context90) {
15962
16004
  while (1) {
15963
- switch (_context89.prev = _context89.next) {
16005
+ switch (_context90.prev = _context90.next) {
15964
16006
  case 0:
15965
- options = _args89.length > 1 && _args89[1] !== undefined ? _args89[1] : {};
16007
+ options = _args90.length > 1 && _args90[1] !== undefined ? _args90[1] : {};
15966
16008
 
15967
16009
  if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
15968
- _context89.next = 3;
16010
+ _context90.next = 3;
15969
16011
  break;
15970
16012
  }
15971
16013
 
@@ -15973,7 +16015,7 @@ var StreamChat = /*#__PURE__*/function () {
15973
16015
 
15974
16016
  case 3:
15975
16017
  if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
15976
- _context89.next = 5;
16018
+ _context90.next = 5;
15977
16019
  break;
15978
16020
  }
15979
16021
 
@@ -15981,30 +16023,30 @@ var StreamChat = /*#__PURE__*/function () {
15981
16023
 
15982
16024
  case 5:
15983
16025
  if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
15984
- _context89.next = 7;
16026
+ _context90.next = 7;
15985
16027
  break;
15986
16028
  }
15987
16029
 
15988
16030
  throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
15989
16031
 
15990
16032
  case 7:
15991
- _context89.next = 9;
16033
+ _context90.next = 9;
15992
16034
  return this.post(this.baseURL + "/users/delete", _objectSpread({
15993
16035
  user_ids: user_ids
15994
16036
  }, options));
15995
16037
 
15996
16038
  case 9:
15997
- return _context89.abrupt("return", _context89.sent);
16039
+ return _context90.abrupt("return", _context90.sent);
15998
16040
 
15999
16041
  case 10:
16000
16042
  case "end":
16001
- return _context89.stop();
16043
+ return _context90.stop();
16002
16044
  }
16003
16045
  }
16004
- }, _callee89, this);
16046
+ }, _callee90, this);
16005
16047
  }));
16006
16048
 
16007
- function deleteUsers(_x127) {
16049
+ function deleteUsers(_x130) {
16008
16050
  return _deleteUsers.apply(this, arguments);
16009
16051
  }
16010
16052
 
@@ -16025,28 +16067,28 @@ var StreamChat = /*#__PURE__*/function () {
16025
16067
  }, {
16026
16068
  key: "_createImportURL",
16027
16069
  value: function () {
16028
- var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee90(filename) {
16029
- return _regeneratorRuntime.wrap(function _callee90$(_context90) {
16070
+ var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee91(filename) {
16071
+ return _regeneratorRuntime.wrap(function _callee91$(_context91) {
16030
16072
  while (1) {
16031
- switch (_context90.prev = _context90.next) {
16073
+ switch (_context91.prev = _context91.next) {
16032
16074
  case 0:
16033
- _context90.next = 2;
16075
+ _context91.next = 2;
16034
16076
  return this.post(this.baseURL + "/import_urls", {
16035
16077
  filename: filename
16036
16078
  });
16037
16079
 
16038
16080
  case 2:
16039
- return _context90.abrupt("return", _context90.sent);
16081
+ return _context91.abrupt("return", _context91.sent);
16040
16082
 
16041
16083
  case 3:
16042
16084
  case "end":
16043
- return _context90.stop();
16085
+ return _context91.stop();
16044
16086
  }
16045
16087
  }
16046
- }, _callee90, this);
16088
+ }, _callee91, this);
16047
16089
  }));
16048
16090
 
16049
- function _createImportURL(_x128) {
16091
+ function _createImportURL(_x131) {
16050
16092
  return _createImportURL2.apply(this, arguments);
16051
16093
  }
16052
16094
 
@@ -16068,33 +16110,33 @@ var StreamChat = /*#__PURE__*/function () {
16068
16110
  }, {
16069
16111
  key: "_createImport",
16070
16112
  value: function () {
16071
- var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee91(path) {
16113
+ var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee92(path) {
16072
16114
  var options,
16073
- _args91 = arguments;
16074
- return _regeneratorRuntime.wrap(function _callee91$(_context91) {
16115
+ _args92 = arguments;
16116
+ return _regeneratorRuntime.wrap(function _callee92$(_context92) {
16075
16117
  while (1) {
16076
- switch (_context91.prev = _context91.next) {
16118
+ switch (_context92.prev = _context92.next) {
16077
16119
  case 0:
16078
- options = _args91.length > 1 && _args91[1] !== undefined ? _args91[1] : {
16120
+ options = _args92.length > 1 && _args92[1] !== undefined ? _args92[1] : {
16079
16121
  mode: 'upsert'
16080
16122
  };
16081
- _context91.next = 3;
16123
+ _context92.next = 3;
16082
16124
  return this.post(this.baseURL + "/imports", _objectSpread({
16083
16125
  path: path
16084
16126
  }, options));
16085
16127
 
16086
16128
  case 3:
16087
- return _context91.abrupt("return", _context91.sent);
16129
+ return _context92.abrupt("return", _context92.sent);
16088
16130
 
16089
16131
  case 4:
16090
16132
  case "end":
16091
- return _context91.stop();
16133
+ return _context92.stop();
16092
16134
  }
16093
16135
  }
16094
- }, _callee91, this);
16136
+ }, _callee92, this);
16095
16137
  }));
16096
16138
 
16097
- function _createImport(_x129) {
16139
+ function _createImport(_x132) {
16098
16140
  return _createImport2.apply(this, arguments);
16099
16141
  }
16100
16142
 
@@ -16116,26 +16158,26 @@ var StreamChat = /*#__PURE__*/function () {
16116
16158
  }, {
16117
16159
  key: "_getImport",
16118
16160
  value: function () {
16119
- var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee92(id) {
16120
- return _regeneratorRuntime.wrap(function _callee92$(_context92) {
16161
+ var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee93(id) {
16162
+ return _regeneratorRuntime.wrap(function _callee93$(_context93) {
16121
16163
  while (1) {
16122
- switch (_context92.prev = _context92.next) {
16164
+ switch (_context93.prev = _context93.next) {
16123
16165
  case 0:
16124
- _context92.next = 2;
16166
+ _context93.next = 2;
16125
16167
  return this.get(this.baseURL + "/imports/".concat(encodeURIComponent(id)));
16126
16168
 
16127
16169
  case 2:
16128
- return _context92.abrupt("return", _context92.sent);
16170
+ return _context93.abrupt("return", _context93.sent);
16129
16171
 
16130
16172
  case 3:
16131
16173
  case "end":
16132
- return _context92.stop();
16174
+ return _context93.stop();
16133
16175
  }
16134
16176
  }
16135
- }, _callee92, this);
16177
+ }, _callee93, this);
16136
16178
  }));
16137
16179
 
16138
- function _getImport(_x130) {
16180
+ function _getImport(_x133) {
16139
16181
  return _getImport2.apply(this, arguments);
16140
16182
  }
16141
16183
 
@@ -16157,26 +16199,26 @@ var StreamChat = /*#__PURE__*/function () {
16157
16199
  }, {
16158
16200
  key: "_listImports",
16159
16201
  value: function () {
16160
- var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee93(options) {
16161
- return _regeneratorRuntime.wrap(function _callee93$(_context93) {
16202
+ var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee94(options) {
16203
+ return _regeneratorRuntime.wrap(function _callee94$(_context94) {
16162
16204
  while (1) {
16163
- switch (_context93.prev = _context93.next) {
16205
+ switch (_context94.prev = _context94.next) {
16164
16206
  case 0:
16165
- _context93.next = 2;
16207
+ _context94.next = 2;
16166
16208
  return this.get(this.baseURL + "/imports", options);
16167
16209
 
16168
16210
  case 2:
16169
- return _context93.abrupt("return", _context93.sent);
16211
+ return _context94.abrupt("return", _context94.sent);
16170
16212
 
16171
16213
  case 3:
16172
16214
  case "end":
16173
- return _context93.stop();
16215
+ return _context94.stop();
16174
16216
  }
16175
16217
  }
16176
- }, _callee93, this);
16218
+ }, _callee94, this);
16177
16219
  }));
16178
16220
 
16179
- function _listImports(_x131) {
16221
+ function _listImports(_x134) {
16180
16222
  return _listImports2.apply(this, arguments);
16181
16223
  }
16182
16224
 
@@ -16195,28 +16237,28 @@ var StreamChat = /*#__PURE__*/function () {
16195
16237
  }, {
16196
16238
  key: "upsertPushProvider",
16197
16239
  value: function () {
16198
- var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee94(pushProvider) {
16199
- return _regeneratorRuntime.wrap(function _callee94$(_context94) {
16240
+ var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee95(pushProvider) {
16241
+ return _regeneratorRuntime.wrap(function _callee95$(_context95) {
16200
16242
  while (1) {
16201
- switch (_context94.prev = _context94.next) {
16243
+ switch (_context95.prev = _context95.next) {
16202
16244
  case 0:
16203
- _context94.next = 2;
16245
+ _context95.next = 2;
16204
16246
  return this.post(this.baseURL + "/push_providers", {
16205
16247
  push_provider: pushProvider
16206
16248
  });
16207
16249
 
16208
16250
  case 2:
16209
- return _context94.abrupt("return", _context94.sent);
16251
+ return _context95.abrupt("return", _context95.sent);
16210
16252
 
16211
16253
  case 3:
16212
16254
  case "end":
16213
- return _context94.stop();
16255
+ return _context95.stop();
16214
16256
  }
16215
16257
  }
16216
- }, _callee94, this);
16258
+ }, _callee95, this);
16217
16259
  }));
16218
16260
 
16219
- function upsertPushProvider(_x132) {
16261
+ function upsertPushProvider(_x135) {
16220
16262
  return _upsertPushProvider.apply(this, arguments);
16221
16263
  }
16222
16264
 
@@ -16235,28 +16277,28 @@ var StreamChat = /*#__PURE__*/function () {
16235
16277
  }, {
16236
16278
  key: "deletePushProvider",
16237
16279
  value: function () {
16238
- var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee95(_ref10) {
16280
+ var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee96(_ref10) {
16239
16281
  var type, name;
16240
- return _regeneratorRuntime.wrap(function _callee95$(_context95) {
16282
+ return _regeneratorRuntime.wrap(function _callee96$(_context96) {
16241
16283
  while (1) {
16242
- switch (_context95.prev = _context95.next) {
16284
+ switch (_context96.prev = _context96.next) {
16243
16285
  case 0:
16244
16286
  type = _ref10.type, name = _ref10.name;
16245
- _context95.next = 3;
16287
+ _context96.next = 3;
16246
16288
  return this.delete(this.baseURL + "/push_providers/".concat(encodeURIComponent(type), "/").concat(encodeURIComponent(name)));
16247
16289
 
16248
16290
  case 3:
16249
- return _context95.abrupt("return", _context95.sent);
16291
+ return _context96.abrupt("return", _context96.sent);
16250
16292
 
16251
16293
  case 4:
16252
16294
  case "end":
16253
- return _context95.stop();
16295
+ return _context96.stop();
16254
16296
  }
16255
16297
  }
16256
- }, _callee95, this);
16298
+ }, _callee96, this);
16257
16299
  }));
16258
16300
 
16259
- function deletePushProvider(_x133) {
16301
+ function deletePushProvider(_x136) {
16260
16302
  return _deletePushProvider.apply(this, arguments);
16261
16303
  }
16262
16304
 
@@ -16273,23 +16315,23 @@ var StreamChat = /*#__PURE__*/function () {
16273
16315
  }, {
16274
16316
  key: "listPushProviders",
16275
16317
  value: function () {
16276
- var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee96() {
16277
- return _regeneratorRuntime.wrap(function _callee96$(_context96) {
16318
+ var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee97() {
16319
+ return _regeneratorRuntime.wrap(function _callee97$(_context97) {
16278
16320
  while (1) {
16279
- switch (_context96.prev = _context96.next) {
16321
+ switch (_context97.prev = _context97.next) {
16280
16322
  case 0:
16281
- _context96.next = 2;
16323
+ _context97.next = 2;
16282
16324
  return this.get(this.baseURL + "/push_providers");
16283
16325
 
16284
16326
  case 2:
16285
- return _context96.abrupt("return", _context96.sent);
16327
+ return _context97.abrupt("return", _context97.sent);
16286
16328
 
16287
16329
  case 3:
16288
16330
  case "end":
16289
- return _context96.stop();
16331
+ return _context97.stop();
16290
16332
  }
16291
16333
  }
16292
- }, _callee96, this);
16334
+ }, _callee97, this);
16293
16335
  }));
16294
16336
 
16295
16337
  function listPushProviders() {
@@ -16317,26 +16359,26 @@ var StreamChat = /*#__PURE__*/function () {
16317
16359
  }, {
16318
16360
  key: "commitMessage",
16319
16361
  value: function () {
16320
- var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee97(id) {
16321
- return _regeneratorRuntime.wrap(function _callee97$(_context97) {
16362
+ var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee98(id) {
16363
+ return _regeneratorRuntime.wrap(function _callee98$(_context98) {
16322
16364
  while (1) {
16323
- switch (_context97.prev = _context97.next) {
16365
+ switch (_context98.prev = _context98.next) {
16324
16366
  case 0:
16325
- _context97.next = 2;
16367
+ _context98.next = 2;
16326
16368
  return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(id), "/commit"));
16327
16369
 
16328
16370
  case 2:
16329
- return _context97.abrupt("return", _context97.sent);
16371
+ return _context98.abrupt("return", _context98.sent);
16330
16372
 
16331
16373
  case 3:
16332
16374
  case "end":
16333
- return _context97.stop();
16375
+ return _context98.stop();
16334
16376
  }
16335
16377
  }
16336
- }, _callee97, this);
16378
+ }, _callee98, this);
16337
16379
  }));
16338
16380
 
16339
- function commitMessage(_x134) {
16381
+ function commitMessage(_x137) {
16340
16382
  return _commitMessage.apply(this, arguments);
16341
16383
  }
16342
16384
 
@@ -16352,28 +16394,28 @@ var StreamChat = /*#__PURE__*/function () {
16352
16394
  }, {
16353
16395
  key: "createPoll",
16354
16396
  value: function () {
16355
- var _createPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee98(poll, userId) {
16356
- return _regeneratorRuntime.wrap(function _callee98$(_context98) {
16397
+ var _createPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee99(poll, userId) {
16398
+ return _regeneratorRuntime.wrap(function _callee99$(_context99) {
16357
16399
  while (1) {
16358
- switch (_context98.prev = _context98.next) {
16400
+ switch (_context99.prev = _context99.next) {
16359
16401
  case 0:
16360
- _context98.next = 2;
16402
+ _context99.next = 2;
16361
16403
  return this.post(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
16362
16404
  user_id: userId
16363
16405
  } : {}));
16364
16406
 
16365
16407
  case 2:
16366
- return _context98.abrupt("return", _context98.sent);
16408
+ return _context99.abrupt("return", _context99.sent);
16367
16409
 
16368
16410
  case 3:
16369
16411
  case "end":
16370
- return _context98.stop();
16412
+ return _context99.stop();
16371
16413
  }
16372
16414
  }
16373
- }, _callee98, this);
16415
+ }, _callee99, this);
16374
16416
  }));
16375
16417
 
16376
- function createPoll(_x135, _x136) {
16418
+ function createPoll(_x138, _x139) {
16377
16419
  return _createPoll.apply(this, arguments);
16378
16420
  }
16379
16421
 
@@ -16389,28 +16431,28 @@ var StreamChat = /*#__PURE__*/function () {
16389
16431
  }, {
16390
16432
  key: "getPoll",
16391
16433
  value: function () {
16392
- var _getPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee99(id, userId) {
16393
- return _regeneratorRuntime.wrap(function _callee99$(_context99) {
16434
+ var _getPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee100(id, userId) {
16435
+ return _regeneratorRuntime.wrap(function _callee100$(_context100) {
16394
16436
  while (1) {
16395
- switch (_context99.prev = _context99.next) {
16437
+ switch (_context100.prev = _context100.next) {
16396
16438
  case 0:
16397
- _context99.next = 2;
16439
+ _context100.next = 2;
16398
16440
  return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(id)), userId ? {
16399
16441
  user_id: userId
16400
16442
  } : {});
16401
16443
 
16402
16444
  case 2:
16403
- return _context99.abrupt("return", _context99.sent);
16445
+ return _context100.abrupt("return", _context100.sent);
16404
16446
 
16405
16447
  case 3:
16406
16448
  case "end":
16407
- return _context99.stop();
16449
+ return _context100.stop();
16408
16450
  }
16409
16451
  }
16410
- }, _callee99, this);
16452
+ }, _callee100, this);
16411
16453
  }));
16412
16454
 
16413
- function getPoll(_x137, _x138) {
16455
+ function getPoll(_x140, _x141) {
16414
16456
  return _getPoll.apply(this, arguments);
16415
16457
  }
16416
16458
 
@@ -16426,28 +16468,28 @@ var StreamChat = /*#__PURE__*/function () {
16426
16468
  }, {
16427
16469
  key: "updatePoll",
16428
16470
  value: function () {
16429
- var _updatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee100(poll, userId) {
16430
- return _regeneratorRuntime.wrap(function _callee100$(_context100) {
16471
+ var _updatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee101(poll, userId) {
16472
+ return _regeneratorRuntime.wrap(function _callee101$(_context101) {
16431
16473
  while (1) {
16432
- switch (_context100.prev = _context100.next) {
16474
+ switch (_context101.prev = _context101.next) {
16433
16475
  case 0:
16434
- _context100.next = 2;
16476
+ _context101.next = 2;
16435
16477
  return this.put(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
16436
16478
  user_id: userId
16437
16479
  } : {}));
16438
16480
 
16439
16481
  case 2:
16440
- return _context100.abrupt("return", _context100.sent);
16482
+ return _context101.abrupt("return", _context101.sent);
16441
16483
 
16442
16484
  case 3:
16443
16485
  case "end":
16444
- return _context100.stop();
16486
+ return _context101.stop();
16445
16487
  }
16446
16488
  }
16447
- }, _callee100, this);
16489
+ }, _callee101, this);
16448
16490
  }));
16449
16491
 
16450
- function updatePoll(_x139, _x140) {
16492
+ function updatePoll(_x142, _x143) {
16451
16493
  return _updatePoll.apply(this, arguments);
16452
16494
  }
16453
16495
 
@@ -16465,28 +16507,28 @@ var StreamChat = /*#__PURE__*/function () {
16465
16507
  }, {
16466
16508
  key: "partialUpdatePoll",
16467
16509
  value: function () {
16468
- var _partialUpdatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee101(id, partialPollObject, userId) {
16469
- return _regeneratorRuntime.wrap(function _callee101$(_context101) {
16510
+ var _partialUpdatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee102(id, partialPollObject, userId) {
16511
+ return _regeneratorRuntime.wrap(function _callee102$(_context102) {
16470
16512
  while (1) {
16471
- switch (_context101.prev = _context101.next) {
16513
+ switch (_context102.prev = _context102.next) {
16472
16514
  case 0:
16473
- _context101.next = 2;
16515
+ _context102.next = 2;
16474
16516
  return this.patch(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread({}, partialPollObject), userId ? {
16475
16517
  user_id: userId
16476
16518
  } : {}));
16477
16519
 
16478
16520
  case 2:
16479
- return _context101.abrupt("return", _context101.sent);
16521
+ return _context102.abrupt("return", _context102.sent);
16480
16522
 
16481
16523
  case 3:
16482
16524
  case "end":
16483
- return _context101.stop();
16525
+ return _context102.stop();
16484
16526
  }
16485
16527
  }
16486
- }, _callee101, this);
16528
+ }, _callee102, this);
16487
16529
  }));
16488
16530
 
16489
- function partialUpdatePoll(_x141, _x142, _x143) {
16531
+ function partialUpdatePoll(_x144, _x145, _x146) {
16490
16532
  return _partialUpdatePoll.apply(this, arguments);
16491
16533
  }
16492
16534
 
@@ -16502,28 +16544,28 @@ var StreamChat = /*#__PURE__*/function () {
16502
16544
  }, {
16503
16545
  key: "deletePoll",
16504
16546
  value: function () {
16505
- var _deletePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee102(id, userId) {
16506
- return _regeneratorRuntime.wrap(function _callee102$(_context102) {
16547
+ var _deletePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee103(id, userId) {
16548
+ return _regeneratorRuntime.wrap(function _callee103$(_context103) {
16507
16549
  while (1) {
16508
- switch (_context102.prev = _context102.next) {
16550
+ switch (_context103.prev = _context103.next) {
16509
16551
  case 0:
16510
- _context102.next = 2;
16552
+ _context103.next = 2;
16511
16553
  return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread({}, userId ? {
16512
16554
  user_id: userId
16513
16555
  } : {}));
16514
16556
 
16515
16557
  case 2:
16516
- return _context102.abrupt("return", _context102.sent);
16558
+ return _context103.abrupt("return", _context103.sent);
16517
16559
 
16518
16560
  case 3:
16519
16561
  case "end":
16520
- return _context102.stop();
16562
+ return _context103.stop();
16521
16563
  }
16522
16564
  }
16523
- }, _callee102, this);
16565
+ }, _callee103, this);
16524
16566
  }));
16525
16567
 
16526
- function deletePoll(_x144, _x145) {
16568
+ function deletePoll(_x147, _x148) {
16527
16569
  return _deletePoll.apply(this, arguments);
16528
16570
  }
16529
16571
 
@@ -16539,12 +16581,12 @@ var StreamChat = /*#__PURE__*/function () {
16539
16581
  }, {
16540
16582
  key: "closePoll",
16541
16583
  value: function () {
16542
- var _closePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee103(id, userId) {
16543
- return _regeneratorRuntime.wrap(function _callee103$(_context103) {
16584
+ var _closePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee104(id, userId) {
16585
+ return _regeneratorRuntime.wrap(function _callee104$(_context104) {
16544
16586
  while (1) {
16545
- switch (_context103.prev = _context103.next) {
16587
+ switch (_context104.prev = _context104.next) {
16546
16588
  case 0:
16547
- return _context103.abrupt("return", this.partialUpdatePoll(id, {
16589
+ return _context104.abrupt("return", this.partialUpdatePoll(id, {
16548
16590
  set: {
16549
16591
  is_closed: true
16550
16592
  }
@@ -16552,13 +16594,13 @@ var StreamChat = /*#__PURE__*/function () {
16552
16594
 
16553
16595
  case 1:
16554
16596
  case "end":
16555
- return _context103.stop();
16597
+ return _context104.stop();
16556
16598
  }
16557
16599
  }
16558
- }, _callee103, this);
16600
+ }, _callee104, this);
16559
16601
  }));
16560
16602
 
16561
- function closePoll(_x146, _x147) {
16603
+ function closePoll(_x149, _x150) {
16562
16604
  return _closePoll.apply(this, arguments);
16563
16605
  }
16564
16606
 
@@ -16575,28 +16617,28 @@ var StreamChat = /*#__PURE__*/function () {
16575
16617
  }, {
16576
16618
  key: "createPollOption",
16577
16619
  value: function () {
16578
- var _createPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee104(pollId, option, userId) {
16579
- return _regeneratorRuntime.wrap(function _callee104$(_context104) {
16620
+ var _createPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee105(pollId, option, userId) {
16621
+ return _regeneratorRuntime.wrap(function _callee105$(_context105) {
16580
16622
  while (1) {
16581
- switch (_context104.prev = _context104.next) {
16623
+ switch (_context105.prev = _context105.next) {
16582
16624
  case 0:
16583
- _context104.next = 2;
16625
+ _context105.next = 2;
16584
16626
  return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
16585
16627
  user_id: userId
16586
16628
  } : {}));
16587
16629
 
16588
16630
  case 2:
16589
- return _context104.abrupt("return", _context104.sent);
16631
+ return _context105.abrupt("return", _context105.sent);
16590
16632
 
16591
16633
  case 3:
16592
16634
  case "end":
16593
- return _context104.stop();
16635
+ return _context105.stop();
16594
16636
  }
16595
16637
  }
16596
- }, _callee104, this);
16638
+ }, _callee105, this);
16597
16639
  }));
16598
16640
 
16599
- function createPollOption(_x148, _x149, _x150) {
16641
+ function createPollOption(_x151, _x152, _x153) {
16600
16642
  return _createPollOption.apply(this, arguments);
16601
16643
  }
16602
16644
 
@@ -16613,28 +16655,28 @@ var StreamChat = /*#__PURE__*/function () {
16613
16655
  }, {
16614
16656
  key: "getPollOption",
16615
16657
  value: function () {
16616
- var _getPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee105(pollId, optionId, userId) {
16617
- return _regeneratorRuntime.wrap(function _callee105$(_context105) {
16658
+ var _getPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee106(pollId, optionId, userId) {
16659
+ return _regeneratorRuntime.wrap(function _callee106$(_context106) {
16618
16660
  while (1) {
16619
- switch (_context105.prev = _context105.next) {
16661
+ switch (_context106.prev = _context106.next) {
16620
16662
  case 0:
16621
- _context105.next = 2;
16663
+ _context106.next = 2;
16622
16664
  return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
16623
16665
  user_id: userId
16624
16666
  } : {});
16625
16667
 
16626
16668
  case 2:
16627
- return _context105.abrupt("return", _context105.sent);
16669
+ return _context106.abrupt("return", _context106.sent);
16628
16670
 
16629
16671
  case 3:
16630
16672
  case "end":
16631
- return _context105.stop();
16673
+ return _context106.stop();
16632
16674
  }
16633
16675
  }
16634
- }, _callee105, this);
16676
+ }, _callee106, this);
16635
16677
  }));
16636
16678
 
16637
- function getPollOption(_x151, _x152, _x153) {
16679
+ function getPollOption(_x154, _x155, _x156) {
16638
16680
  return _getPollOption.apply(this, arguments);
16639
16681
  }
16640
16682
 
@@ -16651,28 +16693,28 @@ var StreamChat = /*#__PURE__*/function () {
16651
16693
  }, {
16652
16694
  key: "updatePollOption",
16653
16695
  value: function () {
16654
- var _updatePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee106(pollId, option, userId) {
16655
- return _regeneratorRuntime.wrap(function _callee106$(_context106) {
16696
+ var _updatePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee107(pollId, option, userId) {
16697
+ return _regeneratorRuntime.wrap(function _callee107$(_context107) {
16656
16698
  while (1) {
16657
- switch (_context106.prev = _context106.next) {
16699
+ switch (_context107.prev = _context107.next) {
16658
16700
  case 0:
16659
- _context106.next = 2;
16701
+ _context107.next = 2;
16660
16702
  return this.put(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
16661
16703
  user_id: userId
16662
16704
  } : {}));
16663
16705
 
16664
16706
  case 2:
16665
- return _context106.abrupt("return", _context106.sent);
16707
+ return _context107.abrupt("return", _context107.sent);
16666
16708
 
16667
16709
  case 3:
16668
16710
  case "end":
16669
- return _context106.stop();
16711
+ return _context107.stop();
16670
16712
  }
16671
16713
  }
16672
- }, _callee106, this);
16714
+ }, _callee107, this);
16673
16715
  }));
16674
16716
 
16675
- function updatePollOption(_x154, _x155, _x156) {
16717
+ function updatePollOption(_x157, _x158, _x159) {
16676
16718
  return _updatePollOption.apply(this, arguments);
16677
16719
  }
16678
16720
 
@@ -16689,28 +16731,28 @@ var StreamChat = /*#__PURE__*/function () {
16689
16731
  }, {
16690
16732
  key: "deletePollOption",
16691
16733
  value: function () {
16692
- var _deletePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee107(pollId, optionId, userId) {
16693
- return _regeneratorRuntime.wrap(function _callee107$(_context107) {
16734
+ var _deletePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee108(pollId, optionId, userId) {
16735
+ return _regeneratorRuntime.wrap(function _callee108$(_context108) {
16694
16736
  while (1) {
16695
- switch (_context107.prev = _context107.next) {
16737
+ switch (_context108.prev = _context108.next) {
16696
16738
  case 0:
16697
- _context107.next = 2;
16739
+ _context108.next = 2;
16698
16740
  return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
16699
16741
  user_id: userId
16700
16742
  } : {});
16701
16743
 
16702
16744
  case 2:
16703
- return _context107.abrupt("return", _context107.sent);
16745
+ return _context108.abrupt("return", _context108.sent);
16704
16746
 
16705
16747
  case 3:
16706
16748
  case "end":
16707
- return _context107.stop();
16749
+ return _context108.stop();
16708
16750
  }
16709
16751
  }
16710
- }, _callee107, this);
16752
+ }, _callee108, this);
16711
16753
  }));
16712
16754
 
16713
- function deletePollOption(_x157, _x158, _x159) {
16755
+ function deletePollOption(_x160, _x161, _x162) {
16714
16756
  return _deletePollOption.apply(this, arguments);
16715
16757
  }
16716
16758
 
@@ -16728,12 +16770,12 @@ var StreamChat = /*#__PURE__*/function () {
16728
16770
  }, {
16729
16771
  key: "castPollVote",
16730
16772
  value: function () {
16731
- var _castPollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee108(messageId, pollId, vote, userId) {
16732
- return _regeneratorRuntime.wrap(function _callee108$(_context108) {
16773
+ var _castPollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee109(messageId, pollId, vote, userId) {
16774
+ return _regeneratorRuntime.wrap(function _callee109$(_context109) {
16733
16775
  while (1) {
16734
- switch (_context108.prev = _context108.next) {
16776
+ switch (_context109.prev = _context109.next) {
16735
16777
  case 0:
16736
- _context108.next = 2;
16778
+ _context109.next = 2;
16737
16779
  return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote"), _objectSpread({
16738
16780
  vote: vote
16739
16781
  }, userId ? {
@@ -16741,17 +16783,17 @@ var StreamChat = /*#__PURE__*/function () {
16741
16783
  } : {}));
16742
16784
 
16743
16785
  case 2:
16744
- return _context108.abrupt("return", _context108.sent);
16786
+ return _context109.abrupt("return", _context109.sent);
16745
16787
 
16746
16788
  case 3:
16747
16789
  case "end":
16748
- return _context108.stop();
16790
+ return _context109.stop();
16749
16791
  }
16750
16792
  }
16751
- }, _callee108, this);
16793
+ }, _callee109, this);
16752
16794
  }));
16753
16795
 
16754
- function castPollVote(_x160, _x161, _x162, _x163) {
16796
+ function castPollVote(_x163, _x164, _x165, _x166) {
16755
16797
  return _castPollVote.apply(this, arguments);
16756
16798
  }
16757
16799
 
@@ -16768,24 +16810,24 @@ var StreamChat = /*#__PURE__*/function () {
16768
16810
  }, {
16769
16811
  key: "addPollAnswer",
16770
16812
  value: function () {
16771
- var _addPollAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee109(messageId, pollId, answerText, userId) {
16772
- return _regeneratorRuntime.wrap(function _callee109$(_context109) {
16813
+ var _addPollAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee110(messageId, pollId, answerText, userId) {
16814
+ return _regeneratorRuntime.wrap(function _callee110$(_context110) {
16773
16815
  while (1) {
16774
- switch (_context109.prev = _context109.next) {
16816
+ switch (_context110.prev = _context110.next) {
16775
16817
  case 0:
16776
- return _context109.abrupt("return", this.castPollVote(messageId, pollId, {
16818
+ return _context110.abrupt("return", this.castPollVote(messageId, pollId, {
16777
16819
  answer_text: answerText
16778
16820
  }, userId));
16779
16821
 
16780
16822
  case 1:
16781
16823
  case "end":
16782
- return _context109.stop();
16824
+ return _context110.stop();
16783
16825
  }
16784
16826
  }
16785
- }, _callee109, this);
16827
+ }, _callee110, this);
16786
16828
  }));
16787
16829
 
16788
- function addPollAnswer(_x164, _x165, _x166, _x167) {
16830
+ function addPollAnswer(_x167, _x168, _x169, _x170) {
16789
16831
  return _addPollAnswer.apply(this, arguments);
16790
16832
  }
16791
16833
 
@@ -16794,28 +16836,28 @@ var StreamChat = /*#__PURE__*/function () {
16794
16836
  }, {
16795
16837
  key: "removePollVote",
16796
16838
  value: function () {
16797
- var _removePollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee110(messageId, pollId, voteId, userId) {
16798
- return _regeneratorRuntime.wrap(function _callee110$(_context110) {
16839
+ var _removePollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee111(messageId, pollId, voteId, userId) {
16840
+ return _regeneratorRuntime.wrap(function _callee111$(_context111) {
16799
16841
  while (1) {
16800
- switch (_context110.prev = _context110.next) {
16842
+ switch (_context111.prev = _context111.next) {
16801
16843
  case 0:
16802
- _context110.next = 2;
16844
+ _context111.next = 2;
16803
16845
  return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote/").concat(encodeURIComponent(voteId)), _objectSpread({}, userId ? {
16804
16846
  user_id: userId
16805
16847
  } : {}));
16806
16848
 
16807
16849
  case 2:
16808
- return _context110.abrupt("return", _context110.sent);
16850
+ return _context111.abrupt("return", _context111.sent);
16809
16851
 
16810
16852
  case 3:
16811
16853
  case "end":
16812
- return _context110.stop();
16854
+ return _context111.stop();
16813
16855
  }
16814
16856
  }
16815
- }, _callee110, this);
16857
+ }, _callee111, this);
16816
16858
  }));
16817
16859
 
16818
- function removePollVote(_x168, _x169, _x170, _x171) {
16860
+ function removePollVote(_x171, _x172, _x173, _x174) {
16819
16861
  return _removePollVote.apply(this, arguments);
16820
16862
  }
16821
16863
 
@@ -16833,37 +16875,37 @@ var StreamChat = /*#__PURE__*/function () {
16833
16875
  }, {
16834
16876
  key: "queryPolls",
16835
16877
  value: function () {
16836
- var _queryPolls = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee111() {
16878
+ var _queryPolls = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee112() {
16837
16879
  var filter,
16838
16880
  sort,
16839
16881
  options,
16840
16882
  userId,
16841
16883
  q,
16842
- _args111 = arguments;
16843
- return _regeneratorRuntime.wrap(function _callee111$(_context111) {
16884
+ _args112 = arguments;
16885
+ return _regeneratorRuntime.wrap(function _callee112$(_context112) {
16844
16886
  while (1) {
16845
- switch (_context111.prev = _context111.next) {
16887
+ switch (_context112.prev = _context112.next) {
16846
16888
  case 0:
16847
- filter = _args111.length > 0 && _args111[0] !== undefined ? _args111[0] : {};
16848
- sort = _args111.length > 1 && _args111[1] !== undefined ? _args111[1] : [];
16849
- options = _args111.length > 2 && _args111[2] !== undefined ? _args111[2] : {};
16850
- userId = _args111.length > 3 ? _args111[3] : undefined;
16889
+ filter = _args112.length > 0 && _args112[0] !== undefined ? _args112[0] : {};
16890
+ sort = _args112.length > 1 && _args112[1] !== undefined ? _args112[1] : [];
16891
+ options = _args112.length > 2 && _args112[2] !== undefined ? _args112[2] : {};
16892
+ userId = _args112.length > 3 ? _args112[3] : undefined;
16851
16893
  q = userId ? "?user_id=".concat(userId) : '';
16852
- _context111.next = 7;
16894
+ _context112.next = 7;
16853
16895
  return this.post(this.baseURL + "/polls/query".concat(q), _objectSpread({
16854
16896
  filter: filter,
16855
16897
  sort: normalizeQuerySort(sort)
16856
16898
  }, options));
16857
16899
 
16858
16900
  case 7:
16859
- return _context111.abrupt("return", _context111.sent);
16901
+ return _context112.abrupt("return", _context112.sent);
16860
16902
 
16861
16903
  case 8:
16862
16904
  case "end":
16863
- return _context111.stop();
16905
+ return _context112.stop();
16864
16906
  }
16865
16907
  }
16866
- }, _callee111, this);
16908
+ }, _callee112, this);
16867
16909
  }));
16868
16910
 
16869
16911
  function queryPolls() {
@@ -16885,40 +16927,40 @@ var StreamChat = /*#__PURE__*/function () {
16885
16927
  }, {
16886
16928
  key: "queryPollVotes",
16887
16929
  value: function () {
16888
- var _queryPollVotes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee112(pollId) {
16930
+ var _queryPollVotes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee113(pollId) {
16889
16931
  var filter,
16890
16932
  sort,
16891
16933
  options,
16892
16934
  userId,
16893
16935
  q,
16894
- _args112 = arguments;
16895
- return _regeneratorRuntime.wrap(function _callee112$(_context112) {
16936
+ _args113 = arguments;
16937
+ return _regeneratorRuntime.wrap(function _callee113$(_context113) {
16896
16938
  while (1) {
16897
- switch (_context112.prev = _context112.next) {
16939
+ switch (_context113.prev = _context113.next) {
16898
16940
  case 0:
16899
- filter = _args112.length > 1 && _args112[1] !== undefined ? _args112[1] : {};
16900
- sort = _args112.length > 2 && _args112[2] !== undefined ? _args112[2] : [];
16901
- options = _args112.length > 3 && _args112[3] !== undefined ? _args112[3] : {};
16902
- userId = _args112.length > 4 ? _args112[4] : undefined;
16941
+ filter = _args113.length > 1 && _args113[1] !== undefined ? _args113[1] : {};
16942
+ sort = _args113.length > 2 && _args113[2] !== undefined ? _args113[2] : [];
16943
+ options = _args113.length > 3 && _args113[3] !== undefined ? _args113[3] : {};
16944
+ userId = _args113.length > 4 ? _args113[4] : undefined;
16903
16945
  q = userId ? "?user_id=".concat(userId) : '';
16904
- _context112.next = 7;
16946
+ _context113.next = 7;
16905
16947
  return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
16906
16948
  filter: filter,
16907
16949
  sort: normalizeQuerySort(sort)
16908
16950
  }, options));
16909
16951
 
16910
16952
  case 7:
16911
- return _context112.abrupt("return", _context112.sent);
16953
+ return _context113.abrupt("return", _context113.sent);
16912
16954
 
16913
16955
  case 8:
16914
16956
  case "end":
16915
- return _context112.stop();
16957
+ return _context113.stop();
16916
16958
  }
16917
16959
  }
16918
- }, _callee112, this);
16960
+ }, _callee113, this);
16919
16961
  }));
16920
16962
 
16921
- function queryPollVotes(_x172) {
16963
+ function queryPollVotes(_x175) {
16922
16964
  return _queryPollVotes.apply(this, arguments);
16923
16965
  }
16924
16966
 
@@ -16937,23 +16979,23 @@ var StreamChat = /*#__PURE__*/function () {
16937
16979
  }, {
16938
16980
  key: "queryPollAnswers",
16939
16981
  value: function () {
16940
- var _queryPollAnswers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee113(pollId) {
16982
+ var _queryPollAnswers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee114(pollId) {
16941
16983
  var filter,
16942
16984
  sort,
16943
16985
  options,
16944
16986
  userId,
16945
16987
  q,
16946
- _args113 = arguments;
16947
- return _regeneratorRuntime.wrap(function _callee113$(_context113) {
16988
+ _args114 = arguments;
16989
+ return _regeneratorRuntime.wrap(function _callee114$(_context114) {
16948
16990
  while (1) {
16949
- switch (_context113.prev = _context113.next) {
16991
+ switch (_context114.prev = _context114.next) {
16950
16992
  case 0:
16951
- filter = _args113.length > 1 && _args113[1] !== undefined ? _args113[1] : {};
16952
- sort = _args113.length > 2 && _args113[2] !== undefined ? _args113[2] : [];
16953
- options = _args113.length > 3 && _args113[3] !== undefined ? _args113[3] : {};
16954
- userId = _args113.length > 4 ? _args113[4] : undefined;
16993
+ filter = _args114.length > 1 && _args114[1] !== undefined ? _args114[1] : {};
16994
+ sort = _args114.length > 2 && _args114[2] !== undefined ? _args114[2] : [];
16995
+ options = _args114.length > 3 && _args114[3] !== undefined ? _args114[3] : {};
16996
+ userId = _args114.length > 4 ? _args114[4] : undefined;
16955
16997
  q = userId ? "?user_id=".concat(userId) : '';
16956
- _context113.next = 7;
16998
+ _context114.next = 7;
16957
16999
  return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
16958
17000
  filter: _objectSpread(_objectSpread({}, filter), {}, {
16959
17001
  is_answer: true
@@ -16962,17 +17004,17 @@ var StreamChat = /*#__PURE__*/function () {
16962
17004
  }, options));
16963
17005
 
16964
17006
  case 7:
16965
- return _context113.abrupt("return", _context113.sent);
17007
+ return _context114.abrupt("return", _context114.sent);
16966
17008
 
16967
17009
  case 8:
16968
17010
  case "end":
16969
- return _context113.stop();
17011
+ return _context114.stop();
16970
17012
  }
16971
17013
  }
16972
- }, _callee113, this);
17014
+ }, _callee114, this);
16973
17015
  }));
16974
17016
 
16975
- function queryPollAnswers(_x173) {
17017
+ function queryPollAnswers(_x176) {
16976
17018
  return _queryPollAnswers.apply(this, arguments);
16977
17019
  }
16978
17020
 
@@ -16989,33 +17031,33 @@ var StreamChat = /*#__PURE__*/function () {
16989
17031
  }, {
16990
17032
  key: "queryMessageHistory",
16991
17033
  value: function () {
16992
- var _queryMessageHistory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee114() {
17034
+ var _queryMessageHistory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee115() {
16993
17035
  var filter,
16994
17036
  sort,
16995
17037
  options,
16996
- _args114 = arguments;
16997
- return _regeneratorRuntime.wrap(function _callee114$(_context114) {
17038
+ _args115 = arguments;
17039
+ return _regeneratorRuntime.wrap(function _callee115$(_context115) {
16998
17040
  while (1) {
16999
- switch (_context114.prev = _context114.next) {
17041
+ switch (_context115.prev = _context115.next) {
17000
17042
  case 0:
17001
- filter = _args114.length > 0 && _args114[0] !== undefined ? _args114[0] : {};
17002
- sort = _args114.length > 1 && _args114[1] !== undefined ? _args114[1] : [];
17003
- options = _args114.length > 2 && _args114[2] !== undefined ? _args114[2] : {};
17004
- _context114.next = 5;
17043
+ filter = _args115.length > 0 && _args115[0] !== undefined ? _args115[0] : {};
17044
+ sort = _args115.length > 1 && _args115[1] !== undefined ? _args115[1] : [];
17045
+ options = _args115.length > 2 && _args115[2] !== undefined ? _args115[2] : {};
17046
+ _context115.next = 5;
17005
17047
  return this.post(this.baseURL + '/messages/history', _objectSpread({
17006
17048
  filter: filter,
17007
17049
  sort: normalizeQuerySort(sort)
17008
17050
  }, options));
17009
17051
 
17010
17052
  case 5:
17011
- return _context114.abrupt("return", _context114.sent);
17053
+ return _context115.abrupt("return", _context115.sent);
17012
17054
 
17013
17055
  case 6:
17014
17056
  case "end":
17015
- return _context114.stop();
17057
+ return _context115.stop();
17016
17058
  }
17017
17059
  }
17018
- }, _callee114, this);
17060
+ }, _callee115, this);
17019
17061
  }));
17020
17062
 
17021
17063
  function queryMessageHistory() {
@@ -17036,32 +17078,32 @@ var StreamChat = /*#__PURE__*/function () {
17036
17078
  }, {
17037
17079
  key: "updateFlags",
17038
17080
  value: function () {
17039
- var _updateFlags = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee115(message_ids, reviewed_by) {
17081
+ var _updateFlags = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee116(message_ids, reviewed_by) {
17040
17082
  var options,
17041
- _args115 = arguments;
17042
- return _regeneratorRuntime.wrap(function _callee115$(_context115) {
17083
+ _args116 = arguments;
17084
+ return _regeneratorRuntime.wrap(function _callee116$(_context116) {
17043
17085
  while (1) {
17044
- switch (_context115.prev = _context115.next) {
17086
+ switch (_context116.prev = _context116.next) {
17045
17087
  case 0:
17046
- options = _args115.length > 2 && _args115[2] !== undefined ? _args115[2] : {};
17047
- _context115.next = 3;
17088
+ options = _args116.length > 2 && _args116[2] !== undefined ? _args116[2] : {};
17089
+ _context116.next = 3;
17048
17090
  return this.post(this.baseURL + '/automod/v1/moderation/update_flags', _objectSpread({
17049
17091
  message_ids: message_ids,
17050
17092
  reviewed_by: reviewed_by
17051
17093
  }, options));
17052
17094
 
17053
17095
  case 3:
17054
- return _context115.abrupt("return", _context115.sent);
17096
+ return _context116.abrupt("return", _context116.sent);
17055
17097
 
17056
17098
  case 4:
17057
17099
  case "end":
17058
- return _context115.stop();
17100
+ return _context116.stop();
17059
17101
  }
17060
17102
  }
17061
- }, _callee115, this);
17103
+ }, _callee116, this);
17062
17104
  }));
17063
17105
 
17064
- function updateFlags(_x174, _x175) {
17106
+ function updateFlags(_x177, _x178) {
17065
17107
  return _updateFlags.apply(this, arguments);
17066
17108
  }
17067
17109