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.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 +6 -9
- 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 +6 -10
package/dist/index.js
CHANGED
|
@@ -6347,7 +6347,7 @@ var Segment = /*#__PURE__*/function () {
|
|
|
6347
6347
|
key: "create",
|
|
6348
6348
|
value: function () {
|
|
6349
6349
|
var _create = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee() {
|
|
6350
|
-
var _this$data, _this$data2, _this$data3, _this$data4;
|
|
6350
|
+
var _this$data, _this$data2, _this$data3, _this$data4, _this$data5;
|
|
6351
6351
|
|
|
6352
6352
|
var body;
|
|
6353
6353
|
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
|
@@ -6355,14 +6355,13 @@ var Segment = /*#__PURE__*/function () {
|
|
|
6355
6355
|
switch (_context.prev = _context.next) {
|
|
6356
6356
|
case 0:
|
|
6357
6357
|
body = {
|
|
6358
|
-
id: this.id,
|
|
6359
|
-
type: this.type,
|
|
6360
6358
|
name: (_this$data = this.data) === null || _this$data === void 0 ? void 0 : _this$data.name,
|
|
6361
6359
|
filter: (_this$data2 = this.data) === null || _this$data2 === void 0 ? void 0 : _this$data2.filter,
|
|
6362
6360
|
description: (_this$data3 = this.data) === null || _this$data3 === void 0 ? void 0 : _this$data3.description,
|
|
6363
|
-
|
|
6361
|
+
all_sender_channels: (_this$data4 = this.data) === null || _this$data4 === void 0 ? void 0 : _this$data4.all_sender_channels,
|
|
6362
|
+
all_users: (_this$data5 = this.data) === null || _this$data5 === void 0 ? void 0 : _this$data5.all_users
|
|
6364
6363
|
};
|
|
6365
|
-
return _context.abrupt("return", this.client.
|
|
6364
|
+
return _context.abrupt("return", this.client.createSegment(this.type, this.id, body));
|
|
6366
6365
|
|
|
6367
6366
|
case 2:
|
|
6368
6367
|
case "end":
|
|
@@ -11146,7 +11145,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11146
11145
|
}, {
|
|
11147
11146
|
key: "getUserAgent",
|
|
11148
11147
|
value: function getUserAgent() {
|
|
11149
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
11148
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.24.0");
|
|
11150
11149
|
}
|
|
11151
11150
|
}, {
|
|
11152
11151
|
key: "setUserAgent",
|
|
@@ -11473,8 +11472,8 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11473
11472
|
*
|
|
11474
11473
|
* @private
|
|
11475
11474
|
* @param {SegmentType} type Segment type
|
|
11476
|
-
* @param {string} id Segment ID
|
|
11477
|
-
* @param {string} name Segment name
|
|
11475
|
+
* @param {string} id Segment ID
|
|
11476
|
+
* @param {string} name Segment name
|
|
11478
11477
|
* @param {SegmentData} params Segment data
|
|
11479
11478
|
*
|
|
11480
11479
|
* @return {{segment: SegmentResponse} & APIResponse} The created Segment
|
|
@@ -11483,19 +11482,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11483
11482
|
}, {
|
|
11484
11483
|
key: "createSegment",
|
|
11485
11484
|
value: function () {
|
|
11486
|
-
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee64(type, id,
|
|
11485
|
+
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee64(type, id, data) {
|
|
11487
11486
|
var body;
|
|
11488
11487
|
return _regeneratorRuntime__default['default'].wrap(function _callee64$(_context64) {
|
|
11489
11488
|
while (1) {
|
|
11490
11489
|
switch (_context64.prev = _context64.next) {
|
|
11491
11490
|
case 0:
|
|
11492
11491
|
this.validateServerSideAuth();
|
|
11493
|
-
body = {
|
|
11492
|
+
body = _objectSpread({
|
|
11494
11493
|
id: id,
|
|
11495
|
-
type: type
|
|
11496
|
-
|
|
11497
|
-
data: data
|
|
11498
|
-
};
|
|
11494
|
+
type: type
|
|
11495
|
+
}, data);
|
|
11499
11496
|
return _context64.abrupt("return", this.post(this.baseURL + "/segments", body));
|
|
11500
11497
|
|
|
11501
11498
|
case 3:
|
|
@@ -11506,7 +11503,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11506
11503
|
}, _callee64, this);
|
|
11507
11504
|
}));
|
|
11508
11505
|
|
|
11509
|
-
function createSegment(_x87, _x88, _x89
|
|
11506
|
+
function createSegment(_x87, _x88, _x89) {
|
|
11510
11507
|
return _createSegment.apply(this, arguments);
|
|
11511
11508
|
}
|
|
11512
11509
|
|
|
@@ -11515,7 +11512,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11515
11512
|
/**
|
|
11516
11513
|
* createUserSegment - Creates a user segment
|
|
11517
11514
|
*
|
|
11518
|
-
* @param {string} id Segment ID
|
|
11515
|
+
* @param {string} id Segment ID
|
|
11519
11516
|
* @param {string} name Segment name
|
|
11520
11517
|
* @param {SegmentData} data Segment data
|
|
11521
11518
|
*
|
|
@@ -11525,13 +11522,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11525
11522
|
}, {
|
|
11526
11523
|
key: "createUserSegment",
|
|
11527
11524
|
value: function () {
|
|
11528
|
-
var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee65(id,
|
|
11525
|
+
var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee65(id, data) {
|
|
11529
11526
|
return _regeneratorRuntime__default['default'].wrap(function _callee65$(_context65) {
|
|
11530
11527
|
while (1) {
|
|
11531
11528
|
switch (_context65.prev = _context65.next) {
|
|
11532
11529
|
case 0:
|
|
11533
11530
|
this.validateServerSideAuth();
|
|
11534
|
-
return _context65.abrupt("return", this.createSegment('user', id,
|
|
11531
|
+
return _context65.abrupt("return", this.createSegment('user', id, data));
|
|
11535
11532
|
|
|
11536
11533
|
case 2:
|
|
11537
11534
|
case "end":
|
|
@@ -11541,7 +11538,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11541
11538
|
}, _callee65, this);
|
|
11542
11539
|
}));
|
|
11543
11540
|
|
|
11544
|
-
function createUserSegment(
|
|
11541
|
+
function createUserSegment(_x90, _x91) {
|
|
11545
11542
|
return _createUserSegment.apply(this, arguments);
|
|
11546
11543
|
}
|
|
11547
11544
|
|
|
@@ -11550,7 +11547,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11550
11547
|
/**
|
|
11551
11548
|
* createChannelSegment - Creates a channel segment
|
|
11552
11549
|
*
|
|
11553
|
-
* @param {string} id Segment ID
|
|
11550
|
+
* @param {string} id Segment ID
|
|
11554
11551
|
* @param {string} name Segment name
|
|
11555
11552
|
* @param {SegmentData} data Segment data
|
|
11556
11553
|
*
|
|
@@ -11560,13 +11557,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11560
11557
|
}, {
|
|
11561
11558
|
key: "createChannelSegment",
|
|
11562
11559
|
value: function () {
|
|
11563
|
-
var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee66(id,
|
|
11560
|
+
var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee66(id, data) {
|
|
11564
11561
|
return _regeneratorRuntime__default['default'].wrap(function _callee66$(_context66) {
|
|
11565
11562
|
while (1) {
|
|
11566
11563
|
switch (_context66.prev = _context66.next) {
|
|
11567
11564
|
case 0:
|
|
11568
11565
|
this.validateServerSideAuth();
|
|
11569
|
-
return _context66.abrupt("return", this.createSegment('channel', id,
|
|
11566
|
+
return _context66.abrupt("return", this.createSegment('channel', id, data));
|
|
11570
11567
|
|
|
11571
11568
|
case 2:
|
|
11572
11569
|
case "end":
|
|
@@ -11576,7 +11573,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11576
11573
|
}, _callee66, this);
|
|
11577
11574
|
}));
|
|
11578
11575
|
|
|
11579
|
-
function createChannelSegment(
|
|
11576
|
+
function createChannelSegment(_x92, _x93) {
|
|
11580
11577
|
return _createChannelSegment.apply(this, arguments);
|
|
11581
11578
|
}
|
|
11582
11579
|
|
|
@@ -11601,7 +11598,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11601
11598
|
}, _callee67, this);
|
|
11602
11599
|
}));
|
|
11603
11600
|
|
|
11604
|
-
function getSegment(
|
|
11601
|
+
function getSegment(_x94) {
|
|
11605
11602
|
return _getSegment.apply(this, arguments);
|
|
11606
11603
|
}
|
|
11607
11604
|
|
|
@@ -11635,7 +11632,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11635
11632
|
}, _callee68, this);
|
|
11636
11633
|
}));
|
|
11637
11634
|
|
|
11638
|
-
function updateSegment(
|
|
11635
|
+
function updateSegment(_x95, _x96) {
|
|
11639
11636
|
return _updateSegment.apply(this, arguments);
|
|
11640
11637
|
}
|
|
11641
11638
|
|
|
@@ -11673,7 +11670,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11673
11670
|
}, _callee69, this);
|
|
11674
11671
|
}));
|
|
11675
11672
|
|
|
11676
|
-
function addSegmentTargets(
|
|
11673
|
+
function addSegmentTargets(_x97, _x98) {
|
|
11677
11674
|
return _addSegmentTargets.apply(this, arguments);
|
|
11678
11675
|
}
|
|
11679
11676
|
|
|
@@ -11708,7 +11705,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11708
11705
|
}, _callee70, this);
|
|
11709
11706
|
}));
|
|
11710
11707
|
|
|
11711
|
-
function querySegmentTargets(
|
|
11708
|
+
function querySegmentTargets(_x99) {
|
|
11712
11709
|
return _querySegmentTargets.apply(this, arguments);
|
|
11713
11710
|
}
|
|
11714
11711
|
|
|
@@ -11746,7 +11743,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11746
11743
|
}, _callee71, this);
|
|
11747
11744
|
}));
|
|
11748
11745
|
|
|
11749
|
-
function removeSegmentTargets(
|
|
11746
|
+
function removeSegmentTargets(_x100, _x101) {
|
|
11750
11747
|
return _removeSegmentTargets.apply(this, arguments);
|
|
11751
11748
|
}
|
|
11752
11749
|
|
|
@@ -11786,7 +11783,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11786
11783
|
}, _callee72, this);
|
|
11787
11784
|
}));
|
|
11788
11785
|
|
|
11789
|
-
function querySegments(
|
|
11786
|
+
function querySegments(_x102, _x103) {
|
|
11790
11787
|
return _querySegments.apply(this, arguments);
|
|
11791
11788
|
}
|
|
11792
11789
|
|
|
@@ -11819,7 +11816,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11819
11816
|
}, _callee73, this);
|
|
11820
11817
|
}));
|
|
11821
11818
|
|
|
11822
|
-
function deleteSegment(
|
|
11819
|
+
function deleteSegment(_x104) {
|
|
11823
11820
|
return _deleteSegment.apply(this, arguments);
|
|
11824
11821
|
}
|
|
11825
11822
|
|
|
@@ -11853,7 +11850,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11853
11850
|
}, _callee74, this);
|
|
11854
11851
|
}));
|
|
11855
11852
|
|
|
11856
|
-
function segmentTargetExists(
|
|
11853
|
+
function segmentTargetExists(_x105, _x106) {
|
|
11857
11854
|
return _segmentTargetExists.apply(this, arguments);
|
|
11858
11855
|
}
|
|
11859
11856
|
|
|
@@ -11886,7 +11883,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11886
11883
|
}, _callee75, this);
|
|
11887
11884
|
}));
|
|
11888
11885
|
|
|
11889
|
-
function createCampaign(
|
|
11886
|
+
function createCampaign(_x107) {
|
|
11890
11887
|
return _createCampaign.apply(this, arguments);
|
|
11891
11888
|
}
|
|
11892
11889
|
|
|
@@ -11911,7 +11908,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11911
11908
|
}, _callee76, this);
|
|
11912
11909
|
}));
|
|
11913
11910
|
|
|
11914
|
-
function getCampaign(
|
|
11911
|
+
function getCampaign(_x108) {
|
|
11915
11912
|
return _getCampaign.apply(this, arguments);
|
|
11916
11913
|
}
|
|
11917
11914
|
|
|
@@ -11939,7 +11936,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11939
11936
|
}, _callee77, this);
|
|
11940
11937
|
}));
|
|
11941
11938
|
|
|
11942
|
-
function startCampaign(
|
|
11939
|
+
function startCampaign(_x109, _x110) {
|
|
11943
11940
|
return _startCampaign.apply(this, arguments);
|
|
11944
11941
|
}
|
|
11945
11942
|
|
|
@@ -11978,7 +11975,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11978
11975
|
}, _callee78, this);
|
|
11979
11976
|
}));
|
|
11980
11977
|
|
|
11981
|
-
function queryCampaigns(
|
|
11978
|
+
function queryCampaigns(_x111, _x112, _x113) {
|
|
11982
11979
|
return _queryCampaigns.apply(this, arguments);
|
|
11983
11980
|
}
|
|
11984
11981
|
|
|
@@ -12012,7 +12009,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12012
12009
|
}, _callee79, this);
|
|
12013
12010
|
}));
|
|
12014
12011
|
|
|
12015
|
-
function updateCampaign(
|
|
12012
|
+
function updateCampaign(_x114, _x115) {
|
|
12016
12013
|
return _updateCampaign.apply(this, arguments);
|
|
12017
12014
|
}
|
|
12018
12015
|
|
|
@@ -12045,7 +12042,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12045
12042
|
}, _callee80, this);
|
|
12046
12043
|
}));
|
|
12047
12044
|
|
|
12048
|
-
function deleteCampaign(
|
|
12045
|
+
function deleteCampaign(_x116) {
|
|
12049
12046
|
return _deleteCampaign.apply(this, arguments);
|
|
12050
12047
|
}
|
|
12051
12048
|
|
|
@@ -12086,7 +12083,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12086
12083
|
}, _callee81, this);
|
|
12087
12084
|
}));
|
|
12088
12085
|
|
|
12089
|
-
function stopCampaign(
|
|
12086
|
+
function stopCampaign(_x117) {
|
|
12090
12087
|
return _stopCampaign.apply(this, arguments);
|
|
12091
12088
|
}
|
|
12092
12089
|
|
|
@@ -12119,7 +12116,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12119
12116
|
}, _callee82, this);
|
|
12120
12117
|
}));
|
|
12121
12118
|
|
|
12122
|
-
function enrichURL(
|
|
12119
|
+
function enrichURL(_x118) {
|
|
12123
12120
|
return _enrichURL.apply(this, arguments);
|
|
12124
12121
|
}
|
|
12125
12122
|
|
|
@@ -12151,7 +12148,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12151
12148
|
}, _callee83, this);
|
|
12152
12149
|
}));
|
|
12153
12150
|
|
|
12154
|
-
function getTask(
|
|
12151
|
+
function getTask(_x119) {
|
|
12155
12152
|
return _getTask.apply(this, arguments);
|
|
12156
12153
|
}
|
|
12157
12154
|
|
|
@@ -12193,7 +12190,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12193
12190
|
}, _callee84, this);
|
|
12194
12191
|
}));
|
|
12195
12192
|
|
|
12196
|
-
function deleteChannels(
|
|
12193
|
+
function deleteChannels(_x120) {
|
|
12197
12194
|
return _deleteChannels.apply(this, arguments);
|
|
12198
12195
|
}
|
|
12199
12196
|
|
|
@@ -12260,7 +12257,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12260
12257
|
}, _callee85, this);
|
|
12261
12258
|
}));
|
|
12262
12259
|
|
|
12263
|
-
function deleteUsers(
|
|
12260
|
+
function deleteUsers(_x121) {
|
|
12264
12261
|
return _deleteUsers.apply(this, arguments);
|
|
12265
12262
|
}
|
|
12266
12263
|
|
|
@@ -12302,7 +12299,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12302
12299
|
}, _callee86, this);
|
|
12303
12300
|
}));
|
|
12304
12301
|
|
|
12305
|
-
function _createImportURL(
|
|
12302
|
+
function _createImportURL(_x122) {
|
|
12306
12303
|
return _createImportURL2.apply(this, arguments);
|
|
12307
12304
|
}
|
|
12308
12305
|
|
|
@@ -12350,7 +12347,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12350
12347
|
}, _callee87, this);
|
|
12351
12348
|
}));
|
|
12352
12349
|
|
|
12353
|
-
function _createImport(
|
|
12350
|
+
function _createImport(_x123) {
|
|
12354
12351
|
return _createImport2.apply(this, arguments);
|
|
12355
12352
|
}
|
|
12356
12353
|
|
|
@@ -12391,7 +12388,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12391
12388
|
}, _callee88, this);
|
|
12392
12389
|
}));
|
|
12393
12390
|
|
|
12394
|
-
function _getImport(
|
|
12391
|
+
function _getImport(_x124) {
|
|
12395
12392
|
return _getImport2.apply(this, arguments);
|
|
12396
12393
|
}
|
|
12397
12394
|
|
|
@@ -12432,7 +12429,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12432
12429
|
}, _callee89, this);
|
|
12433
12430
|
}));
|
|
12434
12431
|
|
|
12435
|
-
function _listImports(
|
|
12432
|
+
function _listImports(_x125) {
|
|
12436
12433
|
return _listImports2.apply(this, arguments);
|
|
12437
12434
|
}
|
|
12438
12435
|
|
|
@@ -12472,7 +12469,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12472
12469
|
}, _callee90, this);
|
|
12473
12470
|
}));
|
|
12474
12471
|
|
|
12475
|
-
function upsertPushProvider(
|
|
12472
|
+
function upsertPushProvider(_x126) {
|
|
12476
12473
|
return _upsertPushProvider.apply(this, arguments);
|
|
12477
12474
|
}
|
|
12478
12475
|
|
|
@@ -12512,7 +12509,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12512
12509
|
}, _callee91, this);
|
|
12513
12510
|
}));
|
|
12514
12511
|
|
|
12515
|
-
function deletePushProvider(
|
|
12512
|
+
function deletePushProvider(_x127) {
|
|
12516
12513
|
return _deletePushProvider.apply(this, arguments);
|
|
12517
12514
|
}
|
|
12518
12515
|
|
|
@@ -12592,7 +12589,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12592
12589
|
}, _callee93, this);
|
|
12593
12590
|
}));
|
|
12594
12591
|
|
|
12595
|
-
function commitMessage(
|
|
12592
|
+
function commitMessage(_x128) {
|
|
12596
12593
|
return _commitMessage.apply(this, arguments);
|
|
12597
12594
|
}
|
|
12598
12595
|
|