stream-chat 8.21.0 → 8.23.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.
@@ -3793,6 +3793,7 @@ var Channel = /*#__PURE__*/function () {
3793
3793
  break;
3794
3794
 
3795
3795
  case 'message.updated':
3796
+ case 'message.undeleted':
3796
3797
  if (event.message) {
3797
3798
  this._extendEventWithOwnReactions(event);
3798
3799
 
@@ -10853,16 +10854,31 @@ var StreamChat = /*#__PURE__*/function () {
10853
10854
 
10854
10855
  return deleteMessage;
10855
10856
  }()
10857
+ /**
10858
+ * undeleteMessage - Undelete a message
10859
+ *
10860
+ * undeletes a message that was previous soft deleted. Hard deleted messages
10861
+ * cannot be undeleted. This is only allowed to be called from server-side
10862
+ * clients.
10863
+ *
10864
+ * @param {string} messageID The id of the message to undelete
10865
+ * @param {string} userID The id of the user who undeleted the message
10866
+ *
10867
+ * @return {{ message: MessageResponse<StreamChatGenerics> }} Response that includes the message
10868
+ */
10869
+
10856
10870
  }, {
10857
- key: "getMessage",
10871
+ key: "undeleteMessage",
10858
10872
  value: function () {
10859
- var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(messageID, options) {
10873
+ var _undeleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(messageID, userID) {
10860
10874
  return _regeneratorRuntime.wrap(function _callee58$(_context58) {
10861
10875
  while (1) {
10862
10876
  switch (_context58.prev = _context58.next) {
10863
10877
  case 0:
10864
10878
  _context58.next = 2;
10865
- return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), _objectSpread({}, options));
10879
+ return this.post(this.baseURL + "/messages/".concat(messageID, "/undelete"), {
10880
+ undeleted_by: userID
10881
+ });
10866
10882
 
10867
10883
  case 2:
10868
10884
  return _context58.abrupt("return", _context58.sent);
@@ -10875,7 +10891,35 @@ var StreamChat = /*#__PURE__*/function () {
10875
10891
  }, _callee58, this);
10876
10892
  }));
10877
10893
 
10878
- function getMessage(_x77, _x78) {
10894
+ function undeleteMessage(_x77, _x78) {
10895
+ return _undeleteMessage.apply(this, arguments);
10896
+ }
10897
+
10898
+ return undeleteMessage;
10899
+ }()
10900
+ }, {
10901
+ key: "getMessage",
10902
+ value: function () {
10903
+ var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(messageID, options) {
10904
+ return _regeneratorRuntime.wrap(function _callee59$(_context59) {
10905
+ while (1) {
10906
+ switch (_context59.prev = _context59.next) {
10907
+ case 0:
10908
+ _context59.next = 2;
10909
+ return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), _objectSpread({}, options));
10910
+
10911
+ case 2:
10912
+ return _context59.abrupt("return", _context59.sent);
10913
+
10914
+ case 3:
10915
+ case "end":
10916
+ return _context59.stop();
10917
+ }
10918
+ }
10919
+ }, _callee59, this);
10920
+ }));
10921
+
10922
+ function getMessage(_x79, _x80) {
10879
10923
  return _getMessage.apply(this, arguments);
10880
10924
  }
10881
10925
 
@@ -10896,13 +10940,13 @@ var StreamChat = /*#__PURE__*/function () {
10896
10940
  }, {
10897
10941
  key: "queryThreads",
10898
10942
  value: function () {
10899
- var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(options) {
10943
+ var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(options) {
10900
10944
  var _this5 = this;
10901
10945
 
10902
10946
  var opts, res;
10903
- return _regeneratorRuntime.wrap(function _callee59$(_context59) {
10947
+ return _regeneratorRuntime.wrap(function _callee60$(_context60) {
10904
10948
  while (1) {
10905
- switch (_context59.prev = _context59.next) {
10949
+ switch (_context60.prev = _context60.next) {
10906
10950
  case 0:
10907
10951
  opts = _objectSpread({
10908
10952
  limit: 10,
@@ -10910,12 +10954,12 @@ var StreamChat = /*#__PURE__*/function () {
10910
10954
  reply_limit: 3,
10911
10955
  watch: true
10912
10956
  }, options);
10913
- _context59.next = 3;
10957
+ _context60.next = 3;
10914
10958
  return this.post(this.baseURL + "/threads", opts);
10915
10959
 
10916
10960
  case 3:
10917
- res = _context59.sent;
10918
- return _context59.abrupt("return", {
10961
+ res = _context60.sent;
10962
+ return _context60.abrupt("return", {
10919
10963
  threads: res.threads.map(function (thread) {
10920
10964
  return new Thread(_this5, thread);
10921
10965
  }),
@@ -10924,13 +10968,13 @@ var StreamChat = /*#__PURE__*/function () {
10924
10968
 
10925
10969
  case 5:
10926
10970
  case "end":
10927
- return _context59.stop();
10971
+ return _context60.stop();
10928
10972
  }
10929
10973
  }
10930
- }, _callee59, this);
10974
+ }, _callee60, this);
10931
10975
  }));
10932
10976
 
10933
- function queryThreads(_x79) {
10977
+ function queryThreads(_x81) {
10934
10978
  return _queryThreads.apply(this, arguments);
10935
10979
  }
10936
10980
 
@@ -10951,19 +10995,19 @@ var StreamChat = /*#__PURE__*/function () {
10951
10995
  }, {
10952
10996
  key: "getThread",
10953
10997
  value: function () {
10954
- var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(messageId) {
10998
+ var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(messageId) {
10955
10999
  var options,
10956
11000
  opts,
10957
11001
  res,
10958
- _args60 = arguments;
10959
- return _regeneratorRuntime.wrap(function _callee60$(_context60) {
11002
+ _args61 = arguments;
11003
+ return _regeneratorRuntime.wrap(function _callee61$(_context61) {
10960
11004
  while (1) {
10961
- switch (_context60.prev = _context60.next) {
11005
+ switch (_context61.prev = _context61.next) {
10962
11006
  case 0:
10963
- options = _args60.length > 1 && _args60[1] !== undefined ? _args60[1] : {};
11007
+ options = _args61.length > 1 && _args61[1] !== undefined ? _args61[1] : {};
10964
11008
 
10965
11009
  if (messageId) {
10966
- _context60.next = 3;
11010
+ _context61.next = 3;
10967
11011
  break;
10968
11012
  }
10969
11013
 
@@ -10975,22 +11019,22 @@ var StreamChat = /*#__PURE__*/function () {
10975
11019
  reply_limit: 3,
10976
11020
  watch: true
10977
11021
  }, options);
10978
- _context60.next = 6;
11022
+ _context61.next = 6;
10979
11023
  return this.get(this.baseURL + "/threads/".concat(messageId), opts);
10980
11024
 
10981
11025
  case 6:
10982
- res = _context60.sent;
10983
- return _context60.abrupt("return", new Thread(this, res.thread));
11026
+ res = _context61.sent;
11027
+ return _context61.abrupt("return", new Thread(this, res.thread));
10984
11028
 
10985
11029
  case 8:
10986
11030
  case "end":
10987
- return _context60.stop();
11031
+ return _context61.stop();
10988
11032
  }
10989
11033
  }
10990
- }, _callee60, this);
11034
+ }, _callee61, this);
10991
11035
  }));
10992
11036
 
10993
- function getThread(_x80) {
11037
+ function getThread(_x82) {
10994
11038
  return _getThread.apply(this, arguments);
10995
11039
  }
10996
11040
 
@@ -11008,15 +11052,15 @@ var StreamChat = /*#__PURE__*/function () {
11008
11052
  }, {
11009
11053
  key: "partialUpdateThread",
11010
11054
  value: function () {
11011
- var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(messageId, partialThreadObject) {
11055
+ var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(messageId, partialThreadObject) {
11012
11056
  var reservedThreadFields, _key5;
11013
11057
 
11014
- return _regeneratorRuntime.wrap(function _callee61$(_context61) {
11058
+ return _regeneratorRuntime.wrap(function _callee62$(_context62) {
11015
11059
  while (1) {
11016
- switch (_context61.prev = _context61.next) {
11060
+ switch (_context62.prev = _context62.next) {
11017
11061
  case 0:
11018
11062
  if (messageId) {
11019
- _context61.next = 2;
11063
+ _context62.next = 2;
11020
11064
  break;
11021
11065
  }
11022
11066
 
@@ -11026,43 +11070,43 @@ var StreamChat = /*#__PURE__*/function () {
11026
11070
  // check for reserved fields from ThreadResponse type within partialThreadObject's set and unset.
11027
11071
  // Throw error if any of the reserved field is found.
11028
11072
  reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel'];
11029
- _context61.t0 = _regeneratorRuntime.keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
11073
+ _context62.t0 = _regeneratorRuntime.keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
11030
11074
 
11031
11075
  case 4:
11032
- if ((_context61.t1 = _context61.t0()).done) {
11033
- _context61.next = 10;
11076
+ if ((_context62.t1 = _context62.t0()).done) {
11077
+ _context62.next = 10;
11034
11078
  break;
11035
11079
  }
11036
11080
 
11037
- _key5 = _context61.t1.value;
11081
+ _key5 = _context62.t1.value;
11038
11082
 
11039
11083
  if (!reservedThreadFields.includes(_key5)) {
11040
- _context61.next = 8;
11084
+ _context62.next = 8;
11041
11085
  break;
11042
11086
  }
11043
11087
 
11044
11088
  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."));
11045
11089
 
11046
11090
  case 8:
11047
- _context61.next = 4;
11091
+ _context62.next = 4;
11048
11092
  break;
11049
11093
 
11050
11094
  case 10:
11051
- _context61.next = 12;
11095
+ _context62.next = 12;
11052
11096
  return this.patch(this.baseURL + "/threads/".concat(messageId), partialThreadObject);
11053
11097
 
11054
11098
  case 12:
11055
- return _context61.abrupt("return", _context61.sent);
11099
+ return _context62.abrupt("return", _context62.sent);
11056
11100
 
11057
11101
  case 13:
11058
11102
  case "end":
11059
- return _context61.stop();
11103
+ return _context62.stop();
11060
11104
  }
11061
11105
  }
11062
- }, _callee61, this);
11106
+ }, _callee62, this);
11063
11107
  }));
11064
11108
 
11065
- function partialUpdateThread(_x81, _x82) {
11109
+ function partialUpdateThread(_x83, _x84) {
11066
11110
  return _partialUpdateThread.apply(this, arguments);
11067
11111
  }
11068
11112
 
@@ -11071,7 +11115,7 @@ var StreamChat = /*#__PURE__*/function () {
11071
11115
  }, {
11072
11116
  key: "getUserAgent",
11073
11117
  value: function getUserAgent() {
11074
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.21.0");
11118
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.23.0");
11075
11119
  }
11076
11120
  }, {
11077
11121
  key: "setUserAgent",
@@ -11290,28 +11334,28 @@ var StreamChat = /*#__PURE__*/function () {
11290
11334
  }, {
11291
11335
  key: "sendUserCustomEvent",
11292
11336
  value: function () {
11293
- var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(targetUserID, event) {
11294
- return _regeneratorRuntime.wrap(function _callee62$(_context62) {
11337
+ var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(targetUserID, event) {
11338
+ return _regeneratorRuntime.wrap(function _callee63$(_context63) {
11295
11339
  while (1) {
11296
- switch (_context62.prev = _context62.next) {
11340
+ switch (_context63.prev = _context63.next) {
11297
11341
  case 0:
11298
- _context62.next = 2;
11342
+ _context63.next = 2;
11299
11343
  return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
11300
11344
  event: event
11301
11345
  });
11302
11346
 
11303
11347
  case 2:
11304
- return _context62.abrupt("return", _context62.sent);
11348
+ return _context63.abrupt("return", _context63.sent);
11305
11349
 
11306
11350
  case 3:
11307
11351
  case "end":
11308
- return _context62.stop();
11352
+ return _context63.stop();
11309
11353
  }
11310
11354
  }
11311
- }, _callee62, this);
11355
+ }, _callee63, this);
11312
11356
  }));
11313
11357
 
11314
- function sendUserCustomEvent(_x83, _x84) {
11358
+ function sendUserCustomEvent(_x85, _x86) {
11315
11359
  return _sendUserCustomEvent.apply(this, arguments);
11316
11360
  }
11317
11361
 
@@ -11408,11 +11452,11 @@ var StreamChat = /*#__PURE__*/function () {
11408
11452
  }, {
11409
11453
  key: "createSegment",
11410
11454
  value: function () {
11411
- var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(type, id, name, data) {
11455
+ var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(type, id, name, data) {
11412
11456
  var body;
11413
- return _regeneratorRuntime.wrap(function _callee63$(_context63) {
11457
+ return _regeneratorRuntime.wrap(function _callee64$(_context64) {
11414
11458
  while (1) {
11415
- switch (_context63.prev = _context63.next) {
11459
+ switch (_context64.prev = _context64.next) {
11416
11460
  case 0:
11417
11461
  this.validateServerSideAuth();
11418
11462
  body = {
@@ -11421,17 +11465,17 @@ var StreamChat = /*#__PURE__*/function () {
11421
11465
  name: name,
11422
11466
  data: data
11423
11467
  };
11424
- return _context63.abrupt("return", this.post(this.baseURL + "/segments", body));
11468
+ return _context64.abrupt("return", this.post(this.baseURL + "/segments", body));
11425
11469
 
11426
11470
  case 3:
11427
11471
  case "end":
11428
- return _context63.stop();
11472
+ return _context64.stop();
11429
11473
  }
11430
11474
  }
11431
- }, _callee63, this);
11475
+ }, _callee64, this);
11432
11476
  }));
11433
11477
 
11434
- function createSegment(_x85, _x86, _x87, _x88) {
11478
+ function createSegment(_x87, _x88, _x89, _x90) {
11435
11479
  return _createSegment.apply(this, arguments);
11436
11480
  }
11437
11481
 
@@ -11450,23 +11494,23 @@ var StreamChat = /*#__PURE__*/function () {
11450
11494
  }, {
11451
11495
  key: "createUserSegment",
11452
11496
  value: function () {
11453
- var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id, name, data) {
11454
- return _regeneratorRuntime.wrap(function _callee64$(_context64) {
11497
+ var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id, name, data) {
11498
+ return _regeneratorRuntime.wrap(function _callee65$(_context65) {
11455
11499
  while (1) {
11456
- switch (_context64.prev = _context64.next) {
11500
+ switch (_context65.prev = _context65.next) {
11457
11501
  case 0:
11458
11502
  this.validateServerSideAuth();
11459
- return _context64.abrupt("return", this.createSegment('user', id, name, data));
11503
+ return _context65.abrupt("return", this.createSegment('user', id, name, data));
11460
11504
 
11461
11505
  case 2:
11462
11506
  case "end":
11463
- return _context64.stop();
11507
+ return _context65.stop();
11464
11508
  }
11465
11509
  }
11466
- }, _callee64, this);
11510
+ }, _callee65, this);
11467
11511
  }));
11468
11512
 
11469
- function createUserSegment(_x89, _x90, _x91) {
11513
+ function createUserSegment(_x91, _x92, _x93) {
11470
11514
  return _createUserSegment.apply(this, arguments);
11471
11515
  }
11472
11516
 
@@ -11485,23 +11529,23 @@ var StreamChat = /*#__PURE__*/function () {
11485
11529
  }, {
11486
11530
  key: "createChannelSegment",
11487
11531
  value: function () {
11488
- var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id, name, data) {
11489
- return _regeneratorRuntime.wrap(function _callee65$(_context65) {
11532
+ var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id, name, data) {
11533
+ return _regeneratorRuntime.wrap(function _callee66$(_context66) {
11490
11534
  while (1) {
11491
- switch (_context65.prev = _context65.next) {
11535
+ switch (_context66.prev = _context66.next) {
11492
11536
  case 0:
11493
11537
  this.validateServerSideAuth();
11494
- return _context65.abrupt("return", this.createSegment('channel', id, name, data));
11538
+ return _context66.abrupt("return", this.createSegment('channel', id, name, data));
11495
11539
 
11496
11540
  case 2:
11497
11541
  case "end":
11498
- return _context65.stop();
11542
+ return _context66.stop();
11499
11543
  }
11500
11544
  }
11501
- }, _callee65, this);
11545
+ }, _callee66, this);
11502
11546
  }));
11503
11547
 
11504
- function createChannelSegment(_x92, _x93, _x94) {
11548
+ function createChannelSegment(_x94, _x95, _x96) {
11505
11549
  return _createChannelSegment.apply(this, arguments);
11506
11550
  }
11507
11551
 
@@ -11510,23 +11554,23 @@ var StreamChat = /*#__PURE__*/function () {
11510
11554
  }, {
11511
11555
  key: "getSegment",
11512
11556
  value: function () {
11513
- var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id) {
11514
- return _regeneratorRuntime.wrap(function _callee66$(_context66) {
11557
+ var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id) {
11558
+ return _regeneratorRuntime.wrap(function _callee67$(_context67) {
11515
11559
  while (1) {
11516
- switch (_context66.prev = _context66.next) {
11560
+ switch (_context67.prev = _context67.next) {
11517
11561
  case 0:
11518
11562
  this.validateServerSideAuth();
11519
- return _context66.abrupt("return", this.get(this.baseURL + "/segments/".concat(id)));
11563
+ return _context67.abrupt("return", this.get(this.baseURL + "/segments/".concat(id)));
11520
11564
 
11521
11565
  case 2:
11522
11566
  case "end":
11523
- return _context66.stop();
11567
+ return _context67.stop();
11524
11568
  }
11525
11569
  }
11526
- }, _callee66, this);
11570
+ }, _callee67, this);
11527
11571
  }));
11528
11572
 
11529
- function getSegment(_x95) {
11573
+ function getSegment(_x97) {
11530
11574
  return _getSegment.apply(this, arguments);
11531
11575
  }
11532
11576
 
@@ -11544,23 +11588,23 @@ var StreamChat = /*#__PURE__*/function () {
11544
11588
  }, {
11545
11589
  key: "updateSegment",
11546
11590
  value: function () {
11547
- var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id, data) {
11548
- return _regeneratorRuntime.wrap(function _callee67$(_context67) {
11591
+ var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(id, data) {
11592
+ return _regeneratorRuntime.wrap(function _callee68$(_context68) {
11549
11593
  while (1) {
11550
- switch (_context67.prev = _context67.next) {
11594
+ switch (_context68.prev = _context68.next) {
11551
11595
  case 0:
11552
11596
  this.validateServerSideAuth();
11553
- return _context67.abrupt("return", this.put(this.baseURL + "/segments/".concat(id), data));
11597
+ return _context68.abrupt("return", this.put(this.baseURL + "/segments/".concat(id), data));
11554
11598
 
11555
11599
  case 2:
11556
11600
  case "end":
11557
- return _context67.stop();
11601
+ return _context68.stop();
11558
11602
  }
11559
11603
  }
11560
- }, _callee67, this);
11604
+ }, _callee68, this);
11561
11605
  }));
11562
11606
 
11563
- function updateSegment(_x96, _x97) {
11607
+ function updateSegment(_x98, _x99) {
11564
11608
  return _updateSegment.apply(this, arguments);
11565
11609
  }
11566
11610
 
@@ -11578,27 +11622,27 @@ var StreamChat = /*#__PURE__*/function () {
11578
11622
  }, {
11579
11623
  key: "addSegmentTargets",
11580
11624
  value: function () {
11581
- var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(id, targets) {
11625
+ var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id, targets) {
11582
11626
  var body;
11583
- return _regeneratorRuntime.wrap(function _callee68$(_context68) {
11627
+ return _regeneratorRuntime.wrap(function _callee69$(_context69) {
11584
11628
  while (1) {
11585
- switch (_context68.prev = _context68.next) {
11629
+ switch (_context69.prev = _context69.next) {
11586
11630
  case 0:
11587
11631
  this.validateServerSideAuth();
11588
11632
  body = {
11589
11633
  target_ids: targets
11590
11634
  };
11591
- return _context68.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/addtargets"), body));
11635
+ return _context69.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/addtargets"), body));
11592
11636
 
11593
11637
  case 3:
11594
11638
  case "end":
11595
- return _context68.stop();
11639
+ return _context69.stop();
11596
11640
  }
11597
11641
  }
11598
- }, _callee68, this);
11642
+ }, _callee69, this);
11599
11643
  }));
11600
11644
 
11601
- function addSegmentTargets(_x98, _x99) {
11645
+ function addSegmentTargets(_x100, _x101) {
11602
11646
  return _addSegmentTargets.apply(this, arguments);
11603
11647
  }
11604
11648
 
@@ -11607,33 +11651,33 @@ var StreamChat = /*#__PURE__*/function () {
11607
11651
  }, {
11608
11652
  key: "querySegmentTargets",
11609
11653
  value: function () {
11610
- var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id) {
11654
+ var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(id) {
11611
11655
  var filter,
11612
11656
  sort,
11613
11657
  options,
11614
- _args69 = arguments;
11615
- return _regeneratorRuntime.wrap(function _callee69$(_context69) {
11658
+ _args70 = arguments;
11659
+ return _regeneratorRuntime.wrap(function _callee70$(_context70) {
11616
11660
  while (1) {
11617
- switch (_context69.prev = _context69.next) {
11661
+ switch (_context70.prev = _context70.next) {
11618
11662
  case 0:
11619
- filter = _args69.length > 1 && _args69[1] !== undefined ? _args69[1] : {};
11620
- sort = _args69.length > 2 && _args69[2] !== undefined ? _args69[2] : [];
11621
- options = _args69.length > 3 && _args69[3] !== undefined ? _args69[3] : {};
11663
+ filter = _args70.length > 1 && _args70[1] !== undefined ? _args70[1] : {};
11664
+ sort = _args70.length > 2 && _args70[2] !== undefined ? _args70[2] : [];
11665
+ options = _args70.length > 3 && _args70[3] !== undefined ? _args70[3] : {};
11622
11666
  this.validateServerSideAuth();
11623
- return _context69.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/targets/query"), _objectSpread({
11667
+ return _context70.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/targets/query"), _objectSpread({
11624
11668
  filter: filter || {},
11625
11669
  sort: sort || []
11626
11670
  }, options)));
11627
11671
 
11628
11672
  case 5:
11629
11673
  case "end":
11630
- return _context69.stop();
11674
+ return _context70.stop();
11631
11675
  }
11632
11676
  }
11633
- }, _callee69, this);
11677
+ }, _callee70, this);
11634
11678
  }));
11635
11679
 
11636
- function querySegmentTargets(_x100) {
11680
+ function querySegmentTargets(_x102) {
11637
11681
  return _querySegmentTargets.apply(this, arguments);
11638
11682
  }
11639
11683
 
@@ -11651,27 +11695,27 @@ var StreamChat = /*#__PURE__*/function () {
11651
11695
  }, {
11652
11696
  key: "removeSegmentTargets",
11653
11697
  value: function () {
11654
- var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(id, targets) {
11698
+ var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id, targets) {
11655
11699
  var body;
11656
- return _regeneratorRuntime.wrap(function _callee70$(_context70) {
11700
+ return _regeneratorRuntime.wrap(function _callee71$(_context71) {
11657
11701
  while (1) {
11658
- switch (_context70.prev = _context70.next) {
11702
+ switch (_context71.prev = _context71.next) {
11659
11703
  case 0:
11660
11704
  this.validateServerSideAuth();
11661
11705
  body = {
11662
11706
  target_ids: targets
11663
11707
  };
11664
- return _context70.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/deletetargets"), body));
11708
+ return _context71.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/deletetargets"), body));
11665
11709
 
11666
11710
  case 3:
11667
11711
  case "end":
11668
- return _context70.stop();
11712
+ return _context71.stop();
11669
11713
  }
11670
11714
  }
11671
- }, _callee70, this);
11715
+ }, _callee71, this);
11672
11716
  }));
11673
11717
 
11674
- function removeSegmentTargets(_x101, _x102) {
11718
+ function removeSegmentTargets(_x103, _x104) {
11675
11719
  return _removeSegmentTargets.apply(this, arguments);
11676
11720
  }
11677
11721
 
@@ -11689,29 +11733,29 @@ var StreamChat = /*#__PURE__*/function () {
11689
11733
  }, {
11690
11734
  key: "querySegments",
11691
11735
  value: function () {
11692
- var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(filter, sort) {
11736
+ var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(filter, sort) {
11693
11737
  var options,
11694
- _args71 = arguments;
11695
- return _regeneratorRuntime.wrap(function _callee71$(_context71) {
11738
+ _args72 = arguments;
11739
+ return _regeneratorRuntime.wrap(function _callee72$(_context72) {
11696
11740
  while (1) {
11697
- switch (_context71.prev = _context71.next) {
11741
+ switch (_context72.prev = _context72.next) {
11698
11742
  case 0:
11699
- options = _args71.length > 2 && _args71[2] !== undefined ? _args71[2] : {};
11743
+ options = _args72.length > 2 && _args72[2] !== undefined ? _args72[2] : {};
11700
11744
  this.validateServerSideAuth();
11701
- return _context71.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
11745
+ return _context72.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
11702
11746
  filter: filter,
11703
11747
  sort: sort
11704
11748
  }, options)));
11705
11749
 
11706
11750
  case 3:
11707
11751
  case "end":
11708
- return _context71.stop();
11752
+ return _context72.stop();
11709
11753
  }
11710
11754
  }
11711
- }, _callee71, this);
11755
+ }, _callee72, this);
11712
11756
  }));
11713
11757
 
11714
- function querySegments(_x103, _x104) {
11758
+ function querySegments(_x105, _x106) {
11715
11759
  return _querySegments.apply(this, arguments);
11716
11760
  }
11717
11761
 
@@ -11728,23 +11772,23 @@ var StreamChat = /*#__PURE__*/function () {
11728
11772
  }, {
11729
11773
  key: "deleteSegment",
11730
11774
  value: function () {
11731
- var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id) {
11732
- return _regeneratorRuntime.wrap(function _callee72$(_context72) {
11775
+ var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id) {
11776
+ return _regeneratorRuntime.wrap(function _callee73$(_context73) {
11733
11777
  while (1) {
11734
- switch (_context72.prev = _context72.next) {
11778
+ switch (_context73.prev = _context73.next) {
11735
11779
  case 0:
11736
11780
  this.validateServerSideAuth();
11737
- return _context72.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
11781
+ return _context73.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
11738
11782
 
11739
11783
  case 2:
11740
11784
  case "end":
11741
- return _context72.stop();
11785
+ return _context73.stop();
11742
11786
  }
11743
11787
  }
11744
- }, _callee72, this);
11788
+ }, _callee73, this);
11745
11789
  }));
11746
11790
 
11747
- function deleteSegment(_x105) {
11791
+ function deleteSegment(_x107) {
11748
11792
  return _deleteSegment.apply(this, arguments);
11749
11793
  }
11750
11794
 
@@ -11762,23 +11806,23 @@ var StreamChat = /*#__PURE__*/function () {
11762
11806
  }, {
11763
11807
  key: "segmentTargetExists",
11764
11808
  value: function () {
11765
- var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(segmentId, targetId) {
11766
- return _regeneratorRuntime.wrap(function _callee73$(_context73) {
11809
+ var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(segmentId, targetId) {
11810
+ return _regeneratorRuntime.wrap(function _callee74$(_context74) {
11767
11811
  while (1) {
11768
- switch (_context73.prev = _context73.next) {
11812
+ switch (_context74.prev = _context74.next) {
11769
11813
  case 0:
11770
11814
  this.validateServerSideAuth();
11771
- return _context73.abrupt("return", this.get(this.baseURL + "/segments/".concat(segmentId, "/target/").concat(targetId)));
11815
+ return _context74.abrupt("return", this.get(this.baseURL + "/segments/".concat(segmentId, "/target/").concat(targetId)));
11772
11816
 
11773
11817
  case 2:
11774
11818
  case "end":
11775
- return _context73.stop();
11819
+ return _context74.stop();
11776
11820
  }
11777
11821
  }
11778
- }, _callee73, this);
11822
+ }, _callee74, this);
11779
11823
  }));
11780
11824
 
11781
- function segmentTargetExists(_x106, _x107) {
11825
+ function segmentTargetExists(_x108, _x109) {
11782
11826
  return _segmentTargetExists.apply(this, arguments);
11783
11827
  }
11784
11828
 
@@ -11795,23 +11839,23 @@ var StreamChat = /*#__PURE__*/function () {
11795
11839
  }, {
11796
11840
  key: "createCampaign",
11797
11841
  value: function () {
11798
- var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(params) {
11799
- return _regeneratorRuntime.wrap(function _callee74$(_context74) {
11842
+ var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(params) {
11843
+ return _regeneratorRuntime.wrap(function _callee75$(_context75) {
11800
11844
  while (1) {
11801
- switch (_context74.prev = _context74.next) {
11845
+ switch (_context75.prev = _context75.next) {
11802
11846
  case 0:
11803
11847
  this.validateServerSideAuth();
11804
- return _context74.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
11848
+ return _context75.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
11805
11849
 
11806
11850
  case 2:
11807
11851
  case "end":
11808
- return _context74.stop();
11852
+ return _context75.stop();
11809
11853
  }
11810
11854
  }
11811
- }, _callee74, this);
11855
+ }, _callee75, this);
11812
11856
  }));
11813
11857
 
11814
- function createCampaign(_x108) {
11858
+ function createCampaign(_x110) {
11815
11859
  return _createCampaign.apply(this, arguments);
11816
11860
  }
11817
11861
 
@@ -11820,23 +11864,23 @@ var StreamChat = /*#__PURE__*/function () {
11820
11864
  }, {
11821
11865
  key: "getCampaign",
11822
11866
  value: function () {
11823
- var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(id) {
11824
- return _regeneratorRuntime.wrap(function _callee75$(_context75) {
11867
+ var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(id) {
11868
+ return _regeneratorRuntime.wrap(function _callee76$(_context76) {
11825
11869
  while (1) {
11826
- switch (_context75.prev = _context75.next) {
11870
+ switch (_context76.prev = _context76.next) {
11827
11871
  case 0:
11828
11872
  this.validateServerSideAuth();
11829
- return _context75.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(id)));
11873
+ return _context76.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(id)));
11830
11874
 
11831
11875
  case 2:
11832
11876
  case "end":
11833
- return _context75.stop();
11877
+ return _context76.stop();
11834
11878
  }
11835
11879
  }
11836
- }, _callee75, this);
11880
+ }, _callee76, this);
11837
11881
  }));
11838
11882
 
11839
- function getCampaign(_x109) {
11883
+ function getCampaign(_x111) {
11840
11884
  return _getCampaign.apply(this, arguments);
11841
11885
  }
11842
11886
 
@@ -11845,26 +11889,26 @@ var StreamChat = /*#__PURE__*/function () {
11845
11889
  }, {
11846
11890
  key: "startCampaign",
11847
11891
  value: function () {
11848
- var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(id, options) {
11849
- return _regeneratorRuntime.wrap(function _callee76$(_context76) {
11892
+ var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(id, options) {
11893
+ return _regeneratorRuntime.wrap(function _callee77$(_context77) {
11850
11894
  while (1) {
11851
- switch (_context76.prev = _context76.next) {
11895
+ switch (_context77.prev = _context77.next) {
11852
11896
  case 0:
11853
11897
  this.validateServerSideAuth();
11854
- return _context76.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/start"), {
11898
+ return _context77.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/start"), {
11855
11899
  scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
11856
11900
  stop_at: options === null || options === void 0 ? void 0 : options.stopAt
11857
11901
  }));
11858
11902
 
11859
11903
  case 2:
11860
11904
  case "end":
11861
- return _context76.stop();
11905
+ return _context77.stop();
11862
11906
  }
11863
11907
  }
11864
- }, _callee76, this);
11908
+ }, _callee77, this);
11865
11909
  }));
11866
11910
 
11867
- function startCampaign(_x110, _x111) {
11911
+ function startCampaign(_x112, _x113) {
11868
11912
  return _startCampaign.apply(this, arguments);
11869
11913
  }
11870
11914
 
@@ -11880,30 +11924,30 @@ var StreamChat = /*#__PURE__*/function () {
11880
11924
  }, {
11881
11925
  key: "queryCampaigns",
11882
11926
  value: function () {
11883
- var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(filter, sort, options) {
11884
- return _regeneratorRuntime.wrap(function _callee77$(_context77) {
11927
+ var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(filter, sort, options) {
11928
+ return _regeneratorRuntime.wrap(function _callee78$(_context78) {
11885
11929
  while (1) {
11886
- switch (_context77.prev = _context77.next) {
11930
+ switch (_context78.prev = _context78.next) {
11887
11931
  case 0:
11888
11932
  this.validateServerSideAuth();
11889
- _context77.next = 3;
11933
+ _context78.next = 3;
11890
11934
  return this.post(this.baseURL + "/campaigns/query", _objectSpread({
11891
11935
  filter: filter,
11892
11936
  sort: sort
11893
11937
  }, options || {}));
11894
11938
 
11895
11939
  case 3:
11896
- return _context77.abrupt("return", _context77.sent);
11940
+ return _context78.abrupt("return", _context78.sent);
11897
11941
 
11898
11942
  case 4:
11899
11943
  case "end":
11900
- return _context77.stop();
11944
+ return _context78.stop();
11901
11945
  }
11902
11946
  }
11903
- }, _callee77, this);
11947
+ }, _callee78, this);
11904
11948
  }));
11905
11949
 
11906
- function queryCampaigns(_x112, _x113, _x114) {
11950
+ function queryCampaigns(_x114, _x115, _x116) {
11907
11951
  return _queryCampaigns.apply(this, arguments);
11908
11952
  }
11909
11953
 
@@ -11921,23 +11965,23 @@ var StreamChat = /*#__PURE__*/function () {
11921
11965
  }, {
11922
11966
  key: "updateCampaign",
11923
11967
  value: function () {
11924
- var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(id, params) {
11925
- return _regeneratorRuntime.wrap(function _callee78$(_context78) {
11968
+ var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(id, params) {
11969
+ return _regeneratorRuntime.wrap(function _callee79$(_context79) {
11926
11970
  while (1) {
11927
- switch (_context78.prev = _context78.next) {
11971
+ switch (_context79.prev = _context79.next) {
11928
11972
  case 0:
11929
11973
  this.validateServerSideAuth();
11930
- return _context78.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(id), params));
11974
+ return _context79.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(id), params));
11931
11975
 
11932
11976
  case 2:
11933
11977
  case "end":
11934
- return _context78.stop();
11978
+ return _context79.stop();
11935
11979
  }
11936
11980
  }
11937
- }, _callee78, this);
11981
+ }, _callee79, this);
11938
11982
  }));
11939
11983
 
11940
- function updateCampaign(_x115, _x116) {
11984
+ function updateCampaign(_x117, _x118) {
11941
11985
  return _updateCampaign.apply(this, arguments);
11942
11986
  }
11943
11987
 
@@ -11954,23 +11998,23 @@ var StreamChat = /*#__PURE__*/function () {
11954
11998
  }, {
11955
11999
  key: "deleteCampaign",
11956
12000
  value: function () {
11957
- var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(id) {
11958
- return _regeneratorRuntime.wrap(function _callee79$(_context79) {
12001
+ var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(id) {
12002
+ return _regeneratorRuntime.wrap(function _callee80$(_context80) {
11959
12003
  while (1) {
11960
- switch (_context79.prev = _context79.next) {
12004
+ switch (_context80.prev = _context80.next) {
11961
12005
  case 0:
11962
12006
  this.validateServerSideAuth();
11963
- return _context79.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
12007
+ return _context80.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
11964
12008
 
11965
12009
  case 2:
11966
12010
  case "end":
11967
- return _context79.stop();
12011
+ return _context80.stop();
11968
12012
  }
11969
12013
  }
11970
- }, _callee79, this);
12014
+ }, _callee80, this);
11971
12015
  }));
11972
12016
 
11973
- function deleteCampaign(_x117) {
12017
+ function deleteCampaign(_x119) {
11974
12018
  return _deleteCampaign.apply(this, arguments);
11975
12019
  }
11976
12020
 
@@ -11987,31 +12031,31 @@ var StreamChat = /*#__PURE__*/function () {
11987
12031
  }, {
11988
12032
  key: "stopCampaign",
11989
12033
  value: function () {
11990
- var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(id) {
12034
+ var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(id) {
11991
12035
  var _yield$this$patch, campaign;
11992
12036
 
11993
- return _regeneratorRuntime.wrap(function _callee80$(_context80) {
12037
+ return _regeneratorRuntime.wrap(function _callee81$(_context81) {
11994
12038
  while (1) {
11995
- switch (_context80.prev = _context80.next) {
12039
+ switch (_context81.prev = _context81.next) {
11996
12040
  case 0:
11997
12041
  this.validateServerSideAuth();
11998
- _context80.next = 3;
12042
+ _context81.next = 3;
11999
12043
  return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
12000
12044
 
12001
12045
  case 3:
12002
- _yield$this$patch = _context80.sent;
12046
+ _yield$this$patch = _context81.sent;
12003
12047
  campaign = _yield$this$patch.campaign;
12004
- return _context80.abrupt("return", campaign);
12048
+ return _context81.abrupt("return", campaign);
12005
12049
 
12006
12050
  case 6:
12007
12051
  case "end":
12008
- return _context80.stop();
12052
+ return _context81.stop();
12009
12053
  }
12010
12054
  }
12011
- }, _callee80, this);
12055
+ }, _callee81, this);
12012
12056
  }));
12013
12057
 
12014
- function stopCampaign(_x118) {
12058
+ function stopCampaign(_x120) {
12015
12059
  return _stopCampaign.apply(this, arguments);
12016
12060
  }
12017
12061
 
@@ -12027,24 +12071,24 @@ var StreamChat = /*#__PURE__*/function () {
12027
12071
  }, {
12028
12072
  key: "enrichURL",
12029
12073
  value: function () {
12030
- var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(url) {
12031
- return _regeneratorRuntime.wrap(function _callee81$(_context81) {
12074
+ var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(url) {
12075
+ return _regeneratorRuntime.wrap(function _callee82$(_context82) {
12032
12076
  while (1) {
12033
- switch (_context81.prev = _context81.next) {
12077
+ switch (_context82.prev = _context82.next) {
12034
12078
  case 0:
12035
- return _context81.abrupt("return", this.get(this.baseURL + "/og", {
12079
+ return _context82.abrupt("return", this.get(this.baseURL + "/og", {
12036
12080
  url: url
12037
12081
  }));
12038
12082
 
12039
12083
  case 1:
12040
12084
  case "end":
12041
- return _context81.stop();
12085
+ return _context82.stop();
12042
12086
  }
12043
12087
  }
12044
- }, _callee81, this);
12088
+ }, _callee82, this);
12045
12089
  }));
12046
12090
 
12047
- function enrichURL(_x119) {
12091
+ function enrichURL(_x121) {
12048
12092
  return _enrichURL.apply(this, arguments);
12049
12093
  }
12050
12094
 
@@ -12061,22 +12105,22 @@ var StreamChat = /*#__PURE__*/function () {
12061
12105
  }, {
12062
12106
  key: "getTask",
12063
12107
  value: function () {
12064
- var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(id) {
12065
- return _regeneratorRuntime.wrap(function _callee82$(_context82) {
12108
+ var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(id) {
12109
+ return _regeneratorRuntime.wrap(function _callee83$(_context83) {
12066
12110
  while (1) {
12067
- switch (_context82.prev = _context82.next) {
12111
+ switch (_context83.prev = _context83.next) {
12068
12112
  case 0:
12069
- return _context82.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
12113
+ return _context83.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
12070
12114
 
12071
12115
  case 1:
12072
12116
  case "end":
12073
- return _context82.stop();
12117
+ return _context83.stop();
12074
12118
  }
12075
12119
  }
12076
- }, _callee82, this);
12120
+ }, _callee83, this);
12077
12121
  }));
12078
12122
 
12079
- function getTask(_x120) {
12123
+ function getTask(_x122) {
12080
12124
  return _getTask.apply(this, arguments);
12081
12125
  }
12082
12126
 
@@ -12094,31 +12138,31 @@ var StreamChat = /*#__PURE__*/function () {
12094
12138
  }, {
12095
12139
  key: "deleteChannels",
12096
12140
  value: function () {
12097
- var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(cids) {
12141
+ var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(cids) {
12098
12142
  var options,
12099
- _args83 = arguments;
12100
- return _regeneratorRuntime.wrap(function _callee83$(_context83) {
12143
+ _args84 = arguments;
12144
+ return _regeneratorRuntime.wrap(function _callee84$(_context84) {
12101
12145
  while (1) {
12102
- switch (_context83.prev = _context83.next) {
12146
+ switch (_context84.prev = _context84.next) {
12103
12147
  case 0:
12104
- options = _args83.length > 1 && _args83[1] !== undefined ? _args83[1] : {};
12105
- _context83.next = 3;
12148
+ options = _args84.length > 1 && _args84[1] !== undefined ? _args84[1] : {};
12149
+ _context84.next = 3;
12106
12150
  return this.post(this.baseURL + "/channels/delete", _objectSpread({
12107
12151
  cids: cids
12108
12152
  }, options));
12109
12153
 
12110
12154
  case 3:
12111
- return _context83.abrupt("return", _context83.sent);
12155
+ return _context84.abrupt("return", _context84.sent);
12112
12156
 
12113
12157
  case 4:
12114
12158
  case "end":
12115
- return _context83.stop();
12159
+ return _context84.stop();
12116
12160
  }
12117
12161
  }
12118
- }, _callee83, this);
12162
+ }, _callee84, this);
12119
12163
  }));
12120
12164
 
12121
- function deleteChannels(_x121) {
12165
+ function deleteChannels(_x123) {
12122
12166
  return _deleteChannels.apply(this, arguments);
12123
12167
  }
12124
12168
 
@@ -12136,17 +12180,17 @@ var StreamChat = /*#__PURE__*/function () {
12136
12180
  }, {
12137
12181
  key: "deleteUsers",
12138
12182
  value: function () {
12139
- var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(user_ids) {
12183
+ var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(user_ids) {
12140
12184
  var options,
12141
- _args84 = arguments;
12142
- return _regeneratorRuntime.wrap(function _callee84$(_context84) {
12185
+ _args85 = arguments;
12186
+ return _regeneratorRuntime.wrap(function _callee85$(_context85) {
12143
12187
  while (1) {
12144
- switch (_context84.prev = _context84.next) {
12188
+ switch (_context85.prev = _context85.next) {
12145
12189
  case 0:
12146
- options = _args84.length > 1 && _args84[1] !== undefined ? _args84[1] : {};
12190
+ options = _args85.length > 1 && _args85[1] !== undefined ? _args85[1] : {};
12147
12191
 
12148
12192
  if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
12149
- _context84.next = 3;
12193
+ _context85.next = 3;
12150
12194
  break;
12151
12195
  }
12152
12196
 
@@ -12154,7 +12198,7 @@ var StreamChat = /*#__PURE__*/function () {
12154
12198
 
12155
12199
  case 3:
12156
12200
  if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
12157
- _context84.next = 5;
12201
+ _context85.next = 5;
12158
12202
  break;
12159
12203
  }
12160
12204
 
@@ -12162,30 +12206,30 @@ var StreamChat = /*#__PURE__*/function () {
12162
12206
 
12163
12207
  case 5:
12164
12208
  if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
12165
- _context84.next = 7;
12209
+ _context85.next = 7;
12166
12210
  break;
12167
12211
  }
12168
12212
 
12169
12213
  throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
12170
12214
 
12171
12215
  case 7:
12172
- _context84.next = 9;
12216
+ _context85.next = 9;
12173
12217
  return this.post(this.baseURL + "/users/delete", _objectSpread({
12174
12218
  user_ids: user_ids
12175
12219
  }, options));
12176
12220
 
12177
12221
  case 9:
12178
- return _context84.abrupt("return", _context84.sent);
12222
+ return _context85.abrupt("return", _context85.sent);
12179
12223
 
12180
12224
  case 10:
12181
12225
  case "end":
12182
- return _context84.stop();
12226
+ return _context85.stop();
12183
12227
  }
12184
12228
  }
12185
- }, _callee84, this);
12229
+ }, _callee85, this);
12186
12230
  }));
12187
12231
 
12188
- function deleteUsers(_x122) {
12232
+ function deleteUsers(_x124) {
12189
12233
  return _deleteUsers.apply(this, arguments);
12190
12234
  }
12191
12235
 
@@ -12206,28 +12250,28 @@ var StreamChat = /*#__PURE__*/function () {
12206
12250
  }, {
12207
12251
  key: "_createImportURL",
12208
12252
  value: function () {
12209
- var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(filename) {
12210
- return _regeneratorRuntime.wrap(function _callee85$(_context85) {
12253
+ var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(filename) {
12254
+ return _regeneratorRuntime.wrap(function _callee86$(_context86) {
12211
12255
  while (1) {
12212
- switch (_context85.prev = _context85.next) {
12256
+ switch (_context86.prev = _context86.next) {
12213
12257
  case 0:
12214
- _context85.next = 2;
12258
+ _context86.next = 2;
12215
12259
  return this.post(this.baseURL + "/import_urls", {
12216
12260
  filename: filename
12217
12261
  });
12218
12262
 
12219
12263
  case 2:
12220
- return _context85.abrupt("return", _context85.sent);
12264
+ return _context86.abrupt("return", _context86.sent);
12221
12265
 
12222
12266
  case 3:
12223
12267
  case "end":
12224
- return _context85.stop();
12268
+ return _context86.stop();
12225
12269
  }
12226
12270
  }
12227
- }, _callee85, this);
12271
+ }, _callee86, this);
12228
12272
  }));
12229
12273
 
12230
- function _createImportURL(_x123) {
12274
+ function _createImportURL(_x125) {
12231
12275
  return _createImportURL2.apply(this, arguments);
12232
12276
  }
12233
12277
 
@@ -12249,33 +12293,33 @@ var StreamChat = /*#__PURE__*/function () {
12249
12293
  }, {
12250
12294
  key: "_createImport",
12251
12295
  value: function () {
12252
- var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(path) {
12296
+ var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87(path) {
12253
12297
  var options,
12254
- _args86 = arguments;
12255
- return _regeneratorRuntime.wrap(function _callee86$(_context86) {
12298
+ _args87 = arguments;
12299
+ return _regeneratorRuntime.wrap(function _callee87$(_context87) {
12256
12300
  while (1) {
12257
- switch (_context86.prev = _context86.next) {
12301
+ switch (_context87.prev = _context87.next) {
12258
12302
  case 0:
12259
- options = _args86.length > 1 && _args86[1] !== undefined ? _args86[1] : {
12303
+ options = _args87.length > 1 && _args87[1] !== undefined ? _args87[1] : {
12260
12304
  mode: 'upsert'
12261
12305
  };
12262
- _context86.next = 3;
12306
+ _context87.next = 3;
12263
12307
  return this.post(this.baseURL + "/imports", _objectSpread({
12264
12308
  path: path
12265
12309
  }, options));
12266
12310
 
12267
12311
  case 3:
12268
- return _context86.abrupt("return", _context86.sent);
12312
+ return _context87.abrupt("return", _context87.sent);
12269
12313
 
12270
12314
  case 4:
12271
12315
  case "end":
12272
- return _context86.stop();
12316
+ return _context87.stop();
12273
12317
  }
12274
12318
  }
12275
- }, _callee86, this);
12319
+ }, _callee87, this);
12276
12320
  }));
12277
12321
 
12278
- function _createImport(_x124) {
12322
+ function _createImport(_x126) {
12279
12323
  return _createImport2.apply(this, arguments);
12280
12324
  }
12281
12325
 
@@ -12297,26 +12341,26 @@ var StreamChat = /*#__PURE__*/function () {
12297
12341
  }, {
12298
12342
  key: "_getImport",
12299
12343
  value: function () {
12300
- var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87(id) {
12301
- return _regeneratorRuntime.wrap(function _callee87$(_context87) {
12344
+ var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(id) {
12345
+ return _regeneratorRuntime.wrap(function _callee88$(_context88) {
12302
12346
  while (1) {
12303
- switch (_context87.prev = _context87.next) {
12347
+ switch (_context88.prev = _context88.next) {
12304
12348
  case 0:
12305
- _context87.next = 2;
12349
+ _context88.next = 2;
12306
12350
  return this.get(this.baseURL + "/imports/".concat(id));
12307
12351
 
12308
12352
  case 2:
12309
- return _context87.abrupt("return", _context87.sent);
12353
+ return _context88.abrupt("return", _context88.sent);
12310
12354
 
12311
12355
  case 3:
12312
12356
  case "end":
12313
- return _context87.stop();
12357
+ return _context88.stop();
12314
12358
  }
12315
12359
  }
12316
- }, _callee87, this);
12360
+ }, _callee88, this);
12317
12361
  }));
12318
12362
 
12319
- function _getImport(_x125) {
12363
+ function _getImport(_x127) {
12320
12364
  return _getImport2.apply(this, arguments);
12321
12365
  }
12322
12366
 
@@ -12338,26 +12382,26 @@ var StreamChat = /*#__PURE__*/function () {
12338
12382
  }, {
12339
12383
  key: "_listImports",
12340
12384
  value: function () {
12341
- var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(options) {
12342
- return _regeneratorRuntime.wrap(function _callee88$(_context88) {
12385
+ var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee89(options) {
12386
+ return _regeneratorRuntime.wrap(function _callee89$(_context89) {
12343
12387
  while (1) {
12344
- switch (_context88.prev = _context88.next) {
12388
+ switch (_context89.prev = _context89.next) {
12345
12389
  case 0:
12346
- _context88.next = 2;
12390
+ _context89.next = 2;
12347
12391
  return this.get(this.baseURL + "/imports", options);
12348
12392
 
12349
12393
  case 2:
12350
- return _context88.abrupt("return", _context88.sent);
12394
+ return _context89.abrupt("return", _context89.sent);
12351
12395
 
12352
12396
  case 3:
12353
12397
  case "end":
12354
- return _context88.stop();
12398
+ return _context89.stop();
12355
12399
  }
12356
12400
  }
12357
- }, _callee88, this);
12401
+ }, _callee89, this);
12358
12402
  }));
12359
12403
 
12360
- function _listImports(_x126) {
12404
+ function _listImports(_x128) {
12361
12405
  return _listImports2.apply(this, arguments);
12362
12406
  }
12363
12407
 
@@ -12376,28 +12420,28 @@ var StreamChat = /*#__PURE__*/function () {
12376
12420
  }, {
12377
12421
  key: "upsertPushProvider",
12378
12422
  value: function () {
12379
- var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee89(pushProvider) {
12380
- return _regeneratorRuntime.wrap(function _callee89$(_context89) {
12423
+ var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee90(pushProvider) {
12424
+ return _regeneratorRuntime.wrap(function _callee90$(_context90) {
12381
12425
  while (1) {
12382
- switch (_context89.prev = _context89.next) {
12426
+ switch (_context90.prev = _context90.next) {
12383
12427
  case 0:
12384
- _context89.next = 2;
12428
+ _context90.next = 2;
12385
12429
  return this.post(this.baseURL + "/push_providers", {
12386
12430
  push_provider: pushProvider
12387
12431
  });
12388
12432
 
12389
12433
  case 2:
12390
- return _context89.abrupt("return", _context89.sent);
12434
+ return _context90.abrupt("return", _context90.sent);
12391
12435
 
12392
12436
  case 3:
12393
12437
  case "end":
12394
- return _context89.stop();
12438
+ return _context90.stop();
12395
12439
  }
12396
12440
  }
12397
- }, _callee89, this);
12441
+ }, _callee90, this);
12398
12442
  }));
12399
12443
 
12400
- function upsertPushProvider(_x127) {
12444
+ function upsertPushProvider(_x129) {
12401
12445
  return _upsertPushProvider.apply(this, arguments);
12402
12446
  }
12403
12447
 
@@ -12416,28 +12460,28 @@ var StreamChat = /*#__PURE__*/function () {
12416
12460
  }, {
12417
12461
  key: "deletePushProvider",
12418
12462
  value: function () {
12419
- var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee90(_ref10) {
12463
+ var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee91(_ref10) {
12420
12464
  var type, name;
12421
- return _regeneratorRuntime.wrap(function _callee90$(_context90) {
12465
+ return _regeneratorRuntime.wrap(function _callee91$(_context91) {
12422
12466
  while (1) {
12423
- switch (_context90.prev = _context90.next) {
12467
+ switch (_context91.prev = _context91.next) {
12424
12468
  case 0:
12425
12469
  type = _ref10.type, name = _ref10.name;
12426
- _context90.next = 3;
12470
+ _context91.next = 3;
12427
12471
  return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
12428
12472
 
12429
12473
  case 3:
12430
- return _context90.abrupt("return", _context90.sent);
12474
+ return _context91.abrupt("return", _context91.sent);
12431
12475
 
12432
12476
  case 4:
12433
12477
  case "end":
12434
- return _context90.stop();
12478
+ return _context91.stop();
12435
12479
  }
12436
12480
  }
12437
- }, _callee90, this);
12481
+ }, _callee91, this);
12438
12482
  }));
12439
12483
 
12440
- function deletePushProvider(_x128) {
12484
+ function deletePushProvider(_x130) {
12441
12485
  return _deletePushProvider.apply(this, arguments);
12442
12486
  }
12443
12487
 
@@ -12454,23 +12498,23 @@ var StreamChat = /*#__PURE__*/function () {
12454
12498
  }, {
12455
12499
  key: "listPushProviders",
12456
12500
  value: function () {
12457
- var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee91() {
12458
- return _regeneratorRuntime.wrap(function _callee91$(_context91) {
12501
+ var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee92() {
12502
+ return _regeneratorRuntime.wrap(function _callee92$(_context92) {
12459
12503
  while (1) {
12460
- switch (_context91.prev = _context91.next) {
12504
+ switch (_context92.prev = _context92.next) {
12461
12505
  case 0:
12462
- _context91.next = 2;
12506
+ _context92.next = 2;
12463
12507
  return this.get(this.baseURL + "/push_providers");
12464
12508
 
12465
12509
  case 2:
12466
- return _context91.abrupt("return", _context91.sent);
12510
+ return _context92.abrupt("return", _context92.sent);
12467
12511
 
12468
12512
  case 3:
12469
12513
  case "end":
12470
- return _context91.stop();
12514
+ return _context92.stop();
12471
12515
  }
12472
12516
  }
12473
- }, _callee91, this);
12517
+ }, _callee92, this);
12474
12518
  }));
12475
12519
 
12476
12520
  function listPushProviders() {
@@ -12498,26 +12542,26 @@ var StreamChat = /*#__PURE__*/function () {
12498
12542
  }, {
12499
12543
  key: "commitMessage",
12500
12544
  value: function () {
12501
- var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee92(id) {
12502
- return _regeneratorRuntime.wrap(function _callee92$(_context92) {
12545
+ var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee93(id) {
12546
+ return _regeneratorRuntime.wrap(function _callee93$(_context93) {
12503
12547
  while (1) {
12504
- switch (_context92.prev = _context92.next) {
12548
+ switch (_context93.prev = _context93.next) {
12505
12549
  case 0:
12506
- _context92.next = 2;
12550
+ _context93.next = 2;
12507
12551
  return this.post(this.baseURL + "/messages/".concat(id, "/commit"));
12508
12552
 
12509
12553
  case 2:
12510
- return _context92.abrupt("return", _context92.sent);
12554
+ return _context93.abrupt("return", _context93.sent);
12511
12555
 
12512
12556
  case 3:
12513
12557
  case "end":
12514
- return _context92.stop();
12558
+ return _context93.stop();
12515
12559
  }
12516
12560
  }
12517
- }, _callee92, this);
12561
+ }, _callee93, this);
12518
12562
  }));
12519
12563
 
12520
- function commitMessage(_x129) {
12564
+ function commitMessage(_x131) {
12521
12565
  return _commitMessage.apply(this, arguments);
12522
12566
  }
12523
12567
 
@@ -12561,6 +12605,7 @@ var EVENT_MAP = {
12561
12605
  'message.new': true,
12562
12606
  'message.read': true,
12563
12607
  'message.updated': true,
12608
+ 'message.undeleted': true,
12564
12609
  'notification.added_to_channel': true,
12565
12610
  'notification.channel_deleted': true,
12566
12611
  'notification.channel_mutes_updated': true,