stream-chat 8.23.0 → 8.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -6319,7 +6319,7 @@ var Segment = /*#__PURE__*/function () {
6319
6319
  key: "create",
6320
6320
  value: function () {
6321
6321
  var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
6322
- var _this$data, _this$data2, _this$data3, _this$data4;
6322
+ var _this$data, _this$data2, _this$data3, _this$data4, _this$data5;
6323
6323
 
6324
6324
  var body;
6325
6325
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -6327,14 +6327,13 @@ var Segment = /*#__PURE__*/function () {
6327
6327
  switch (_context.prev = _context.next) {
6328
6328
  case 0:
6329
6329
  body = {
6330
- id: this.id,
6331
- type: this.type,
6332
6330
  name: (_this$data = this.data) === null || _this$data === void 0 ? void 0 : _this$data.name,
6333
6331
  filter: (_this$data2 = this.data) === null || _this$data2 === void 0 ? void 0 : _this$data2.filter,
6334
6332
  description: (_this$data3 = this.data) === null || _this$data3 === void 0 ? void 0 : _this$data3.description,
6335
- all_users: (_this$data4 = this.data) === null || _this$data4 === void 0 ? void 0 : _this$data4.all_users
6333
+ all_sender_channels: (_this$data4 = this.data) === null || _this$data4 === void 0 ? void 0 : _this$data4.all_sender_channels,
6334
+ all_users: (_this$data5 = this.data) === null || _this$data5 === void 0 ? void 0 : _this$data5.all_users
6336
6335
  };
6337
- return _context.abrupt("return", this.client.post(this.client.baseURL + "/segments", body));
6336
+ return _context.abrupt("return", this.client.createSegment(this.type, this.id, body));
6338
6337
 
6339
6338
  case 2:
6340
6339
  case "end":
@@ -11118,7 +11117,7 @@ var StreamChat = /*#__PURE__*/function () {
11118
11117
  }, {
11119
11118
  key: "getUserAgent",
11120
11119
  value: function getUserAgent() {
11121
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.23.0");
11120
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.24.0");
11122
11121
  }
11123
11122
  }, {
11124
11123
  key: "setUserAgent",
@@ -11445,8 +11444,8 @@ var StreamChat = /*#__PURE__*/function () {
11445
11444
  *
11446
11445
  * @private
11447
11446
  * @param {SegmentType} type Segment type
11448
- * @param {string} id Segment ID (valid UUID)
11449
- * @param {string} name Segment name (valid UUID)
11447
+ * @param {string} id Segment ID
11448
+ * @param {string} name Segment name
11450
11449
  * @param {SegmentData} params Segment data
11451
11450
  *
11452
11451
  * @return {{segment: SegmentResponse} & APIResponse} The created Segment
@@ -11455,19 +11454,17 @@ var StreamChat = /*#__PURE__*/function () {
11455
11454
  }, {
11456
11455
  key: "createSegment",
11457
11456
  value: function () {
11458
- var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(type, id, name, data) {
11457
+ var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(type, id, data) {
11459
11458
  var body;
11460
11459
  return _regeneratorRuntime.wrap(function _callee64$(_context64) {
11461
11460
  while (1) {
11462
11461
  switch (_context64.prev = _context64.next) {
11463
11462
  case 0:
11464
11463
  this.validateServerSideAuth();
11465
- body = {
11464
+ body = _objectSpread({
11466
11465
  id: id,
11467
- type: type,
11468
- name: name,
11469
- data: data
11470
- };
11466
+ type: type
11467
+ }, data);
11471
11468
  return _context64.abrupt("return", this.post(this.baseURL + "/segments", body));
11472
11469
 
11473
11470
  case 3:
@@ -11478,7 +11475,7 @@ var StreamChat = /*#__PURE__*/function () {
11478
11475
  }, _callee64, this);
11479
11476
  }));
11480
11477
 
11481
- function createSegment(_x87, _x88, _x89, _x90) {
11478
+ function createSegment(_x87, _x88, _x89) {
11482
11479
  return _createSegment.apply(this, arguments);
11483
11480
  }
11484
11481
 
@@ -11487,7 +11484,7 @@ var StreamChat = /*#__PURE__*/function () {
11487
11484
  /**
11488
11485
  * createUserSegment - Creates a user segment
11489
11486
  *
11490
- * @param {string} id Segment ID (valid UUID)
11487
+ * @param {string} id Segment ID
11491
11488
  * @param {string} name Segment name
11492
11489
  * @param {SegmentData} data Segment data
11493
11490
  *
@@ -11497,13 +11494,13 @@ var StreamChat = /*#__PURE__*/function () {
11497
11494
  }, {
11498
11495
  key: "createUserSegment",
11499
11496
  value: function () {
11500
- var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id, name, data) {
11497
+ var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id, data) {
11501
11498
  return _regeneratorRuntime.wrap(function _callee65$(_context65) {
11502
11499
  while (1) {
11503
11500
  switch (_context65.prev = _context65.next) {
11504
11501
  case 0:
11505
11502
  this.validateServerSideAuth();
11506
- return _context65.abrupt("return", this.createSegment('user', id, name, data));
11503
+ return _context65.abrupt("return", this.createSegment('user', id, data));
11507
11504
 
11508
11505
  case 2:
11509
11506
  case "end":
@@ -11513,7 +11510,7 @@ var StreamChat = /*#__PURE__*/function () {
11513
11510
  }, _callee65, this);
11514
11511
  }));
11515
11512
 
11516
- function createUserSegment(_x91, _x92, _x93) {
11513
+ function createUserSegment(_x90, _x91) {
11517
11514
  return _createUserSegment.apply(this, arguments);
11518
11515
  }
11519
11516
 
@@ -11522,7 +11519,7 @@ var StreamChat = /*#__PURE__*/function () {
11522
11519
  /**
11523
11520
  * createChannelSegment - Creates a channel segment
11524
11521
  *
11525
- * @param {string} id Segment ID (valid UUID)
11522
+ * @param {string} id Segment ID
11526
11523
  * @param {string} name Segment name
11527
11524
  * @param {SegmentData} data Segment data
11528
11525
  *
@@ -11532,13 +11529,13 @@ var StreamChat = /*#__PURE__*/function () {
11532
11529
  }, {
11533
11530
  key: "createChannelSegment",
11534
11531
  value: function () {
11535
- var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id, name, data) {
11532
+ var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id, data) {
11536
11533
  return _regeneratorRuntime.wrap(function _callee66$(_context66) {
11537
11534
  while (1) {
11538
11535
  switch (_context66.prev = _context66.next) {
11539
11536
  case 0:
11540
11537
  this.validateServerSideAuth();
11541
- return _context66.abrupt("return", this.createSegment('channel', id, name, data));
11538
+ return _context66.abrupt("return", this.createSegment('channel', id, data));
11542
11539
 
11543
11540
  case 2:
11544
11541
  case "end":
@@ -11548,7 +11545,7 @@ var StreamChat = /*#__PURE__*/function () {
11548
11545
  }, _callee66, this);
11549
11546
  }));
11550
11547
 
11551
- function createChannelSegment(_x94, _x95, _x96) {
11548
+ function createChannelSegment(_x92, _x93) {
11552
11549
  return _createChannelSegment.apply(this, arguments);
11553
11550
  }
11554
11551
 
@@ -11573,7 +11570,7 @@ var StreamChat = /*#__PURE__*/function () {
11573
11570
  }, _callee67, this);
11574
11571
  }));
11575
11572
 
11576
- function getSegment(_x97) {
11573
+ function getSegment(_x94) {
11577
11574
  return _getSegment.apply(this, arguments);
11578
11575
  }
11579
11576
 
@@ -11607,7 +11604,7 @@ var StreamChat = /*#__PURE__*/function () {
11607
11604
  }, _callee68, this);
11608
11605
  }));
11609
11606
 
11610
- function updateSegment(_x98, _x99) {
11607
+ function updateSegment(_x95, _x96) {
11611
11608
  return _updateSegment.apply(this, arguments);
11612
11609
  }
11613
11610
 
@@ -11645,7 +11642,7 @@ var StreamChat = /*#__PURE__*/function () {
11645
11642
  }, _callee69, this);
11646
11643
  }));
11647
11644
 
11648
- function addSegmentTargets(_x100, _x101) {
11645
+ function addSegmentTargets(_x97, _x98) {
11649
11646
  return _addSegmentTargets.apply(this, arguments);
11650
11647
  }
11651
11648
 
@@ -11680,7 +11677,7 @@ var StreamChat = /*#__PURE__*/function () {
11680
11677
  }, _callee70, this);
11681
11678
  }));
11682
11679
 
11683
- function querySegmentTargets(_x102) {
11680
+ function querySegmentTargets(_x99) {
11684
11681
  return _querySegmentTargets.apply(this, arguments);
11685
11682
  }
11686
11683
 
@@ -11718,7 +11715,7 @@ var StreamChat = /*#__PURE__*/function () {
11718
11715
  }, _callee71, this);
11719
11716
  }));
11720
11717
 
11721
- function removeSegmentTargets(_x103, _x104) {
11718
+ function removeSegmentTargets(_x100, _x101) {
11722
11719
  return _removeSegmentTargets.apply(this, arguments);
11723
11720
  }
11724
11721
 
@@ -11758,7 +11755,7 @@ var StreamChat = /*#__PURE__*/function () {
11758
11755
  }, _callee72, this);
11759
11756
  }));
11760
11757
 
11761
- function querySegments(_x105, _x106) {
11758
+ function querySegments(_x102, _x103) {
11762
11759
  return _querySegments.apply(this, arguments);
11763
11760
  }
11764
11761
 
@@ -11791,7 +11788,7 @@ var StreamChat = /*#__PURE__*/function () {
11791
11788
  }, _callee73, this);
11792
11789
  }));
11793
11790
 
11794
- function deleteSegment(_x107) {
11791
+ function deleteSegment(_x104) {
11795
11792
  return _deleteSegment.apply(this, arguments);
11796
11793
  }
11797
11794
 
@@ -11825,7 +11822,7 @@ var StreamChat = /*#__PURE__*/function () {
11825
11822
  }, _callee74, this);
11826
11823
  }));
11827
11824
 
11828
- function segmentTargetExists(_x108, _x109) {
11825
+ function segmentTargetExists(_x105, _x106) {
11829
11826
  return _segmentTargetExists.apply(this, arguments);
11830
11827
  }
11831
11828
 
@@ -11858,7 +11855,7 @@ var StreamChat = /*#__PURE__*/function () {
11858
11855
  }, _callee75, this);
11859
11856
  }));
11860
11857
 
11861
- function createCampaign(_x110) {
11858
+ function createCampaign(_x107) {
11862
11859
  return _createCampaign.apply(this, arguments);
11863
11860
  }
11864
11861
 
@@ -11883,7 +11880,7 @@ var StreamChat = /*#__PURE__*/function () {
11883
11880
  }, _callee76, this);
11884
11881
  }));
11885
11882
 
11886
- function getCampaign(_x111) {
11883
+ function getCampaign(_x108) {
11887
11884
  return _getCampaign.apply(this, arguments);
11888
11885
  }
11889
11886
 
@@ -11911,7 +11908,7 @@ var StreamChat = /*#__PURE__*/function () {
11911
11908
  }, _callee77, this);
11912
11909
  }));
11913
11910
 
11914
- function startCampaign(_x112, _x113) {
11911
+ function startCampaign(_x109, _x110) {
11915
11912
  return _startCampaign.apply(this, arguments);
11916
11913
  }
11917
11914
 
@@ -11950,7 +11947,7 @@ var StreamChat = /*#__PURE__*/function () {
11950
11947
  }, _callee78, this);
11951
11948
  }));
11952
11949
 
11953
- function queryCampaigns(_x114, _x115, _x116) {
11950
+ function queryCampaigns(_x111, _x112, _x113) {
11954
11951
  return _queryCampaigns.apply(this, arguments);
11955
11952
  }
11956
11953
 
@@ -11984,7 +11981,7 @@ var StreamChat = /*#__PURE__*/function () {
11984
11981
  }, _callee79, this);
11985
11982
  }));
11986
11983
 
11987
- function updateCampaign(_x117, _x118) {
11984
+ function updateCampaign(_x114, _x115) {
11988
11985
  return _updateCampaign.apply(this, arguments);
11989
11986
  }
11990
11987
 
@@ -12017,7 +12014,7 @@ var StreamChat = /*#__PURE__*/function () {
12017
12014
  }, _callee80, this);
12018
12015
  }));
12019
12016
 
12020
- function deleteCampaign(_x119) {
12017
+ function deleteCampaign(_x116) {
12021
12018
  return _deleteCampaign.apply(this, arguments);
12022
12019
  }
12023
12020
 
@@ -12058,7 +12055,7 @@ var StreamChat = /*#__PURE__*/function () {
12058
12055
  }, _callee81, this);
12059
12056
  }));
12060
12057
 
12061
- function stopCampaign(_x120) {
12058
+ function stopCampaign(_x117) {
12062
12059
  return _stopCampaign.apply(this, arguments);
12063
12060
  }
12064
12061
 
@@ -12091,7 +12088,7 @@ var StreamChat = /*#__PURE__*/function () {
12091
12088
  }, _callee82, this);
12092
12089
  }));
12093
12090
 
12094
- function enrichURL(_x121) {
12091
+ function enrichURL(_x118) {
12095
12092
  return _enrichURL.apply(this, arguments);
12096
12093
  }
12097
12094
 
@@ -12123,7 +12120,7 @@ var StreamChat = /*#__PURE__*/function () {
12123
12120
  }, _callee83, this);
12124
12121
  }));
12125
12122
 
12126
- function getTask(_x122) {
12123
+ function getTask(_x119) {
12127
12124
  return _getTask.apply(this, arguments);
12128
12125
  }
12129
12126
 
@@ -12165,7 +12162,7 @@ var StreamChat = /*#__PURE__*/function () {
12165
12162
  }, _callee84, this);
12166
12163
  }));
12167
12164
 
12168
- function deleteChannels(_x123) {
12165
+ function deleteChannels(_x120) {
12169
12166
  return _deleteChannels.apply(this, arguments);
12170
12167
  }
12171
12168
 
@@ -12232,7 +12229,7 @@ var StreamChat = /*#__PURE__*/function () {
12232
12229
  }, _callee85, this);
12233
12230
  }));
12234
12231
 
12235
- function deleteUsers(_x124) {
12232
+ function deleteUsers(_x121) {
12236
12233
  return _deleteUsers.apply(this, arguments);
12237
12234
  }
12238
12235
 
@@ -12274,7 +12271,7 @@ var StreamChat = /*#__PURE__*/function () {
12274
12271
  }, _callee86, this);
12275
12272
  }));
12276
12273
 
12277
- function _createImportURL(_x125) {
12274
+ function _createImportURL(_x122) {
12278
12275
  return _createImportURL2.apply(this, arguments);
12279
12276
  }
12280
12277
 
@@ -12322,7 +12319,7 @@ var StreamChat = /*#__PURE__*/function () {
12322
12319
  }, _callee87, this);
12323
12320
  }));
12324
12321
 
12325
- function _createImport(_x126) {
12322
+ function _createImport(_x123) {
12326
12323
  return _createImport2.apply(this, arguments);
12327
12324
  }
12328
12325
 
@@ -12363,7 +12360,7 @@ var StreamChat = /*#__PURE__*/function () {
12363
12360
  }, _callee88, this);
12364
12361
  }));
12365
12362
 
12366
- function _getImport(_x127) {
12363
+ function _getImport(_x124) {
12367
12364
  return _getImport2.apply(this, arguments);
12368
12365
  }
12369
12366
 
@@ -12404,7 +12401,7 @@ var StreamChat = /*#__PURE__*/function () {
12404
12401
  }, _callee89, this);
12405
12402
  }));
12406
12403
 
12407
- function _listImports(_x128) {
12404
+ function _listImports(_x125) {
12408
12405
  return _listImports2.apply(this, arguments);
12409
12406
  }
12410
12407
 
@@ -12444,7 +12441,7 @@ var StreamChat = /*#__PURE__*/function () {
12444
12441
  }, _callee90, this);
12445
12442
  }));
12446
12443
 
12447
- function upsertPushProvider(_x129) {
12444
+ function upsertPushProvider(_x126) {
12448
12445
  return _upsertPushProvider.apply(this, arguments);
12449
12446
  }
12450
12447
 
@@ -12484,7 +12481,7 @@ var StreamChat = /*#__PURE__*/function () {
12484
12481
  }, _callee91, this);
12485
12482
  }));
12486
12483
 
12487
- function deletePushProvider(_x130) {
12484
+ function deletePushProvider(_x127) {
12488
12485
  return _deletePushProvider.apply(this, arguments);
12489
12486
  }
12490
12487
 
@@ -12564,7 +12561,7 @@ var StreamChat = /*#__PURE__*/function () {
12564
12561
  }, _callee93, this);
12565
12562
  }));
12566
12563
 
12567
- function commitMessage(_x131) {
12564
+ function commitMessage(_x128) {
12568
12565
  return _commitMessage.apply(this, arguments);
12569
12566
  }
12570
12567