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