stream-chat 8.23.1 → 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/browser.js CHANGED
@@ -6341,7 +6341,7 @@ var Segment = /*#__PURE__*/function () {
6341
6341
  key: "create",
6342
6342
  value: function () {
6343
6343
  var _create = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee() {
6344
- var _this$data, _this$data2, _this$data3, _this$data4;
6344
+ var _this$data, _this$data2, _this$data3, _this$data4, _this$data5;
6345
6345
 
6346
6346
  var body;
6347
6347
  return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
@@ -6349,14 +6349,13 @@ var Segment = /*#__PURE__*/function () {
6349
6349
  switch (_context.prev = _context.next) {
6350
6350
  case 0:
6351
6351
  body = {
6352
- id: this.id,
6353
- type: this.type,
6354
6352
  name: (_this$data = this.data) === null || _this$data === void 0 ? void 0 : _this$data.name,
6355
6353
  filter: (_this$data2 = this.data) === null || _this$data2 === void 0 ? void 0 : _this$data2.filter,
6356
6354
  description: (_this$data3 = this.data) === null || _this$data3 === void 0 ? void 0 : _this$data3.description,
6357
- all_users: (_this$data4 = this.data) === null || _this$data4 === void 0 ? void 0 : _this$data4.all_users
6355
+ all_sender_channels: (_this$data4 = this.data) === null || _this$data4 === void 0 ? void 0 : _this$data4.all_sender_channels,
6356
+ all_users: (_this$data5 = this.data) === null || _this$data5 === void 0 ? void 0 : _this$data5.all_users
6358
6357
  };
6359
- return _context.abrupt("return", this.client.post(this.client.baseURL + "/segments", body));
6358
+ return _context.abrupt("return", this.client.createSegment(this.type, this.id, body));
6360
6359
 
6361
6360
  case 2:
6362
6361
  case "end":
@@ -11140,7 +11139,7 @@ var StreamChat = /*#__PURE__*/function () {
11140
11139
  }, {
11141
11140
  key: "getUserAgent",
11142
11141
  value: function getUserAgent() {
11143
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.23.1");
11142
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.24.0");
11144
11143
  }
11145
11144
  }, {
11146
11145
  key: "setUserAgent",
@@ -11467,8 +11466,8 @@ var StreamChat = /*#__PURE__*/function () {
11467
11466
  *
11468
11467
  * @private
11469
11468
  * @param {SegmentType} type Segment type
11470
- * @param {string} id Segment ID (valid UUID)
11471
- * @param {string} name Segment name (valid UUID)
11469
+ * @param {string} id Segment ID
11470
+ * @param {string} name Segment name
11472
11471
  * @param {SegmentData} params Segment data
11473
11472
  *
11474
11473
  * @return {{segment: SegmentResponse} & APIResponse} The created Segment
@@ -11477,19 +11476,17 @@ var StreamChat = /*#__PURE__*/function () {
11477
11476
  }, {
11478
11477
  key: "createSegment",
11479
11478
  value: function () {
11480
- var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee64(type, id, name, data) {
11479
+ var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee64(type, id, data) {
11481
11480
  var body;
11482
11481
  return _regeneratorRuntime__default['default'].wrap(function _callee64$(_context64) {
11483
11482
  while (1) {
11484
11483
  switch (_context64.prev = _context64.next) {
11485
11484
  case 0:
11486
11485
  this.validateServerSideAuth();
11487
- body = {
11486
+ body = _objectSpread({
11488
11487
  id: id,
11489
- type: type,
11490
- name: name,
11491
- data: data
11492
- };
11488
+ type: type
11489
+ }, data);
11493
11490
  return _context64.abrupt("return", this.post(this.baseURL + "/segments", body));
11494
11491
 
11495
11492
  case 3:
@@ -11500,7 +11497,7 @@ var StreamChat = /*#__PURE__*/function () {
11500
11497
  }, _callee64, this);
11501
11498
  }));
11502
11499
 
11503
- function createSegment(_x87, _x88, _x89, _x90) {
11500
+ function createSegment(_x87, _x88, _x89) {
11504
11501
  return _createSegment.apply(this, arguments);
11505
11502
  }
11506
11503
 
@@ -11509,7 +11506,7 @@ var StreamChat = /*#__PURE__*/function () {
11509
11506
  /**
11510
11507
  * createUserSegment - Creates a user segment
11511
11508
  *
11512
- * @param {string} id Segment ID (valid UUID)
11509
+ * @param {string} id Segment ID
11513
11510
  * @param {string} name Segment name
11514
11511
  * @param {SegmentData} data Segment data
11515
11512
  *
@@ -11519,13 +11516,13 @@ var StreamChat = /*#__PURE__*/function () {
11519
11516
  }, {
11520
11517
  key: "createUserSegment",
11521
11518
  value: function () {
11522
- var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee65(id, name, data) {
11519
+ var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee65(id, data) {
11523
11520
  return _regeneratorRuntime__default['default'].wrap(function _callee65$(_context65) {
11524
11521
  while (1) {
11525
11522
  switch (_context65.prev = _context65.next) {
11526
11523
  case 0:
11527
11524
  this.validateServerSideAuth();
11528
- return _context65.abrupt("return", this.createSegment('user', id, name, data));
11525
+ return _context65.abrupt("return", this.createSegment('user', id, data));
11529
11526
 
11530
11527
  case 2:
11531
11528
  case "end":
@@ -11535,7 +11532,7 @@ var StreamChat = /*#__PURE__*/function () {
11535
11532
  }, _callee65, this);
11536
11533
  }));
11537
11534
 
11538
- function createUserSegment(_x91, _x92, _x93) {
11535
+ function createUserSegment(_x90, _x91) {
11539
11536
  return _createUserSegment.apply(this, arguments);
11540
11537
  }
11541
11538
 
@@ -11544,7 +11541,7 @@ var StreamChat = /*#__PURE__*/function () {
11544
11541
  /**
11545
11542
  * createChannelSegment - Creates a channel segment
11546
11543
  *
11547
- * @param {string} id Segment ID (valid UUID)
11544
+ * @param {string} id Segment ID
11548
11545
  * @param {string} name Segment name
11549
11546
  * @param {SegmentData} data Segment data
11550
11547
  *
@@ -11554,13 +11551,13 @@ var StreamChat = /*#__PURE__*/function () {
11554
11551
  }, {
11555
11552
  key: "createChannelSegment",
11556
11553
  value: function () {
11557
- var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee66(id, name, data) {
11554
+ var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee66(id, data) {
11558
11555
  return _regeneratorRuntime__default['default'].wrap(function _callee66$(_context66) {
11559
11556
  while (1) {
11560
11557
  switch (_context66.prev = _context66.next) {
11561
11558
  case 0:
11562
11559
  this.validateServerSideAuth();
11563
- return _context66.abrupt("return", this.createSegment('channel', id, name, data));
11560
+ return _context66.abrupt("return", this.createSegment('channel', id, data));
11564
11561
 
11565
11562
  case 2:
11566
11563
  case "end":
@@ -11570,7 +11567,7 @@ var StreamChat = /*#__PURE__*/function () {
11570
11567
  }, _callee66, this);
11571
11568
  }));
11572
11569
 
11573
- function createChannelSegment(_x94, _x95, _x96) {
11570
+ function createChannelSegment(_x92, _x93) {
11574
11571
  return _createChannelSegment.apply(this, arguments);
11575
11572
  }
11576
11573
 
@@ -11595,7 +11592,7 @@ var StreamChat = /*#__PURE__*/function () {
11595
11592
  }, _callee67, this);
11596
11593
  }));
11597
11594
 
11598
- function getSegment(_x97) {
11595
+ function getSegment(_x94) {
11599
11596
  return _getSegment.apply(this, arguments);
11600
11597
  }
11601
11598
 
@@ -11629,7 +11626,7 @@ var StreamChat = /*#__PURE__*/function () {
11629
11626
  }, _callee68, this);
11630
11627
  }));
11631
11628
 
11632
- function updateSegment(_x98, _x99) {
11629
+ function updateSegment(_x95, _x96) {
11633
11630
  return _updateSegment.apply(this, arguments);
11634
11631
  }
11635
11632
 
@@ -11667,7 +11664,7 @@ var StreamChat = /*#__PURE__*/function () {
11667
11664
  }, _callee69, this);
11668
11665
  }));
11669
11666
 
11670
- function addSegmentTargets(_x100, _x101) {
11667
+ function addSegmentTargets(_x97, _x98) {
11671
11668
  return _addSegmentTargets.apply(this, arguments);
11672
11669
  }
11673
11670
 
@@ -11702,7 +11699,7 @@ var StreamChat = /*#__PURE__*/function () {
11702
11699
  }, _callee70, this);
11703
11700
  }));
11704
11701
 
11705
- function querySegmentTargets(_x102) {
11702
+ function querySegmentTargets(_x99) {
11706
11703
  return _querySegmentTargets.apply(this, arguments);
11707
11704
  }
11708
11705
 
@@ -11740,7 +11737,7 @@ var StreamChat = /*#__PURE__*/function () {
11740
11737
  }, _callee71, this);
11741
11738
  }));
11742
11739
 
11743
- function removeSegmentTargets(_x103, _x104) {
11740
+ function removeSegmentTargets(_x100, _x101) {
11744
11741
  return _removeSegmentTargets.apply(this, arguments);
11745
11742
  }
11746
11743
 
@@ -11780,7 +11777,7 @@ var StreamChat = /*#__PURE__*/function () {
11780
11777
  }, _callee72, this);
11781
11778
  }));
11782
11779
 
11783
- function querySegments(_x105, _x106) {
11780
+ function querySegments(_x102, _x103) {
11784
11781
  return _querySegments.apply(this, arguments);
11785
11782
  }
11786
11783
 
@@ -11813,7 +11810,7 @@ var StreamChat = /*#__PURE__*/function () {
11813
11810
  }, _callee73, this);
11814
11811
  }));
11815
11812
 
11816
- function deleteSegment(_x107) {
11813
+ function deleteSegment(_x104) {
11817
11814
  return _deleteSegment.apply(this, arguments);
11818
11815
  }
11819
11816
 
@@ -11847,7 +11844,7 @@ var StreamChat = /*#__PURE__*/function () {
11847
11844
  }, _callee74, this);
11848
11845
  }));
11849
11846
 
11850
- function segmentTargetExists(_x108, _x109) {
11847
+ function segmentTargetExists(_x105, _x106) {
11851
11848
  return _segmentTargetExists.apply(this, arguments);
11852
11849
  }
11853
11850
 
@@ -11880,7 +11877,7 @@ var StreamChat = /*#__PURE__*/function () {
11880
11877
  }, _callee75, this);
11881
11878
  }));
11882
11879
 
11883
- function createCampaign(_x110) {
11880
+ function createCampaign(_x107) {
11884
11881
  return _createCampaign.apply(this, arguments);
11885
11882
  }
11886
11883
 
@@ -11905,7 +11902,7 @@ var StreamChat = /*#__PURE__*/function () {
11905
11902
  }, _callee76, this);
11906
11903
  }));
11907
11904
 
11908
- function getCampaign(_x111) {
11905
+ function getCampaign(_x108) {
11909
11906
  return _getCampaign.apply(this, arguments);
11910
11907
  }
11911
11908
 
@@ -11933,7 +11930,7 @@ var StreamChat = /*#__PURE__*/function () {
11933
11930
  }, _callee77, this);
11934
11931
  }));
11935
11932
 
11936
- function startCampaign(_x112, _x113) {
11933
+ function startCampaign(_x109, _x110) {
11937
11934
  return _startCampaign.apply(this, arguments);
11938
11935
  }
11939
11936
 
@@ -11972,7 +11969,7 @@ var StreamChat = /*#__PURE__*/function () {
11972
11969
  }, _callee78, this);
11973
11970
  }));
11974
11971
 
11975
- function queryCampaigns(_x114, _x115, _x116) {
11972
+ function queryCampaigns(_x111, _x112, _x113) {
11976
11973
  return _queryCampaigns.apply(this, arguments);
11977
11974
  }
11978
11975
 
@@ -12006,7 +12003,7 @@ var StreamChat = /*#__PURE__*/function () {
12006
12003
  }, _callee79, this);
12007
12004
  }));
12008
12005
 
12009
- function updateCampaign(_x117, _x118) {
12006
+ function updateCampaign(_x114, _x115) {
12010
12007
  return _updateCampaign.apply(this, arguments);
12011
12008
  }
12012
12009
 
@@ -12039,7 +12036,7 @@ var StreamChat = /*#__PURE__*/function () {
12039
12036
  }, _callee80, this);
12040
12037
  }));
12041
12038
 
12042
- function deleteCampaign(_x119) {
12039
+ function deleteCampaign(_x116) {
12043
12040
  return _deleteCampaign.apply(this, arguments);
12044
12041
  }
12045
12042
 
@@ -12080,7 +12077,7 @@ var StreamChat = /*#__PURE__*/function () {
12080
12077
  }, _callee81, this);
12081
12078
  }));
12082
12079
 
12083
- function stopCampaign(_x120) {
12080
+ function stopCampaign(_x117) {
12084
12081
  return _stopCampaign.apply(this, arguments);
12085
12082
  }
12086
12083
 
@@ -12113,7 +12110,7 @@ var StreamChat = /*#__PURE__*/function () {
12113
12110
  }, _callee82, this);
12114
12111
  }));
12115
12112
 
12116
- function enrichURL(_x121) {
12113
+ function enrichURL(_x118) {
12117
12114
  return _enrichURL.apply(this, arguments);
12118
12115
  }
12119
12116
 
@@ -12145,7 +12142,7 @@ var StreamChat = /*#__PURE__*/function () {
12145
12142
  }, _callee83, this);
12146
12143
  }));
12147
12144
 
12148
- function getTask(_x122) {
12145
+ function getTask(_x119) {
12149
12146
  return _getTask.apply(this, arguments);
12150
12147
  }
12151
12148
 
@@ -12187,7 +12184,7 @@ var StreamChat = /*#__PURE__*/function () {
12187
12184
  }, _callee84, this);
12188
12185
  }));
12189
12186
 
12190
- function deleteChannels(_x123) {
12187
+ function deleteChannels(_x120) {
12191
12188
  return _deleteChannels.apply(this, arguments);
12192
12189
  }
12193
12190
 
@@ -12254,7 +12251,7 @@ var StreamChat = /*#__PURE__*/function () {
12254
12251
  }, _callee85, this);
12255
12252
  }));
12256
12253
 
12257
- function deleteUsers(_x124) {
12254
+ function deleteUsers(_x121) {
12258
12255
  return _deleteUsers.apply(this, arguments);
12259
12256
  }
12260
12257
 
@@ -12296,7 +12293,7 @@ var StreamChat = /*#__PURE__*/function () {
12296
12293
  }, _callee86, this);
12297
12294
  }));
12298
12295
 
12299
- function _createImportURL(_x125) {
12296
+ function _createImportURL(_x122) {
12300
12297
  return _createImportURL2.apply(this, arguments);
12301
12298
  }
12302
12299
 
@@ -12344,7 +12341,7 @@ var StreamChat = /*#__PURE__*/function () {
12344
12341
  }, _callee87, this);
12345
12342
  }));
12346
12343
 
12347
- function _createImport(_x126) {
12344
+ function _createImport(_x123) {
12348
12345
  return _createImport2.apply(this, arguments);
12349
12346
  }
12350
12347
 
@@ -12385,7 +12382,7 @@ var StreamChat = /*#__PURE__*/function () {
12385
12382
  }, _callee88, this);
12386
12383
  }));
12387
12384
 
12388
- function _getImport(_x127) {
12385
+ function _getImport(_x124) {
12389
12386
  return _getImport2.apply(this, arguments);
12390
12387
  }
12391
12388
 
@@ -12426,7 +12423,7 @@ var StreamChat = /*#__PURE__*/function () {
12426
12423
  }, _callee89, this);
12427
12424
  }));
12428
12425
 
12429
- function _listImports(_x128) {
12426
+ function _listImports(_x125) {
12430
12427
  return _listImports2.apply(this, arguments);
12431
12428
  }
12432
12429
 
@@ -12466,7 +12463,7 @@ var StreamChat = /*#__PURE__*/function () {
12466
12463
  }, _callee90, this);
12467
12464
  }));
12468
12465
 
12469
- function upsertPushProvider(_x129) {
12466
+ function upsertPushProvider(_x126) {
12470
12467
  return _upsertPushProvider.apply(this, arguments);
12471
12468
  }
12472
12469
 
@@ -12506,7 +12503,7 @@ var StreamChat = /*#__PURE__*/function () {
12506
12503
  }, _callee91, this);
12507
12504
  }));
12508
12505
 
12509
- function deletePushProvider(_x130) {
12506
+ function deletePushProvider(_x127) {
12510
12507
  return _deletePushProvider.apply(this, arguments);
12511
12508
  }
12512
12509
 
@@ -12586,7 +12583,7 @@ var StreamChat = /*#__PURE__*/function () {
12586
12583
  }, _callee93, this);
12587
12584
  }));
12588
12585
 
12589
- function commitMessage(_x131) {
12586
+ function commitMessage(_x128) {
12590
12587
  return _commitMessage.apply(this, arguments);
12591
12588
  }
12592
12589