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