stream-chat 5.2.0 → 5.3.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.
@@ -3193,7 +3193,8 @@ var Channel = /*#__PURE__*/function () {
3193
3193
  channelState.read[event.user.id] = {
3194
3194
  // because in client.ts the handleEvent call that flows to this sets this `event.received_at = new Date();`
3195
3195
  last_read: event.received_at,
3196
- user: event.user
3196
+ user: event.user,
3197
+ unread_messages: 0
3197
3198
  };
3198
3199
 
3199
3200
  if (((_event$user4 = event.user) === null || _event$user4 === void 0 ? void 0 : _event$user4.id) === ((_this$getClient$user = this.getClient().user) === null || _this$getClient$user === void 0 ? void 0 : _this$getClient$user.id)) {
@@ -3250,7 +3251,8 @@ var Channel = /*#__PURE__*/function () {
3250
3251
  channelState.unreadCount = 0;
3251
3252
  channelState.read[event.user.id] = {
3252
3253
  last_read: new Date(event.created_at),
3253
- user: event.user
3254
+ user: event.user,
3255
+ unread_messages: 0
3254
3256
  };
3255
3257
  } else if (this._countMessageAsUnread(event.message)) {
3256
3258
  channelState.unreadCount = channelState.unreadCount + 1;
@@ -3429,7 +3431,8 @@ var Channel = /*#__PURE__*/function () {
3429
3431
  if (user) {
3430
3432
  this.state.read[user.id] = {
3431
3433
  user: user,
3432
- last_read: last_read
3434
+ last_read: last_read,
3435
+ unread_messages: 0
3433
3436
  };
3434
3437
  }
3435
3438
  } // apply read state if part of the state
@@ -3441,16 +3444,17 @@ var Channel = /*#__PURE__*/function () {
3441
3444
 
3442
3445
  try {
3443
3446
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
3444
- var read = _step3.value;
3445
-
3446
- var parsedRead = _objectSpread$5(_objectSpread$5({}, read), {}, {
3447
- last_read: new Date(read.last_read)
3448
- });
3447
+ var _read$unread_messages;
3449
3448
 
3450
- this.state.read[read.user.id] = parsedRead;
3449
+ var read = _step3.value;
3450
+ this.state.read[read.user.id] = {
3451
+ last_read: new Date(read.last_read),
3452
+ unread_messages: (_read$unread_messages = read.unread_messages) !== null && _read$unread_messages !== void 0 ? _read$unread_messages : 0,
3453
+ user: read.user
3454
+ };
3451
3455
 
3452
- if (read.user.id === (user === null || user === void 0 ? void 0 : user.id) && typeof parsedRead.unread_messages === 'number') {
3453
- this.state.unreadCount = parsedRead.unread_messages;
3456
+ if (read.user.id === (user === null || user === void 0 ? void 0 : user.id)) {
3457
+ this.state.unreadCount = this.state.read[read.user.id].unread_messages;
3454
3458
  }
3455
3459
  }
3456
3460
  } catch (err) {
@@ -6566,7 +6570,6 @@ var StreamChat = /*#__PURE__*/function () {
6566
6570
  apnTemplate: '{}', //if app doesn't have apn configured it will error
6567
6571
  firebaseTemplate: '{}', //if app doesn't have firebase configured it will error
6568
6572
  firebaseDataTemplate: '{}', //if app doesn't have firebase configured it will error
6569
- huaweiDataTemplate: '{}' //if app doesn't have huawei configured it will error
6570
6573
  skipDevices: true, // skip config/device checks and sending to real devices
6571
6574
  }
6572
6575
  */
@@ -6583,7 +6586,7 @@ var StreamChat = /*#__PURE__*/function () {
6583
6586
  case 0:
6584
6587
  data = _args12.length > 1 && _args12[1] !== undefined ? _args12[1] : {};
6585
6588
  _context12.next = 3;
6586
- return this.post(this.baseURL + '/check_push', _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
6589
+ return this.post(this.baseURL + '/check_push', _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
6587
6590
  user_id: userID
6588
6591
  }, data.messageID ? {
6589
6592
  message_id: data.messageID
@@ -6593,8 +6596,6 @@ var StreamChat = /*#__PURE__*/function () {
6593
6596
  firebase_template: data.firebaseTemplate
6594
6597
  } : {}), data.firebaseDataTemplate ? {
6595
6598
  firebase_data_template: data.firebaseDataTemplate
6596
- } : {}), data.huaweiDataTemplate ? {
6597
- huawei_data_template: data.huaweiDataTemplate
6598
6599
  } : {}), data.skipDevices ? {
6599
6600
  skip_devices: true
6600
6601
  } : {}));
@@ -8539,6 +8540,7 @@ var StreamChat = /*#__PURE__*/function () {
8539
8540
  * It is present for internal usage only.
8540
8541
  * This function can, and will, break and/or be removed at any point in time.
8541
8542
  *
8543
+ * @private
8542
8544
  * @param {FlagReportsFilters} filterConditions MongoDB style filter conditions
8543
8545
  * @param {FlagReportsPaginationOptions} options Option object, {limit: 10, offset:0}
8544
8546
  *
@@ -8587,6 +8589,7 @@ var StreamChat = /*#__PURE__*/function () {
8587
8589
  * It is present for internal usage only.
8588
8590
  * This function can, and will, break and/or be removed at any point in time.
8589
8591
  *
8592
+ * @private
8590
8593
  * @param {string} [id] flag report to review
8591
8594
  * @param {string} [reviewResult] flag report review result
8592
8595
  * @param {string} [options.user_id] currentUserID, only used with serverside auth
@@ -8627,6 +8630,52 @@ var StreamChat = /*#__PURE__*/function () {
8627
8630
 
8628
8631
  return _reviewFlagReport;
8629
8632
  }()
8633
+ /**
8634
+ * _unblockMessage - unblocks message blocked by automod
8635
+ *
8636
+ * Note: Do not use this.
8637
+ * It is present for internal usage only.
8638
+ * This function can, and will, break and/or be removed at any point in time.
8639
+ *
8640
+ * @private
8641
+ * @param {string} targetMessageID
8642
+ * @param {string} [options.user_id] currentUserID, only used with serverside auth
8643
+ * @returns {Promise<APIResponse>}
8644
+ */
8645
+
8646
+ }, {
8647
+ key: "_unblockMessage",
8648
+ value: function () {
8649
+ var _unblockMessage2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(targetMessageID) {
8650
+ var options,
8651
+ _args44 = arguments;
8652
+ return _regeneratorRuntime.wrap(function _callee44$(_context44) {
8653
+ while (1) {
8654
+ switch (_context44.prev = _context44.next) {
8655
+ case 0:
8656
+ options = _args44.length > 1 && _args44[1] !== undefined ? _args44[1] : {};
8657
+ _context44.next = 3;
8658
+ return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
8659
+ target_message_id: targetMessageID
8660
+ }, options));
8661
+
8662
+ case 3:
8663
+ return _context44.abrupt("return", _context44.sent);
8664
+
8665
+ case 4:
8666
+ case "end":
8667
+ return _context44.stop();
8668
+ }
8669
+ }
8670
+ }, _callee44, this);
8671
+ }));
8672
+
8673
+ function _unblockMessage(_x56) {
8674
+ return _unblockMessage2.apply(this, arguments);
8675
+ }
8676
+
8677
+ return _unblockMessage;
8678
+ }()
8630
8679
  /**
8631
8680
  * @deprecated use markChannelsRead instead
8632
8681
  *
@@ -8648,23 +8697,23 @@ var StreamChat = /*#__PURE__*/function () {
8648
8697
  * @return {Promise<APIResponse>}
8649
8698
  */
8650
8699
  function () {
8651
- var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44() {
8700
+ var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45() {
8652
8701
  var data,
8653
- _args44 = arguments;
8654
- return _regeneratorRuntime.wrap(function _callee44$(_context44) {
8702
+ _args45 = arguments;
8703
+ return _regeneratorRuntime.wrap(function _callee45$(_context45) {
8655
8704
  while (1) {
8656
- switch (_context44.prev = _context44.next) {
8705
+ switch (_context45.prev = _context45.next) {
8657
8706
  case 0:
8658
- data = _args44.length > 0 && _args44[0] !== undefined ? _args44[0] : {};
8659
- _context44.next = 3;
8707
+ data = _args45.length > 0 && _args45[0] !== undefined ? _args45[0] : {};
8708
+ _context45.next = 3;
8660
8709
  return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
8661
8710
 
8662
8711
  case 3:
8663
8712
  case "end":
8664
- return _context44.stop();
8713
+ return _context45.stop();
8665
8714
  }
8666
8715
  }
8667
- }, _callee44, this);
8716
+ }, _callee45, this);
8668
8717
  }));
8669
8718
 
8670
8719
  function markChannelsRead() {
@@ -8739,28 +8788,28 @@ var StreamChat = /*#__PURE__*/function () {
8739
8788
  }, {
8740
8789
  key: "translateMessage",
8741
8790
  value: function () {
8742
- var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(messageId, language) {
8743
- return _regeneratorRuntime.wrap(function _callee45$(_context45) {
8791
+ var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(messageId, language) {
8792
+ return _regeneratorRuntime.wrap(function _callee46$(_context46) {
8744
8793
  while (1) {
8745
- switch (_context45.prev = _context45.next) {
8794
+ switch (_context46.prev = _context46.next) {
8746
8795
  case 0:
8747
- _context45.next = 2;
8796
+ _context46.next = 2;
8748
8797
  return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
8749
8798
  language: language
8750
8799
  });
8751
8800
 
8752
8801
  case 2:
8753
- return _context45.abrupt("return", _context45.sent);
8802
+ return _context46.abrupt("return", _context46.sent);
8754
8803
 
8755
8804
  case 3:
8756
8805
  case "end":
8757
- return _context45.stop();
8806
+ return _context46.stop();
8758
8807
  }
8759
8808
  }
8760
- }, _callee45, this);
8809
+ }, _callee46, this);
8761
8810
  }));
8762
8811
 
8763
- function translateMessage(_x56, _x57) {
8812
+ function translateMessage(_x57, _x58) {
8764
8813
  return _translateMessage.apply(this, arguments);
8765
8814
  }
8766
8815
 
@@ -8862,14 +8911,14 @@ var StreamChat = /*#__PURE__*/function () {
8862
8911
  }, {
8863
8912
  key: "updateMessage",
8864
8913
  value: function () {
8865
- var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(message, userId, options) {
8914
+ var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(message, userId, options) {
8866
8915
  var clonedMessage, reservedMessageFields;
8867
- return _regeneratorRuntime.wrap(function _callee46$(_context46) {
8916
+ return _regeneratorRuntime.wrap(function _callee47$(_context47) {
8868
8917
  while (1) {
8869
- switch (_context46.prev = _context46.next) {
8918
+ switch (_context47.prev = _context47.next) {
8870
8919
  case 0:
8871
8920
  if (message.id) {
8872
- _context46.next = 2;
8921
+ _context47.next = 2;
8873
8922
  break;
8874
8923
  }
8875
8924
 
@@ -8906,23 +8955,23 @@ var StreamChat = /*#__PURE__*/function () {
8906
8955
  });
8907
8956
  }
8908
8957
 
8909
- _context46.next = 10;
8958
+ _context47.next = 10;
8910
8959
  return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
8911
8960
  message: clonedMessage
8912
8961
  }, options));
8913
8962
 
8914
8963
  case 10:
8915
- return _context46.abrupt("return", _context46.sent);
8964
+ return _context47.abrupt("return", _context47.sent);
8916
8965
 
8917
8966
  case 11:
8918
8967
  case "end":
8919
- return _context46.stop();
8968
+ return _context47.stop();
8920
8969
  }
8921
8970
  }
8922
- }, _callee46, this);
8971
+ }, _callee47, this);
8923
8972
  }));
8924
8973
 
8925
- function updateMessage(_x58, _x59, _x60) {
8974
+ function updateMessage(_x59, _x60, _x61) {
8926
8975
  return _updateMessage.apply(this, arguments);
8927
8976
  }
8928
8977
 
@@ -8945,14 +8994,14 @@ var StreamChat = /*#__PURE__*/function () {
8945
8994
  }, {
8946
8995
  key: "partialUpdateMessage",
8947
8996
  value: function () {
8948
- var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(id, partialMessageObject, userId, options) {
8997
+ var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(id, partialMessageObject, userId, options) {
8949
8998
  var user;
8950
- return _regeneratorRuntime.wrap(function _callee47$(_context47) {
8999
+ return _regeneratorRuntime.wrap(function _callee48$(_context48) {
8951
9000
  while (1) {
8952
- switch (_context47.prev = _context47.next) {
9001
+ switch (_context48.prev = _context48.next) {
8953
9002
  case 0:
8954
9003
  if (id) {
8955
- _context47.next = 2;
9004
+ _context48.next = 2;
8956
9005
  break;
8957
9006
  }
8958
9007
 
@@ -8967,23 +9016,23 @@ var StreamChat = /*#__PURE__*/function () {
8967
9016
  };
8968
9017
  }
8969
9018
 
8970
- _context47.next = 6;
9019
+ _context48.next = 6;
8971
9020
  return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
8972
9021
  user: user
8973
9022
  }));
8974
9023
 
8975
9024
  case 6:
8976
- return _context47.abrupt("return", _context47.sent);
9025
+ return _context48.abrupt("return", _context48.sent);
8977
9026
 
8978
9027
  case 7:
8979
9028
  case "end":
8980
- return _context47.stop();
9029
+ return _context48.stop();
8981
9030
  }
8982
9031
  }
8983
- }, _callee47, this);
9032
+ }, _callee48, this);
8984
9033
  }));
8985
9034
 
8986
- function partialUpdateMessage(_x61, _x62, _x63, _x64) {
9035
+ function partialUpdateMessage(_x62, _x63, _x64, _x65) {
8987
9036
  return _partialUpdateMessage.apply(this, arguments);
8988
9037
  }
8989
9038
 
@@ -8992,11 +9041,11 @@ var StreamChat = /*#__PURE__*/function () {
8992
9041
  }, {
8993
9042
  key: "deleteMessage",
8994
9043
  value: function () {
8995
- var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(messageID, hardDelete) {
9044
+ var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(messageID, hardDelete) {
8996
9045
  var params;
8997
- return _regeneratorRuntime.wrap(function _callee48$(_context48) {
9046
+ return _regeneratorRuntime.wrap(function _callee49$(_context49) {
8998
9047
  while (1) {
8999
- switch (_context48.prev = _context48.next) {
9048
+ switch (_context49.prev = _context49.next) {
9000
9049
  case 0:
9001
9050
  params = {};
9002
9051
 
@@ -9006,21 +9055,21 @@ var StreamChat = /*#__PURE__*/function () {
9006
9055
  };
9007
9056
  }
9008
9057
 
9009
- _context48.next = 4;
9058
+ _context49.next = 4;
9010
9059
  return this.delete(this.baseURL + "/messages/".concat(messageID), params);
9011
9060
 
9012
9061
  case 4:
9013
- return _context48.abrupt("return", _context48.sent);
9062
+ return _context49.abrupt("return", _context49.sent);
9014
9063
 
9015
9064
  case 5:
9016
9065
  case "end":
9017
- return _context48.stop();
9066
+ return _context49.stop();
9018
9067
  }
9019
9068
  }
9020
- }, _callee48, this);
9069
+ }, _callee49, this);
9021
9070
  }));
9022
9071
 
9023
- function deleteMessage(_x65, _x66) {
9072
+ function deleteMessage(_x66, _x67) {
9024
9073
  return _deleteMessage.apply(this, arguments);
9025
9074
  }
9026
9075
 
@@ -9029,26 +9078,26 @@ var StreamChat = /*#__PURE__*/function () {
9029
9078
  }, {
9030
9079
  key: "getMessage",
9031
9080
  value: function () {
9032
- var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(messageID) {
9033
- return _regeneratorRuntime.wrap(function _callee49$(_context49) {
9081
+ var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(messageID) {
9082
+ return _regeneratorRuntime.wrap(function _callee50$(_context50) {
9034
9083
  while (1) {
9035
- switch (_context49.prev = _context49.next) {
9084
+ switch (_context50.prev = _context50.next) {
9036
9085
  case 0:
9037
- _context49.next = 2;
9086
+ _context50.next = 2;
9038
9087
  return this.get(this.baseURL + "/messages/".concat(messageID));
9039
9088
 
9040
9089
  case 2:
9041
- return _context49.abrupt("return", _context49.sent);
9090
+ return _context50.abrupt("return", _context50.sent);
9042
9091
 
9043
9092
  case 3:
9044
9093
  case "end":
9045
- return _context49.stop();
9094
+ return _context50.stop();
9046
9095
  }
9047
9096
  }
9048
- }, _callee49, this);
9097
+ }, _callee50, this);
9049
9098
  }));
9050
9099
 
9051
- function getMessage(_x67) {
9100
+ function getMessage(_x68) {
9052
9101
  return _getMessage.apply(this, arguments);
9053
9102
  }
9054
9103
 
@@ -9057,7 +9106,7 @@ var StreamChat = /*#__PURE__*/function () {
9057
9106
  }, {
9058
9107
  key: "getUserAgent",
9059
9108
  value: function getUserAgent() {
9060
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.2.0");
9109
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.3.0");
9061
9110
  }
9062
9111
  }, {
9063
9112
  key: "setUserAgent",
@@ -9252,28 +9301,28 @@ var StreamChat = /*#__PURE__*/function () {
9252
9301
  }, {
9253
9302
  key: "sendUserCustomEvent",
9254
9303
  value: function () {
9255
- var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(targetUserID, event) {
9256
- return _regeneratorRuntime.wrap(function _callee50$(_context50) {
9304
+ var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(targetUserID, event) {
9305
+ return _regeneratorRuntime.wrap(function _callee51$(_context51) {
9257
9306
  while (1) {
9258
- switch (_context50.prev = _context50.next) {
9307
+ switch (_context51.prev = _context51.next) {
9259
9308
  case 0:
9260
- _context50.next = 2;
9309
+ _context51.next = 2;
9261
9310
  return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
9262
9311
  event: event
9263
9312
  });
9264
9313
 
9265
9314
  case 2:
9266
- return _context50.abrupt("return", _context50.sent);
9315
+ return _context51.abrupt("return", _context51.sent);
9267
9316
 
9268
9317
  case 3:
9269
9318
  case "end":
9270
- return _context50.stop();
9319
+ return _context51.stop();
9271
9320
  }
9272
9321
  }
9273
- }, _callee50, this);
9322
+ }, _callee51, this);
9274
9323
  }));
9275
9324
 
9276
- function sendUserCustomEvent(_x68, _x69) {
9325
+ function sendUserCustomEvent(_x69, _x70) {
9277
9326
  return _sendUserCustomEvent.apply(this, arguments);
9278
9327
  }
9279
9328
 
@@ -9341,32 +9390,32 @@ var StreamChat = /*#__PURE__*/function () {
9341
9390
  }, {
9342
9391
  key: "createSegment",
9343
9392
  value: function () {
9344
- var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(params) {
9393
+ var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(params) {
9345
9394
  var _yield$this$post, segment;
9346
9395
 
9347
- return _regeneratorRuntime.wrap(function _callee51$(_context51) {
9396
+ return _regeneratorRuntime.wrap(function _callee52$(_context52) {
9348
9397
  while (1) {
9349
- switch (_context51.prev = _context51.next) {
9398
+ switch (_context52.prev = _context52.next) {
9350
9399
  case 0:
9351
- _context51.next = 2;
9400
+ _context52.next = 2;
9352
9401
  return this.post(this.baseURL + "/segments", {
9353
9402
  segment: params
9354
9403
  });
9355
9404
 
9356
9405
  case 2:
9357
- _yield$this$post = _context51.sent;
9406
+ _yield$this$post = _context52.sent;
9358
9407
  segment = _yield$this$post.segment;
9359
- return _context51.abrupt("return", segment);
9408
+ return _context52.abrupt("return", segment);
9360
9409
 
9361
9410
  case 5:
9362
9411
  case "end":
9363
- return _context51.stop();
9412
+ return _context52.stop();
9364
9413
  }
9365
9414
  }
9366
- }, _callee51, this);
9415
+ }, _callee52, this);
9367
9416
  }));
9368
9417
 
9369
- function createSegment(_x70) {
9418
+ function createSegment(_x71) {
9370
9419
  return _createSegment.apply(this, arguments);
9371
9420
  }
9372
9421
 
@@ -9383,30 +9432,30 @@ var StreamChat = /*#__PURE__*/function () {
9383
9432
  }, {
9384
9433
  key: "getSegment",
9385
9434
  value: function () {
9386
- var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(id) {
9435
+ var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(id) {
9387
9436
  var _yield$this$get, segment;
9388
9437
 
9389
- return _regeneratorRuntime.wrap(function _callee52$(_context52) {
9438
+ return _regeneratorRuntime.wrap(function _callee53$(_context53) {
9390
9439
  while (1) {
9391
- switch (_context52.prev = _context52.next) {
9440
+ switch (_context53.prev = _context53.next) {
9392
9441
  case 0:
9393
- _context52.next = 2;
9442
+ _context53.next = 2;
9394
9443
  return this.get(this.baseURL + "/segments/".concat(id));
9395
9444
 
9396
9445
  case 2:
9397
- _yield$this$get = _context52.sent;
9446
+ _yield$this$get = _context53.sent;
9398
9447
  segment = _yield$this$get.segment;
9399
- return _context52.abrupt("return", segment);
9448
+ return _context53.abrupt("return", segment);
9400
9449
 
9401
9450
  case 5:
9402
9451
  case "end":
9403
- return _context52.stop();
9452
+ return _context53.stop();
9404
9453
  }
9405
9454
  }
9406
- }, _callee52, this);
9455
+ }, _callee53, this);
9407
9456
  }));
9408
9457
 
9409
- function getSegment(_x71) {
9458
+ function getSegment(_x72) {
9410
9459
  return _getSegment.apply(this, arguments);
9411
9460
  }
9412
9461
 
@@ -9422,30 +9471,30 @@ var StreamChat = /*#__PURE__*/function () {
9422
9471
  }, {
9423
9472
  key: "listSegments",
9424
9473
  value: function () {
9425
- var _listSegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(options) {
9474
+ var _listSegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(options) {
9426
9475
  var _yield$this$get2, segments;
9427
9476
 
9428
- return _regeneratorRuntime.wrap(function _callee53$(_context53) {
9477
+ return _regeneratorRuntime.wrap(function _callee54$(_context54) {
9429
9478
  while (1) {
9430
- switch (_context53.prev = _context53.next) {
9479
+ switch (_context54.prev = _context54.next) {
9431
9480
  case 0:
9432
- _context53.next = 2;
9481
+ _context54.next = 2;
9433
9482
  return this.get(this.baseURL + "/segments", options);
9434
9483
 
9435
9484
  case 2:
9436
- _yield$this$get2 = _context53.sent;
9485
+ _yield$this$get2 = _context54.sent;
9437
9486
  segments = _yield$this$get2.segments;
9438
- return _context53.abrupt("return", segments);
9487
+ return _context54.abrupt("return", segments);
9439
9488
 
9440
9489
  case 5:
9441
9490
  case "end":
9442
- return _context53.stop();
9491
+ return _context54.stop();
9443
9492
  }
9444
9493
  }
9445
- }, _callee53, this);
9494
+ }, _callee54, this);
9446
9495
  }));
9447
9496
 
9448
- function listSegments(_x72) {
9497
+ function listSegments(_x73) {
9449
9498
  return _listSegments.apply(this, arguments);
9450
9499
  }
9451
9500
 
@@ -9463,32 +9512,32 @@ var StreamChat = /*#__PURE__*/function () {
9463
9512
  }, {
9464
9513
  key: "updateSegment",
9465
9514
  value: function () {
9466
- var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(id, params) {
9515
+ var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(id, params) {
9467
9516
  var _yield$this$put, segment;
9468
9517
 
9469
- return _regeneratorRuntime.wrap(function _callee54$(_context54) {
9518
+ return _regeneratorRuntime.wrap(function _callee55$(_context55) {
9470
9519
  while (1) {
9471
- switch (_context54.prev = _context54.next) {
9520
+ switch (_context55.prev = _context55.next) {
9472
9521
  case 0:
9473
- _context54.next = 2;
9522
+ _context55.next = 2;
9474
9523
  return this.put(this.baseURL + "/segments/".concat(id), {
9475
9524
  segment: params
9476
9525
  });
9477
9526
 
9478
9527
  case 2:
9479
- _yield$this$put = _context54.sent;
9528
+ _yield$this$put = _context55.sent;
9480
9529
  segment = _yield$this$put.segment;
9481
- return _context54.abrupt("return", segment);
9530
+ return _context55.abrupt("return", segment);
9482
9531
 
9483
9532
  case 5:
9484
9533
  case "end":
9485
- return _context54.stop();
9534
+ return _context55.stop();
9486
9535
  }
9487
9536
  }
9488
- }, _callee54, this);
9537
+ }, _callee55, this);
9489
9538
  }));
9490
9539
 
9491
- function updateSegment(_x73, _x74) {
9540
+ function updateSegment(_x74, _x75) {
9492
9541
  return _updateSegment.apply(this, arguments);
9493
9542
  }
9494
9543
 
@@ -9505,22 +9554,22 @@ var StreamChat = /*#__PURE__*/function () {
9505
9554
  }, {
9506
9555
  key: "deleteSegment",
9507
9556
  value: function () {
9508
- var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(id) {
9509
- return _regeneratorRuntime.wrap(function _callee55$(_context55) {
9557
+ var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(id) {
9558
+ return _regeneratorRuntime.wrap(function _callee56$(_context56) {
9510
9559
  while (1) {
9511
- switch (_context55.prev = _context55.next) {
9560
+ switch (_context56.prev = _context56.next) {
9512
9561
  case 0:
9513
- return _context55.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
9562
+ return _context56.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
9514
9563
 
9515
9564
  case 1:
9516
9565
  case "end":
9517
- return _context55.stop();
9566
+ return _context56.stop();
9518
9567
  }
9519
9568
  }
9520
- }, _callee55, this);
9569
+ }, _callee56, this);
9521
9570
  }));
9522
9571
 
9523
- function deleteSegment(_x75) {
9572
+ function deleteSegment(_x76) {
9524
9573
  return _deleteSegment.apply(this, arguments);
9525
9574
  }
9526
9575
 
@@ -9537,32 +9586,32 @@ var StreamChat = /*#__PURE__*/function () {
9537
9586
  }, {
9538
9587
  key: "createCampaign",
9539
9588
  value: function () {
9540
- var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(params) {
9589
+ var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(params) {
9541
9590
  var _yield$this$post2, campaign;
9542
9591
 
9543
- return _regeneratorRuntime.wrap(function _callee56$(_context56) {
9592
+ return _regeneratorRuntime.wrap(function _callee57$(_context57) {
9544
9593
  while (1) {
9545
- switch (_context56.prev = _context56.next) {
9594
+ switch (_context57.prev = _context57.next) {
9546
9595
  case 0:
9547
- _context56.next = 2;
9596
+ _context57.next = 2;
9548
9597
  return this.post(this.baseURL + "/campaigns", {
9549
9598
  campaign: params
9550
9599
  });
9551
9600
 
9552
9601
  case 2:
9553
- _yield$this$post2 = _context56.sent;
9602
+ _yield$this$post2 = _context57.sent;
9554
9603
  campaign = _yield$this$post2.campaign;
9555
- return _context56.abrupt("return", campaign);
9604
+ return _context57.abrupt("return", campaign);
9556
9605
 
9557
9606
  case 5:
9558
9607
  case "end":
9559
- return _context56.stop();
9608
+ return _context57.stop();
9560
9609
  }
9561
9610
  }
9562
- }, _callee56, this);
9611
+ }, _callee57, this);
9563
9612
  }));
9564
9613
 
9565
- function createCampaign(_x76) {
9614
+ function createCampaign(_x77) {
9566
9615
  return _createCampaign.apply(this, arguments);
9567
9616
  }
9568
9617
 
@@ -9579,30 +9628,30 @@ var StreamChat = /*#__PURE__*/function () {
9579
9628
  }, {
9580
9629
  key: "getCampaign",
9581
9630
  value: function () {
9582
- var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(id) {
9631
+ var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(id) {
9583
9632
  var _yield$this$get3, campaign;
9584
9633
 
9585
- return _regeneratorRuntime.wrap(function _callee57$(_context57) {
9634
+ return _regeneratorRuntime.wrap(function _callee58$(_context58) {
9586
9635
  while (1) {
9587
- switch (_context57.prev = _context57.next) {
9636
+ switch (_context58.prev = _context58.next) {
9588
9637
  case 0:
9589
- _context57.next = 2;
9638
+ _context58.next = 2;
9590
9639
  return this.get(this.baseURL + "/campaigns/".concat(id));
9591
9640
 
9592
9641
  case 2:
9593
- _yield$this$get3 = _context57.sent;
9642
+ _yield$this$get3 = _context58.sent;
9594
9643
  campaign = _yield$this$get3.campaign;
9595
- return _context57.abrupt("return", campaign);
9644
+ return _context58.abrupt("return", campaign);
9596
9645
 
9597
9646
  case 5:
9598
9647
  case "end":
9599
- return _context57.stop();
9648
+ return _context58.stop();
9600
9649
  }
9601
9650
  }
9602
- }, _callee57, this);
9651
+ }, _callee58, this);
9603
9652
  }));
9604
9653
 
9605
- function getCampaign(_x77) {
9654
+ function getCampaign(_x78) {
9606
9655
  return _getCampaign.apply(this, arguments);
9607
9656
  }
9608
9657
 
@@ -9618,30 +9667,30 @@ var StreamChat = /*#__PURE__*/function () {
9618
9667
  }, {
9619
9668
  key: "listCampaigns",
9620
9669
  value: function () {
9621
- var _listCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(options) {
9670
+ var _listCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(options) {
9622
9671
  var _yield$this$get4, campaigns;
9623
9672
 
9624
- return _regeneratorRuntime.wrap(function _callee58$(_context58) {
9673
+ return _regeneratorRuntime.wrap(function _callee59$(_context59) {
9625
9674
  while (1) {
9626
- switch (_context58.prev = _context58.next) {
9675
+ switch (_context59.prev = _context59.next) {
9627
9676
  case 0:
9628
- _context58.next = 2;
9677
+ _context59.next = 2;
9629
9678
  return this.get(this.baseURL + "/campaigns", options);
9630
9679
 
9631
9680
  case 2:
9632
- _yield$this$get4 = _context58.sent;
9681
+ _yield$this$get4 = _context59.sent;
9633
9682
  campaigns = _yield$this$get4.campaigns;
9634
- return _context58.abrupt("return", campaigns);
9683
+ return _context59.abrupt("return", campaigns);
9635
9684
 
9636
9685
  case 5:
9637
9686
  case "end":
9638
- return _context58.stop();
9687
+ return _context59.stop();
9639
9688
  }
9640
9689
  }
9641
- }, _callee58, this);
9690
+ }, _callee59, this);
9642
9691
  }));
9643
9692
 
9644
- function listCampaigns(_x78) {
9693
+ function listCampaigns(_x79) {
9645
9694
  return _listCampaigns.apply(this, arguments);
9646
9695
  }
9647
9696
 
@@ -9659,32 +9708,32 @@ var StreamChat = /*#__PURE__*/function () {
9659
9708
  }, {
9660
9709
  key: "updateCampaign",
9661
9710
  value: function () {
9662
- var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(id, params) {
9711
+ var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(id, params) {
9663
9712
  var _yield$this$put2, campaign;
9664
9713
 
9665
- return _regeneratorRuntime.wrap(function _callee59$(_context59) {
9714
+ return _regeneratorRuntime.wrap(function _callee60$(_context60) {
9666
9715
  while (1) {
9667
- switch (_context59.prev = _context59.next) {
9716
+ switch (_context60.prev = _context60.next) {
9668
9717
  case 0:
9669
- _context59.next = 2;
9718
+ _context60.next = 2;
9670
9719
  return this.put(this.baseURL + "/campaigns/".concat(id), {
9671
9720
  campaign: params
9672
9721
  });
9673
9722
 
9674
9723
  case 2:
9675
- _yield$this$put2 = _context59.sent;
9724
+ _yield$this$put2 = _context60.sent;
9676
9725
  campaign = _yield$this$put2.campaign;
9677
- return _context59.abrupt("return", campaign);
9726
+ return _context60.abrupt("return", campaign);
9678
9727
 
9679
9728
  case 5:
9680
9729
  case "end":
9681
- return _context59.stop();
9730
+ return _context60.stop();
9682
9731
  }
9683
9732
  }
9684
- }, _callee59, this);
9733
+ }, _callee60, this);
9685
9734
  }));
9686
9735
 
9687
- function updateCampaign(_x79, _x80) {
9736
+ function updateCampaign(_x80, _x81) {
9688
9737
  return _updateCampaign.apply(this, arguments);
9689
9738
  }
9690
9739
 
@@ -9701,22 +9750,22 @@ var StreamChat = /*#__PURE__*/function () {
9701
9750
  }, {
9702
9751
  key: "deleteCampaign",
9703
9752
  value: function () {
9704
- var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(id) {
9705
- return _regeneratorRuntime.wrap(function _callee60$(_context60) {
9753
+ var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id) {
9754
+ return _regeneratorRuntime.wrap(function _callee61$(_context61) {
9706
9755
  while (1) {
9707
- switch (_context60.prev = _context60.next) {
9756
+ switch (_context61.prev = _context61.next) {
9708
9757
  case 0:
9709
- return _context60.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
9758
+ return _context61.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
9710
9759
 
9711
9760
  case 1:
9712
9761
  case "end":
9713
- return _context60.stop();
9762
+ return _context61.stop();
9714
9763
  }
9715
9764
  }
9716
- }, _callee60, this);
9765
+ }, _callee61, this);
9717
9766
  }));
9718
9767
 
9719
- function deleteCampaign(_x81) {
9768
+ function deleteCampaign(_x82) {
9720
9769
  return _deleteCampaign.apply(this, arguments);
9721
9770
  }
9722
9771
 
@@ -9734,33 +9783,33 @@ var StreamChat = /*#__PURE__*/function () {
9734
9783
  }, {
9735
9784
  key: "scheduleCampaign",
9736
9785
  value: function () {
9737
- var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id, params) {
9786
+ var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(id, params) {
9738
9787
  var sendAt, _yield$this$patch, campaign;
9739
9788
 
9740
- return _regeneratorRuntime.wrap(function _callee61$(_context61) {
9789
+ return _regeneratorRuntime.wrap(function _callee62$(_context62) {
9741
9790
  while (1) {
9742
- switch (_context61.prev = _context61.next) {
9791
+ switch (_context62.prev = _context62.next) {
9743
9792
  case 0:
9744
9793
  sendAt = params.sendAt;
9745
- _context61.next = 3;
9794
+ _context62.next = 3;
9746
9795
  return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
9747
9796
  send_at: sendAt
9748
9797
  });
9749
9798
 
9750
9799
  case 3:
9751
- _yield$this$patch = _context61.sent;
9800
+ _yield$this$patch = _context62.sent;
9752
9801
  campaign = _yield$this$patch.campaign;
9753
- return _context61.abrupt("return", campaign);
9802
+ return _context62.abrupt("return", campaign);
9754
9803
 
9755
9804
  case 6:
9756
9805
  case "end":
9757
- return _context61.stop();
9806
+ return _context62.stop();
9758
9807
  }
9759
9808
  }
9760
- }, _callee61, this);
9809
+ }, _callee62, this);
9761
9810
  }));
9762
9811
 
9763
- function scheduleCampaign(_x82, _x83) {
9812
+ function scheduleCampaign(_x83, _x84) {
9764
9813
  return _scheduleCampaign.apply(this, arguments);
9765
9814
  }
9766
9815
 
@@ -9777,30 +9826,30 @@ var StreamChat = /*#__PURE__*/function () {
9777
9826
  }, {
9778
9827
  key: "stopCampaign",
9779
9828
  value: function () {
9780
- var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(id) {
9829
+ var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(id) {
9781
9830
  var _yield$this$patch2, campaign;
9782
9831
 
9783
- return _regeneratorRuntime.wrap(function _callee62$(_context62) {
9832
+ return _regeneratorRuntime.wrap(function _callee63$(_context63) {
9784
9833
  while (1) {
9785
- switch (_context62.prev = _context62.next) {
9834
+ switch (_context63.prev = _context63.next) {
9786
9835
  case 0:
9787
- _context62.next = 2;
9836
+ _context63.next = 2;
9788
9837
  return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
9789
9838
 
9790
9839
  case 2:
9791
- _yield$this$patch2 = _context62.sent;
9840
+ _yield$this$patch2 = _context63.sent;
9792
9841
  campaign = _yield$this$patch2.campaign;
9793
- return _context62.abrupt("return", campaign);
9842
+ return _context63.abrupt("return", campaign);
9794
9843
 
9795
9844
  case 5:
9796
9845
  case "end":
9797
- return _context62.stop();
9846
+ return _context63.stop();
9798
9847
  }
9799
9848
  }
9800
- }, _callee62, this);
9849
+ }, _callee63, this);
9801
9850
  }));
9802
9851
 
9803
- function stopCampaign(_x84) {
9852
+ function stopCampaign(_x85) {
9804
9853
  return _stopCampaign.apply(this, arguments);
9805
9854
  }
9806
9855
 
@@ -9817,30 +9866,30 @@ var StreamChat = /*#__PURE__*/function () {
9817
9866
  }, {
9818
9867
  key: "resumeCampaign",
9819
9868
  value: function () {
9820
- var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(id) {
9869
+ var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id) {
9821
9870
  var _yield$this$patch3, campaign;
9822
9871
 
9823
- return _regeneratorRuntime.wrap(function _callee63$(_context63) {
9872
+ return _regeneratorRuntime.wrap(function _callee64$(_context64) {
9824
9873
  while (1) {
9825
- switch (_context63.prev = _context63.next) {
9874
+ switch (_context64.prev = _context64.next) {
9826
9875
  case 0:
9827
- _context63.next = 2;
9876
+ _context64.next = 2;
9828
9877
  return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
9829
9878
 
9830
9879
  case 2:
9831
- _yield$this$patch3 = _context63.sent;
9880
+ _yield$this$patch3 = _context64.sent;
9832
9881
  campaign = _yield$this$patch3.campaign;
9833
- return _context63.abrupt("return", campaign);
9882
+ return _context64.abrupt("return", campaign);
9834
9883
 
9835
9884
  case 5:
9836
9885
  case "end":
9837
- return _context63.stop();
9886
+ return _context64.stop();
9838
9887
  }
9839
9888
  }
9840
- }, _callee63, this);
9889
+ }, _callee64, this);
9841
9890
  }));
9842
9891
 
9843
- function resumeCampaign(_x85) {
9892
+ function resumeCampaign(_x86) {
9844
9893
  return _resumeCampaign.apply(this, arguments);
9845
9894
  }
9846
9895
 
@@ -9857,33 +9906,33 @@ var StreamChat = /*#__PURE__*/function () {
9857
9906
  }, {
9858
9907
  key: "testCampaign",
9859
9908
  value: function () {
9860
- var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id, params) {
9909
+ var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id, params) {
9861
9910
  var users, _yield$this$post3, campaign;
9862
9911
 
9863
- return _regeneratorRuntime.wrap(function _callee64$(_context64) {
9912
+ return _regeneratorRuntime.wrap(function _callee65$(_context65) {
9864
9913
  while (1) {
9865
- switch (_context64.prev = _context64.next) {
9914
+ switch (_context65.prev = _context65.next) {
9866
9915
  case 0:
9867
9916
  users = params.users;
9868
- _context64.next = 3;
9917
+ _context65.next = 3;
9869
9918
  return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
9870
9919
  users: users
9871
9920
  });
9872
9921
 
9873
9922
  case 3:
9874
- _yield$this$post3 = _context64.sent;
9923
+ _yield$this$post3 = _context65.sent;
9875
9924
  campaign = _yield$this$post3.campaign;
9876
- return _context64.abrupt("return", campaign);
9925
+ return _context65.abrupt("return", campaign);
9877
9926
 
9878
9927
  case 6:
9879
9928
  case "end":
9880
- return _context64.stop();
9929
+ return _context65.stop();
9881
9930
  }
9882
9931
  }
9883
- }, _callee64, this);
9932
+ }, _callee65, this);
9884
9933
  }));
9885
9934
 
9886
- function testCampaign(_x86, _x87) {
9935
+ function testCampaign(_x87, _x88) {
9887
9936
  return _testCampaign.apply(this, arguments);
9888
9937
  }
9889
9938
 
@@ -9899,24 +9948,24 @@ var StreamChat = /*#__PURE__*/function () {
9899
9948
  }, {
9900
9949
  key: "enrichURL",
9901
9950
  value: function () {
9902
- var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(url) {
9903
- return _regeneratorRuntime.wrap(function _callee65$(_context65) {
9951
+ var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(url) {
9952
+ return _regeneratorRuntime.wrap(function _callee66$(_context66) {
9904
9953
  while (1) {
9905
- switch (_context65.prev = _context65.next) {
9954
+ switch (_context66.prev = _context66.next) {
9906
9955
  case 0:
9907
- return _context65.abrupt("return", this.get(this.baseURL + "/og", {
9956
+ return _context66.abrupt("return", this.get(this.baseURL + "/og", {
9908
9957
  url: url
9909
9958
  }));
9910
9959
 
9911
9960
  case 1:
9912
9961
  case "end":
9913
- return _context65.stop();
9962
+ return _context66.stop();
9914
9963
  }
9915
9964
  }
9916
- }, _callee65, this);
9965
+ }, _callee66, this);
9917
9966
  }));
9918
9967
 
9919
- function enrichURL(_x88) {
9968
+ function enrichURL(_x89) {
9920
9969
  return _enrichURL.apply(this, arguments);
9921
9970
  }
9922
9971
 
@@ -9933,22 +9982,22 @@ var StreamChat = /*#__PURE__*/function () {
9933
9982
  }, {
9934
9983
  key: "getTask",
9935
9984
  value: function () {
9936
- var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id) {
9937
- return _regeneratorRuntime.wrap(function _callee66$(_context66) {
9985
+ var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id) {
9986
+ return _regeneratorRuntime.wrap(function _callee67$(_context67) {
9938
9987
  while (1) {
9939
- switch (_context66.prev = _context66.next) {
9988
+ switch (_context67.prev = _context67.next) {
9940
9989
  case 0:
9941
- return _context66.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
9990
+ return _context67.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
9942
9991
 
9943
9992
  case 1:
9944
9993
  case "end":
9945
- return _context66.stop();
9994
+ return _context67.stop();
9946
9995
  }
9947
9996
  }
9948
- }, _callee66, this);
9997
+ }, _callee67, this);
9949
9998
  }));
9950
9999
 
9951
- function getTask(_x89) {
10000
+ function getTask(_x90) {
9952
10001
  return _getTask.apply(this, arguments);
9953
10002
  }
9954
10003
 
@@ -9966,31 +10015,31 @@ var StreamChat = /*#__PURE__*/function () {
9966
10015
  }, {
9967
10016
  key: "deleteChannels",
9968
10017
  value: function () {
9969
- var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(cids) {
10018
+ var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(cids) {
9970
10019
  var options,
9971
- _args67 = arguments;
9972
- return _regeneratorRuntime.wrap(function _callee67$(_context67) {
10020
+ _args68 = arguments;
10021
+ return _regeneratorRuntime.wrap(function _callee68$(_context68) {
9973
10022
  while (1) {
9974
- switch (_context67.prev = _context67.next) {
10023
+ switch (_context68.prev = _context68.next) {
9975
10024
  case 0:
9976
- options = _args67.length > 1 && _args67[1] !== undefined ? _args67[1] : {};
9977
- _context67.next = 3;
10025
+ options = _args68.length > 1 && _args68[1] !== undefined ? _args68[1] : {};
10026
+ _context68.next = 3;
9978
10027
  return this.post(this.baseURL + "/channels/delete", _objectSpread({
9979
10028
  cids: cids
9980
10029
  }, options));
9981
10030
 
9982
10031
  case 3:
9983
- return _context67.abrupt("return", _context67.sent);
10032
+ return _context68.abrupt("return", _context68.sent);
9984
10033
 
9985
10034
  case 4:
9986
10035
  case "end":
9987
- return _context67.stop();
10036
+ return _context68.stop();
9988
10037
  }
9989
10038
  }
9990
- }, _callee67, this);
10039
+ }, _callee68, this);
9991
10040
  }));
9992
10041
 
9993
- function deleteChannels(_x90) {
10042
+ function deleteChannels(_x91) {
9994
10043
  return _deleteChannels.apply(this, arguments);
9995
10044
  }
9996
10045
 
@@ -10008,13 +10057,13 @@ var StreamChat = /*#__PURE__*/function () {
10008
10057
  }, {
10009
10058
  key: "deleteUsers",
10010
10059
  value: function () {
10011
- var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(user_ids, options) {
10012
- return _regeneratorRuntime.wrap(function _callee68$(_context68) {
10060
+ var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(user_ids, options) {
10061
+ return _regeneratorRuntime.wrap(function _callee69$(_context69) {
10013
10062
  while (1) {
10014
- switch (_context68.prev = _context68.next) {
10063
+ switch (_context69.prev = _context69.next) {
10015
10064
  case 0:
10016
10065
  if (!((options === null || options === void 0 ? void 0 : options.user) !== 'soft' && (options === null || options === void 0 ? void 0 : options.user) !== 'hard')) {
10017
- _context68.next = 2;
10066
+ _context69.next = 2;
10018
10067
  break;
10019
10068
  }
10020
10069
 
@@ -10022,7 +10071,7 @@ var StreamChat = /*#__PURE__*/function () {
10022
10071
 
10023
10072
  case 2:
10024
10073
  if (!(options.messages !== undefined && options.messages !== 'soft' && options.messages !== 'hard')) {
10025
- _context68.next = 4;
10074
+ _context69.next = 4;
10026
10075
  break;
10027
10076
  }
10028
10077
 
@@ -10030,30 +10079,30 @@ var StreamChat = /*#__PURE__*/function () {
10030
10079
 
10031
10080
  case 4:
10032
10081
  if (!(options.conversations !== undefined && options.conversations !== 'soft' && options.conversations !== 'hard')) {
10033
- _context68.next = 6;
10082
+ _context69.next = 6;
10034
10083
  break;
10035
10084
  }
10036
10085
 
10037
10086
  throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
10038
10087
 
10039
10088
  case 6:
10040
- _context68.next = 8;
10089
+ _context69.next = 8;
10041
10090
  return this.post(this.baseURL + "/users/delete", _objectSpread({
10042
10091
  user_ids: user_ids
10043
10092
  }, options));
10044
10093
 
10045
10094
  case 8:
10046
- return _context68.abrupt("return", _context68.sent);
10095
+ return _context69.abrupt("return", _context69.sent);
10047
10096
 
10048
10097
  case 9:
10049
10098
  case "end":
10050
- return _context68.stop();
10099
+ return _context69.stop();
10051
10100
  }
10052
10101
  }
10053
- }, _callee68, this);
10102
+ }, _callee69, this);
10054
10103
  }));
10055
10104
 
10056
- function deleteUsers(_x91, _x92) {
10105
+ function deleteUsers(_x92, _x93) {
10057
10106
  return _deleteUsers.apply(this, arguments);
10058
10107
  }
10059
10108