stream-chat 8.33.1 → 8.35.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 +678 -584
- 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 +678 -584
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +678 -584
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +678 -584
- package/dist/index.js.map +1 -1
- package/dist/types/client.d.ts +4 -1
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/types.d.ts +20 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +19 -0
- package/src/types.ts +22 -0
package/dist/index.js
CHANGED
|
@@ -10344,6 +10344,100 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10344
10344
|
|
|
10345
10345
|
return removeShadowBan;
|
|
10346
10346
|
}()
|
|
10347
|
+
}, {
|
|
10348
|
+
key: "blockUser",
|
|
10349
|
+
value: function () {
|
|
10350
|
+
var _blockUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee43(blockedUserID, user_id) {
|
|
10351
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee43$(_context43) {
|
|
10352
|
+
while (1) {
|
|
10353
|
+
switch (_context43.prev = _context43.next) {
|
|
10354
|
+
case 0:
|
|
10355
|
+
_context43.next = 2;
|
|
10356
|
+
return this.post(this.baseURL + '/users/block', _objectSpread({
|
|
10357
|
+
blocked_user_id: blockedUserID
|
|
10358
|
+
}, user_id ? {
|
|
10359
|
+
user_id: user_id
|
|
10360
|
+
} : {}));
|
|
10361
|
+
|
|
10362
|
+
case 2:
|
|
10363
|
+
return _context43.abrupt("return", _context43.sent);
|
|
10364
|
+
|
|
10365
|
+
case 3:
|
|
10366
|
+
case "end":
|
|
10367
|
+
return _context43.stop();
|
|
10368
|
+
}
|
|
10369
|
+
}
|
|
10370
|
+
}, _callee43, this);
|
|
10371
|
+
}));
|
|
10372
|
+
|
|
10373
|
+
function blockUser(_x56, _x57) {
|
|
10374
|
+
return _blockUser.apply(this, arguments);
|
|
10375
|
+
}
|
|
10376
|
+
|
|
10377
|
+
return blockUser;
|
|
10378
|
+
}()
|
|
10379
|
+
}, {
|
|
10380
|
+
key: "getBlockedUsers",
|
|
10381
|
+
value: function () {
|
|
10382
|
+
var _getBlockedUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee44(user_id) {
|
|
10383
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee44$(_context44) {
|
|
10384
|
+
while (1) {
|
|
10385
|
+
switch (_context44.prev = _context44.next) {
|
|
10386
|
+
case 0:
|
|
10387
|
+
_context44.next = 2;
|
|
10388
|
+
return this.get(this.baseURL + '/users/block', _objectSpread({}, user_id ? {
|
|
10389
|
+
user_id: user_id
|
|
10390
|
+
} : {}));
|
|
10391
|
+
|
|
10392
|
+
case 2:
|
|
10393
|
+
return _context44.abrupt("return", _context44.sent);
|
|
10394
|
+
|
|
10395
|
+
case 3:
|
|
10396
|
+
case "end":
|
|
10397
|
+
return _context44.stop();
|
|
10398
|
+
}
|
|
10399
|
+
}
|
|
10400
|
+
}, _callee44, this);
|
|
10401
|
+
}));
|
|
10402
|
+
|
|
10403
|
+
function getBlockedUsers(_x58) {
|
|
10404
|
+
return _getBlockedUsers.apply(this, arguments);
|
|
10405
|
+
}
|
|
10406
|
+
|
|
10407
|
+
return getBlockedUsers;
|
|
10408
|
+
}()
|
|
10409
|
+
}, {
|
|
10410
|
+
key: "unBlockUser",
|
|
10411
|
+
value: function () {
|
|
10412
|
+
var _unBlockUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee45(blockedUserID, userID) {
|
|
10413
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee45$(_context45) {
|
|
10414
|
+
while (1) {
|
|
10415
|
+
switch (_context45.prev = _context45.next) {
|
|
10416
|
+
case 0:
|
|
10417
|
+
_context45.next = 2;
|
|
10418
|
+
return this.post(this.baseURL + '/users/unblock', _objectSpread({
|
|
10419
|
+
blocked_user_id: blockedUserID
|
|
10420
|
+
}, userID ? {
|
|
10421
|
+
user_id: userID
|
|
10422
|
+
} : {}));
|
|
10423
|
+
|
|
10424
|
+
case 2:
|
|
10425
|
+
return _context45.abrupt("return", _context45.sent);
|
|
10426
|
+
|
|
10427
|
+
case 3:
|
|
10428
|
+
case "end":
|
|
10429
|
+
return _context45.stop();
|
|
10430
|
+
}
|
|
10431
|
+
}
|
|
10432
|
+
}, _callee45, this);
|
|
10433
|
+
}));
|
|
10434
|
+
|
|
10435
|
+
function unBlockUser(_x59, _x60) {
|
|
10436
|
+
return _unBlockUser.apply(this, arguments);
|
|
10437
|
+
}
|
|
10438
|
+
|
|
10439
|
+
return unBlockUser;
|
|
10440
|
+
}()
|
|
10347
10441
|
/** muteUser - mutes a user
|
|
10348
10442
|
*
|
|
10349
10443
|
* @param {string} targetID
|
|
@@ -10355,15 +10449,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10355
10449
|
}, {
|
|
10356
10450
|
key: "muteUser",
|
|
10357
10451
|
value: function () {
|
|
10358
|
-
var _muteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10452
|
+
var _muteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee46(targetID, userID) {
|
|
10359
10453
|
var options,
|
|
10360
|
-
|
|
10361
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10454
|
+
_args46 = arguments;
|
|
10455
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee46$(_context46) {
|
|
10362
10456
|
while (1) {
|
|
10363
|
-
switch (
|
|
10457
|
+
switch (_context46.prev = _context46.next) {
|
|
10364
10458
|
case 0:
|
|
10365
|
-
options =
|
|
10366
|
-
|
|
10459
|
+
options = _args46.length > 2 && _args46[2] !== undefined ? _args46[2] : {};
|
|
10460
|
+
_context46.next = 3;
|
|
10367
10461
|
return this.post(this.baseURL + '/moderation/mute', _objectSpread(_objectSpread({
|
|
10368
10462
|
target_id: targetID
|
|
10369
10463
|
}, userID ? {
|
|
@@ -10371,17 +10465,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10371
10465
|
} : {}), options));
|
|
10372
10466
|
|
|
10373
10467
|
case 3:
|
|
10374
|
-
return
|
|
10468
|
+
return _context46.abrupt("return", _context46.sent);
|
|
10375
10469
|
|
|
10376
10470
|
case 4:
|
|
10377
10471
|
case "end":
|
|
10378
|
-
return
|
|
10472
|
+
return _context46.stop();
|
|
10379
10473
|
}
|
|
10380
10474
|
}
|
|
10381
|
-
},
|
|
10475
|
+
}, _callee46, this);
|
|
10382
10476
|
}));
|
|
10383
10477
|
|
|
10384
|
-
function muteUser(
|
|
10478
|
+
function muteUser(_x61, _x62) {
|
|
10385
10479
|
return _muteUser.apply(this, arguments);
|
|
10386
10480
|
}
|
|
10387
10481
|
|
|
@@ -10397,12 +10491,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10397
10491
|
}, {
|
|
10398
10492
|
key: "unmuteUser",
|
|
10399
10493
|
value: function () {
|
|
10400
|
-
var _unmuteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10401
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10494
|
+
var _unmuteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee47(targetID, currentUserID) {
|
|
10495
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee47$(_context47) {
|
|
10402
10496
|
while (1) {
|
|
10403
|
-
switch (
|
|
10497
|
+
switch (_context47.prev = _context47.next) {
|
|
10404
10498
|
case 0:
|
|
10405
|
-
|
|
10499
|
+
_context47.next = 2;
|
|
10406
10500
|
return this.post(this.baseURL + '/moderation/unmute', _objectSpread({
|
|
10407
10501
|
target_id: targetID
|
|
10408
10502
|
}, currentUserID ? {
|
|
@@ -10410,17 +10504,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10410
10504
|
} : {}));
|
|
10411
10505
|
|
|
10412
10506
|
case 2:
|
|
10413
|
-
return
|
|
10507
|
+
return _context47.abrupt("return", _context47.sent);
|
|
10414
10508
|
|
|
10415
10509
|
case 3:
|
|
10416
10510
|
case "end":
|
|
10417
|
-
return
|
|
10511
|
+
return _context47.stop();
|
|
10418
10512
|
}
|
|
10419
10513
|
}
|
|
10420
|
-
},
|
|
10514
|
+
}, _callee47, this);
|
|
10421
10515
|
}));
|
|
10422
10516
|
|
|
10423
|
-
function unmuteUser(
|
|
10517
|
+
function unmuteUser(_x63, _x64) {
|
|
10424
10518
|
return _unmuteUser.apply(this, arguments);
|
|
10425
10519
|
}
|
|
10426
10520
|
|
|
@@ -10455,31 +10549,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10455
10549
|
}, {
|
|
10456
10550
|
key: "flagMessage",
|
|
10457
10551
|
value: function () {
|
|
10458
|
-
var _flagMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10552
|
+
var _flagMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee48(targetMessageID) {
|
|
10459
10553
|
var options,
|
|
10460
|
-
|
|
10461
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10554
|
+
_args48 = arguments;
|
|
10555
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee48$(_context48) {
|
|
10462
10556
|
while (1) {
|
|
10463
|
-
switch (
|
|
10557
|
+
switch (_context48.prev = _context48.next) {
|
|
10464
10558
|
case 0:
|
|
10465
|
-
options =
|
|
10466
|
-
|
|
10559
|
+
options = _args48.length > 1 && _args48[1] !== undefined ? _args48[1] : {};
|
|
10560
|
+
_context48.next = 3;
|
|
10467
10561
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
10468
10562
|
target_message_id: targetMessageID
|
|
10469
10563
|
}, options));
|
|
10470
10564
|
|
|
10471
10565
|
case 3:
|
|
10472
|
-
return
|
|
10566
|
+
return _context48.abrupt("return", _context48.sent);
|
|
10473
10567
|
|
|
10474
10568
|
case 4:
|
|
10475
10569
|
case "end":
|
|
10476
|
-
return
|
|
10570
|
+
return _context48.stop();
|
|
10477
10571
|
}
|
|
10478
10572
|
}
|
|
10479
|
-
},
|
|
10573
|
+
}, _callee48, this);
|
|
10480
10574
|
}));
|
|
10481
10575
|
|
|
10482
|
-
function flagMessage(
|
|
10576
|
+
function flagMessage(_x65) {
|
|
10483
10577
|
return _flagMessage.apply(this, arguments);
|
|
10484
10578
|
}
|
|
10485
10579
|
|
|
@@ -10495,31 +10589,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10495
10589
|
}, {
|
|
10496
10590
|
key: "flagUser",
|
|
10497
10591
|
value: function () {
|
|
10498
|
-
var _flagUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10592
|
+
var _flagUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee49(targetID) {
|
|
10499
10593
|
var options,
|
|
10500
|
-
|
|
10501
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10594
|
+
_args49 = arguments;
|
|
10595
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee49$(_context49) {
|
|
10502
10596
|
while (1) {
|
|
10503
|
-
switch (
|
|
10597
|
+
switch (_context49.prev = _context49.next) {
|
|
10504
10598
|
case 0:
|
|
10505
|
-
options =
|
|
10506
|
-
|
|
10599
|
+
options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
|
|
10600
|
+
_context49.next = 3;
|
|
10507
10601
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
10508
10602
|
target_user_id: targetID
|
|
10509
10603
|
}, options));
|
|
10510
10604
|
|
|
10511
10605
|
case 3:
|
|
10512
|
-
return
|
|
10606
|
+
return _context49.abrupt("return", _context49.sent);
|
|
10513
10607
|
|
|
10514
10608
|
case 4:
|
|
10515
10609
|
case "end":
|
|
10516
|
-
return
|
|
10610
|
+
return _context49.stop();
|
|
10517
10611
|
}
|
|
10518
10612
|
}
|
|
10519
|
-
},
|
|
10613
|
+
}, _callee49, this);
|
|
10520
10614
|
}));
|
|
10521
10615
|
|
|
10522
|
-
function flagUser(
|
|
10616
|
+
function flagUser(_x66) {
|
|
10523
10617
|
return _flagUser.apply(this, arguments);
|
|
10524
10618
|
}
|
|
10525
10619
|
|
|
@@ -10535,31 +10629,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10535
10629
|
}, {
|
|
10536
10630
|
key: "unflagMessage",
|
|
10537
10631
|
value: function () {
|
|
10538
|
-
var _unflagMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10632
|
+
var _unflagMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee50(targetMessageID) {
|
|
10539
10633
|
var options,
|
|
10540
|
-
|
|
10541
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10634
|
+
_args50 = arguments;
|
|
10635
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee50$(_context50) {
|
|
10542
10636
|
while (1) {
|
|
10543
|
-
switch (
|
|
10637
|
+
switch (_context50.prev = _context50.next) {
|
|
10544
10638
|
case 0:
|
|
10545
|
-
options =
|
|
10546
|
-
|
|
10639
|
+
options = _args50.length > 1 && _args50[1] !== undefined ? _args50[1] : {};
|
|
10640
|
+
_context50.next = 3;
|
|
10547
10641
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
10548
10642
|
target_message_id: targetMessageID
|
|
10549
10643
|
}, options));
|
|
10550
10644
|
|
|
10551
10645
|
case 3:
|
|
10552
|
-
return
|
|
10646
|
+
return _context50.abrupt("return", _context50.sent);
|
|
10553
10647
|
|
|
10554
10648
|
case 4:
|
|
10555
10649
|
case "end":
|
|
10556
|
-
return
|
|
10650
|
+
return _context50.stop();
|
|
10557
10651
|
}
|
|
10558
10652
|
}
|
|
10559
|
-
},
|
|
10653
|
+
}, _callee50, this);
|
|
10560
10654
|
}));
|
|
10561
10655
|
|
|
10562
|
-
function unflagMessage(
|
|
10656
|
+
function unflagMessage(_x67) {
|
|
10563
10657
|
return _unflagMessage.apply(this, arguments);
|
|
10564
10658
|
}
|
|
10565
10659
|
|
|
@@ -10575,31 +10669,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10575
10669
|
}, {
|
|
10576
10670
|
key: "unflagUser",
|
|
10577
10671
|
value: function () {
|
|
10578
|
-
var _unflagUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10672
|
+
var _unflagUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee51(targetID) {
|
|
10579
10673
|
var options,
|
|
10580
|
-
|
|
10581
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10674
|
+
_args51 = arguments;
|
|
10675
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee51$(_context51) {
|
|
10582
10676
|
while (1) {
|
|
10583
|
-
switch (
|
|
10677
|
+
switch (_context51.prev = _context51.next) {
|
|
10584
10678
|
case 0:
|
|
10585
|
-
options =
|
|
10586
|
-
|
|
10679
|
+
options = _args51.length > 1 && _args51[1] !== undefined ? _args51[1] : {};
|
|
10680
|
+
_context51.next = 3;
|
|
10587
10681
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
10588
10682
|
target_user_id: targetID
|
|
10589
10683
|
}, options));
|
|
10590
10684
|
|
|
10591
10685
|
case 3:
|
|
10592
|
-
return
|
|
10686
|
+
return _context51.abrupt("return", _context51.sent);
|
|
10593
10687
|
|
|
10594
10688
|
case 4:
|
|
10595
10689
|
case "end":
|
|
10596
|
-
return
|
|
10690
|
+
return _context51.stop();
|
|
10597
10691
|
}
|
|
10598
10692
|
}
|
|
10599
|
-
},
|
|
10693
|
+
}, _callee51, this);
|
|
10600
10694
|
}));
|
|
10601
10695
|
|
|
10602
|
-
function unflagUser(
|
|
10696
|
+
function unflagUser(_x68) {
|
|
10603
10697
|
return _unflagUser.apply(this, arguments);
|
|
10604
10698
|
}
|
|
10605
10699
|
|
|
@@ -10616,29 +10710,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10616
10710
|
}, {
|
|
10617
10711
|
key: "getCallToken",
|
|
10618
10712
|
value: function () {
|
|
10619
|
-
var _getCallToken = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10713
|
+
var _getCallToken = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee52(callID) {
|
|
10620
10714
|
var options,
|
|
10621
|
-
|
|
10622
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10715
|
+
_args52 = arguments;
|
|
10716
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee52$(_context52) {
|
|
10623
10717
|
while (1) {
|
|
10624
|
-
switch (
|
|
10718
|
+
switch (_context52.prev = _context52.next) {
|
|
10625
10719
|
case 0:
|
|
10626
|
-
options =
|
|
10627
|
-
|
|
10720
|
+
options = _args52.length > 1 && _args52[1] !== undefined ? _args52[1] : {};
|
|
10721
|
+
_context52.next = 3;
|
|
10628
10722
|
return this.post(this.baseURL + "/calls/".concat(callID), _objectSpread({}, options));
|
|
10629
10723
|
|
|
10630
10724
|
case 3:
|
|
10631
|
-
return
|
|
10725
|
+
return _context52.abrupt("return", _context52.sent);
|
|
10632
10726
|
|
|
10633
10727
|
case 4:
|
|
10634
10728
|
case "end":
|
|
10635
|
-
return
|
|
10729
|
+
return _context52.stop();
|
|
10636
10730
|
}
|
|
10637
10731
|
}
|
|
10638
|
-
},
|
|
10732
|
+
}, _callee52, this);
|
|
10639
10733
|
}));
|
|
10640
10734
|
|
|
10641
|
-
function getCallToken(
|
|
10735
|
+
function getCallToken(_x69) {
|
|
10642
10736
|
return _getCallToken.apply(this, arguments);
|
|
10643
10737
|
}
|
|
10644
10738
|
|
|
@@ -10661,30 +10755,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10661
10755
|
}, {
|
|
10662
10756
|
key: "_queryFlags",
|
|
10663
10757
|
value: function () {
|
|
10664
|
-
var _queryFlags2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10758
|
+
var _queryFlags2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee53() {
|
|
10665
10759
|
var filterConditions,
|
|
10666
10760
|
options,
|
|
10667
|
-
|
|
10668
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10761
|
+
_args53 = arguments;
|
|
10762
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee53$(_context53) {
|
|
10669
10763
|
while (1) {
|
|
10670
|
-
switch (
|
|
10764
|
+
switch (_context53.prev = _context53.next) {
|
|
10671
10765
|
case 0:
|
|
10672
|
-
filterConditions =
|
|
10673
|
-
options =
|
|
10674
|
-
|
|
10766
|
+
filterConditions = _args53.length > 0 && _args53[0] !== undefined ? _args53[0] : {};
|
|
10767
|
+
options = _args53.length > 1 && _args53[1] !== undefined ? _args53[1] : {};
|
|
10768
|
+
_context53.next = 4;
|
|
10675
10769
|
return this.post(this.baseURL + '/moderation/flags', _objectSpread({
|
|
10676
10770
|
filter_conditions: filterConditions
|
|
10677
10771
|
}, options));
|
|
10678
10772
|
|
|
10679
10773
|
case 4:
|
|
10680
|
-
return
|
|
10774
|
+
return _context53.abrupt("return", _context53.sent);
|
|
10681
10775
|
|
|
10682
10776
|
case 5:
|
|
10683
10777
|
case "end":
|
|
10684
|
-
return
|
|
10778
|
+
return _context53.stop();
|
|
10685
10779
|
}
|
|
10686
10780
|
}
|
|
10687
|
-
},
|
|
10781
|
+
}, _callee53, this);
|
|
10688
10782
|
}));
|
|
10689
10783
|
|
|
10690
10784
|
function _queryFlags() {
|
|
@@ -10710,30 +10804,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10710
10804
|
}, {
|
|
10711
10805
|
key: "_queryFlagReports",
|
|
10712
10806
|
value: function () {
|
|
10713
|
-
var _queryFlagReports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10807
|
+
var _queryFlagReports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee54() {
|
|
10714
10808
|
var filterConditions,
|
|
10715
10809
|
options,
|
|
10716
|
-
|
|
10717
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10810
|
+
_args54 = arguments;
|
|
10811
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee54$(_context54) {
|
|
10718
10812
|
while (1) {
|
|
10719
|
-
switch (
|
|
10813
|
+
switch (_context54.prev = _context54.next) {
|
|
10720
10814
|
case 0:
|
|
10721
|
-
filterConditions =
|
|
10722
|
-
options =
|
|
10723
|
-
|
|
10815
|
+
filterConditions = _args54.length > 0 && _args54[0] !== undefined ? _args54[0] : {};
|
|
10816
|
+
options = _args54.length > 1 && _args54[1] !== undefined ? _args54[1] : {};
|
|
10817
|
+
_context54.next = 4;
|
|
10724
10818
|
return this.post(this.baseURL + '/moderation/reports', _objectSpread({
|
|
10725
10819
|
filter_conditions: filterConditions
|
|
10726
10820
|
}, options));
|
|
10727
10821
|
|
|
10728
10822
|
case 4:
|
|
10729
|
-
return
|
|
10823
|
+
return _context54.abrupt("return", _context54.sent);
|
|
10730
10824
|
|
|
10731
10825
|
case 5:
|
|
10732
10826
|
case "end":
|
|
10733
|
-
return
|
|
10827
|
+
return _context54.stop();
|
|
10734
10828
|
}
|
|
10735
10829
|
}
|
|
10736
|
-
},
|
|
10830
|
+
}, _callee54, this);
|
|
10737
10831
|
}));
|
|
10738
10832
|
|
|
10739
10833
|
function _queryFlagReports() {
|
|
@@ -10760,31 +10854,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10760
10854
|
}, {
|
|
10761
10855
|
key: "_reviewFlagReport",
|
|
10762
10856
|
value: function () {
|
|
10763
|
-
var _reviewFlagReport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10857
|
+
var _reviewFlagReport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee55(id, reviewResult) {
|
|
10764
10858
|
var options,
|
|
10765
|
-
|
|
10766
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10859
|
+
_args55 = arguments;
|
|
10860
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee55$(_context55) {
|
|
10767
10861
|
while (1) {
|
|
10768
|
-
switch (
|
|
10862
|
+
switch (_context55.prev = _context55.next) {
|
|
10769
10863
|
case 0:
|
|
10770
|
-
options =
|
|
10771
|
-
|
|
10864
|
+
options = _args55.length > 2 && _args55[2] !== undefined ? _args55[2] : {};
|
|
10865
|
+
_context55.next = 3;
|
|
10772
10866
|
return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
|
|
10773
10867
|
review_result: reviewResult
|
|
10774
10868
|
}, options));
|
|
10775
10869
|
|
|
10776
10870
|
case 3:
|
|
10777
|
-
return
|
|
10871
|
+
return _context55.abrupt("return", _context55.sent);
|
|
10778
10872
|
|
|
10779
10873
|
case 4:
|
|
10780
10874
|
case "end":
|
|
10781
|
-
return
|
|
10875
|
+
return _context55.stop();
|
|
10782
10876
|
}
|
|
10783
10877
|
}
|
|
10784
|
-
},
|
|
10878
|
+
}, _callee55, this);
|
|
10785
10879
|
}));
|
|
10786
10880
|
|
|
10787
|
-
function _reviewFlagReport(
|
|
10881
|
+
function _reviewFlagReport(_x70, _x71) {
|
|
10788
10882
|
return _reviewFlagReport2.apply(this, arguments);
|
|
10789
10883
|
}
|
|
10790
10884
|
|
|
@@ -10802,31 +10896,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10802
10896
|
}, {
|
|
10803
10897
|
key: "unblockMessage",
|
|
10804
10898
|
value: function () {
|
|
10805
|
-
var _unblockMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10899
|
+
var _unblockMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee56(targetMessageID) {
|
|
10806
10900
|
var options,
|
|
10807
|
-
|
|
10808
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10901
|
+
_args56 = arguments;
|
|
10902
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee56$(_context56) {
|
|
10809
10903
|
while (1) {
|
|
10810
|
-
switch (
|
|
10904
|
+
switch (_context56.prev = _context56.next) {
|
|
10811
10905
|
case 0:
|
|
10812
|
-
options =
|
|
10813
|
-
|
|
10906
|
+
options = _args56.length > 1 && _args56[1] !== undefined ? _args56[1] : {};
|
|
10907
|
+
_context56.next = 3;
|
|
10814
10908
|
return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
|
|
10815
10909
|
target_message_id: targetMessageID
|
|
10816
10910
|
}, options));
|
|
10817
10911
|
|
|
10818
10912
|
case 3:
|
|
10819
|
-
return
|
|
10913
|
+
return _context56.abrupt("return", _context56.sent);
|
|
10820
10914
|
|
|
10821
10915
|
case 4:
|
|
10822
10916
|
case "end":
|
|
10823
|
-
return
|
|
10917
|
+
return _context56.stop();
|
|
10824
10918
|
}
|
|
10825
10919
|
}
|
|
10826
|
-
},
|
|
10920
|
+
}, _callee56, this);
|
|
10827
10921
|
}));
|
|
10828
10922
|
|
|
10829
|
-
function unblockMessage(
|
|
10923
|
+
function unblockMessage(_x72) {
|
|
10830
10924
|
return _unblockMessage.apply(this, arguments);
|
|
10831
10925
|
}
|
|
10832
10926
|
|
|
@@ -10845,23 +10939,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10845
10939
|
* @return {Promise<APIResponse>}
|
|
10846
10940
|
*/
|
|
10847
10941
|
function () {
|
|
10848
|
-
var _markChannelsRead = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10942
|
+
var _markChannelsRead = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee57() {
|
|
10849
10943
|
var data,
|
|
10850
|
-
|
|
10851
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10944
|
+
_args57 = arguments;
|
|
10945
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee57$(_context57) {
|
|
10852
10946
|
while (1) {
|
|
10853
|
-
switch (
|
|
10947
|
+
switch (_context57.prev = _context57.next) {
|
|
10854
10948
|
case 0:
|
|
10855
|
-
data =
|
|
10856
|
-
|
|
10949
|
+
data = _args57.length > 0 && _args57[0] !== undefined ? _args57[0] : {};
|
|
10950
|
+
_context57.next = 3;
|
|
10857
10951
|
return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
|
|
10858
10952
|
|
|
10859
10953
|
case 3:
|
|
10860
10954
|
case "end":
|
|
10861
|
-
return
|
|
10955
|
+
return _context57.stop();
|
|
10862
10956
|
}
|
|
10863
10957
|
}
|
|
10864
|
-
},
|
|
10958
|
+
}, _callee57, this);
|
|
10865
10959
|
}));
|
|
10866
10960
|
|
|
10867
10961
|
function markChannelsRead() {
|
|
@@ -10936,28 +11030,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10936
11030
|
}, {
|
|
10937
11031
|
key: "translateMessage",
|
|
10938
11032
|
value: function () {
|
|
10939
|
-
var _translateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10940
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11033
|
+
var _translateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee58(messageId, language) {
|
|
11034
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee58$(_context58) {
|
|
10941
11035
|
while (1) {
|
|
10942
|
-
switch (
|
|
11036
|
+
switch (_context58.prev = _context58.next) {
|
|
10943
11037
|
case 0:
|
|
10944
|
-
|
|
11038
|
+
_context58.next = 2;
|
|
10945
11039
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
|
|
10946
11040
|
language: language
|
|
10947
11041
|
});
|
|
10948
11042
|
|
|
10949
11043
|
case 2:
|
|
10950
|
-
return
|
|
11044
|
+
return _context58.abrupt("return", _context58.sent);
|
|
10951
11045
|
|
|
10952
11046
|
case 3:
|
|
10953
11047
|
case "end":
|
|
10954
|
-
return
|
|
11048
|
+
return _context58.stop();
|
|
10955
11049
|
}
|
|
10956
11050
|
}
|
|
10957
|
-
},
|
|
11051
|
+
}, _callee58, this);
|
|
10958
11052
|
}));
|
|
10959
11053
|
|
|
10960
|
-
function translateMessage(
|
|
11054
|
+
function translateMessage(_x73, _x74) {
|
|
10961
11055
|
return _translateMessage.apply(this, arguments);
|
|
10962
11056
|
}
|
|
10963
11057
|
|
|
@@ -11059,14 +11153,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11059
11153
|
}, {
|
|
11060
11154
|
key: "updateMessage",
|
|
11061
11155
|
value: function () {
|
|
11062
|
-
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11156
|
+
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee59(message, userId, options) {
|
|
11063
11157
|
var clonedMessage, reservedMessageFields;
|
|
11064
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11158
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee59$(_context59) {
|
|
11065
11159
|
while (1) {
|
|
11066
|
-
switch (
|
|
11160
|
+
switch (_context59.prev = _context59.next) {
|
|
11067
11161
|
case 0:
|
|
11068
11162
|
if (message.id) {
|
|
11069
|
-
|
|
11163
|
+
_context59.next = 2;
|
|
11070
11164
|
break;
|
|
11071
11165
|
}
|
|
11072
11166
|
|
|
@@ -11103,23 +11197,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11103
11197
|
});
|
|
11104
11198
|
}
|
|
11105
11199
|
|
|
11106
|
-
|
|
11200
|
+
_context59.next = 10;
|
|
11107
11201
|
return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
|
|
11108
11202
|
message: clonedMessage
|
|
11109
11203
|
}, options));
|
|
11110
11204
|
|
|
11111
11205
|
case 10:
|
|
11112
|
-
return
|
|
11206
|
+
return _context59.abrupt("return", _context59.sent);
|
|
11113
11207
|
|
|
11114
11208
|
case 11:
|
|
11115
11209
|
case "end":
|
|
11116
|
-
return
|
|
11210
|
+
return _context59.stop();
|
|
11117
11211
|
}
|
|
11118
11212
|
}
|
|
11119
|
-
},
|
|
11213
|
+
}, _callee59, this);
|
|
11120
11214
|
}));
|
|
11121
11215
|
|
|
11122
|
-
function updateMessage(
|
|
11216
|
+
function updateMessage(_x75, _x76, _x77) {
|
|
11123
11217
|
return _updateMessage.apply(this, arguments);
|
|
11124
11218
|
}
|
|
11125
11219
|
|
|
@@ -11142,14 +11236,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11142
11236
|
}, {
|
|
11143
11237
|
key: "partialUpdateMessage",
|
|
11144
11238
|
value: function () {
|
|
11145
|
-
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11239
|
+
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee60(id, partialMessageObject, userId, options) {
|
|
11146
11240
|
var user;
|
|
11147
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11241
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee60$(_context60) {
|
|
11148
11242
|
while (1) {
|
|
11149
|
-
switch (
|
|
11243
|
+
switch (_context60.prev = _context60.next) {
|
|
11150
11244
|
case 0:
|
|
11151
11245
|
if (id) {
|
|
11152
|
-
|
|
11246
|
+
_context60.next = 2;
|
|
11153
11247
|
break;
|
|
11154
11248
|
}
|
|
11155
11249
|
|
|
@@ -11164,23 +11258,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11164
11258
|
};
|
|
11165
11259
|
}
|
|
11166
11260
|
|
|
11167
|
-
|
|
11261
|
+
_context60.next = 6;
|
|
11168
11262
|
return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
11169
11263
|
user: user
|
|
11170
11264
|
}));
|
|
11171
11265
|
|
|
11172
11266
|
case 6:
|
|
11173
|
-
return
|
|
11267
|
+
return _context60.abrupt("return", _context60.sent);
|
|
11174
11268
|
|
|
11175
11269
|
case 7:
|
|
11176
11270
|
case "end":
|
|
11177
|
-
return
|
|
11271
|
+
return _context60.stop();
|
|
11178
11272
|
}
|
|
11179
11273
|
}
|
|
11180
|
-
},
|
|
11274
|
+
}, _callee60, this);
|
|
11181
11275
|
}));
|
|
11182
11276
|
|
|
11183
|
-
function partialUpdateMessage(
|
|
11277
|
+
function partialUpdateMessage(_x78, _x79, _x80, _x81) {
|
|
11184
11278
|
return _partialUpdateMessage.apply(this, arguments);
|
|
11185
11279
|
}
|
|
11186
11280
|
|
|
@@ -11189,11 +11283,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11189
11283
|
}, {
|
|
11190
11284
|
key: "deleteMessage",
|
|
11191
11285
|
value: function () {
|
|
11192
|
-
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11286
|
+
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee61(messageID, hardDelete) {
|
|
11193
11287
|
var params;
|
|
11194
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11288
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee61$(_context61) {
|
|
11195
11289
|
while (1) {
|
|
11196
|
-
switch (
|
|
11290
|
+
switch (_context61.prev = _context61.next) {
|
|
11197
11291
|
case 0:
|
|
11198
11292
|
params = {};
|
|
11199
11293
|
|
|
@@ -11203,21 +11297,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11203
11297
|
};
|
|
11204
11298
|
}
|
|
11205
11299
|
|
|
11206
|
-
|
|
11300
|
+
_context61.next = 4;
|
|
11207
11301
|
return this.delete(this.baseURL + "/messages/".concat(messageID), params);
|
|
11208
11302
|
|
|
11209
11303
|
case 4:
|
|
11210
|
-
return
|
|
11304
|
+
return _context61.abrupt("return", _context61.sent);
|
|
11211
11305
|
|
|
11212
11306
|
case 5:
|
|
11213
11307
|
case "end":
|
|
11214
|
-
return
|
|
11308
|
+
return _context61.stop();
|
|
11215
11309
|
}
|
|
11216
11310
|
}
|
|
11217
|
-
},
|
|
11311
|
+
}, _callee61, this);
|
|
11218
11312
|
}));
|
|
11219
11313
|
|
|
11220
|
-
function deleteMessage(
|
|
11314
|
+
function deleteMessage(_x82, _x83) {
|
|
11221
11315
|
return _deleteMessage.apply(this, arguments);
|
|
11222
11316
|
}
|
|
11223
11317
|
|
|
@@ -11239,28 +11333,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11239
11333
|
}, {
|
|
11240
11334
|
key: "undeleteMessage",
|
|
11241
11335
|
value: function () {
|
|
11242
|
-
var _undeleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11243
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11336
|
+
var _undeleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee62(messageID, userID) {
|
|
11337
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee62$(_context62) {
|
|
11244
11338
|
while (1) {
|
|
11245
|
-
switch (
|
|
11339
|
+
switch (_context62.prev = _context62.next) {
|
|
11246
11340
|
case 0:
|
|
11247
|
-
|
|
11341
|
+
_context62.next = 2;
|
|
11248
11342
|
return this.post(this.baseURL + "/messages/".concat(messageID, "/undelete"), {
|
|
11249
11343
|
undeleted_by: userID
|
|
11250
11344
|
});
|
|
11251
11345
|
|
|
11252
11346
|
case 2:
|
|
11253
|
-
return
|
|
11347
|
+
return _context62.abrupt("return", _context62.sent);
|
|
11254
11348
|
|
|
11255
11349
|
case 3:
|
|
11256
11350
|
case "end":
|
|
11257
|
-
return
|
|
11351
|
+
return _context62.stop();
|
|
11258
11352
|
}
|
|
11259
11353
|
}
|
|
11260
|
-
},
|
|
11354
|
+
}, _callee62, this);
|
|
11261
11355
|
}));
|
|
11262
11356
|
|
|
11263
|
-
function undeleteMessage(
|
|
11357
|
+
function undeleteMessage(_x84, _x85) {
|
|
11264
11358
|
return _undeleteMessage.apply(this, arguments);
|
|
11265
11359
|
}
|
|
11266
11360
|
|
|
@@ -11269,26 +11363,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11269
11363
|
}, {
|
|
11270
11364
|
key: "getMessage",
|
|
11271
11365
|
value: function () {
|
|
11272
|
-
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11273
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11366
|
+
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee63(messageID, options) {
|
|
11367
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee63$(_context63) {
|
|
11274
11368
|
while (1) {
|
|
11275
|
-
switch (
|
|
11369
|
+
switch (_context63.prev = _context63.next) {
|
|
11276
11370
|
case 0:
|
|
11277
|
-
|
|
11371
|
+
_context63.next = 2;
|
|
11278
11372
|
return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), _objectSpread({}, options));
|
|
11279
11373
|
|
|
11280
11374
|
case 2:
|
|
11281
|
-
return
|
|
11375
|
+
return _context63.abrupt("return", _context63.sent);
|
|
11282
11376
|
|
|
11283
11377
|
case 3:
|
|
11284
11378
|
case "end":
|
|
11285
|
-
return
|
|
11379
|
+
return _context63.stop();
|
|
11286
11380
|
}
|
|
11287
11381
|
}
|
|
11288
|
-
},
|
|
11382
|
+
}, _callee63, this);
|
|
11289
11383
|
}));
|
|
11290
11384
|
|
|
11291
|
-
function getMessage(
|
|
11385
|
+
function getMessage(_x86, _x87) {
|
|
11292
11386
|
return _getMessage.apply(this, arguments);
|
|
11293
11387
|
}
|
|
11294
11388
|
|
|
@@ -11309,13 +11403,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11309
11403
|
}, {
|
|
11310
11404
|
key: "queryThreads",
|
|
11311
11405
|
value: function () {
|
|
11312
|
-
var _queryThreads = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11406
|
+
var _queryThreads = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee64(options) {
|
|
11313
11407
|
var _this5 = this;
|
|
11314
11408
|
|
|
11315
11409
|
var opts, res;
|
|
11316
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11410
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee64$(_context64) {
|
|
11317
11411
|
while (1) {
|
|
11318
|
-
switch (
|
|
11412
|
+
switch (_context64.prev = _context64.next) {
|
|
11319
11413
|
case 0:
|
|
11320
11414
|
opts = _objectSpread({
|
|
11321
11415
|
limit: 10,
|
|
@@ -11323,12 +11417,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11323
11417
|
reply_limit: 3,
|
|
11324
11418
|
watch: true
|
|
11325
11419
|
}, options);
|
|
11326
|
-
|
|
11420
|
+
_context64.next = 3;
|
|
11327
11421
|
return this.post(this.baseURL + "/threads", opts);
|
|
11328
11422
|
|
|
11329
11423
|
case 3:
|
|
11330
|
-
res =
|
|
11331
|
-
return
|
|
11424
|
+
res = _context64.sent;
|
|
11425
|
+
return _context64.abrupt("return", {
|
|
11332
11426
|
threads: res.threads.map(function (thread) {
|
|
11333
11427
|
return new Thread(_this5, thread);
|
|
11334
11428
|
}),
|
|
@@ -11337,13 +11431,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11337
11431
|
|
|
11338
11432
|
case 5:
|
|
11339
11433
|
case "end":
|
|
11340
|
-
return
|
|
11434
|
+
return _context64.stop();
|
|
11341
11435
|
}
|
|
11342
11436
|
}
|
|
11343
|
-
},
|
|
11437
|
+
}, _callee64, this);
|
|
11344
11438
|
}));
|
|
11345
11439
|
|
|
11346
|
-
function queryThreads(
|
|
11440
|
+
function queryThreads(_x88) {
|
|
11347
11441
|
return _queryThreads.apply(this, arguments);
|
|
11348
11442
|
}
|
|
11349
11443
|
|
|
@@ -11364,19 +11458,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11364
11458
|
}, {
|
|
11365
11459
|
key: "getThread",
|
|
11366
11460
|
value: function () {
|
|
11367
|
-
var _getThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11461
|
+
var _getThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee65(messageId) {
|
|
11368
11462
|
var options,
|
|
11369
11463
|
opts,
|
|
11370
11464
|
res,
|
|
11371
|
-
|
|
11372
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11465
|
+
_args65 = arguments;
|
|
11466
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee65$(_context65) {
|
|
11373
11467
|
while (1) {
|
|
11374
|
-
switch (
|
|
11468
|
+
switch (_context65.prev = _context65.next) {
|
|
11375
11469
|
case 0:
|
|
11376
|
-
options =
|
|
11470
|
+
options = _args65.length > 1 && _args65[1] !== undefined ? _args65[1] : {};
|
|
11377
11471
|
|
|
11378
11472
|
if (messageId) {
|
|
11379
|
-
|
|
11473
|
+
_context65.next = 3;
|
|
11380
11474
|
break;
|
|
11381
11475
|
}
|
|
11382
11476
|
|
|
@@ -11388,22 +11482,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11388
11482
|
reply_limit: 3,
|
|
11389
11483
|
watch: true
|
|
11390
11484
|
}, options);
|
|
11391
|
-
|
|
11485
|
+
_context65.next = 6;
|
|
11392
11486
|
return this.get(this.baseURL + "/threads/".concat(messageId), opts);
|
|
11393
11487
|
|
|
11394
11488
|
case 6:
|
|
11395
|
-
res =
|
|
11396
|
-
return
|
|
11489
|
+
res = _context65.sent;
|
|
11490
|
+
return _context65.abrupt("return", new Thread(this, res.thread));
|
|
11397
11491
|
|
|
11398
11492
|
case 8:
|
|
11399
11493
|
case "end":
|
|
11400
|
-
return
|
|
11494
|
+
return _context65.stop();
|
|
11401
11495
|
}
|
|
11402
11496
|
}
|
|
11403
|
-
},
|
|
11497
|
+
}, _callee65, this);
|
|
11404
11498
|
}));
|
|
11405
11499
|
|
|
11406
|
-
function getThread(
|
|
11500
|
+
function getThread(_x89) {
|
|
11407
11501
|
return _getThread.apply(this, arguments);
|
|
11408
11502
|
}
|
|
11409
11503
|
|
|
@@ -11421,15 +11515,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11421
11515
|
}, {
|
|
11422
11516
|
key: "partialUpdateThread",
|
|
11423
11517
|
value: function () {
|
|
11424
|
-
var _partialUpdateThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11518
|
+
var _partialUpdateThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee66(messageId, partialThreadObject) {
|
|
11425
11519
|
var reservedThreadFields, _key5;
|
|
11426
11520
|
|
|
11427
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11521
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee66$(_context66) {
|
|
11428
11522
|
while (1) {
|
|
11429
|
-
switch (
|
|
11523
|
+
switch (_context66.prev = _context66.next) {
|
|
11430
11524
|
case 0:
|
|
11431
11525
|
if (messageId) {
|
|
11432
|
-
|
|
11526
|
+
_context66.next = 2;
|
|
11433
11527
|
break;
|
|
11434
11528
|
}
|
|
11435
11529
|
|
|
@@ -11439,43 +11533,43 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11439
11533
|
// check for reserved fields from ThreadResponse type within partialThreadObject's set and unset.
|
|
11440
11534
|
// Throw error if any of the reserved field is found.
|
|
11441
11535
|
reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel'];
|
|
11442
|
-
|
|
11536
|
+
_context66.t0 = _regeneratorRuntime__default['default'].keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
|
|
11443
11537
|
|
|
11444
11538
|
case 4:
|
|
11445
|
-
if ((
|
|
11446
|
-
|
|
11539
|
+
if ((_context66.t1 = _context66.t0()).done) {
|
|
11540
|
+
_context66.next = 10;
|
|
11447
11541
|
break;
|
|
11448
11542
|
}
|
|
11449
11543
|
|
|
11450
|
-
_key5 =
|
|
11544
|
+
_key5 = _context66.t1.value;
|
|
11451
11545
|
|
|
11452
11546
|
if (!reservedThreadFields.includes(_key5)) {
|
|
11453
|
-
|
|
11547
|
+
_context66.next = 8;
|
|
11454
11548
|
break;
|
|
11455
11549
|
}
|
|
11456
11550
|
|
|
11457
11551
|
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."));
|
|
11458
11552
|
|
|
11459
11553
|
case 8:
|
|
11460
|
-
|
|
11554
|
+
_context66.next = 4;
|
|
11461
11555
|
break;
|
|
11462
11556
|
|
|
11463
11557
|
case 10:
|
|
11464
|
-
|
|
11558
|
+
_context66.next = 12;
|
|
11465
11559
|
return this.patch(this.baseURL + "/threads/".concat(messageId), partialThreadObject);
|
|
11466
11560
|
|
|
11467
11561
|
case 12:
|
|
11468
|
-
return
|
|
11562
|
+
return _context66.abrupt("return", _context66.sent);
|
|
11469
11563
|
|
|
11470
11564
|
case 13:
|
|
11471
11565
|
case "end":
|
|
11472
|
-
return
|
|
11566
|
+
return _context66.stop();
|
|
11473
11567
|
}
|
|
11474
11568
|
}
|
|
11475
|
-
},
|
|
11569
|
+
}, _callee66, this);
|
|
11476
11570
|
}));
|
|
11477
11571
|
|
|
11478
|
-
function partialUpdateThread(
|
|
11572
|
+
function partialUpdateThread(_x90, _x91) {
|
|
11479
11573
|
return _partialUpdateThread.apply(this, arguments);
|
|
11480
11574
|
}
|
|
11481
11575
|
|
|
@@ -11484,7 +11578,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11484
11578
|
}, {
|
|
11485
11579
|
key: "getUserAgent",
|
|
11486
11580
|
value: function getUserAgent() {
|
|
11487
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
11581
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.35.0");
|
|
11488
11582
|
}
|
|
11489
11583
|
}, {
|
|
11490
11584
|
key: "setUserAgent",
|
|
@@ -11703,28 +11797,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11703
11797
|
}, {
|
|
11704
11798
|
key: "sendUserCustomEvent",
|
|
11705
11799
|
value: function () {
|
|
11706
|
-
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11707
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11800
|
+
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee67(targetUserID, event) {
|
|
11801
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee67$(_context67) {
|
|
11708
11802
|
while (1) {
|
|
11709
|
-
switch (
|
|
11803
|
+
switch (_context67.prev = _context67.next) {
|
|
11710
11804
|
case 0:
|
|
11711
|
-
|
|
11805
|
+
_context67.next = 2;
|
|
11712
11806
|
return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
|
|
11713
11807
|
event: event
|
|
11714
11808
|
});
|
|
11715
11809
|
|
|
11716
11810
|
case 2:
|
|
11717
|
-
return
|
|
11811
|
+
return _context67.abrupt("return", _context67.sent);
|
|
11718
11812
|
|
|
11719
11813
|
case 3:
|
|
11720
11814
|
case "end":
|
|
11721
|
-
return
|
|
11815
|
+
return _context67.stop();
|
|
11722
11816
|
}
|
|
11723
11817
|
}
|
|
11724
|
-
},
|
|
11818
|
+
}, _callee67, this);
|
|
11725
11819
|
}));
|
|
11726
11820
|
|
|
11727
|
-
function sendUserCustomEvent(
|
|
11821
|
+
function sendUserCustomEvent(_x92, _x93) {
|
|
11728
11822
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
11729
11823
|
}
|
|
11730
11824
|
|
|
@@ -11821,28 +11915,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11821
11915
|
}, {
|
|
11822
11916
|
key: "createSegment",
|
|
11823
11917
|
value: function () {
|
|
11824
|
-
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11918
|
+
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee68(type, id, data) {
|
|
11825
11919
|
var body;
|
|
11826
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11920
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee68$(_context68) {
|
|
11827
11921
|
while (1) {
|
|
11828
|
-
switch (
|
|
11922
|
+
switch (_context68.prev = _context68.next) {
|
|
11829
11923
|
case 0:
|
|
11830
11924
|
this.validateServerSideAuth();
|
|
11831
11925
|
body = _objectSpread({
|
|
11832
11926
|
id: id,
|
|
11833
11927
|
type: type
|
|
11834
11928
|
}, data);
|
|
11835
|
-
return
|
|
11929
|
+
return _context68.abrupt("return", this.post(this.baseURL + "/segments", body));
|
|
11836
11930
|
|
|
11837
11931
|
case 3:
|
|
11838
11932
|
case "end":
|
|
11839
|
-
return
|
|
11933
|
+
return _context68.stop();
|
|
11840
11934
|
}
|
|
11841
11935
|
}
|
|
11842
|
-
},
|
|
11936
|
+
}, _callee68, this);
|
|
11843
11937
|
}));
|
|
11844
11938
|
|
|
11845
|
-
function createSegment(
|
|
11939
|
+
function createSegment(_x94, _x95, _x96) {
|
|
11846
11940
|
return _createSegment.apply(this, arguments);
|
|
11847
11941
|
}
|
|
11848
11942
|
|
|
@@ -11861,23 +11955,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11861
11955
|
}, {
|
|
11862
11956
|
key: "createUserSegment",
|
|
11863
11957
|
value: function () {
|
|
11864
|
-
var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11865
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11958
|
+
var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee69(id, data) {
|
|
11959
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee69$(_context69) {
|
|
11866
11960
|
while (1) {
|
|
11867
|
-
switch (
|
|
11961
|
+
switch (_context69.prev = _context69.next) {
|
|
11868
11962
|
case 0:
|
|
11869
11963
|
this.validateServerSideAuth();
|
|
11870
|
-
return
|
|
11964
|
+
return _context69.abrupt("return", this.createSegment('user', id, data));
|
|
11871
11965
|
|
|
11872
11966
|
case 2:
|
|
11873
11967
|
case "end":
|
|
11874
|
-
return
|
|
11968
|
+
return _context69.stop();
|
|
11875
11969
|
}
|
|
11876
11970
|
}
|
|
11877
|
-
},
|
|
11971
|
+
}, _callee69, this);
|
|
11878
11972
|
}));
|
|
11879
11973
|
|
|
11880
|
-
function createUserSegment(
|
|
11974
|
+
function createUserSegment(_x97, _x98) {
|
|
11881
11975
|
return _createUserSegment.apply(this, arguments);
|
|
11882
11976
|
}
|
|
11883
11977
|
|
|
@@ -11896,23 +11990,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11896
11990
|
}, {
|
|
11897
11991
|
key: "createChannelSegment",
|
|
11898
11992
|
value: function () {
|
|
11899
|
-
var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11900
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11993
|
+
var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee70(id, data) {
|
|
11994
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee70$(_context70) {
|
|
11901
11995
|
while (1) {
|
|
11902
|
-
switch (
|
|
11996
|
+
switch (_context70.prev = _context70.next) {
|
|
11903
11997
|
case 0:
|
|
11904
11998
|
this.validateServerSideAuth();
|
|
11905
|
-
return
|
|
11999
|
+
return _context70.abrupt("return", this.createSegment('channel', id, data));
|
|
11906
12000
|
|
|
11907
12001
|
case 2:
|
|
11908
12002
|
case "end":
|
|
11909
|
-
return
|
|
12003
|
+
return _context70.stop();
|
|
11910
12004
|
}
|
|
11911
12005
|
}
|
|
11912
|
-
},
|
|
12006
|
+
}, _callee70, this);
|
|
11913
12007
|
}));
|
|
11914
12008
|
|
|
11915
|
-
function createChannelSegment(
|
|
12009
|
+
function createChannelSegment(_x99, _x100) {
|
|
11916
12010
|
return _createChannelSegment.apply(this, arguments);
|
|
11917
12011
|
}
|
|
11918
12012
|
|
|
@@ -11921,23 +12015,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11921
12015
|
}, {
|
|
11922
12016
|
key: "getSegment",
|
|
11923
12017
|
value: function () {
|
|
11924
|
-
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11925
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12018
|
+
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee71(id) {
|
|
12019
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee71$(_context71) {
|
|
11926
12020
|
while (1) {
|
|
11927
|
-
switch (
|
|
12021
|
+
switch (_context71.prev = _context71.next) {
|
|
11928
12022
|
case 0:
|
|
11929
12023
|
this.validateServerSideAuth();
|
|
11930
|
-
return
|
|
12024
|
+
return _context71.abrupt("return", this.get(this.baseURL + "/segments/".concat(id)));
|
|
11931
12025
|
|
|
11932
12026
|
case 2:
|
|
11933
12027
|
case "end":
|
|
11934
|
-
return
|
|
12028
|
+
return _context71.stop();
|
|
11935
12029
|
}
|
|
11936
12030
|
}
|
|
11937
|
-
},
|
|
12031
|
+
}, _callee71, this);
|
|
11938
12032
|
}));
|
|
11939
12033
|
|
|
11940
|
-
function getSegment(
|
|
12034
|
+
function getSegment(_x101) {
|
|
11941
12035
|
return _getSegment.apply(this, arguments);
|
|
11942
12036
|
}
|
|
11943
12037
|
|
|
@@ -11955,23 +12049,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11955
12049
|
}, {
|
|
11956
12050
|
key: "updateSegment",
|
|
11957
12051
|
value: function () {
|
|
11958
|
-
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11959
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12052
|
+
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee72(id, data) {
|
|
12053
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee72$(_context72) {
|
|
11960
12054
|
while (1) {
|
|
11961
|
-
switch (
|
|
12055
|
+
switch (_context72.prev = _context72.next) {
|
|
11962
12056
|
case 0:
|
|
11963
12057
|
this.validateServerSideAuth();
|
|
11964
|
-
return
|
|
12058
|
+
return _context72.abrupt("return", this.put(this.baseURL + "/segments/".concat(id), data));
|
|
11965
12059
|
|
|
11966
12060
|
case 2:
|
|
11967
12061
|
case "end":
|
|
11968
|
-
return
|
|
12062
|
+
return _context72.stop();
|
|
11969
12063
|
}
|
|
11970
12064
|
}
|
|
11971
|
-
},
|
|
12065
|
+
}, _callee72, this);
|
|
11972
12066
|
}));
|
|
11973
12067
|
|
|
11974
|
-
function updateSegment(
|
|
12068
|
+
function updateSegment(_x102, _x103) {
|
|
11975
12069
|
return _updateSegment.apply(this, arguments);
|
|
11976
12070
|
}
|
|
11977
12071
|
|
|
@@ -11989,27 +12083,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11989
12083
|
}, {
|
|
11990
12084
|
key: "addSegmentTargets",
|
|
11991
12085
|
value: function () {
|
|
11992
|
-
var _addSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12086
|
+
var _addSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee73(id, targets) {
|
|
11993
12087
|
var body;
|
|
11994
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12088
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee73$(_context73) {
|
|
11995
12089
|
while (1) {
|
|
11996
|
-
switch (
|
|
12090
|
+
switch (_context73.prev = _context73.next) {
|
|
11997
12091
|
case 0:
|
|
11998
12092
|
this.validateServerSideAuth();
|
|
11999
12093
|
body = {
|
|
12000
12094
|
target_ids: targets
|
|
12001
12095
|
};
|
|
12002
|
-
return
|
|
12096
|
+
return _context73.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/addtargets"), body));
|
|
12003
12097
|
|
|
12004
12098
|
case 3:
|
|
12005
12099
|
case "end":
|
|
12006
|
-
return
|
|
12100
|
+
return _context73.stop();
|
|
12007
12101
|
}
|
|
12008
12102
|
}
|
|
12009
|
-
},
|
|
12103
|
+
}, _callee73, this);
|
|
12010
12104
|
}));
|
|
12011
12105
|
|
|
12012
|
-
function addSegmentTargets(
|
|
12106
|
+
function addSegmentTargets(_x104, _x105) {
|
|
12013
12107
|
return _addSegmentTargets.apply(this, arguments);
|
|
12014
12108
|
}
|
|
12015
12109
|
|
|
@@ -12018,33 +12112,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12018
12112
|
}, {
|
|
12019
12113
|
key: "querySegmentTargets",
|
|
12020
12114
|
value: function () {
|
|
12021
|
-
var _querySegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12115
|
+
var _querySegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee74(id) {
|
|
12022
12116
|
var filter,
|
|
12023
12117
|
sort,
|
|
12024
12118
|
options,
|
|
12025
|
-
|
|
12026
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12119
|
+
_args74 = arguments;
|
|
12120
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee74$(_context74) {
|
|
12027
12121
|
while (1) {
|
|
12028
|
-
switch (
|
|
12122
|
+
switch (_context74.prev = _context74.next) {
|
|
12029
12123
|
case 0:
|
|
12030
|
-
filter =
|
|
12031
|
-
sort =
|
|
12032
|
-
options =
|
|
12124
|
+
filter = _args74.length > 1 && _args74[1] !== undefined ? _args74[1] : {};
|
|
12125
|
+
sort = _args74.length > 2 && _args74[2] !== undefined ? _args74[2] : [];
|
|
12126
|
+
options = _args74.length > 3 && _args74[3] !== undefined ? _args74[3] : {};
|
|
12033
12127
|
this.validateServerSideAuth();
|
|
12034
|
-
return
|
|
12128
|
+
return _context74.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/targets/query"), _objectSpread({
|
|
12035
12129
|
filter: filter || {},
|
|
12036
12130
|
sort: sort || []
|
|
12037
12131
|
}, options)));
|
|
12038
12132
|
|
|
12039
12133
|
case 5:
|
|
12040
12134
|
case "end":
|
|
12041
|
-
return
|
|
12135
|
+
return _context74.stop();
|
|
12042
12136
|
}
|
|
12043
12137
|
}
|
|
12044
|
-
},
|
|
12138
|
+
}, _callee74, this);
|
|
12045
12139
|
}));
|
|
12046
12140
|
|
|
12047
|
-
function querySegmentTargets(
|
|
12141
|
+
function querySegmentTargets(_x106) {
|
|
12048
12142
|
return _querySegmentTargets.apply(this, arguments);
|
|
12049
12143
|
}
|
|
12050
12144
|
|
|
@@ -12062,27 +12156,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12062
12156
|
}, {
|
|
12063
12157
|
key: "removeSegmentTargets",
|
|
12064
12158
|
value: function () {
|
|
12065
|
-
var _removeSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12159
|
+
var _removeSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee75(id, targets) {
|
|
12066
12160
|
var body;
|
|
12067
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12161
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee75$(_context75) {
|
|
12068
12162
|
while (1) {
|
|
12069
|
-
switch (
|
|
12163
|
+
switch (_context75.prev = _context75.next) {
|
|
12070
12164
|
case 0:
|
|
12071
12165
|
this.validateServerSideAuth();
|
|
12072
12166
|
body = {
|
|
12073
12167
|
target_ids: targets
|
|
12074
12168
|
};
|
|
12075
|
-
return
|
|
12169
|
+
return _context75.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/deletetargets"), body));
|
|
12076
12170
|
|
|
12077
12171
|
case 3:
|
|
12078
12172
|
case "end":
|
|
12079
|
-
return
|
|
12173
|
+
return _context75.stop();
|
|
12080
12174
|
}
|
|
12081
12175
|
}
|
|
12082
|
-
},
|
|
12176
|
+
}, _callee75, this);
|
|
12083
12177
|
}));
|
|
12084
12178
|
|
|
12085
|
-
function removeSegmentTargets(
|
|
12179
|
+
function removeSegmentTargets(_x107, _x108) {
|
|
12086
12180
|
return _removeSegmentTargets.apply(this, arguments);
|
|
12087
12181
|
}
|
|
12088
12182
|
|
|
@@ -12100,29 +12194,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12100
12194
|
}, {
|
|
12101
12195
|
key: "querySegments",
|
|
12102
12196
|
value: function () {
|
|
12103
|
-
var _querySegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12197
|
+
var _querySegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee76(filter, sort) {
|
|
12104
12198
|
var options,
|
|
12105
|
-
|
|
12106
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12199
|
+
_args76 = arguments;
|
|
12200
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee76$(_context76) {
|
|
12107
12201
|
while (1) {
|
|
12108
|
-
switch (
|
|
12202
|
+
switch (_context76.prev = _context76.next) {
|
|
12109
12203
|
case 0:
|
|
12110
|
-
options =
|
|
12204
|
+
options = _args76.length > 2 && _args76[2] !== undefined ? _args76[2] : {};
|
|
12111
12205
|
this.validateServerSideAuth();
|
|
12112
|
-
return
|
|
12206
|
+
return _context76.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
|
|
12113
12207
|
filter: filter,
|
|
12114
12208
|
sort: sort
|
|
12115
12209
|
}, options)));
|
|
12116
12210
|
|
|
12117
12211
|
case 3:
|
|
12118
12212
|
case "end":
|
|
12119
|
-
return
|
|
12213
|
+
return _context76.stop();
|
|
12120
12214
|
}
|
|
12121
12215
|
}
|
|
12122
|
-
},
|
|
12216
|
+
}, _callee76, this);
|
|
12123
12217
|
}));
|
|
12124
12218
|
|
|
12125
|
-
function querySegments(
|
|
12219
|
+
function querySegments(_x109, _x110) {
|
|
12126
12220
|
return _querySegments.apply(this, arguments);
|
|
12127
12221
|
}
|
|
12128
12222
|
|
|
@@ -12139,23 +12233,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12139
12233
|
}, {
|
|
12140
12234
|
key: "deleteSegment",
|
|
12141
12235
|
value: function () {
|
|
12142
|
-
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12143
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12236
|
+
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee77(id) {
|
|
12237
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee77$(_context77) {
|
|
12144
12238
|
while (1) {
|
|
12145
|
-
switch (
|
|
12239
|
+
switch (_context77.prev = _context77.next) {
|
|
12146
12240
|
case 0:
|
|
12147
12241
|
this.validateServerSideAuth();
|
|
12148
|
-
return
|
|
12242
|
+
return _context77.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
|
|
12149
12243
|
|
|
12150
12244
|
case 2:
|
|
12151
12245
|
case "end":
|
|
12152
|
-
return
|
|
12246
|
+
return _context77.stop();
|
|
12153
12247
|
}
|
|
12154
12248
|
}
|
|
12155
|
-
},
|
|
12249
|
+
}, _callee77, this);
|
|
12156
12250
|
}));
|
|
12157
12251
|
|
|
12158
|
-
function deleteSegment(
|
|
12252
|
+
function deleteSegment(_x111) {
|
|
12159
12253
|
return _deleteSegment.apply(this, arguments);
|
|
12160
12254
|
}
|
|
12161
12255
|
|
|
@@ -12173,23 +12267,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12173
12267
|
}, {
|
|
12174
12268
|
key: "segmentTargetExists",
|
|
12175
12269
|
value: function () {
|
|
12176
|
-
var _segmentTargetExists = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12177
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12270
|
+
var _segmentTargetExists = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee78(segmentId, targetId) {
|
|
12271
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee78$(_context78) {
|
|
12178
12272
|
while (1) {
|
|
12179
|
-
switch (
|
|
12273
|
+
switch (_context78.prev = _context78.next) {
|
|
12180
12274
|
case 0:
|
|
12181
12275
|
this.validateServerSideAuth();
|
|
12182
|
-
return
|
|
12276
|
+
return _context78.abrupt("return", this.get(this.baseURL + "/segments/".concat(segmentId, "/target/").concat(targetId)));
|
|
12183
12277
|
|
|
12184
12278
|
case 2:
|
|
12185
12279
|
case "end":
|
|
12186
|
-
return
|
|
12280
|
+
return _context78.stop();
|
|
12187
12281
|
}
|
|
12188
12282
|
}
|
|
12189
|
-
},
|
|
12283
|
+
}, _callee78, this);
|
|
12190
12284
|
}));
|
|
12191
12285
|
|
|
12192
|
-
function segmentTargetExists(
|
|
12286
|
+
function segmentTargetExists(_x112, _x113) {
|
|
12193
12287
|
return _segmentTargetExists.apply(this, arguments);
|
|
12194
12288
|
}
|
|
12195
12289
|
|
|
@@ -12206,23 +12300,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12206
12300
|
}, {
|
|
12207
12301
|
key: "createCampaign",
|
|
12208
12302
|
value: function () {
|
|
12209
|
-
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12210
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12303
|
+
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee79(params) {
|
|
12304
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee79$(_context79) {
|
|
12211
12305
|
while (1) {
|
|
12212
|
-
switch (
|
|
12306
|
+
switch (_context79.prev = _context79.next) {
|
|
12213
12307
|
case 0:
|
|
12214
12308
|
this.validateServerSideAuth();
|
|
12215
|
-
return
|
|
12309
|
+
return _context79.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
|
|
12216
12310
|
|
|
12217
12311
|
case 2:
|
|
12218
12312
|
case "end":
|
|
12219
|
-
return
|
|
12313
|
+
return _context79.stop();
|
|
12220
12314
|
}
|
|
12221
12315
|
}
|
|
12222
|
-
},
|
|
12316
|
+
}, _callee79, this);
|
|
12223
12317
|
}));
|
|
12224
12318
|
|
|
12225
|
-
function createCampaign(
|
|
12319
|
+
function createCampaign(_x114) {
|
|
12226
12320
|
return _createCampaign.apply(this, arguments);
|
|
12227
12321
|
}
|
|
12228
12322
|
|
|
@@ -12231,23 +12325,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12231
12325
|
}, {
|
|
12232
12326
|
key: "getCampaign",
|
|
12233
12327
|
value: function () {
|
|
12234
|
-
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12235
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12328
|
+
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee80(id) {
|
|
12329
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee80$(_context80) {
|
|
12236
12330
|
while (1) {
|
|
12237
|
-
switch (
|
|
12331
|
+
switch (_context80.prev = _context80.next) {
|
|
12238
12332
|
case 0:
|
|
12239
12333
|
this.validateServerSideAuth();
|
|
12240
|
-
return
|
|
12334
|
+
return _context80.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(id)));
|
|
12241
12335
|
|
|
12242
12336
|
case 2:
|
|
12243
12337
|
case "end":
|
|
12244
|
-
return
|
|
12338
|
+
return _context80.stop();
|
|
12245
12339
|
}
|
|
12246
12340
|
}
|
|
12247
|
-
},
|
|
12341
|
+
}, _callee80, this);
|
|
12248
12342
|
}));
|
|
12249
12343
|
|
|
12250
|
-
function getCampaign(
|
|
12344
|
+
function getCampaign(_x115) {
|
|
12251
12345
|
return _getCampaign.apply(this, arguments);
|
|
12252
12346
|
}
|
|
12253
12347
|
|
|
@@ -12256,26 +12350,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12256
12350
|
}, {
|
|
12257
12351
|
key: "startCampaign",
|
|
12258
12352
|
value: function () {
|
|
12259
|
-
var _startCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12260
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12353
|
+
var _startCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee81(id, options) {
|
|
12354
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee81$(_context81) {
|
|
12261
12355
|
while (1) {
|
|
12262
|
-
switch (
|
|
12356
|
+
switch (_context81.prev = _context81.next) {
|
|
12263
12357
|
case 0:
|
|
12264
12358
|
this.validateServerSideAuth();
|
|
12265
|
-
return
|
|
12359
|
+
return _context81.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/start"), {
|
|
12266
12360
|
scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
|
|
12267
12361
|
stop_at: options === null || options === void 0 ? void 0 : options.stopAt
|
|
12268
12362
|
}));
|
|
12269
12363
|
|
|
12270
12364
|
case 2:
|
|
12271
12365
|
case "end":
|
|
12272
|
-
return
|
|
12366
|
+
return _context81.stop();
|
|
12273
12367
|
}
|
|
12274
12368
|
}
|
|
12275
|
-
},
|
|
12369
|
+
}, _callee81, this);
|
|
12276
12370
|
}));
|
|
12277
12371
|
|
|
12278
|
-
function startCampaign(
|
|
12372
|
+
function startCampaign(_x116, _x117) {
|
|
12279
12373
|
return _startCampaign.apply(this, arguments);
|
|
12280
12374
|
}
|
|
12281
12375
|
|
|
@@ -12291,30 +12385,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12291
12385
|
}, {
|
|
12292
12386
|
key: "queryCampaigns",
|
|
12293
12387
|
value: function () {
|
|
12294
|
-
var _queryCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12295
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12388
|
+
var _queryCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee82(filter, sort, options) {
|
|
12389
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee82$(_context82) {
|
|
12296
12390
|
while (1) {
|
|
12297
|
-
switch (
|
|
12391
|
+
switch (_context82.prev = _context82.next) {
|
|
12298
12392
|
case 0:
|
|
12299
12393
|
this.validateServerSideAuth();
|
|
12300
|
-
|
|
12394
|
+
_context82.next = 3;
|
|
12301
12395
|
return this.post(this.baseURL + "/campaigns/query", _objectSpread({
|
|
12302
12396
|
filter: filter,
|
|
12303
12397
|
sort: sort
|
|
12304
12398
|
}, options || {}));
|
|
12305
12399
|
|
|
12306
12400
|
case 3:
|
|
12307
|
-
return
|
|
12401
|
+
return _context82.abrupt("return", _context82.sent);
|
|
12308
12402
|
|
|
12309
12403
|
case 4:
|
|
12310
12404
|
case "end":
|
|
12311
|
-
return
|
|
12405
|
+
return _context82.stop();
|
|
12312
12406
|
}
|
|
12313
12407
|
}
|
|
12314
|
-
},
|
|
12408
|
+
}, _callee82, this);
|
|
12315
12409
|
}));
|
|
12316
12410
|
|
|
12317
|
-
function queryCampaigns(
|
|
12411
|
+
function queryCampaigns(_x118, _x119, _x120) {
|
|
12318
12412
|
return _queryCampaigns.apply(this, arguments);
|
|
12319
12413
|
}
|
|
12320
12414
|
|
|
@@ -12332,23 +12426,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12332
12426
|
}, {
|
|
12333
12427
|
key: "updateCampaign",
|
|
12334
12428
|
value: function () {
|
|
12335
|
-
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12336
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12429
|
+
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee83(id, params) {
|
|
12430
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee83$(_context83) {
|
|
12337
12431
|
while (1) {
|
|
12338
|
-
switch (
|
|
12432
|
+
switch (_context83.prev = _context83.next) {
|
|
12339
12433
|
case 0:
|
|
12340
12434
|
this.validateServerSideAuth();
|
|
12341
|
-
return
|
|
12435
|
+
return _context83.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(id), params));
|
|
12342
12436
|
|
|
12343
12437
|
case 2:
|
|
12344
12438
|
case "end":
|
|
12345
|
-
return
|
|
12439
|
+
return _context83.stop();
|
|
12346
12440
|
}
|
|
12347
12441
|
}
|
|
12348
|
-
},
|
|
12442
|
+
}, _callee83, this);
|
|
12349
12443
|
}));
|
|
12350
12444
|
|
|
12351
|
-
function updateCampaign(
|
|
12445
|
+
function updateCampaign(_x121, _x122) {
|
|
12352
12446
|
return _updateCampaign.apply(this, arguments);
|
|
12353
12447
|
}
|
|
12354
12448
|
|
|
@@ -12365,23 +12459,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12365
12459
|
}, {
|
|
12366
12460
|
key: "deleteCampaign",
|
|
12367
12461
|
value: function () {
|
|
12368
|
-
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12369
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12462
|
+
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee84(id) {
|
|
12463
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee84$(_context84) {
|
|
12370
12464
|
while (1) {
|
|
12371
|
-
switch (
|
|
12465
|
+
switch (_context84.prev = _context84.next) {
|
|
12372
12466
|
case 0:
|
|
12373
12467
|
this.validateServerSideAuth();
|
|
12374
|
-
return
|
|
12468
|
+
return _context84.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
|
|
12375
12469
|
|
|
12376
12470
|
case 2:
|
|
12377
12471
|
case "end":
|
|
12378
|
-
return
|
|
12472
|
+
return _context84.stop();
|
|
12379
12473
|
}
|
|
12380
12474
|
}
|
|
12381
|
-
},
|
|
12475
|
+
}, _callee84, this);
|
|
12382
12476
|
}));
|
|
12383
12477
|
|
|
12384
|
-
function deleteCampaign(
|
|
12478
|
+
function deleteCampaign(_x123) {
|
|
12385
12479
|
return _deleteCampaign.apply(this, arguments);
|
|
12386
12480
|
}
|
|
12387
12481
|
|
|
@@ -12398,23 +12492,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12398
12492
|
}, {
|
|
12399
12493
|
key: "stopCampaign",
|
|
12400
12494
|
value: function () {
|
|
12401
|
-
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12402
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12495
|
+
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee85(id) {
|
|
12496
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee85$(_context85) {
|
|
12403
12497
|
while (1) {
|
|
12404
|
-
switch (
|
|
12498
|
+
switch (_context85.prev = _context85.next) {
|
|
12405
12499
|
case 0:
|
|
12406
12500
|
this.validateServerSideAuth();
|
|
12407
|
-
return
|
|
12501
|
+
return _context85.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/stop")));
|
|
12408
12502
|
|
|
12409
12503
|
case 2:
|
|
12410
12504
|
case "end":
|
|
12411
|
-
return
|
|
12505
|
+
return _context85.stop();
|
|
12412
12506
|
}
|
|
12413
12507
|
}
|
|
12414
|
-
},
|
|
12508
|
+
}, _callee85, this);
|
|
12415
12509
|
}));
|
|
12416
12510
|
|
|
12417
|
-
function stopCampaign(
|
|
12511
|
+
function stopCampaign(_x124) {
|
|
12418
12512
|
return _stopCampaign.apply(this, arguments);
|
|
12419
12513
|
}
|
|
12420
12514
|
|
|
@@ -12430,24 +12524,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12430
12524
|
}, {
|
|
12431
12525
|
key: "enrichURL",
|
|
12432
12526
|
value: function () {
|
|
12433
|
-
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12434
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12527
|
+
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee86(url) {
|
|
12528
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee86$(_context86) {
|
|
12435
12529
|
while (1) {
|
|
12436
|
-
switch (
|
|
12530
|
+
switch (_context86.prev = _context86.next) {
|
|
12437
12531
|
case 0:
|
|
12438
|
-
return
|
|
12532
|
+
return _context86.abrupt("return", this.get(this.baseURL + "/og", {
|
|
12439
12533
|
url: url
|
|
12440
12534
|
}));
|
|
12441
12535
|
|
|
12442
12536
|
case 1:
|
|
12443
12537
|
case "end":
|
|
12444
|
-
return
|
|
12538
|
+
return _context86.stop();
|
|
12445
12539
|
}
|
|
12446
12540
|
}
|
|
12447
|
-
},
|
|
12541
|
+
}, _callee86, this);
|
|
12448
12542
|
}));
|
|
12449
12543
|
|
|
12450
|
-
function enrichURL(
|
|
12544
|
+
function enrichURL(_x125) {
|
|
12451
12545
|
return _enrichURL.apply(this, arguments);
|
|
12452
12546
|
}
|
|
12453
12547
|
|
|
@@ -12464,22 +12558,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12464
12558
|
}, {
|
|
12465
12559
|
key: "getTask",
|
|
12466
12560
|
value: function () {
|
|
12467
|
-
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12468
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12561
|
+
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee87(id) {
|
|
12562
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee87$(_context87) {
|
|
12469
12563
|
while (1) {
|
|
12470
|
-
switch (
|
|
12564
|
+
switch (_context87.prev = _context87.next) {
|
|
12471
12565
|
case 0:
|
|
12472
|
-
return
|
|
12566
|
+
return _context87.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
12473
12567
|
|
|
12474
12568
|
case 1:
|
|
12475
12569
|
case "end":
|
|
12476
|
-
return
|
|
12570
|
+
return _context87.stop();
|
|
12477
12571
|
}
|
|
12478
12572
|
}
|
|
12479
|
-
},
|
|
12573
|
+
}, _callee87, this);
|
|
12480
12574
|
}));
|
|
12481
12575
|
|
|
12482
|
-
function getTask(
|
|
12576
|
+
function getTask(_x126) {
|
|
12483
12577
|
return _getTask.apply(this, arguments);
|
|
12484
12578
|
}
|
|
12485
12579
|
|
|
@@ -12497,31 +12591,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12497
12591
|
}, {
|
|
12498
12592
|
key: "deleteChannels",
|
|
12499
12593
|
value: function () {
|
|
12500
|
-
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12594
|
+
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee88(cids) {
|
|
12501
12595
|
var options,
|
|
12502
|
-
|
|
12503
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12596
|
+
_args88 = arguments;
|
|
12597
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee88$(_context88) {
|
|
12504
12598
|
while (1) {
|
|
12505
|
-
switch (
|
|
12599
|
+
switch (_context88.prev = _context88.next) {
|
|
12506
12600
|
case 0:
|
|
12507
|
-
options =
|
|
12508
|
-
|
|
12601
|
+
options = _args88.length > 1 && _args88[1] !== undefined ? _args88[1] : {};
|
|
12602
|
+
_context88.next = 3;
|
|
12509
12603
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
12510
12604
|
cids: cids
|
|
12511
12605
|
}, options));
|
|
12512
12606
|
|
|
12513
12607
|
case 3:
|
|
12514
|
-
return
|
|
12608
|
+
return _context88.abrupt("return", _context88.sent);
|
|
12515
12609
|
|
|
12516
12610
|
case 4:
|
|
12517
12611
|
case "end":
|
|
12518
|
-
return
|
|
12612
|
+
return _context88.stop();
|
|
12519
12613
|
}
|
|
12520
12614
|
}
|
|
12521
|
-
},
|
|
12615
|
+
}, _callee88, this);
|
|
12522
12616
|
}));
|
|
12523
12617
|
|
|
12524
|
-
function deleteChannels(
|
|
12618
|
+
function deleteChannels(_x127) {
|
|
12525
12619
|
return _deleteChannels.apply(this, arguments);
|
|
12526
12620
|
}
|
|
12527
12621
|
|
|
@@ -12539,17 +12633,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12539
12633
|
}, {
|
|
12540
12634
|
key: "deleteUsers",
|
|
12541
12635
|
value: function () {
|
|
12542
|
-
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12636
|
+
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee89(user_ids) {
|
|
12543
12637
|
var options,
|
|
12544
|
-
|
|
12545
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12638
|
+
_args89 = arguments;
|
|
12639
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee89$(_context89) {
|
|
12546
12640
|
while (1) {
|
|
12547
|
-
switch (
|
|
12641
|
+
switch (_context89.prev = _context89.next) {
|
|
12548
12642
|
case 0:
|
|
12549
|
-
options =
|
|
12643
|
+
options = _args89.length > 1 && _args89[1] !== undefined ? _args89[1] : {};
|
|
12550
12644
|
|
|
12551
12645
|
if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
|
|
12552
|
-
|
|
12646
|
+
_context89.next = 3;
|
|
12553
12647
|
break;
|
|
12554
12648
|
}
|
|
12555
12649
|
|
|
@@ -12557,7 +12651,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12557
12651
|
|
|
12558
12652
|
case 3:
|
|
12559
12653
|
if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
|
|
12560
|
-
|
|
12654
|
+
_context89.next = 5;
|
|
12561
12655
|
break;
|
|
12562
12656
|
}
|
|
12563
12657
|
|
|
@@ -12565,30 +12659,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12565
12659
|
|
|
12566
12660
|
case 5:
|
|
12567
12661
|
if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
|
|
12568
|
-
|
|
12662
|
+
_context89.next = 7;
|
|
12569
12663
|
break;
|
|
12570
12664
|
}
|
|
12571
12665
|
|
|
12572
12666
|
throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
|
|
12573
12667
|
|
|
12574
12668
|
case 7:
|
|
12575
|
-
|
|
12669
|
+
_context89.next = 9;
|
|
12576
12670
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
12577
12671
|
user_ids: user_ids
|
|
12578
12672
|
}, options));
|
|
12579
12673
|
|
|
12580
12674
|
case 9:
|
|
12581
|
-
return
|
|
12675
|
+
return _context89.abrupt("return", _context89.sent);
|
|
12582
12676
|
|
|
12583
12677
|
case 10:
|
|
12584
12678
|
case "end":
|
|
12585
|
-
return
|
|
12679
|
+
return _context89.stop();
|
|
12586
12680
|
}
|
|
12587
12681
|
}
|
|
12588
|
-
},
|
|
12682
|
+
}, _callee89, this);
|
|
12589
12683
|
}));
|
|
12590
12684
|
|
|
12591
|
-
function deleteUsers(
|
|
12685
|
+
function deleteUsers(_x128) {
|
|
12592
12686
|
return _deleteUsers.apply(this, arguments);
|
|
12593
12687
|
}
|
|
12594
12688
|
|
|
@@ -12609,28 +12703,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12609
12703
|
}, {
|
|
12610
12704
|
key: "_createImportURL",
|
|
12611
12705
|
value: function () {
|
|
12612
|
-
var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12613
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12706
|
+
var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee90(filename) {
|
|
12707
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee90$(_context90) {
|
|
12614
12708
|
while (1) {
|
|
12615
|
-
switch (
|
|
12709
|
+
switch (_context90.prev = _context90.next) {
|
|
12616
12710
|
case 0:
|
|
12617
|
-
|
|
12711
|
+
_context90.next = 2;
|
|
12618
12712
|
return this.post(this.baseURL + "/import_urls", {
|
|
12619
12713
|
filename: filename
|
|
12620
12714
|
});
|
|
12621
12715
|
|
|
12622
12716
|
case 2:
|
|
12623
|
-
return
|
|
12717
|
+
return _context90.abrupt("return", _context90.sent);
|
|
12624
12718
|
|
|
12625
12719
|
case 3:
|
|
12626
12720
|
case "end":
|
|
12627
|
-
return
|
|
12721
|
+
return _context90.stop();
|
|
12628
12722
|
}
|
|
12629
12723
|
}
|
|
12630
|
-
},
|
|
12724
|
+
}, _callee90, this);
|
|
12631
12725
|
}));
|
|
12632
12726
|
|
|
12633
|
-
function _createImportURL(
|
|
12727
|
+
function _createImportURL(_x129) {
|
|
12634
12728
|
return _createImportURL2.apply(this, arguments);
|
|
12635
12729
|
}
|
|
12636
12730
|
|
|
@@ -12652,33 +12746,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12652
12746
|
}, {
|
|
12653
12747
|
key: "_createImport",
|
|
12654
12748
|
value: function () {
|
|
12655
|
-
var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12749
|
+
var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee91(path) {
|
|
12656
12750
|
var options,
|
|
12657
|
-
|
|
12658
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12751
|
+
_args91 = arguments;
|
|
12752
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee91$(_context91) {
|
|
12659
12753
|
while (1) {
|
|
12660
|
-
switch (
|
|
12754
|
+
switch (_context91.prev = _context91.next) {
|
|
12661
12755
|
case 0:
|
|
12662
|
-
options =
|
|
12756
|
+
options = _args91.length > 1 && _args91[1] !== undefined ? _args91[1] : {
|
|
12663
12757
|
mode: 'upsert'
|
|
12664
12758
|
};
|
|
12665
|
-
|
|
12759
|
+
_context91.next = 3;
|
|
12666
12760
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
12667
12761
|
path: path
|
|
12668
12762
|
}, options));
|
|
12669
12763
|
|
|
12670
12764
|
case 3:
|
|
12671
|
-
return
|
|
12765
|
+
return _context91.abrupt("return", _context91.sent);
|
|
12672
12766
|
|
|
12673
12767
|
case 4:
|
|
12674
12768
|
case "end":
|
|
12675
|
-
return
|
|
12769
|
+
return _context91.stop();
|
|
12676
12770
|
}
|
|
12677
12771
|
}
|
|
12678
|
-
},
|
|
12772
|
+
}, _callee91, this);
|
|
12679
12773
|
}));
|
|
12680
12774
|
|
|
12681
|
-
function _createImport(
|
|
12775
|
+
function _createImport(_x130) {
|
|
12682
12776
|
return _createImport2.apply(this, arguments);
|
|
12683
12777
|
}
|
|
12684
12778
|
|
|
@@ -12700,26 +12794,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12700
12794
|
}, {
|
|
12701
12795
|
key: "_getImport",
|
|
12702
12796
|
value: function () {
|
|
12703
|
-
var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12704
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12797
|
+
var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee92(id) {
|
|
12798
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee92$(_context92) {
|
|
12705
12799
|
while (1) {
|
|
12706
|
-
switch (
|
|
12800
|
+
switch (_context92.prev = _context92.next) {
|
|
12707
12801
|
case 0:
|
|
12708
|
-
|
|
12802
|
+
_context92.next = 2;
|
|
12709
12803
|
return this.get(this.baseURL + "/imports/".concat(id));
|
|
12710
12804
|
|
|
12711
12805
|
case 2:
|
|
12712
|
-
return
|
|
12806
|
+
return _context92.abrupt("return", _context92.sent);
|
|
12713
12807
|
|
|
12714
12808
|
case 3:
|
|
12715
12809
|
case "end":
|
|
12716
|
-
return
|
|
12810
|
+
return _context92.stop();
|
|
12717
12811
|
}
|
|
12718
12812
|
}
|
|
12719
|
-
},
|
|
12813
|
+
}, _callee92, this);
|
|
12720
12814
|
}));
|
|
12721
12815
|
|
|
12722
|
-
function _getImport(
|
|
12816
|
+
function _getImport(_x131) {
|
|
12723
12817
|
return _getImport2.apply(this, arguments);
|
|
12724
12818
|
}
|
|
12725
12819
|
|
|
@@ -12741,26 +12835,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12741
12835
|
}, {
|
|
12742
12836
|
key: "_listImports",
|
|
12743
12837
|
value: function () {
|
|
12744
|
-
var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12745
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12838
|
+
var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee93(options) {
|
|
12839
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee93$(_context93) {
|
|
12746
12840
|
while (1) {
|
|
12747
|
-
switch (
|
|
12841
|
+
switch (_context93.prev = _context93.next) {
|
|
12748
12842
|
case 0:
|
|
12749
|
-
|
|
12843
|
+
_context93.next = 2;
|
|
12750
12844
|
return this.get(this.baseURL + "/imports", options);
|
|
12751
12845
|
|
|
12752
12846
|
case 2:
|
|
12753
|
-
return
|
|
12847
|
+
return _context93.abrupt("return", _context93.sent);
|
|
12754
12848
|
|
|
12755
12849
|
case 3:
|
|
12756
12850
|
case "end":
|
|
12757
|
-
return
|
|
12851
|
+
return _context93.stop();
|
|
12758
12852
|
}
|
|
12759
12853
|
}
|
|
12760
|
-
},
|
|
12854
|
+
}, _callee93, this);
|
|
12761
12855
|
}));
|
|
12762
12856
|
|
|
12763
|
-
function _listImports(
|
|
12857
|
+
function _listImports(_x132) {
|
|
12764
12858
|
return _listImports2.apply(this, arguments);
|
|
12765
12859
|
}
|
|
12766
12860
|
|
|
@@ -12779,28 +12873,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12779
12873
|
}, {
|
|
12780
12874
|
key: "upsertPushProvider",
|
|
12781
12875
|
value: function () {
|
|
12782
|
-
var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12783
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12876
|
+
var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee94(pushProvider) {
|
|
12877
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee94$(_context94) {
|
|
12784
12878
|
while (1) {
|
|
12785
|
-
switch (
|
|
12879
|
+
switch (_context94.prev = _context94.next) {
|
|
12786
12880
|
case 0:
|
|
12787
|
-
|
|
12881
|
+
_context94.next = 2;
|
|
12788
12882
|
return this.post(this.baseURL + "/push_providers", {
|
|
12789
12883
|
push_provider: pushProvider
|
|
12790
12884
|
});
|
|
12791
12885
|
|
|
12792
12886
|
case 2:
|
|
12793
|
-
return
|
|
12887
|
+
return _context94.abrupt("return", _context94.sent);
|
|
12794
12888
|
|
|
12795
12889
|
case 3:
|
|
12796
12890
|
case "end":
|
|
12797
|
-
return
|
|
12891
|
+
return _context94.stop();
|
|
12798
12892
|
}
|
|
12799
12893
|
}
|
|
12800
|
-
},
|
|
12894
|
+
}, _callee94, this);
|
|
12801
12895
|
}));
|
|
12802
12896
|
|
|
12803
|
-
function upsertPushProvider(
|
|
12897
|
+
function upsertPushProvider(_x133) {
|
|
12804
12898
|
return _upsertPushProvider.apply(this, arguments);
|
|
12805
12899
|
}
|
|
12806
12900
|
|
|
@@ -12819,28 +12913,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12819
12913
|
}, {
|
|
12820
12914
|
key: "deletePushProvider",
|
|
12821
12915
|
value: function () {
|
|
12822
|
-
var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12916
|
+
var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee95(_ref10) {
|
|
12823
12917
|
var type, name;
|
|
12824
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12918
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee95$(_context95) {
|
|
12825
12919
|
while (1) {
|
|
12826
|
-
switch (
|
|
12920
|
+
switch (_context95.prev = _context95.next) {
|
|
12827
12921
|
case 0:
|
|
12828
12922
|
type = _ref10.type, name = _ref10.name;
|
|
12829
|
-
|
|
12923
|
+
_context95.next = 3;
|
|
12830
12924
|
return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
|
|
12831
12925
|
|
|
12832
12926
|
case 3:
|
|
12833
|
-
return
|
|
12927
|
+
return _context95.abrupt("return", _context95.sent);
|
|
12834
12928
|
|
|
12835
12929
|
case 4:
|
|
12836
12930
|
case "end":
|
|
12837
|
-
return
|
|
12931
|
+
return _context95.stop();
|
|
12838
12932
|
}
|
|
12839
12933
|
}
|
|
12840
|
-
},
|
|
12934
|
+
}, _callee95, this);
|
|
12841
12935
|
}));
|
|
12842
12936
|
|
|
12843
|
-
function deletePushProvider(
|
|
12937
|
+
function deletePushProvider(_x134) {
|
|
12844
12938
|
return _deletePushProvider.apply(this, arguments);
|
|
12845
12939
|
}
|
|
12846
12940
|
|
|
@@ -12857,23 +12951,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12857
12951
|
}, {
|
|
12858
12952
|
key: "listPushProviders",
|
|
12859
12953
|
value: function () {
|
|
12860
|
-
var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12861
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12954
|
+
var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee96() {
|
|
12955
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee96$(_context96) {
|
|
12862
12956
|
while (1) {
|
|
12863
|
-
switch (
|
|
12957
|
+
switch (_context96.prev = _context96.next) {
|
|
12864
12958
|
case 0:
|
|
12865
|
-
|
|
12959
|
+
_context96.next = 2;
|
|
12866
12960
|
return this.get(this.baseURL + "/push_providers");
|
|
12867
12961
|
|
|
12868
12962
|
case 2:
|
|
12869
|
-
return
|
|
12963
|
+
return _context96.abrupt("return", _context96.sent);
|
|
12870
12964
|
|
|
12871
12965
|
case 3:
|
|
12872
12966
|
case "end":
|
|
12873
|
-
return
|
|
12967
|
+
return _context96.stop();
|
|
12874
12968
|
}
|
|
12875
12969
|
}
|
|
12876
|
-
},
|
|
12970
|
+
}, _callee96, this);
|
|
12877
12971
|
}));
|
|
12878
12972
|
|
|
12879
12973
|
function listPushProviders() {
|
|
@@ -12901,26 +12995,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12901
12995
|
}, {
|
|
12902
12996
|
key: "commitMessage",
|
|
12903
12997
|
value: function () {
|
|
12904
|
-
var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12905
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12998
|
+
var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee97(id) {
|
|
12999
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee97$(_context97) {
|
|
12906
13000
|
while (1) {
|
|
12907
|
-
switch (
|
|
13001
|
+
switch (_context97.prev = _context97.next) {
|
|
12908
13002
|
case 0:
|
|
12909
|
-
|
|
13003
|
+
_context97.next = 2;
|
|
12910
13004
|
return this.post(this.baseURL + "/messages/".concat(id, "/commit"));
|
|
12911
13005
|
|
|
12912
13006
|
case 2:
|
|
12913
|
-
return
|
|
13007
|
+
return _context97.abrupt("return", _context97.sent);
|
|
12914
13008
|
|
|
12915
13009
|
case 3:
|
|
12916
13010
|
case "end":
|
|
12917
|
-
return
|
|
13011
|
+
return _context97.stop();
|
|
12918
13012
|
}
|
|
12919
13013
|
}
|
|
12920
|
-
},
|
|
13014
|
+
}, _callee97, this);
|
|
12921
13015
|
}));
|
|
12922
13016
|
|
|
12923
|
-
function commitMessage(
|
|
13017
|
+
function commitMessage(_x135) {
|
|
12924
13018
|
return _commitMessage.apply(this, arguments);
|
|
12925
13019
|
}
|
|
12926
13020
|
|
|
@@ -12935,26 +13029,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12935
13029
|
}, {
|
|
12936
13030
|
key: "createPoll",
|
|
12937
13031
|
value: function () {
|
|
12938
|
-
var _createPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12939
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13032
|
+
var _createPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee98(poll) {
|
|
13033
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee98$(_context98) {
|
|
12940
13034
|
while (1) {
|
|
12941
|
-
switch (
|
|
13035
|
+
switch (_context98.prev = _context98.next) {
|
|
12942
13036
|
case 0:
|
|
12943
|
-
|
|
13037
|
+
_context98.next = 2;
|
|
12944
13038
|
return this.post(this.baseURL + "/polls", poll);
|
|
12945
13039
|
|
|
12946
13040
|
case 2:
|
|
12947
|
-
return
|
|
13041
|
+
return _context98.abrupt("return", _context98.sent);
|
|
12948
13042
|
|
|
12949
13043
|
case 3:
|
|
12950
13044
|
case "end":
|
|
12951
|
-
return
|
|
13045
|
+
return _context98.stop();
|
|
12952
13046
|
}
|
|
12953
13047
|
}
|
|
12954
|
-
},
|
|
13048
|
+
}, _callee98, this);
|
|
12955
13049
|
}));
|
|
12956
13050
|
|
|
12957
|
-
function createPoll(
|
|
13051
|
+
function createPoll(_x136) {
|
|
12958
13052
|
return _createPoll.apply(this, arguments);
|
|
12959
13053
|
}
|
|
12960
13054
|
|
|
@@ -12969,28 +13063,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12969
13063
|
}, {
|
|
12970
13064
|
key: "getPoll",
|
|
12971
13065
|
value: function () {
|
|
12972
|
-
var _getPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12973
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13066
|
+
var _getPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee99(id, userId) {
|
|
13067
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee99$(_context99) {
|
|
12974
13068
|
while (1) {
|
|
12975
|
-
switch (
|
|
13069
|
+
switch (_context99.prev = _context99.next) {
|
|
12976
13070
|
case 0:
|
|
12977
|
-
|
|
13071
|
+
_context99.next = 2;
|
|
12978
13072
|
return this.get(this.baseURL + "/polls/".concat(id), _objectSpread({}, userId ? {
|
|
12979
13073
|
user_id: userId
|
|
12980
13074
|
} : {}));
|
|
12981
13075
|
|
|
12982
13076
|
case 2:
|
|
12983
|
-
return
|
|
13077
|
+
return _context99.abrupt("return", _context99.sent);
|
|
12984
13078
|
|
|
12985
13079
|
case 3:
|
|
12986
13080
|
case "end":
|
|
12987
|
-
return
|
|
13081
|
+
return _context99.stop();
|
|
12988
13082
|
}
|
|
12989
13083
|
}
|
|
12990
|
-
},
|
|
13084
|
+
}, _callee99, this);
|
|
12991
13085
|
}));
|
|
12992
13086
|
|
|
12993
|
-
function getPoll(
|
|
13087
|
+
function getPoll(_x137, _x138) {
|
|
12994
13088
|
return _getPoll.apply(this, arguments);
|
|
12995
13089
|
}
|
|
12996
13090
|
|
|
@@ -13005,26 +13099,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13005
13099
|
}, {
|
|
13006
13100
|
key: "updatePoll",
|
|
13007
13101
|
value: function () {
|
|
13008
|
-
var _updatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13009
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13102
|
+
var _updatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee100(poll) {
|
|
13103
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee100$(_context100) {
|
|
13010
13104
|
while (1) {
|
|
13011
|
-
switch (
|
|
13105
|
+
switch (_context100.prev = _context100.next) {
|
|
13012
13106
|
case 0:
|
|
13013
|
-
|
|
13107
|
+
_context100.next = 2;
|
|
13014
13108
|
return this.put(this.baseURL + "/polls", poll);
|
|
13015
13109
|
|
|
13016
13110
|
case 2:
|
|
13017
|
-
return
|
|
13111
|
+
return _context100.abrupt("return", _context100.sent);
|
|
13018
13112
|
|
|
13019
13113
|
case 3:
|
|
13020
13114
|
case "end":
|
|
13021
|
-
return
|
|
13115
|
+
return _context100.stop();
|
|
13022
13116
|
}
|
|
13023
13117
|
}
|
|
13024
|
-
},
|
|
13118
|
+
}, _callee100, this);
|
|
13025
13119
|
}));
|
|
13026
13120
|
|
|
13027
|
-
function updatePoll(
|
|
13121
|
+
function updatePoll(_x139) {
|
|
13028
13122
|
return _updatePoll.apply(this, arguments);
|
|
13029
13123
|
}
|
|
13030
13124
|
|
|
@@ -13041,26 +13135,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13041
13135
|
}, {
|
|
13042
13136
|
key: "partialUpdatePoll",
|
|
13043
13137
|
value: function () {
|
|
13044
|
-
var _partialUpdatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13045
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13138
|
+
var _partialUpdatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee101(id, partialPollObject) {
|
|
13139
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee101$(_context101) {
|
|
13046
13140
|
while (1) {
|
|
13047
|
-
switch (
|
|
13141
|
+
switch (_context101.prev = _context101.next) {
|
|
13048
13142
|
case 0:
|
|
13049
|
-
|
|
13143
|
+
_context101.next = 2;
|
|
13050
13144
|
return this.patch(this.baseURL + "/polls/".concat(id), partialPollObject);
|
|
13051
13145
|
|
|
13052
13146
|
case 2:
|
|
13053
|
-
return
|
|
13147
|
+
return _context101.abrupt("return", _context101.sent);
|
|
13054
13148
|
|
|
13055
13149
|
case 3:
|
|
13056
13150
|
case "end":
|
|
13057
|
-
return
|
|
13151
|
+
return _context101.stop();
|
|
13058
13152
|
}
|
|
13059
13153
|
}
|
|
13060
|
-
},
|
|
13154
|
+
}, _callee101, this);
|
|
13061
13155
|
}));
|
|
13062
13156
|
|
|
13063
|
-
function partialUpdatePoll(
|
|
13157
|
+
function partialUpdatePoll(_x140, _x141) {
|
|
13064
13158
|
return _partialUpdatePoll.apply(this, arguments);
|
|
13065
13159
|
}
|
|
13066
13160
|
|
|
@@ -13076,28 +13170,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13076
13170
|
}, {
|
|
13077
13171
|
key: "deletePoll",
|
|
13078
13172
|
value: function () {
|
|
13079
|
-
var _deletePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13080
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13173
|
+
var _deletePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee102(id, userId) {
|
|
13174
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee102$(_context102) {
|
|
13081
13175
|
while (1) {
|
|
13082
|
-
switch (
|
|
13176
|
+
switch (_context102.prev = _context102.next) {
|
|
13083
13177
|
case 0:
|
|
13084
|
-
|
|
13178
|
+
_context102.next = 2;
|
|
13085
13179
|
return this.delete(this.baseURL + "/polls/".concat(id), _objectSpread({}, userId ? {
|
|
13086
13180
|
user_id: userId
|
|
13087
13181
|
} : {}));
|
|
13088
13182
|
|
|
13089
13183
|
case 2:
|
|
13090
|
-
return
|
|
13184
|
+
return _context102.abrupt("return", _context102.sent);
|
|
13091
13185
|
|
|
13092
13186
|
case 3:
|
|
13093
13187
|
case "end":
|
|
13094
|
-
return
|
|
13188
|
+
return _context102.stop();
|
|
13095
13189
|
}
|
|
13096
13190
|
}
|
|
13097
|
-
},
|
|
13191
|
+
}, _callee102, this);
|
|
13098
13192
|
}));
|
|
13099
13193
|
|
|
13100
|
-
function deletePoll(
|
|
13194
|
+
function deletePoll(_x142, _x143) {
|
|
13101
13195
|
return _deletePoll.apply(this, arguments);
|
|
13102
13196
|
}
|
|
13103
13197
|
|
|
@@ -13112,12 +13206,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13112
13206
|
}, {
|
|
13113
13207
|
key: "closePoll",
|
|
13114
13208
|
value: function () {
|
|
13115
|
-
var _closePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13116
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13209
|
+
var _closePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee103(id) {
|
|
13210
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee103$(_context103) {
|
|
13117
13211
|
while (1) {
|
|
13118
|
-
switch (
|
|
13212
|
+
switch (_context103.prev = _context103.next) {
|
|
13119
13213
|
case 0:
|
|
13120
|
-
return
|
|
13214
|
+
return _context103.abrupt("return", this.partialUpdatePoll(id, {
|
|
13121
13215
|
set: {
|
|
13122
13216
|
is_closed: true
|
|
13123
13217
|
}
|
|
@@ -13125,13 +13219,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13125
13219
|
|
|
13126
13220
|
case 1:
|
|
13127
13221
|
case "end":
|
|
13128
|
-
return
|
|
13222
|
+
return _context103.stop();
|
|
13129
13223
|
}
|
|
13130
13224
|
}
|
|
13131
|
-
},
|
|
13225
|
+
}, _callee103, this);
|
|
13132
13226
|
}));
|
|
13133
13227
|
|
|
13134
|
-
function closePoll(
|
|
13228
|
+
function closePoll(_x144) {
|
|
13135
13229
|
return _closePoll.apply(this, arguments);
|
|
13136
13230
|
}
|
|
13137
13231
|
|
|
@@ -13147,26 +13241,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13147
13241
|
}, {
|
|
13148
13242
|
key: "createPollOption",
|
|
13149
13243
|
value: function () {
|
|
13150
|
-
var _createPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13151
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13244
|
+
var _createPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee104(pollId, option) {
|
|
13245
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee104$(_context104) {
|
|
13152
13246
|
while (1) {
|
|
13153
|
-
switch (
|
|
13247
|
+
switch (_context104.prev = _context104.next) {
|
|
13154
13248
|
case 0:
|
|
13155
|
-
|
|
13249
|
+
_context104.next = 2;
|
|
13156
13250
|
return this.post(this.baseURL + "/polls/".concat(pollId, "/options"), option);
|
|
13157
13251
|
|
|
13158
13252
|
case 2:
|
|
13159
|
-
return
|
|
13253
|
+
return _context104.abrupt("return", _context104.sent);
|
|
13160
13254
|
|
|
13161
13255
|
case 3:
|
|
13162
13256
|
case "end":
|
|
13163
|
-
return
|
|
13257
|
+
return _context104.stop();
|
|
13164
13258
|
}
|
|
13165
13259
|
}
|
|
13166
|
-
},
|
|
13260
|
+
}, _callee104, this);
|
|
13167
13261
|
}));
|
|
13168
13262
|
|
|
13169
|
-
function createPollOption(
|
|
13263
|
+
function createPollOption(_x145, _x146) {
|
|
13170
13264
|
return _createPollOption.apply(this, arguments);
|
|
13171
13265
|
}
|
|
13172
13266
|
|
|
@@ -13182,26 +13276,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13182
13276
|
}, {
|
|
13183
13277
|
key: "getPollOption",
|
|
13184
13278
|
value: function () {
|
|
13185
|
-
var _getPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13186
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13279
|
+
var _getPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee105(pollId, optionId) {
|
|
13280
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee105$(_context105) {
|
|
13187
13281
|
while (1) {
|
|
13188
|
-
switch (
|
|
13282
|
+
switch (_context105.prev = _context105.next) {
|
|
13189
13283
|
case 0:
|
|
13190
|
-
|
|
13284
|
+
_context105.next = 2;
|
|
13191
13285
|
return this.get(this.baseURL + "/polls/".concat(pollId, "/options/").concat(optionId));
|
|
13192
13286
|
|
|
13193
13287
|
case 2:
|
|
13194
|
-
return
|
|
13288
|
+
return _context105.abrupt("return", _context105.sent);
|
|
13195
13289
|
|
|
13196
13290
|
case 3:
|
|
13197
13291
|
case "end":
|
|
13198
|
-
return
|
|
13292
|
+
return _context105.stop();
|
|
13199
13293
|
}
|
|
13200
13294
|
}
|
|
13201
|
-
},
|
|
13295
|
+
}, _callee105, this);
|
|
13202
13296
|
}));
|
|
13203
13297
|
|
|
13204
|
-
function getPollOption(
|
|
13298
|
+
function getPollOption(_x147, _x148) {
|
|
13205
13299
|
return _getPollOption.apply(this, arguments);
|
|
13206
13300
|
}
|
|
13207
13301
|
|
|
@@ -13217,26 +13311,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13217
13311
|
}, {
|
|
13218
13312
|
key: "updatePollOption",
|
|
13219
13313
|
value: function () {
|
|
13220
|
-
var _updatePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13221
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13314
|
+
var _updatePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee106(pollId, option) {
|
|
13315
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee106$(_context106) {
|
|
13222
13316
|
while (1) {
|
|
13223
|
-
switch (
|
|
13317
|
+
switch (_context106.prev = _context106.next) {
|
|
13224
13318
|
case 0:
|
|
13225
|
-
|
|
13319
|
+
_context106.next = 2;
|
|
13226
13320
|
return this.put(this.baseURL + "/polls/".concat(pollId, "/options"), option);
|
|
13227
13321
|
|
|
13228
13322
|
case 2:
|
|
13229
|
-
return
|
|
13323
|
+
return _context106.abrupt("return", _context106.sent);
|
|
13230
13324
|
|
|
13231
13325
|
case 3:
|
|
13232
13326
|
case "end":
|
|
13233
|
-
return
|
|
13327
|
+
return _context106.stop();
|
|
13234
13328
|
}
|
|
13235
13329
|
}
|
|
13236
|
-
},
|
|
13330
|
+
}, _callee106, this);
|
|
13237
13331
|
}));
|
|
13238
13332
|
|
|
13239
|
-
function updatePollOption(
|
|
13333
|
+
function updatePollOption(_x149, _x150) {
|
|
13240
13334
|
return _updatePollOption.apply(this, arguments);
|
|
13241
13335
|
}
|
|
13242
13336
|
|
|
@@ -13252,26 +13346,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13252
13346
|
}, {
|
|
13253
13347
|
key: "deletePollOption",
|
|
13254
13348
|
value: function () {
|
|
13255
|
-
var _deletePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13256
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13349
|
+
var _deletePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee107(pollId, optionId) {
|
|
13350
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee107$(_context107) {
|
|
13257
13351
|
while (1) {
|
|
13258
|
-
switch (
|
|
13352
|
+
switch (_context107.prev = _context107.next) {
|
|
13259
13353
|
case 0:
|
|
13260
|
-
|
|
13354
|
+
_context107.next = 2;
|
|
13261
13355
|
return this.delete(this.baseURL + "/polls/".concat(pollId, "/options/").concat(optionId));
|
|
13262
13356
|
|
|
13263
13357
|
case 2:
|
|
13264
|
-
return
|
|
13358
|
+
return _context107.abrupt("return", _context107.sent);
|
|
13265
13359
|
|
|
13266
13360
|
case 3:
|
|
13267
13361
|
case "end":
|
|
13268
|
-
return
|
|
13362
|
+
return _context107.stop();
|
|
13269
13363
|
}
|
|
13270
13364
|
}
|
|
13271
|
-
},
|
|
13365
|
+
}, _callee107, this);
|
|
13272
13366
|
}));
|
|
13273
13367
|
|
|
13274
|
-
function deletePollOption(
|
|
13368
|
+
function deletePollOption(_x151, _x152) {
|
|
13275
13369
|
return _deletePollOption.apply(this, arguments);
|
|
13276
13370
|
}
|
|
13277
13371
|
|
|
@@ -13288,31 +13382,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13288
13382
|
}, {
|
|
13289
13383
|
key: "castPollVote",
|
|
13290
13384
|
value: function () {
|
|
13291
|
-
var _castPollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13385
|
+
var _castPollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee108(messageId, pollId, vote) {
|
|
13292
13386
|
var options,
|
|
13293
|
-
|
|
13294
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13387
|
+
_args108 = arguments;
|
|
13388
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee108$(_context108) {
|
|
13295
13389
|
while (1) {
|
|
13296
|
-
switch (
|
|
13390
|
+
switch (_context108.prev = _context108.next) {
|
|
13297
13391
|
case 0:
|
|
13298
|
-
options =
|
|
13299
|
-
|
|
13392
|
+
options = _args108.length > 3 && _args108[3] !== undefined ? _args108[3] : {};
|
|
13393
|
+
_context108.next = 3;
|
|
13300
13394
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/polls/").concat(pollId, "/vote"), _objectSpread({
|
|
13301
13395
|
vote: vote
|
|
13302
13396
|
}, options));
|
|
13303
13397
|
|
|
13304
13398
|
case 3:
|
|
13305
|
-
return
|
|
13399
|
+
return _context108.abrupt("return", _context108.sent);
|
|
13306
13400
|
|
|
13307
13401
|
case 4:
|
|
13308
13402
|
case "end":
|
|
13309
|
-
return
|
|
13403
|
+
return _context108.stop();
|
|
13310
13404
|
}
|
|
13311
13405
|
}
|
|
13312
|
-
},
|
|
13406
|
+
}, _callee108, this);
|
|
13313
13407
|
}));
|
|
13314
13408
|
|
|
13315
|
-
function castPollVote(
|
|
13409
|
+
function castPollVote(_x153, _x154, _x155) {
|
|
13316
13410
|
return _castPollVote.apply(this, arguments);
|
|
13317
13411
|
}
|
|
13318
13412
|
|
|
@@ -13328,24 +13422,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13328
13422
|
}, {
|
|
13329
13423
|
key: "addPollAnswer",
|
|
13330
13424
|
value: function () {
|
|
13331
|
-
var _addPollAnswer = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13332
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13425
|
+
var _addPollAnswer = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee109(messageId, pollId, answerText) {
|
|
13426
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee109$(_context109) {
|
|
13333
13427
|
while (1) {
|
|
13334
|
-
switch (
|
|
13428
|
+
switch (_context109.prev = _context109.next) {
|
|
13335
13429
|
case 0:
|
|
13336
|
-
return
|
|
13430
|
+
return _context109.abrupt("return", this.castPollVote(messageId, pollId, {
|
|
13337
13431
|
answer_text: answerText
|
|
13338
13432
|
}));
|
|
13339
13433
|
|
|
13340
13434
|
case 1:
|
|
13341
13435
|
case "end":
|
|
13342
|
-
return
|
|
13436
|
+
return _context109.stop();
|
|
13343
13437
|
}
|
|
13344
13438
|
}
|
|
13345
|
-
},
|
|
13439
|
+
}, _callee109, this);
|
|
13346
13440
|
}));
|
|
13347
13441
|
|
|
13348
|
-
function addPollAnswer(
|
|
13442
|
+
function addPollAnswer(_x156, _x157, _x158) {
|
|
13349
13443
|
return _addPollAnswer.apply(this, arguments);
|
|
13350
13444
|
}
|
|
13351
13445
|
|
|
@@ -13354,26 +13448,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13354
13448
|
}, {
|
|
13355
13449
|
key: "removePollVote",
|
|
13356
13450
|
value: function () {
|
|
13357
|
-
var _removePollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13358
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13451
|
+
var _removePollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee110(messageId, pollId, voteId) {
|
|
13452
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee110$(_context110) {
|
|
13359
13453
|
while (1) {
|
|
13360
|
-
switch (
|
|
13454
|
+
switch (_context110.prev = _context110.next) {
|
|
13361
13455
|
case 0:
|
|
13362
|
-
|
|
13456
|
+
_context110.next = 2;
|
|
13363
13457
|
return this.delete(this.baseURL + "/messages/".concat(messageId, "/polls/").concat(pollId, "/vote/").concat(voteId));
|
|
13364
13458
|
|
|
13365
13459
|
case 2:
|
|
13366
|
-
return
|
|
13460
|
+
return _context110.abrupt("return", _context110.sent);
|
|
13367
13461
|
|
|
13368
13462
|
case 3:
|
|
13369
13463
|
case "end":
|
|
13370
|
-
return
|
|
13464
|
+
return _context110.stop();
|
|
13371
13465
|
}
|
|
13372
13466
|
}
|
|
13373
|
-
},
|
|
13467
|
+
}, _callee110, this);
|
|
13374
13468
|
}));
|
|
13375
13469
|
|
|
13376
|
-
function removePollVote(
|
|
13470
|
+
function removePollVote(_x159, _x160, _x161) {
|
|
13377
13471
|
return _removePollVote.apply(this, arguments);
|
|
13378
13472
|
}
|
|
13379
13473
|
|
|
@@ -13390,33 +13484,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13390
13484
|
}, {
|
|
13391
13485
|
key: "queryPolls",
|
|
13392
13486
|
value: function () {
|
|
13393
|
-
var _queryPolls = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13487
|
+
var _queryPolls = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee111() {
|
|
13394
13488
|
var filter,
|
|
13395
13489
|
sort,
|
|
13396
13490
|
options,
|
|
13397
|
-
|
|
13398
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13491
|
+
_args111 = arguments;
|
|
13492
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee111$(_context111) {
|
|
13399
13493
|
while (1) {
|
|
13400
|
-
switch (
|
|
13494
|
+
switch (_context111.prev = _context111.next) {
|
|
13401
13495
|
case 0:
|
|
13402
|
-
filter =
|
|
13403
|
-
sort =
|
|
13404
|
-
options =
|
|
13405
|
-
|
|
13496
|
+
filter = _args111.length > 0 && _args111[0] !== undefined ? _args111[0] : {};
|
|
13497
|
+
sort = _args111.length > 1 && _args111[1] !== undefined ? _args111[1] : [];
|
|
13498
|
+
options = _args111.length > 2 && _args111[2] !== undefined ? _args111[2] : {};
|
|
13499
|
+
_context111.next = 5;
|
|
13406
13500
|
return this.post(this.baseURL + '/polls/query', _objectSpread({
|
|
13407
13501
|
filter: filter,
|
|
13408
13502
|
sort: normalizeQuerySort(sort)
|
|
13409
13503
|
}, options));
|
|
13410
13504
|
|
|
13411
13505
|
case 5:
|
|
13412
|
-
return
|
|
13506
|
+
return _context111.abrupt("return", _context111.sent);
|
|
13413
13507
|
|
|
13414
13508
|
case 6:
|
|
13415
13509
|
case "end":
|
|
13416
|
-
return
|
|
13510
|
+
return _context111.stop();
|
|
13417
13511
|
}
|
|
13418
13512
|
}
|
|
13419
|
-
},
|
|
13513
|
+
}, _callee111, this);
|
|
13420
13514
|
}));
|
|
13421
13515
|
|
|
13422
13516
|
function queryPolls() {
|
|
@@ -13437,36 +13531,36 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13437
13531
|
}, {
|
|
13438
13532
|
key: "queryPollVotes",
|
|
13439
13533
|
value: function () {
|
|
13440
|
-
var _queryPollVotes = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13534
|
+
var _queryPollVotes = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee112(pollId) {
|
|
13441
13535
|
var filter,
|
|
13442
13536
|
sort,
|
|
13443
13537
|
options,
|
|
13444
|
-
|
|
13445
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13538
|
+
_args112 = arguments;
|
|
13539
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee112$(_context112) {
|
|
13446
13540
|
while (1) {
|
|
13447
|
-
switch (
|
|
13541
|
+
switch (_context112.prev = _context112.next) {
|
|
13448
13542
|
case 0:
|
|
13449
|
-
filter =
|
|
13450
|
-
sort =
|
|
13451
|
-
options =
|
|
13452
|
-
|
|
13543
|
+
filter = _args112.length > 1 && _args112[1] !== undefined ? _args112[1] : {};
|
|
13544
|
+
sort = _args112.length > 2 && _args112[2] !== undefined ? _args112[2] : [];
|
|
13545
|
+
options = _args112.length > 3 && _args112[3] !== undefined ? _args112[3] : {};
|
|
13546
|
+
_context112.next = 5;
|
|
13453
13547
|
return this.post(this.baseURL + "/polls/".concat(pollId, "/votes"), _objectSpread({
|
|
13454
13548
|
filter: filter,
|
|
13455
13549
|
sort: normalizeQuerySort(sort)
|
|
13456
13550
|
}, options));
|
|
13457
13551
|
|
|
13458
13552
|
case 5:
|
|
13459
|
-
return
|
|
13553
|
+
return _context112.abrupt("return", _context112.sent);
|
|
13460
13554
|
|
|
13461
13555
|
case 6:
|
|
13462
13556
|
case "end":
|
|
13463
|
-
return
|
|
13557
|
+
return _context112.stop();
|
|
13464
13558
|
}
|
|
13465
13559
|
}
|
|
13466
|
-
},
|
|
13560
|
+
}, _callee112, this);
|
|
13467
13561
|
}));
|
|
13468
13562
|
|
|
13469
|
-
function queryPollVotes(
|
|
13563
|
+
function queryPollVotes(_x162) {
|
|
13470
13564
|
return _queryPollVotes.apply(this, arguments);
|
|
13471
13565
|
}
|
|
13472
13566
|
|
|
@@ -13483,33 +13577,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13483
13577
|
}, {
|
|
13484
13578
|
key: "queryMessageHistory",
|
|
13485
13579
|
value: function () {
|
|
13486
|
-
var _queryMessageHistory = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13580
|
+
var _queryMessageHistory = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee113() {
|
|
13487
13581
|
var filter,
|
|
13488
13582
|
sort,
|
|
13489
13583
|
options,
|
|
13490
|
-
|
|
13491
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13584
|
+
_args113 = arguments;
|
|
13585
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee113$(_context113) {
|
|
13492
13586
|
while (1) {
|
|
13493
|
-
switch (
|
|
13587
|
+
switch (_context113.prev = _context113.next) {
|
|
13494
13588
|
case 0:
|
|
13495
|
-
filter =
|
|
13496
|
-
sort =
|
|
13497
|
-
options =
|
|
13498
|
-
|
|
13589
|
+
filter = _args113.length > 0 && _args113[0] !== undefined ? _args113[0] : {};
|
|
13590
|
+
sort = _args113.length > 1 && _args113[1] !== undefined ? _args113[1] : [];
|
|
13591
|
+
options = _args113.length > 2 && _args113[2] !== undefined ? _args113[2] : {};
|
|
13592
|
+
_context113.next = 5;
|
|
13499
13593
|
return this.post(this.baseURL + '/messages/history', _objectSpread({
|
|
13500
13594
|
filter: filter,
|
|
13501
13595
|
sort: normalizeQuerySort(sort)
|
|
13502
13596
|
}, options));
|
|
13503
13597
|
|
|
13504
13598
|
case 5:
|
|
13505
|
-
return
|
|
13599
|
+
return _context113.abrupt("return", _context113.sent);
|
|
13506
13600
|
|
|
13507
13601
|
case 6:
|
|
13508
13602
|
case "end":
|
|
13509
|
-
return
|
|
13603
|
+
return _context113.stop();
|
|
13510
13604
|
}
|
|
13511
13605
|
}
|
|
13512
|
-
},
|
|
13606
|
+
}, _callee113, this);
|
|
13513
13607
|
}));
|
|
13514
13608
|
|
|
13515
13609
|
function queryMessageHistory() {
|