stream-chat 8.14.4 → 8.15.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 +868 -627
- 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 +868 -627
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +868 -627
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +868 -627
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/channel_state.d.ts +1 -0
- package/dist/types/channel_state.d.ts.map +1 -1
- package/dist/types/client.d.ts +109 -28
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/events.d.ts +1 -0
- package/dist/types/events.d.ts.map +1 -1
- package/dist/types/types.d.ts +48 -23
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +28 -16
- package/src/channel_state.ts +7 -1
- package/src/client.ts +122 -50
- package/src/events.ts +1 -0
- package/src/types.ts +73 -29
package/dist/browser.es.js
CHANGED
|
@@ -1539,7 +1539,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1539
1539
|
key: "sendMessage",
|
|
1540
1540
|
value: function () {
|
|
1541
1541
|
var _sendMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(message, options) {
|
|
1542
|
-
var sendMessageResponse;
|
|
1543
1542
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
1544
1543
|
while (1) {
|
|
1545
1544
|
switch (_context2.prev = _context2.next) {
|
|
@@ -1550,12 +1549,9 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1550
1549
|
}, options));
|
|
1551
1550
|
|
|
1552
1551
|
case 2:
|
|
1553
|
-
|
|
1554
|
-
// Reset unreadCount to 0.
|
|
1555
|
-
this.state.unreadCount = 0;
|
|
1556
|
-
return _context2.abrupt("return", sendMessageResponse);
|
|
1552
|
+
return _context2.abrupt("return", _context2.sent);
|
|
1557
1553
|
|
|
1558
|
-
case
|
|
1554
|
+
case 3:
|
|
1559
1555
|
case "end":
|
|
1560
1556
|
return _context2.stop();
|
|
1561
1557
|
}
|
|
@@ -3636,7 +3632,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3636
3632
|
}, {
|
|
3637
3633
|
key: "_handleChannelEvent",
|
|
3638
3634
|
value: function _handleChannelEvent(event) {
|
|
3639
|
-
var _event$user, _event$user2, _event$user3, _event$user5, _event$user6, _event$channel, _event$member, _event$user9, _event$
|
|
3635
|
+
var _event$user, _event$user2, _event$user3, _event$user5, _event$user6, _event$channel, _event$member, _event$user9, _event$user11, _channelState$members, _event$user12, _channelState$members2;
|
|
3640
3636
|
|
|
3641
3637
|
var channel = this;
|
|
3642
3638
|
|
|
@@ -3667,7 +3663,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3667
3663
|
var _event$user4, _this$getClient$user;
|
|
3668
3664
|
|
|
3669
3665
|
channelState.read[event.user.id] = {
|
|
3670
|
-
// because in client.ts the handleEvent call that flows to this sets this `event.received_at = new Date();`
|
|
3671
3666
|
last_read: new Date(event.created_at),
|
|
3672
3667
|
last_read_message_id: event.last_read_message_id,
|
|
3673
3668
|
user: event.user,
|
|
@@ -3724,7 +3719,13 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3724
3719
|
|
|
3725
3720
|
if (event.message.pinned) {
|
|
3726
3721
|
channelState.addPinnedMessage(event.message);
|
|
3727
|
-
}
|
|
3722
|
+
} // do not increase the unread count - the back-end does not increase the count neither in the following cases:
|
|
3723
|
+
// 1. the message is mine
|
|
3724
|
+
// 2. the message is a thread reply from any user
|
|
3725
|
+
|
|
3726
|
+
|
|
3727
|
+
var preventUnreadCountUpdate = ownMessage || isThreadMessage;
|
|
3728
|
+
if (preventUnreadCountUpdate) break;
|
|
3728
3729
|
|
|
3729
3730
|
if ((_event$user8 = event.user) !== null && _event$user8 !== void 0 && _event$user8.id) {
|
|
3730
3731
|
for (var userId in channelState.read) {
|
|
@@ -3740,9 +3741,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3740
3741
|
}
|
|
3741
3742
|
}
|
|
3742
3743
|
|
|
3743
|
-
if (
|
|
3744
|
-
channelState.unreadCount = 0;
|
|
3745
|
-
} else if (this._countMessageAsUnread(event.message)) {
|
|
3744
|
+
if (this._countMessageAsUnread(event.message)) {
|
|
3746
3745
|
channelState.unreadCount = channelState.unreadCount + 1;
|
|
3747
3746
|
}
|
|
3748
3747
|
}
|
|
@@ -3815,6 +3814,25 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3815
3814
|
|
|
3816
3815
|
break;
|
|
3817
3816
|
|
|
3817
|
+
case 'notification.mark_unread':
|
|
3818
|
+
{
|
|
3819
|
+
var _event$user10, _this$getClient$user3, _event$unread_message;
|
|
3820
|
+
|
|
3821
|
+
var _ownMessage = ((_event$user10 = event.user) === null || _event$user10 === void 0 ? void 0 : _event$user10.id) === ((_this$getClient$user3 = this.getClient().user) === null || _this$getClient$user3 === void 0 ? void 0 : _this$getClient$user3.id);
|
|
3822
|
+
|
|
3823
|
+
if (!(_ownMessage && event.user)) break;
|
|
3824
|
+
var unreadCount = (_event$unread_message = event.unread_messages) !== null && _event$unread_message !== void 0 ? _event$unread_message : 0;
|
|
3825
|
+
channelState.read[event.user.id] = {
|
|
3826
|
+
first_unread_message_id: event.first_unread_message_id,
|
|
3827
|
+
last_read: new Date(event.last_read_at),
|
|
3828
|
+
last_read_message_id: event.last_read_message_id,
|
|
3829
|
+
user: event.user,
|
|
3830
|
+
unread_messages: unreadCount
|
|
3831
|
+
};
|
|
3832
|
+
channelState.unreadCount = unreadCount;
|
|
3833
|
+
break;
|
|
3834
|
+
}
|
|
3835
|
+
|
|
3818
3836
|
case 'channel.updated':
|
|
3819
3837
|
if (event.channel) {
|
|
3820
3838
|
var _event$channel2, _channel$data, _event$channel$hidden, _event$channel3, _channel$data2, _event$channel$own_ca, _event$channel4, _channel$data3;
|
|
@@ -3881,7 +3899,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3881
3899
|
break;
|
|
3882
3900
|
|
|
3883
3901
|
case 'user.banned':
|
|
3884
|
-
if (!((_event$
|
|
3902
|
+
if (!((_event$user11 = event.user) !== null && _event$user11 !== void 0 && _event$user11.id)) break;
|
|
3885
3903
|
channelState.members[event.user.id] = _objectSpread$5(_objectSpread$5({}, channelState.members[event.user.id] || {}), {}, {
|
|
3886
3904
|
shadow_banned: !!event.shadow,
|
|
3887
3905
|
banned: !event.shadow,
|
|
@@ -3890,7 +3908,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3890
3908
|
break;
|
|
3891
3909
|
|
|
3892
3910
|
case 'user.unbanned':
|
|
3893
|
-
if (!((_event$
|
|
3911
|
+
if (!((_event$user12 = event.user) !== null && _event$user12 !== void 0 && _event$user12.id)) break;
|
|
3894
3912
|
channelState.members[event.user.id] = _objectSpread$5(_objectSpread$5({}, channelState.members[event.user.id] || {}), {}, {
|
|
3895
3913
|
shadow_banned: false,
|
|
3896
3914
|
banned: false,
|
|
@@ -6069,11 +6087,18 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
6069
6087
|
/*
|
|
6070
6088
|
DeleteUserOptions specifies a collection of one or more `user_ids` to be deleted.
|
|
6071
6089
|
|
|
6072
|
-
`user
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
`
|
|
6090
|
+
`user`:
|
|
6091
|
+
- soft: marks user as deleted and retains all user data
|
|
6092
|
+
- pruning: marks user as deleted and nullifies user information
|
|
6093
|
+
- hard: deletes user completely - this requires hard option for messages and conversation as well
|
|
6094
|
+
`conversations`:
|
|
6095
|
+
- soft: marks all conversation channels as deleted (same effect as Delete Channels with 'hard' option disabled)
|
|
6096
|
+
- hard: deletes channel and all its data completely including messages (same effect as Delete Channels with 'hard' option enabled)
|
|
6097
|
+
`messages`:
|
|
6098
|
+
- soft: marks all user messages as deleted without removing any related message data
|
|
6099
|
+
- pruning: marks all user messages as deleted, nullifies message information and removes some message data such as reactions and flags
|
|
6100
|
+
- hard: deletes messages completely with all related information
|
|
6101
|
+
`new_channel_owner_id`: any channels owned by the hard-deleted user will be transferred to this user ID
|
|
6077
6102
|
*/
|
|
6078
6103
|
// TODO: add better typing
|
|
6079
6104
|
var ErrorFromResponse = /*#__PURE__*/function (_Error) {
|
|
@@ -8448,6 +8473,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8448
8473
|
|
|
8449
8474
|
return getDevices;
|
|
8450
8475
|
}()
|
|
8476
|
+
/**
|
|
8477
|
+
* getUnreadCount - Returns unread counts for a single user
|
|
8478
|
+
*
|
|
8479
|
+
* @param {string} [userID] User ID.
|
|
8480
|
+
*
|
|
8481
|
+
* @return {<GetUnreadCountAPIResponse>}
|
|
8482
|
+
*/
|
|
8483
|
+
|
|
8451
8484
|
}, {
|
|
8452
8485
|
key: "getUnreadCount",
|
|
8453
8486
|
value: function () {
|
|
@@ -8478,6 +8511,44 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8478
8511
|
|
|
8479
8512
|
return getUnreadCount;
|
|
8480
8513
|
}()
|
|
8514
|
+
/**
|
|
8515
|
+
* getUnreadCountBatch - Returns unread counts for multiple users at once. Only works server side.
|
|
8516
|
+
*
|
|
8517
|
+
* @param {string[]} [userIDs] List of user IDs to fetch unread counts for.
|
|
8518
|
+
*
|
|
8519
|
+
* @return {<GetUnreadCountBatchAPIResponse>}
|
|
8520
|
+
*/
|
|
8521
|
+
|
|
8522
|
+
}, {
|
|
8523
|
+
key: "getUnreadCountBatch",
|
|
8524
|
+
value: function () {
|
|
8525
|
+
var _getUnreadCountBatch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(userIDs) {
|
|
8526
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
8527
|
+
while (1) {
|
|
8528
|
+
switch (_context25.prev = _context25.next) {
|
|
8529
|
+
case 0:
|
|
8530
|
+
_context25.next = 2;
|
|
8531
|
+
return this.post(this.baseURL + '/unread_batch', {
|
|
8532
|
+
user_ids: userIDs
|
|
8533
|
+
});
|
|
8534
|
+
|
|
8535
|
+
case 2:
|
|
8536
|
+
return _context25.abrupt("return", _context25.sent);
|
|
8537
|
+
|
|
8538
|
+
case 3:
|
|
8539
|
+
case "end":
|
|
8540
|
+
return _context25.stop();
|
|
8541
|
+
}
|
|
8542
|
+
}
|
|
8543
|
+
}, _callee25, this);
|
|
8544
|
+
}));
|
|
8545
|
+
|
|
8546
|
+
function getUnreadCountBatch(_x26) {
|
|
8547
|
+
return _getUnreadCountBatch.apply(this, arguments);
|
|
8548
|
+
}
|
|
8549
|
+
|
|
8550
|
+
return getUnreadCountBatch;
|
|
8551
|
+
}()
|
|
8481
8552
|
/**
|
|
8482
8553
|
* removeDevice - Removes the device with the given id. Clientside users can only delete their own devices
|
|
8483
8554
|
*
|
|
@@ -8489,12 +8560,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8489
8560
|
}, {
|
|
8490
8561
|
key: "removeDevice",
|
|
8491
8562
|
value: function () {
|
|
8492
|
-
var _removeDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8493
|
-
return _regeneratorRuntime.wrap(function
|
|
8563
|
+
var _removeDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(id, userID) {
|
|
8564
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
8494
8565
|
while (1) {
|
|
8495
|
-
switch (
|
|
8566
|
+
switch (_context26.prev = _context26.next) {
|
|
8496
8567
|
case 0:
|
|
8497
|
-
|
|
8568
|
+
_context26.next = 2;
|
|
8498
8569
|
return this.delete(this.baseURL + '/devices', _objectSpread({
|
|
8499
8570
|
id: id
|
|
8500
8571
|
}, userID ? {
|
|
@@ -8502,17 +8573,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8502
8573
|
} : {}));
|
|
8503
8574
|
|
|
8504
8575
|
case 2:
|
|
8505
|
-
return
|
|
8576
|
+
return _context26.abrupt("return", _context26.sent);
|
|
8506
8577
|
|
|
8507
8578
|
case 3:
|
|
8508
8579
|
case "end":
|
|
8509
|
-
return
|
|
8580
|
+
return _context26.stop();
|
|
8510
8581
|
}
|
|
8511
8582
|
}
|
|
8512
|
-
},
|
|
8583
|
+
}, _callee26, this);
|
|
8513
8584
|
}));
|
|
8514
8585
|
|
|
8515
|
-
function removeDevice(
|
|
8586
|
+
function removeDevice(_x27, _x28) {
|
|
8516
8587
|
return _removeDevice.apply(this, arguments);
|
|
8517
8588
|
}
|
|
8518
8589
|
|
|
@@ -8529,15 +8600,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8529
8600
|
}, {
|
|
8530
8601
|
key: "getRateLimits",
|
|
8531
8602
|
value: function () {
|
|
8532
|
-
var _getRateLimits = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8603
|
+
var _getRateLimits = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(params) {
|
|
8533
8604
|
var _ref7, serverSide, web, android, ios, endpoints;
|
|
8534
8605
|
|
|
8535
|
-
return _regeneratorRuntime.wrap(function
|
|
8606
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
8536
8607
|
while (1) {
|
|
8537
|
-
switch (
|
|
8608
|
+
switch (_context27.prev = _context27.next) {
|
|
8538
8609
|
case 0:
|
|
8539
8610
|
_ref7 = params || {}, serverSide = _ref7.serverSide, web = _ref7.web, android = _ref7.android, ios = _ref7.ios, endpoints = _ref7.endpoints;
|
|
8540
|
-
return
|
|
8611
|
+
return _context27.abrupt("return", this.get(this.baseURL + '/rate_limits', {
|
|
8541
8612
|
server_side: serverSide,
|
|
8542
8613
|
web: web,
|
|
8543
8614
|
android: android,
|
|
@@ -8547,13 +8618,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8547
8618
|
|
|
8548
8619
|
case 2:
|
|
8549
8620
|
case "end":
|
|
8550
|
-
return
|
|
8621
|
+
return _context27.stop();
|
|
8551
8622
|
}
|
|
8552
8623
|
}
|
|
8553
|
-
},
|
|
8624
|
+
}, _callee27, this);
|
|
8554
8625
|
}));
|
|
8555
8626
|
|
|
8556
|
-
function getRateLimits(
|
|
8627
|
+
function getRateLimits(_x29) {
|
|
8557
8628
|
return _getRateLimits.apply(this, arguments);
|
|
8558
8629
|
}
|
|
8559
8630
|
|
|
@@ -8644,26 +8715,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8644
8715
|
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>} list of updated users
|
|
8645
8716
|
*/
|
|
8646
8717
|
function () {
|
|
8647
|
-
var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8648
|
-
return _regeneratorRuntime.wrap(function
|
|
8718
|
+
var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(partialUserObject) {
|
|
8719
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
8649
8720
|
while (1) {
|
|
8650
|
-
switch (
|
|
8721
|
+
switch (_context28.prev = _context28.next) {
|
|
8651
8722
|
case 0:
|
|
8652
|
-
|
|
8723
|
+
_context28.next = 2;
|
|
8653
8724
|
return this.partialUpdateUsers([partialUserObject]);
|
|
8654
8725
|
|
|
8655
8726
|
case 2:
|
|
8656
|
-
return
|
|
8727
|
+
return _context28.abrupt("return", _context28.sent);
|
|
8657
8728
|
|
|
8658
8729
|
case 3:
|
|
8659
8730
|
case "end":
|
|
8660
|
-
return
|
|
8731
|
+
return _context28.stop();
|
|
8661
8732
|
}
|
|
8662
8733
|
}
|
|
8663
|
-
},
|
|
8734
|
+
}, _callee28, this);
|
|
8664
8735
|
}));
|
|
8665
8736
|
|
|
8666
|
-
function partialUpdateUser(
|
|
8737
|
+
function partialUpdateUser(_x30) {
|
|
8667
8738
|
return _partialUpdateUser.apply(this, arguments);
|
|
8668
8739
|
}
|
|
8669
8740
|
|
|
@@ -8680,29 +8751,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8680
8751
|
}, {
|
|
8681
8752
|
key: "upsertUsers",
|
|
8682
8753
|
value: function () {
|
|
8683
|
-
var _upsertUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8754
|
+
var _upsertUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(users) {
|
|
8684
8755
|
var userMap, _iterator4, _step4, userObject;
|
|
8685
8756
|
|
|
8686
|
-
return _regeneratorRuntime.wrap(function
|
|
8757
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
8687
8758
|
while (1) {
|
|
8688
|
-
switch (
|
|
8759
|
+
switch (_context29.prev = _context29.next) {
|
|
8689
8760
|
case 0:
|
|
8690
8761
|
userMap = {};
|
|
8691
8762
|
_iterator4 = _createForOfIteratorHelper(users);
|
|
8692
|
-
|
|
8763
|
+
_context29.prev = 2;
|
|
8693
8764
|
|
|
8694
8765
|
_iterator4.s();
|
|
8695
8766
|
|
|
8696
8767
|
case 4:
|
|
8697
8768
|
if ((_step4 = _iterator4.n()).done) {
|
|
8698
|
-
|
|
8769
|
+
_context29.next = 11;
|
|
8699
8770
|
break;
|
|
8700
8771
|
}
|
|
8701
8772
|
|
|
8702
8773
|
userObject = _step4.value;
|
|
8703
8774
|
|
|
8704
8775
|
if (userObject.id) {
|
|
8705
|
-
|
|
8776
|
+
_context29.next = 8;
|
|
8706
8777
|
break;
|
|
8707
8778
|
}
|
|
8708
8779
|
|
|
@@ -8712,44 +8783,44 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8712
8783
|
userMap[userObject.id] = userObject;
|
|
8713
8784
|
|
|
8714
8785
|
case 9:
|
|
8715
|
-
|
|
8786
|
+
_context29.next = 4;
|
|
8716
8787
|
break;
|
|
8717
8788
|
|
|
8718
8789
|
case 11:
|
|
8719
|
-
|
|
8790
|
+
_context29.next = 16;
|
|
8720
8791
|
break;
|
|
8721
8792
|
|
|
8722
8793
|
case 13:
|
|
8723
|
-
|
|
8724
|
-
|
|
8794
|
+
_context29.prev = 13;
|
|
8795
|
+
_context29.t0 = _context29["catch"](2);
|
|
8725
8796
|
|
|
8726
|
-
_iterator4.e(
|
|
8797
|
+
_iterator4.e(_context29.t0);
|
|
8727
8798
|
|
|
8728
8799
|
case 16:
|
|
8729
|
-
|
|
8800
|
+
_context29.prev = 16;
|
|
8730
8801
|
|
|
8731
8802
|
_iterator4.f();
|
|
8732
8803
|
|
|
8733
|
-
return
|
|
8804
|
+
return _context29.finish(16);
|
|
8734
8805
|
|
|
8735
8806
|
case 19:
|
|
8736
|
-
|
|
8807
|
+
_context29.next = 21;
|
|
8737
8808
|
return this.post(this.baseURL + '/users', {
|
|
8738
8809
|
users: userMap
|
|
8739
8810
|
});
|
|
8740
8811
|
|
|
8741
8812
|
case 21:
|
|
8742
|
-
return
|
|
8813
|
+
return _context29.abrupt("return", _context29.sent);
|
|
8743
8814
|
|
|
8744
8815
|
case 22:
|
|
8745
8816
|
case "end":
|
|
8746
|
-
return
|
|
8817
|
+
return _context29.stop();
|
|
8747
8818
|
}
|
|
8748
8819
|
}
|
|
8749
|
-
},
|
|
8820
|
+
}, _callee29, this, [[2, 13, 16, 19]]);
|
|
8750
8821
|
}));
|
|
8751
8822
|
|
|
8752
|
-
function upsertUsers(
|
|
8823
|
+
function upsertUsers(_x31) {
|
|
8753
8824
|
return _upsertUsers.apply(this, arguments);
|
|
8754
8825
|
}
|
|
8755
8826
|
|
|
@@ -8797,72 +8868,72 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8797
8868
|
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
|
|
8798
8869
|
*/
|
|
8799
8870
|
function () {
|
|
8800
|
-
var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8871
|
+
var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(users) {
|
|
8801
8872
|
var _iterator5, _step5, userObject;
|
|
8802
8873
|
|
|
8803
|
-
return _regeneratorRuntime.wrap(function
|
|
8874
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
8804
8875
|
while (1) {
|
|
8805
|
-
switch (
|
|
8876
|
+
switch (_context30.prev = _context30.next) {
|
|
8806
8877
|
case 0:
|
|
8807
8878
|
_iterator5 = _createForOfIteratorHelper(users);
|
|
8808
|
-
|
|
8879
|
+
_context30.prev = 1;
|
|
8809
8880
|
|
|
8810
8881
|
_iterator5.s();
|
|
8811
8882
|
|
|
8812
8883
|
case 3:
|
|
8813
8884
|
if ((_step5 = _iterator5.n()).done) {
|
|
8814
|
-
|
|
8885
|
+
_context30.next = 9;
|
|
8815
8886
|
break;
|
|
8816
8887
|
}
|
|
8817
8888
|
|
|
8818
8889
|
userObject = _step5.value;
|
|
8819
8890
|
|
|
8820
8891
|
if (userObject.id) {
|
|
8821
|
-
|
|
8892
|
+
_context30.next = 7;
|
|
8822
8893
|
break;
|
|
8823
8894
|
}
|
|
8824
8895
|
|
|
8825
8896
|
throw Error('User ID is required when updating a user');
|
|
8826
8897
|
|
|
8827
8898
|
case 7:
|
|
8828
|
-
|
|
8899
|
+
_context30.next = 3;
|
|
8829
8900
|
break;
|
|
8830
8901
|
|
|
8831
8902
|
case 9:
|
|
8832
|
-
|
|
8903
|
+
_context30.next = 14;
|
|
8833
8904
|
break;
|
|
8834
8905
|
|
|
8835
8906
|
case 11:
|
|
8836
|
-
|
|
8837
|
-
|
|
8907
|
+
_context30.prev = 11;
|
|
8908
|
+
_context30.t0 = _context30["catch"](1);
|
|
8838
8909
|
|
|
8839
|
-
_iterator5.e(
|
|
8910
|
+
_iterator5.e(_context30.t0);
|
|
8840
8911
|
|
|
8841
8912
|
case 14:
|
|
8842
|
-
|
|
8913
|
+
_context30.prev = 14;
|
|
8843
8914
|
|
|
8844
8915
|
_iterator5.f();
|
|
8845
8916
|
|
|
8846
|
-
return
|
|
8917
|
+
return _context30.finish(14);
|
|
8847
8918
|
|
|
8848
8919
|
case 17:
|
|
8849
|
-
|
|
8920
|
+
_context30.next = 19;
|
|
8850
8921
|
return this.patch(this.baseURL + '/users', {
|
|
8851
8922
|
users: users
|
|
8852
8923
|
});
|
|
8853
8924
|
|
|
8854
8925
|
case 19:
|
|
8855
|
-
return
|
|
8926
|
+
return _context30.abrupt("return", _context30.sent);
|
|
8856
8927
|
|
|
8857
8928
|
case 20:
|
|
8858
8929
|
case "end":
|
|
8859
|
-
return
|
|
8930
|
+
return _context30.stop();
|
|
8860
8931
|
}
|
|
8861
8932
|
}
|
|
8862
|
-
},
|
|
8933
|
+
}, _callee30, this, [[1, 11, 14, 17]]);
|
|
8863
8934
|
}));
|
|
8864
8935
|
|
|
8865
|
-
function partialUpdateUsers(
|
|
8936
|
+
function partialUpdateUsers(_x32) {
|
|
8866
8937
|
return _partialUpdateUsers.apply(this, arguments);
|
|
8867
8938
|
}
|
|
8868
8939
|
|
|
@@ -8871,26 +8942,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8871
8942
|
}, {
|
|
8872
8943
|
key: "deleteUser",
|
|
8873
8944
|
value: function () {
|
|
8874
|
-
var _deleteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8875
|
-
return _regeneratorRuntime.wrap(function
|
|
8945
|
+
var _deleteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(userID, params) {
|
|
8946
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
8876
8947
|
while (1) {
|
|
8877
|
-
switch (
|
|
8948
|
+
switch (_context31.prev = _context31.next) {
|
|
8878
8949
|
case 0:
|
|
8879
|
-
|
|
8950
|
+
_context31.next = 2;
|
|
8880
8951
|
return this.delete(this.baseURL + "/users/".concat(userID), params);
|
|
8881
8952
|
|
|
8882
8953
|
case 2:
|
|
8883
|
-
return
|
|
8954
|
+
return _context31.abrupt("return", _context31.sent);
|
|
8884
8955
|
|
|
8885
8956
|
case 3:
|
|
8886
8957
|
case "end":
|
|
8887
|
-
return
|
|
8958
|
+
return _context31.stop();
|
|
8888
8959
|
}
|
|
8889
8960
|
}
|
|
8890
|
-
},
|
|
8961
|
+
}, _callee31, this);
|
|
8891
8962
|
}));
|
|
8892
8963
|
|
|
8893
|
-
function deleteUser(
|
|
8964
|
+
function deleteUser(_x33, _x34) {
|
|
8894
8965
|
return _deleteUser.apply(this, arguments);
|
|
8895
8966
|
}
|
|
8896
8967
|
|
|
@@ -8907,28 +8978,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8907
8978
|
}, {
|
|
8908
8979
|
key: "restoreUsers",
|
|
8909
8980
|
value: function () {
|
|
8910
|
-
var _restoreUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8911
|
-
return _regeneratorRuntime.wrap(function
|
|
8981
|
+
var _restoreUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(user_ids) {
|
|
8982
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
8912
8983
|
while (1) {
|
|
8913
|
-
switch (
|
|
8984
|
+
switch (_context32.prev = _context32.next) {
|
|
8914
8985
|
case 0:
|
|
8915
|
-
|
|
8986
|
+
_context32.next = 2;
|
|
8916
8987
|
return this.post(this.baseURL + "/users/restore", {
|
|
8917
8988
|
user_ids: user_ids
|
|
8918
8989
|
});
|
|
8919
8990
|
|
|
8920
8991
|
case 2:
|
|
8921
|
-
return
|
|
8992
|
+
return _context32.abrupt("return", _context32.sent);
|
|
8922
8993
|
|
|
8923
8994
|
case 3:
|
|
8924
8995
|
case "end":
|
|
8925
|
-
return
|
|
8996
|
+
return _context32.stop();
|
|
8926
8997
|
}
|
|
8927
8998
|
}
|
|
8928
|
-
},
|
|
8999
|
+
}, _callee32, this);
|
|
8929
9000
|
}));
|
|
8930
9001
|
|
|
8931
|
-
function restoreUsers(
|
|
9002
|
+
function restoreUsers(_x35) {
|
|
8932
9003
|
return _restoreUsers.apply(this, arguments);
|
|
8933
9004
|
}
|
|
8934
9005
|
|
|
@@ -8946,26 +9017,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8946
9017
|
}, {
|
|
8947
9018
|
key: "reactivateUser",
|
|
8948
9019
|
value: function () {
|
|
8949
|
-
var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8950
|
-
return _regeneratorRuntime.wrap(function
|
|
9020
|
+
var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(userID, options) {
|
|
9021
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
8951
9022
|
while (1) {
|
|
8952
|
-
switch (
|
|
9023
|
+
switch (_context33.prev = _context33.next) {
|
|
8953
9024
|
case 0:
|
|
8954
|
-
|
|
9025
|
+
_context33.next = 2;
|
|
8955
9026
|
return this.post(this.baseURL + "/users/".concat(userID, "/reactivate"), _objectSpread({}, options));
|
|
8956
9027
|
|
|
8957
9028
|
case 2:
|
|
8958
|
-
return
|
|
9029
|
+
return _context33.abrupt("return", _context33.sent);
|
|
8959
9030
|
|
|
8960
9031
|
case 3:
|
|
8961
9032
|
case "end":
|
|
8962
|
-
return
|
|
9033
|
+
return _context33.stop();
|
|
8963
9034
|
}
|
|
8964
9035
|
}
|
|
8965
|
-
},
|
|
9036
|
+
}, _callee33, this);
|
|
8966
9037
|
}));
|
|
8967
9038
|
|
|
8968
|
-
function reactivateUser(
|
|
9039
|
+
function reactivateUser(_x36, _x37) {
|
|
8969
9040
|
return _reactivateUser.apply(this, arguments);
|
|
8970
9041
|
}
|
|
8971
9042
|
|
|
@@ -8983,28 +9054,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8983
9054
|
}, {
|
|
8984
9055
|
key: "reactivateUsers",
|
|
8985
9056
|
value: function () {
|
|
8986
|
-
var _reactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8987
|
-
return _regeneratorRuntime.wrap(function
|
|
9057
|
+
var _reactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(user_ids, options) {
|
|
9058
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
8988
9059
|
while (1) {
|
|
8989
|
-
switch (
|
|
9060
|
+
switch (_context34.prev = _context34.next) {
|
|
8990
9061
|
case 0:
|
|
8991
|
-
|
|
9062
|
+
_context34.next = 2;
|
|
8992
9063
|
return this.post(this.baseURL + "/users/reactivate", _objectSpread({
|
|
8993
9064
|
user_ids: user_ids
|
|
8994
9065
|
}, options));
|
|
8995
9066
|
|
|
8996
9067
|
case 2:
|
|
8997
|
-
return
|
|
9068
|
+
return _context34.abrupt("return", _context34.sent);
|
|
8998
9069
|
|
|
8999
9070
|
case 3:
|
|
9000
9071
|
case "end":
|
|
9001
|
-
return
|
|
9072
|
+
return _context34.stop();
|
|
9002
9073
|
}
|
|
9003
9074
|
}
|
|
9004
|
-
},
|
|
9075
|
+
}, _callee34, this);
|
|
9005
9076
|
}));
|
|
9006
9077
|
|
|
9007
|
-
function reactivateUsers(
|
|
9078
|
+
function reactivateUsers(_x38, _x39) {
|
|
9008
9079
|
return _reactivateUsers.apply(this, arguments);
|
|
9009
9080
|
}
|
|
9010
9081
|
|
|
@@ -9022,26 +9093,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9022
9093
|
}, {
|
|
9023
9094
|
key: "deactivateUser",
|
|
9024
9095
|
value: function () {
|
|
9025
|
-
var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9026
|
-
return _regeneratorRuntime.wrap(function
|
|
9096
|
+
var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(userID, options) {
|
|
9097
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
9027
9098
|
while (1) {
|
|
9028
|
-
switch (
|
|
9099
|
+
switch (_context35.prev = _context35.next) {
|
|
9029
9100
|
case 0:
|
|
9030
|
-
|
|
9101
|
+
_context35.next = 2;
|
|
9031
9102
|
return this.post(this.baseURL + "/users/".concat(userID, "/deactivate"), _objectSpread({}, options));
|
|
9032
9103
|
|
|
9033
9104
|
case 2:
|
|
9034
|
-
return
|
|
9105
|
+
return _context35.abrupt("return", _context35.sent);
|
|
9035
9106
|
|
|
9036
9107
|
case 3:
|
|
9037
9108
|
case "end":
|
|
9038
|
-
return
|
|
9109
|
+
return _context35.stop();
|
|
9039
9110
|
}
|
|
9040
9111
|
}
|
|
9041
|
-
},
|
|
9112
|
+
}, _callee35, this);
|
|
9042
9113
|
}));
|
|
9043
9114
|
|
|
9044
|
-
function deactivateUser(
|
|
9115
|
+
function deactivateUser(_x40, _x41) {
|
|
9045
9116
|
return _deactivateUser.apply(this, arguments);
|
|
9046
9117
|
}
|
|
9047
9118
|
|
|
@@ -9059,28 +9130,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9059
9130
|
}, {
|
|
9060
9131
|
key: "deactivateUsers",
|
|
9061
9132
|
value: function () {
|
|
9062
|
-
var _deactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9063
|
-
return _regeneratorRuntime.wrap(function
|
|
9133
|
+
var _deactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(user_ids, options) {
|
|
9134
|
+
return _regeneratorRuntime.wrap(function _callee36$(_context36) {
|
|
9064
9135
|
while (1) {
|
|
9065
|
-
switch (
|
|
9136
|
+
switch (_context36.prev = _context36.next) {
|
|
9066
9137
|
case 0:
|
|
9067
|
-
|
|
9138
|
+
_context36.next = 2;
|
|
9068
9139
|
return this.post(this.baseURL + "/users/deactivate", _objectSpread({
|
|
9069
9140
|
user_ids: user_ids
|
|
9070
9141
|
}, options));
|
|
9071
9142
|
|
|
9072
9143
|
case 2:
|
|
9073
|
-
return
|
|
9144
|
+
return _context36.abrupt("return", _context36.sent);
|
|
9074
9145
|
|
|
9075
9146
|
case 3:
|
|
9076
9147
|
case "end":
|
|
9077
|
-
return
|
|
9148
|
+
return _context36.stop();
|
|
9078
9149
|
}
|
|
9079
9150
|
}
|
|
9080
|
-
},
|
|
9151
|
+
}, _callee36, this);
|
|
9081
9152
|
}));
|
|
9082
9153
|
|
|
9083
|
-
function deactivateUsers(
|
|
9154
|
+
function deactivateUsers(_x42, _x43) {
|
|
9084
9155
|
return _deactivateUsers.apply(this, arguments);
|
|
9085
9156
|
}
|
|
9086
9157
|
|
|
@@ -9089,26 +9160,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9089
9160
|
}, {
|
|
9090
9161
|
key: "exportUser",
|
|
9091
9162
|
value: function () {
|
|
9092
|
-
var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9093
|
-
return _regeneratorRuntime.wrap(function
|
|
9163
|
+
var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(userID, options) {
|
|
9164
|
+
return _regeneratorRuntime.wrap(function _callee37$(_context37) {
|
|
9094
9165
|
while (1) {
|
|
9095
|
-
switch (
|
|
9166
|
+
switch (_context37.prev = _context37.next) {
|
|
9096
9167
|
case 0:
|
|
9097
|
-
|
|
9168
|
+
_context37.next = 2;
|
|
9098
9169
|
return this.get(this.baseURL + "/users/".concat(userID, "/export"), _objectSpread({}, options));
|
|
9099
9170
|
|
|
9100
9171
|
case 2:
|
|
9101
|
-
return
|
|
9172
|
+
return _context37.abrupt("return", _context37.sent);
|
|
9102
9173
|
|
|
9103
9174
|
case 3:
|
|
9104
9175
|
case "end":
|
|
9105
|
-
return
|
|
9176
|
+
return _context37.stop();
|
|
9106
9177
|
}
|
|
9107
9178
|
}
|
|
9108
|
-
},
|
|
9179
|
+
}, _callee37, this);
|
|
9109
9180
|
}));
|
|
9110
9181
|
|
|
9111
|
-
function exportUser(
|
|
9182
|
+
function exportUser(_x44, _x45) {
|
|
9112
9183
|
return _exportUser.apply(this, arguments);
|
|
9113
9184
|
}
|
|
9114
9185
|
|
|
@@ -9124,28 +9195,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9124
9195
|
}, {
|
|
9125
9196
|
key: "banUser",
|
|
9126
9197
|
value: function () {
|
|
9127
|
-
var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9128
|
-
return _regeneratorRuntime.wrap(function
|
|
9198
|
+
var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(targetUserID, options) {
|
|
9199
|
+
return _regeneratorRuntime.wrap(function _callee38$(_context38) {
|
|
9129
9200
|
while (1) {
|
|
9130
|
-
switch (
|
|
9201
|
+
switch (_context38.prev = _context38.next) {
|
|
9131
9202
|
case 0:
|
|
9132
|
-
|
|
9203
|
+
_context38.next = 2;
|
|
9133
9204
|
return this.post(this.baseURL + '/moderation/ban', _objectSpread({
|
|
9134
9205
|
target_user_id: targetUserID
|
|
9135
9206
|
}, options));
|
|
9136
9207
|
|
|
9137
9208
|
case 2:
|
|
9138
|
-
return
|
|
9209
|
+
return _context38.abrupt("return", _context38.sent);
|
|
9139
9210
|
|
|
9140
9211
|
case 3:
|
|
9141
9212
|
case "end":
|
|
9142
|
-
return
|
|
9213
|
+
return _context38.stop();
|
|
9143
9214
|
}
|
|
9144
9215
|
}
|
|
9145
|
-
},
|
|
9216
|
+
}, _callee38, this);
|
|
9146
9217
|
}));
|
|
9147
9218
|
|
|
9148
|
-
function banUser(
|
|
9219
|
+
function banUser(_x46, _x47) {
|
|
9149
9220
|
return _banUser.apply(this, arguments);
|
|
9150
9221
|
}
|
|
9151
9222
|
|
|
@@ -9161,28 +9232,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9161
9232
|
}, {
|
|
9162
9233
|
key: "unbanUser",
|
|
9163
9234
|
value: function () {
|
|
9164
|
-
var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9165
|
-
return _regeneratorRuntime.wrap(function
|
|
9235
|
+
var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(targetUserID, options) {
|
|
9236
|
+
return _regeneratorRuntime.wrap(function _callee39$(_context39) {
|
|
9166
9237
|
while (1) {
|
|
9167
|
-
switch (
|
|
9238
|
+
switch (_context39.prev = _context39.next) {
|
|
9168
9239
|
case 0:
|
|
9169
|
-
|
|
9240
|
+
_context39.next = 2;
|
|
9170
9241
|
return this.delete(this.baseURL + '/moderation/ban', _objectSpread({
|
|
9171
9242
|
target_user_id: targetUserID
|
|
9172
9243
|
}, options));
|
|
9173
9244
|
|
|
9174
9245
|
case 2:
|
|
9175
|
-
return
|
|
9246
|
+
return _context39.abrupt("return", _context39.sent);
|
|
9176
9247
|
|
|
9177
9248
|
case 3:
|
|
9178
9249
|
case "end":
|
|
9179
|
-
return
|
|
9250
|
+
return _context39.stop();
|
|
9180
9251
|
}
|
|
9181
9252
|
}
|
|
9182
|
-
},
|
|
9253
|
+
}, _callee39, this);
|
|
9183
9254
|
}));
|
|
9184
9255
|
|
|
9185
|
-
function unbanUser(
|
|
9256
|
+
function unbanUser(_x48, _x49) {
|
|
9186
9257
|
return _unbanUser.apply(this, arguments);
|
|
9187
9258
|
}
|
|
9188
9259
|
|
|
@@ -9198,28 +9269,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9198
9269
|
}, {
|
|
9199
9270
|
key: "shadowBan",
|
|
9200
9271
|
value: function () {
|
|
9201
|
-
var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9202
|
-
return _regeneratorRuntime.wrap(function
|
|
9272
|
+
var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(targetUserID, options) {
|
|
9273
|
+
return _regeneratorRuntime.wrap(function _callee40$(_context40) {
|
|
9203
9274
|
while (1) {
|
|
9204
|
-
switch (
|
|
9275
|
+
switch (_context40.prev = _context40.next) {
|
|
9205
9276
|
case 0:
|
|
9206
|
-
|
|
9277
|
+
_context40.next = 2;
|
|
9207
9278
|
return this.banUser(targetUserID, _objectSpread({
|
|
9208
9279
|
shadow: true
|
|
9209
9280
|
}, options));
|
|
9210
9281
|
|
|
9211
9282
|
case 2:
|
|
9212
|
-
return
|
|
9283
|
+
return _context40.abrupt("return", _context40.sent);
|
|
9213
9284
|
|
|
9214
9285
|
case 3:
|
|
9215
9286
|
case "end":
|
|
9216
|
-
return
|
|
9287
|
+
return _context40.stop();
|
|
9217
9288
|
}
|
|
9218
9289
|
}
|
|
9219
|
-
},
|
|
9290
|
+
}, _callee40, this);
|
|
9220
9291
|
}));
|
|
9221
9292
|
|
|
9222
|
-
function shadowBan(
|
|
9293
|
+
function shadowBan(_x50, _x51) {
|
|
9223
9294
|
return _shadowBan.apply(this, arguments);
|
|
9224
9295
|
}
|
|
9225
9296
|
|
|
@@ -9235,28 +9306,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9235
9306
|
}, {
|
|
9236
9307
|
key: "removeShadowBan",
|
|
9237
9308
|
value: function () {
|
|
9238
|
-
var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9239
|
-
return _regeneratorRuntime.wrap(function
|
|
9309
|
+
var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(targetUserID, options) {
|
|
9310
|
+
return _regeneratorRuntime.wrap(function _callee41$(_context41) {
|
|
9240
9311
|
while (1) {
|
|
9241
|
-
switch (
|
|
9312
|
+
switch (_context41.prev = _context41.next) {
|
|
9242
9313
|
case 0:
|
|
9243
|
-
|
|
9314
|
+
_context41.next = 2;
|
|
9244
9315
|
return this.unbanUser(targetUserID, _objectSpread({
|
|
9245
9316
|
shadow: true
|
|
9246
9317
|
}, options));
|
|
9247
9318
|
|
|
9248
9319
|
case 2:
|
|
9249
|
-
return
|
|
9320
|
+
return _context41.abrupt("return", _context41.sent);
|
|
9250
9321
|
|
|
9251
9322
|
case 3:
|
|
9252
9323
|
case "end":
|
|
9253
|
-
return
|
|
9324
|
+
return _context41.stop();
|
|
9254
9325
|
}
|
|
9255
9326
|
}
|
|
9256
|
-
},
|
|
9327
|
+
}, _callee41, this);
|
|
9257
9328
|
}));
|
|
9258
9329
|
|
|
9259
|
-
function removeShadowBan(
|
|
9330
|
+
function removeShadowBan(_x52, _x53) {
|
|
9260
9331
|
return _removeShadowBan.apply(this, arguments);
|
|
9261
9332
|
}
|
|
9262
9333
|
|
|
@@ -9273,15 +9344,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9273
9344
|
}, {
|
|
9274
9345
|
key: "muteUser",
|
|
9275
9346
|
value: function () {
|
|
9276
|
-
var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9347
|
+
var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(targetID, userID) {
|
|
9277
9348
|
var options,
|
|
9278
|
-
|
|
9279
|
-
return _regeneratorRuntime.wrap(function
|
|
9349
|
+
_args42 = arguments;
|
|
9350
|
+
return _regeneratorRuntime.wrap(function _callee42$(_context42) {
|
|
9280
9351
|
while (1) {
|
|
9281
|
-
switch (
|
|
9352
|
+
switch (_context42.prev = _context42.next) {
|
|
9282
9353
|
case 0:
|
|
9283
|
-
options =
|
|
9284
|
-
|
|
9354
|
+
options = _args42.length > 2 && _args42[2] !== undefined ? _args42[2] : {};
|
|
9355
|
+
_context42.next = 3;
|
|
9285
9356
|
return this.post(this.baseURL + '/moderation/mute', _objectSpread(_objectSpread({
|
|
9286
9357
|
target_id: targetID
|
|
9287
9358
|
}, userID ? {
|
|
@@ -9289,17 +9360,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9289
9360
|
} : {}), options));
|
|
9290
9361
|
|
|
9291
9362
|
case 3:
|
|
9292
|
-
return
|
|
9363
|
+
return _context42.abrupt("return", _context42.sent);
|
|
9293
9364
|
|
|
9294
9365
|
case 4:
|
|
9295
9366
|
case "end":
|
|
9296
|
-
return
|
|
9367
|
+
return _context42.stop();
|
|
9297
9368
|
}
|
|
9298
9369
|
}
|
|
9299
|
-
},
|
|
9370
|
+
}, _callee42, this);
|
|
9300
9371
|
}));
|
|
9301
9372
|
|
|
9302
|
-
function muteUser(
|
|
9373
|
+
function muteUser(_x54, _x55) {
|
|
9303
9374
|
return _muteUser.apply(this, arguments);
|
|
9304
9375
|
}
|
|
9305
9376
|
|
|
@@ -9315,12 +9386,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9315
9386
|
}, {
|
|
9316
9387
|
key: "unmuteUser",
|
|
9317
9388
|
value: function () {
|
|
9318
|
-
var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9319
|
-
return _regeneratorRuntime.wrap(function
|
|
9389
|
+
var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(targetID, currentUserID) {
|
|
9390
|
+
return _regeneratorRuntime.wrap(function _callee43$(_context43) {
|
|
9320
9391
|
while (1) {
|
|
9321
|
-
switch (
|
|
9392
|
+
switch (_context43.prev = _context43.next) {
|
|
9322
9393
|
case 0:
|
|
9323
|
-
|
|
9394
|
+
_context43.next = 2;
|
|
9324
9395
|
return this.post(this.baseURL + '/moderation/unmute', _objectSpread({
|
|
9325
9396
|
target_id: targetID
|
|
9326
9397
|
}, currentUserID ? {
|
|
@@ -9328,17 +9399,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9328
9399
|
} : {}));
|
|
9329
9400
|
|
|
9330
9401
|
case 2:
|
|
9331
|
-
return
|
|
9402
|
+
return _context43.abrupt("return", _context43.sent);
|
|
9332
9403
|
|
|
9333
9404
|
case 3:
|
|
9334
9405
|
case "end":
|
|
9335
|
-
return
|
|
9406
|
+
return _context43.stop();
|
|
9336
9407
|
}
|
|
9337
9408
|
}
|
|
9338
|
-
},
|
|
9409
|
+
}, _callee43, this);
|
|
9339
9410
|
}));
|
|
9340
9411
|
|
|
9341
|
-
function unmuteUser(
|
|
9412
|
+
function unmuteUser(_x56, _x57) {
|
|
9342
9413
|
return _unmuteUser.apply(this, arguments);
|
|
9343
9414
|
}
|
|
9344
9415
|
|
|
@@ -9373,31 +9444,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9373
9444
|
}, {
|
|
9374
9445
|
key: "flagMessage",
|
|
9375
9446
|
value: function () {
|
|
9376
|
-
var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9447
|
+
var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(targetMessageID) {
|
|
9377
9448
|
var options,
|
|
9378
|
-
|
|
9379
|
-
return _regeneratorRuntime.wrap(function
|
|
9449
|
+
_args44 = arguments;
|
|
9450
|
+
return _regeneratorRuntime.wrap(function _callee44$(_context44) {
|
|
9380
9451
|
while (1) {
|
|
9381
|
-
switch (
|
|
9452
|
+
switch (_context44.prev = _context44.next) {
|
|
9382
9453
|
case 0:
|
|
9383
|
-
options =
|
|
9384
|
-
|
|
9454
|
+
options = _args44.length > 1 && _args44[1] !== undefined ? _args44[1] : {};
|
|
9455
|
+
_context44.next = 3;
|
|
9385
9456
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
9386
9457
|
target_message_id: targetMessageID
|
|
9387
9458
|
}, options));
|
|
9388
9459
|
|
|
9389
9460
|
case 3:
|
|
9390
|
-
return
|
|
9461
|
+
return _context44.abrupt("return", _context44.sent);
|
|
9391
9462
|
|
|
9392
9463
|
case 4:
|
|
9393
9464
|
case "end":
|
|
9394
|
-
return
|
|
9465
|
+
return _context44.stop();
|
|
9395
9466
|
}
|
|
9396
9467
|
}
|
|
9397
|
-
},
|
|
9468
|
+
}, _callee44, this);
|
|
9398
9469
|
}));
|
|
9399
9470
|
|
|
9400
|
-
function flagMessage(
|
|
9471
|
+
function flagMessage(_x58) {
|
|
9401
9472
|
return _flagMessage.apply(this, arguments);
|
|
9402
9473
|
}
|
|
9403
9474
|
|
|
@@ -9413,31 +9484,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9413
9484
|
}, {
|
|
9414
9485
|
key: "flagUser",
|
|
9415
9486
|
value: function () {
|
|
9416
|
-
var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9487
|
+
var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(targetID) {
|
|
9417
9488
|
var options,
|
|
9418
|
-
|
|
9419
|
-
return _regeneratorRuntime.wrap(function
|
|
9489
|
+
_args45 = arguments;
|
|
9490
|
+
return _regeneratorRuntime.wrap(function _callee45$(_context45) {
|
|
9420
9491
|
while (1) {
|
|
9421
|
-
switch (
|
|
9492
|
+
switch (_context45.prev = _context45.next) {
|
|
9422
9493
|
case 0:
|
|
9423
|
-
options =
|
|
9424
|
-
|
|
9494
|
+
options = _args45.length > 1 && _args45[1] !== undefined ? _args45[1] : {};
|
|
9495
|
+
_context45.next = 3;
|
|
9425
9496
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
9426
9497
|
target_user_id: targetID
|
|
9427
9498
|
}, options));
|
|
9428
9499
|
|
|
9429
9500
|
case 3:
|
|
9430
|
-
return
|
|
9501
|
+
return _context45.abrupt("return", _context45.sent);
|
|
9431
9502
|
|
|
9432
9503
|
case 4:
|
|
9433
9504
|
case "end":
|
|
9434
|
-
return
|
|
9505
|
+
return _context45.stop();
|
|
9435
9506
|
}
|
|
9436
9507
|
}
|
|
9437
|
-
},
|
|
9508
|
+
}, _callee45, this);
|
|
9438
9509
|
}));
|
|
9439
9510
|
|
|
9440
|
-
function flagUser(
|
|
9511
|
+
function flagUser(_x59) {
|
|
9441
9512
|
return _flagUser.apply(this, arguments);
|
|
9442
9513
|
}
|
|
9443
9514
|
|
|
@@ -9453,31 +9524,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9453
9524
|
}, {
|
|
9454
9525
|
key: "unflagMessage",
|
|
9455
9526
|
value: function () {
|
|
9456
|
-
var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9527
|
+
var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(targetMessageID) {
|
|
9457
9528
|
var options,
|
|
9458
|
-
|
|
9459
|
-
return _regeneratorRuntime.wrap(function
|
|
9529
|
+
_args46 = arguments;
|
|
9530
|
+
return _regeneratorRuntime.wrap(function _callee46$(_context46) {
|
|
9460
9531
|
while (1) {
|
|
9461
|
-
switch (
|
|
9532
|
+
switch (_context46.prev = _context46.next) {
|
|
9462
9533
|
case 0:
|
|
9463
|
-
options =
|
|
9464
|
-
|
|
9534
|
+
options = _args46.length > 1 && _args46[1] !== undefined ? _args46[1] : {};
|
|
9535
|
+
_context46.next = 3;
|
|
9465
9536
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
9466
9537
|
target_message_id: targetMessageID
|
|
9467
9538
|
}, options));
|
|
9468
9539
|
|
|
9469
9540
|
case 3:
|
|
9470
|
-
return
|
|
9541
|
+
return _context46.abrupt("return", _context46.sent);
|
|
9471
9542
|
|
|
9472
9543
|
case 4:
|
|
9473
9544
|
case "end":
|
|
9474
|
-
return
|
|
9545
|
+
return _context46.stop();
|
|
9475
9546
|
}
|
|
9476
9547
|
}
|
|
9477
|
-
},
|
|
9548
|
+
}, _callee46, this);
|
|
9478
9549
|
}));
|
|
9479
9550
|
|
|
9480
|
-
function unflagMessage(
|
|
9551
|
+
function unflagMessage(_x60) {
|
|
9481
9552
|
return _unflagMessage.apply(this, arguments);
|
|
9482
9553
|
}
|
|
9483
9554
|
|
|
@@ -9493,31 +9564,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9493
9564
|
}, {
|
|
9494
9565
|
key: "unflagUser",
|
|
9495
9566
|
value: function () {
|
|
9496
|
-
var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9567
|
+
var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(targetID) {
|
|
9497
9568
|
var options,
|
|
9498
|
-
|
|
9499
|
-
return _regeneratorRuntime.wrap(function
|
|
9569
|
+
_args47 = arguments;
|
|
9570
|
+
return _regeneratorRuntime.wrap(function _callee47$(_context47) {
|
|
9500
9571
|
while (1) {
|
|
9501
|
-
switch (
|
|
9572
|
+
switch (_context47.prev = _context47.next) {
|
|
9502
9573
|
case 0:
|
|
9503
|
-
options =
|
|
9504
|
-
|
|
9574
|
+
options = _args47.length > 1 && _args47[1] !== undefined ? _args47[1] : {};
|
|
9575
|
+
_context47.next = 3;
|
|
9505
9576
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
9506
9577
|
target_user_id: targetID
|
|
9507
9578
|
}, options));
|
|
9508
9579
|
|
|
9509
9580
|
case 3:
|
|
9510
|
-
return
|
|
9581
|
+
return _context47.abrupt("return", _context47.sent);
|
|
9511
9582
|
|
|
9512
9583
|
case 4:
|
|
9513
9584
|
case "end":
|
|
9514
|
-
return
|
|
9585
|
+
return _context47.stop();
|
|
9515
9586
|
}
|
|
9516
9587
|
}
|
|
9517
|
-
},
|
|
9588
|
+
}, _callee47, this);
|
|
9518
9589
|
}));
|
|
9519
9590
|
|
|
9520
|
-
function unflagUser(
|
|
9591
|
+
function unflagUser(_x61) {
|
|
9521
9592
|
return _unflagUser.apply(this, arguments);
|
|
9522
9593
|
}
|
|
9523
9594
|
|
|
@@ -9534,29 +9605,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9534
9605
|
}, {
|
|
9535
9606
|
key: "getCallToken",
|
|
9536
9607
|
value: function () {
|
|
9537
|
-
var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9608
|
+
var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(callID) {
|
|
9538
9609
|
var options,
|
|
9539
|
-
|
|
9540
|
-
return _regeneratorRuntime.wrap(function
|
|
9610
|
+
_args48 = arguments;
|
|
9611
|
+
return _regeneratorRuntime.wrap(function _callee48$(_context48) {
|
|
9541
9612
|
while (1) {
|
|
9542
|
-
switch (
|
|
9613
|
+
switch (_context48.prev = _context48.next) {
|
|
9543
9614
|
case 0:
|
|
9544
|
-
options =
|
|
9545
|
-
|
|
9615
|
+
options = _args48.length > 1 && _args48[1] !== undefined ? _args48[1] : {};
|
|
9616
|
+
_context48.next = 3;
|
|
9546
9617
|
return this.post(this.baseURL + "/calls/".concat(callID), _objectSpread({}, options));
|
|
9547
9618
|
|
|
9548
9619
|
case 3:
|
|
9549
|
-
return
|
|
9620
|
+
return _context48.abrupt("return", _context48.sent);
|
|
9550
9621
|
|
|
9551
9622
|
case 4:
|
|
9552
9623
|
case "end":
|
|
9553
|
-
return
|
|
9624
|
+
return _context48.stop();
|
|
9554
9625
|
}
|
|
9555
9626
|
}
|
|
9556
|
-
},
|
|
9627
|
+
}, _callee48, this);
|
|
9557
9628
|
}));
|
|
9558
9629
|
|
|
9559
|
-
function getCallToken(
|
|
9630
|
+
function getCallToken(_x62) {
|
|
9560
9631
|
return _getCallToken.apply(this, arguments);
|
|
9561
9632
|
}
|
|
9562
9633
|
|
|
@@ -9579,30 +9650,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9579
9650
|
}, {
|
|
9580
9651
|
key: "_queryFlags",
|
|
9581
9652
|
value: function () {
|
|
9582
|
-
var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9653
|
+
var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49() {
|
|
9583
9654
|
var filterConditions,
|
|
9584
9655
|
options,
|
|
9585
|
-
|
|
9586
|
-
return _regeneratorRuntime.wrap(function
|
|
9656
|
+
_args49 = arguments;
|
|
9657
|
+
return _regeneratorRuntime.wrap(function _callee49$(_context49) {
|
|
9587
9658
|
while (1) {
|
|
9588
|
-
switch (
|
|
9659
|
+
switch (_context49.prev = _context49.next) {
|
|
9589
9660
|
case 0:
|
|
9590
|
-
filterConditions =
|
|
9591
|
-
options =
|
|
9592
|
-
|
|
9661
|
+
filterConditions = _args49.length > 0 && _args49[0] !== undefined ? _args49[0] : {};
|
|
9662
|
+
options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
|
|
9663
|
+
_context49.next = 4;
|
|
9593
9664
|
return this.post(this.baseURL + '/moderation/flags', _objectSpread({
|
|
9594
9665
|
filter_conditions: filterConditions
|
|
9595
9666
|
}, options));
|
|
9596
9667
|
|
|
9597
9668
|
case 4:
|
|
9598
|
-
return
|
|
9669
|
+
return _context49.abrupt("return", _context49.sent);
|
|
9599
9670
|
|
|
9600
9671
|
case 5:
|
|
9601
9672
|
case "end":
|
|
9602
|
-
return
|
|
9673
|
+
return _context49.stop();
|
|
9603
9674
|
}
|
|
9604
9675
|
}
|
|
9605
|
-
},
|
|
9676
|
+
}, _callee49, this);
|
|
9606
9677
|
}));
|
|
9607
9678
|
|
|
9608
9679
|
function _queryFlags() {
|
|
@@ -9628,30 +9699,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9628
9699
|
}, {
|
|
9629
9700
|
key: "_queryFlagReports",
|
|
9630
9701
|
value: function () {
|
|
9631
|
-
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9702
|
+
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50() {
|
|
9632
9703
|
var filterConditions,
|
|
9633
9704
|
options,
|
|
9634
|
-
|
|
9635
|
-
return _regeneratorRuntime.wrap(function
|
|
9705
|
+
_args50 = arguments;
|
|
9706
|
+
return _regeneratorRuntime.wrap(function _callee50$(_context50) {
|
|
9636
9707
|
while (1) {
|
|
9637
|
-
switch (
|
|
9708
|
+
switch (_context50.prev = _context50.next) {
|
|
9638
9709
|
case 0:
|
|
9639
|
-
filterConditions =
|
|
9640
|
-
options =
|
|
9641
|
-
|
|
9710
|
+
filterConditions = _args50.length > 0 && _args50[0] !== undefined ? _args50[0] : {};
|
|
9711
|
+
options = _args50.length > 1 && _args50[1] !== undefined ? _args50[1] : {};
|
|
9712
|
+
_context50.next = 4;
|
|
9642
9713
|
return this.post(this.baseURL + '/moderation/reports', _objectSpread({
|
|
9643
9714
|
filter_conditions: filterConditions
|
|
9644
9715
|
}, options));
|
|
9645
9716
|
|
|
9646
9717
|
case 4:
|
|
9647
|
-
return
|
|
9718
|
+
return _context50.abrupt("return", _context50.sent);
|
|
9648
9719
|
|
|
9649
9720
|
case 5:
|
|
9650
9721
|
case "end":
|
|
9651
|
-
return
|
|
9722
|
+
return _context50.stop();
|
|
9652
9723
|
}
|
|
9653
9724
|
}
|
|
9654
|
-
},
|
|
9725
|
+
}, _callee50, this);
|
|
9655
9726
|
}));
|
|
9656
9727
|
|
|
9657
9728
|
function _queryFlagReports() {
|
|
@@ -9678,31 +9749,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9678
9749
|
}, {
|
|
9679
9750
|
key: "_reviewFlagReport",
|
|
9680
9751
|
value: function () {
|
|
9681
|
-
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9752
|
+
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(id, reviewResult) {
|
|
9682
9753
|
var options,
|
|
9683
|
-
|
|
9684
|
-
return _regeneratorRuntime.wrap(function
|
|
9754
|
+
_args51 = arguments;
|
|
9755
|
+
return _regeneratorRuntime.wrap(function _callee51$(_context51) {
|
|
9685
9756
|
while (1) {
|
|
9686
|
-
switch (
|
|
9757
|
+
switch (_context51.prev = _context51.next) {
|
|
9687
9758
|
case 0:
|
|
9688
|
-
options =
|
|
9689
|
-
|
|
9759
|
+
options = _args51.length > 2 && _args51[2] !== undefined ? _args51[2] : {};
|
|
9760
|
+
_context51.next = 3;
|
|
9690
9761
|
return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
|
|
9691
9762
|
review_result: reviewResult
|
|
9692
9763
|
}, options));
|
|
9693
9764
|
|
|
9694
9765
|
case 3:
|
|
9695
|
-
return
|
|
9766
|
+
return _context51.abrupt("return", _context51.sent);
|
|
9696
9767
|
|
|
9697
9768
|
case 4:
|
|
9698
9769
|
case "end":
|
|
9699
|
-
return
|
|
9770
|
+
return _context51.stop();
|
|
9700
9771
|
}
|
|
9701
9772
|
}
|
|
9702
|
-
},
|
|
9773
|
+
}, _callee51, this);
|
|
9703
9774
|
}));
|
|
9704
9775
|
|
|
9705
|
-
function _reviewFlagReport(
|
|
9776
|
+
function _reviewFlagReport(_x63, _x64) {
|
|
9706
9777
|
return _reviewFlagReport2.apply(this, arguments);
|
|
9707
9778
|
}
|
|
9708
9779
|
|
|
@@ -9720,31 +9791,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9720
9791
|
}, {
|
|
9721
9792
|
key: "unblockMessage",
|
|
9722
9793
|
value: function () {
|
|
9723
|
-
var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9794
|
+
var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(targetMessageID) {
|
|
9724
9795
|
var options,
|
|
9725
|
-
|
|
9726
|
-
return _regeneratorRuntime.wrap(function
|
|
9796
|
+
_args52 = arguments;
|
|
9797
|
+
return _regeneratorRuntime.wrap(function _callee52$(_context52) {
|
|
9727
9798
|
while (1) {
|
|
9728
|
-
switch (
|
|
9799
|
+
switch (_context52.prev = _context52.next) {
|
|
9729
9800
|
case 0:
|
|
9730
|
-
options =
|
|
9731
|
-
|
|
9801
|
+
options = _args52.length > 1 && _args52[1] !== undefined ? _args52[1] : {};
|
|
9802
|
+
_context52.next = 3;
|
|
9732
9803
|
return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
|
|
9733
9804
|
target_message_id: targetMessageID
|
|
9734
9805
|
}, options));
|
|
9735
9806
|
|
|
9736
9807
|
case 3:
|
|
9737
|
-
return
|
|
9808
|
+
return _context52.abrupt("return", _context52.sent);
|
|
9738
9809
|
|
|
9739
9810
|
case 4:
|
|
9740
9811
|
case "end":
|
|
9741
|
-
return
|
|
9812
|
+
return _context52.stop();
|
|
9742
9813
|
}
|
|
9743
9814
|
}
|
|
9744
|
-
},
|
|
9815
|
+
}, _callee52, this);
|
|
9745
9816
|
}));
|
|
9746
9817
|
|
|
9747
|
-
function unblockMessage(
|
|
9818
|
+
function unblockMessage(_x65) {
|
|
9748
9819
|
return _unblockMessage.apply(this, arguments);
|
|
9749
9820
|
}
|
|
9750
9821
|
|
|
@@ -9763,23 +9834,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9763
9834
|
* @return {Promise<APIResponse>}
|
|
9764
9835
|
*/
|
|
9765
9836
|
function () {
|
|
9766
|
-
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9837
|
+
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53() {
|
|
9767
9838
|
var data,
|
|
9768
|
-
|
|
9769
|
-
return _regeneratorRuntime.wrap(function
|
|
9839
|
+
_args53 = arguments;
|
|
9840
|
+
return _regeneratorRuntime.wrap(function _callee53$(_context53) {
|
|
9770
9841
|
while (1) {
|
|
9771
|
-
switch (
|
|
9842
|
+
switch (_context53.prev = _context53.next) {
|
|
9772
9843
|
case 0:
|
|
9773
|
-
data =
|
|
9774
|
-
|
|
9844
|
+
data = _args53.length > 0 && _args53[0] !== undefined ? _args53[0] : {};
|
|
9845
|
+
_context53.next = 3;
|
|
9775
9846
|
return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
|
|
9776
9847
|
|
|
9777
9848
|
case 3:
|
|
9778
9849
|
case "end":
|
|
9779
|
-
return
|
|
9850
|
+
return _context53.stop();
|
|
9780
9851
|
}
|
|
9781
9852
|
}
|
|
9782
|
-
},
|
|
9853
|
+
}, _callee53, this);
|
|
9783
9854
|
}));
|
|
9784
9855
|
|
|
9785
9856
|
function markChannelsRead() {
|
|
@@ -9854,28 +9925,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9854
9925
|
}, {
|
|
9855
9926
|
key: "translateMessage",
|
|
9856
9927
|
value: function () {
|
|
9857
|
-
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9858
|
-
return _regeneratorRuntime.wrap(function
|
|
9928
|
+
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(messageId, language) {
|
|
9929
|
+
return _regeneratorRuntime.wrap(function _callee54$(_context54) {
|
|
9859
9930
|
while (1) {
|
|
9860
|
-
switch (
|
|
9931
|
+
switch (_context54.prev = _context54.next) {
|
|
9861
9932
|
case 0:
|
|
9862
|
-
|
|
9933
|
+
_context54.next = 2;
|
|
9863
9934
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
|
|
9864
9935
|
language: language
|
|
9865
9936
|
});
|
|
9866
9937
|
|
|
9867
9938
|
case 2:
|
|
9868
|
-
return
|
|
9939
|
+
return _context54.abrupt("return", _context54.sent);
|
|
9869
9940
|
|
|
9870
9941
|
case 3:
|
|
9871
9942
|
case "end":
|
|
9872
|
-
return
|
|
9943
|
+
return _context54.stop();
|
|
9873
9944
|
}
|
|
9874
9945
|
}
|
|
9875
|
-
},
|
|
9946
|
+
}, _callee54, this);
|
|
9876
9947
|
}));
|
|
9877
9948
|
|
|
9878
|
-
function translateMessage(
|
|
9949
|
+
function translateMessage(_x66, _x67) {
|
|
9879
9950
|
return _translateMessage.apply(this, arguments);
|
|
9880
9951
|
}
|
|
9881
9952
|
|
|
@@ -9977,14 +10048,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9977
10048
|
}, {
|
|
9978
10049
|
key: "updateMessage",
|
|
9979
10050
|
value: function () {
|
|
9980
|
-
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10051
|
+
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(message, userId, options) {
|
|
9981
10052
|
var clonedMessage, reservedMessageFields;
|
|
9982
|
-
return _regeneratorRuntime.wrap(function
|
|
10053
|
+
return _regeneratorRuntime.wrap(function _callee55$(_context55) {
|
|
9983
10054
|
while (1) {
|
|
9984
|
-
switch (
|
|
10055
|
+
switch (_context55.prev = _context55.next) {
|
|
9985
10056
|
case 0:
|
|
9986
10057
|
if (message.id) {
|
|
9987
|
-
|
|
10058
|
+
_context55.next = 2;
|
|
9988
10059
|
break;
|
|
9989
10060
|
}
|
|
9990
10061
|
|
|
@@ -10021,23 +10092,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10021
10092
|
});
|
|
10022
10093
|
}
|
|
10023
10094
|
|
|
10024
|
-
|
|
10095
|
+
_context55.next = 10;
|
|
10025
10096
|
return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
|
|
10026
10097
|
message: clonedMessage
|
|
10027
10098
|
}, options));
|
|
10028
10099
|
|
|
10029
10100
|
case 10:
|
|
10030
|
-
return
|
|
10101
|
+
return _context55.abrupt("return", _context55.sent);
|
|
10031
10102
|
|
|
10032
10103
|
case 11:
|
|
10033
10104
|
case "end":
|
|
10034
|
-
return
|
|
10105
|
+
return _context55.stop();
|
|
10035
10106
|
}
|
|
10036
10107
|
}
|
|
10037
|
-
},
|
|
10108
|
+
}, _callee55, this);
|
|
10038
10109
|
}));
|
|
10039
10110
|
|
|
10040
|
-
function updateMessage(
|
|
10111
|
+
function updateMessage(_x68, _x69, _x70) {
|
|
10041
10112
|
return _updateMessage.apply(this, arguments);
|
|
10042
10113
|
}
|
|
10043
10114
|
|
|
@@ -10060,14 +10131,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10060
10131
|
}, {
|
|
10061
10132
|
key: "partialUpdateMessage",
|
|
10062
10133
|
value: function () {
|
|
10063
|
-
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10134
|
+
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(id, partialMessageObject, userId, options) {
|
|
10064
10135
|
var user;
|
|
10065
|
-
return _regeneratorRuntime.wrap(function
|
|
10136
|
+
return _regeneratorRuntime.wrap(function _callee56$(_context56) {
|
|
10066
10137
|
while (1) {
|
|
10067
|
-
switch (
|
|
10138
|
+
switch (_context56.prev = _context56.next) {
|
|
10068
10139
|
case 0:
|
|
10069
10140
|
if (id) {
|
|
10070
|
-
|
|
10141
|
+
_context56.next = 2;
|
|
10071
10142
|
break;
|
|
10072
10143
|
}
|
|
10073
10144
|
|
|
@@ -10082,23 +10153,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10082
10153
|
};
|
|
10083
10154
|
}
|
|
10084
10155
|
|
|
10085
|
-
|
|
10156
|
+
_context56.next = 6;
|
|
10086
10157
|
return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
10087
10158
|
user: user
|
|
10088
10159
|
}));
|
|
10089
10160
|
|
|
10090
10161
|
case 6:
|
|
10091
|
-
return
|
|
10162
|
+
return _context56.abrupt("return", _context56.sent);
|
|
10092
10163
|
|
|
10093
10164
|
case 7:
|
|
10094
10165
|
case "end":
|
|
10095
|
-
return
|
|
10166
|
+
return _context56.stop();
|
|
10096
10167
|
}
|
|
10097
10168
|
}
|
|
10098
|
-
},
|
|
10169
|
+
}, _callee56, this);
|
|
10099
10170
|
}));
|
|
10100
10171
|
|
|
10101
|
-
function partialUpdateMessage(
|
|
10172
|
+
function partialUpdateMessage(_x71, _x72, _x73, _x74) {
|
|
10102
10173
|
return _partialUpdateMessage.apply(this, arguments);
|
|
10103
10174
|
}
|
|
10104
10175
|
|
|
@@ -10107,11 +10178,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10107
10178
|
}, {
|
|
10108
10179
|
key: "deleteMessage",
|
|
10109
10180
|
value: function () {
|
|
10110
|
-
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10181
|
+
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(messageID, hardDelete) {
|
|
10111
10182
|
var params;
|
|
10112
|
-
return _regeneratorRuntime.wrap(function
|
|
10183
|
+
return _regeneratorRuntime.wrap(function _callee57$(_context57) {
|
|
10113
10184
|
while (1) {
|
|
10114
|
-
switch (
|
|
10185
|
+
switch (_context57.prev = _context57.next) {
|
|
10115
10186
|
case 0:
|
|
10116
10187
|
params = {};
|
|
10117
10188
|
|
|
@@ -10121,21 +10192,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10121
10192
|
};
|
|
10122
10193
|
}
|
|
10123
10194
|
|
|
10124
|
-
|
|
10195
|
+
_context57.next = 4;
|
|
10125
10196
|
return this.delete(this.baseURL + "/messages/".concat(messageID), params);
|
|
10126
10197
|
|
|
10127
10198
|
case 4:
|
|
10128
|
-
return
|
|
10199
|
+
return _context57.abrupt("return", _context57.sent);
|
|
10129
10200
|
|
|
10130
10201
|
case 5:
|
|
10131
10202
|
case "end":
|
|
10132
|
-
return
|
|
10203
|
+
return _context57.stop();
|
|
10133
10204
|
}
|
|
10134
10205
|
}
|
|
10135
|
-
},
|
|
10206
|
+
}, _callee57, this);
|
|
10136
10207
|
}));
|
|
10137
10208
|
|
|
10138
|
-
function deleteMessage(
|
|
10209
|
+
function deleteMessage(_x75, _x76) {
|
|
10139
10210
|
return _deleteMessage.apply(this, arguments);
|
|
10140
10211
|
}
|
|
10141
10212
|
|
|
@@ -10144,26 +10215,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10144
10215
|
}, {
|
|
10145
10216
|
key: "getMessage",
|
|
10146
10217
|
value: function () {
|
|
10147
|
-
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10148
|
-
return _regeneratorRuntime.wrap(function
|
|
10218
|
+
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(messageID) {
|
|
10219
|
+
return _regeneratorRuntime.wrap(function _callee58$(_context58) {
|
|
10149
10220
|
while (1) {
|
|
10150
|
-
switch (
|
|
10221
|
+
switch (_context58.prev = _context58.next) {
|
|
10151
10222
|
case 0:
|
|
10152
|
-
|
|
10223
|
+
_context58.next = 2;
|
|
10153
10224
|
return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)));
|
|
10154
10225
|
|
|
10155
10226
|
case 2:
|
|
10156
|
-
return
|
|
10227
|
+
return _context58.abrupt("return", _context58.sent);
|
|
10157
10228
|
|
|
10158
10229
|
case 3:
|
|
10159
10230
|
case "end":
|
|
10160
|
-
return
|
|
10231
|
+
return _context58.stop();
|
|
10161
10232
|
}
|
|
10162
10233
|
}
|
|
10163
|
-
},
|
|
10234
|
+
}, _callee58, this);
|
|
10164
10235
|
}));
|
|
10165
10236
|
|
|
10166
|
-
function getMessage(
|
|
10237
|
+
function getMessage(_x77) {
|
|
10167
10238
|
return _getMessage.apply(this, arguments);
|
|
10168
10239
|
}
|
|
10169
10240
|
|
|
@@ -10172,7 +10243,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10172
10243
|
}, {
|
|
10173
10244
|
key: "getUserAgent",
|
|
10174
10245
|
value: function getUserAgent() {
|
|
10175
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
10246
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.15.0");
|
|
10176
10247
|
}
|
|
10177
10248
|
}, {
|
|
10178
10249
|
key: "setUserAgent",
|
|
@@ -10391,28 +10462,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10391
10462
|
}, {
|
|
10392
10463
|
key: "sendUserCustomEvent",
|
|
10393
10464
|
value: function () {
|
|
10394
|
-
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10395
|
-
return _regeneratorRuntime.wrap(function
|
|
10465
|
+
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(targetUserID, event) {
|
|
10466
|
+
return _regeneratorRuntime.wrap(function _callee59$(_context59) {
|
|
10396
10467
|
while (1) {
|
|
10397
|
-
switch (
|
|
10468
|
+
switch (_context59.prev = _context59.next) {
|
|
10398
10469
|
case 0:
|
|
10399
|
-
|
|
10470
|
+
_context59.next = 2;
|
|
10400
10471
|
return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
|
|
10401
10472
|
event: event
|
|
10402
10473
|
});
|
|
10403
10474
|
|
|
10404
10475
|
case 2:
|
|
10405
|
-
return
|
|
10476
|
+
return _context59.abrupt("return", _context59.sent);
|
|
10406
10477
|
|
|
10407
10478
|
case 3:
|
|
10408
10479
|
case "end":
|
|
10409
|
-
return
|
|
10480
|
+
return _context59.stop();
|
|
10410
10481
|
}
|
|
10411
10482
|
}
|
|
10412
|
-
},
|
|
10483
|
+
}, _callee59, this);
|
|
10413
10484
|
}));
|
|
10414
10485
|
|
|
10415
|
-
function sendUserCustomEvent(
|
|
10486
|
+
function sendUserCustomEvent(_x78, _x79) {
|
|
10416
10487
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
10417
10488
|
}
|
|
10418
10489
|
|
|
@@ -10470,132 +10541,298 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10470
10541
|
return this.get("".concat(this.baseURL, "/export_channels/").concat(id));
|
|
10471
10542
|
}
|
|
10472
10543
|
/**
|
|
10473
|
-
* createSegment - Creates a
|
|
10544
|
+
* createSegment - Creates a segment
|
|
10474
10545
|
*
|
|
10546
|
+
* @private
|
|
10547
|
+
* @param {SegmentType} type Segment type
|
|
10548
|
+
* @param {string} id Segment ID (valid UUID)
|
|
10549
|
+
* @param {string} name Segment name (valid UUID)
|
|
10475
10550
|
* @param {SegmentData} params Segment data
|
|
10476
10551
|
*
|
|
10477
|
-
* @return {Segment} The
|
|
10552
|
+
* @return {Segment} The created Segment
|
|
10478
10553
|
*/
|
|
10479
10554
|
|
|
10480
10555
|
}, {
|
|
10481
10556
|
key: "createSegment",
|
|
10482
10557
|
value: function () {
|
|
10483
|
-
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10484
|
-
var _yield$this$post, segment;
|
|
10558
|
+
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(type, id, name, data) {
|
|
10559
|
+
var body, _yield$this$post, segment;
|
|
10485
10560
|
|
|
10486
|
-
return _regeneratorRuntime.wrap(function
|
|
10561
|
+
return _regeneratorRuntime.wrap(function _callee60$(_context60) {
|
|
10487
10562
|
while (1) {
|
|
10488
|
-
switch (
|
|
10563
|
+
switch (_context60.prev = _context60.next) {
|
|
10489
10564
|
case 0:
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10565
|
+
body = {
|
|
10566
|
+
id: id,
|
|
10567
|
+
type: type,
|
|
10568
|
+
name: name,
|
|
10569
|
+
data: data
|
|
10570
|
+
};
|
|
10571
|
+
_context60.next = 3;
|
|
10572
|
+
return this.post(this.baseURL + "/segments", body);
|
|
10494
10573
|
|
|
10495
|
-
case
|
|
10496
|
-
_yield$this$post =
|
|
10574
|
+
case 3:
|
|
10575
|
+
_yield$this$post = _context60.sent;
|
|
10497
10576
|
segment = _yield$this$post.segment;
|
|
10498
|
-
return
|
|
10577
|
+
return _context60.abrupt("return", segment);
|
|
10499
10578
|
|
|
10500
|
-
case
|
|
10579
|
+
case 6:
|
|
10501
10580
|
case "end":
|
|
10502
|
-
return
|
|
10581
|
+
return _context60.stop();
|
|
10503
10582
|
}
|
|
10504
10583
|
}
|
|
10505
|
-
},
|
|
10584
|
+
}, _callee60, this);
|
|
10506
10585
|
}));
|
|
10507
10586
|
|
|
10508
|
-
function createSegment(
|
|
10587
|
+
function createSegment(_x80, _x81, _x82, _x83) {
|
|
10509
10588
|
return _createSegment.apply(this, arguments);
|
|
10510
10589
|
}
|
|
10511
10590
|
|
|
10512
10591
|
return createSegment;
|
|
10513
10592
|
}()
|
|
10514
10593
|
/**
|
|
10515
|
-
*
|
|
10594
|
+
* createUserSegment - Creates a user segment
|
|
10516
10595
|
*
|
|
10596
|
+
* @param {string} id Segment ID (valid UUID)
|
|
10597
|
+
* @param {string} name Segment name
|
|
10598
|
+
* @param {SegmentData} data Segment data
|
|
10517
10599
|
*
|
|
10518
|
-
* @return {Segment
|
|
10600
|
+
* @return {Segment} The created Segment
|
|
10519
10601
|
*/
|
|
10520
10602
|
|
|
10521
10603
|
}, {
|
|
10522
|
-
key: "
|
|
10604
|
+
key: "createUserSegment",
|
|
10523
10605
|
value: function () {
|
|
10524
|
-
var
|
|
10525
|
-
|
|
10526
|
-
_args60 = arguments;
|
|
10527
|
-
return _regeneratorRuntime.wrap(function _callee60$(_context60) {
|
|
10606
|
+
var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id, name, data) {
|
|
10607
|
+
return _regeneratorRuntime.wrap(function _callee61$(_context61) {
|
|
10528
10608
|
while (1) {
|
|
10529
|
-
switch (
|
|
10609
|
+
switch (_context61.prev = _context61.next) {
|
|
10530
10610
|
case 0:
|
|
10531
|
-
|
|
10532
|
-
|
|
10533
|
-
return this.get(this.baseURL + "/segments", {
|
|
10534
|
-
payload: _objectSpread({
|
|
10535
|
-
filter_conditions: filters
|
|
10536
|
-
}, options)
|
|
10537
|
-
});
|
|
10611
|
+
_context61.next = 2;
|
|
10612
|
+
return this.createSegment('user', id, name, data);
|
|
10538
10613
|
|
|
10539
|
-
case
|
|
10540
|
-
return
|
|
10614
|
+
case 2:
|
|
10615
|
+
return _context61.abrupt("return", _context61.sent);
|
|
10541
10616
|
|
|
10542
|
-
case
|
|
10617
|
+
case 3:
|
|
10543
10618
|
case "end":
|
|
10544
|
-
return
|
|
10619
|
+
return _context61.stop();
|
|
10545
10620
|
}
|
|
10546
10621
|
}
|
|
10547
|
-
},
|
|
10622
|
+
}, _callee61, this);
|
|
10548
10623
|
}));
|
|
10549
10624
|
|
|
10550
|
-
function
|
|
10551
|
-
return
|
|
10625
|
+
function createUserSegment(_x84, _x85, _x86) {
|
|
10626
|
+
return _createUserSegment.apply(this, arguments);
|
|
10552
10627
|
}
|
|
10553
10628
|
|
|
10554
|
-
return
|
|
10629
|
+
return createUserSegment;
|
|
10555
10630
|
}()
|
|
10556
10631
|
/**
|
|
10557
|
-
*
|
|
10632
|
+
* createChannelSegment - Creates a channel segment
|
|
10558
10633
|
*
|
|
10559
|
-
* @param {string} id Segment ID
|
|
10560
|
-
* @param {
|
|
10634
|
+
* @param {string} id Segment ID (valid UUID)
|
|
10635
|
+
* @param {string} name Segment name
|
|
10636
|
+
* @param {SegmentData} data Segment data
|
|
10561
10637
|
*
|
|
10562
|
-
* @return {Segment}
|
|
10638
|
+
* @return {Segment} The created Segment
|
|
10563
10639
|
*/
|
|
10564
10640
|
|
|
10565
10641
|
}, {
|
|
10566
|
-
key: "
|
|
10642
|
+
key: "createChannelSegment",
|
|
10567
10643
|
value: function () {
|
|
10568
|
-
var
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
return _regeneratorRuntime.wrap(function _callee61$(_context61) {
|
|
10644
|
+
var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(id, name, data) {
|
|
10645
|
+
return _regeneratorRuntime.wrap(function _callee62$(_context62) {
|
|
10572
10646
|
while (1) {
|
|
10573
|
-
switch (
|
|
10647
|
+
switch (_context62.prev = _context62.next) {
|
|
10574
10648
|
case 0:
|
|
10575
|
-
|
|
10576
|
-
return this.
|
|
10577
|
-
segment: params
|
|
10578
|
-
});
|
|
10649
|
+
_context62.next = 2;
|
|
10650
|
+
return this.createSegment('channel', id, name, data);
|
|
10579
10651
|
|
|
10580
10652
|
case 2:
|
|
10581
|
-
|
|
10582
|
-
segment = _yield$this$put.segment;
|
|
10583
|
-
return _context61.abrupt("return", segment);
|
|
10653
|
+
return _context62.abrupt("return", _context62.sent);
|
|
10584
10654
|
|
|
10585
|
-
case
|
|
10655
|
+
case 3:
|
|
10586
10656
|
case "end":
|
|
10587
|
-
return
|
|
10657
|
+
return _context62.stop();
|
|
10588
10658
|
}
|
|
10589
10659
|
}
|
|
10590
|
-
},
|
|
10660
|
+
}, _callee62, this);
|
|
10591
10661
|
}));
|
|
10592
10662
|
|
|
10593
|
-
function
|
|
10663
|
+
function createChannelSegment(_x87, _x88, _x89) {
|
|
10664
|
+
return _createChannelSegment.apply(this, arguments);
|
|
10665
|
+
}
|
|
10666
|
+
|
|
10667
|
+
return createChannelSegment;
|
|
10668
|
+
}()
|
|
10669
|
+
/**
|
|
10670
|
+
* updateSegment - Update a segment
|
|
10671
|
+
*
|
|
10672
|
+
* @param {string} id Segment ID
|
|
10673
|
+
* @param {Partial<UpdateSegmentData>} data Data to update
|
|
10674
|
+
*
|
|
10675
|
+
* @return {Segment} Updated Segment
|
|
10676
|
+
*/
|
|
10677
|
+
|
|
10678
|
+
}, {
|
|
10679
|
+
key: "updateSegment",
|
|
10680
|
+
value: function () {
|
|
10681
|
+
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(id, data) {
|
|
10682
|
+
var _yield$this$put, segment;
|
|
10683
|
+
|
|
10684
|
+
return _regeneratorRuntime.wrap(function _callee63$(_context63) {
|
|
10685
|
+
while (1) {
|
|
10686
|
+
switch (_context63.prev = _context63.next) {
|
|
10687
|
+
case 0:
|
|
10688
|
+
_context63.next = 2;
|
|
10689
|
+
return this.put(this.baseURL + "/segments/".concat(id), data);
|
|
10690
|
+
|
|
10691
|
+
case 2:
|
|
10692
|
+
_yield$this$put = _context63.sent;
|
|
10693
|
+
segment = _yield$this$put.segment;
|
|
10694
|
+
return _context63.abrupt("return", segment);
|
|
10695
|
+
|
|
10696
|
+
case 5:
|
|
10697
|
+
case "end":
|
|
10698
|
+
return _context63.stop();
|
|
10699
|
+
}
|
|
10700
|
+
}
|
|
10701
|
+
}, _callee63, this);
|
|
10702
|
+
}));
|
|
10703
|
+
|
|
10704
|
+
function updateSegment(_x90, _x91) {
|
|
10594
10705
|
return _updateSegment.apply(this, arguments);
|
|
10595
10706
|
}
|
|
10596
10707
|
|
|
10597
10708
|
return updateSegment;
|
|
10598
10709
|
}()
|
|
10710
|
+
/**
|
|
10711
|
+
* addSegmentTargets - Add targets to a segment
|
|
10712
|
+
*
|
|
10713
|
+
* @param {string} id Segment ID
|
|
10714
|
+
* @param {string[]} targets Targets to add to the segment
|
|
10715
|
+
*
|
|
10716
|
+
* @return {APIResponse} API response
|
|
10717
|
+
*/
|
|
10718
|
+
|
|
10719
|
+
}, {
|
|
10720
|
+
key: "addSegmentTargets",
|
|
10721
|
+
value: function () {
|
|
10722
|
+
var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id, targets) {
|
|
10723
|
+
var body;
|
|
10724
|
+
return _regeneratorRuntime.wrap(function _callee64$(_context64) {
|
|
10725
|
+
while (1) {
|
|
10726
|
+
switch (_context64.prev = _context64.next) {
|
|
10727
|
+
case 0:
|
|
10728
|
+
body = {
|
|
10729
|
+
targets: targets
|
|
10730
|
+
};
|
|
10731
|
+
_context64.next = 3;
|
|
10732
|
+
return this.post(this.baseURL + "/segments/".concat(id, "/addtargets"), body);
|
|
10733
|
+
|
|
10734
|
+
case 3:
|
|
10735
|
+
return _context64.abrupt("return", _context64.sent);
|
|
10736
|
+
|
|
10737
|
+
case 4:
|
|
10738
|
+
case "end":
|
|
10739
|
+
return _context64.stop();
|
|
10740
|
+
}
|
|
10741
|
+
}
|
|
10742
|
+
}, _callee64, this);
|
|
10743
|
+
}));
|
|
10744
|
+
|
|
10745
|
+
function addSegmentTargets(_x92, _x93) {
|
|
10746
|
+
return _addSegmentTargets.apply(this, arguments);
|
|
10747
|
+
}
|
|
10748
|
+
|
|
10749
|
+
return addSegmentTargets;
|
|
10750
|
+
}()
|
|
10751
|
+
/**
|
|
10752
|
+
* deleteSegmentTargets - Delete targets from a segment
|
|
10753
|
+
*
|
|
10754
|
+
* @param {string} id Segment ID
|
|
10755
|
+
* @param {string[]} targets Targets to add to the segment
|
|
10756
|
+
*
|
|
10757
|
+
* @return {APIResponse} API response
|
|
10758
|
+
*/
|
|
10759
|
+
|
|
10760
|
+
}, {
|
|
10761
|
+
key: "deleteSegmentTargets",
|
|
10762
|
+
value: function () {
|
|
10763
|
+
var _deleteSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id, targets) {
|
|
10764
|
+
var body;
|
|
10765
|
+
return _regeneratorRuntime.wrap(function _callee65$(_context65) {
|
|
10766
|
+
while (1) {
|
|
10767
|
+
switch (_context65.prev = _context65.next) {
|
|
10768
|
+
case 0:
|
|
10769
|
+
body = {
|
|
10770
|
+
targets: targets
|
|
10771
|
+
};
|
|
10772
|
+
_context65.next = 3;
|
|
10773
|
+
return this.post(this.baseURL + "/segments/".concat(id, "/deletetargets"), body);
|
|
10774
|
+
|
|
10775
|
+
case 3:
|
|
10776
|
+
return _context65.abrupt("return", _context65.sent);
|
|
10777
|
+
|
|
10778
|
+
case 4:
|
|
10779
|
+
case "end":
|
|
10780
|
+
return _context65.stop();
|
|
10781
|
+
}
|
|
10782
|
+
}
|
|
10783
|
+
}, _callee65, this);
|
|
10784
|
+
}));
|
|
10785
|
+
|
|
10786
|
+
function deleteSegmentTargets(_x94, _x95) {
|
|
10787
|
+
return _deleteSegmentTargets.apply(this, arguments);
|
|
10788
|
+
}
|
|
10789
|
+
|
|
10790
|
+
return deleteSegmentTargets;
|
|
10791
|
+
}()
|
|
10792
|
+
/**
|
|
10793
|
+
* querySegments - Query Segments
|
|
10794
|
+
*
|
|
10795
|
+
* @param {filter} filter MongoDB style filter conditions
|
|
10796
|
+
* @param {QuerySegmentsOptions} options Options for sorting/paginating the results
|
|
10797
|
+
*
|
|
10798
|
+
* @return {Segment[]} Segments
|
|
10799
|
+
*/
|
|
10800
|
+
|
|
10801
|
+
}, {
|
|
10802
|
+
key: "querySegments",
|
|
10803
|
+
value: function () {
|
|
10804
|
+
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(filter) {
|
|
10805
|
+
var options,
|
|
10806
|
+
_args66 = arguments;
|
|
10807
|
+
return _regeneratorRuntime.wrap(function _callee66$(_context66) {
|
|
10808
|
+
while (1) {
|
|
10809
|
+
switch (_context66.prev = _context66.next) {
|
|
10810
|
+
case 0:
|
|
10811
|
+
options = _args66.length > 1 && _args66[1] !== undefined ? _args66[1] : {};
|
|
10812
|
+
_context66.next = 3;
|
|
10813
|
+
return this.get(this.baseURL + "/segments", {
|
|
10814
|
+
payload: _objectSpread({
|
|
10815
|
+
filter: filter
|
|
10816
|
+
}, options)
|
|
10817
|
+
});
|
|
10818
|
+
|
|
10819
|
+
case 3:
|
|
10820
|
+
return _context66.abrupt("return", _context66.sent);
|
|
10821
|
+
|
|
10822
|
+
case 4:
|
|
10823
|
+
case "end":
|
|
10824
|
+
return _context66.stop();
|
|
10825
|
+
}
|
|
10826
|
+
}
|
|
10827
|
+
}, _callee66, this);
|
|
10828
|
+
}));
|
|
10829
|
+
|
|
10830
|
+
function querySegments(_x96) {
|
|
10831
|
+
return _querySegments.apply(this, arguments);
|
|
10832
|
+
}
|
|
10833
|
+
|
|
10834
|
+
return querySegments;
|
|
10835
|
+
}()
|
|
10599
10836
|
/**
|
|
10600
10837
|
* deleteSegment - Delete a Campaign Segment
|
|
10601
10838
|
*
|
|
@@ -10607,27 +10844,68 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10607
10844
|
}, {
|
|
10608
10845
|
key: "deleteSegment",
|
|
10609
10846
|
value: function () {
|
|
10610
|
-
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10611
|
-
return _regeneratorRuntime.wrap(function
|
|
10847
|
+
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id) {
|
|
10848
|
+
return _regeneratorRuntime.wrap(function _callee67$(_context67) {
|
|
10612
10849
|
while (1) {
|
|
10613
|
-
switch (
|
|
10850
|
+
switch (_context67.prev = _context67.next) {
|
|
10614
10851
|
case 0:
|
|
10615
|
-
|
|
10852
|
+
_context67.next = 2;
|
|
10853
|
+
return this.delete(this.baseURL + "/segments/".concat(id));
|
|
10616
10854
|
|
|
10617
|
-
case
|
|
10855
|
+
case 2:
|
|
10856
|
+
return _context67.abrupt("return", _context67.sent);
|
|
10857
|
+
|
|
10858
|
+
case 3:
|
|
10618
10859
|
case "end":
|
|
10619
|
-
return
|
|
10860
|
+
return _context67.stop();
|
|
10620
10861
|
}
|
|
10621
10862
|
}
|
|
10622
|
-
},
|
|
10863
|
+
}, _callee67, this);
|
|
10623
10864
|
}));
|
|
10624
10865
|
|
|
10625
|
-
function deleteSegment(
|
|
10866
|
+
function deleteSegment(_x97) {
|
|
10626
10867
|
return _deleteSegment.apply(this, arguments);
|
|
10627
10868
|
}
|
|
10628
10869
|
|
|
10629
10870
|
return deleteSegment;
|
|
10630
10871
|
}()
|
|
10872
|
+
/**
|
|
10873
|
+
* segmentTargetExists - Check if a target exists in a segment
|
|
10874
|
+
*
|
|
10875
|
+
* @param {string} segmentId Segment ID
|
|
10876
|
+
* @param {string} targetId Target ID
|
|
10877
|
+
*
|
|
10878
|
+
* @return {Promise<APIResponse>} The Server Response
|
|
10879
|
+
*/
|
|
10880
|
+
|
|
10881
|
+
}, {
|
|
10882
|
+
key: "segmentTargetExists",
|
|
10883
|
+
value: function () {
|
|
10884
|
+
var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(segmentId, targetId) {
|
|
10885
|
+
return _regeneratorRuntime.wrap(function _callee68$(_context68) {
|
|
10886
|
+
while (1) {
|
|
10887
|
+
switch (_context68.prev = _context68.next) {
|
|
10888
|
+
case 0:
|
|
10889
|
+
_context68.next = 2;
|
|
10890
|
+
return this.get(this.baseURL + "/segments/".concat(segmentId, "/target/").concat(targetId));
|
|
10891
|
+
|
|
10892
|
+
case 2:
|
|
10893
|
+
return _context68.abrupt("return", _context68.sent);
|
|
10894
|
+
|
|
10895
|
+
case 3:
|
|
10896
|
+
case "end":
|
|
10897
|
+
return _context68.stop();
|
|
10898
|
+
}
|
|
10899
|
+
}
|
|
10900
|
+
}, _callee68, this);
|
|
10901
|
+
}));
|
|
10902
|
+
|
|
10903
|
+
function segmentTargetExists(_x98, _x99) {
|
|
10904
|
+
return _segmentTargetExists.apply(this, arguments);
|
|
10905
|
+
}
|
|
10906
|
+
|
|
10907
|
+
return segmentTargetExists;
|
|
10908
|
+
}()
|
|
10631
10909
|
/**
|
|
10632
10910
|
* createCampaign - Creates a Campaign
|
|
10633
10911
|
*
|
|
@@ -10639,32 +10917,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10639
10917
|
}, {
|
|
10640
10918
|
key: "createCampaign",
|
|
10641
10919
|
value: function () {
|
|
10642
|
-
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10920
|
+
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(params) {
|
|
10643
10921
|
var _yield$this$post2, campaign;
|
|
10644
10922
|
|
|
10645
|
-
return _regeneratorRuntime.wrap(function
|
|
10923
|
+
return _regeneratorRuntime.wrap(function _callee69$(_context69) {
|
|
10646
10924
|
while (1) {
|
|
10647
|
-
switch (
|
|
10925
|
+
switch (_context69.prev = _context69.next) {
|
|
10648
10926
|
case 0:
|
|
10649
|
-
|
|
10927
|
+
_context69.next = 2;
|
|
10650
10928
|
return this.post(this.baseURL + "/campaigns", {
|
|
10651
10929
|
campaign: params
|
|
10652
10930
|
});
|
|
10653
10931
|
|
|
10654
10932
|
case 2:
|
|
10655
|
-
_yield$this$post2 =
|
|
10933
|
+
_yield$this$post2 = _context69.sent;
|
|
10656
10934
|
campaign = _yield$this$post2.campaign;
|
|
10657
|
-
return
|
|
10935
|
+
return _context69.abrupt("return", campaign);
|
|
10658
10936
|
|
|
10659
10937
|
case 5:
|
|
10660
10938
|
case "end":
|
|
10661
|
-
return
|
|
10939
|
+
return _context69.stop();
|
|
10662
10940
|
}
|
|
10663
10941
|
}
|
|
10664
|
-
},
|
|
10942
|
+
}, _callee69, this);
|
|
10665
10943
|
}));
|
|
10666
10944
|
|
|
10667
|
-
function createCampaign(
|
|
10945
|
+
function createCampaign(_x100) {
|
|
10668
10946
|
return _createCampaign.apply(this, arguments);
|
|
10669
10947
|
}
|
|
10670
10948
|
|
|
@@ -10680,15 +10958,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10680
10958
|
}, {
|
|
10681
10959
|
key: "queryCampaigns",
|
|
10682
10960
|
value: function () {
|
|
10683
|
-
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10961
|
+
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(filters) {
|
|
10684
10962
|
var options,
|
|
10685
|
-
|
|
10686
|
-
return _regeneratorRuntime.wrap(function
|
|
10963
|
+
_args70 = arguments;
|
|
10964
|
+
return _regeneratorRuntime.wrap(function _callee70$(_context70) {
|
|
10687
10965
|
while (1) {
|
|
10688
|
-
switch (
|
|
10966
|
+
switch (_context70.prev = _context70.next) {
|
|
10689
10967
|
case 0:
|
|
10690
|
-
options =
|
|
10691
|
-
|
|
10968
|
+
options = _args70.length > 1 && _args70[1] !== undefined ? _args70[1] : {};
|
|
10969
|
+
_context70.next = 3;
|
|
10692
10970
|
return this.get(this.baseURL + "/campaigns", {
|
|
10693
10971
|
payload: _objectSpread({
|
|
10694
10972
|
filter_conditions: filters
|
|
@@ -10696,17 +10974,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10696
10974
|
});
|
|
10697
10975
|
|
|
10698
10976
|
case 3:
|
|
10699
|
-
return
|
|
10977
|
+
return _context70.abrupt("return", _context70.sent);
|
|
10700
10978
|
|
|
10701
10979
|
case 4:
|
|
10702
10980
|
case "end":
|
|
10703
|
-
return
|
|
10981
|
+
return _context70.stop();
|
|
10704
10982
|
}
|
|
10705
10983
|
}
|
|
10706
|
-
},
|
|
10984
|
+
}, _callee70, this);
|
|
10707
10985
|
}));
|
|
10708
10986
|
|
|
10709
|
-
function queryCampaigns(
|
|
10987
|
+
function queryCampaigns(_x101) {
|
|
10710
10988
|
return _queryCampaigns.apply(this, arguments);
|
|
10711
10989
|
}
|
|
10712
10990
|
|
|
@@ -10724,32 +11002,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10724
11002
|
}, {
|
|
10725
11003
|
key: "updateCampaign",
|
|
10726
11004
|
value: function () {
|
|
10727
|
-
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11005
|
+
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id, params) {
|
|
10728
11006
|
var _yield$this$put2, campaign;
|
|
10729
11007
|
|
|
10730
|
-
return _regeneratorRuntime.wrap(function
|
|
11008
|
+
return _regeneratorRuntime.wrap(function _callee71$(_context71) {
|
|
10731
11009
|
while (1) {
|
|
10732
|
-
switch (
|
|
11010
|
+
switch (_context71.prev = _context71.next) {
|
|
10733
11011
|
case 0:
|
|
10734
|
-
|
|
11012
|
+
_context71.next = 2;
|
|
10735
11013
|
return this.put(this.baseURL + "/campaigns/".concat(id), {
|
|
10736
11014
|
campaign: params
|
|
10737
11015
|
});
|
|
10738
11016
|
|
|
10739
11017
|
case 2:
|
|
10740
|
-
_yield$this$put2 =
|
|
11018
|
+
_yield$this$put2 = _context71.sent;
|
|
10741
11019
|
campaign = _yield$this$put2.campaign;
|
|
10742
|
-
return
|
|
11020
|
+
return _context71.abrupt("return", campaign);
|
|
10743
11021
|
|
|
10744
11022
|
case 5:
|
|
10745
11023
|
case "end":
|
|
10746
|
-
return
|
|
11024
|
+
return _context71.stop();
|
|
10747
11025
|
}
|
|
10748
11026
|
}
|
|
10749
|
-
},
|
|
11027
|
+
}, _callee71, this);
|
|
10750
11028
|
}));
|
|
10751
11029
|
|
|
10752
|
-
function updateCampaign(
|
|
11030
|
+
function updateCampaign(_x102, _x103) {
|
|
10753
11031
|
return _updateCampaign.apply(this, arguments);
|
|
10754
11032
|
}
|
|
10755
11033
|
|
|
@@ -10766,25 +11044,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10766
11044
|
}, {
|
|
10767
11045
|
key: "deleteCampaign",
|
|
10768
11046
|
value: function () {
|
|
10769
|
-
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11047
|
+
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id) {
|
|
10770
11048
|
var params,
|
|
10771
|
-
|
|
10772
|
-
return _regeneratorRuntime.wrap(function
|
|
11049
|
+
_args72 = arguments;
|
|
11050
|
+
return _regeneratorRuntime.wrap(function _callee72$(_context72) {
|
|
10773
11051
|
while (1) {
|
|
10774
|
-
switch (
|
|
11052
|
+
switch (_context72.prev = _context72.next) {
|
|
10775
11053
|
case 0:
|
|
10776
|
-
params =
|
|
10777
|
-
return
|
|
11054
|
+
params = _args72.length > 1 && _args72[1] !== undefined ? _args72[1] : {};
|
|
11055
|
+
return _context72.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id), params));
|
|
10778
11056
|
|
|
10779
11057
|
case 2:
|
|
10780
11058
|
case "end":
|
|
10781
|
-
return
|
|
11059
|
+
return _context72.stop();
|
|
10782
11060
|
}
|
|
10783
11061
|
}
|
|
10784
|
-
},
|
|
11062
|
+
}, _callee72, this);
|
|
10785
11063
|
}));
|
|
10786
11064
|
|
|
10787
|
-
function deleteCampaign(
|
|
11065
|
+
function deleteCampaign(_x104) {
|
|
10788
11066
|
return _deleteCampaign.apply(this, arguments);
|
|
10789
11067
|
}
|
|
10790
11068
|
|
|
@@ -10802,33 +11080,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10802
11080
|
}, {
|
|
10803
11081
|
key: "scheduleCampaign",
|
|
10804
11082
|
value: function () {
|
|
10805
|
-
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11083
|
+
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id, params) {
|
|
10806
11084
|
var scheduledFor, _yield$this$patch, campaign;
|
|
10807
11085
|
|
|
10808
|
-
return _regeneratorRuntime.wrap(function
|
|
11086
|
+
return _regeneratorRuntime.wrap(function _callee73$(_context73) {
|
|
10809
11087
|
while (1) {
|
|
10810
|
-
switch (
|
|
11088
|
+
switch (_context73.prev = _context73.next) {
|
|
10811
11089
|
case 0:
|
|
10812
11090
|
scheduledFor = params.scheduledFor;
|
|
10813
|
-
|
|
11091
|
+
_context73.next = 3;
|
|
10814
11092
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
|
|
10815
11093
|
scheduled_for: scheduledFor
|
|
10816
11094
|
});
|
|
10817
11095
|
|
|
10818
11096
|
case 3:
|
|
10819
|
-
_yield$this$patch =
|
|
11097
|
+
_yield$this$patch = _context73.sent;
|
|
10820
11098
|
campaign = _yield$this$patch.campaign;
|
|
10821
|
-
return
|
|
11099
|
+
return _context73.abrupt("return", campaign);
|
|
10822
11100
|
|
|
10823
11101
|
case 6:
|
|
10824
11102
|
case "end":
|
|
10825
|
-
return
|
|
11103
|
+
return _context73.stop();
|
|
10826
11104
|
}
|
|
10827
11105
|
}
|
|
10828
|
-
},
|
|
11106
|
+
}, _callee73, this);
|
|
10829
11107
|
}));
|
|
10830
11108
|
|
|
10831
|
-
function scheduleCampaign(
|
|
11109
|
+
function scheduleCampaign(_x105, _x106) {
|
|
10832
11110
|
return _scheduleCampaign.apply(this, arguments);
|
|
10833
11111
|
}
|
|
10834
11112
|
|
|
@@ -10845,30 +11123,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10845
11123
|
}, {
|
|
10846
11124
|
key: "stopCampaign",
|
|
10847
11125
|
value: function () {
|
|
10848
|
-
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11126
|
+
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(id) {
|
|
10849
11127
|
var _yield$this$patch2, campaign;
|
|
10850
11128
|
|
|
10851
|
-
return _regeneratorRuntime.wrap(function
|
|
11129
|
+
return _regeneratorRuntime.wrap(function _callee74$(_context74) {
|
|
10852
11130
|
while (1) {
|
|
10853
|
-
switch (
|
|
11131
|
+
switch (_context74.prev = _context74.next) {
|
|
10854
11132
|
case 0:
|
|
10855
|
-
|
|
11133
|
+
_context74.next = 2;
|
|
10856
11134
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
|
|
10857
11135
|
|
|
10858
11136
|
case 2:
|
|
10859
|
-
_yield$this$patch2 =
|
|
11137
|
+
_yield$this$patch2 = _context74.sent;
|
|
10860
11138
|
campaign = _yield$this$patch2.campaign;
|
|
10861
|
-
return
|
|
11139
|
+
return _context74.abrupt("return", campaign);
|
|
10862
11140
|
|
|
10863
11141
|
case 5:
|
|
10864
11142
|
case "end":
|
|
10865
|
-
return
|
|
11143
|
+
return _context74.stop();
|
|
10866
11144
|
}
|
|
10867
11145
|
}
|
|
10868
|
-
},
|
|
11146
|
+
}, _callee74, this);
|
|
10869
11147
|
}));
|
|
10870
11148
|
|
|
10871
|
-
function stopCampaign(
|
|
11149
|
+
function stopCampaign(_x107) {
|
|
10872
11150
|
return _stopCampaign.apply(this, arguments);
|
|
10873
11151
|
}
|
|
10874
11152
|
|
|
@@ -10885,30 +11163,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10885
11163
|
}, {
|
|
10886
11164
|
key: "resumeCampaign",
|
|
10887
11165
|
value: function () {
|
|
10888
|
-
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11166
|
+
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(id) {
|
|
10889
11167
|
var _yield$this$patch3, campaign;
|
|
10890
11168
|
|
|
10891
|
-
return _regeneratorRuntime.wrap(function
|
|
11169
|
+
return _regeneratorRuntime.wrap(function _callee75$(_context75) {
|
|
10892
11170
|
while (1) {
|
|
10893
|
-
switch (
|
|
11171
|
+
switch (_context75.prev = _context75.next) {
|
|
10894
11172
|
case 0:
|
|
10895
|
-
|
|
11173
|
+
_context75.next = 2;
|
|
10896
11174
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
|
|
10897
11175
|
|
|
10898
11176
|
case 2:
|
|
10899
|
-
_yield$this$patch3 =
|
|
11177
|
+
_yield$this$patch3 = _context75.sent;
|
|
10900
11178
|
campaign = _yield$this$patch3.campaign;
|
|
10901
|
-
return
|
|
11179
|
+
return _context75.abrupt("return", campaign);
|
|
10902
11180
|
|
|
10903
11181
|
case 5:
|
|
10904
11182
|
case "end":
|
|
10905
|
-
return
|
|
11183
|
+
return _context75.stop();
|
|
10906
11184
|
}
|
|
10907
11185
|
}
|
|
10908
|
-
},
|
|
11186
|
+
}, _callee75, this);
|
|
10909
11187
|
}));
|
|
10910
11188
|
|
|
10911
|
-
function resumeCampaign(
|
|
11189
|
+
function resumeCampaign(_x108) {
|
|
10912
11190
|
return _resumeCampaign.apply(this, arguments);
|
|
10913
11191
|
}
|
|
10914
11192
|
|
|
@@ -10926,77 +11204,35 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10926
11204
|
}, {
|
|
10927
11205
|
key: "testCampaign",
|
|
10928
11206
|
value: function () {
|
|
10929
|
-
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11207
|
+
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(id, params) {
|
|
10930
11208
|
var users;
|
|
10931
|
-
return _regeneratorRuntime.wrap(function
|
|
11209
|
+
return _regeneratorRuntime.wrap(function _callee76$(_context76) {
|
|
10932
11210
|
while (1) {
|
|
10933
|
-
switch (
|
|
11211
|
+
switch (_context76.prev = _context76.next) {
|
|
10934
11212
|
case 0:
|
|
10935
11213
|
users = params.users;
|
|
10936
|
-
|
|
11214
|
+
_context76.next = 3;
|
|
10937
11215
|
return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
|
|
10938
11216
|
users: users
|
|
10939
11217
|
});
|
|
10940
11218
|
|
|
10941
11219
|
case 3:
|
|
10942
|
-
return
|
|
11220
|
+
return _context76.abrupt("return", _context76.sent);
|
|
10943
11221
|
|
|
10944
11222
|
case 4:
|
|
10945
11223
|
case "end":
|
|
10946
|
-
return
|
|
11224
|
+
return _context76.stop();
|
|
10947
11225
|
}
|
|
10948
11226
|
}
|
|
10949
|
-
},
|
|
11227
|
+
}, _callee76, this);
|
|
10950
11228
|
}));
|
|
10951
11229
|
|
|
10952
|
-
function testCampaign(
|
|
11230
|
+
function testCampaign(_x109, _x110) {
|
|
10953
11231
|
return _testCampaign.apply(this, arguments);
|
|
10954
11232
|
}
|
|
10955
11233
|
|
|
10956
11234
|
return testCampaign;
|
|
10957
11235
|
}()
|
|
10958
|
-
/**
|
|
10959
|
-
* queryRecipients - Query Campaign Recipient Results
|
|
10960
|
-
*
|
|
10961
|
-
*
|
|
10962
|
-
* @return {Recipient[]} Recipients
|
|
10963
|
-
*/
|
|
10964
|
-
|
|
10965
|
-
}, {
|
|
10966
|
-
key: "queryRecipients",
|
|
10967
|
-
value: function () {
|
|
10968
|
-
var _queryRecipients = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(filters) {
|
|
10969
|
-
var options,
|
|
10970
|
-
_args71 = arguments;
|
|
10971
|
-
return _regeneratorRuntime.wrap(function _callee71$(_context71) {
|
|
10972
|
-
while (1) {
|
|
10973
|
-
switch (_context71.prev = _context71.next) {
|
|
10974
|
-
case 0:
|
|
10975
|
-
options = _args71.length > 1 && _args71[1] !== undefined ? _args71[1] : {};
|
|
10976
|
-
_context71.next = 3;
|
|
10977
|
-
return this.get(this.baseURL + "/recipients", {
|
|
10978
|
-
payload: _objectSpread({
|
|
10979
|
-
filter_conditions: filters
|
|
10980
|
-
}, options)
|
|
10981
|
-
});
|
|
10982
|
-
|
|
10983
|
-
case 3:
|
|
10984
|
-
return _context71.abrupt("return", _context71.sent);
|
|
10985
|
-
|
|
10986
|
-
case 4:
|
|
10987
|
-
case "end":
|
|
10988
|
-
return _context71.stop();
|
|
10989
|
-
}
|
|
10990
|
-
}
|
|
10991
|
-
}, _callee71, this);
|
|
10992
|
-
}));
|
|
10993
|
-
|
|
10994
|
-
function queryRecipients(_x95) {
|
|
10995
|
-
return _queryRecipients.apply(this, arguments);
|
|
10996
|
-
}
|
|
10997
|
-
|
|
10998
|
-
return queryRecipients;
|
|
10999
|
-
}()
|
|
11000
11236
|
/**
|
|
11001
11237
|
* enrichURL - Get OpenGraph data of the given link
|
|
11002
11238
|
*
|
|
@@ -11007,24 +11243,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11007
11243
|
}, {
|
|
11008
11244
|
key: "enrichURL",
|
|
11009
11245
|
value: function () {
|
|
11010
|
-
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11011
|
-
return _regeneratorRuntime.wrap(function
|
|
11246
|
+
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(url) {
|
|
11247
|
+
return _regeneratorRuntime.wrap(function _callee77$(_context77) {
|
|
11012
11248
|
while (1) {
|
|
11013
|
-
switch (
|
|
11249
|
+
switch (_context77.prev = _context77.next) {
|
|
11014
11250
|
case 0:
|
|
11015
|
-
return
|
|
11251
|
+
return _context77.abrupt("return", this.get(this.baseURL + "/og", {
|
|
11016
11252
|
url: url
|
|
11017
11253
|
}));
|
|
11018
11254
|
|
|
11019
11255
|
case 1:
|
|
11020
11256
|
case "end":
|
|
11021
|
-
return
|
|
11257
|
+
return _context77.stop();
|
|
11022
11258
|
}
|
|
11023
11259
|
}
|
|
11024
|
-
},
|
|
11260
|
+
}, _callee77, this);
|
|
11025
11261
|
}));
|
|
11026
11262
|
|
|
11027
|
-
function enrichURL(
|
|
11263
|
+
function enrichURL(_x111) {
|
|
11028
11264
|
return _enrichURL.apply(this, arguments);
|
|
11029
11265
|
}
|
|
11030
11266
|
|
|
@@ -11041,22 +11277,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11041
11277
|
}, {
|
|
11042
11278
|
key: "getTask",
|
|
11043
11279
|
value: function () {
|
|
11044
|
-
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11045
|
-
return _regeneratorRuntime.wrap(function
|
|
11280
|
+
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(id) {
|
|
11281
|
+
return _regeneratorRuntime.wrap(function _callee78$(_context78) {
|
|
11046
11282
|
while (1) {
|
|
11047
|
-
switch (
|
|
11283
|
+
switch (_context78.prev = _context78.next) {
|
|
11048
11284
|
case 0:
|
|
11049
|
-
return
|
|
11285
|
+
return _context78.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
11050
11286
|
|
|
11051
11287
|
case 1:
|
|
11052
11288
|
case "end":
|
|
11053
|
-
return
|
|
11289
|
+
return _context78.stop();
|
|
11054
11290
|
}
|
|
11055
11291
|
}
|
|
11056
|
-
},
|
|
11292
|
+
}, _callee78, this);
|
|
11057
11293
|
}));
|
|
11058
11294
|
|
|
11059
|
-
function getTask(
|
|
11295
|
+
function getTask(_x112) {
|
|
11060
11296
|
return _getTask.apply(this, arguments);
|
|
11061
11297
|
}
|
|
11062
11298
|
|
|
@@ -11074,31 +11310,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11074
11310
|
}, {
|
|
11075
11311
|
key: "deleteChannels",
|
|
11076
11312
|
value: function () {
|
|
11077
|
-
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11313
|
+
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(cids) {
|
|
11078
11314
|
var options,
|
|
11079
|
-
|
|
11080
|
-
return _regeneratorRuntime.wrap(function
|
|
11315
|
+
_args79 = arguments;
|
|
11316
|
+
return _regeneratorRuntime.wrap(function _callee79$(_context79) {
|
|
11081
11317
|
while (1) {
|
|
11082
|
-
switch (
|
|
11318
|
+
switch (_context79.prev = _context79.next) {
|
|
11083
11319
|
case 0:
|
|
11084
|
-
options =
|
|
11085
|
-
|
|
11320
|
+
options = _args79.length > 1 && _args79[1] !== undefined ? _args79[1] : {};
|
|
11321
|
+
_context79.next = 3;
|
|
11086
11322
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
11087
11323
|
cids: cids
|
|
11088
11324
|
}, options));
|
|
11089
11325
|
|
|
11090
11326
|
case 3:
|
|
11091
|
-
return
|
|
11327
|
+
return _context79.abrupt("return", _context79.sent);
|
|
11092
11328
|
|
|
11093
11329
|
case 4:
|
|
11094
11330
|
case "end":
|
|
11095
|
-
return
|
|
11331
|
+
return _context79.stop();
|
|
11096
11332
|
}
|
|
11097
11333
|
}
|
|
11098
|
-
},
|
|
11334
|
+
}, _callee79, this);
|
|
11099
11335
|
}));
|
|
11100
11336
|
|
|
11101
|
-
function deleteChannels(
|
|
11337
|
+
function deleteChannels(_x113) {
|
|
11102
11338
|
return _deleteChannels.apply(this, arguments);
|
|
11103
11339
|
}
|
|
11104
11340
|
|
|
@@ -11116,52 +11352,56 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11116
11352
|
}, {
|
|
11117
11353
|
key: "deleteUsers",
|
|
11118
11354
|
value: function () {
|
|
11119
|
-
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11120
|
-
|
|
11355
|
+
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(user_ids) {
|
|
11356
|
+
var options,
|
|
11357
|
+
_args80 = arguments;
|
|
11358
|
+
return _regeneratorRuntime.wrap(function _callee80$(_context80) {
|
|
11121
11359
|
while (1) {
|
|
11122
|
-
switch (
|
|
11360
|
+
switch (_context80.prev = _context80.next) {
|
|
11123
11361
|
case 0:
|
|
11124
|
-
|
|
11125
|
-
|
|
11362
|
+
options = _args80.length > 1 && _args80[1] !== undefined ? _args80[1] : {};
|
|
11363
|
+
|
|
11364
|
+
if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
|
|
11365
|
+
_context80.next = 3;
|
|
11126
11366
|
break;
|
|
11127
11367
|
}
|
|
11128
11368
|
|
|
11129
|
-
throw new Error('Invalid delete user options. user must be one of [soft hard]');
|
|
11369
|
+
throw new Error('Invalid delete user options. user must be one of [soft hard pruning]');
|
|
11130
11370
|
|
|
11131
|
-
case
|
|
11132
|
-
if (!(options.
|
|
11133
|
-
|
|
11371
|
+
case 3:
|
|
11372
|
+
if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
|
|
11373
|
+
_context80.next = 5;
|
|
11134
11374
|
break;
|
|
11135
11375
|
}
|
|
11136
11376
|
|
|
11137
|
-
throw new Error('Invalid delete user options.
|
|
11377
|
+
throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
|
|
11138
11378
|
|
|
11139
|
-
case
|
|
11140
|
-
if (!(options.
|
|
11141
|
-
|
|
11379
|
+
case 5:
|
|
11380
|
+
if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
|
|
11381
|
+
_context80.next = 7;
|
|
11142
11382
|
break;
|
|
11143
11383
|
}
|
|
11144
11384
|
|
|
11145
|
-
throw new Error('Invalid delete user options.
|
|
11385
|
+
throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
|
|
11146
11386
|
|
|
11147
|
-
case
|
|
11148
|
-
|
|
11387
|
+
case 7:
|
|
11388
|
+
_context80.next = 9;
|
|
11149
11389
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
11150
11390
|
user_ids: user_ids
|
|
11151
11391
|
}, options));
|
|
11152
11392
|
|
|
11153
|
-
case 8:
|
|
11154
|
-
return _context75.abrupt("return", _context75.sent);
|
|
11155
|
-
|
|
11156
11393
|
case 9:
|
|
11394
|
+
return _context80.abrupt("return", _context80.sent);
|
|
11395
|
+
|
|
11396
|
+
case 10:
|
|
11157
11397
|
case "end":
|
|
11158
|
-
return
|
|
11398
|
+
return _context80.stop();
|
|
11159
11399
|
}
|
|
11160
11400
|
}
|
|
11161
|
-
},
|
|
11401
|
+
}, _callee80, this);
|
|
11162
11402
|
}));
|
|
11163
11403
|
|
|
11164
|
-
function deleteUsers(
|
|
11404
|
+
function deleteUsers(_x114) {
|
|
11165
11405
|
return _deleteUsers.apply(this, arguments);
|
|
11166
11406
|
}
|
|
11167
11407
|
|
|
@@ -11182,28 +11422,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11182
11422
|
}, {
|
|
11183
11423
|
key: "_createImportURL",
|
|
11184
11424
|
value: function () {
|
|
11185
|
-
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11186
|
-
return _regeneratorRuntime.wrap(function
|
|
11425
|
+
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(filename) {
|
|
11426
|
+
return _regeneratorRuntime.wrap(function _callee81$(_context81) {
|
|
11187
11427
|
while (1) {
|
|
11188
|
-
switch (
|
|
11428
|
+
switch (_context81.prev = _context81.next) {
|
|
11189
11429
|
case 0:
|
|
11190
|
-
|
|
11430
|
+
_context81.next = 2;
|
|
11191
11431
|
return this.post(this.baseURL + "/import_urls", {
|
|
11192
11432
|
filename: filename
|
|
11193
11433
|
});
|
|
11194
11434
|
|
|
11195
11435
|
case 2:
|
|
11196
|
-
return
|
|
11436
|
+
return _context81.abrupt("return", _context81.sent);
|
|
11197
11437
|
|
|
11198
11438
|
case 3:
|
|
11199
11439
|
case "end":
|
|
11200
|
-
return
|
|
11440
|
+
return _context81.stop();
|
|
11201
11441
|
}
|
|
11202
11442
|
}
|
|
11203
|
-
},
|
|
11443
|
+
}, _callee81, this);
|
|
11204
11444
|
}));
|
|
11205
11445
|
|
|
11206
|
-
function _createImportURL(
|
|
11446
|
+
function _createImportURL(_x115) {
|
|
11207
11447
|
return _createImportURL2.apply(this, arguments);
|
|
11208
11448
|
}
|
|
11209
11449
|
|
|
@@ -11225,33 +11465,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11225
11465
|
}, {
|
|
11226
11466
|
key: "_createImport",
|
|
11227
11467
|
value: function () {
|
|
11228
|
-
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11468
|
+
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(path) {
|
|
11229
11469
|
var options,
|
|
11230
|
-
|
|
11231
|
-
return _regeneratorRuntime.wrap(function
|
|
11470
|
+
_args82 = arguments;
|
|
11471
|
+
return _regeneratorRuntime.wrap(function _callee82$(_context82) {
|
|
11232
11472
|
while (1) {
|
|
11233
|
-
switch (
|
|
11473
|
+
switch (_context82.prev = _context82.next) {
|
|
11234
11474
|
case 0:
|
|
11235
|
-
options =
|
|
11475
|
+
options = _args82.length > 1 && _args82[1] !== undefined ? _args82[1] : {
|
|
11236
11476
|
mode: 'upsert'
|
|
11237
11477
|
};
|
|
11238
|
-
|
|
11478
|
+
_context82.next = 3;
|
|
11239
11479
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
11240
11480
|
path: path
|
|
11241
11481
|
}, options));
|
|
11242
11482
|
|
|
11243
11483
|
case 3:
|
|
11244
|
-
return
|
|
11484
|
+
return _context82.abrupt("return", _context82.sent);
|
|
11245
11485
|
|
|
11246
11486
|
case 4:
|
|
11247
11487
|
case "end":
|
|
11248
|
-
return
|
|
11488
|
+
return _context82.stop();
|
|
11249
11489
|
}
|
|
11250
11490
|
}
|
|
11251
|
-
},
|
|
11491
|
+
}, _callee82, this);
|
|
11252
11492
|
}));
|
|
11253
11493
|
|
|
11254
|
-
function _createImport(
|
|
11494
|
+
function _createImport(_x116) {
|
|
11255
11495
|
return _createImport2.apply(this, arguments);
|
|
11256
11496
|
}
|
|
11257
11497
|
|
|
@@ -11273,26 +11513,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11273
11513
|
}, {
|
|
11274
11514
|
key: "_getImport",
|
|
11275
11515
|
value: function () {
|
|
11276
|
-
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11277
|
-
return _regeneratorRuntime.wrap(function
|
|
11516
|
+
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(id) {
|
|
11517
|
+
return _regeneratorRuntime.wrap(function _callee83$(_context83) {
|
|
11278
11518
|
while (1) {
|
|
11279
|
-
switch (
|
|
11519
|
+
switch (_context83.prev = _context83.next) {
|
|
11280
11520
|
case 0:
|
|
11281
|
-
|
|
11521
|
+
_context83.next = 2;
|
|
11282
11522
|
return this.get(this.baseURL + "/imports/".concat(id));
|
|
11283
11523
|
|
|
11284
11524
|
case 2:
|
|
11285
|
-
return
|
|
11525
|
+
return _context83.abrupt("return", _context83.sent);
|
|
11286
11526
|
|
|
11287
11527
|
case 3:
|
|
11288
11528
|
case "end":
|
|
11289
|
-
return
|
|
11529
|
+
return _context83.stop();
|
|
11290
11530
|
}
|
|
11291
11531
|
}
|
|
11292
|
-
},
|
|
11532
|
+
}, _callee83, this);
|
|
11293
11533
|
}));
|
|
11294
11534
|
|
|
11295
|
-
function _getImport(
|
|
11535
|
+
function _getImport(_x117) {
|
|
11296
11536
|
return _getImport2.apply(this, arguments);
|
|
11297
11537
|
}
|
|
11298
11538
|
|
|
@@ -11314,26 +11554,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11314
11554
|
}, {
|
|
11315
11555
|
key: "_listImports",
|
|
11316
11556
|
value: function () {
|
|
11317
|
-
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11318
|
-
return _regeneratorRuntime.wrap(function
|
|
11557
|
+
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(options) {
|
|
11558
|
+
return _regeneratorRuntime.wrap(function _callee84$(_context84) {
|
|
11319
11559
|
while (1) {
|
|
11320
|
-
switch (
|
|
11560
|
+
switch (_context84.prev = _context84.next) {
|
|
11321
11561
|
case 0:
|
|
11322
|
-
|
|
11562
|
+
_context84.next = 2;
|
|
11323
11563
|
return this.get(this.baseURL + "/imports", options);
|
|
11324
11564
|
|
|
11325
11565
|
case 2:
|
|
11326
|
-
return
|
|
11566
|
+
return _context84.abrupt("return", _context84.sent);
|
|
11327
11567
|
|
|
11328
11568
|
case 3:
|
|
11329
11569
|
case "end":
|
|
11330
|
-
return
|
|
11570
|
+
return _context84.stop();
|
|
11331
11571
|
}
|
|
11332
11572
|
}
|
|
11333
|
-
},
|
|
11573
|
+
}, _callee84, this);
|
|
11334
11574
|
}));
|
|
11335
11575
|
|
|
11336
|
-
function _listImports(
|
|
11576
|
+
function _listImports(_x118) {
|
|
11337
11577
|
return _listImports2.apply(this, arguments);
|
|
11338
11578
|
}
|
|
11339
11579
|
|
|
@@ -11352,28 +11592,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11352
11592
|
}, {
|
|
11353
11593
|
key: "upsertPushProvider",
|
|
11354
11594
|
value: function () {
|
|
11355
|
-
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11356
|
-
return _regeneratorRuntime.wrap(function
|
|
11595
|
+
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(pushProvider) {
|
|
11596
|
+
return _regeneratorRuntime.wrap(function _callee85$(_context85) {
|
|
11357
11597
|
while (1) {
|
|
11358
|
-
switch (
|
|
11598
|
+
switch (_context85.prev = _context85.next) {
|
|
11359
11599
|
case 0:
|
|
11360
|
-
|
|
11600
|
+
_context85.next = 2;
|
|
11361
11601
|
return this.post(this.baseURL + "/push_providers", {
|
|
11362
11602
|
push_provider: pushProvider
|
|
11363
11603
|
});
|
|
11364
11604
|
|
|
11365
11605
|
case 2:
|
|
11366
|
-
return
|
|
11606
|
+
return _context85.abrupt("return", _context85.sent);
|
|
11367
11607
|
|
|
11368
11608
|
case 3:
|
|
11369
11609
|
case "end":
|
|
11370
|
-
return
|
|
11610
|
+
return _context85.stop();
|
|
11371
11611
|
}
|
|
11372
11612
|
}
|
|
11373
|
-
},
|
|
11613
|
+
}, _callee85, this);
|
|
11374
11614
|
}));
|
|
11375
11615
|
|
|
11376
|
-
function upsertPushProvider(
|
|
11616
|
+
function upsertPushProvider(_x119) {
|
|
11377
11617
|
return _upsertPushProvider.apply(this, arguments);
|
|
11378
11618
|
}
|
|
11379
11619
|
|
|
@@ -11392,28 +11632,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11392
11632
|
}, {
|
|
11393
11633
|
key: "deletePushProvider",
|
|
11394
11634
|
value: function () {
|
|
11395
|
-
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11635
|
+
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(_ref10) {
|
|
11396
11636
|
var type, name;
|
|
11397
|
-
return _regeneratorRuntime.wrap(function
|
|
11637
|
+
return _regeneratorRuntime.wrap(function _callee86$(_context86) {
|
|
11398
11638
|
while (1) {
|
|
11399
|
-
switch (
|
|
11639
|
+
switch (_context86.prev = _context86.next) {
|
|
11400
11640
|
case 0:
|
|
11401
11641
|
type = _ref10.type, name = _ref10.name;
|
|
11402
|
-
|
|
11642
|
+
_context86.next = 3;
|
|
11403
11643
|
return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
|
|
11404
11644
|
|
|
11405
11645
|
case 3:
|
|
11406
|
-
return
|
|
11646
|
+
return _context86.abrupt("return", _context86.sent);
|
|
11407
11647
|
|
|
11408
11648
|
case 4:
|
|
11409
11649
|
case "end":
|
|
11410
|
-
return
|
|
11650
|
+
return _context86.stop();
|
|
11411
11651
|
}
|
|
11412
11652
|
}
|
|
11413
|
-
},
|
|
11653
|
+
}, _callee86, this);
|
|
11414
11654
|
}));
|
|
11415
11655
|
|
|
11416
|
-
function deletePushProvider(
|
|
11656
|
+
function deletePushProvider(_x120) {
|
|
11417
11657
|
return _deletePushProvider.apply(this, arguments);
|
|
11418
11658
|
}
|
|
11419
11659
|
|
|
@@ -11430,23 +11670,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11430
11670
|
}, {
|
|
11431
11671
|
key: "listPushProviders",
|
|
11432
11672
|
value: function () {
|
|
11433
|
-
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11434
|
-
return _regeneratorRuntime.wrap(function
|
|
11673
|
+
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87() {
|
|
11674
|
+
return _regeneratorRuntime.wrap(function _callee87$(_context87) {
|
|
11435
11675
|
while (1) {
|
|
11436
|
-
switch (
|
|
11676
|
+
switch (_context87.prev = _context87.next) {
|
|
11437
11677
|
case 0:
|
|
11438
|
-
|
|
11678
|
+
_context87.next = 2;
|
|
11439
11679
|
return this.get(this.baseURL + "/push_providers");
|
|
11440
11680
|
|
|
11441
11681
|
case 2:
|
|
11442
|
-
return
|
|
11682
|
+
return _context87.abrupt("return", _context87.sent);
|
|
11443
11683
|
|
|
11444
11684
|
case 3:
|
|
11445
11685
|
case "end":
|
|
11446
|
-
return
|
|
11686
|
+
return _context87.stop();
|
|
11447
11687
|
}
|
|
11448
11688
|
}
|
|
11449
|
-
},
|
|
11689
|
+
}, _callee87, this);
|
|
11450
11690
|
}));
|
|
11451
11691
|
|
|
11452
11692
|
function listPushProviders() {
|
|
@@ -11474,26 +11714,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11474
11714
|
}, {
|
|
11475
11715
|
key: "commitMessage",
|
|
11476
11716
|
value: function () {
|
|
11477
|
-
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11478
|
-
return _regeneratorRuntime.wrap(function
|
|
11717
|
+
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(id) {
|
|
11718
|
+
return _regeneratorRuntime.wrap(function _callee88$(_context88) {
|
|
11479
11719
|
while (1) {
|
|
11480
|
-
switch (
|
|
11720
|
+
switch (_context88.prev = _context88.next) {
|
|
11481
11721
|
case 0:
|
|
11482
|
-
|
|
11722
|
+
_context88.next = 2;
|
|
11483
11723
|
return this.post(this.baseURL + "/messages/".concat(id, "/commit"));
|
|
11484
11724
|
|
|
11485
11725
|
case 2:
|
|
11486
|
-
return
|
|
11726
|
+
return _context88.abrupt("return", _context88.sent);
|
|
11487
11727
|
|
|
11488
11728
|
case 3:
|
|
11489
11729
|
case "end":
|
|
11490
|
-
return
|
|
11730
|
+
return _context88.stop();
|
|
11491
11731
|
}
|
|
11492
11732
|
}
|
|
11493
|
-
},
|
|
11733
|
+
}, _callee88, this);
|
|
11494
11734
|
}));
|
|
11495
11735
|
|
|
11496
|
-
function commitMessage(
|
|
11736
|
+
function commitMessage(_x121) {
|
|
11497
11737
|
return _commitMessage.apply(this, arguments);
|
|
11498
11738
|
}
|
|
11499
11739
|
|
|
@@ -11545,6 +11785,7 @@ var EVENT_MAP = {
|
|
|
11545
11785
|
'notification.invite_rejected': true,
|
|
11546
11786
|
'notification.invited': true,
|
|
11547
11787
|
'notification.mark_read': true,
|
|
11788
|
+
'notification.mark_unread': true,
|
|
11548
11789
|
'notification.message_new': true,
|
|
11549
11790
|
'notification.mutes_updated': true,
|
|
11550
11791
|
'notification.removed_from_channel': true,
|