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/browser.es.js +46 -49
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.full-bundle.min.js +1 -1
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/browser.js +46 -49
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +46 -49
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +46 -49
- package/dist/index.js.map +1 -1
- package/dist/types/client.d.ts +9 -7
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/segment.d.ts +1 -1
- package/dist/types/segment.d.ts.map +1 -1
- package/dist/types/types.d.ts +7 -10
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +10 -11
- package/src/segment.ts +3 -4
- package/src/types.ts +7 -11
package/dist/browser.es.js
CHANGED
|
@@ -6316,7 +6316,7 @@ var Segment = /*#__PURE__*/function () {
|
|
|
6316
6316
|
key: "create",
|
|
6317
6317
|
value: function () {
|
|
6318
6318
|
var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
6319
|
-
var _this$data, _this$data2, _this$data3, _this$data4;
|
|
6319
|
+
var _this$data, _this$data2, _this$data3, _this$data4, _this$data5;
|
|
6320
6320
|
|
|
6321
6321
|
var body;
|
|
6322
6322
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -6324,14 +6324,13 @@ var Segment = /*#__PURE__*/function () {
|
|
|
6324
6324
|
switch (_context.prev = _context.next) {
|
|
6325
6325
|
case 0:
|
|
6326
6326
|
body = {
|
|
6327
|
-
id: this.id,
|
|
6328
|
-
type: this.type,
|
|
6329
6327
|
name: (_this$data = this.data) === null || _this$data === void 0 ? void 0 : _this$data.name,
|
|
6330
6328
|
filter: (_this$data2 = this.data) === null || _this$data2 === void 0 ? void 0 : _this$data2.filter,
|
|
6331
6329
|
description: (_this$data3 = this.data) === null || _this$data3 === void 0 ? void 0 : _this$data3.description,
|
|
6332
|
-
|
|
6330
|
+
all_sender_channels: (_this$data4 = this.data) === null || _this$data4 === void 0 ? void 0 : _this$data4.all_sender_channels,
|
|
6331
|
+
all_users: (_this$data5 = this.data) === null || _this$data5 === void 0 ? void 0 : _this$data5.all_users
|
|
6333
6332
|
};
|
|
6334
|
-
return _context.abrupt("return", this.client.
|
|
6333
|
+
return _context.abrupt("return", this.client.createSegment(this.type, this.id, body));
|
|
6335
6334
|
|
|
6336
6335
|
case 2:
|
|
6337
6336
|
case "end":
|
|
@@ -11115,7 +11114,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11115
11114
|
}, {
|
|
11116
11115
|
key: "getUserAgent",
|
|
11117
11116
|
value: function getUserAgent() {
|
|
11118
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
11117
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.24.0");
|
|
11119
11118
|
}
|
|
11120
11119
|
}, {
|
|
11121
11120
|
key: "setUserAgent",
|
|
@@ -11442,8 +11441,8 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11442
11441
|
*
|
|
11443
11442
|
* @private
|
|
11444
11443
|
* @param {SegmentType} type Segment type
|
|
11445
|
-
* @param {string} id Segment ID
|
|
11446
|
-
* @param {string} name Segment name
|
|
11444
|
+
* @param {string} id Segment ID
|
|
11445
|
+
* @param {string} name Segment name
|
|
11447
11446
|
* @param {SegmentData} params Segment data
|
|
11448
11447
|
*
|
|
11449
11448
|
* @return {{segment: SegmentResponse} & APIResponse} The created Segment
|
|
@@ -11452,19 +11451,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11452
11451
|
}, {
|
|
11453
11452
|
key: "createSegment",
|
|
11454
11453
|
value: function () {
|
|
11455
|
-
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(type, id,
|
|
11454
|
+
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(type, id, data) {
|
|
11456
11455
|
var body;
|
|
11457
11456
|
return _regeneratorRuntime.wrap(function _callee64$(_context64) {
|
|
11458
11457
|
while (1) {
|
|
11459
11458
|
switch (_context64.prev = _context64.next) {
|
|
11460
11459
|
case 0:
|
|
11461
11460
|
this.validateServerSideAuth();
|
|
11462
|
-
body = {
|
|
11461
|
+
body = _objectSpread({
|
|
11463
11462
|
id: id,
|
|
11464
|
-
type: type
|
|
11465
|
-
|
|
11466
|
-
data: data
|
|
11467
|
-
};
|
|
11463
|
+
type: type
|
|
11464
|
+
}, data);
|
|
11468
11465
|
return _context64.abrupt("return", this.post(this.baseURL + "/segments", body));
|
|
11469
11466
|
|
|
11470
11467
|
case 3:
|
|
@@ -11475,7 +11472,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11475
11472
|
}, _callee64, this);
|
|
11476
11473
|
}));
|
|
11477
11474
|
|
|
11478
|
-
function createSegment(_x87, _x88, _x89
|
|
11475
|
+
function createSegment(_x87, _x88, _x89) {
|
|
11479
11476
|
return _createSegment.apply(this, arguments);
|
|
11480
11477
|
}
|
|
11481
11478
|
|
|
@@ -11484,7 +11481,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11484
11481
|
/**
|
|
11485
11482
|
* createUserSegment - Creates a user segment
|
|
11486
11483
|
*
|
|
11487
|
-
* @param {string} id Segment ID
|
|
11484
|
+
* @param {string} id Segment ID
|
|
11488
11485
|
* @param {string} name Segment name
|
|
11489
11486
|
* @param {SegmentData} data Segment data
|
|
11490
11487
|
*
|
|
@@ -11494,13 +11491,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11494
11491
|
}, {
|
|
11495
11492
|
key: "createUserSegment",
|
|
11496
11493
|
value: function () {
|
|
11497
|
-
var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id,
|
|
11494
|
+
var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id, data) {
|
|
11498
11495
|
return _regeneratorRuntime.wrap(function _callee65$(_context65) {
|
|
11499
11496
|
while (1) {
|
|
11500
11497
|
switch (_context65.prev = _context65.next) {
|
|
11501
11498
|
case 0:
|
|
11502
11499
|
this.validateServerSideAuth();
|
|
11503
|
-
return _context65.abrupt("return", this.createSegment('user', id,
|
|
11500
|
+
return _context65.abrupt("return", this.createSegment('user', id, data));
|
|
11504
11501
|
|
|
11505
11502
|
case 2:
|
|
11506
11503
|
case "end":
|
|
@@ -11510,7 +11507,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11510
11507
|
}, _callee65, this);
|
|
11511
11508
|
}));
|
|
11512
11509
|
|
|
11513
|
-
function createUserSegment(
|
|
11510
|
+
function createUserSegment(_x90, _x91) {
|
|
11514
11511
|
return _createUserSegment.apply(this, arguments);
|
|
11515
11512
|
}
|
|
11516
11513
|
|
|
@@ -11519,7 +11516,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11519
11516
|
/**
|
|
11520
11517
|
* createChannelSegment - Creates a channel segment
|
|
11521
11518
|
*
|
|
11522
|
-
* @param {string} id Segment ID
|
|
11519
|
+
* @param {string} id Segment ID
|
|
11523
11520
|
* @param {string} name Segment name
|
|
11524
11521
|
* @param {SegmentData} data Segment data
|
|
11525
11522
|
*
|
|
@@ -11529,13 +11526,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11529
11526
|
}, {
|
|
11530
11527
|
key: "createChannelSegment",
|
|
11531
11528
|
value: function () {
|
|
11532
|
-
var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id,
|
|
11529
|
+
var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id, data) {
|
|
11533
11530
|
return _regeneratorRuntime.wrap(function _callee66$(_context66) {
|
|
11534
11531
|
while (1) {
|
|
11535
11532
|
switch (_context66.prev = _context66.next) {
|
|
11536
11533
|
case 0:
|
|
11537
11534
|
this.validateServerSideAuth();
|
|
11538
|
-
return _context66.abrupt("return", this.createSegment('channel', id,
|
|
11535
|
+
return _context66.abrupt("return", this.createSegment('channel', id, data));
|
|
11539
11536
|
|
|
11540
11537
|
case 2:
|
|
11541
11538
|
case "end":
|
|
@@ -11545,7 +11542,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11545
11542
|
}, _callee66, this);
|
|
11546
11543
|
}));
|
|
11547
11544
|
|
|
11548
|
-
function createChannelSegment(
|
|
11545
|
+
function createChannelSegment(_x92, _x93) {
|
|
11549
11546
|
return _createChannelSegment.apply(this, arguments);
|
|
11550
11547
|
}
|
|
11551
11548
|
|
|
@@ -11570,7 +11567,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11570
11567
|
}, _callee67, this);
|
|
11571
11568
|
}));
|
|
11572
11569
|
|
|
11573
|
-
function getSegment(
|
|
11570
|
+
function getSegment(_x94) {
|
|
11574
11571
|
return _getSegment.apply(this, arguments);
|
|
11575
11572
|
}
|
|
11576
11573
|
|
|
@@ -11604,7 +11601,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11604
11601
|
}, _callee68, this);
|
|
11605
11602
|
}));
|
|
11606
11603
|
|
|
11607
|
-
function updateSegment(
|
|
11604
|
+
function updateSegment(_x95, _x96) {
|
|
11608
11605
|
return _updateSegment.apply(this, arguments);
|
|
11609
11606
|
}
|
|
11610
11607
|
|
|
@@ -11642,7 +11639,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11642
11639
|
}, _callee69, this);
|
|
11643
11640
|
}));
|
|
11644
11641
|
|
|
11645
|
-
function addSegmentTargets(
|
|
11642
|
+
function addSegmentTargets(_x97, _x98) {
|
|
11646
11643
|
return _addSegmentTargets.apply(this, arguments);
|
|
11647
11644
|
}
|
|
11648
11645
|
|
|
@@ -11677,7 +11674,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11677
11674
|
}, _callee70, this);
|
|
11678
11675
|
}));
|
|
11679
11676
|
|
|
11680
|
-
function querySegmentTargets(
|
|
11677
|
+
function querySegmentTargets(_x99) {
|
|
11681
11678
|
return _querySegmentTargets.apply(this, arguments);
|
|
11682
11679
|
}
|
|
11683
11680
|
|
|
@@ -11715,7 +11712,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11715
11712
|
}, _callee71, this);
|
|
11716
11713
|
}));
|
|
11717
11714
|
|
|
11718
|
-
function removeSegmentTargets(
|
|
11715
|
+
function removeSegmentTargets(_x100, _x101) {
|
|
11719
11716
|
return _removeSegmentTargets.apply(this, arguments);
|
|
11720
11717
|
}
|
|
11721
11718
|
|
|
@@ -11755,7 +11752,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11755
11752
|
}, _callee72, this);
|
|
11756
11753
|
}));
|
|
11757
11754
|
|
|
11758
|
-
function querySegments(
|
|
11755
|
+
function querySegments(_x102, _x103) {
|
|
11759
11756
|
return _querySegments.apply(this, arguments);
|
|
11760
11757
|
}
|
|
11761
11758
|
|
|
@@ -11788,7 +11785,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11788
11785
|
}, _callee73, this);
|
|
11789
11786
|
}));
|
|
11790
11787
|
|
|
11791
|
-
function deleteSegment(
|
|
11788
|
+
function deleteSegment(_x104) {
|
|
11792
11789
|
return _deleteSegment.apply(this, arguments);
|
|
11793
11790
|
}
|
|
11794
11791
|
|
|
@@ -11822,7 +11819,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11822
11819
|
}, _callee74, this);
|
|
11823
11820
|
}));
|
|
11824
11821
|
|
|
11825
|
-
function segmentTargetExists(
|
|
11822
|
+
function segmentTargetExists(_x105, _x106) {
|
|
11826
11823
|
return _segmentTargetExists.apply(this, arguments);
|
|
11827
11824
|
}
|
|
11828
11825
|
|
|
@@ -11855,7 +11852,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11855
11852
|
}, _callee75, this);
|
|
11856
11853
|
}));
|
|
11857
11854
|
|
|
11858
|
-
function createCampaign(
|
|
11855
|
+
function createCampaign(_x107) {
|
|
11859
11856
|
return _createCampaign.apply(this, arguments);
|
|
11860
11857
|
}
|
|
11861
11858
|
|
|
@@ -11880,7 +11877,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11880
11877
|
}, _callee76, this);
|
|
11881
11878
|
}));
|
|
11882
11879
|
|
|
11883
|
-
function getCampaign(
|
|
11880
|
+
function getCampaign(_x108) {
|
|
11884
11881
|
return _getCampaign.apply(this, arguments);
|
|
11885
11882
|
}
|
|
11886
11883
|
|
|
@@ -11908,7 +11905,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11908
11905
|
}, _callee77, this);
|
|
11909
11906
|
}));
|
|
11910
11907
|
|
|
11911
|
-
function startCampaign(
|
|
11908
|
+
function startCampaign(_x109, _x110) {
|
|
11912
11909
|
return _startCampaign.apply(this, arguments);
|
|
11913
11910
|
}
|
|
11914
11911
|
|
|
@@ -11947,7 +11944,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11947
11944
|
}, _callee78, this);
|
|
11948
11945
|
}));
|
|
11949
11946
|
|
|
11950
|
-
function queryCampaigns(
|
|
11947
|
+
function queryCampaigns(_x111, _x112, _x113) {
|
|
11951
11948
|
return _queryCampaigns.apply(this, arguments);
|
|
11952
11949
|
}
|
|
11953
11950
|
|
|
@@ -11981,7 +11978,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11981
11978
|
}, _callee79, this);
|
|
11982
11979
|
}));
|
|
11983
11980
|
|
|
11984
|
-
function updateCampaign(
|
|
11981
|
+
function updateCampaign(_x114, _x115) {
|
|
11985
11982
|
return _updateCampaign.apply(this, arguments);
|
|
11986
11983
|
}
|
|
11987
11984
|
|
|
@@ -12014,7 +12011,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12014
12011
|
}, _callee80, this);
|
|
12015
12012
|
}));
|
|
12016
12013
|
|
|
12017
|
-
function deleteCampaign(
|
|
12014
|
+
function deleteCampaign(_x116) {
|
|
12018
12015
|
return _deleteCampaign.apply(this, arguments);
|
|
12019
12016
|
}
|
|
12020
12017
|
|
|
@@ -12055,7 +12052,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12055
12052
|
}, _callee81, this);
|
|
12056
12053
|
}));
|
|
12057
12054
|
|
|
12058
|
-
function stopCampaign(
|
|
12055
|
+
function stopCampaign(_x117) {
|
|
12059
12056
|
return _stopCampaign.apply(this, arguments);
|
|
12060
12057
|
}
|
|
12061
12058
|
|
|
@@ -12088,7 +12085,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12088
12085
|
}, _callee82, this);
|
|
12089
12086
|
}));
|
|
12090
12087
|
|
|
12091
|
-
function enrichURL(
|
|
12088
|
+
function enrichURL(_x118) {
|
|
12092
12089
|
return _enrichURL.apply(this, arguments);
|
|
12093
12090
|
}
|
|
12094
12091
|
|
|
@@ -12120,7 +12117,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12120
12117
|
}, _callee83, this);
|
|
12121
12118
|
}));
|
|
12122
12119
|
|
|
12123
|
-
function getTask(
|
|
12120
|
+
function getTask(_x119) {
|
|
12124
12121
|
return _getTask.apply(this, arguments);
|
|
12125
12122
|
}
|
|
12126
12123
|
|
|
@@ -12162,7 +12159,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12162
12159
|
}, _callee84, this);
|
|
12163
12160
|
}));
|
|
12164
12161
|
|
|
12165
|
-
function deleteChannels(
|
|
12162
|
+
function deleteChannels(_x120) {
|
|
12166
12163
|
return _deleteChannels.apply(this, arguments);
|
|
12167
12164
|
}
|
|
12168
12165
|
|
|
@@ -12229,7 +12226,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12229
12226
|
}, _callee85, this);
|
|
12230
12227
|
}));
|
|
12231
12228
|
|
|
12232
|
-
function deleteUsers(
|
|
12229
|
+
function deleteUsers(_x121) {
|
|
12233
12230
|
return _deleteUsers.apply(this, arguments);
|
|
12234
12231
|
}
|
|
12235
12232
|
|
|
@@ -12271,7 +12268,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12271
12268
|
}, _callee86, this);
|
|
12272
12269
|
}));
|
|
12273
12270
|
|
|
12274
|
-
function _createImportURL(
|
|
12271
|
+
function _createImportURL(_x122) {
|
|
12275
12272
|
return _createImportURL2.apply(this, arguments);
|
|
12276
12273
|
}
|
|
12277
12274
|
|
|
@@ -12319,7 +12316,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12319
12316
|
}, _callee87, this);
|
|
12320
12317
|
}));
|
|
12321
12318
|
|
|
12322
|
-
function _createImport(
|
|
12319
|
+
function _createImport(_x123) {
|
|
12323
12320
|
return _createImport2.apply(this, arguments);
|
|
12324
12321
|
}
|
|
12325
12322
|
|
|
@@ -12360,7 +12357,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12360
12357
|
}, _callee88, this);
|
|
12361
12358
|
}));
|
|
12362
12359
|
|
|
12363
|
-
function _getImport(
|
|
12360
|
+
function _getImport(_x124) {
|
|
12364
12361
|
return _getImport2.apply(this, arguments);
|
|
12365
12362
|
}
|
|
12366
12363
|
|
|
@@ -12401,7 +12398,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12401
12398
|
}, _callee89, this);
|
|
12402
12399
|
}));
|
|
12403
12400
|
|
|
12404
|
-
function _listImports(
|
|
12401
|
+
function _listImports(_x125) {
|
|
12405
12402
|
return _listImports2.apply(this, arguments);
|
|
12406
12403
|
}
|
|
12407
12404
|
|
|
@@ -12441,7 +12438,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12441
12438
|
}, _callee90, this);
|
|
12442
12439
|
}));
|
|
12443
12440
|
|
|
12444
|
-
function upsertPushProvider(
|
|
12441
|
+
function upsertPushProvider(_x126) {
|
|
12445
12442
|
return _upsertPushProvider.apply(this, arguments);
|
|
12446
12443
|
}
|
|
12447
12444
|
|
|
@@ -12481,7 +12478,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12481
12478
|
}, _callee91, this);
|
|
12482
12479
|
}));
|
|
12483
12480
|
|
|
12484
|
-
function deletePushProvider(
|
|
12481
|
+
function deletePushProvider(_x127) {
|
|
12485
12482
|
return _deletePushProvider.apply(this, arguments);
|
|
12486
12483
|
}
|
|
12487
12484
|
|
|
@@ -12561,7 +12558,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12561
12558
|
}, _callee93, this);
|
|
12562
12559
|
}));
|
|
12563
12560
|
|
|
12564
|
-
function commitMessage(
|
|
12561
|
+
function commitMessage(_x128) {
|
|
12565
12562
|
return _commitMessage.apply(this, arguments);
|
|
12566
12563
|
}
|
|
12567
12564
|
|