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.js
CHANGED
|
@@ -1564,7 +1564,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1564
1564
|
key: "sendMessage",
|
|
1565
1565
|
value: function () {
|
|
1566
1566
|
var _sendMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(message, options) {
|
|
1567
|
-
var sendMessageResponse;
|
|
1568
1567
|
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
|
1569
1568
|
while (1) {
|
|
1570
1569
|
switch (_context2.prev = _context2.next) {
|
|
@@ -1575,12 +1574,9 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1575
1574
|
}, options));
|
|
1576
1575
|
|
|
1577
1576
|
case 2:
|
|
1578
|
-
|
|
1579
|
-
// Reset unreadCount to 0.
|
|
1580
|
-
this.state.unreadCount = 0;
|
|
1581
|
-
return _context2.abrupt("return", sendMessageResponse);
|
|
1577
|
+
return _context2.abrupt("return", _context2.sent);
|
|
1582
1578
|
|
|
1583
|
-
case
|
|
1579
|
+
case 3:
|
|
1584
1580
|
case "end":
|
|
1585
1581
|
return _context2.stop();
|
|
1586
1582
|
}
|
|
@@ -3661,7 +3657,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3661
3657
|
}, {
|
|
3662
3658
|
key: "_handleChannelEvent",
|
|
3663
3659
|
value: function _handleChannelEvent(event) {
|
|
3664
|
-
var _event$user, _event$user2, _event$user3, _event$user5, _event$user6, _event$channel, _event$member, _event$user9, _event$
|
|
3660
|
+
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;
|
|
3665
3661
|
|
|
3666
3662
|
var channel = this;
|
|
3667
3663
|
|
|
@@ -3692,7 +3688,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3692
3688
|
var _event$user4, _this$getClient$user;
|
|
3693
3689
|
|
|
3694
3690
|
channelState.read[event.user.id] = {
|
|
3695
|
-
// because in client.ts the handleEvent call that flows to this sets this `event.received_at = new Date();`
|
|
3696
3691
|
last_read: new Date(event.created_at),
|
|
3697
3692
|
last_read_message_id: event.last_read_message_id,
|
|
3698
3693
|
user: event.user,
|
|
@@ -3749,7 +3744,13 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3749
3744
|
|
|
3750
3745
|
if (event.message.pinned) {
|
|
3751
3746
|
channelState.addPinnedMessage(event.message);
|
|
3752
|
-
}
|
|
3747
|
+
} // do not increase the unread count - the back-end does not increase the count neither in the following cases:
|
|
3748
|
+
// 1. the message is mine
|
|
3749
|
+
// 2. the message is a thread reply from any user
|
|
3750
|
+
|
|
3751
|
+
|
|
3752
|
+
var preventUnreadCountUpdate = ownMessage || isThreadMessage;
|
|
3753
|
+
if (preventUnreadCountUpdate) break;
|
|
3753
3754
|
|
|
3754
3755
|
if ((_event$user8 = event.user) !== null && _event$user8 !== void 0 && _event$user8.id) {
|
|
3755
3756
|
for (var userId in channelState.read) {
|
|
@@ -3765,9 +3766,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3765
3766
|
}
|
|
3766
3767
|
}
|
|
3767
3768
|
|
|
3768
|
-
if (
|
|
3769
|
-
channelState.unreadCount = 0;
|
|
3770
|
-
} else if (this._countMessageAsUnread(event.message)) {
|
|
3769
|
+
if (this._countMessageAsUnread(event.message)) {
|
|
3771
3770
|
channelState.unreadCount = channelState.unreadCount + 1;
|
|
3772
3771
|
}
|
|
3773
3772
|
}
|
|
@@ -3840,6 +3839,25 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3840
3839
|
|
|
3841
3840
|
break;
|
|
3842
3841
|
|
|
3842
|
+
case 'notification.mark_unread':
|
|
3843
|
+
{
|
|
3844
|
+
var _event$user10, _this$getClient$user3, _event$unread_message;
|
|
3845
|
+
|
|
3846
|
+
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);
|
|
3847
|
+
|
|
3848
|
+
if (!(_ownMessage && event.user)) break;
|
|
3849
|
+
var unreadCount = (_event$unread_message = event.unread_messages) !== null && _event$unread_message !== void 0 ? _event$unread_message : 0;
|
|
3850
|
+
channelState.read[event.user.id] = {
|
|
3851
|
+
first_unread_message_id: event.first_unread_message_id,
|
|
3852
|
+
last_read: new Date(event.last_read_at),
|
|
3853
|
+
last_read_message_id: event.last_read_message_id,
|
|
3854
|
+
user: event.user,
|
|
3855
|
+
unread_messages: unreadCount
|
|
3856
|
+
};
|
|
3857
|
+
channelState.unreadCount = unreadCount;
|
|
3858
|
+
break;
|
|
3859
|
+
}
|
|
3860
|
+
|
|
3843
3861
|
case 'channel.updated':
|
|
3844
3862
|
if (event.channel) {
|
|
3845
3863
|
var _event$channel2, _channel$data, _event$channel$hidden, _event$channel3, _channel$data2, _event$channel$own_ca, _event$channel4, _channel$data3;
|
|
@@ -3906,7 +3924,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3906
3924
|
break;
|
|
3907
3925
|
|
|
3908
3926
|
case 'user.banned':
|
|
3909
|
-
if (!((_event$
|
|
3927
|
+
if (!((_event$user11 = event.user) !== null && _event$user11 !== void 0 && _event$user11.id)) break;
|
|
3910
3928
|
channelState.members[event.user.id] = _objectSpread$5(_objectSpread$5({}, channelState.members[event.user.id] || {}), {}, {
|
|
3911
3929
|
shadow_banned: !!event.shadow,
|
|
3912
3930
|
banned: !event.shadow,
|
|
@@ -3915,7 +3933,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3915
3933
|
break;
|
|
3916
3934
|
|
|
3917
3935
|
case 'user.unbanned':
|
|
3918
|
-
if (!((_event$
|
|
3936
|
+
if (!((_event$user12 = event.user) !== null && _event$user12 !== void 0 && _event$user12.id)) break;
|
|
3919
3937
|
channelState.members[event.user.id] = _objectSpread$5(_objectSpread$5({}, channelState.members[event.user.id] || {}), {}, {
|
|
3920
3938
|
shadow_banned: false,
|
|
3921
3939
|
banned: false,
|
|
@@ -6094,11 +6112,18 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
6094
6112
|
/*
|
|
6095
6113
|
DeleteUserOptions specifies a collection of one or more `user_ids` to be deleted.
|
|
6096
6114
|
|
|
6097
|
-
`user
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
`
|
|
6115
|
+
`user`:
|
|
6116
|
+
- soft: marks user as deleted and retains all user data
|
|
6117
|
+
- pruning: marks user as deleted and nullifies user information
|
|
6118
|
+
- hard: deletes user completely - this requires hard option for messages and conversation as well
|
|
6119
|
+
`conversations`:
|
|
6120
|
+
- soft: marks all conversation channels as deleted (same effect as Delete Channels with 'hard' option disabled)
|
|
6121
|
+
- hard: deletes channel and all its data completely including messages (same effect as Delete Channels with 'hard' option enabled)
|
|
6122
|
+
`messages`:
|
|
6123
|
+
- soft: marks all user messages as deleted without removing any related message data
|
|
6124
|
+
- pruning: marks all user messages as deleted, nullifies message information and removes some message data such as reactions and flags
|
|
6125
|
+
- hard: deletes messages completely with all related information
|
|
6126
|
+
`new_channel_owner_id`: any channels owned by the hard-deleted user will be transferred to this user ID
|
|
6102
6127
|
*/
|
|
6103
6128
|
// TODO: add better typing
|
|
6104
6129
|
var ErrorFromResponse = /*#__PURE__*/function (_Error) {
|
|
@@ -8473,6 +8498,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8473
8498
|
|
|
8474
8499
|
return getDevices;
|
|
8475
8500
|
}()
|
|
8501
|
+
/**
|
|
8502
|
+
* getUnreadCount - Returns unread counts for a single user
|
|
8503
|
+
*
|
|
8504
|
+
* @param {string} [userID] User ID.
|
|
8505
|
+
*
|
|
8506
|
+
* @return {<GetUnreadCountAPIResponse>}
|
|
8507
|
+
*/
|
|
8508
|
+
|
|
8476
8509
|
}, {
|
|
8477
8510
|
key: "getUnreadCount",
|
|
8478
8511
|
value: function () {
|
|
@@ -8503,6 +8536,44 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8503
8536
|
|
|
8504
8537
|
return getUnreadCount;
|
|
8505
8538
|
}()
|
|
8539
|
+
/**
|
|
8540
|
+
* getUnreadCountBatch - Returns unread counts for multiple users at once. Only works server side.
|
|
8541
|
+
*
|
|
8542
|
+
* @param {string[]} [userIDs] List of user IDs to fetch unread counts for.
|
|
8543
|
+
*
|
|
8544
|
+
* @return {<GetUnreadCountBatchAPIResponse>}
|
|
8545
|
+
*/
|
|
8546
|
+
|
|
8547
|
+
}, {
|
|
8548
|
+
key: "getUnreadCountBatch",
|
|
8549
|
+
value: function () {
|
|
8550
|
+
var _getUnreadCountBatch = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee25(userIDs) {
|
|
8551
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee25$(_context25) {
|
|
8552
|
+
while (1) {
|
|
8553
|
+
switch (_context25.prev = _context25.next) {
|
|
8554
|
+
case 0:
|
|
8555
|
+
_context25.next = 2;
|
|
8556
|
+
return this.post(this.baseURL + '/unread_batch', {
|
|
8557
|
+
user_ids: userIDs
|
|
8558
|
+
});
|
|
8559
|
+
|
|
8560
|
+
case 2:
|
|
8561
|
+
return _context25.abrupt("return", _context25.sent);
|
|
8562
|
+
|
|
8563
|
+
case 3:
|
|
8564
|
+
case "end":
|
|
8565
|
+
return _context25.stop();
|
|
8566
|
+
}
|
|
8567
|
+
}
|
|
8568
|
+
}, _callee25, this);
|
|
8569
|
+
}));
|
|
8570
|
+
|
|
8571
|
+
function getUnreadCountBatch(_x26) {
|
|
8572
|
+
return _getUnreadCountBatch.apply(this, arguments);
|
|
8573
|
+
}
|
|
8574
|
+
|
|
8575
|
+
return getUnreadCountBatch;
|
|
8576
|
+
}()
|
|
8506
8577
|
/**
|
|
8507
8578
|
* removeDevice - Removes the device with the given id. Clientside users can only delete their own devices
|
|
8508
8579
|
*
|
|
@@ -8514,12 +8585,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8514
8585
|
}, {
|
|
8515
8586
|
key: "removeDevice",
|
|
8516
8587
|
value: function () {
|
|
8517
|
-
var _removeDevice = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8518
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8588
|
+
var _removeDevice = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee26(id, userID) {
|
|
8589
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee26$(_context26) {
|
|
8519
8590
|
while (1) {
|
|
8520
|
-
switch (
|
|
8591
|
+
switch (_context26.prev = _context26.next) {
|
|
8521
8592
|
case 0:
|
|
8522
|
-
|
|
8593
|
+
_context26.next = 2;
|
|
8523
8594
|
return this.delete(this.baseURL + '/devices', _objectSpread({
|
|
8524
8595
|
id: id
|
|
8525
8596
|
}, userID ? {
|
|
@@ -8527,17 +8598,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8527
8598
|
} : {}));
|
|
8528
8599
|
|
|
8529
8600
|
case 2:
|
|
8530
|
-
return
|
|
8601
|
+
return _context26.abrupt("return", _context26.sent);
|
|
8531
8602
|
|
|
8532
8603
|
case 3:
|
|
8533
8604
|
case "end":
|
|
8534
|
-
return
|
|
8605
|
+
return _context26.stop();
|
|
8535
8606
|
}
|
|
8536
8607
|
}
|
|
8537
|
-
},
|
|
8608
|
+
}, _callee26, this);
|
|
8538
8609
|
}));
|
|
8539
8610
|
|
|
8540
|
-
function removeDevice(
|
|
8611
|
+
function removeDevice(_x27, _x28) {
|
|
8541
8612
|
return _removeDevice.apply(this, arguments);
|
|
8542
8613
|
}
|
|
8543
8614
|
|
|
@@ -8554,15 +8625,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8554
8625
|
}, {
|
|
8555
8626
|
key: "getRateLimits",
|
|
8556
8627
|
value: function () {
|
|
8557
|
-
var _getRateLimits = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8628
|
+
var _getRateLimits = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee27(params) {
|
|
8558
8629
|
var _ref7, serverSide, web, android, ios, endpoints;
|
|
8559
8630
|
|
|
8560
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8631
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee27$(_context27) {
|
|
8561
8632
|
while (1) {
|
|
8562
|
-
switch (
|
|
8633
|
+
switch (_context27.prev = _context27.next) {
|
|
8563
8634
|
case 0:
|
|
8564
8635
|
_ref7 = params || {}, serverSide = _ref7.serverSide, web = _ref7.web, android = _ref7.android, ios = _ref7.ios, endpoints = _ref7.endpoints;
|
|
8565
|
-
return
|
|
8636
|
+
return _context27.abrupt("return", this.get(this.baseURL + '/rate_limits', {
|
|
8566
8637
|
server_side: serverSide,
|
|
8567
8638
|
web: web,
|
|
8568
8639
|
android: android,
|
|
@@ -8572,13 +8643,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8572
8643
|
|
|
8573
8644
|
case 2:
|
|
8574
8645
|
case "end":
|
|
8575
|
-
return
|
|
8646
|
+
return _context27.stop();
|
|
8576
8647
|
}
|
|
8577
8648
|
}
|
|
8578
|
-
},
|
|
8649
|
+
}, _callee27, this);
|
|
8579
8650
|
}));
|
|
8580
8651
|
|
|
8581
|
-
function getRateLimits(
|
|
8652
|
+
function getRateLimits(_x29) {
|
|
8582
8653
|
return _getRateLimits.apply(this, arguments);
|
|
8583
8654
|
}
|
|
8584
8655
|
|
|
@@ -8669,26 +8740,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8669
8740
|
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>} list of updated users
|
|
8670
8741
|
*/
|
|
8671
8742
|
function () {
|
|
8672
|
-
var _partialUpdateUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8673
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8743
|
+
var _partialUpdateUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee28(partialUserObject) {
|
|
8744
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee28$(_context28) {
|
|
8674
8745
|
while (1) {
|
|
8675
|
-
switch (
|
|
8746
|
+
switch (_context28.prev = _context28.next) {
|
|
8676
8747
|
case 0:
|
|
8677
|
-
|
|
8748
|
+
_context28.next = 2;
|
|
8678
8749
|
return this.partialUpdateUsers([partialUserObject]);
|
|
8679
8750
|
|
|
8680
8751
|
case 2:
|
|
8681
|
-
return
|
|
8752
|
+
return _context28.abrupt("return", _context28.sent);
|
|
8682
8753
|
|
|
8683
8754
|
case 3:
|
|
8684
8755
|
case "end":
|
|
8685
|
-
return
|
|
8756
|
+
return _context28.stop();
|
|
8686
8757
|
}
|
|
8687
8758
|
}
|
|
8688
|
-
},
|
|
8759
|
+
}, _callee28, this);
|
|
8689
8760
|
}));
|
|
8690
8761
|
|
|
8691
|
-
function partialUpdateUser(
|
|
8762
|
+
function partialUpdateUser(_x30) {
|
|
8692
8763
|
return _partialUpdateUser.apply(this, arguments);
|
|
8693
8764
|
}
|
|
8694
8765
|
|
|
@@ -8705,29 +8776,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8705
8776
|
}, {
|
|
8706
8777
|
key: "upsertUsers",
|
|
8707
8778
|
value: function () {
|
|
8708
|
-
var _upsertUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8779
|
+
var _upsertUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee29(users) {
|
|
8709
8780
|
var userMap, _iterator4, _step4, userObject;
|
|
8710
8781
|
|
|
8711
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8782
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee29$(_context29) {
|
|
8712
8783
|
while (1) {
|
|
8713
|
-
switch (
|
|
8784
|
+
switch (_context29.prev = _context29.next) {
|
|
8714
8785
|
case 0:
|
|
8715
8786
|
userMap = {};
|
|
8716
8787
|
_iterator4 = _createForOfIteratorHelper(users);
|
|
8717
|
-
|
|
8788
|
+
_context29.prev = 2;
|
|
8718
8789
|
|
|
8719
8790
|
_iterator4.s();
|
|
8720
8791
|
|
|
8721
8792
|
case 4:
|
|
8722
8793
|
if ((_step4 = _iterator4.n()).done) {
|
|
8723
|
-
|
|
8794
|
+
_context29.next = 11;
|
|
8724
8795
|
break;
|
|
8725
8796
|
}
|
|
8726
8797
|
|
|
8727
8798
|
userObject = _step4.value;
|
|
8728
8799
|
|
|
8729
8800
|
if (userObject.id) {
|
|
8730
|
-
|
|
8801
|
+
_context29.next = 8;
|
|
8731
8802
|
break;
|
|
8732
8803
|
}
|
|
8733
8804
|
|
|
@@ -8737,44 +8808,44 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8737
8808
|
userMap[userObject.id] = userObject;
|
|
8738
8809
|
|
|
8739
8810
|
case 9:
|
|
8740
|
-
|
|
8811
|
+
_context29.next = 4;
|
|
8741
8812
|
break;
|
|
8742
8813
|
|
|
8743
8814
|
case 11:
|
|
8744
|
-
|
|
8815
|
+
_context29.next = 16;
|
|
8745
8816
|
break;
|
|
8746
8817
|
|
|
8747
8818
|
case 13:
|
|
8748
|
-
|
|
8749
|
-
|
|
8819
|
+
_context29.prev = 13;
|
|
8820
|
+
_context29.t0 = _context29["catch"](2);
|
|
8750
8821
|
|
|
8751
|
-
_iterator4.e(
|
|
8822
|
+
_iterator4.e(_context29.t0);
|
|
8752
8823
|
|
|
8753
8824
|
case 16:
|
|
8754
|
-
|
|
8825
|
+
_context29.prev = 16;
|
|
8755
8826
|
|
|
8756
8827
|
_iterator4.f();
|
|
8757
8828
|
|
|
8758
|
-
return
|
|
8829
|
+
return _context29.finish(16);
|
|
8759
8830
|
|
|
8760
8831
|
case 19:
|
|
8761
|
-
|
|
8832
|
+
_context29.next = 21;
|
|
8762
8833
|
return this.post(this.baseURL + '/users', {
|
|
8763
8834
|
users: userMap
|
|
8764
8835
|
});
|
|
8765
8836
|
|
|
8766
8837
|
case 21:
|
|
8767
|
-
return
|
|
8838
|
+
return _context29.abrupt("return", _context29.sent);
|
|
8768
8839
|
|
|
8769
8840
|
case 22:
|
|
8770
8841
|
case "end":
|
|
8771
|
-
return
|
|
8842
|
+
return _context29.stop();
|
|
8772
8843
|
}
|
|
8773
8844
|
}
|
|
8774
|
-
},
|
|
8845
|
+
}, _callee29, this, [[2, 13, 16, 19]]);
|
|
8775
8846
|
}));
|
|
8776
8847
|
|
|
8777
|
-
function upsertUsers(
|
|
8848
|
+
function upsertUsers(_x31) {
|
|
8778
8849
|
return _upsertUsers.apply(this, arguments);
|
|
8779
8850
|
}
|
|
8780
8851
|
|
|
@@ -8822,72 +8893,72 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8822
8893
|
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
|
|
8823
8894
|
*/
|
|
8824
8895
|
function () {
|
|
8825
|
-
var _partialUpdateUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8896
|
+
var _partialUpdateUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee30(users) {
|
|
8826
8897
|
var _iterator5, _step5, userObject;
|
|
8827
8898
|
|
|
8828
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8899
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee30$(_context30) {
|
|
8829
8900
|
while (1) {
|
|
8830
|
-
switch (
|
|
8901
|
+
switch (_context30.prev = _context30.next) {
|
|
8831
8902
|
case 0:
|
|
8832
8903
|
_iterator5 = _createForOfIteratorHelper(users);
|
|
8833
|
-
|
|
8904
|
+
_context30.prev = 1;
|
|
8834
8905
|
|
|
8835
8906
|
_iterator5.s();
|
|
8836
8907
|
|
|
8837
8908
|
case 3:
|
|
8838
8909
|
if ((_step5 = _iterator5.n()).done) {
|
|
8839
|
-
|
|
8910
|
+
_context30.next = 9;
|
|
8840
8911
|
break;
|
|
8841
8912
|
}
|
|
8842
8913
|
|
|
8843
8914
|
userObject = _step5.value;
|
|
8844
8915
|
|
|
8845
8916
|
if (userObject.id) {
|
|
8846
|
-
|
|
8917
|
+
_context30.next = 7;
|
|
8847
8918
|
break;
|
|
8848
8919
|
}
|
|
8849
8920
|
|
|
8850
8921
|
throw Error('User ID is required when updating a user');
|
|
8851
8922
|
|
|
8852
8923
|
case 7:
|
|
8853
|
-
|
|
8924
|
+
_context30.next = 3;
|
|
8854
8925
|
break;
|
|
8855
8926
|
|
|
8856
8927
|
case 9:
|
|
8857
|
-
|
|
8928
|
+
_context30.next = 14;
|
|
8858
8929
|
break;
|
|
8859
8930
|
|
|
8860
8931
|
case 11:
|
|
8861
|
-
|
|
8862
|
-
|
|
8932
|
+
_context30.prev = 11;
|
|
8933
|
+
_context30.t0 = _context30["catch"](1);
|
|
8863
8934
|
|
|
8864
|
-
_iterator5.e(
|
|
8935
|
+
_iterator5.e(_context30.t0);
|
|
8865
8936
|
|
|
8866
8937
|
case 14:
|
|
8867
|
-
|
|
8938
|
+
_context30.prev = 14;
|
|
8868
8939
|
|
|
8869
8940
|
_iterator5.f();
|
|
8870
8941
|
|
|
8871
|
-
return
|
|
8942
|
+
return _context30.finish(14);
|
|
8872
8943
|
|
|
8873
8944
|
case 17:
|
|
8874
|
-
|
|
8945
|
+
_context30.next = 19;
|
|
8875
8946
|
return this.patch(this.baseURL + '/users', {
|
|
8876
8947
|
users: users
|
|
8877
8948
|
});
|
|
8878
8949
|
|
|
8879
8950
|
case 19:
|
|
8880
|
-
return
|
|
8951
|
+
return _context30.abrupt("return", _context30.sent);
|
|
8881
8952
|
|
|
8882
8953
|
case 20:
|
|
8883
8954
|
case "end":
|
|
8884
|
-
return
|
|
8955
|
+
return _context30.stop();
|
|
8885
8956
|
}
|
|
8886
8957
|
}
|
|
8887
|
-
},
|
|
8958
|
+
}, _callee30, this, [[1, 11, 14, 17]]);
|
|
8888
8959
|
}));
|
|
8889
8960
|
|
|
8890
|
-
function partialUpdateUsers(
|
|
8961
|
+
function partialUpdateUsers(_x32) {
|
|
8891
8962
|
return _partialUpdateUsers.apply(this, arguments);
|
|
8892
8963
|
}
|
|
8893
8964
|
|
|
@@ -8896,26 +8967,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8896
8967
|
}, {
|
|
8897
8968
|
key: "deleteUser",
|
|
8898
8969
|
value: function () {
|
|
8899
|
-
var _deleteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8900
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8970
|
+
var _deleteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee31(userID, params) {
|
|
8971
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee31$(_context31) {
|
|
8901
8972
|
while (1) {
|
|
8902
|
-
switch (
|
|
8973
|
+
switch (_context31.prev = _context31.next) {
|
|
8903
8974
|
case 0:
|
|
8904
|
-
|
|
8975
|
+
_context31.next = 2;
|
|
8905
8976
|
return this.delete(this.baseURL + "/users/".concat(userID), params);
|
|
8906
8977
|
|
|
8907
8978
|
case 2:
|
|
8908
|
-
return
|
|
8979
|
+
return _context31.abrupt("return", _context31.sent);
|
|
8909
8980
|
|
|
8910
8981
|
case 3:
|
|
8911
8982
|
case "end":
|
|
8912
|
-
return
|
|
8983
|
+
return _context31.stop();
|
|
8913
8984
|
}
|
|
8914
8985
|
}
|
|
8915
|
-
},
|
|
8986
|
+
}, _callee31, this);
|
|
8916
8987
|
}));
|
|
8917
8988
|
|
|
8918
|
-
function deleteUser(
|
|
8989
|
+
function deleteUser(_x33, _x34) {
|
|
8919
8990
|
return _deleteUser.apply(this, arguments);
|
|
8920
8991
|
}
|
|
8921
8992
|
|
|
@@ -8932,28 +9003,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8932
9003
|
}, {
|
|
8933
9004
|
key: "restoreUsers",
|
|
8934
9005
|
value: function () {
|
|
8935
|
-
var _restoreUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8936
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9006
|
+
var _restoreUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee32(user_ids) {
|
|
9007
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee32$(_context32) {
|
|
8937
9008
|
while (1) {
|
|
8938
|
-
switch (
|
|
9009
|
+
switch (_context32.prev = _context32.next) {
|
|
8939
9010
|
case 0:
|
|
8940
|
-
|
|
9011
|
+
_context32.next = 2;
|
|
8941
9012
|
return this.post(this.baseURL + "/users/restore", {
|
|
8942
9013
|
user_ids: user_ids
|
|
8943
9014
|
});
|
|
8944
9015
|
|
|
8945
9016
|
case 2:
|
|
8946
|
-
return
|
|
9017
|
+
return _context32.abrupt("return", _context32.sent);
|
|
8947
9018
|
|
|
8948
9019
|
case 3:
|
|
8949
9020
|
case "end":
|
|
8950
|
-
return
|
|
9021
|
+
return _context32.stop();
|
|
8951
9022
|
}
|
|
8952
9023
|
}
|
|
8953
|
-
},
|
|
9024
|
+
}, _callee32, this);
|
|
8954
9025
|
}));
|
|
8955
9026
|
|
|
8956
|
-
function restoreUsers(
|
|
9027
|
+
function restoreUsers(_x35) {
|
|
8957
9028
|
return _restoreUsers.apply(this, arguments);
|
|
8958
9029
|
}
|
|
8959
9030
|
|
|
@@ -8971,26 +9042,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8971
9042
|
}, {
|
|
8972
9043
|
key: "reactivateUser",
|
|
8973
9044
|
value: function () {
|
|
8974
|
-
var _reactivateUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8975
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9045
|
+
var _reactivateUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee33(userID, options) {
|
|
9046
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee33$(_context33) {
|
|
8976
9047
|
while (1) {
|
|
8977
|
-
switch (
|
|
9048
|
+
switch (_context33.prev = _context33.next) {
|
|
8978
9049
|
case 0:
|
|
8979
|
-
|
|
9050
|
+
_context33.next = 2;
|
|
8980
9051
|
return this.post(this.baseURL + "/users/".concat(userID, "/reactivate"), _objectSpread({}, options));
|
|
8981
9052
|
|
|
8982
9053
|
case 2:
|
|
8983
|
-
return
|
|
9054
|
+
return _context33.abrupt("return", _context33.sent);
|
|
8984
9055
|
|
|
8985
9056
|
case 3:
|
|
8986
9057
|
case "end":
|
|
8987
|
-
return
|
|
9058
|
+
return _context33.stop();
|
|
8988
9059
|
}
|
|
8989
9060
|
}
|
|
8990
|
-
},
|
|
9061
|
+
}, _callee33, this);
|
|
8991
9062
|
}));
|
|
8992
9063
|
|
|
8993
|
-
function reactivateUser(
|
|
9064
|
+
function reactivateUser(_x36, _x37) {
|
|
8994
9065
|
return _reactivateUser.apply(this, arguments);
|
|
8995
9066
|
}
|
|
8996
9067
|
|
|
@@ -9008,28 +9079,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9008
9079
|
}, {
|
|
9009
9080
|
key: "reactivateUsers",
|
|
9010
9081
|
value: function () {
|
|
9011
|
-
var _reactivateUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9012
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9082
|
+
var _reactivateUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee34(user_ids, options) {
|
|
9083
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee34$(_context34) {
|
|
9013
9084
|
while (1) {
|
|
9014
|
-
switch (
|
|
9085
|
+
switch (_context34.prev = _context34.next) {
|
|
9015
9086
|
case 0:
|
|
9016
|
-
|
|
9087
|
+
_context34.next = 2;
|
|
9017
9088
|
return this.post(this.baseURL + "/users/reactivate", _objectSpread({
|
|
9018
9089
|
user_ids: user_ids
|
|
9019
9090
|
}, options));
|
|
9020
9091
|
|
|
9021
9092
|
case 2:
|
|
9022
|
-
return
|
|
9093
|
+
return _context34.abrupt("return", _context34.sent);
|
|
9023
9094
|
|
|
9024
9095
|
case 3:
|
|
9025
9096
|
case "end":
|
|
9026
|
-
return
|
|
9097
|
+
return _context34.stop();
|
|
9027
9098
|
}
|
|
9028
9099
|
}
|
|
9029
|
-
},
|
|
9100
|
+
}, _callee34, this);
|
|
9030
9101
|
}));
|
|
9031
9102
|
|
|
9032
|
-
function reactivateUsers(
|
|
9103
|
+
function reactivateUsers(_x38, _x39) {
|
|
9033
9104
|
return _reactivateUsers.apply(this, arguments);
|
|
9034
9105
|
}
|
|
9035
9106
|
|
|
@@ -9047,26 +9118,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9047
9118
|
}, {
|
|
9048
9119
|
key: "deactivateUser",
|
|
9049
9120
|
value: function () {
|
|
9050
|
-
var _deactivateUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9051
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9121
|
+
var _deactivateUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee35(userID, options) {
|
|
9122
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee35$(_context35) {
|
|
9052
9123
|
while (1) {
|
|
9053
|
-
switch (
|
|
9124
|
+
switch (_context35.prev = _context35.next) {
|
|
9054
9125
|
case 0:
|
|
9055
|
-
|
|
9126
|
+
_context35.next = 2;
|
|
9056
9127
|
return this.post(this.baseURL + "/users/".concat(userID, "/deactivate"), _objectSpread({}, options));
|
|
9057
9128
|
|
|
9058
9129
|
case 2:
|
|
9059
|
-
return
|
|
9130
|
+
return _context35.abrupt("return", _context35.sent);
|
|
9060
9131
|
|
|
9061
9132
|
case 3:
|
|
9062
9133
|
case "end":
|
|
9063
|
-
return
|
|
9134
|
+
return _context35.stop();
|
|
9064
9135
|
}
|
|
9065
9136
|
}
|
|
9066
|
-
},
|
|
9137
|
+
}, _callee35, this);
|
|
9067
9138
|
}));
|
|
9068
9139
|
|
|
9069
|
-
function deactivateUser(
|
|
9140
|
+
function deactivateUser(_x40, _x41) {
|
|
9070
9141
|
return _deactivateUser.apply(this, arguments);
|
|
9071
9142
|
}
|
|
9072
9143
|
|
|
@@ -9084,28 +9155,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9084
9155
|
}, {
|
|
9085
9156
|
key: "deactivateUsers",
|
|
9086
9157
|
value: function () {
|
|
9087
|
-
var _deactivateUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9088
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9158
|
+
var _deactivateUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee36(user_ids, options) {
|
|
9159
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee36$(_context36) {
|
|
9089
9160
|
while (1) {
|
|
9090
|
-
switch (
|
|
9161
|
+
switch (_context36.prev = _context36.next) {
|
|
9091
9162
|
case 0:
|
|
9092
|
-
|
|
9163
|
+
_context36.next = 2;
|
|
9093
9164
|
return this.post(this.baseURL + "/users/deactivate", _objectSpread({
|
|
9094
9165
|
user_ids: user_ids
|
|
9095
9166
|
}, options));
|
|
9096
9167
|
|
|
9097
9168
|
case 2:
|
|
9098
|
-
return
|
|
9169
|
+
return _context36.abrupt("return", _context36.sent);
|
|
9099
9170
|
|
|
9100
9171
|
case 3:
|
|
9101
9172
|
case "end":
|
|
9102
|
-
return
|
|
9173
|
+
return _context36.stop();
|
|
9103
9174
|
}
|
|
9104
9175
|
}
|
|
9105
|
-
},
|
|
9176
|
+
}, _callee36, this);
|
|
9106
9177
|
}));
|
|
9107
9178
|
|
|
9108
|
-
function deactivateUsers(
|
|
9179
|
+
function deactivateUsers(_x42, _x43) {
|
|
9109
9180
|
return _deactivateUsers.apply(this, arguments);
|
|
9110
9181
|
}
|
|
9111
9182
|
|
|
@@ -9114,26 +9185,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9114
9185
|
}, {
|
|
9115
9186
|
key: "exportUser",
|
|
9116
9187
|
value: function () {
|
|
9117
|
-
var _exportUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9118
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9188
|
+
var _exportUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee37(userID, options) {
|
|
9189
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee37$(_context37) {
|
|
9119
9190
|
while (1) {
|
|
9120
|
-
switch (
|
|
9191
|
+
switch (_context37.prev = _context37.next) {
|
|
9121
9192
|
case 0:
|
|
9122
|
-
|
|
9193
|
+
_context37.next = 2;
|
|
9123
9194
|
return this.get(this.baseURL + "/users/".concat(userID, "/export"), _objectSpread({}, options));
|
|
9124
9195
|
|
|
9125
9196
|
case 2:
|
|
9126
|
-
return
|
|
9197
|
+
return _context37.abrupt("return", _context37.sent);
|
|
9127
9198
|
|
|
9128
9199
|
case 3:
|
|
9129
9200
|
case "end":
|
|
9130
|
-
return
|
|
9201
|
+
return _context37.stop();
|
|
9131
9202
|
}
|
|
9132
9203
|
}
|
|
9133
|
-
},
|
|
9204
|
+
}, _callee37, this);
|
|
9134
9205
|
}));
|
|
9135
9206
|
|
|
9136
|
-
function exportUser(
|
|
9207
|
+
function exportUser(_x44, _x45) {
|
|
9137
9208
|
return _exportUser.apply(this, arguments);
|
|
9138
9209
|
}
|
|
9139
9210
|
|
|
@@ -9149,28 +9220,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9149
9220
|
}, {
|
|
9150
9221
|
key: "banUser",
|
|
9151
9222
|
value: function () {
|
|
9152
|
-
var _banUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9153
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9223
|
+
var _banUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee38(targetUserID, options) {
|
|
9224
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee38$(_context38) {
|
|
9154
9225
|
while (1) {
|
|
9155
|
-
switch (
|
|
9226
|
+
switch (_context38.prev = _context38.next) {
|
|
9156
9227
|
case 0:
|
|
9157
|
-
|
|
9228
|
+
_context38.next = 2;
|
|
9158
9229
|
return this.post(this.baseURL + '/moderation/ban', _objectSpread({
|
|
9159
9230
|
target_user_id: targetUserID
|
|
9160
9231
|
}, options));
|
|
9161
9232
|
|
|
9162
9233
|
case 2:
|
|
9163
|
-
return
|
|
9234
|
+
return _context38.abrupt("return", _context38.sent);
|
|
9164
9235
|
|
|
9165
9236
|
case 3:
|
|
9166
9237
|
case "end":
|
|
9167
|
-
return
|
|
9238
|
+
return _context38.stop();
|
|
9168
9239
|
}
|
|
9169
9240
|
}
|
|
9170
|
-
},
|
|
9241
|
+
}, _callee38, this);
|
|
9171
9242
|
}));
|
|
9172
9243
|
|
|
9173
|
-
function banUser(
|
|
9244
|
+
function banUser(_x46, _x47) {
|
|
9174
9245
|
return _banUser.apply(this, arguments);
|
|
9175
9246
|
}
|
|
9176
9247
|
|
|
@@ -9186,28 +9257,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9186
9257
|
}, {
|
|
9187
9258
|
key: "unbanUser",
|
|
9188
9259
|
value: function () {
|
|
9189
|
-
var _unbanUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9190
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9260
|
+
var _unbanUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee39(targetUserID, options) {
|
|
9261
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee39$(_context39) {
|
|
9191
9262
|
while (1) {
|
|
9192
|
-
switch (
|
|
9263
|
+
switch (_context39.prev = _context39.next) {
|
|
9193
9264
|
case 0:
|
|
9194
|
-
|
|
9265
|
+
_context39.next = 2;
|
|
9195
9266
|
return this.delete(this.baseURL + '/moderation/ban', _objectSpread({
|
|
9196
9267
|
target_user_id: targetUserID
|
|
9197
9268
|
}, options));
|
|
9198
9269
|
|
|
9199
9270
|
case 2:
|
|
9200
|
-
return
|
|
9271
|
+
return _context39.abrupt("return", _context39.sent);
|
|
9201
9272
|
|
|
9202
9273
|
case 3:
|
|
9203
9274
|
case "end":
|
|
9204
|
-
return
|
|
9275
|
+
return _context39.stop();
|
|
9205
9276
|
}
|
|
9206
9277
|
}
|
|
9207
|
-
},
|
|
9278
|
+
}, _callee39, this);
|
|
9208
9279
|
}));
|
|
9209
9280
|
|
|
9210
|
-
function unbanUser(
|
|
9281
|
+
function unbanUser(_x48, _x49) {
|
|
9211
9282
|
return _unbanUser.apply(this, arguments);
|
|
9212
9283
|
}
|
|
9213
9284
|
|
|
@@ -9223,28 +9294,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9223
9294
|
}, {
|
|
9224
9295
|
key: "shadowBan",
|
|
9225
9296
|
value: function () {
|
|
9226
|
-
var _shadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9227
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9297
|
+
var _shadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee40(targetUserID, options) {
|
|
9298
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee40$(_context40) {
|
|
9228
9299
|
while (1) {
|
|
9229
|
-
switch (
|
|
9300
|
+
switch (_context40.prev = _context40.next) {
|
|
9230
9301
|
case 0:
|
|
9231
|
-
|
|
9302
|
+
_context40.next = 2;
|
|
9232
9303
|
return this.banUser(targetUserID, _objectSpread({
|
|
9233
9304
|
shadow: true
|
|
9234
9305
|
}, options));
|
|
9235
9306
|
|
|
9236
9307
|
case 2:
|
|
9237
|
-
return
|
|
9308
|
+
return _context40.abrupt("return", _context40.sent);
|
|
9238
9309
|
|
|
9239
9310
|
case 3:
|
|
9240
9311
|
case "end":
|
|
9241
|
-
return
|
|
9312
|
+
return _context40.stop();
|
|
9242
9313
|
}
|
|
9243
9314
|
}
|
|
9244
|
-
},
|
|
9315
|
+
}, _callee40, this);
|
|
9245
9316
|
}));
|
|
9246
9317
|
|
|
9247
|
-
function shadowBan(
|
|
9318
|
+
function shadowBan(_x50, _x51) {
|
|
9248
9319
|
return _shadowBan.apply(this, arguments);
|
|
9249
9320
|
}
|
|
9250
9321
|
|
|
@@ -9260,28 +9331,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9260
9331
|
}, {
|
|
9261
9332
|
key: "removeShadowBan",
|
|
9262
9333
|
value: function () {
|
|
9263
|
-
var _removeShadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9264
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9334
|
+
var _removeShadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee41(targetUserID, options) {
|
|
9335
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee41$(_context41) {
|
|
9265
9336
|
while (1) {
|
|
9266
|
-
switch (
|
|
9337
|
+
switch (_context41.prev = _context41.next) {
|
|
9267
9338
|
case 0:
|
|
9268
|
-
|
|
9339
|
+
_context41.next = 2;
|
|
9269
9340
|
return this.unbanUser(targetUserID, _objectSpread({
|
|
9270
9341
|
shadow: true
|
|
9271
9342
|
}, options));
|
|
9272
9343
|
|
|
9273
9344
|
case 2:
|
|
9274
|
-
return
|
|
9345
|
+
return _context41.abrupt("return", _context41.sent);
|
|
9275
9346
|
|
|
9276
9347
|
case 3:
|
|
9277
9348
|
case "end":
|
|
9278
|
-
return
|
|
9349
|
+
return _context41.stop();
|
|
9279
9350
|
}
|
|
9280
9351
|
}
|
|
9281
|
-
},
|
|
9352
|
+
}, _callee41, this);
|
|
9282
9353
|
}));
|
|
9283
9354
|
|
|
9284
|
-
function removeShadowBan(
|
|
9355
|
+
function removeShadowBan(_x52, _x53) {
|
|
9285
9356
|
return _removeShadowBan.apply(this, arguments);
|
|
9286
9357
|
}
|
|
9287
9358
|
|
|
@@ -9298,15 +9369,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9298
9369
|
}, {
|
|
9299
9370
|
key: "muteUser",
|
|
9300
9371
|
value: function () {
|
|
9301
|
-
var _muteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9372
|
+
var _muteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee42(targetID, userID) {
|
|
9302
9373
|
var options,
|
|
9303
|
-
|
|
9304
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9374
|
+
_args42 = arguments;
|
|
9375
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee42$(_context42) {
|
|
9305
9376
|
while (1) {
|
|
9306
|
-
switch (
|
|
9377
|
+
switch (_context42.prev = _context42.next) {
|
|
9307
9378
|
case 0:
|
|
9308
|
-
options =
|
|
9309
|
-
|
|
9379
|
+
options = _args42.length > 2 && _args42[2] !== undefined ? _args42[2] : {};
|
|
9380
|
+
_context42.next = 3;
|
|
9310
9381
|
return this.post(this.baseURL + '/moderation/mute', _objectSpread(_objectSpread({
|
|
9311
9382
|
target_id: targetID
|
|
9312
9383
|
}, userID ? {
|
|
@@ -9314,17 +9385,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9314
9385
|
} : {}), options));
|
|
9315
9386
|
|
|
9316
9387
|
case 3:
|
|
9317
|
-
return
|
|
9388
|
+
return _context42.abrupt("return", _context42.sent);
|
|
9318
9389
|
|
|
9319
9390
|
case 4:
|
|
9320
9391
|
case "end":
|
|
9321
|
-
return
|
|
9392
|
+
return _context42.stop();
|
|
9322
9393
|
}
|
|
9323
9394
|
}
|
|
9324
|
-
},
|
|
9395
|
+
}, _callee42, this);
|
|
9325
9396
|
}));
|
|
9326
9397
|
|
|
9327
|
-
function muteUser(
|
|
9398
|
+
function muteUser(_x54, _x55) {
|
|
9328
9399
|
return _muteUser.apply(this, arguments);
|
|
9329
9400
|
}
|
|
9330
9401
|
|
|
@@ -9340,12 +9411,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9340
9411
|
}, {
|
|
9341
9412
|
key: "unmuteUser",
|
|
9342
9413
|
value: function () {
|
|
9343
|
-
var _unmuteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9344
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9414
|
+
var _unmuteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee43(targetID, currentUserID) {
|
|
9415
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee43$(_context43) {
|
|
9345
9416
|
while (1) {
|
|
9346
|
-
switch (
|
|
9417
|
+
switch (_context43.prev = _context43.next) {
|
|
9347
9418
|
case 0:
|
|
9348
|
-
|
|
9419
|
+
_context43.next = 2;
|
|
9349
9420
|
return this.post(this.baseURL + '/moderation/unmute', _objectSpread({
|
|
9350
9421
|
target_id: targetID
|
|
9351
9422
|
}, currentUserID ? {
|
|
@@ -9353,17 +9424,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9353
9424
|
} : {}));
|
|
9354
9425
|
|
|
9355
9426
|
case 2:
|
|
9356
|
-
return
|
|
9427
|
+
return _context43.abrupt("return", _context43.sent);
|
|
9357
9428
|
|
|
9358
9429
|
case 3:
|
|
9359
9430
|
case "end":
|
|
9360
|
-
return
|
|
9431
|
+
return _context43.stop();
|
|
9361
9432
|
}
|
|
9362
9433
|
}
|
|
9363
|
-
},
|
|
9434
|
+
}, _callee43, this);
|
|
9364
9435
|
}));
|
|
9365
9436
|
|
|
9366
|
-
function unmuteUser(
|
|
9437
|
+
function unmuteUser(_x56, _x57) {
|
|
9367
9438
|
return _unmuteUser.apply(this, arguments);
|
|
9368
9439
|
}
|
|
9369
9440
|
|
|
@@ -9398,31 +9469,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9398
9469
|
}, {
|
|
9399
9470
|
key: "flagMessage",
|
|
9400
9471
|
value: function () {
|
|
9401
|
-
var _flagMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9472
|
+
var _flagMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee44(targetMessageID) {
|
|
9402
9473
|
var options,
|
|
9403
|
-
|
|
9404
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9474
|
+
_args44 = arguments;
|
|
9475
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee44$(_context44) {
|
|
9405
9476
|
while (1) {
|
|
9406
|
-
switch (
|
|
9477
|
+
switch (_context44.prev = _context44.next) {
|
|
9407
9478
|
case 0:
|
|
9408
|
-
options =
|
|
9409
|
-
|
|
9479
|
+
options = _args44.length > 1 && _args44[1] !== undefined ? _args44[1] : {};
|
|
9480
|
+
_context44.next = 3;
|
|
9410
9481
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
9411
9482
|
target_message_id: targetMessageID
|
|
9412
9483
|
}, options));
|
|
9413
9484
|
|
|
9414
9485
|
case 3:
|
|
9415
|
-
return
|
|
9486
|
+
return _context44.abrupt("return", _context44.sent);
|
|
9416
9487
|
|
|
9417
9488
|
case 4:
|
|
9418
9489
|
case "end":
|
|
9419
|
-
return
|
|
9490
|
+
return _context44.stop();
|
|
9420
9491
|
}
|
|
9421
9492
|
}
|
|
9422
|
-
},
|
|
9493
|
+
}, _callee44, this);
|
|
9423
9494
|
}));
|
|
9424
9495
|
|
|
9425
|
-
function flagMessage(
|
|
9496
|
+
function flagMessage(_x58) {
|
|
9426
9497
|
return _flagMessage.apply(this, arguments);
|
|
9427
9498
|
}
|
|
9428
9499
|
|
|
@@ -9438,31 +9509,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9438
9509
|
}, {
|
|
9439
9510
|
key: "flagUser",
|
|
9440
9511
|
value: function () {
|
|
9441
|
-
var _flagUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9512
|
+
var _flagUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee45(targetID) {
|
|
9442
9513
|
var options,
|
|
9443
|
-
|
|
9444
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9514
|
+
_args45 = arguments;
|
|
9515
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee45$(_context45) {
|
|
9445
9516
|
while (1) {
|
|
9446
|
-
switch (
|
|
9517
|
+
switch (_context45.prev = _context45.next) {
|
|
9447
9518
|
case 0:
|
|
9448
|
-
options =
|
|
9449
|
-
|
|
9519
|
+
options = _args45.length > 1 && _args45[1] !== undefined ? _args45[1] : {};
|
|
9520
|
+
_context45.next = 3;
|
|
9450
9521
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
9451
9522
|
target_user_id: targetID
|
|
9452
9523
|
}, options));
|
|
9453
9524
|
|
|
9454
9525
|
case 3:
|
|
9455
|
-
return
|
|
9526
|
+
return _context45.abrupt("return", _context45.sent);
|
|
9456
9527
|
|
|
9457
9528
|
case 4:
|
|
9458
9529
|
case "end":
|
|
9459
|
-
return
|
|
9530
|
+
return _context45.stop();
|
|
9460
9531
|
}
|
|
9461
9532
|
}
|
|
9462
|
-
},
|
|
9533
|
+
}, _callee45, this);
|
|
9463
9534
|
}));
|
|
9464
9535
|
|
|
9465
|
-
function flagUser(
|
|
9536
|
+
function flagUser(_x59) {
|
|
9466
9537
|
return _flagUser.apply(this, arguments);
|
|
9467
9538
|
}
|
|
9468
9539
|
|
|
@@ -9478,31 +9549,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9478
9549
|
}, {
|
|
9479
9550
|
key: "unflagMessage",
|
|
9480
9551
|
value: function () {
|
|
9481
|
-
var _unflagMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9552
|
+
var _unflagMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee46(targetMessageID) {
|
|
9482
9553
|
var options,
|
|
9483
|
-
|
|
9484
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9554
|
+
_args46 = arguments;
|
|
9555
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee46$(_context46) {
|
|
9485
9556
|
while (1) {
|
|
9486
|
-
switch (
|
|
9557
|
+
switch (_context46.prev = _context46.next) {
|
|
9487
9558
|
case 0:
|
|
9488
|
-
options =
|
|
9489
|
-
|
|
9559
|
+
options = _args46.length > 1 && _args46[1] !== undefined ? _args46[1] : {};
|
|
9560
|
+
_context46.next = 3;
|
|
9490
9561
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
9491
9562
|
target_message_id: targetMessageID
|
|
9492
9563
|
}, options));
|
|
9493
9564
|
|
|
9494
9565
|
case 3:
|
|
9495
|
-
return
|
|
9566
|
+
return _context46.abrupt("return", _context46.sent);
|
|
9496
9567
|
|
|
9497
9568
|
case 4:
|
|
9498
9569
|
case "end":
|
|
9499
|
-
return
|
|
9570
|
+
return _context46.stop();
|
|
9500
9571
|
}
|
|
9501
9572
|
}
|
|
9502
|
-
},
|
|
9573
|
+
}, _callee46, this);
|
|
9503
9574
|
}));
|
|
9504
9575
|
|
|
9505
|
-
function unflagMessage(
|
|
9576
|
+
function unflagMessage(_x60) {
|
|
9506
9577
|
return _unflagMessage.apply(this, arguments);
|
|
9507
9578
|
}
|
|
9508
9579
|
|
|
@@ -9518,31 +9589,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9518
9589
|
}, {
|
|
9519
9590
|
key: "unflagUser",
|
|
9520
9591
|
value: function () {
|
|
9521
|
-
var _unflagUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9592
|
+
var _unflagUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee47(targetID) {
|
|
9522
9593
|
var options,
|
|
9523
|
-
|
|
9524
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9594
|
+
_args47 = arguments;
|
|
9595
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee47$(_context47) {
|
|
9525
9596
|
while (1) {
|
|
9526
|
-
switch (
|
|
9597
|
+
switch (_context47.prev = _context47.next) {
|
|
9527
9598
|
case 0:
|
|
9528
|
-
options =
|
|
9529
|
-
|
|
9599
|
+
options = _args47.length > 1 && _args47[1] !== undefined ? _args47[1] : {};
|
|
9600
|
+
_context47.next = 3;
|
|
9530
9601
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
9531
9602
|
target_user_id: targetID
|
|
9532
9603
|
}, options));
|
|
9533
9604
|
|
|
9534
9605
|
case 3:
|
|
9535
|
-
return
|
|
9606
|
+
return _context47.abrupt("return", _context47.sent);
|
|
9536
9607
|
|
|
9537
9608
|
case 4:
|
|
9538
9609
|
case "end":
|
|
9539
|
-
return
|
|
9610
|
+
return _context47.stop();
|
|
9540
9611
|
}
|
|
9541
9612
|
}
|
|
9542
|
-
},
|
|
9613
|
+
}, _callee47, this);
|
|
9543
9614
|
}));
|
|
9544
9615
|
|
|
9545
|
-
function unflagUser(
|
|
9616
|
+
function unflagUser(_x61) {
|
|
9546
9617
|
return _unflagUser.apply(this, arguments);
|
|
9547
9618
|
}
|
|
9548
9619
|
|
|
@@ -9559,29 +9630,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9559
9630
|
}, {
|
|
9560
9631
|
key: "getCallToken",
|
|
9561
9632
|
value: function () {
|
|
9562
|
-
var _getCallToken = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9633
|
+
var _getCallToken = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee48(callID) {
|
|
9563
9634
|
var options,
|
|
9564
|
-
|
|
9565
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9635
|
+
_args48 = arguments;
|
|
9636
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee48$(_context48) {
|
|
9566
9637
|
while (1) {
|
|
9567
|
-
switch (
|
|
9638
|
+
switch (_context48.prev = _context48.next) {
|
|
9568
9639
|
case 0:
|
|
9569
|
-
options =
|
|
9570
|
-
|
|
9640
|
+
options = _args48.length > 1 && _args48[1] !== undefined ? _args48[1] : {};
|
|
9641
|
+
_context48.next = 3;
|
|
9571
9642
|
return this.post(this.baseURL + "/calls/".concat(callID), _objectSpread({}, options));
|
|
9572
9643
|
|
|
9573
9644
|
case 3:
|
|
9574
|
-
return
|
|
9645
|
+
return _context48.abrupt("return", _context48.sent);
|
|
9575
9646
|
|
|
9576
9647
|
case 4:
|
|
9577
9648
|
case "end":
|
|
9578
|
-
return
|
|
9649
|
+
return _context48.stop();
|
|
9579
9650
|
}
|
|
9580
9651
|
}
|
|
9581
|
-
},
|
|
9652
|
+
}, _callee48, this);
|
|
9582
9653
|
}));
|
|
9583
9654
|
|
|
9584
|
-
function getCallToken(
|
|
9655
|
+
function getCallToken(_x62) {
|
|
9585
9656
|
return _getCallToken.apply(this, arguments);
|
|
9586
9657
|
}
|
|
9587
9658
|
|
|
@@ -9604,30 +9675,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9604
9675
|
}, {
|
|
9605
9676
|
key: "_queryFlags",
|
|
9606
9677
|
value: function () {
|
|
9607
|
-
var _queryFlags2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9678
|
+
var _queryFlags2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee49() {
|
|
9608
9679
|
var filterConditions,
|
|
9609
9680
|
options,
|
|
9610
|
-
|
|
9611
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9681
|
+
_args49 = arguments;
|
|
9682
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee49$(_context49) {
|
|
9612
9683
|
while (1) {
|
|
9613
|
-
switch (
|
|
9684
|
+
switch (_context49.prev = _context49.next) {
|
|
9614
9685
|
case 0:
|
|
9615
|
-
filterConditions =
|
|
9616
|
-
options =
|
|
9617
|
-
|
|
9686
|
+
filterConditions = _args49.length > 0 && _args49[0] !== undefined ? _args49[0] : {};
|
|
9687
|
+
options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
|
|
9688
|
+
_context49.next = 4;
|
|
9618
9689
|
return this.post(this.baseURL + '/moderation/flags', _objectSpread({
|
|
9619
9690
|
filter_conditions: filterConditions
|
|
9620
9691
|
}, options));
|
|
9621
9692
|
|
|
9622
9693
|
case 4:
|
|
9623
|
-
return
|
|
9694
|
+
return _context49.abrupt("return", _context49.sent);
|
|
9624
9695
|
|
|
9625
9696
|
case 5:
|
|
9626
9697
|
case "end":
|
|
9627
|
-
return
|
|
9698
|
+
return _context49.stop();
|
|
9628
9699
|
}
|
|
9629
9700
|
}
|
|
9630
|
-
},
|
|
9701
|
+
}, _callee49, this);
|
|
9631
9702
|
}));
|
|
9632
9703
|
|
|
9633
9704
|
function _queryFlags() {
|
|
@@ -9653,30 +9724,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9653
9724
|
}, {
|
|
9654
9725
|
key: "_queryFlagReports",
|
|
9655
9726
|
value: function () {
|
|
9656
|
-
var _queryFlagReports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9727
|
+
var _queryFlagReports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee50() {
|
|
9657
9728
|
var filterConditions,
|
|
9658
9729
|
options,
|
|
9659
|
-
|
|
9660
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9730
|
+
_args50 = arguments;
|
|
9731
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee50$(_context50) {
|
|
9661
9732
|
while (1) {
|
|
9662
|
-
switch (
|
|
9733
|
+
switch (_context50.prev = _context50.next) {
|
|
9663
9734
|
case 0:
|
|
9664
|
-
filterConditions =
|
|
9665
|
-
options =
|
|
9666
|
-
|
|
9735
|
+
filterConditions = _args50.length > 0 && _args50[0] !== undefined ? _args50[0] : {};
|
|
9736
|
+
options = _args50.length > 1 && _args50[1] !== undefined ? _args50[1] : {};
|
|
9737
|
+
_context50.next = 4;
|
|
9667
9738
|
return this.post(this.baseURL + '/moderation/reports', _objectSpread({
|
|
9668
9739
|
filter_conditions: filterConditions
|
|
9669
9740
|
}, options));
|
|
9670
9741
|
|
|
9671
9742
|
case 4:
|
|
9672
|
-
return
|
|
9743
|
+
return _context50.abrupt("return", _context50.sent);
|
|
9673
9744
|
|
|
9674
9745
|
case 5:
|
|
9675
9746
|
case "end":
|
|
9676
|
-
return
|
|
9747
|
+
return _context50.stop();
|
|
9677
9748
|
}
|
|
9678
9749
|
}
|
|
9679
|
-
},
|
|
9750
|
+
}, _callee50, this);
|
|
9680
9751
|
}));
|
|
9681
9752
|
|
|
9682
9753
|
function _queryFlagReports() {
|
|
@@ -9703,31 +9774,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9703
9774
|
}, {
|
|
9704
9775
|
key: "_reviewFlagReport",
|
|
9705
9776
|
value: function () {
|
|
9706
|
-
var _reviewFlagReport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9777
|
+
var _reviewFlagReport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee51(id, reviewResult) {
|
|
9707
9778
|
var options,
|
|
9708
|
-
|
|
9709
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9779
|
+
_args51 = arguments;
|
|
9780
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee51$(_context51) {
|
|
9710
9781
|
while (1) {
|
|
9711
|
-
switch (
|
|
9782
|
+
switch (_context51.prev = _context51.next) {
|
|
9712
9783
|
case 0:
|
|
9713
|
-
options =
|
|
9714
|
-
|
|
9784
|
+
options = _args51.length > 2 && _args51[2] !== undefined ? _args51[2] : {};
|
|
9785
|
+
_context51.next = 3;
|
|
9715
9786
|
return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
|
|
9716
9787
|
review_result: reviewResult
|
|
9717
9788
|
}, options));
|
|
9718
9789
|
|
|
9719
9790
|
case 3:
|
|
9720
|
-
return
|
|
9791
|
+
return _context51.abrupt("return", _context51.sent);
|
|
9721
9792
|
|
|
9722
9793
|
case 4:
|
|
9723
9794
|
case "end":
|
|
9724
|
-
return
|
|
9795
|
+
return _context51.stop();
|
|
9725
9796
|
}
|
|
9726
9797
|
}
|
|
9727
|
-
},
|
|
9798
|
+
}, _callee51, this);
|
|
9728
9799
|
}));
|
|
9729
9800
|
|
|
9730
|
-
function _reviewFlagReport(
|
|
9801
|
+
function _reviewFlagReport(_x63, _x64) {
|
|
9731
9802
|
return _reviewFlagReport2.apply(this, arguments);
|
|
9732
9803
|
}
|
|
9733
9804
|
|
|
@@ -9745,31 +9816,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9745
9816
|
}, {
|
|
9746
9817
|
key: "unblockMessage",
|
|
9747
9818
|
value: function () {
|
|
9748
|
-
var _unblockMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9819
|
+
var _unblockMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee52(targetMessageID) {
|
|
9749
9820
|
var options,
|
|
9750
|
-
|
|
9751
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9821
|
+
_args52 = arguments;
|
|
9822
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee52$(_context52) {
|
|
9752
9823
|
while (1) {
|
|
9753
|
-
switch (
|
|
9824
|
+
switch (_context52.prev = _context52.next) {
|
|
9754
9825
|
case 0:
|
|
9755
|
-
options =
|
|
9756
|
-
|
|
9826
|
+
options = _args52.length > 1 && _args52[1] !== undefined ? _args52[1] : {};
|
|
9827
|
+
_context52.next = 3;
|
|
9757
9828
|
return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
|
|
9758
9829
|
target_message_id: targetMessageID
|
|
9759
9830
|
}, options));
|
|
9760
9831
|
|
|
9761
9832
|
case 3:
|
|
9762
|
-
return
|
|
9833
|
+
return _context52.abrupt("return", _context52.sent);
|
|
9763
9834
|
|
|
9764
9835
|
case 4:
|
|
9765
9836
|
case "end":
|
|
9766
|
-
return
|
|
9837
|
+
return _context52.stop();
|
|
9767
9838
|
}
|
|
9768
9839
|
}
|
|
9769
|
-
},
|
|
9840
|
+
}, _callee52, this);
|
|
9770
9841
|
}));
|
|
9771
9842
|
|
|
9772
|
-
function unblockMessage(
|
|
9843
|
+
function unblockMessage(_x65) {
|
|
9773
9844
|
return _unblockMessage.apply(this, arguments);
|
|
9774
9845
|
}
|
|
9775
9846
|
|
|
@@ -9788,23 +9859,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9788
9859
|
* @return {Promise<APIResponse>}
|
|
9789
9860
|
*/
|
|
9790
9861
|
function () {
|
|
9791
|
-
var _markChannelsRead = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9862
|
+
var _markChannelsRead = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee53() {
|
|
9792
9863
|
var data,
|
|
9793
|
-
|
|
9794
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9864
|
+
_args53 = arguments;
|
|
9865
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee53$(_context53) {
|
|
9795
9866
|
while (1) {
|
|
9796
|
-
switch (
|
|
9867
|
+
switch (_context53.prev = _context53.next) {
|
|
9797
9868
|
case 0:
|
|
9798
|
-
data =
|
|
9799
|
-
|
|
9869
|
+
data = _args53.length > 0 && _args53[0] !== undefined ? _args53[0] : {};
|
|
9870
|
+
_context53.next = 3;
|
|
9800
9871
|
return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
|
|
9801
9872
|
|
|
9802
9873
|
case 3:
|
|
9803
9874
|
case "end":
|
|
9804
|
-
return
|
|
9875
|
+
return _context53.stop();
|
|
9805
9876
|
}
|
|
9806
9877
|
}
|
|
9807
|
-
},
|
|
9878
|
+
}, _callee53, this);
|
|
9808
9879
|
}));
|
|
9809
9880
|
|
|
9810
9881
|
function markChannelsRead() {
|
|
@@ -9879,28 +9950,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9879
9950
|
}, {
|
|
9880
9951
|
key: "translateMessage",
|
|
9881
9952
|
value: function () {
|
|
9882
|
-
var _translateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9883
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9953
|
+
var _translateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee54(messageId, language) {
|
|
9954
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee54$(_context54) {
|
|
9884
9955
|
while (1) {
|
|
9885
|
-
switch (
|
|
9956
|
+
switch (_context54.prev = _context54.next) {
|
|
9886
9957
|
case 0:
|
|
9887
|
-
|
|
9958
|
+
_context54.next = 2;
|
|
9888
9959
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
|
|
9889
9960
|
language: language
|
|
9890
9961
|
});
|
|
9891
9962
|
|
|
9892
9963
|
case 2:
|
|
9893
|
-
return
|
|
9964
|
+
return _context54.abrupt("return", _context54.sent);
|
|
9894
9965
|
|
|
9895
9966
|
case 3:
|
|
9896
9967
|
case "end":
|
|
9897
|
-
return
|
|
9968
|
+
return _context54.stop();
|
|
9898
9969
|
}
|
|
9899
9970
|
}
|
|
9900
|
-
},
|
|
9971
|
+
}, _callee54, this);
|
|
9901
9972
|
}));
|
|
9902
9973
|
|
|
9903
|
-
function translateMessage(
|
|
9974
|
+
function translateMessage(_x66, _x67) {
|
|
9904
9975
|
return _translateMessage.apply(this, arguments);
|
|
9905
9976
|
}
|
|
9906
9977
|
|
|
@@ -10002,14 +10073,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10002
10073
|
}, {
|
|
10003
10074
|
key: "updateMessage",
|
|
10004
10075
|
value: function () {
|
|
10005
|
-
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10076
|
+
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee55(message, userId, options) {
|
|
10006
10077
|
var clonedMessage, reservedMessageFields;
|
|
10007
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10078
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee55$(_context55) {
|
|
10008
10079
|
while (1) {
|
|
10009
|
-
switch (
|
|
10080
|
+
switch (_context55.prev = _context55.next) {
|
|
10010
10081
|
case 0:
|
|
10011
10082
|
if (message.id) {
|
|
10012
|
-
|
|
10083
|
+
_context55.next = 2;
|
|
10013
10084
|
break;
|
|
10014
10085
|
}
|
|
10015
10086
|
|
|
@@ -10046,23 +10117,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10046
10117
|
});
|
|
10047
10118
|
}
|
|
10048
10119
|
|
|
10049
|
-
|
|
10120
|
+
_context55.next = 10;
|
|
10050
10121
|
return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
|
|
10051
10122
|
message: clonedMessage
|
|
10052
10123
|
}, options));
|
|
10053
10124
|
|
|
10054
10125
|
case 10:
|
|
10055
|
-
return
|
|
10126
|
+
return _context55.abrupt("return", _context55.sent);
|
|
10056
10127
|
|
|
10057
10128
|
case 11:
|
|
10058
10129
|
case "end":
|
|
10059
|
-
return
|
|
10130
|
+
return _context55.stop();
|
|
10060
10131
|
}
|
|
10061
10132
|
}
|
|
10062
|
-
},
|
|
10133
|
+
}, _callee55, this);
|
|
10063
10134
|
}));
|
|
10064
10135
|
|
|
10065
|
-
function updateMessage(
|
|
10136
|
+
function updateMessage(_x68, _x69, _x70) {
|
|
10066
10137
|
return _updateMessage.apply(this, arguments);
|
|
10067
10138
|
}
|
|
10068
10139
|
|
|
@@ -10085,14 +10156,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10085
10156
|
}, {
|
|
10086
10157
|
key: "partialUpdateMessage",
|
|
10087
10158
|
value: function () {
|
|
10088
|
-
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10159
|
+
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee56(id, partialMessageObject, userId, options) {
|
|
10089
10160
|
var user;
|
|
10090
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10161
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee56$(_context56) {
|
|
10091
10162
|
while (1) {
|
|
10092
|
-
switch (
|
|
10163
|
+
switch (_context56.prev = _context56.next) {
|
|
10093
10164
|
case 0:
|
|
10094
10165
|
if (id) {
|
|
10095
|
-
|
|
10166
|
+
_context56.next = 2;
|
|
10096
10167
|
break;
|
|
10097
10168
|
}
|
|
10098
10169
|
|
|
@@ -10107,23 +10178,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10107
10178
|
};
|
|
10108
10179
|
}
|
|
10109
10180
|
|
|
10110
|
-
|
|
10181
|
+
_context56.next = 6;
|
|
10111
10182
|
return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
10112
10183
|
user: user
|
|
10113
10184
|
}));
|
|
10114
10185
|
|
|
10115
10186
|
case 6:
|
|
10116
|
-
return
|
|
10187
|
+
return _context56.abrupt("return", _context56.sent);
|
|
10117
10188
|
|
|
10118
10189
|
case 7:
|
|
10119
10190
|
case "end":
|
|
10120
|
-
return
|
|
10191
|
+
return _context56.stop();
|
|
10121
10192
|
}
|
|
10122
10193
|
}
|
|
10123
|
-
},
|
|
10194
|
+
}, _callee56, this);
|
|
10124
10195
|
}));
|
|
10125
10196
|
|
|
10126
|
-
function partialUpdateMessage(
|
|
10197
|
+
function partialUpdateMessage(_x71, _x72, _x73, _x74) {
|
|
10127
10198
|
return _partialUpdateMessage.apply(this, arguments);
|
|
10128
10199
|
}
|
|
10129
10200
|
|
|
@@ -10132,11 +10203,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10132
10203
|
}, {
|
|
10133
10204
|
key: "deleteMessage",
|
|
10134
10205
|
value: function () {
|
|
10135
|
-
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10206
|
+
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee57(messageID, hardDelete) {
|
|
10136
10207
|
var params;
|
|
10137
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10208
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee57$(_context57) {
|
|
10138
10209
|
while (1) {
|
|
10139
|
-
switch (
|
|
10210
|
+
switch (_context57.prev = _context57.next) {
|
|
10140
10211
|
case 0:
|
|
10141
10212
|
params = {};
|
|
10142
10213
|
|
|
@@ -10146,21 +10217,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10146
10217
|
};
|
|
10147
10218
|
}
|
|
10148
10219
|
|
|
10149
|
-
|
|
10220
|
+
_context57.next = 4;
|
|
10150
10221
|
return this.delete(this.baseURL + "/messages/".concat(messageID), params);
|
|
10151
10222
|
|
|
10152
10223
|
case 4:
|
|
10153
|
-
return
|
|
10224
|
+
return _context57.abrupt("return", _context57.sent);
|
|
10154
10225
|
|
|
10155
10226
|
case 5:
|
|
10156
10227
|
case "end":
|
|
10157
|
-
return
|
|
10228
|
+
return _context57.stop();
|
|
10158
10229
|
}
|
|
10159
10230
|
}
|
|
10160
|
-
},
|
|
10231
|
+
}, _callee57, this);
|
|
10161
10232
|
}));
|
|
10162
10233
|
|
|
10163
|
-
function deleteMessage(
|
|
10234
|
+
function deleteMessage(_x75, _x76) {
|
|
10164
10235
|
return _deleteMessage.apply(this, arguments);
|
|
10165
10236
|
}
|
|
10166
10237
|
|
|
@@ -10169,26 +10240,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10169
10240
|
}, {
|
|
10170
10241
|
key: "getMessage",
|
|
10171
10242
|
value: function () {
|
|
10172
|
-
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10173
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10243
|
+
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee58(messageID) {
|
|
10244
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee58$(_context58) {
|
|
10174
10245
|
while (1) {
|
|
10175
|
-
switch (
|
|
10246
|
+
switch (_context58.prev = _context58.next) {
|
|
10176
10247
|
case 0:
|
|
10177
|
-
|
|
10248
|
+
_context58.next = 2;
|
|
10178
10249
|
return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)));
|
|
10179
10250
|
|
|
10180
10251
|
case 2:
|
|
10181
|
-
return
|
|
10252
|
+
return _context58.abrupt("return", _context58.sent);
|
|
10182
10253
|
|
|
10183
10254
|
case 3:
|
|
10184
10255
|
case "end":
|
|
10185
|
-
return
|
|
10256
|
+
return _context58.stop();
|
|
10186
10257
|
}
|
|
10187
10258
|
}
|
|
10188
|
-
},
|
|
10259
|
+
}, _callee58, this);
|
|
10189
10260
|
}));
|
|
10190
10261
|
|
|
10191
|
-
function getMessage(
|
|
10262
|
+
function getMessage(_x77) {
|
|
10192
10263
|
return _getMessage.apply(this, arguments);
|
|
10193
10264
|
}
|
|
10194
10265
|
|
|
@@ -10197,7 +10268,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10197
10268
|
}, {
|
|
10198
10269
|
key: "getUserAgent",
|
|
10199
10270
|
value: function getUserAgent() {
|
|
10200
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
10271
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.15.0");
|
|
10201
10272
|
}
|
|
10202
10273
|
}, {
|
|
10203
10274
|
key: "setUserAgent",
|
|
@@ -10416,28 +10487,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10416
10487
|
}, {
|
|
10417
10488
|
key: "sendUserCustomEvent",
|
|
10418
10489
|
value: function () {
|
|
10419
|
-
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10420
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10490
|
+
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee59(targetUserID, event) {
|
|
10491
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee59$(_context59) {
|
|
10421
10492
|
while (1) {
|
|
10422
|
-
switch (
|
|
10493
|
+
switch (_context59.prev = _context59.next) {
|
|
10423
10494
|
case 0:
|
|
10424
|
-
|
|
10495
|
+
_context59.next = 2;
|
|
10425
10496
|
return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
|
|
10426
10497
|
event: event
|
|
10427
10498
|
});
|
|
10428
10499
|
|
|
10429
10500
|
case 2:
|
|
10430
|
-
return
|
|
10501
|
+
return _context59.abrupt("return", _context59.sent);
|
|
10431
10502
|
|
|
10432
10503
|
case 3:
|
|
10433
10504
|
case "end":
|
|
10434
|
-
return
|
|
10505
|
+
return _context59.stop();
|
|
10435
10506
|
}
|
|
10436
10507
|
}
|
|
10437
|
-
},
|
|
10508
|
+
}, _callee59, this);
|
|
10438
10509
|
}));
|
|
10439
10510
|
|
|
10440
|
-
function sendUserCustomEvent(
|
|
10511
|
+
function sendUserCustomEvent(_x78, _x79) {
|
|
10441
10512
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
10442
10513
|
}
|
|
10443
10514
|
|
|
@@ -10495,132 +10566,298 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10495
10566
|
return this.get("".concat(this.baseURL, "/export_channels/").concat(id));
|
|
10496
10567
|
}
|
|
10497
10568
|
/**
|
|
10498
|
-
* createSegment - Creates a
|
|
10569
|
+
* createSegment - Creates a segment
|
|
10499
10570
|
*
|
|
10571
|
+
* @private
|
|
10572
|
+
* @param {SegmentType} type Segment type
|
|
10573
|
+
* @param {string} id Segment ID (valid UUID)
|
|
10574
|
+
* @param {string} name Segment name (valid UUID)
|
|
10500
10575
|
* @param {SegmentData} params Segment data
|
|
10501
10576
|
*
|
|
10502
|
-
* @return {Segment} The
|
|
10577
|
+
* @return {Segment} The created Segment
|
|
10503
10578
|
*/
|
|
10504
10579
|
|
|
10505
10580
|
}, {
|
|
10506
10581
|
key: "createSegment",
|
|
10507
10582
|
value: function () {
|
|
10508
|
-
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10509
|
-
var _yield$this$post, segment;
|
|
10583
|
+
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee60(type, id, name, data) {
|
|
10584
|
+
var body, _yield$this$post, segment;
|
|
10510
10585
|
|
|
10511
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10586
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee60$(_context60) {
|
|
10512
10587
|
while (1) {
|
|
10513
|
-
switch (
|
|
10588
|
+
switch (_context60.prev = _context60.next) {
|
|
10514
10589
|
case 0:
|
|
10515
|
-
|
|
10516
|
-
|
|
10517
|
-
|
|
10518
|
-
|
|
10590
|
+
body = {
|
|
10591
|
+
id: id,
|
|
10592
|
+
type: type,
|
|
10593
|
+
name: name,
|
|
10594
|
+
data: data
|
|
10595
|
+
};
|
|
10596
|
+
_context60.next = 3;
|
|
10597
|
+
return this.post(this.baseURL + "/segments", body);
|
|
10519
10598
|
|
|
10520
|
-
case
|
|
10521
|
-
_yield$this$post =
|
|
10599
|
+
case 3:
|
|
10600
|
+
_yield$this$post = _context60.sent;
|
|
10522
10601
|
segment = _yield$this$post.segment;
|
|
10523
|
-
return
|
|
10602
|
+
return _context60.abrupt("return", segment);
|
|
10524
10603
|
|
|
10525
|
-
case
|
|
10604
|
+
case 6:
|
|
10526
10605
|
case "end":
|
|
10527
|
-
return
|
|
10606
|
+
return _context60.stop();
|
|
10528
10607
|
}
|
|
10529
10608
|
}
|
|
10530
|
-
},
|
|
10609
|
+
}, _callee60, this);
|
|
10531
10610
|
}));
|
|
10532
10611
|
|
|
10533
|
-
function createSegment(
|
|
10612
|
+
function createSegment(_x80, _x81, _x82, _x83) {
|
|
10534
10613
|
return _createSegment.apply(this, arguments);
|
|
10535
10614
|
}
|
|
10536
10615
|
|
|
10537
10616
|
return createSegment;
|
|
10538
10617
|
}()
|
|
10539
10618
|
/**
|
|
10540
|
-
*
|
|
10619
|
+
* createUserSegment - Creates a user segment
|
|
10541
10620
|
*
|
|
10621
|
+
* @param {string} id Segment ID (valid UUID)
|
|
10622
|
+
* @param {string} name Segment name
|
|
10623
|
+
* @param {SegmentData} data Segment data
|
|
10542
10624
|
*
|
|
10543
|
-
* @return {Segment
|
|
10625
|
+
* @return {Segment} The created Segment
|
|
10544
10626
|
*/
|
|
10545
10627
|
|
|
10546
10628
|
}, {
|
|
10547
|
-
key: "
|
|
10629
|
+
key: "createUserSegment",
|
|
10548
10630
|
value: function () {
|
|
10549
|
-
var
|
|
10550
|
-
|
|
10551
|
-
_args60 = arguments;
|
|
10552
|
-
return _regeneratorRuntime__default['default'].wrap(function _callee60$(_context60) {
|
|
10631
|
+
var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee61(id, name, data) {
|
|
10632
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee61$(_context61) {
|
|
10553
10633
|
while (1) {
|
|
10554
|
-
switch (
|
|
10634
|
+
switch (_context61.prev = _context61.next) {
|
|
10555
10635
|
case 0:
|
|
10556
|
-
|
|
10557
|
-
|
|
10558
|
-
return this.get(this.baseURL + "/segments", {
|
|
10559
|
-
payload: _objectSpread({
|
|
10560
|
-
filter_conditions: filters
|
|
10561
|
-
}, options)
|
|
10562
|
-
});
|
|
10636
|
+
_context61.next = 2;
|
|
10637
|
+
return this.createSegment('user', id, name, data);
|
|
10563
10638
|
|
|
10564
|
-
case
|
|
10565
|
-
return
|
|
10639
|
+
case 2:
|
|
10640
|
+
return _context61.abrupt("return", _context61.sent);
|
|
10566
10641
|
|
|
10567
|
-
case
|
|
10642
|
+
case 3:
|
|
10568
10643
|
case "end":
|
|
10569
|
-
return
|
|
10644
|
+
return _context61.stop();
|
|
10570
10645
|
}
|
|
10571
10646
|
}
|
|
10572
|
-
},
|
|
10647
|
+
}, _callee61, this);
|
|
10573
10648
|
}));
|
|
10574
10649
|
|
|
10575
|
-
function
|
|
10576
|
-
return
|
|
10650
|
+
function createUserSegment(_x84, _x85, _x86) {
|
|
10651
|
+
return _createUserSegment.apply(this, arguments);
|
|
10577
10652
|
}
|
|
10578
10653
|
|
|
10579
|
-
return
|
|
10654
|
+
return createUserSegment;
|
|
10580
10655
|
}()
|
|
10581
10656
|
/**
|
|
10582
|
-
*
|
|
10657
|
+
* createChannelSegment - Creates a channel segment
|
|
10583
10658
|
*
|
|
10584
|
-
* @param {string} id Segment ID
|
|
10585
|
-
* @param {
|
|
10659
|
+
* @param {string} id Segment ID (valid UUID)
|
|
10660
|
+
* @param {string} name Segment name
|
|
10661
|
+
* @param {SegmentData} data Segment data
|
|
10586
10662
|
*
|
|
10587
|
-
* @return {Segment}
|
|
10663
|
+
* @return {Segment} The created Segment
|
|
10588
10664
|
*/
|
|
10589
10665
|
|
|
10590
10666
|
}, {
|
|
10591
|
-
key: "
|
|
10667
|
+
key: "createChannelSegment",
|
|
10592
10668
|
value: function () {
|
|
10593
|
-
var
|
|
10594
|
-
|
|
10595
|
-
|
|
10596
|
-
return _regeneratorRuntime__default['default'].wrap(function _callee61$(_context61) {
|
|
10669
|
+
var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee62(id, name, data) {
|
|
10670
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee62$(_context62) {
|
|
10597
10671
|
while (1) {
|
|
10598
|
-
switch (
|
|
10672
|
+
switch (_context62.prev = _context62.next) {
|
|
10599
10673
|
case 0:
|
|
10600
|
-
|
|
10601
|
-
return this.
|
|
10602
|
-
segment: params
|
|
10603
|
-
});
|
|
10674
|
+
_context62.next = 2;
|
|
10675
|
+
return this.createSegment('channel', id, name, data);
|
|
10604
10676
|
|
|
10605
10677
|
case 2:
|
|
10606
|
-
|
|
10607
|
-
segment = _yield$this$put.segment;
|
|
10608
|
-
return _context61.abrupt("return", segment);
|
|
10678
|
+
return _context62.abrupt("return", _context62.sent);
|
|
10609
10679
|
|
|
10610
|
-
case
|
|
10680
|
+
case 3:
|
|
10611
10681
|
case "end":
|
|
10612
|
-
return
|
|
10682
|
+
return _context62.stop();
|
|
10613
10683
|
}
|
|
10614
10684
|
}
|
|
10615
|
-
},
|
|
10685
|
+
}, _callee62, this);
|
|
10616
10686
|
}));
|
|
10617
10687
|
|
|
10618
|
-
function
|
|
10688
|
+
function createChannelSegment(_x87, _x88, _x89) {
|
|
10689
|
+
return _createChannelSegment.apply(this, arguments);
|
|
10690
|
+
}
|
|
10691
|
+
|
|
10692
|
+
return createChannelSegment;
|
|
10693
|
+
}()
|
|
10694
|
+
/**
|
|
10695
|
+
* updateSegment - Update a segment
|
|
10696
|
+
*
|
|
10697
|
+
* @param {string} id Segment ID
|
|
10698
|
+
* @param {Partial<UpdateSegmentData>} data Data to update
|
|
10699
|
+
*
|
|
10700
|
+
* @return {Segment} Updated Segment
|
|
10701
|
+
*/
|
|
10702
|
+
|
|
10703
|
+
}, {
|
|
10704
|
+
key: "updateSegment",
|
|
10705
|
+
value: function () {
|
|
10706
|
+
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee63(id, data) {
|
|
10707
|
+
var _yield$this$put, segment;
|
|
10708
|
+
|
|
10709
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee63$(_context63) {
|
|
10710
|
+
while (1) {
|
|
10711
|
+
switch (_context63.prev = _context63.next) {
|
|
10712
|
+
case 0:
|
|
10713
|
+
_context63.next = 2;
|
|
10714
|
+
return this.put(this.baseURL + "/segments/".concat(id), data);
|
|
10715
|
+
|
|
10716
|
+
case 2:
|
|
10717
|
+
_yield$this$put = _context63.sent;
|
|
10718
|
+
segment = _yield$this$put.segment;
|
|
10719
|
+
return _context63.abrupt("return", segment);
|
|
10720
|
+
|
|
10721
|
+
case 5:
|
|
10722
|
+
case "end":
|
|
10723
|
+
return _context63.stop();
|
|
10724
|
+
}
|
|
10725
|
+
}
|
|
10726
|
+
}, _callee63, this);
|
|
10727
|
+
}));
|
|
10728
|
+
|
|
10729
|
+
function updateSegment(_x90, _x91) {
|
|
10619
10730
|
return _updateSegment.apply(this, arguments);
|
|
10620
10731
|
}
|
|
10621
10732
|
|
|
10622
10733
|
return updateSegment;
|
|
10623
10734
|
}()
|
|
10735
|
+
/**
|
|
10736
|
+
* addSegmentTargets - Add targets to a segment
|
|
10737
|
+
*
|
|
10738
|
+
* @param {string} id Segment ID
|
|
10739
|
+
* @param {string[]} targets Targets to add to the segment
|
|
10740
|
+
*
|
|
10741
|
+
* @return {APIResponse} API response
|
|
10742
|
+
*/
|
|
10743
|
+
|
|
10744
|
+
}, {
|
|
10745
|
+
key: "addSegmentTargets",
|
|
10746
|
+
value: function () {
|
|
10747
|
+
var _addSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee64(id, targets) {
|
|
10748
|
+
var body;
|
|
10749
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee64$(_context64) {
|
|
10750
|
+
while (1) {
|
|
10751
|
+
switch (_context64.prev = _context64.next) {
|
|
10752
|
+
case 0:
|
|
10753
|
+
body = {
|
|
10754
|
+
targets: targets
|
|
10755
|
+
};
|
|
10756
|
+
_context64.next = 3;
|
|
10757
|
+
return this.post(this.baseURL + "/segments/".concat(id, "/addtargets"), body);
|
|
10758
|
+
|
|
10759
|
+
case 3:
|
|
10760
|
+
return _context64.abrupt("return", _context64.sent);
|
|
10761
|
+
|
|
10762
|
+
case 4:
|
|
10763
|
+
case "end":
|
|
10764
|
+
return _context64.stop();
|
|
10765
|
+
}
|
|
10766
|
+
}
|
|
10767
|
+
}, _callee64, this);
|
|
10768
|
+
}));
|
|
10769
|
+
|
|
10770
|
+
function addSegmentTargets(_x92, _x93) {
|
|
10771
|
+
return _addSegmentTargets.apply(this, arguments);
|
|
10772
|
+
}
|
|
10773
|
+
|
|
10774
|
+
return addSegmentTargets;
|
|
10775
|
+
}()
|
|
10776
|
+
/**
|
|
10777
|
+
* deleteSegmentTargets - Delete targets from a segment
|
|
10778
|
+
*
|
|
10779
|
+
* @param {string} id Segment ID
|
|
10780
|
+
* @param {string[]} targets Targets to add to the segment
|
|
10781
|
+
*
|
|
10782
|
+
* @return {APIResponse} API response
|
|
10783
|
+
*/
|
|
10784
|
+
|
|
10785
|
+
}, {
|
|
10786
|
+
key: "deleteSegmentTargets",
|
|
10787
|
+
value: function () {
|
|
10788
|
+
var _deleteSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee65(id, targets) {
|
|
10789
|
+
var body;
|
|
10790
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee65$(_context65) {
|
|
10791
|
+
while (1) {
|
|
10792
|
+
switch (_context65.prev = _context65.next) {
|
|
10793
|
+
case 0:
|
|
10794
|
+
body = {
|
|
10795
|
+
targets: targets
|
|
10796
|
+
};
|
|
10797
|
+
_context65.next = 3;
|
|
10798
|
+
return this.post(this.baseURL + "/segments/".concat(id, "/deletetargets"), body);
|
|
10799
|
+
|
|
10800
|
+
case 3:
|
|
10801
|
+
return _context65.abrupt("return", _context65.sent);
|
|
10802
|
+
|
|
10803
|
+
case 4:
|
|
10804
|
+
case "end":
|
|
10805
|
+
return _context65.stop();
|
|
10806
|
+
}
|
|
10807
|
+
}
|
|
10808
|
+
}, _callee65, this);
|
|
10809
|
+
}));
|
|
10810
|
+
|
|
10811
|
+
function deleteSegmentTargets(_x94, _x95) {
|
|
10812
|
+
return _deleteSegmentTargets.apply(this, arguments);
|
|
10813
|
+
}
|
|
10814
|
+
|
|
10815
|
+
return deleteSegmentTargets;
|
|
10816
|
+
}()
|
|
10817
|
+
/**
|
|
10818
|
+
* querySegments - Query Segments
|
|
10819
|
+
*
|
|
10820
|
+
* @param {filter} filter MongoDB style filter conditions
|
|
10821
|
+
* @param {QuerySegmentsOptions} options Options for sorting/paginating the results
|
|
10822
|
+
*
|
|
10823
|
+
* @return {Segment[]} Segments
|
|
10824
|
+
*/
|
|
10825
|
+
|
|
10826
|
+
}, {
|
|
10827
|
+
key: "querySegments",
|
|
10828
|
+
value: function () {
|
|
10829
|
+
var _querySegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee66(filter) {
|
|
10830
|
+
var options,
|
|
10831
|
+
_args66 = arguments;
|
|
10832
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee66$(_context66) {
|
|
10833
|
+
while (1) {
|
|
10834
|
+
switch (_context66.prev = _context66.next) {
|
|
10835
|
+
case 0:
|
|
10836
|
+
options = _args66.length > 1 && _args66[1] !== undefined ? _args66[1] : {};
|
|
10837
|
+
_context66.next = 3;
|
|
10838
|
+
return this.get(this.baseURL + "/segments", {
|
|
10839
|
+
payload: _objectSpread({
|
|
10840
|
+
filter: filter
|
|
10841
|
+
}, options)
|
|
10842
|
+
});
|
|
10843
|
+
|
|
10844
|
+
case 3:
|
|
10845
|
+
return _context66.abrupt("return", _context66.sent);
|
|
10846
|
+
|
|
10847
|
+
case 4:
|
|
10848
|
+
case "end":
|
|
10849
|
+
return _context66.stop();
|
|
10850
|
+
}
|
|
10851
|
+
}
|
|
10852
|
+
}, _callee66, this);
|
|
10853
|
+
}));
|
|
10854
|
+
|
|
10855
|
+
function querySegments(_x96) {
|
|
10856
|
+
return _querySegments.apply(this, arguments);
|
|
10857
|
+
}
|
|
10858
|
+
|
|
10859
|
+
return querySegments;
|
|
10860
|
+
}()
|
|
10624
10861
|
/**
|
|
10625
10862
|
* deleteSegment - Delete a Campaign Segment
|
|
10626
10863
|
*
|
|
@@ -10632,27 +10869,68 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10632
10869
|
}, {
|
|
10633
10870
|
key: "deleteSegment",
|
|
10634
10871
|
value: function () {
|
|
10635
|
-
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10636
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10872
|
+
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee67(id) {
|
|
10873
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee67$(_context67) {
|
|
10637
10874
|
while (1) {
|
|
10638
|
-
switch (
|
|
10875
|
+
switch (_context67.prev = _context67.next) {
|
|
10639
10876
|
case 0:
|
|
10640
|
-
|
|
10877
|
+
_context67.next = 2;
|
|
10878
|
+
return this.delete(this.baseURL + "/segments/".concat(id));
|
|
10641
10879
|
|
|
10642
|
-
case
|
|
10880
|
+
case 2:
|
|
10881
|
+
return _context67.abrupt("return", _context67.sent);
|
|
10882
|
+
|
|
10883
|
+
case 3:
|
|
10643
10884
|
case "end":
|
|
10644
|
-
return
|
|
10885
|
+
return _context67.stop();
|
|
10645
10886
|
}
|
|
10646
10887
|
}
|
|
10647
|
-
},
|
|
10888
|
+
}, _callee67, this);
|
|
10648
10889
|
}));
|
|
10649
10890
|
|
|
10650
|
-
function deleteSegment(
|
|
10891
|
+
function deleteSegment(_x97) {
|
|
10651
10892
|
return _deleteSegment.apply(this, arguments);
|
|
10652
10893
|
}
|
|
10653
10894
|
|
|
10654
10895
|
return deleteSegment;
|
|
10655
10896
|
}()
|
|
10897
|
+
/**
|
|
10898
|
+
* segmentTargetExists - Check if a target exists in a segment
|
|
10899
|
+
*
|
|
10900
|
+
* @param {string} segmentId Segment ID
|
|
10901
|
+
* @param {string} targetId Target ID
|
|
10902
|
+
*
|
|
10903
|
+
* @return {Promise<APIResponse>} The Server Response
|
|
10904
|
+
*/
|
|
10905
|
+
|
|
10906
|
+
}, {
|
|
10907
|
+
key: "segmentTargetExists",
|
|
10908
|
+
value: function () {
|
|
10909
|
+
var _segmentTargetExists = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee68(segmentId, targetId) {
|
|
10910
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee68$(_context68) {
|
|
10911
|
+
while (1) {
|
|
10912
|
+
switch (_context68.prev = _context68.next) {
|
|
10913
|
+
case 0:
|
|
10914
|
+
_context68.next = 2;
|
|
10915
|
+
return this.get(this.baseURL + "/segments/".concat(segmentId, "/target/").concat(targetId));
|
|
10916
|
+
|
|
10917
|
+
case 2:
|
|
10918
|
+
return _context68.abrupt("return", _context68.sent);
|
|
10919
|
+
|
|
10920
|
+
case 3:
|
|
10921
|
+
case "end":
|
|
10922
|
+
return _context68.stop();
|
|
10923
|
+
}
|
|
10924
|
+
}
|
|
10925
|
+
}, _callee68, this);
|
|
10926
|
+
}));
|
|
10927
|
+
|
|
10928
|
+
function segmentTargetExists(_x98, _x99) {
|
|
10929
|
+
return _segmentTargetExists.apply(this, arguments);
|
|
10930
|
+
}
|
|
10931
|
+
|
|
10932
|
+
return segmentTargetExists;
|
|
10933
|
+
}()
|
|
10656
10934
|
/**
|
|
10657
10935
|
* createCampaign - Creates a Campaign
|
|
10658
10936
|
*
|
|
@@ -10664,32 +10942,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10664
10942
|
}, {
|
|
10665
10943
|
key: "createCampaign",
|
|
10666
10944
|
value: function () {
|
|
10667
|
-
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10945
|
+
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee69(params) {
|
|
10668
10946
|
var _yield$this$post2, campaign;
|
|
10669
10947
|
|
|
10670
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10948
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee69$(_context69) {
|
|
10671
10949
|
while (1) {
|
|
10672
|
-
switch (
|
|
10950
|
+
switch (_context69.prev = _context69.next) {
|
|
10673
10951
|
case 0:
|
|
10674
|
-
|
|
10952
|
+
_context69.next = 2;
|
|
10675
10953
|
return this.post(this.baseURL + "/campaigns", {
|
|
10676
10954
|
campaign: params
|
|
10677
10955
|
});
|
|
10678
10956
|
|
|
10679
10957
|
case 2:
|
|
10680
|
-
_yield$this$post2 =
|
|
10958
|
+
_yield$this$post2 = _context69.sent;
|
|
10681
10959
|
campaign = _yield$this$post2.campaign;
|
|
10682
|
-
return
|
|
10960
|
+
return _context69.abrupt("return", campaign);
|
|
10683
10961
|
|
|
10684
10962
|
case 5:
|
|
10685
10963
|
case "end":
|
|
10686
|
-
return
|
|
10964
|
+
return _context69.stop();
|
|
10687
10965
|
}
|
|
10688
10966
|
}
|
|
10689
|
-
},
|
|
10967
|
+
}, _callee69, this);
|
|
10690
10968
|
}));
|
|
10691
10969
|
|
|
10692
|
-
function createCampaign(
|
|
10970
|
+
function createCampaign(_x100) {
|
|
10693
10971
|
return _createCampaign.apply(this, arguments);
|
|
10694
10972
|
}
|
|
10695
10973
|
|
|
@@ -10705,15 +10983,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10705
10983
|
}, {
|
|
10706
10984
|
key: "queryCampaigns",
|
|
10707
10985
|
value: function () {
|
|
10708
|
-
var _queryCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10986
|
+
var _queryCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee70(filters) {
|
|
10709
10987
|
var options,
|
|
10710
|
-
|
|
10711
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10988
|
+
_args70 = arguments;
|
|
10989
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee70$(_context70) {
|
|
10712
10990
|
while (1) {
|
|
10713
|
-
switch (
|
|
10991
|
+
switch (_context70.prev = _context70.next) {
|
|
10714
10992
|
case 0:
|
|
10715
|
-
options =
|
|
10716
|
-
|
|
10993
|
+
options = _args70.length > 1 && _args70[1] !== undefined ? _args70[1] : {};
|
|
10994
|
+
_context70.next = 3;
|
|
10717
10995
|
return this.get(this.baseURL + "/campaigns", {
|
|
10718
10996
|
payload: _objectSpread({
|
|
10719
10997
|
filter_conditions: filters
|
|
@@ -10721,17 +10999,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10721
10999
|
});
|
|
10722
11000
|
|
|
10723
11001
|
case 3:
|
|
10724
|
-
return
|
|
11002
|
+
return _context70.abrupt("return", _context70.sent);
|
|
10725
11003
|
|
|
10726
11004
|
case 4:
|
|
10727
11005
|
case "end":
|
|
10728
|
-
return
|
|
11006
|
+
return _context70.stop();
|
|
10729
11007
|
}
|
|
10730
11008
|
}
|
|
10731
|
-
},
|
|
11009
|
+
}, _callee70, this);
|
|
10732
11010
|
}));
|
|
10733
11011
|
|
|
10734
|
-
function queryCampaigns(
|
|
11012
|
+
function queryCampaigns(_x101) {
|
|
10735
11013
|
return _queryCampaigns.apply(this, arguments);
|
|
10736
11014
|
}
|
|
10737
11015
|
|
|
@@ -10749,32 +11027,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10749
11027
|
}, {
|
|
10750
11028
|
key: "updateCampaign",
|
|
10751
11029
|
value: function () {
|
|
10752
|
-
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11030
|
+
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee71(id, params) {
|
|
10753
11031
|
var _yield$this$put2, campaign;
|
|
10754
11032
|
|
|
10755
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11033
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee71$(_context71) {
|
|
10756
11034
|
while (1) {
|
|
10757
|
-
switch (
|
|
11035
|
+
switch (_context71.prev = _context71.next) {
|
|
10758
11036
|
case 0:
|
|
10759
|
-
|
|
11037
|
+
_context71.next = 2;
|
|
10760
11038
|
return this.put(this.baseURL + "/campaigns/".concat(id), {
|
|
10761
11039
|
campaign: params
|
|
10762
11040
|
});
|
|
10763
11041
|
|
|
10764
11042
|
case 2:
|
|
10765
|
-
_yield$this$put2 =
|
|
11043
|
+
_yield$this$put2 = _context71.sent;
|
|
10766
11044
|
campaign = _yield$this$put2.campaign;
|
|
10767
|
-
return
|
|
11045
|
+
return _context71.abrupt("return", campaign);
|
|
10768
11046
|
|
|
10769
11047
|
case 5:
|
|
10770
11048
|
case "end":
|
|
10771
|
-
return
|
|
11049
|
+
return _context71.stop();
|
|
10772
11050
|
}
|
|
10773
11051
|
}
|
|
10774
|
-
},
|
|
11052
|
+
}, _callee71, this);
|
|
10775
11053
|
}));
|
|
10776
11054
|
|
|
10777
|
-
function updateCampaign(
|
|
11055
|
+
function updateCampaign(_x102, _x103) {
|
|
10778
11056
|
return _updateCampaign.apply(this, arguments);
|
|
10779
11057
|
}
|
|
10780
11058
|
|
|
@@ -10791,25 +11069,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10791
11069
|
}, {
|
|
10792
11070
|
key: "deleteCampaign",
|
|
10793
11071
|
value: function () {
|
|
10794
|
-
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11072
|
+
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee72(id) {
|
|
10795
11073
|
var params,
|
|
10796
|
-
|
|
10797
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11074
|
+
_args72 = arguments;
|
|
11075
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee72$(_context72) {
|
|
10798
11076
|
while (1) {
|
|
10799
|
-
switch (
|
|
11077
|
+
switch (_context72.prev = _context72.next) {
|
|
10800
11078
|
case 0:
|
|
10801
|
-
params =
|
|
10802
|
-
return
|
|
11079
|
+
params = _args72.length > 1 && _args72[1] !== undefined ? _args72[1] : {};
|
|
11080
|
+
return _context72.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id), params));
|
|
10803
11081
|
|
|
10804
11082
|
case 2:
|
|
10805
11083
|
case "end":
|
|
10806
|
-
return
|
|
11084
|
+
return _context72.stop();
|
|
10807
11085
|
}
|
|
10808
11086
|
}
|
|
10809
|
-
},
|
|
11087
|
+
}, _callee72, this);
|
|
10810
11088
|
}));
|
|
10811
11089
|
|
|
10812
|
-
function deleteCampaign(
|
|
11090
|
+
function deleteCampaign(_x104) {
|
|
10813
11091
|
return _deleteCampaign.apply(this, arguments);
|
|
10814
11092
|
}
|
|
10815
11093
|
|
|
@@ -10827,33 +11105,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10827
11105
|
}, {
|
|
10828
11106
|
key: "scheduleCampaign",
|
|
10829
11107
|
value: function () {
|
|
10830
|
-
var _scheduleCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11108
|
+
var _scheduleCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee73(id, params) {
|
|
10831
11109
|
var scheduledFor, _yield$this$patch, campaign;
|
|
10832
11110
|
|
|
10833
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11111
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee73$(_context73) {
|
|
10834
11112
|
while (1) {
|
|
10835
|
-
switch (
|
|
11113
|
+
switch (_context73.prev = _context73.next) {
|
|
10836
11114
|
case 0:
|
|
10837
11115
|
scheduledFor = params.scheduledFor;
|
|
10838
|
-
|
|
11116
|
+
_context73.next = 3;
|
|
10839
11117
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
|
|
10840
11118
|
scheduled_for: scheduledFor
|
|
10841
11119
|
});
|
|
10842
11120
|
|
|
10843
11121
|
case 3:
|
|
10844
|
-
_yield$this$patch =
|
|
11122
|
+
_yield$this$patch = _context73.sent;
|
|
10845
11123
|
campaign = _yield$this$patch.campaign;
|
|
10846
|
-
return
|
|
11124
|
+
return _context73.abrupt("return", campaign);
|
|
10847
11125
|
|
|
10848
11126
|
case 6:
|
|
10849
11127
|
case "end":
|
|
10850
|
-
return
|
|
11128
|
+
return _context73.stop();
|
|
10851
11129
|
}
|
|
10852
11130
|
}
|
|
10853
|
-
},
|
|
11131
|
+
}, _callee73, this);
|
|
10854
11132
|
}));
|
|
10855
11133
|
|
|
10856
|
-
function scheduleCampaign(
|
|
11134
|
+
function scheduleCampaign(_x105, _x106) {
|
|
10857
11135
|
return _scheduleCampaign.apply(this, arguments);
|
|
10858
11136
|
}
|
|
10859
11137
|
|
|
@@ -10870,30 +11148,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10870
11148
|
}, {
|
|
10871
11149
|
key: "stopCampaign",
|
|
10872
11150
|
value: function () {
|
|
10873
|
-
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11151
|
+
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee74(id) {
|
|
10874
11152
|
var _yield$this$patch2, campaign;
|
|
10875
11153
|
|
|
10876
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11154
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee74$(_context74) {
|
|
10877
11155
|
while (1) {
|
|
10878
|
-
switch (
|
|
11156
|
+
switch (_context74.prev = _context74.next) {
|
|
10879
11157
|
case 0:
|
|
10880
|
-
|
|
11158
|
+
_context74.next = 2;
|
|
10881
11159
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
|
|
10882
11160
|
|
|
10883
11161
|
case 2:
|
|
10884
|
-
_yield$this$patch2 =
|
|
11162
|
+
_yield$this$patch2 = _context74.sent;
|
|
10885
11163
|
campaign = _yield$this$patch2.campaign;
|
|
10886
|
-
return
|
|
11164
|
+
return _context74.abrupt("return", campaign);
|
|
10887
11165
|
|
|
10888
11166
|
case 5:
|
|
10889
11167
|
case "end":
|
|
10890
|
-
return
|
|
11168
|
+
return _context74.stop();
|
|
10891
11169
|
}
|
|
10892
11170
|
}
|
|
10893
|
-
},
|
|
11171
|
+
}, _callee74, this);
|
|
10894
11172
|
}));
|
|
10895
11173
|
|
|
10896
|
-
function stopCampaign(
|
|
11174
|
+
function stopCampaign(_x107) {
|
|
10897
11175
|
return _stopCampaign.apply(this, arguments);
|
|
10898
11176
|
}
|
|
10899
11177
|
|
|
@@ -10910,30 +11188,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10910
11188
|
}, {
|
|
10911
11189
|
key: "resumeCampaign",
|
|
10912
11190
|
value: function () {
|
|
10913
|
-
var _resumeCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11191
|
+
var _resumeCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee75(id) {
|
|
10914
11192
|
var _yield$this$patch3, campaign;
|
|
10915
11193
|
|
|
10916
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11194
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee75$(_context75) {
|
|
10917
11195
|
while (1) {
|
|
10918
|
-
switch (
|
|
11196
|
+
switch (_context75.prev = _context75.next) {
|
|
10919
11197
|
case 0:
|
|
10920
|
-
|
|
11198
|
+
_context75.next = 2;
|
|
10921
11199
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
|
|
10922
11200
|
|
|
10923
11201
|
case 2:
|
|
10924
|
-
_yield$this$patch3 =
|
|
11202
|
+
_yield$this$patch3 = _context75.sent;
|
|
10925
11203
|
campaign = _yield$this$patch3.campaign;
|
|
10926
|
-
return
|
|
11204
|
+
return _context75.abrupt("return", campaign);
|
|
10927
11205
|
|
|
10928
11206
|
case 5:
|
|
10929
11207
|
case "end":
|
|
10930
|
-
return
|
|
11208
|
+
return _context75.stop();
|
|
10931
11209
|
}
|
|
10932
11210
|
}
|
|
10933
|
-
},
|
|
11211
|
+
}, _callee75, this);
|
|
10934
11212
|
}));
|
|
10935
11213
|
|
|
10936
|
-
function resumeCampaign(
|
|
11214
|
+
function resumeCampaign(_x108) {
|
|
10937
11215
|
return _resumeCampaign.apply(this, arguments);
|
|
10938
11216
|
}
|
|
10939
11217
|
|
|
@@ -10951,77 +11229,35 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10951
11229
|
}, {
|
|
10952
11230
|
key: "testCampaign",
|
|
10953
11231
|
value: function () {
|
|
10954
|
-
var _testCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11232
|
+
var _testCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee76(id, params) {
|
|
10955
11233
|
var users;
|
|
10956
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11234
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee76$(_context76) {
|
|
10957
11235
|
while (1) {
|
|
10958
|
-
switch (
|
|
11236
|
+
switch (_context76.prev = _context76.next) {
|
|
10959
11237
|
case 0:
|
|
10960
11238
|
users = params.users;
|
|
10961
|
-
|
|
11239
|
+
_context76.next = 3;
|
|
10962
11240
|
return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
|
|
10963
11241
|
users: users
|
|
10964
11242
|
});
|
|
10965
11243
|
|
|
10966
11244
|
case 3:
|
|
10967
|
-
return
|
|
11245
|
+
return _context76.abrupt("return", _context76.sent);
|
|
10968
11246
|
|
|
10969
11247
|
case 4:
|
|
10970
11248
|
case "end":
|
|
10971
|
-
return
|
|
11249
|
+
return _context76.stop();
|
|
10972
11250
|
}
|
|
10973
11251
|
}
|
|
10974
|
-
},
|
|
11252
|
+
}, _callee76, this);
|
|
10975
11253
|
}));
|
|
10976
11254
|
|
|
10977
|
-
function testCampaign(
|
|
11255
|
+
function testCampaign(_x109, _x110) {
|
|
10978
11256
|
return _testCampaign.apply(this, arguments);
|
|
10979
11257
|
}
|
|
10980
11258
|
|
|
10981
11259
|
return testCampaign;
|
|
10982
11260
|
}()
|
|
10983
|
-
/**
|
|
10984
|
-
* queryRecipients - Query Campaign Recipient Results
|
|
10985
|
-
*
|
|
10986
|
-
*
|
|
10987
|
-
* @return {Recipient[]} Recipients
|
|
10988
|
-
*/
|
|
10989
|
-
|
|
10990
|
-
}, {
|
|
10991
|
-
key: "queryRecipients",
|
|
10992
|
-
value: function () {
|
|
10993
|
-
var _queryRecipients = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee71(filters) {
|
|
10994
|
-
var options,
|
|
10995
|
-
_args71 = arguments;
|
|
10996
|
-
return _regeneratorRuntime__default['default'].wrap(function _callee71$(_context71) {
|
|
10997
|
-
while (1) {
|
|
10998
|
-
switch (_context71.prev = _context71.next) {
|
|
10999
|
-
case 0:
|
|
11000
|
-
options = _args71.length > 1 && _args71[1] !== undefined ? _args71[1] : {};
|
|
11001
|
-
_context71.next = 3;
|
|
11002
|
-
return this.get(this.baseURL + "/recipients", {
|
|
11003
|
-
payload: _objectSpread({
|
|
11004
|
-
filter_conditions: filters
|
|
11005
|
-
}, options)
|
|
11006
|
-
});
|
|
11007
|
-
|
|
11008
|
-
case 3:
|
|
11009
|
-
return _context71.abrupt("return", _context71.sent);
|
|
11010
|
-
|
|
11011
|
-
case 4:
|
|
11012
|
-
case "end":
|
|
11013
|
-
return _context71.stop();
|
|
11014
|
-
}
|
|
11015
|
-
}
|
|
11016
|
-
}, _callee71, this);
|
|
11017
|
-
}));
|
|
11018
|
-
|
|
11019
|
-
function queryRecipients(_x95) {
|
|
11020
|
-
return _queryRecipients.apply(this, arguments);
|
|
11021
|
-
}
|
|
11022
|
-
|
|
11023
|
-
return queryRecipients;
|
|
11024
|
-
}()
|
|
11025
11261
|
/**
|
|
11026
11262
|
* enrichURL - Get OpenGraph data of the given link
|
|
11027
11263
|
*
|
|
@@ -11032,24 +11268,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11032
11268
|
}, {
|
|
11033
11269
|
key: "enrichURL",
|
|
11034
11270
|
value: function () {
|
|
11035
|
-
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11036
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11271
|
+
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee77(url) {
|
|
11272
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee77$(_context77) {
|
|
11037
11273
|
while (1) {
|
|
11038
|
-
switch (
|
|
11274
|
+
switch (_context77.prev = _context77.next) {
|
|
11039
11275
|
case 0:
|
|
11040
|
-
return
|
|
11276
|
+
return _context77.abrupt("return", this.get(this.baseURL + "/og", {
|
|
11041
11277
|
url: url
|
|
11042
11278
|
}));
|
|
11043
11279
|
|
|
11044
11280
|
case 1:
|
|
11045
11281
|
case "end":
|
|
11046
|
-
return
|
|
11282
|
+
return _context77.stop();
|
|
11047
11283
|
}
|
|
11048
11284
|
}
|
|
11049
|
-
},
|
|
11285
|
+
}, _callee77, this);
|
|
11050
11286
|
}));
|
|
11051
11287
|
|
|
11052
|
-
function enrichURL(
|
|
11288
|
+
function enrichURL(_x111) {
|
|
11053
11289
|
return _enrichURL.apply(this, arguments);
|
|
11054
11290
|
}
|
|
11055
11291
|
|
|
@@ -11066,22 +11302,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11066
11302
|
}, {
|
|
11067
11303
|
key: "getTask",
|
|
11068
11304
|
value: function () {
|
|
11069
|
-
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11070
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11305
|
+
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee78(id) {
|
|
11306
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee78$(_context78) {
|
|
11071
11307
|
while (1) {
|
|
11072
|
-
switch (
|
|
11308
|
+
switch (_context78.prev = _context78.next) {
|
|
11073
11309
|
case 0:
|
|
11074
|
-
return
|
|
11310
|
+
return _context78.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
11075
11311
|
|
|
11076
11312
|
case 1:
|
|
11077
11313
|
case "end":
|
|
11078
|
-
return
|
|
11314
|
+
return _context78.stop();
|
|
11079
11315
|
}
|
|
11080
11316
|
}
|
|
11081
|
-
},
|
|
11317
|
+
}, _callee78, this);
|
|
11082
11318
|
}));
|
|
11083
11319
|
|
|
11084
|
-
function getTask(
|
|
11320
|
+
function getTask(_x112) {
|
|
11085
11321
|
return _getTask.apply(this, arguments);
|
|
11086
11322
|
}
|
|
11087
11323
|
|
|
@@ -11099,31 +11335,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11099
11335
|
}, {
|
|
11100
11336
|
key: "deleteChannels",
|
|
11101
11337
|
value: function () {
|
|
11102
|
-
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11338
|
+
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee79(cids) {
|
|
11103
11339
|
var options,
|
|
11104
|
-
|
|
11105
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11340
|
+
_args79 = arguments;
|
|
11341
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee79$(_context79) {
|
|
11106
11342
|
while (1) {
|
|
11107
|
-
switch (
|
|
11343
|
+
switch (_context79.prev = _context79.next) {
|
|
11108
11344
|
case 0:
|
|
11109
|
-
options =
|
|
11110
|
-
|
|
11345
|
+
options = _args79.length > 1 && _args79[1] !== undefined ? _args79[1] : {};
|
|
11346
|
+
_context79.next = 3;
|
|
11111
11347
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
11112
11348
|
cids: cids
|
|
11113
11349
|
}, options));
|
|
11114
11350
|
|
|
11115
11351
|
case 3:
|
|
11116
|
-
return
|
|
11352
|
+
return _context79.abrupt("return", _context79.sent);
|
|
11117
11353
|
|
|
11118
11354
|
case 4:
|
|
11119
11355
|
case "end":
|
|
11120
|
-
return
|
|
11356
|
+
return _context79.stop();
|
|
11121
11357
|
}
|
|
11122
11358
|
}
|
|
11123
|
-
},
|
|
11359
|
+
}, _callee79, this);
|
|
11124
11360
|
}));
|
|
11125
11361
|
|
|
11126
|
-
function deleteChannels(
|
|
11362
|
+
function deleteChannels(_x113) {
|
|
11127
11363
|
return _deleteChannels.apply(this, arguments);
|
|
11128
11364
|
}
|
|
11129
11365
|
|
|
@@ -11141,52 +11377,56 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11141
11377
|
}, {
|
|
11142
11378
|
key: "deleteUsers",
|
|
11143
11379
|
value: function () {
|
|
11144
|
-
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11145
|
-
|
|
11380
|
+
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee80(user_ids) {
|
|
11381
|
+
var options,
|
|
11382
|
+
_args80 = arguments;
|
|
11383
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee80$(_context80) {
|
|
11146
11384
|
while (1) {
|
|
11147
|
-
switch (
|
|
11385
|
+
switch (_context80.prev = _context80.next) {
|
|
11148
11386
|
case 0:
|
|
11149
|
-
|
|
11150
|
-
|
|
11387
|
+
options = _args80.length > 1 && _args80[1] !== undefined ? _args80[1] : {};
|
|
11388
|
+
|
|
11389
|
+
if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
|
|
11390
|
+
_context80.next = 3;
|
|
11151
11391
|
break;
|
|
11152
11392
|
}
|
|
11153
11393
|
|
|
11154
|
-
throw new Error('Invalid delete user options. user must be one of [soft hard]');
|
|
11394
|
+
throw new Error('Invalid delete user options. user must be one of [soft hard pruning]');
|
|
11155
11395
|
|
|
11156
|
-
case
|
|
11157
|
-
if (!(options.
|
|
11158
|
-
|
|
11396
|
+
case 3:
|
|
11397
|
+
if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
|
|
11398
|
+
_context80.next = 5;
|
|
11159
11399
|
break;
|
|
11160
11400
|
}
|
|
11161
11401
|
|
|
11162
|
-
throw new Error('Invalid delete user options.
|
|
11402
|
+
throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
|
|
11163
11403
|
|
|
11164
|
-
case
|
|
11165
|
-
if (!(options.
|
|
11166
|
-
|
|
11404
|
+
case 5:
|
|
11405
|
+
if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
|
|
11406
|
+
_context80.next = 7;
|
|
11167
11407
|
break;
|
|
11168
11408
|
}
|
|
11169
11409
|
|
|
11170
|
-
throw new Error('Invalid delete user options.
|
|
11410
|
+
throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
|
|
11171
11411
|
|
|
11172
|
-
case
|
|
11173
|
-
|
|
11412
|
+
case 7:
|
|
11413
|
+
_context80.next = 9;
|
|
11174
11414
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
11175
11415
|
user_ids: user_ids
|
|
11176
11416
|
}, options));
|
|
11177
11417
|
|
|
11178
|
-
case 8:
|
|
11179
|
-
return _context75.abrupt("return", _context75.sent);
|
|
11180
|
-
|
|
11181
11418
|
case 9:
|
|
11419
|
+
return _context80.abrupt("return", _context80.sent);
|
|
11420
|
+
|
|
11421
|
+
case 10:
|
|
11182
11422
|
case "end":
|
|
11183
|
-
return
|
|
11423
|
+
return _context80.stop();
|
|
11184
11424
|
}
|
|
11185
11425
|
}
|
|
11186
|
-
},
|
|
11426
|
+
}, _callee80, this);
|
|
11187
11427
|
}));
|
|
11188
11428
|
|
|
11189
|
-
function deleteUsers(
|
|
11429
|
+
function deleteUsers(_x114) {
|
|
11190
11430
|
return _deleteUsers.apply(this, arguments);
|
|
11191
11431
|
}
|
|
11192
11432
|
|
|
@@ -11207,28 +11447,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11207
11447
|
}, {
|
|
11208
11448
|
key: "_createImportURL",
|
|
11209
11449
|
value: function () {
|
|
11210
|
-
var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11211
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11450
|
+
var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee81(filename) {
|
|
11451
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee81$(_context81) {
|
|
11212
11452
|
while (1) {
|
|
11213
|
-
switch (
|
|
11453
|
+
switch (_context81.prev = _context81.next) {
|
|
11214
11454
|
case 0:
|
|
11215
|
-
|
|
11455
|
+
_context81.next = 2;
|
|
11216
11456
|
return this.post(this.baseURL + "/import_urls", {
|
|
11217
11457
|
filename: filename
|
|
11218
11458
|
});
|
|
11219
11459
|
|
|
11220
11460
|
case 2:
|
|
11221
|
-
return
|
|
11461
|
+
return _context81.abrupt("return", _context81.sent);
|
|
11222
11462
|
|
|
11223
11463
|
case 3:
|
|
11224
11464
|
case "end":
|
|
11225
|
-
return
|
|
11465
|
+
return _context81.stop();
|
|
11226
11466
|
}
|
|
11227
11467
|
}
|
|
11228
|
-
},
|
|
11468
|
+
}, _callee81, this);
|
|
11229
11469
|
}));
|
|
11230
11470
|
|
|
11231
|
-
function _createImportURL(
|
|
11471
|
+
function _createImportURL(_x115) {
|
|
11232
11472
|
return _createImportURL2.apply(this, arguments);
|
|
11233
11473
|
}
|
|
11234
11474
|
|
|
@@ -11250,33 +11490,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11250
11490
|
}, {
|
|
11251
11491
|
key: "_createImport",
|
|
11252
11492
|
value: function () {
|
|
11253
|
-
var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11493
|
+
var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee82(path) {
|
|
11254
11494
|
var options,
|
|
11255
|
-
|
|
11256
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11495
|
+
_args82 = arguments;
|
|
11496
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee82$(_context82) {
|
|
11257
11497
|
while (1) {
|
|
11258
|
-
switch (
|
|
11498
|
+
switch (_context82.prev = _context82.next) {
|
|
11259
11499
|
case 0:
|
|
11260
|
-
options =
|
|
11500
|
+
options = _args82.length > 1 && _args82[1] !== undefined ? _args82[1] : {
|
|
11261
11501
|
mode: 'upsert'
|
|
11262
11502
|
};
|
|
11263
|
-
|
|
11503
|
+
_context82.next = 3;
|
|
11264
11504
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
11265
11505
|
path: path
|
|
11266
11506
|
}, options));
|
|
11267
11507
|
|
|
11268
11508
|
case 3:
|
|
11269
|
-
return
|
|
11509
|
+
return _context82.abrupt("return", _context82.sent);
|
|
11270
11510
|
|
|
11271
11511
|
case 4:
|
|
11272
11512
|
case "end":
|
|
11273
|
-
return
|
|
11513
|
+
return _context82.stop();
|
|
11274
11514
|
}
|
|
11275
11515
|
}
|
|
11276
|
-
},
|
|
11516
|
+
}, _callee82, this);
|
|
11277
11517
|
}));
|
|
11278
11518
|
|
|
11279
|
-
function _createImport(
|
|
11519
|
+
function _createImport(_x116) {
|
|
11280
11520
|
return _createImport2.apply(this, arguments);
|
|
11281
11521
|
}
|
|
11282
11522
|
|
|
@@ -11298,26 +11538,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11298
11538
|
}, {
|
|
11299
11539
|
key: "_getImport",
|
|
11300
11540
|
value: function () {
|
|
11301
|
-
var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11302
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11541
|
+
var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee83(id) {
|
|
11542
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee83$(_context83) {
|
|
11303
11543
|
while (1) {
|
|
11304
|
-
switch (
|
|
11544
|
+
switch (_context83.prev = _context83.next) {
|
|
11305
11545
|
case 0:
|
|
11306
|
-
|
|
11546
|
+
_context83.next = 2;
|
|
11307
11547
|
return this.get(this.baseURL + "/imports/".concat(id));
|
|
11308
11548
|
|
|
11309
11549
|
case 2:
|
|
11310
|
-
return
|
|
11550
|
+
return _context83.abrupt("return", _context83.sent);
|
|
11311
11551
|
|
|
11312
11552
|
case 3:
|
|
11313
11553
|
case "end":
|
|
11314
|
-
return
|
|
11554
|
+
return _context83.stop();
|
|
11315
11555
|
}
|
|
11316
11556
|
}
|
|
11317
|
-
},
|
|
11557
|
+
}, _callee83, this);
|
|
11318
11558
|
}));
|
|
11319
11559
|
|
|
11320
|
-
function _getImport(
|
|
11560
|
+
function _getImport(_x117) {
|
|
11321
11561
|
return _getImport2.apply(this, arguments);
|
|
11322
11562
|
}
|
|
11323
11563
|
|
|
@@ -11339,26 +11579,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11339
11579
|
}, {
|
|
11340
11580
|
key: "_listImports",
|
|
11341
11581
|
value: function () {
|
|
11342
|
-
var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11343
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11582
|
+
var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee84(options) {
|
|
11583
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee84$(_context84) {
|
|
11344
11584
|
while (1) {
|
|
11345
|
-
switch (
|
|
11585
|
+
switch (_context84.prev = _context84.next) {
|
|
11346
11586
|
case 0:
|
|
11347
|
-
|
|
11587
|
+
_context84.next = 2;
|
|
11348
11588
|
return this.get(this.baseURL + "/imports", options);
|
|
11349
11589
|
|
|
11350
11590
|
case 2:
|
|
11351
|
-
return
|
|
11591
|
+
return _context84.abrupt("return", _context84.sent);
|
|
11352
11592
|
|
|
11353
11593
|
case 3:
|
|
11354
11594
|
case "end":
|
|
11355
|
-
return
|
|
11595
|
+
return _context84.stop();
|
|
11356
11596
|
}
|
|
11357
11597
|
}
|
|
11358
|
-
},
|
|
11598
|
+
}, _callee84, this);
|
|
11359
11599
|
}));
|
|
11360
11600
|
|
|
11361
|
-
function _listImports(
|
|
11601
|
+
function _listImports(_x118) {
|
|
11362
11602
|
return _listImports2.apply(this, arguments);
|
|
11363
11603
|
}
|
|
11364
11604
|
|
|
@@ -11377,28 +11617,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11377
11617
|
}, {
|
|
11378
11618
|
key: "upsertPushProvider",
|
|
11379
11619
|
value: function () {
|
|
11380
|
-
var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11381
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11620
|
+
var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee85(pushProvider) {
|
|
11621
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee85$(_context85) {
|
|
11382
11622
|
while (1) {
|
|
11383
|
-
switch (
|
|
11623
|
+
switch (_context85.prev = _context85.next) {
|
|
11384
11624
|
case 0:
|
|
11385
|
-
|
|
11625
|
+
_context85.next = 2;
|
|
11386
11626
|
return this.post(this.baseURL + "/push_providers", {
|
|
11387
11627
|
push_provider: pushProvider
|
|
11388
11628
|
});
|
|
11389
11629
|
|
|
11390
11630
|
case 2:
|
|
11391
|
-
return
|
|
11631
|
+
return _context85.abrupt("return", _context85.sent);
|
|
11392
11632
|
|
|
11393
11633
|
case 3:
|
|
11394
11634
|
case "end":
|
|
11395
|
-
return
|
|
11635
|
+
return _context85.stop();
|
|
11396
11636
|
}
|
|
11397
11637
|
}
|
|
11398
|
-
},
|
|
11638
|
+
}, _callee85, this);
|
|
11399
11639
|
}));
|
|
11400
11640
|
|
|
11401
|
-
function upsertPushProvider(
|
|
11641
|
+
function upsertPushProvider(_x119) {
|
|
11402
11642
|
return _upsertPushProvider.apply(this, arguments);
|
|
11403
11643
|
}
|
|
11404
11644
|
|
|
@@ -11417,28 +11657,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11417
11657
|
}, {
|
|
11418
11658
|
key: "deletePushProvider",
|
|
11419
11659
|
value: function () {
|
|
11420
|
-
var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11660
|
+
var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee86(_ref10) {
|
|
11421
11661
|
var type, name;
|
|
11422
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11662
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee86$(_context86) {
|
|
11423
11663
|
while (1) {
|
|
11424
|
-
switch (
|
|
11664
|
+
switch (_context86.prev = _context86.next) {
|
|
11425
11665
|
case 0:
|
|
11426
11666
|
type = _ref10.type, name = _ref10.name;
|
|
11427
|
-
|
|
11667
|
+
_context86.next = 3;
|
|
11428
11668
|
return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
|
|
11429
11669
|
|
|
11430
11670
|
case 3:
|
|
11431
|
-
return
|
|
11671
|
+
return _context86.abrupt("return", _context86.sent);
|
|
11432
11672
|
|
|
11433
11673
|
case 4:
|
|
11434
11674
|
case "end":
|
|
11435
|
-
return
|
|
11675
|
+
return _context86.stop();
|
|
11436
11676
|
}
|
|
11437
11677
|
}
|
|
11438
|
-
},
|
|
11678
|
+
}, _callee86, this);
|
|
11439
11679
|
}));
|
|
11440
11680
|
|
|
11441
|
-
function deletePushProvider(
|
|
11681
|
+
function deletePushProvider(_x120) {
|
|
11442
11682
|
return _deletePushProvider.apply(this, arguments);
|
|
11443
11683
|
}
|
|
11444
11684
|
|
|
@@ -11455,23 +11695,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11455
11695
|
}, {
|
|
11456
11696
|
key: "listPushProviders",
|
|
11457
11697
|
value: function () {
|
|
11458
|
-
var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11459
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11698
|
+
var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee87() {
|
|
11699
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee87$(_context87) {
|
|
11460
11700
|
while (1) {
|
|
11461
|
-
switch (
|
|
11701
|
+
switch (_context87.prev = _context87.next) {
|
|
11462
11702
|
case 0:
|
|
11463
|
-
|
|
11703
|
+
_context87.next = 2;
|
|
11464
11704
|
return this.get(this.baseURL + "/push_providers");
|
|
11465
11705
|
|
|
11466
11706
|
case 2:
|
|
11467
|
-
return
|
|
11707
|
+
return _context87.abrupt("return", _context87.sent);
|
|
11468
11708
|
|
|
11469
11709
|
case 3:
|
|
11470
11710
|
case "end":
|
|
11471
|
-
return
|
|
11711
|
+
return _context87.stop();
|
|
11472
11712
|
}
|
|
11473
11713
|
}
|
|
11474
|
-
},
|
|
11714
|
+
}, _callee87, this);
|
|
11475
11715
|
}));
|
|
11476
11716
|
|
|
11477
11717
|
function listPushProviders() {
|
|
@@ -11499,26 +11739,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11499
11739
|
}, {
|
|
11500
11740
|
key: "commitMessage",
|
|
11501
11741
|
value: function () {
|
|
11502
|
-
var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11503
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11742
|
+
var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee88(id) {
|
|
11743
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee88$(_context88) {
|
|
11504
11744
|
while (1) {
|
|
11505
|
-
switch (
|
|
11745
|
+
switch (_context88.prev = _context88.next) {
|
|
11506
11746
|
case 0:
|
|
11507
|
-
|
|
11747
|
+
_context88.next = 2;
|
|
11508
11748
|
return this.post(this.baseURL + "/messages/".concat(id, "/commit"));
|
|
11509
11749
|
|
|
11510
11750
|
case 2:
|
|
11511
|
-
return
|
|
11751
|
+
return _context88.abrupt("return", _context88.sent);
|
|
11512
11752
|
|
|
11513
11753
|
case 3:
|
|
11514
11754
|
case "end":
|
|
11515
|
-
return
|
|
11755
|
+
return _context88.stop();
|
|
11516
11756
|
}
|
|
11517
11757
|
}
|
|
11518
|
-
},
|
|
11758
|
+
}, _callee88, this);
|
|
11519
11759
|
}));
|
|
11520
11760
|
|
|
11521
|
-
function commitMessage(
|
|
11761
|
+
function commitMessage(_x121) {
|
|
11522
11762
|
return _commitMessage.apply(this, arguments);
|
|
11523
11763
|
}
|
|
11524
11764
|
|
|
@@ -11570,6 +11810,7 @@ var EVENT_MAP = {
|
|
|
11570
11810
|
'notification.invite_rejected': true,
|
|
11571
11811
|
'notification.invited': true,
|
|
11572
11812
|
'notification.mark_read': true,
|
|
11813
|
+
'notification.mark_unread': true,
|
|
11573
11814
|
'notification.message_new': true,
|
|
11574
11815
|
'notification.mutes_updated': true,
|
|
11575
11816
|
'notification.removed_from_channel': true,
|