stream-chat 8.51.0 → 8.52.1
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 +571 -498
- 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 +571 -498
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +571 -498
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +571 -498
- package/dist/index.js.map +1 -1
- package/dist/types/client.d.ts +12 -1
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/client_state.d.ts +5 -1
- package/dist/types/client_state.d.ts.map +1 -1
- package/dist/types/poll_manager.d.ts.map +1 -1
- package/dist/types/types.d.ts +17 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +1 -1
- package/src/client.ts +39 -9
- package/src/client_state.ts +6 -3
- package/src/poll_manager.ts +3 -0
- package/src/types.ts +18 -2
package/dist/browser.es.js
CHANGED
|
@@ -4232,7 +4232,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
4232
4232
|
delete this.getClient().activeChannels[tempChannelCid];
|
|
4233
4233
|
}
|
|
4234
4234
|
|
|
4235
|
-
if (!(this.cid in this.getClient().activeChannels)) {
|
|
4235
|
+
if (!(this.cid in this.getClient().activeChannels) && this.getClient()._cacheEnabled()) {
|
|
4236
4236
|
this.getClient().activeChannels[this.cid] = this;
|
|
4237
4237
|
}
|
|
4238
4238
|
}
|
|
@@ -5200,15 +5200,20 @@ function _arrayLikeToArray$3(arr, len) { if (len == null || len > arr.length) le
|
|
|
5200
5200
|
* ClientState - A container class for the client state.
|
|
5201
5201
|
*/
|
|
5202
5202
|
var ClientState = /*#__PURE__*/function () {
|
|
5203
|
-
function ClientState() {
|
|
5203
|
+
function ClientState(_ref) {
|
|
5204
|
+
var client = _ref.client;
|
|
5205
|
+
|
|
5204
5206
|
_classCallCheck(this, ClientState);
|
|
5205
5207
|
|
|
5208
|
+
_defineProperty(this, "client", void 0);
|
|
5209
|
+
|
|
5206
5210
|
_defineProperty(this, "users", void 0);
|
|
5207
5211
|
|
|
5208
5212
|
_defineProperty(this, "userChannelReferences", void 0);
|
|
5209
5213
|
|
|
5210
5214
|
// show the status for a certain user...
|
|
5211
5215
|
// ie online, offline etc
|
|
5216
|
+
this.client = client;
|
|
5212
5217
|
this.users = {}; // store which channels contain references to the specified user...
|
|
5213
5218
|
|
|
5214
5219
|
this.userChannelReferences = {};
|
|
@@ -5234,14 +5239,14 @@ var ClientState = /*#__PURE__*/function () {
|
|
|
5234
5239
|
}, {
|
|
5235
5240
|
key: "updateUser",
|
|
5236
5241
|
value: function updateUser(user) {
|
|
5237
|
-
if (user != null) {
|
|
5242
|
+
if (user != null && this.client._cacheEnabled()) {
|
|
5238
5243
|
this.users[user.id] = user;
|
|
5239
5244
|
}
|
|
5240
5245
|
}
|
|
5241
5246
|
}, {
|
|
5242
5247
|
key: "updateUserReference",
|
|
5243
5248
|
value: function updateUserReference(user, channelID) {
|
|
5244
|
-
if (user == null) {
|
|
5249
|
+
if (user == null || !this.client._cacheEnabled()) {
|
|
5245
5250
|
return;
|
|
5246
5251
|
}
|
|
5247
5252
|
|
|
@@ -10290,6 +10295,10 @@ var PollManager = /*#__PURE__*/function () {
|
|
|
10290
10295
|
});
|
|
10291
10296
|
|
|
10292
10297
|
_defineProperty(this, "setOrOverwriteInCache", function (pollResponse, overwriteState) {
|
|
10298
|
+
if (!_this.client._cacheEnabled()) {
|
|
10299
|
+
return;
|
|
10300
|
+
}
|
|
10301
|
+
|
|
10293
10302
|
var pollFromCache = _this.fromState(pollResponse.id);
|
|
10294
10303
|
|
|
10295
10304
|
if (!pollFromCache) {
|
|
@@ -10712,7 +10721,9 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10712
10721
|
|
|
10713
10722
|
_this.activeChannels = {}; // reset client state
|
|
10714
10723
|
|
|
10715
|
-
_this.state = new ClientState(
|
|
10724
|
+
_this.state = new ClientState({
|
|
10725
|
+
client: _this
|
|
10726
|
+
}); // reset thread manager
|
|
10716
10727
|
|
|
10717
10728
|
_this.threads.resetState(); // reset token manager
|
|
10718
10729
|
|
|
@@ -10979,10 +10990,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10979
10990
|
|
|
10980
10991
|
for (var _channelID3 in refMap) {
|
|
10981
10992
|
var _channel4 = _this.activeChannels[_channelID3];
|
|
10982
|
-
var state = _channel4.state;
|
|
10983
|
-
/** deleted the messages from this user. */
|
|
10984
10993
|
|
|
10985
|
-
|
|
10994
|
+
if (_channel4) {
|
|
10995
|
+
var state = _channel4.state;
|
|
10996
|
+
/** deleted the messages from this user. */
|
|
10997
|
+
|
|
10998
|
+
state === null || state === void 0 ? void 0 : state.deleteUserMessages(user, hardDelete);
|
|
10999
|
+
}
|
|
10986
11000
|
}
|
|
10987
11001
|
});
|
|
10988
11002
|
|
|
@@ -11156,7 +11170,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11156
11170
|
var channel = new Channel(_this, channelType, undefined, custom); // For the time being set the key as membersStr, since we don't know the cid yet.
|
|
11157
11171
|
// In channel.query, we will replace it with 'cid'.
|
|
11158
11172
|
|
|
11159
|
-
_this.
|
|
11173
|
+
if (_this._cacheEnabled()) {
|
|
11174
|
+
_this.activeChannels[tempCid] = channel;
|
|
11175
|
+
}
|
|
11176
|
+
|
|
11160
11177
|
return channel;
|
|
11161
11178
|
});
|
|
11162
11179
|
|
|
@@ -11168,7 +11185,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11168
11185
|
|
|
11169
11186
|
var cid = "".concat(channelType, ":").concat(channelID);
|
|
11170
11187
|
|
|
11171
|
-
if (cid in _this.activeChannels && !_this.activeChannels[cid].disconnected) {
|
|
11188
|
+
if (cid in _this.activeChannels && _this.activeChannels[cid] && !_this.activeChannels[cid].disconnected) {
|
|
11172
11189
|
var _channel6 = _this.activeChannels[cid];
|
|
11173
11190
|
|
|
11174
11191
|
if (Object.keys(custom).length > 0) {
|
|
@@ -11180,7 +11197,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11180
11197
|
}
|
|
11181
11198
|
|
|
11182
11199
|
var channel = new Channel(_this, channelType, channelID, custom);
|
|
11183
|
-
|
|
11200
|
+
|
|
11201
|
+
if (_this._cacheEnabled()) {
|
|
11202
|
+
_this.activeChannels[channel.cid] = channel;
|
|
11203
|
+
}
|
|
11204
|
+
|
|
11184
11205
|
return channel;
|
|
11185
11206
|
});
|
|
11186
11207
|
|
|
@@ -11196,6 +11217,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11196
11217
|
return !!_this.secret;
|
|
11197
11218
|
});
|
|
11198
11219
|
|
|
11220
|
+
_defineProperty(this, "_cacheEnabled", function () {
|
|
11221
|
+
return !_this._isUsingServerAuth() || !_this.options.disableCache;
|
|
11222
|
+
});
|
|
11223
|
+
|
|
11199
11224
|
_defineProperty(this, "_buildWSPayload", function (client_request_id) {
|
|
11200
11225
|
return JSON.stringify({
|
|
11201
11226
|
user_id: _this.userID,
|
|
@@ -11208,7 +11233,9 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11208
11233
|
// set the key
|
|
11209
11234
|
this.key = _key;
|
|
11210
11235
|
this.listeners = {};
|
|
11211
|
-
this.state = new ClientState(
|
|
11236
|
+
this.state = new ClientState({
|
|
11237
|
+
client: this
|
|
11238
|
+
}); // a list of channels to hide ws events from
|
|
11212
11239
|
|
|
11213
11240
|
this.mutedChannels = [];
|
|
11214
11241
|
this.mutedUsers = [];
|
|
@@ -11227,7 +11254,8 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11227
11254
|
withCredentials: false,
|
|
11228
11255
|
// making sure cookies are not sent
|
|
11229
11256
|
warmUp: false,
|
|
11230
|
-
recoverStateOnReconnect: true
|
|
11257
|
+
recoverStateOnReconnect: true,
|
|
11258
|
+
disableCache: false
|
|
11231
11259
|
}, inputOptions);
|
|
11232
11260
|
|
|
11233
11261
|
if (this.node && !this.options.httpsAgent) {
|
|
@@ -12955,7 +12983,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12955
12983
|
value: function _addChannelConfig(_ref8) {
|
|
12956
12984
|
var cid = _ref8.cid,
|
|
12957
12985
|
config = _ref8.config;
|
|
12958
|
-
|
|
12986
|
+
|
|
12987
|
+
if (this._cacheEnabled()) {
|
|
12988
|
+
this.configs[cid] = config;
|
|
12989
|
+
}
|
|
12959
12990
|
}
|
|
12960
12991
|
/**
|
|
12961
12992
|
* channel - Returns a new channel with the given type, id and custom data
|
|
@@ -14366,6 +14397,48 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14366
14397
|
|
|
14367
14398
|
return translateMessage;
|
|
14368
14399
|
}()
|
|
14400
|
+
/**
|
|
14401
|
+
* translate - translates the given text to provided language
|
|
14402
|
+
*
|
|
14403
|
+
* @param {string} text
|
|
14404
|
+
* @param {string} destination_language
|
|
14405
|
+
* @param {string} source_language
|
|
14406
|
+
*
|
|
14407
|
+
* @return {TranslateResponse} Response that includes the message
|
|
14408
|
+
*/
|
|
14409
|
+
|
|
14410
|
+
}, {
|
|
14411
|
+
key: "translate",
|
|
14412
|
+
value: function () {
|
|
14413
|
+
var _translate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(text, destination_language, source_language) {
|
|
14414
|
+
return _regeneratorRuntime.wrap(function _callee59$(_context59) {
|
|
14415
|
+
while (1) {
|
|
14416
|
+
switch (_context59.prev = _context59.next) {
|
|
14417
|
+
case 0:
|
|
14418
|
+
_context59.next = 2;
|
|
14419
|
+
return this.post(this.baseURL + "/translate", {
|
|
14420
|
+
text: text,
|
|
14421
|
+
source_language: source_language,
|
|
14422
|
+
destination_language: destination_language
|
|
14423
|
+
});
|
|
14424
|
+
|
|
14425
|
+
case 2:
|
|
14426
|
+
return _context59.abrupt("return", _context59.sent);
|
|
14427
|
+
|
|
14428
|
+
case 3:
|
|
14429
|
+
case "end":
|
|
14430
|
+
return _context59.stop();
|
|
14431
|
+
}
|
|
14432
|
+
}
|
|
14433
|
+
}, _callee59, this);
|
|
14434
|
+
}));
|
|
14435
|
+
|
|
14436
|
+
function translate(_x75, _x76, _x77) {
|
|
14437
|
+
return _translate.apply(this, arguments);
|
|
14438
|
+
}
|
|
14439
|
+
|
|
14440
|
+
return translate;
|
|
14441
|
+
}()
|
|
14369
14442
|
/**
|
|
14370
14443
|
* _normalizeExpiration - transforms expiration value into ISO string
|
|
14371
14444
|
* @param {undefined|null|number|string|Date} timeoutOrExpirationDate expiration date or timeout. Use number type to set timeout in seconds, string or Date to set exact expiration date
|
|
@@ -14462,14 +14535,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14462
14535
|
}, {
|
|
14463
14536
|
key: "updateMessage",
|
|
14464
14537
|
value: function () {
|
|
14465
|
-
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14538
|
+
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(message, userId, options) {
|
|
14466
14539
|
var clonedMessage, reservedMessageFields;
|
|
14467
|
-
return _regeneratorRuntime.wrap(function
|
|
14540
|
+
return _regeneratorRuntime.wrap(function _callee60$(_context60) {
|
|
14468
14541
|
while (1) {
|
|
14469
|
-
switch (
|
|
14542
|
+
switch (_context60.prev = _context60.next) {
|
|
14470
14543
|
case 0:
|
|
14471
14544
|
if (message.id) {
|
|
14472
|
-
|
|
14545
|
+
_context60.next = 2;
|
|
14473
14546
|
break;
|
|
14474
14547
|
}
|
|
14475
14548
|
|
|
@@ -14506,23 +14579,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14506
14579
|
});
|
|
14507
14580
|
}
|
|
14508
14581
|
|
|
14509
|
-
|
|
14582
|
+
_context60.next = 10;
|
|
14510
14583
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(message.id)), _objectSpread({
|
|
14511
14584
|
message: clonedMessage
|
|
14512
14585
|
}, options));
|
|
14513
14586
|
|
|
14514
14587
|
case 10:
|
|
14515
|
-
return
|
|
14588
|
+
return _context60.abrupt("return", _context60.sent);
|
|
14516
14589
|
|
|
14517
14590
|
case 11:
|
|
14518
14591
|
case "end":
|
|
14519
|
-
return
|
|
14592
|
+
return _context60.stop();
|
|
14520
14593
|
}
|
|
14521
14594
|
}
|
|
14522
|
-
},
|
|
14595
|
+
}, _callee60, this);
|
|
14523
14596
|
}));
|
|
14524
14597
|
|
|
14525
|
-
function updateMessage(
|
|
14598
|
+
function updateMessage(_x78, _x79, _x80) {
|
|
14526
14599
|
return _updateMessage.apply(this, arguments);
|
|
14527
14600
|
}
|
|
14528
14601
|
|
|
@@ -14545,14 +14618,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14545
14618
|
}, {
|
|
14546
14619
|
key: "partialUpdateMessage",
|
|
14547
14620
|
value: function () {
|
|
14548
|
-
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14621
|
+
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id, partialMessageObject, userId, options) {
|
|
14549
14622
|
var user;
|
|
14550
|
-
return _regeneratorRuntime.wrap(function
|
|
14623
|
+
return _regeneratorRuntime.wrap(function _callee61$(_context61) {
|
|
14551
14624
|
while (1) {
|
|
14552
|
-
switch (
|
|
14625
|
+
switch (_context61.prev = _context61.next) {
|
|
14553
14626
|
case 0:
|
|
14554
14627
|
if (id) {
|
|
14555
|
-
|
|
14628
|
+
_context61.next = 2;
|
|
14556
14629
|
break;
|
|
14557
14630
|
}
|
|
14558
14631
|
|
|
@@ -14567,23 +14640,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14567
14640
|
};
|
|
14568
14641
|
}
|
|
14569
14642
|
|
|
14570
|
-
|
|
14643
|
+
_context61.next = 6;
|
|
14571
14644
|
return this.put(this.baseURL + "/messages/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
14572
14645
|
user: user
|
|
14573
14646
|
}));
|
|
14574
14647
|
|
|
14575
14648
|
case 6:
|
|
14576
|
-
return
|
|
14649
|
+
return _context61.abrupt("return", _context61.sent);
|
|
14577
14650
|
|
|
14578
14651
|
case 7:
|
|
14579
14652
|
case "end":
|
|
14580
|
-
return
|
|
14653
|
+
return _context61.stop();
|
|
14581
14654
|
}
|
|
14582
14655
|
}
|
|
14583
|
-
},
|
|
14656
|
+
}, _callee61, this);
|
|
14584
14657
|
}));
|
|
14585
14658
|
|
|
14586
|
-
function partialUpdateMessage(
|
|
14659
|
+
function partialUpdateMessage(_x81, _x82, _x83, _x84) {
|
|
14587
14660
|
return _partialUpdateMessage.apply(this, arguments);
|
|
14588
14661
|
}
|
|
14589
14662
|
|
|
@@ -14592,11 +14665,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14592
14665
|
}, {
|
|
14593
14666
|
key: "deleteMessage",
|
|
14594
14667
|
value: function () {
|
|
14595
|
-
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14668
|
+
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(messageID, hardDelete) {
|
|
14596
14669
|
var params;
|
|
14597
|
-
return _regeneratorRuntime.wrap(function
|
|
14670
|
+
return _regeneratorRuntime.wrap(function _callee62$(_context62) {
|
|
14598
14671
|
while (1) {
|
|
14599
|
-
switch (
|
|
14672
|
+
switch (_context62.prev = _context62.next) {
|
|
14600
14673
|
case 0:
|
|
14601
14674
|
params = {};
|
|
14602
14675
|
|
|
@@ -14606,21 +14679,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14606
14679
|
};
|
|
14607
14680
|
}
|
|
14608
14681
|
|
|
14609
|
-
|
|
14682
|
+
_context62.next = 4;
|
|
14610
14683
|
return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), params);
|
|
14611
14684
|
|
|
14612
14685
|
case 4:
|
|
14613
|
-
return
|
|
14686
|
+
return _context62.abrupt("return", _context62.sent);
|
|
14614
14687
|
|
|
14615
14688
|
case 5:
|
|
14616
14689
|
case "end":
|
|
14617
|
-
return
|
|
14690
|
+
return _context62.stop();
|
|
14618
14691
|
}
|
|
14619
14692
|
}
|
|
14620
|
-
},
|
|
14693
|
+
}, _callee62, this);
|
|
14621
14694
|
}));
|
|
14622
14695
|
|
|
14623
|
-
function deleteMessage(
|
|
14696
|
+
function deleteMessage(_x85, _x86) {
|
|
14624
14697
|
return _deleteMessage.apply(this, arguments);
|
|
14625
14698
|
}
|
|
14626
14699
|
|
|
@@ -14642,28 +14715,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14642
14715
|
}, {
|
|
14643
14716
|
key: "undeleteMessage",
|
|
14644
14717
|
value: function () {
|
|
14645
|
-
var _undeleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14646
|
-
return _regeneratorRuntime.wrap(function
|
|
14718
|
+
var _undeleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(messageID, userID) {
|
|
14719
|
+
return _regeneratorRuntime.wrap(function _callee63$(_context63) {
|
|
14647
14720
|
while (1) {
|
|
14648
|
-
switch (
|
|
14721
|
+
switch (_context63.prev = _context63.next) {
|
|
14649
14722
|
case 0:
|
|
14650
|
-
|
|
14723
|
+
_context63.next = 2;
|
|
14651
14724
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageID), "/undelete"), {
|
|
14652
14725
|
undeleted_by: userID
|
|
14653
14726
|
});
|
|
14654
14727
|
|
|
14655
14728
|
case 2:
|
|
14656
|
-
return
|
|
14729
|
+
return _context63.abrupt("return", _context63.sent);
|
|
14657
14730
|
|
|
14658
14731
|
case 3:
|
|
14659
14732
|
case "end":
|
|
14660
|
-
return
|
|
14733
|
+
return _context63.stop();
|
|
14661
14734
|
}
|
|
14662
14735
|
}
|
|
14663
|
-
},
|
|
14736
|
+
}, _callee63, this);
|
|
14664
14737
|
}));
|
|
14665
14738
|
|
|
14666
|
-
function undeleteMessage(
|
|
14739
|
+
function undeleteMessage(_x87, _x88) {
|
|
14667
14740
|
return _undeleteMessage.apply(this, arguments);
|
|
14668
14741
|
}
|
|
14669
14742
|
|
|
@@ -14672,26 +14745,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14672
14745
|
}, {
|
|
14673
14746
|
key: "getMessage",
|
|
14674
14747
|
value: function () {
|
|
14675
|
-
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14676
|
-
return _regeneratorRuntime.wrap(function
|
|
14748
|
+
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(messageID, options) {
|
|
14749
|
+
return _regeneratorRuntime.wrap(function _callee64$(_context64) {
|
|
14677
14750
|
while (1) {
|
|
14678
|
-
switch (
|
|
14751
|
+
switch (_context64.prev = _context64.next) {
|
|
14679
14752
|
case 0:
|
|
14680
|
-
|
|
14753
|
+
_context64.next = 2;
|
|
14681
14754
|
return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), _objectSpread({}, options));
|
|
14682
14755
|
|
|
14683
14756
|
case 2:
|
|
14684
|
-
return
|
|
14757
|
+
return _context64.abrupt("return", _context64.sent);
|
|
14685
14758
|
|
|
14686
14759
|
case 3:
|
|
14687
14760
|
case "end":
|
|
14688
|
-
return
|
|
14761
|
+
return _context64.stop();
|
|
14689
14762
|
}
|
|
14690
14763
|
}
|
|
14691
|
-
},
|
|
14764
|
+
}, _callee64, this);
|
|
14692
14765
|
}));
|
|
14693
14766
|
|
|
14694
|
-
function getMessage(
|
|
14767
|
+
function getMessage(_x89, _x90) {
|
|
14695
14768
|
return _getMessage.apply(this, arguments);
|
|
14696
14769
|
}
|
|
14697
14770
|
|
|
@@ -14712,30 +14785,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14712
14785
|
}, {
|
|
14713
14786
|
key: "queryThreads",
|
|
14714
14787
|
value: function () {
|
|
14715
|
-
var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14788
|
+
var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65() {
|
|
14716
14789
|
var _this5 = this;
|
|
14717
14790
|
|
|
14718
14791
|
var options,
|
|
14719
14792
|
optionsWithDefaults,
|
|
14720
14793
|
response,
|
|
14721
|
-
|
|
14722
|
-
return _regeneratorRuntime.wrap(function
|
|
14794
|
+
_args65 = arguments;
|
|
14795
|
+
return _regeneratorRuntime.wrap(function _callee65$(_context65) {
|
|
14723
14796
|
while (1) {
|
|
14724
|
-
switch (
|
|
14797
|
+
switch (_context65.prev = _context65.next) {
|
|
14725
14798
|
case 0:
|
|
14726
|
-
options =
|
|
14799
|
+
options = _args65.length > 0 && _args65[0] !== undefined ? _args65[0] : {};
|
|
14727
14800
|
optionsWithDefaults = _objectSpread({
|
|
14728
14801
|
limit: 10,
|
|
14729
14802
|
participant_limit: 10,
|
|
14730
14803
|
reply_limit: 3,
|
|
14731
14804
|
watch: true
|
|
14732
14805
|
}, options);
|
|
14733
|
-
|
|
14806
|
+
_context65.next = 4;
|
|
14734
14807
|
return this.post("".concat(this.baseURL, "/threads"), optionsWithDefaults);
|
|
14735
14808
|
|
|
14736
14809
|
case 4:
|
|
14737
|
-
response =
|
|
14738
|
-
return
|
|
14810
|
+
response = _context65.sent;
|
|
14811
|
+
return _context65.abrupt("return", {
|
|
14739
14812
|
threads: response.threads.map(function (thread) {
|
|
14740
14813
|
return new Thread({
|
|
14741
14814
|
client: _this5,
|
|
@@ -14747,10 +14820,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14747
14820
|
|
|
14748
14821
|
case 6:
|
|
14749
14822
|
case "end":
|
|
14750
|
-
return
|
|
14823
|
+
return _context65.stop();
|
|
14751
14824
|
}
|
|
14752
14825
|
}
|
|
14753
|
-
},
|
|
14826
|
+
}, _callee65, this);
|
|
14754
14827
|
}));
|
|
14755
14828
|
|
|
14756
14829
|
function queryThreads() {
|
|
@@ -14774,19 +14847,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14774
14847
|
}, {
|
|
14775
14848
|
key: "getThread",
|
|
14776
14849
|
value: function () {
|
|
14777
|
-
var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14850
|
+
var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(messageId) {
|
|
14778
14851
|
var options,
|
|
14779
14852
|
optionsWithDefaults,
|
|
14780
14853
|
response,
|
|
14781
|
-
|
|
14782
|
-
return _regeneratorRuntime.wrap(function
|
|
14854
|
+
_args66 = arguments;
|
|
14855
|
+
return _regeneratorRuntime.wrap(function _callee66$(_context66) {
|
|
14783
14856
|
while (1) {
|
|
14784
|
-
switch (
|
|
14857
|
+
switch (_context66.prev = _context66.next) {
|
|
14785
14858
|
case 0:
|
|
14786
|
-
options =
|
|
14859
|
+
options = _args66.length > 1 && _args66[1] !== undefined ? _args66[1] : {};
|
|
14787
14860
|
|
|
14788
14861
|
if (messageId) {
|
|
14789
|
-
|
|
14862
|
+
_context66.next = 3;
|
|
14790
14863
|
break;
|
|
14791
14864
|
}
|
|
14792
14865
|
|
|
@@ -14798,25 +14871,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14798
14871
|
reply_limit: 3,
|
|
14799
14872
|
watch: true
|
|
14800
14873
|
}, options);
|
|
14801
|
-
|
|
14874
|
+
_context66.next = 6;
|
|
14802
14875
|
return this.get("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), optionsWithDefaults);
|
|
14803
14876
|
|
|
14804
14877
|
case 6:
|
|
14805
|
-
response =
|
|
14806
|
-
return
|
|
14878
|
+
response = _context66.sent;
|
|
14879
|
+
return _context66.abrupt("return", new Thread({
|
|
14807
14880
|
client: this,
|
|
14808
14881
|
threadData: response.thread
|
|
14809
14882
|
}));
|
|
14810
14883
|
|
|
14811
14884
|
case 8:
|
|
14812
14885
|
case "end":
|
|
14813
|
-
return
|
|
14886
|
+
return _context66.stop();
|
|
14814
14887
|
}
|
|
14815
14888
|
}
|
|
14816
|
-
},
|
|
14889
|
+
}, _callee66, this);
|
|
14817
14890
|
}));
|
|
14818
14891
|
|
|
14819
|
-
function getThread(
|
|
14892
|
+
function getThread(_x91) {
|
|
14820
14893
|
return _getThread.apply(this, arguments);
|
|
14821
14894
|
}
|
|
14822
14895
|
|
|
@@ -14834,15 +14907,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14834
14907
|
}, {
|
|
14835
14908
|
key: "partialUpdateThread",
|
|
14836
14909
|
value: function () {
|
|
14837
|
-
var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14910
|
+
var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(messageId, partialThreadObject) {
|
|
14838
14911
|
var reservedThreadFields, _key5;
|
|
14839
14912
|
|
|
14840
|
-
return _regeneratorRuntime.wrap(function
|
|
14913
|
+
return _regeneratorRuntime.wrap(function _callee67$(_context67) {
|
|
14841
14914
|
while (1) {
|
|
14842
|
-
switch (
|
|
14915
|
+
switch (_context67.prev = _context67.next) {
|
|
14843
14916
|
case 0:
|
|
14844
14917
|
if (messageId) {
|
|
14845
|
-
|
|
14918
|
+
_context67.next = 2;
|
|
14846
14919
|
break;
|
|
14847
14920
|
}
|
|
14848
14921
|
|
|
@@ -14852,43 +14925,43 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14852
14925
|
// check for reserved fields from ThreadResponse type within partialThreadObject's set and unset.
|
|
14853
14926
|
// Throw error if any of the reserved field is found.
|
|
14854
14927
|
reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel', 'custom'];
|
|
14855
|
-
|
|
14928
|
+
_context67.t0 = _regeneratorRuntime.keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
|
|
14856
14929
|
|
|
14857
14930
|
case 4:
|
|
14858
|
-
if ((
|
|
14859
|
-
|
|
14931
|
+
if ((_context67.t1 = _context67.t0()).done) {
|
|
14932
|
+
_context67.next = 10;
|
|
14860
14933
|
break;
|
|
14861
14934
|
}
|
|
14862
14935
|
|
|
14863
|
-
_key5 =
|
|
14936
|
+
_key5 = _context67.t1.value;
|
|
14864
14937
|
|
|
14865
14938
|
if (!reservedThreadFields.includes(_key5)) {
|
|
14866
|
-
|
|
14939
|
+
_context67.next = 8;
|
|
14867
14940
|
break;
|
|
14868
14941
|
}
|
|
14869
14942
|
|
|
14870
14943
|
throw Error("You cannot set ".concat(_key5, " field on Thread object. ").concat(_key5, " is reserved for server-side use. Please omit ").concat(_key5, " from your set object."));
|
|
14871
14944
|
|
|
14872
14945
|
case 8:
|
|
14873
|
-
|
|
14946
|
+
_context67.next = 4;
|
|
14874
14947
|
break;
|
|
14875
14948
|
|
|
14876
14949
|
case 10:
|
|
14877
|
-
|
|
14950
|
+
_context67.next = 12;
|
|
14878
14951
|
return this.patch("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), partialThreadObject);
|
|
14879
14952
|
|
|
14880
14953
|
case 12:
|
|
14881
|
-
return
|
|
14954
|
+
return _context67.abrupt("return", _context67.sent);
|
|
14882
14955
|
|
|
14883
14956
|
case 13:
|
|
14884
14957
|
case "end":
|
|
14885
|
-
return
|
|
14958
|
+
return _context67.stop();
|
|
14886
14959
|
}
|
|
14887
14960
|
}
|
|
14888
|
-
},
|
|
14961
|
+
}, _callee67, this);
|
|
14889
14962
|
}));
|
|
14890
14963
|
|
|
14891
|
-
function partialUpdateThread(
|
|
14964
|
+
function partialUpdateThread(_x92, _x93) {
|
|
14892
14965
|
return _partialUpdateThread.apply(this, arguments);
|
|
14893
14966
|
}
|
|
14894
14967
|
|
|
@@ -14897,7 +14970,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14897
14970
|
}, {
|
|
14898
14971
|
key: "getUserAgent",
|
|
14899
14972
|
value: function getUserAgent() {
|
|
14900
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
14973
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.52.1");
|
|
14901
14974
|
}
|
|
14902
14975
|
}, {
|
|
14903
14976
|
key: "setUserAgent",
|
|
@@ -15116,28 +15189,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15116
15189
|
}, {
|
|
15117
15190
|
key: "sendUserCustomEvent",
|
|
15118
15191
|
value: function () {
|
|
15119
|
-
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15120
|
-
return _regeneratorRuntime.wrap(function
|
|
15192
|
+
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(targetUserID, event) {
|
|
15193
|
+
return _regeneratorRuntime.wrap(function _callee68$(_context68) {
|
|
15121
15194
|
while (1) {
|
|
15122
|
-
switch (
|
|
15195
|
+
switch (_context68.prev = _context68.next) {
|
|
15123
15196
|
case 0:
|
|
15124
|
-
|
|
15197
|
+
_context68.next = 2;
|
|
15125
15198
|
return this.post("".concat(this.baseURL, "/users/").concat(encodeURIComponent(targetUserID), "/event"), {
|
|
15126
15199
|
event: event
|
|
15127
15200
|
});
|
|
15128
15201
|
|
|
15129
15202
|
case 2:
|
|
15130
|
-
return
|
|
15203
|
+
return _context68.abrupt("return", _context68.sent);
|
|
15131
15204
|
|
|
15132
15205
|
case 3:
|
|
15133
15206
|
case "end":
|
|
15134
|
-
return
|
|
15207
|
+
return _context68.stop();
|
|
15135
15208
|
}
|
|
15136
15209
|
}
|
|
15137
|
-
},
|
|
15210
|
+
}, _callee68, this);
|
|
15138
15211
|
}));
|
|
15139
15212
|
|
|
15140
|
-
function sendUserCustomEvent(
|
|
15213
|
+
function sendUserCustomEvent(_x94, _x95) {
|
|
15141
15214
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
15142
15215
|
}
|
|
15143
15216
|
|
|
@@ -15234,28 +15307,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15234
15307
|
}, {
|
|
15235
15308
|
key: "createSegment",
|
|
15236
15309
|
value: function () {
|
|
15237
|
-
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15310
|
+
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(type, id, data) {
|
|
15238
15311
|
var body;
|
|
15239
|
-
return _regeneratorRuntime.wrap(function
|
|
15312
|
+
return _regeneratorRuntime.wrap(function _callee69$(_context69) {
|
|
15240
15313
|
while (1) {
|
|
15241
|
-
switch (
|
|
15314
|
+
switch (_context69.prev = _context69.next) {
|
|
15242
15315
|
case 0:
|
|
15243
15316
|
this.validateServerSideAuth();
|
|
15244
15317
|
body = _objectSpread({
|
|
15245
15318
|
id: id,
|
|
15246
15319
|
type: type
|
|
15247
15320
|
}, data);
|
|
15248
|
-
return
|
|
15321
|
+
return _context69.abrupt("return", this.post(this.baseURL + "/segments", body));
|
|
15249
15322
|
|
|
15250
15323
|
case 3:
|
|
15251
15324
|
case "end":
|
|
15252
|
-
return
|
|
15325
|
+
return _context69.stop();
|
|
15253
15326
|
}
|
|
15254
15327
|
}
|
|
15255
|
-
},
|
|
15328
|
+
}, _callee69, this);
|
|
15256
15329
|
}));
|
|
15257
15330
|
|
|
15258
|
-
function createSegment(
|
|
15331
|
+
function createSegment(_x96, _x97, _x98) {
|
|
15259
15332
|
return _createSegment.apply(this, arguments);
|
|
15260
15333
|
}
|
|
15261
15334
|
|
|
@@ -15274,23 +15347,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15274
15347
|
}, {
|
|
15275
15348
|
key: "createUserSegment",
|
|
15276
15349
|
value: function () {
|
|
15277
|
-
var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15278
|
-
return _regeneratorRuntime.wrap(function
|
|
15350
|
+
var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(id, data) {
|
|
15351
|
+
return _regeneratorRuntime.wrap(function _callee70$(_context70) {
|
|
15279
15352
|
while (1) {
|
|
15280
|
-
switch (
|
|
15353
|
+
switch (_context70.prev = _context70.next) {
|
|
15281
15354
|
case 0:
|
|
15282
15355
|
this.validateServerSideAuth();
|
|
15283
|
-
return
|
|
15356
|
+
return _context70.abrupt("return", this.createSegment('user', id, data));
|
|
15284
15357
|
|
|
15285
15358
|
case 2:
|
|
15286
15359
|
case "end":
|
|
15287
|
-
return
|
|
15360
|
+
return _context70.stop();
|
|
15288
15361
|
}
|
|
15289
15362
|
}
|
|
15290
|
-
},
|
|
15363
|
+
}, _callee70, this);
|
|
15291
15364
|
}));
|
|
15292
15365
|
|
|
15293
|
-
function createUserSegment(
|
|
15366
|
+
function createUserSegment(_x99, _x100) {
|
|
15294
15367
|
return _createUserSegment.apply(this, arguments);
|
|
15295
15368
|
}
|
|
15296
15369
|
|
|
@@ -15309,23 +15382,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15309
15382
|
}, {
|
|
15310
15383
|
key: "createChannelSegment",
|
|
15311
15384
|
value: function () {
|
|
15312
|
-
var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15313
|
-
return _regeneratorRuntime.wrap(function
|
|
15385
|
+
var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id, data) {
|
|
15386
|
+
return _regeneratorRuntime.wrap(function _callee71$(_context71) {
|
|
15314
15387
|
while (1) {
|
|
15315
|
-
switch (
|
|
15388
|
+
switch (_context71.prev = _context71.next) {
|
|
15316
15389
|
case 0:
|
|
15317
15390
|
this.validateServerSideAuth();
|
|
15318
|
-
return
|
|
15391
|
+
return _context71.abrupt("return", this.createSegment('channel', id, data));
|
|
15319
15392
|
|
|
15320
15393
|
case 2:
|
|
15321
15394
|
case "end":
|
|
15322
|
-
return
|
|
15395
|
+
return _context71.stop();
|
|
15323
15396
|
}
|
|
15324
15397
|
}
|
|
15325
|
-
},
|
|
15398
|
+
}, _callee71, this);
|
|
15326
15399
|
}));
|
|
15327
15400
|
|
|
15328
|
-
function createChannelSegment(
|
|
15401
|
+
function createChannelSegment(_x101, _x102) {
|
|
15329
15402
|
return _createChannelSegment.apply(this, arguments);
|
|
15330
15403
|
}
|
|
15331
15404
|
|
|
@@ -15334,23 +15407,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15334
15407
|
}, {
|
|
15335
15408
|
key: "getSegment",
|
|
15336
15409
|
value: function () {
|
|
15337
|
-
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15338
|
-
return _regeneratorRuntime.wrap(function
|
|
15410
|
+
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id) {
|
|
15411
|
+
return _regeneratorRuntime.wrap(function _callee72$(_context72) {
|
|
15339
15412
|
while (1) {
|
|
15340
|
-
switch (
|
|
15413
|
+
switch (_context72.prev = _context72.next) {
|
|
15341
15414
|
case 0:
|
|
15342
15415
|
this.validateServerSideAuth();
|
|
15343
|
-
return
|
|
15416
|
+
return _context72.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
|
|
15344
15417
|
|
|
15345
15418
|
case 2:
|
|
15346
15419
|
case "end":
|
|
15347
|
-
return
|
|
15420
|
+
return _context72.stop();
|
|
15348
15421
|
}
|
|
15349
15422
|
}
|
|
15350
|
-
},
|
|
15423
|
+
}, _callee72, this);
|
|
15351
15424
|
}));
|
|
15352
15425
|
|
|
15353
|
-
function getSegment(
|
|
15426
|
+
function getSegment(_x103) {
|
|
15354
15427
|
return _getSegment.apply(this, arguments);
|
|
15355
15428
|
}
|
|
15356
15429
|
|
|
@@ -15368,23 +15441,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15368
15441
|
}, {
|
|
15369
15442
|
key: "updateSegment",
|
|
15370
15443
|
value: function () {
|
|
15371
|
-
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15372
|
-
return _regeneratorRuntime.wrap(function
|
|
15444
|
+
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id, data) {
|
|
15445
|
+
return _regeneratorRuntime.wrap(function _callee73$(_context73) {
|
|
15373
15446
|
while (1) {
|
|
15374
|
-
switch (
|
|
15447
|
+
switch (_context73.prev = _context73.next) {
|
|
15375
15448
|
case 0:
|
|
15376
15449
|
this.validateServerSideAuth();
|
|
15377
|
-
return
|
|
15450
|
+
return _context73.abrupt("return", this.put(this.baseURL + "/segments/".concat(encodeURIComponent(id)), data));
|
|
15378
15451
|
|
|
15379
15452
|
case 2:
|
|
15380
15453
|
case "end":
|
|
15381
|
-
return
|
|
15454
|
+
return _context73.stop();
|
|
15382
15455
|
}
|
|
15383
15456
|
}
|
|
15384
|
-
},
|
|
15457
|
+
}, _callee73, this);
|
|
15385
15458
|
}));
|
|
15386
15459
|
|
|
15387
|
-
function updateSegment(
|
|
15460
|
+
function updateSegment(_x104, _x105) {
|
|
15388
15461
|
return _updateSegment.apply(this, arguments);
|
|
15389
15462
|
}
|
|
15390
15463
|
|
|
@@ -15402,27 +15475,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15402
15475
|
}, {
|
|
15403
15476
|
key: "addSegmentTargets",
|
|
15404
15477
|
value: function () {
|
|
15405
|
-
var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15478
|
+
var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(id, targets) {
|
|
15406
15479
|
var body;
|
|
15407
|
-
return _regeneratorRuntime.wrap(function
|
|
15480
|
+
return _regeneratorRuntime.wrap(function _callee74$(_context74) {
|
|
15408
15481
|
while (1) {
|
|
15409
|
-
switch (
|
|
15482
|
+
switch (_context74.prev = _context74.next) {
|
|
15410
15483
|
case 0:
|
|
15411
15484
|
this.validateServerSideAuth();
|
|
15412
15485
|
body = {
|
|
15413
15486
|
target_ids: targets
|
|
15414
15487
|
};
|
|
15415
|
-
return
|
|
15488
|
+
return _context74.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/addtargets"), body));
|
|
15416
15489
|
|
|
15417
15490
|
case 3:
|
|
15418
15491
|
case "end":
|
|
15419
|
-
return
|
|
15492
|
+
return _context74.stop();
|
|
15420
15493
|
}
|
|
15421
15494
|
}
|
|
15422
|
-
},
|
|
15495
|
+
}, _callee74, this);
|
|
15423
15496
|
}));
|
|
15424
15497
|
|
|
15425
|
-
function addSegmentTargets(
|
|
15498
|
+
function addSegmentTargets(_x106, _x107) {
|
|
15426
15499
|
return _addSegmentTargets.apply(this, arguments);
|
|
15427
15500
|
}
|
|
15428
15501
|
|
|
@@ -15431,33 +15504,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15431
15504
|
}, {
|
|
15432
15505
|
key: "querySegmentTargets",
|
|
15433
15506
|
value: function () {
|
|
15434
|
-
var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15507
|
+
var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(id) {
|
|
15435
15508
|
var filter,
|
|
15436
15509
|
sort,
|
|
15437
15510
|
options,
|
|
15438
|
-
|
|
15439
|
-
return _regeneratorRuntime.wrap(function
|
|
15511
|
+
_args75 = arguments;
|
|
15512
|
+
return _regeneratorRuntime.wrap(function _callee75$(_context75) {
|
|
15440
15513
|
while (1) {
|
|
15441
|
-
switch (
|
|
15514
|
+
switch (_context75.prev = _context75.next) {
|
|
15442
15515
|
case 0:
|
|
15443
|
-
filter =
|
|
15444
|
-
sort =
|
|
15445
|
-
options =
|
|
15516
|
+
filter = _args75.length > 1 && _args75[1] !== undefined ? _args75[1] : {};
|
|
15517
|
+
sort = _args75.length > 2 && _args75[2] !== undefined ? _args75[2] : [];
|
|
15518
|
+
options = _args75.length > 3 && _args75[3] !== undefined ? _args75[3] : {};
|
|
15446
15519
|
this.validateServerSideAuth();
|
|
15447
|
-
return
|
|
15520
|
+
return _context75.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/targets/query"), _objectSpread({
|
|
15448
15521
|
filter: filter || {},
|
|
15449
15522
|
sort: sort || []
|
|
15450
15523
|
}, options)));
|
|
15451
15524
|
|
|
15452
15525
|
case 5:
|
|
15453
15526
|
case "end":
|
|
15454
|
-
return
|
|
15527
|
+
return _context75.stop();
|
|
15455
15528
|
}
|
|
15456
15529
|
}
|
|
15457
|
-
},
|
|
15530
|
+
}, _callee75, this);
|
|
15458
15531
|
}));
|
|
15459
15532
|
|
|
15460
|
-
function querySegmentTargets(
|
|
15533
|
+
function querySegmentTargets(_x108) {
|
|
15461
15534
|
return _querySegmentTargets.apply(this, arguments);
|
|
15462
15535
|
}
|
|
15463
15536
|
|
|
@@ -15475,27 +15548,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15475
15548
|
}, {
|
|
15476
15549
|
key: "removeSegmentTargets",
|
|
15477
15550
|
value: function () {
|
|
15478
|
-
var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15551
|
+
var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(id, targets) {
|
|
15479
15552
|
var body;
|
|
15480
|
-
return _regeneratorRuntime.wrap(function
|
|
15553
|
+
return _regeneratorRuntime.wrap(function _callee76$(_context76) {
|
|
15481
15554
|
while (1) {
|
|
15482
|
-
switch (
|
|
15555
|
+
switch (_context76.prev = _context76.next) {
|
|
15483
15556
|
case 0:
|
|
15484
15557
|
this.validateServerSideAuth();
|
|
15485
15558
|
body = {
|
|
15486
15559
|
target_ids: targets
|
|
15487
15560
|
};
|
|
15488
|
-
return
|
|
15561
|
+
return _context76.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/deletetargets"), body));
|
|
15489
15562
|
|
|
15490
15563
|
case 3:
|
|
15491
15564
|
case "end":
|
|
15492
|
-
return
|
|
15565
|
+
return _context76.stop();
|
|
15493
15566
|
}
|
|
15494
15567
|
}
|
|
15495
|
-
},
|
|
15568
|
+
}, _callee76, this);
|
|
15496
15569
|
}));
|
|
15497
15570
|
|
|
15498
|
-
function removeSegmentTargets(
|
|
15571
|
+
function removeSegmentTargets(_x109, _x110) {
|
|
15499
15572
|
return _removeSegmentTargets.apply(this, arguments);
|
|
15500
15573
|
}
|
|
15501
15574
|
|
|
@@ -15513,29 +15586,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15513
15586
|
}, {
|
|
15514
15587
|
key: "querySegments",
|
|
15515
15588
|
value: function () {
|
|
15516
|
-
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15589
|
+
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(filter, sort) {
|
|
15517
15590
|
var options,
|
|
15518
|
-
|
|
15519
|
-
return _regeneratorRuntime.wrap(function
|
|
15591
|
+
_args77 = arguments;
|
|
15592
|
+
return _regeneratorRuntime.wrap(function _callee77$(_context77) {
|
|
15520
15593
|
while (1) {
|
|
15521
|
-
switch (
|
|
15594
|
+
switch (_context77.prev = _context77.next) {
|
|
15522
15595
|
case 0:
|
|
15523
|
-
options =
|
|
15596
|
+
options = _args77.length > 2 && _args77[2] !== undefined ? _args77[2] : {};
|
|
15524
15597
|
this.validateServerSideAuth();
|
|
15525
|
-
return
|
|
15598
|
+
return _context77.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
|
|
15526
15599
|
filter: filter,
|
|
15527
15600
|
sort: sort
|
|
15528
15601
|
}, options)));
|
|
15529
15602
|
|
|
15530
15603
|
case 3:
|
|
15531
15604
|
case "end":
|
|
15532
|
-
return
|
|
15605
|
+
return _context77.stop();
|
|
15533
15606
|
}
|
|
15534
15607
|
}
|
|
15535
|
-
},
|
|
15608
|
+
}, _callee77, this);
|
|
15536
15609
|
}));
|
|
15537
15610
|
|
|
15538
|
-
function querySegments(
|
|
15611
|
+
function querySegments(_x111, _x112) {
|
|
15539
15612
|
return _querySegments.apply(this, arguments);
|
|
15540
15613
|
}
|
|
15541
15614
|
|
|
@@ -15552,23 +15625,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15552
15625
|
}, {
|
|
15553
15626
|
key: "deleteSegment",
|
|
15554
15627
|
value: function () {
|
|
15555
|
-
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15556
|
-
return _regeneratorRuntime.wrap(function
|
|
15628
|
+
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(id) {
|
|
15629
|
+
return _regeneratorRuntime.wrap(function _callee78$(_context78) {
|
|
15557
15630
|
while (1) {
|
|
15558
|
-
switch (
|
|
15631
|
+
switch (_context78.prev = _context78.next) {
|
|
15559
15632
|
case 0:
|
|
15560
15633
|
this.validateServerSideAuth();
|
|
15561
|
-
return
|
|
15634
|
+
return _context78.abrupt("return", this.delete(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
|
|
15562
15635
|
|
|
15563
15636
|
case 2:
|
|
15564
15637
|
case "end":
|
|
15565
|
-
return
|
|
15638
|
+
return _context78.stop();
|
|
15566
15639
|
}
|
|
15567
15640
|
}
|
|
15568
|
-
},
|
|
15641
|
+
}, _callee78, this);
|
|
15569
15642
|
}));
|
|
15570
15643
|
|
|
15571
|
-
function deleteSegment(
|
|
15644
|
+
function deleteSegment(_x113) {
|
|
15572
15645
|
return _deleteSegment.apply(this, arguments);
|
|
15573
15646
|
}
|
|
15574
15647
|
|
|
@@ -15586,23 +15659,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15586
15659
|
}, {
|
|
15587
15660
|
key: "segmentTargetExists",
|
|
15588
15661
|
value: function () {
|
|
15589
|
-
var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15590
|
-
return _regeneratorRuntime.wrap(function
|
|
15662
|
+
var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(segmentId, targetId) {
|
|
15663
|
+
return _regeneratorRuntime.wrap(function _callee79$(_context79) {
|
|
15591
15664
|
while (1) {
|
|
15592
|
-
switch (
|
|
15665
|
+
switch (_context79.prev = _context79.next) {
|
|
15593
15666
|
case 0:
|
|
15594
15667
|
this.validateServerSideAuth();
|
|
15595
|
-
return
|
|
15668
|
+
return _context79.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(segmentId), "/target/").concat(encodeURIComponent(targetId))));
|
|
15596
15669
|
|
|
15597
15670
|
case 2:
|
|
15598
15671
|
case "end":
|
|
15599
|
-
return
|
|
15672
|
+
return _context79.stop();
|
|
15600
15673
|
}
|
|
15601
15674
|
}
|
|
15602
|
-
},
|
|
15675
|
+
}, _callee79, this);
|
|
15603
15676
|
}));
|
|
15604
15677
|
|
|
15605
|
-
function segmentTargetExists(
|
|
15678
|
+
function segmentTargetExists(_x114, _x115) {
|
|
15606
15679
|
return _segmentTargetExists.apply(this, arguments);
|
|
15607
15680
|
}
|
|
15608
15681
|
|
|
@@ -15619,23 +15692,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15619
15692
|
}, {
|
|
15620
15693
|
key: "createCampaign",
|
|
15621
15694
|
value: function () {
|
|
15622
|
-
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15623
|
-
return _regeneratorRuntime.wrap(function
|
|
15695
|
+
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(params) {
|
|
15696
|
+
return _regeneratorRuntime.wrap(function _callee80$(_context80) {
|
|
15624
15697
|
while (1) {
|
|
15625
|
-
switch (
|
|
15698
|
+
switch (_context80.prev = _context80.next) {
|
|
15626
15699
|
case 0:
|
|
15627
15700
|
this.validateServerSideAuth();
|
|
15628
|
-
return
|
|
15701
|
+
return _context80.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
|
|
15629
15702
|
|
|
15630
15703
|
case 2:
|
|
15631
15704
|
case "end":
|
|
15632
|
-
return
|
|
15705
|
+
return _context80.stop();
|
|
15633
15706
|
}
|
|
15634
15707
|
}
|
|
15635
|
-
},
|
|
15708
|
+
}, _callee80, this);
|
|
15636
15709
|
}));
|
|
15637
15710
|
|
|
15638
|
-
function createCampaign(
|
|
15711
|
+
function createCampaign(_x116) {
|
|
15639
15712
|
return _createCampaign.apply(this, arguments);
|
|
15640
15713
|
}
|
|
15641
15714
|
|
|
@@ -15644,23 +15717,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15644
15717
|
}, {
|
|
15645
15718
|
key: "getCampaign",
|
|
15646
15719
|
value: function () {
|
|
15647
|
-
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15648
|
-
return _regeneratorRuntime.wrap(function
|
|
15720
|
+
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(id) {
|
|
15721
|
+
return _regeneratorRuntime.wrap(function _callee81$(_context81) {
|
|
15649
15722
|
while (1) {
|
|
15650
|
-
switch (
|
|
15723
|
+
switch (_context81.prev = _context81.next) {
|
|
15651
15724
|
case 0:
|
|
15652
15725
|
this.validateServerSideAuth();
|
|
15653
|
-
return
|
|
15726
|
+
return _context81.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
|
|
15654
15727
|
|
|
15655
15728
|
case 2:
|
|
15656
15729
|
case "end":
|
|
15657
|
-
return
|
|
15730
|
+
return _context81.stop();
|
|
15658
15731
|
}
|
|
15659
15732
|
}
|
|
15660
|
-
},
|
|
15733
|
+
}, _callee81, this);
|
|
15661
15734
|
}));
|
|
15662
15735
|
|
|
15663
|
-
function getCampaign(
|
|
15736
|
+
function getCampaign(_x117) {
|
|
15664
15737
|
return _getCampaign.apply(this, arguments);
|
|
15665
15738
|
}
|
|
15666
15739
|
|
|
@@ -15669,26 +15742,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15669
15742
|
}, {
|
|
15670
15743
|
key: "startCampaign",
|
|
15671
15744
|
value: function () {
|
|
15672
|
-
var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15673
|
-
return _regeneratorRuntime.wrap(function
|
|
15745
|
+
var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(id, options) {
|
|
15746
|
+
return _regeneratorRuntime.wrap(function _callee82$(_context82) {
|
|
15674
15747
|
while (1) {
|
|
15675
|
-
switch (
|
|
15748
|
+
switch (_context82.prev = _context82.next) {
|
|
15676
15749
|
case 0:
|
|
15677
15750
|
this.validateServerSideAuth();
|
|
15678
|
-
return
|
|
15751
|
+
return _context82.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/start"), {
|
|
15679
15752
|
scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
|
|
15680
15753
|
stop_at: options === null || options === void 0 ? void 0 : options.stopAt
|
|
15681
15754
|
}));
|
|
15682
15755
|
|
|
15683
15756
|
case 2:
|
|
15684
15757
|
case "end":
|
|
15685
|
-
return
|
|
15758
|
+
return _context82.stop();
|
|
15686
15759
|
}
|
|
15687
15760
|
}
|
|
15688
|
-
},
|
|
15761
|
+
}, _callee82, this);
|
|
15689
15762
|
}));
|
|
15690
15763
|
|
|
15691
|
-
function startCampaign(
|
|
15764
|
+
function startCampaign(_x118, _x119) {
|
|
15692
15765
|
return _startCampaign.apply(this, arguments);
|
|
15693
15766
|
}
|
|
15694
15767
|
|
|
@@ -15704,30 +15777,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15704
15777
|
}, {
|
|
15705
15778
|
key: "queryCampaigns",
|
|
15706
15779
|
value: function () {
|
|
15707
|
-
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15708
|
-
return _regeneratorRuntime.wrap(function
|
|
15780
|
+
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(filter, sort, options) {
|
|
15781
|
+
return _regeneratorRuntime.wrap(function _callee83$(_context83) {
|
|
15709
15782
|
while (1) {
|
|
15710
|
-
switch (
|
|
15783
|
+
switch (_context83.prev = _context83.next) {
|
|
15711
15784
|
case 0:
|
|
15712
15785
|
this.validateServerSideAuth();
|
|
15713
|
-
|
|
15786
|
+
_context83.next = 3;
|
|
15714
15787
|
return this.post(this.baseURL + "/campaigns/query", _objectSpread({
|
|
15715
15788
|
filter: filter,
|
|
15716
15789
|
sort: sort
|
|
15717
15790
|
}, options || {}));
|
|
15718
15791
|
|
|
15719
15792
|
case 3:
|
|
15720
|
-
return
|
|
15793
|
+
return _context83.abrupt("return", _context83.sent);
|
|
15721
15794
|
|
|
15722
15795
|
case 4:
|
|
15723
15796
|
case "end":
|
|
15724
|
-
return
|
|
15797
|
+
return _context83.stop();
|
|
15725
15798
|
}
|
|
15726
15799
|
}
|
|
15727
|
-
},
|
|
15800
|
+
}, _callee83, this);
|
|
15728
15801
|
}));
|
|
15729
15802
|
|
|
15730
|
-
function queryCampaigns(
|
|
15803
|
+
function queryCampaigns(_x120, _x121, _x122) {
|
|
15731
15804
|
return _queryCampaigns.apply(this, arguments);
|
|
15732
15805
|
}
|
|
15733
15806
|
|
|
@@ -15745,23 +15818,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15745
15818
|
}, {
|
|
15746
15819
|
key: "updateCampaign",
|
|
15747
15820
|
value: function () {
|
|
15748
|
-
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15749
|
-
return _regeneratorRuntime.wrap(function
|
|
15821
|
+
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(id, params) {
|
|
15822
|
+
return _regeneratorRuntime.wrap(function _callee84$(_context84) {
|
|
15750
15823
|
while (1) {
|
|
15751
|
-
switch (
|
|
15824
|
+
switch (_context84.prev = _context84.next) {
|
|
15752
15825
|
case 0:
|
|
15753
15826
|
this.validateServerSideAuth();
|
|
15754
|
-
return
|
|
15827
|
+
return _context84.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(encodeURIComponent(id)), params));
|
|
15755
15828
|
|
|
15756
15829
|
case 2:
|
|
15757
15830
|
case "end":
|
|
15758
|
-
return
|
|
15831
|
+
return _context84.stop();
|
|
15759
15832
|
}
|
|
15760
15833
|
}
|
|
15761
|
-
},
|
|
15834
|
+
}, _callee84, this);
|
|
15762
15835
|
}));
|
|
15763
15836
|
|
|
15764
|
-
function updateCampaign(
|
|
15837
|
+
function updateCampaign(_x123, _x124) {
|
|
15765
15838
|
return _updateCampaign.apply(this, arguments);
|
|
15766
15839
|
}
|
|
15767
15840
|
|
|
@@ -15778,23 +15851,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15778
15851
|
}, {
|
|
15779
15852
|
key: "deleteCampaign",
|
|
15780
15853
|
value: function () {
|
|
15781
|
-
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15782
|
-
return _regeneratorRuntime.wrap(function
|
|
15854
|
+
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(id) {
|
|
15855
|
+
return _regeneratorRuntime.wrap(function _callee85$(_context85) {
|
|
15783
15856
|
while (1) {
|
|
15784
|
-
switch (
|
|
15857
|
+
switch (_context85.prev = _context85.next) {
|
|
15785
15858
|
case 0:
|
|
15786
15859
|
this.validateServerSideAuth();
|
|
15787
|
-
return
|
|
15860
|
+
return _context85.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
|
|
15788
15861
|
|
|
15789
15862
|
case 2:
|
|
15790
15863
|
case "end":
|
|
15791
|
-
return
|
|
15864
|
+
return _context85.stop();
|
|
15792
15865
|
}
|
|
15793
15866
|
}
|
|
15794
|
-
},
|
|
15867
|
+
}, _callee85, this);
|
|
15795
15868
|
}));
|
|
15796
15869
|
|
|
15797
|
-
function deleteCampaign(
|
|
15870
|
+
function deleteCampaign(_x125) {
|
|
15798
15871
|
return _deleteCampaign.apply(this, arguments);
|
|
15799
15872
|
}
|
|
15800
15873
|
|
|
@@ -15811,23 +15884,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15811
15884
|
}, {
|
|
15812
15885
|
key: "stopCampaign",
|
|
15813
15886
|
value: function () {
|
|
15814
|
-
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15815
|
-
return _regeneratorRuntime.wrap(function
|
|
15887
|
+
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(id) {
|
|
15888
|
+
return _regeneratorRuntime.wrap(function _callee86$(_context86) {
|
|
15816
15889
|
while (1) {
|
|
15817
|
-
switch (
|
|
15890
|
+
switch (_context86.prev = _context86.next) {
|
|
15818
15891
|
case 0:
|
|
15819
15892
|
this.validateServerSideAuth();
|
|
15820
|
-
return
|
|
15893
|
+
return _context86.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/stop")));
|
|
15821
15894
|
|
|
15822
15895
|
case 2:
|
|
15823
15896
|
case "end":
|
|
15824
|
-
return
|
|
15897
|
+
return _context86.stop();
|
|
15825
15898
|
}
|
|
15826
15899
|
}
|
|
15827
|
-
},
|
|
15900
|
+
}, _callee86, this);
|
|
15828
15901
|
}));
|
|
15829
15902
|
|
|
15830
|
-
function stopCampaign(
|
|
15903
|
+
function stopCampaign(_x126) {
|
|
15831
15904
|
return _stopCampaign.apply(this, arguments);
|
|
15832
15905
|
}
|
|
15833
15906
|
|
|
@@ -15843,24 +15916,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15843
15916
|
}, {
|
|
15844
15917
|
key: "enrichURL",
|
|
15845
15918
|
value: function () {
|
|
15846
|
-
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15847
|
-
return _regeneratorRuntime.wrap(function
|
|
15919
|
+
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87(url) {
|
|
15920
|
+
return _regeneratorRuntime.wrap(function _callee87$(_context87) {
|
|
15848
15921
|
while (1) {
|
|
15849
|
-
switch (
|
|
15922
|
+
switch (_context87.prev = _context87.next) {
|
|
15850
15923
|
case 0:
|
|
15851
|
-
return
|
|
15924
|
+
return _context87.abrupt("return", this.get(this.baseURL + "/og", {
|
|
15852
15925
|
url: url
|
|
15853
15926
|
}));
|
|
15854
15927
|
|
|
15855
15928
|
case 1:
|
|
15856
15929
|
case "end":
|
|
15857
|
-
return
|
|
15930
|
+
return _context87.stop();
|
|
15858
15931
|
}
|
|
15859
15932
|
}
|
|
15860
|
-
},
|
|
15933
|
+
}, _callee87, this);
|
|
15861
15934
|
}));
|
|
15862
15935
|
|
|
15863
|
-
function enrichURL(
|
|
15936
|
+
function enrichURL(_x127) {
|
|
15864
15937
|
return _enrichURL.apply(this, arguments);
|
|
15865
15938
|
}
|
|
15866
15939
|
|
|
@@ -15877,22 +15950,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15877
15950
|
}, {
|
|
15878
15951
|
key: "getTask",
|
|
15879
15952
|
value: function () {
|
|
15880
|
-
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15881
|
-
return _regeneratorRuntime.wrap(function
|
|
15953
|
+
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(id) {
|
|
15954
|
+
return _regeneratorRuntime.wrap(function _callee88$(_context88) {
|
|
15882
15955
|
while (1) {
|
|
15883
|
-
switch (
|
|
15956
|
+
switch (_context88.prev = _context88.next) {
|
|
15884
15957
|
case 0:
|
|
15885
|
-
return
|
|
15958
|
+
return _context88.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(encodeURIComponent(id))));
|
|
15886
15959
|
|
|
15887
15960
|
case 1:
|
|
15888
15961
|
case "end":
|
|
15889
|
-
return
|
|
15962
|
+
return _context88.stop();
|
|
15890
15963
|
}
|
|
15891
15964
|
}
|
|
15892
|
-
},
|
|
15965
|
+
}, _callee88, this);
|
|
15893
15966
|
}));
|
|
15894
15967
|
|
|
15895
|
-
function getTask(
|
|
15968
|
+
function getTask(_x128) {
|
|
15896
15969
|
return _getTask.apply(this, arguments);
|
|
15897
15970
|
}
|
|
15898
15971
|
|
|
@@ -15910,31 +15983,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15910
15983
|
}, {
|
|
15911
15984
|
key: "deleteChannels",
|
|
15912
15985
|
value: function () {
|
|
15913
|
-
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15986
|
+
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee89(cids) {
|
|
15914
15987
|
var options,
|
|
15915
|
-
|
|
15916
|
-
return _regeneratorRuntime.wrap(function
|
|
15988
|
+
_args89 = arguments;
|
|
15989
|
+
return _regeneratorRuntime.wrap(function _callee89$(_context89) {
|
|
15917
15990
|
while (1) {
|
|
15918
|
-
switch (
|
|
15991
|
+
switch (_context89.prev = _context89.next) {
|
|
15919
15992
|
case 0:
|
|
15920
|
-
options =
|
|
15921
|
-
|
|
15993
|
+
options = _args89.length > 1 && _args89[1] !== undefined ? _args89[1] : {};
|
|
15994
|
+
_context89.next = 3;
|
|
15922
15995
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
15923
15996
|
cids: cids
|
|
15924
15997
|
}, options));
|
|
15925
15998
|
|
|
15926
15999
|
case 3:
|
|
15927
|
-
return
|
|
16000
|
+
return _context89.abrupt("return", _context89.sent);
|
|
15928
16001
|
|
|
15929
16002
|
case 4:
|
|
15930
16003
|
case "end":
|
|
15931
|
-
return
|
|
16004
|
+
return _context89.stop();
|
|
15932
16005
|
}
|
|
15933
16006
|
}
|
|
15934
|
-
},
|
|
16007
|
+
}, _callee89, this);
|
|
15935
16008
|
}));
|
|
15936
16009
|
|
|
15937
|
-
function deleteChannels(
|
|
16010
|
+
function deleteChannels(_x129) {
|
|
15938
16011
|
return _deleteChannels.apply(this, arguments);
|
|
15939
16012
|
}
|
|
15940
16013
|
|
|
@@ -15952,17 +16025,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15952
16025
|
}, {
|
|
15953
16026
|
key: "deleteUsers",
|
|
15954
16027
|
value: function () {
|
|
15955
|
-
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16028
|
+
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee90(user_ids) {
|
|
15956
16029
|
var options,
|
|
15957
|
-
|
|
15958
|
-
return _regeneratorRuntime.wrap(function
|
|
16030
|
+
_args90 = arguments;
|
|
16031
|
+
return _regeneratorRuntime.wrap(function _callee90$(_context90) {
|
|
15959
16032
|
while (1) {
|
|
15960
|
-
switch (
|
|
16033
|
+
switch (_context90.prev = _context90.next) {
|
|
15961
16034
|
case 0:
|
|
15962
|
-
options =
|
|
16035
|
+
options = _args90.length > 1 && _args90[1] !== undefined ? _args90[1] : {};
|
|
15963
16036
|
|
|
15964
16037
|
if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
|
|
15965
|
-
|
|
16038
|
+
_context90.next = 3;
|
|
15966
16039
|
break;
|
|
15967
16040
|
}
|
|
15968
16041
|
|
|
@@ -15970,7 +16043,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15970
16043
|
|
|
15971
16044
|
case 3:
|
|
15972
16045
|
if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
|
|
15973
|
-
|
|
16046
|
+
_context90.next = 5;
|
|
15974
16047
|
break;
|
|
15975
16048
|
}
|
|
15976
16049
|
|
|
@@ -15978,30 +16051,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15978
16051
|
|
|
15979
16052
|
case 5:
|
|
15980
16053
|
if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
|
|
15981
|
-
|
|
16054
|
+
_context90.next = 7;
|
|
15982
16055
|
break;
|
|
15983
16056
|
}
|
|
15984
16057
|
|
|
15985
16058
|
throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
|
|
15986
16059
|
|
|
15987
16060
|
case 7:
|
|
15988
|
-
|
|
16061
|
+
_context90.next = 9;
|
|
15989
16062
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
15990
16063
|
user_ids: user_ids
|
|
15991
16064
|
}, options));
|
|
15992
16065
|
|
|
15993
16066
|
case 9:
|
|
15994
|
-
return
|
|
16067
|
+
return _context90.abrupt("return", _context90.sent);
|
|
15995
16068
|
|
|
15996
16069
|
case 10:
|
|
15997
16070
|
case "end":
|
|
15998
|
-
return
|
|
16071
|
+
return _context90.stop();
|
|
15999
16072
|
}
|
|
16000
16073
|
}
|
|
16001
|
-
},
|
|
16074
|
+
}, _callee90, this);
|
|
16002
16075
|
}));
|
|
16003
16076
|
|
|
16004
|
-
function deleteUsers(
|
|
16077
|
+
function deleteUsers(_x130) {
|
|
16005
16078
|
return _deleteUsers.apply(this, arguments);
|
|
16006
16079
|
}
|
|
16007
16080
|
|
|
@@ -16022,28 +16095,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16022
16095
|
}, {
|
|
16023
16096
|
key: "_createImportURL",
|
|
16024
16097
|
value: function () {
|
|
16025
|
-
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16026
|
-
return _regeneratorRuntime.wrap(function
|
|
16098
|
+
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee91(filename) {
|
|
16099
|
+
return _regeneratorRuntime.wrap(function _callee91$(_context91) {
|
|
16027
16100
|
while (1) {
|
|
16028
|
-
switch (
|
|
16101
|
+
switch (_context91.prev = _context91.next) {
|
|
16029
16102
|
case 0:
|
|
16030
|
-
|
|
16103
|
+
_context91.next = 2;
|
|
16031
16104
|
return this.post(this.baseURL + "/import_urls", {
|
|
16032
16105
|
filename: filename
|
|
16033
16106
|
});
|
|
16034
16107
|
|
|
16035
16108
|
case 2:
|
|
16036
|
-
return
|
|
16109
|
+
return _context91.abrupt("return", _context91.sent);
|
|
16037
16110
|
|
|
16038
16111
|
case 3:
|
|
16039
16112
|
case "end":
|
|
16040
|
-
return
|
|
16113
|
+
return _context91.stop();
|
|
16041
16114
|
}
|
|
16042
16115
|
}
|
|
16043
|
-
},
|
|
16116
|
+
}, _callee91, this);
|
|
16044
16117
|
}));
|
|
16045
16118
|
|
|
16046
|
-
function _createImportURL(
|
|
16119
|
+
function _createImportURL(_x131) {
|
|
16047
16120
|
return _createImportURL2.apply(this, arguments);
|
|
16048
16121
|
}
|
|
16049
16122
|
|
|
@@ -16065,33 +16138,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16065
16138
|
}, {
|
|
16066
16139
|
key: "_createImport",
|
|
16067
16140
|
value: function () {
|
|
16068
|
-
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16141
|
+
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee92(path) {
|
|
16069
16142
|
var options,
|
|
16070
|
-
|
|
16071
|
-
return _regeneratorRuntime.wrap(function
|
|
16143
|
+
_args92 = arguments;
|
|
16144
|
+
return _regeneratorRuntime.wrap(function _callee92$(_context92) {
|
|
16072
16145
|
while (1) {
|
|
16073
|
-
switch (
|
|
16146
|
+
switch (_context92.prev = _context92.next) {
|
|
16074
16147
|
case 0:
|
|
16075
|
-
options =
|
|
16148
|
+
options = _args92.length > 1 && _args92[1] !== undefined ? _args92[1] : {
|
|
16076
16149
|
mode: 'upsert'
|
|
16077
16150
|
};
|
|
16078
|
-
|
|
16151
|
+
_context92.next = 3;
|
|
16079
16152
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
16080
16153
|
path: path
|
|
16081
16154
|
}, options));
|
|
16082
16155
|
|
|
16083
16156
|
case 3:
|
|
16084
|
-
return
|
|
16157
|
+
return _context92.abrupt("return", _context92.sent);
|
|
16085
16158
|
|
|
16086
16159
|
case 4:
|
|
16087
16160
|
case "end":
|
|
16088
|
-
return
|
|
16161
|
+
return _context92.stop();
|
|
16089
16162
|
}
|
|
16090
16163
|
}
|
|
16091
|
-
},
|
|
16164
|
+
}, _callee92, this);
|
|
16092
16165
|
}));
|
|
16093
16166
|
|
|
16094
|
-
function _createImport(
|
|
16167
|
+
function _createImport(_x132) {
|
|
16095
16168
|
return _createImport2.apply(this, arguments);
|
|
16096
16169
|
}
|
|
16097
16170
|
|
|
@@ -16113,26 +16186,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16113
16186
|
}, {
|
|
16114
16187
|
key: "_getImport",
|
|
16115
16188
|
value: function () {
|
|
16116
|
-
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16117
|
-
return _regeneratorRuntime.wrap(function
|
|
16189
|
+
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee93(id) {
|
|
16190
|
+
return _regeneratorRuntime.wrap(function _callee93$(_context93) {
|
|
16118
16191
|
while (1) {
|
|
16119
|
-
switch (
|
|
16192
|
+
switch (_context93.prev = _context93.next) {
|
|
16120
16193
|
case 0:
|
|
16121
|
-
|
|
16194
|
+
_context93.next = 2;
|
|
16122
16195
|
return this.get(this.baseURL + "/imports/".concat(encodeURIComponent(id)));
|
|
16123
16196
|
|
|
16124
16197
|
case 2:
|
|
16125
|
-
return
|
|
16198
|
+
return _context93.abrupt("return", _context93.sent);
|
|
16126
16199
|
|
|
16127
16200
|
case 3:
|
|
16128
16201
|
case "end":
|
|
16129
|
-
return
|
|
16202
|
+
return _context93.stop();
|
|
16130
16203
|
}
|
|
16131
16204
|
}
|
|
16132
|
-
},
|
|
16205
|
+
}, _callee93, this);
|
|
16133
16206
|
}));
|
|
16134
16207
|
|
|
16135
|
-
function _getImport(
|
|
16208
|
+
function _getImport(_x133) {
|
|
16136
16209
|
return _getImport2.apply(this, arguments);
|
|
16137
16210
|
}
|
|
16138
16211
|
|
|
@@ -16154,26 +16227,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16154
16227
|
}, {
|
|
16155
16228
|
key: "_listImports",
|
|
16156
16229
|
value: function () {
|
|
16157
|
-
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16158
|
-
return _regeneratorRuntime.wrap(function
|
|
16230
|
+
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee94(options) {
|
|
16231
|
+
return _regeneratorRuntime.wrap(function _callee94$(_context94) {
|
|
16159
16232
|
while (1) {
|
|
16160
|
-
switch (
|
|
16233
|
+
switch (_context94.prev = _context94.next) {
|
|
16161
16234
|
case 0:
|
|
16162
|
-
|
|
16235
|
+
_context94.next = 2;
|
|
16163
16236
|
return this.get(this.baseURL + "/imports", options);
|
|
16164
16237
|
|
|
16165
16238
|
case 2:
|
|
16166
|
-
return
|
|
16239
|
+
return _context94.abrupt("return", _context94.sent);
|
|
16167
16240
|
|
|
16168
16241
|
case 3:
|
|
16169
16242
|
case "end":
|
|
16170
|
-
return
|
|
16243
|
+
return _context94.stop();
|
|
16171
16244
|
}
|
|
16172
16245
|
}
|
|
16173
|
-
},
|
|
16246
|
+
}, _callee94, this);
|
|
16174
16247
|
}));
|
|
16175
16248
|
|
|
16176
|
-
function _listImports(
|
|
16249
|
+
function _listImports(_x134) {
|
|
16177
16250
|
return _listImports2.apply(this, arguments);
|
|
16178
16251
|
}
|
|
16179
16252
|
|
|
@@ -16192,28 +16265,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16192
16265
|
}, {
|
|
16193
16266
|
key: "upsertPushProvider",
|
|
16194
16267
|
value: function () {
|
|
16195
|
-
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16196
|
-
return _regeneratorRuntime.wrap(function
|
|
16268
|
+
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee95(pushProvider) {
|
|
16269
|
+
return _regeneratorRuntime.wrap(function _callee95$(_context95) {
|
|
16197
16270
|
while (1) {
|
|
16198
|
-
switch (
|
|
16271
|
+
switch (_context95.prev = _context95.next) {
|
|
16199
16272
|
case 0:
|
|
16200
|
-
|
|
16273
|
+
_context95.next = 2;
|
|
16201
16274
|
return this.post(this.baseURL + "/push_providers", {
|
|
16202
16275
|
push_provider: pushProvider
|
|
16203
16276
|
});
|
|
16204
16277
|
|
|
16205
16278
|
case 2:
|
|
16206
|
-
return
|
|
16279
|
+
return _context95.abrupt("return", _context95.sent);
|
|
16207
16280
|
|
|
16208
16281
|
case 3:
|
|
16209
16282
|
case "end":
|
|
16210
|
-
return
|
|
16283
|
+
return _context95.stop();
|
|
16211
16284
|
}
|
|
16212
16285
|
}
|
|
16213
|
-
},
|
|
16286
|
+
}, _callee95, this);
|
|
16214
16287
|
}));
|
|
16215
16288
|
|
|
16216
|
-
function upsertPushProvider(
|
|
16289
|
+
function upsertPushProvider(_x135) {
|
|
16217
16290
|
return _upsertPushProvider.apply(this, arguments);
|
|
16218
16291
|
}
|
|
16219
16292
|
|
|
@@ -16232,28 +16305,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16232
16305
|
}, {
|
|
16233
16306
|
key: "deletePushProvider",
|
|
16234
16307
|
value: function () {
|
|
16235
|
-
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16308
|
+
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee96(_ref10) {
|
|
16236
16309
|
var type, name;
|
|
16237
|
-
return _regeneratorRuntime.wrap(function
|
|
16310
|
+
return _regeneratorRuntime.wrap(function _callee96$(_context96) {
|
|
16238
16311
|
while (1) {
|
|
16239
|
-
switch (
|
|
16312
|
+
switch (_context96.prev = _context96.next) {
|
|
16240
16313
|
case 0:
|
|
16241
16314
|
type = _ref10.type, name = _ref10.name;
|
|
16242
|
-
|
|
16315
|
+
_context96.next = 3;
|
|
16243
16316
|
return this.delete(this.baseURL + "/push_providers/".concat(encodeURIComponent(type), "/").concat(encodeURIComponent(name)));
|
|
16244
16317
|
|
|
16245
16318
|
case 3:
|
|
16246
|
-
return
|
|
16319
|
+
return _context96.abrupt("return", _context96.sent);
|
|
16247
16320
|
|
|
16248
16321
|
case 4:
|
|
16249
16322
|
case "end":
|
|
16250
|
-
return
|
|
16323
|
+
return _context96.stop();
|
|
16251
16324
|
}
|
|
16252
16325
|
}
|
|
16253
|
-
},
|
|
16326
|
+
}, _callee96, this);
|
|
16254
16327
|
}));
|
|
16255
16328
|
|
|
16256
|
-
function deletePushProvider(
|
|
16329
|
+
function deletePushProvider(_x136) {
|
|
16257
16330
|
return _deletePushProvider.apply(this, arguments);
|
|
16258
16331
|
}
|
|
16259
16332
|
|
|
@@ -16270,23 +16343,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16270
16343
|
}, {
|
|
16271
16344
|
key: "listPushProviders",
|
|
16272
16345
|
value: function () {
|
|
16273
|
-
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16274
|
-
return _regeneratorRuntime.wrap(function
|
|
16346
|
+
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee97() {
|
|
16347
|
+
return _regeneratorRuntime.wrap(function _callee97$(_context97) {
|
|
16275
16348
|
while (1) {
|
|
16276
|
-
switch (
|
|
16349
|
+
switch (_context97.prev = _context97.next) {
|
|
16277
16350
|
case 0:
|
|
16278
|
-
|
|
16351
|
+
_context97.next = 2;
|
|
16279
16352
|
return this.get(this.baseURL + "/push_providers");
|
|
16280
16353
|
|
|
16281
16354
|
case 2:
|
|
16282
|
-
return
|
|
16355
|
+
return _context97.abrupt("return", _context97.sent);
|
|
16283
16356
|
|
|
16284
16357
|
case 3:
|
|
16285
16358
|
case "end":
|
|
16286
|
-
return
|
|
16359
|
+
return _context97.stop();
|
|
16287
16360
|
}
|
|
16288
16361
|
}
|
|
16289
|
-
},
|
|
16362
|
+
}, _callee97, this);
|
|
16290
16363
|
}));
|
|
16291
16364
|
|
|
16292
16365
|
function listPushProviders() {
|
|
@@ -16314,26 +16387,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16314
16387
|
}, {
|
|
16315
16388
|
key: "commitMessage",
|
|
16316
16389
|
value: function () {
|
|
16317
|
-
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16318
|
-
return _regeneratorRuntime.wrap(function
|
|
16390
|
+
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee98(id) {
|
|
16391
|
+
return _regeneratorRuntime.wrap(function _callee98$(_context98) {
|
|
16319
16392
|
while (1) {
|
|
16320
|
-
switch (
|
|
16393
|
+
switch (_context98.prev = _context98.next) {
|
|
16321
16394
|
case 0:
|
|
16322
|
-
|
|
16395
|
+
_context98.next = 2;
|
|
16323
16396
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(id), "/commit"));
|
|
16324
16397
|
|
|
16325
16398
|
case 2:
|
|
16326
|
-
return
|
|
16399
|
+
return _context98.abrupt("return", _context98.sent);
|
|
16327
16400
|
|
|
16328
16401
|
case 3:
|
|
16329
16402
|
case "end":
|
|
16330
|
-
return
|
|
16403
|
+
return _context98.stop();
|
|
16331
16404
|
}
|
|
16332
16405
|
}
|
|
16333
|
-
},
|
|
16406
|
+
}, _callee98, this);
|
|
16334
16407
|
}));
|
|
16335
16408
|
|
|
16336
|
-
function commitMessage(
|
|
16409
|
+
function commitMessage(_x137) {
|
|
16337
16410
|
return _commitMessage.apply(this, arguments);
|
|
16338
16411
|
}
|
|
16339
16412
|
|
|
@@ -16349,28 +16422,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16349
16422
|
}, {
|
|
16350
16423
|
key: "createPoll",
|
|
16351
16424
|
value: function () {
|
|
16352
|
-
var _createPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16353
|
-
return _regeneratorRuntime.wrap(function
|
|
16425
|
+
var _createPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee99(poll, userId) {
|
|
16426
|
+
return _regeneratorRuntime.wrap(function _callee99$(_context99) {
|
|
16354
16427
|
while (1) {
|
|
16355
|
-
switch (
|
|
16428
|
+
switch (_context99.prev = _context99.next) {
|
|
16356
16429
|
case 0:
|
|
16357
|
-
|
|
16430
|
+
_context99.next = 2;
|
|
16358
16431
|
return this.post(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
|
|
16359
16432
|
user_id: userId
|
|
16360
16433
|
} : {}));
|
|
16361
16434
|
|
|
16362
16435
|
case 2:
|
|
16363
|
-
return
|
|
16436
|
+
return _context99.abrupt("return", _context99.sent);
|
|
16364
16437
|
|
|
16365
16438
|
case 3:
|
|
16366
16439
|
case "end":
|
|
16367
|
-
return
|
|
16440
|
+
return _context99.stop();
|
|
16368
16441
|
}
|
|
16369
16442
|
}
|
|
16370
|
-
},
|
|
16443
|
+
}, _callee99, this);
|
|
16371
16444
|
}));
|
|
16372
16445
|
|
|
16373
|
-
function createPoll(
|
|
16446
|
+
function createPoll(_x138, _x139) {
|
|
16374
16447
|
return _createPoll.apply(this, arguments);
|
|
16375
16448
|
}
|
|
16376
16449
|
|
|
@@ -16386,28 +16459,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16386
16459
|
}, {
|
|
16387
16460
|
key: "getPoll",
|
|
16388
16461
|
value: function () {
|
|
16389
|
-
var _getPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16390
|
-
return _regeneratorRuntime.wrap(function
|
|
16462
|
+
var _getPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee100(id, userId) {
|
|
16463
|
+
return _regeneratorRuntime.wrap(function _callee100$(_context100) {
|
|
16391
16464
|
while (1) {
|
|
16392
|
-
switch (
|
|
16465
|
+
switch (_context100.prev = _context100.next) {
|
|
16393
16466
|
case 0:
|
|
16394
|
-
|
|
16467
|
+
_context100.next = 2;
|
|
16395
16468
|
return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(id)), userId ? {
|
|
16396
16469
|
user_id: userId
|
|
16397
16470
|
} : {});
|
|
16398
16471
|
|
|
16399
16472
|
case 2:
|
|
16400
|
-
return
|
|
16473
|
+
return _context100.abrupt("return", _context100.sent);
|
|
16401
16474
|
|
|
16402
16475
|
case 3:
|
|
16403
16476
|
case "end":
|
|
16404
|
-
return
|
|
16477
|
+
return _context100.stop();
|
|
16405
16478
|
}
|
|
16406
16479
|
}
|
|
16407
|
-
},
|
|
16480
|
+
}, _callee100, this);
|
|
16408
16481
|
}));
|
|
16409
16482
|
|
|
16410
|
-
function getPoll(
|
|
16483
|
+
function getPoll(_x140, _x141) {
|
|
16411
16484
|
return _getPoll.apply(this, arguments);
|
|
16412
16485
|
}
|
|
16413
16486
|
|
|
@@ -16423,28 +16496,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16423
16496
|
}, {
|
|
16424
16497
|
key: "updatePoll",
|
|
16425
16498
|
value: function () {
|
|
16426
|
-
var _updatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16427
|
-
return _regeneratorRuntime.wrap(function
|
|
16499
|
+
var _updatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee101(poll, userId) {
|
|
16500
|
+
return _regeneratorRuntime.wrap(function _callee101$(_context101) {
|
|
16428
16501
|
while (1) {
|
|
16429
|
-
switch (
|
|
16502
|
+
switch (_context101.prev = _context101.next) {
|
|
16430
16503
|
case 0:
|
|
16431
|
-
|
|
16504
|
+
_context101.next = 2;
|
|
16432
16505
|
return this.put(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
|
|
16433
16506
|
user_id: userId
|
|
16434
16507
|
} : {}));
|
|
16435
16508
|
|
|
16436
16509
|
case 2:
|
|
16437
|
-
return
|
|
16510
|
+
return _context101.abrupt("return", _context101.sent);
|
|
16438
16511
|
|
|
16439
16512
|
case 3:
|
|
16440
16513
|
case "end":
|
|
16441
|
-
return
|
|
16514
|
+
return _context101.stop();
|
|
16442
16515
|
}
|
|
16443
16516
|
}
|
|
16444
|
-
},
|
|
16517
|
+
}, _callee101, this);
|
|
16445
16518
|
}));
|
|
16446
16519
|
|
|
16447
|
-
function updatePoll(
|
|
16520
|
+
function updatePoll(_x142, _x143) {
|
|
16448
16521
|
return _updatePoll.apply(this, arguments);
|
|
16449
16522
|
}
|
|
16450
16523
|
|
|
@@ -16462,28 +16535,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16462
16535
|
}, {
|
|
16463
16536
|
key: "partialUpdatePoll",
|
|
16464
16537
|
value: function () {
|
|
16465
|
-
var _partialUpdatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16466
|
-
return _regeneratorRuntime.wrap(function
|
|
16538
|
+
var _partialUpdatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee102(id, partialPollObject, userId) {
|
|
16539
|
+
return _regeneratorRuntime.wrap(function _callee102$(_context102) {
|
|
16467
16540
|
while (1) {
|
|
16468
|
-
switch (
|
|
16541
|
+
switch (_context102.prev = _context102.next) {
|
|
16469
16542
|
case 0:
|
|
16470
|
-
|
|
16543
|
+
_context102.next = 2;
|
|
16471
16544
|
return this.patch(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread({}, partialPollObject), userId ? {
|
|
16472
16545
|
user_id: userId
|
|
16473
16546
|
} : {}));
|
|
16474
16547
|
|
|
16475
16548
|
case 2:
|
|
16476
|
-
return
|
|
16549
|
+
return _context102.abrupt("return", _context102.sent);
|
|
16477
16550
|
|
|
16478
16551
|
case 3:
|
|
16479
16552
|
case "end":
|
|
16480
|
-
return
|
|
16553
|
+
return _context102.stop();
|
|
16481
16554
|
}
|
|
16482
16555
|
}
|
|
16483
|
-
},
|
|
16556
|
+
}, _callee102, this);
|
|
16484
16557
|
}));
|
|
16485
16558
|
|
|
16486
|
-
function partialUpdatePoll(
|
|
16559
|
+
function partialUpdatePoll(_x144, _x145, _x146) {
|
|
16487
16560
|
return _partialUpdatePoll.apply(this, arguments);
|
|
16488
16561
|
}
|
|
16489
16562
|
|
|
@@ -16499,28 +16572,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16499
16572
|
}, {
|
|
16500
16573
|
key: "deletePoll",
|
|
16501
16574
|
value: function () {
|
|
16502
|
-
var _deletePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16503
|
-
return _regeneratorRuntime.wrap(function
|
|
16575
|
+
var _deletePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee103(id, userId) {
|
|
16576
|
+
return _regeneratorRuntime.wrap(function _callee103$(_context103) {
|
|
16504
16577
|
while (1) {
|
|
16505
|
-
switch (
|
|
16578
|
+
switch (_context103.prev = _context103.next) {
|
|
16506
16579
|
case 0:
|
|
16507
|
-
|
|
16580
|
+
_context103.next = 2;
|
|
16508
16581
|
return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread({}, userId ? {
|
|
16509
16582
|
user_id: userId
|
|
16510
16583
|
} : {}));
|
|
16511
16584
|
|
|
16512
16585
|
case 2:
|
|
16513
|
-
return
|
|
16586
|
+
return _context103.abrupt("return", _context103.sent);
|
|
16514
16587
|
|
|
16515
16588
|
case 3:
|
|
16516
16589
|
case "end":
|
|
16517
|
-
return
|
|
16590
|
+
return _context103.stop();
|
|
16518
16591
|
}
|
|
16519
16592
|
}
|
|
16520
|
-
},
|
|
16593
|
+
}, _callee103, this);
|
|
16521
16594
|
}));
|
|
16522
16595
|
|
|
16523
|
-
function deletePoll(
|
|
16596
|
+
function deletePoll(_x147, _x148) {
|
|
16524
16597
|
return _deletePoll.apply(this, arguments);
|
|
16525
16598
|
}
|
|
16526
16599
|
|
|
@@ -16536,12 +16609,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16536
16609
|
}, {
|
|
16537
16610
|
key: "closePoll",
|
|
16538
16611
|
value: function () {
|
|
16539
|
-
var _closePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16540
|
-
return _regeneratorRuntime.wrap(function
|
|
16612
|
+
var _closePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee104(id, userId) {
|
|
16613
|
+
return _regeneratorRuntime.wrap(function _callee104$(_context104) {
|
|
16541
16614
|
while (1) {
|
|
16542
|
-
switch (
|
|
16615
|
+
switch (_context104.prev = _context104.next) {
|
|
16543
16616
|
case 0:
|
|
16544
|
-
return
|
|
16617
|
+
return _context104.abrupt("return", this.partialUpdatePoll(id, {
|
|
16545
16618
|
set: {
|
|
16546
16619
|
is_closed: true
|
|
16547
16620
|
}
|
|
@@ -16549,13 +16622,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16549
16622
|
|
|
16550
16623
|
case 1:
|
|
16551
16624
|
case "end":
|
|
16552
|
-
return
|
|
16625
|
+
return _context104.stop();
|
|
16553
16626
|
}
|
|
16554
16627
|
}
|
|
16555
|
-
},
|
|
16628
|
+
}, _callee104, this);
|
|
16556
16629
|
}));
|
|
16557
16630
|
|
|
16558
|
-
function closePoll(
|
|
16631
|
+
function closePoll(_x149, _x150) {
|
|
16559
16632
|
return _closePoll.apply(this, arguments);
|
|
16560
16633
|
}
|
|
16561
16634
|
|
|
@@ -16572,28 +16645,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16572
16645
|
}, {
|
|
16573
16646
|
key: "createPollOption",
|
|
16574
16647
|
value: function () {
|
|
16575
|
-
var _createPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16576
|
-
return _regeneratorRuntime.wrap(function
|
|
16648
|
+
var _createPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee105(pollId, option, userId) {
|
|
16649
|
+
return _regeneratorRuntime.wrap(function _callee105$(_context105) {
|
|
16577
16650
|
while (1) {
|
|
16578
|
-
switch (
|
|
16651
|
+
switch (_context105.prev = _context105.next) {
|
|
16579
16652
|
case 0:
|
|
16580
|
-
|
|
16653
|
+
_context105.next = 2;
|
|
16581
16654
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
|
|
16582
16655
|
user_id: userId
|
|
16583
16656
|
} : {}));
|
|
16584
16657
|
|
|
16585
16658
|
case 2:
|
|
16586
|
-
return
|
|
16659
|
+
return _context105.abrupt("return", _context105.sent);
|
|
16587
16660
|
|
|
16588
16661
|
case 3:
|
|
16589
16662
|
case "end":
|
|
16590
|
-
return
|
|
16663
|
+
return _context105.stop();
|
|
16591
16664
|
}
|
|
16592
16665
|
}
|
|
16593
|
-
},
|
|
16666
|
+
}, _callee105, this);
|
|
16594
16667
|
}));
|
|
16595
16668
|
|
|
16596
|
-
function createPollOption(
|
|
16669
|
+
function createPollOption(_x151, _x152, _x153) {
|
|
16597
16670
|
return _createPollOption.apply(this, arguments);
|
|
16598
16671
|
}
|
|
16599
16672
|
|
|
@@ -16610,28 +16683,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16610
16683
|
}, {
|
|
16611
16684
|
key: "getPollOption",
|
|
16612
16685
|
value: function () {
|
|
16613
|
-
var _getPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16614
|
-
return _regeneratorRuntime.wrap(function
|
|
16686
|
+
var _getPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee106(pollId, optionId, userId) {
|
|
16687
|
+
return _regeneratorRuntime.wrap(function _callee106$(_context106) {
|
|
16615
16688
|
while (1) {
|
|
16616
|
-
switch (
|
|
16689
|
+
switch (_context106.prev = _context106.next) {
|
|
16617
16690
|
case 0:
|
|
16618
|
-
|
|
16691
|
+
_context106.next = 2;
|
|
16619
16692
|
return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
|
|
16620
16693
|
user_id: userId
|
|
16621
16694
|
} : {});
|
|
16622
16695
|
|
|
16623
16696
|
case 2:
|
|
16624
|
-
return
|
|
16697
|
+
return _context106.abrupt("return", _context106.sent);
|
|
16625
16698
|
|
|
16626
16699
|
case 3:
|
|
16627
16700
|
case "end":
|
|
16628
|
-
return
|
|
16701
|
+
return _context106.stop();
|
|
16629
16702
|
}
|
|
16630
16703
|
}
|
|
16631
|
-
},
|
|
16704
|
+
}, _callee106, this);
|
|
16632
16705
|
}));
|
|
16633
16706
|
|
|
16634
|
-
function getPollOption(
|
|
16707
|
+
function getPollOption(_x154, _x155, _x156) {
|
|
16635
16708
|
return _getPollOption.apply(this, arguments);
|
|
16636
16709
|
}
|
|
16637
16710
|
|
|
@@ -16648,28 +16721,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16648
16721
|
}, {
|
|
16649
16722
|
key: "updatePollOption",
|
|
16650
16723
|
value: function () {
|
|
16651
|
-
var _updatePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16652
|
-
return _regeneratorRuntime.wrap(function
|
|
16724
|
+
var _updatePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee107(pollId, option, userId) {
|
|
16725
|
+
return _regeneratorRuntime.wrap(function _callee107$(_context107) {
|
|
16653
16726
|
while (1) {
|
|
16654
|
-
switch (
|
|
16727
|
+
switch (_context107.prev = _context107.next) {
|
|
16655
16728
|
case 0:
|
|
16656
|
-
|
|
16729
|
+
_context107.next = 2;
|
|
16657
16730
|
return this.put(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
|
|
16658
16731
|
user_id: userId
|
|
16659
16732
|
} : {}));
|
|
16660
16733
|
|
|
16661
16734
|
case 2:
|
|
16662
|
-
return
|
|
16735
|
+
return _context107.abrupt("return", _context107.sent);
|
|
16663
16736
|
|
|
16664
16737
|
case 3:
|
|
16665
16738
|
case "end":
|
|
16666
|
-
return
|
|
16739
|
+
return _context107.stop();
|
|
16667
16740
|
}
|
|
16668
16741
|
}
|
|
16669
|
-
},
|
|
16742
|
+
}, _callee107, this);
|
|
16670
16743
|
}));
|
|
16671
16744
|
|
|
16672
|
-
function updatePollOption(
|
|
16745
|
+
function updatePollOption(_x157, _x158, _x159) {
|
|
16673
16746
|
return _updatePollOption.apply(this, arguments);
|
|
16674
16747
|
}
|
|
16675
16748
|
|
|
@@ -16686,28 +16759,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16686
16759
|
}, {
|
|
16687
16760
|
key: "deletePollOption",
|
|
16688
16761
|
value: function () {
|
|
16689
|
-
var _deletePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16690
|
-
return _regeneratorRuntime.wrap(function
|
|
16762
|
+
var _deletePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee108(pollId, optionId, userId) {
|
|
16763
|
+
return _regeneratorRuntime.wrap(function _callee108$(_context108) {
|
|
16691
16764
|
while (1) {
|
|
16692
|
-
switch (
|
|
16765
|
+
switch (_context108.prev = _context108.next) {
|
|
16693
16766
|
case 0:
|
|
16694
|
-
|
|
16767
|
+
_context108.next = 2;
|
|
16695
16768
|
return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
|
|
16696
16769
|
user_id: userId
|
|
16697
16770
|
} : {});
|
|
16698
16771
|
|
|
16699
16772
|
case 2:
|
|
16700
|
-
return
|
|
16773
|
+
return _context108.abrupt("return", _context108.sent);
|
|
16701
16774
|
|
|
16702
16775
|
case 3:
|
|
16703
16776
|
case "end":
|
|
16704
|
-
return
|
|
16777
|
+
return _context108.stop();
|
|
16705
16778
|
}
|
|
16706
16779
|
}
|
|
16707
|
-
},
|
|
16780
|
+
}, _callee108, this);
|
|
16708
16781
|
}));
|
|
16709
16782
|
|
|
16710
|
-
function deletePollOption(
|
|
16783
|
+
function deletePollOption(_x160, _x161, _x162) {
|
|
16711
16784
|
return _deletePollOption.apply(this, arguments);
|
|
16712
16785
|
}
|
|
16713
16786
|
|
|
@@ -16725,12 +16798,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16725
16798
|
}, {
|
|
16726
16799
|
key: "castPollVote",
|
|
16727
16800
|
value: function () {
|
|
16728
|
-
var _castPollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16729
|
-
return _regeneratorRuntime.wrap(function
|
|
16801
|
+
var _castPollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee109(messageId, pollId, vote, userId) {
|
|
16802
|
+
return _regeneratorRuntime.wrap(function _callee109$(_context109) {
|
|
16730
16803
|
while (1) {
|
|
16731
|
-
switch (
|
|
16804
|
+
switch (_context109.prev = _context109.next) {
|
|
16732
16805
|
case 0:
|
|
16733
|
-
|
|
16806
|
+
_context109.next = 2;
|
|
16734
16807
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote"), _objectSpread({
|
|
16735
16808
|
vote: vote
|
|
16736
16809
|
}, userId ? {
|
|
@@ -16738,17 +16811,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16738
16811
|
} : {}));
|
|
16739
16812
|
|
|
16740
16813
|
case 2:
|
|
16741
|
-
return
|
|
16814
|
+
return _context109.abrupt("return", _context109.sent);
|
|
16742
16815
|
|
|
16743
16816
|
case 3:
|
|
16744
16817
|
case "end":
|
|
16745
|
-
return
|
|
16818
|
+
return _context109.stop();
|
|
16746
16819
|
}
|
|
16747
16820
|
}
|
|
16748
|
-
},
|
|
16821
|
+
}, _callee109, this);
|
|
16749
16822
|
}));
|
|
16750
16823
|
|
|
16751
|
-
function castPollVote(
|
|
16824
|
+
function castPollVote(_x163, _x164, _x165, _x166) {
|
|
16752
16825
|
return _castPollVote.apply(this, arguments);
|
|
16753
16826
|
}
|
|
16754
16827
|
|
|
@@ -16765,24 +16838,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16765
16838
|
}, {
|
|
16766
16839
|
key: "addPollAnswer",
|
|
16767
16840
|
value: function () {
|
|
16768
|
-
var _addPollAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16769
|
-
return _regeneratorRuntime.wrap(function
|
|
16841
|
+
var _addPollAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee110(messageId, pollId, answerText, userId) {
|
|
16842
|
+
return _regeneratorRuntime.wrap(function _callee110$(_context110) {
|
|
16770
16843
|
while (1) {
|
|
16771
|
-
switch (
|
|
16844
|
+
switch (_context110.prev = _context110.next) {
|
|
16772
16845
|
case 0:
|
|
16773
|
-
return
|
|
16846
|
+
return _context110.abrupt("return", this.castPollVote(messageId, pollId, {
|
|
16774
16847
|
answer_text: answerText
|
|
16775
16848
|
}, userId));
|
|
16776
16849
|
|
|
16777
16850
|
case 1:
|
|
16778
16851
|
case "end":
|
|
16779
|
-
return
|
|
16852
|
+
return _context110.stop();
|
|
16780
16853
|
}
|
|
16781
16854
|
}
|
|
16782
|
-
},
|
|
16855
|
+
}, _callee110, this);
|
|
16783
16856
|
}));
|
|
16784
16857
|
|
|
16785
|
-
function addPollAnswer(
|
|
16858
|
+
function addPollAnswer(_x167, _x168, _x169, _x170) {
|
|
16786
16859
|
return _addPollAnswer.apply(this, arguments);
|
|
16787
16860
|
}
|
|
16788
16861
|
|
|
@@ -16791,28 +16864,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16791
16864
|
}, {
|
|
16792
16865
|
key: "removePollVote",
|
|
16793
16866
|
value: function () {
|
|
16794
|
-
var _removePollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16795
|
-
return _regeneratorRuntime.wrap(function
|
|
16867
|
+
var _removePollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee111(messageId, pollId, voteId, userId) {
|
|
16868
|
+
return _regeneratorRuntime.wrap(function _callee111$(_context111) {
|
|
16796
16869
|
while (1) {
|
|
16797
|
-
switch (
|
|
16870
|
+
switch (_context111.prev = _context111.next) {
|
|
16798
16871
|
case 0:
|
|
16799
|
-
|
|
16872
|
+
_context111.next = 2;
|
|
16800
16873
|
return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote/").concat(encodeURIComponent(voteId)), _objectSpread({}, userId ? {
|
|
16801
16874
|
user_id: userId
|
|
16802
16875
|
} : {}));
|
|
16803
16876
|
|
|
16804
16877
|
case 2:
|
|
16805
|
-
return
|
|
16878
|
+
return _context111.abrupt("return", _context111.sent);
|
|
16806
16879
|
|
|
16807
16880
|
case 3:
|
|
16808
16881
|
case "end":
|
|
16809
|
-
return
|
|
16882
|
+
return _context111.stop();
|
|
16810
16883
|
}
|
|
16811
16884
|
}
|
|
16812
|
-
},
|
|
16885
|
+
}, _callee111, this);
|
|
16813
16886
|
}));
|
|
16814
16887
|
|
|
16815
|
-
function removePollVote(
|
|
16888
|
+
function removePollVote(_x171, _x172, _x173, _x174) {
|
|
16816
16889
|
return _removePollVote.apply(this, arguments);
|
|
16817
16890
|
}
|
|
16818
16891
|
|
|
@@ -16830,37 +16903,37 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16830
16903
|
}, {
|
|
16831
16904
|
key: "queryPolls",
|
|
16832
16905
|
value: function () {
|
|
16833
|
-
var _queryPolls = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16906
|
+
var _queryPolls = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee112() {
|
|
16834
16907
|
var filter,
|
|
16835
16908
|
sort,
|
|
16836
16909
|
options,
|
|
16837
16910
|
userId,
|
|
16838
16911
|
q,
|
|
16839
|
-
|
|
16840
|
-
return _regeneratorRuntime.wrap(function
|
|
16912
|
+
_args112 = arguments;
|
|
16913
|
+
return _regeneratorRuntime.wrap(function _callee112$(_context112) {
|
|
16841
16914
|
while (1) {
|
|
16842
|
-
switch (
|
|
16915
|
+
switch (_context112.prev = _context112.next) {
|
|
16843
16916
|
case 0:
|
|
16844
|
-
filter =
|
|
16845
|
-
sort =
|
|
16846
|
-
options =
|
|
16847
|
-
userId =
|
|
16917
|
+
filter = _args112.length > 0 && _args112[0] !== undefined ? _args112[0] : {};
|
|
16918
|
+
sort = _args112.length > 1 && _args112[1] !== undefined ? _args112[1] : [];
|
|
16919
|
+
options = _args112.length > 2 && _args112[2] !== undefined ? _args112[2] : {};
|
|
16920
|
+
userId = _args112.length > 3 ? _args112[3] : undefined;
|
|
16848
16921
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16849
|
-
|
|
16922
|
+
_context112.next = 7;
|
|
16850
16923
|
return this.post(this.baseURL + "/polls/query".concat(q), _objectSpread({
|
|
16851
16924
|
filter: filter,
|
|
16852
16925
|
sort: normalizeQuerySort(sort)
|
|
16853
16926
|
}, options));
|
|
16854
16927
|
|
|
16855
16928
|
case 7:
|
|
16856
|
-
return
|
|
16929
|
+
return _context112.abrupt("return", _context112.sent);
|
|
16857
16930
|
|
|
16858
16931
|
case 8:
|
|
16859
16932
|
case "end":
|
|
16860
|
-
return
|
|
16933
|
+
return _context112.stop();
|
|
16861
16934
|
}
|
|
16862
16935
|
}
|
|
16863
|
-
},
|
|
16936
|
+
}, _callee112, this);
|
|
16864
16937
|
}));
|
|
16865
16938
|
|
|
16866
16939
|
function queryPolls() {
|
|
@@ -16882,40 +16955,40 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16882
16955
|
}, {
|
|
16883
16956
|
key: "queryPollVotes",
|
|
16884
16957
|
value: function () {
|
|
16885
|
-
var _queryPollVotes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16958
|
+
var _queryPollVotes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee113(pollId) {
|
|
16886
16959
|
var filter,
|
|
16887
16960
|
sort,
|
|
16888
16961
|
options,
|
|
16889
16962
|
userId,
|
|
16890
16963
|
q,
|
|
16891
|
-
|
|
16892
|
-
return _regeneratorRuntime.wrap(function
|
|
16964
|
+
_args113 = arguments;
|
|
16965
|
+
return _regeneratorRuntime.wrap(function _callee113$(_context113) {
|
|
16893
16966
|
while (1) {
|
|
16894
|
-
switch (
|
|
16967
|
+
switch (_context113.prev = _context113.next) {
|
|
16895
16968
|
case 0:
|
|
16896
|
-
filter =
|
|
16897
|
-
sort =
|
|
16898
|
-
options =
|
|
16899
|
-
userId =
|
|
16969
|
+
filter = _args113.length > 1 && _args113[1] !== undefined ? _args113[1] : {};
|
|
16970
|
+
sort = _args113.length > 2 && _args113[2] !== undefined ? _args113[2] : [];
|
|
16971
|
+
options = _args113.length > 3 && _args113[3] !== undefined ? _args113[3] : {};
|
|
16972
|
+
userId = _args113.length > 4 ? _args113[4] : undefined;
|
|
16900
16973
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16901
|
-
|
|
16974
|
+
_context113.next = 7;
|
|
16902
16975
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
|
|
16903
16976
|
filter: filter,
|
|
16904
16977
|
sort: normalizeQuerySort(sort)
|
|
16905
16978
|
}, options));
|
|
16906
16979
|
|
|
16907
16980
|
case 7:
|
|
16908
|
-
return
|
|
16981
|
+
return _context113.abrupt("return", _context113.sent);
|
|
16909
16982
|
|
|
16910
16983
|
case 8:
|
|
16911
16984
|
case "end":
|
|
16912
|
-
return
|
|
16985
|
+
return _context113.stop();
|
|
16913
16986
|
}
|
|
16914
16987
|
}
|
|
16915
|
-
},
|
|
16988
|
+
}, _callee113, this);
|
|
16916
16989
|
}));
|
|
16917
16990
|
|
|
16918
|
-
function queryPollVotes(
|
|
16991
|
+
function queryPollVotes(_x175) {
|
|
16919
16992
|
return _queryPollVotes.apply(this, arguments);
|
|
16920
16993
|
}
|
|
16921
16994
|
|
|
@@ -16934,23 +17007,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16934
17007
|
}, {
|
|
16935
17008
|
key: "queryPollAnswers",
|
|
16936
17009
|
value: function () {
|
|
16937
|
-
var _queryPollAnswers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
17010
|
+
var _queryPollAnswers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee114(pollId) {
|
|
16938
17011
|
var filter,
|
|
16939
17012
|
sort,
|
|
16940
17013
|
options,
|
|
16941
17014
|
userId,
|
|
16942
17015
|
q,
|
|
16943
|
-
|
|
16944
|
-
return _regeneratorRuntime.wrap(function
|
|
17016
|
+
_args114 = arguments;
|
|
17017
|
+
return _regeneratorRuntime.wrap(function _callee114$(_context114) {
|
|
16945
17018
|
while (1) {
|
|
16946
|
-
switch (
|
|
17019
|
+
switch (_context114.prev = _context114.next) {
|
|
16947
17020
|
case 0:
|
|
16948
|
-
filter =
|
|
16949
|
-
sort =
|
|
16950
|
-
options =
|
|
16951
|
-
userId =
|
|
17021
|
+
filter = _args114.length > 1 && _args114[1] !== undefined ? _args114[1] : {};
|
|
17022
|
+
sort = _args114.length > 2 && _args114[2] !== undefined ? _args114[2] : [];
|
|
17023
|
+
options = _args114.length > 3 && _args114[3] !== undefined ? _args114[3] : {};
|
|
17024
|
+
userId = _args114.length > 4 ? _args114[4] : undefined;
|
|
16952
17025
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16953
|
-
|
|
17026
|
+
_context114.next = 7;
|
|
16954
17027
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
|
|
16955
17028
|
filter: _objectSpread(_objectSpread({}, filter), {}, {
|
|
16956
17029
|
is_answer: true
|
|
@@ -16959,17 +17032,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16959
17032
|
}, options));
|
|
16960
17033
|
|
|
16961
17034
|
case 7:
|
|
16962
|
-
return
|
|
17035
|
+
return _context114.abrupt("return", _context114.sent);
|
|
16963
17036
|
|
|
16964
17037
|
case 8:
|
|
16965
17038
|
case "end":
|
|
16966
|
-
return
|
|
17039
|
+
return _context114.stop();
|
|
16967
17040
|
}
|
|
16968
17041
|
}
|
|
16969
|
-
},
|
|
17042
|
+
}, _callee114, this);
|
|
16970
17043
|
}));
|
|
16971
17044
|
|
|
16972
|
-
function queryPollAnswers(
|
|
17045
|
+
function queryPollAnswers(_x176) {
|
|
16973
17046
|
return _queryPollAnswers.apply(this, arguments);
|
|
16974
17047
|
}
|
|
16975
17048
|
|
|
@@ -16986,33 +17059,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16986
17059
|
}, {
|
|
16987
17060
|
key: "queryMessageHistory",
|
|
16988
17061
|
value: function () {
|
|
16989
|
-
var _queryMessageHistory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
17062
|
+
var _queryMessageHistory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee115() {
|
|
16990
17063
|
var filter,
|
|
16991
17064
|
sort,
|
|
16992
17065
|
options,
|
|
16993
|
-
|
|
16994
|
-
return _regeneratorRuntime.wrap(function
|
|
17066
|
+
_args115 = arguments;
|
|
17067
|
+
return _regeneratorRuntime.wrap(function _callee115$(_context115) {
|
|
16995
17068
|
while (1) {
|
|
16996
|
-
switch (
|
|
17069
|
+
switch (_context115.prev = _context115.next) {
|
|
16997
17070
|
case 0:
|
|
16998
|
-
filter =
|
|
16999
|
-
sort =
|
|
17000
|
-
options =
|
|
17001
|
-
|
|
17071
|
+
filter = _args115.length > 0 && _args115[0] !== undefined ? _args115[0] : {};
|
|
17072
|
+
sort = _args115.length > 1 && _args115[1] !== undefined ? _args115[1] : [];
|
|
17073
|
+
options = _args115.length > 2 && _args115[2] !== undefined ? _args115[2] : {};
|
|
17074
|
+
_context115.next = 5;
|
|
17002
17075
|
return this.post(this.baseURL + '/messages/history', _objectSpread({
|
|
17003
17076
|
filter: filter,
|
|
17004
17077
|
sort: normalizeQuerySort(sort)
|
|
17005
17078
|
}, options));
|
|
17006
17079
|
|
|
17007
17080
|
case 5:
|
|
17008
|
-
return
|
|
17081
|
+
return _context115.abrupt("return", _context115.sent);
|
|
17009
17082
|
|
|
17010
17083
|
case 6:
|
|
17011
17084
|
case "end":
|
|
17012
|
-
return
|
|
17085
|
+
return _context115.stop();
|
|
17013
17086
|
}
|
|
17014
17087
|
}
|
|
17015
|
-
},
|
|
17088
|
+
}, _callee115, this);
|
|
17016
17089
|
}));
|
|
17017
17090
|
|
|
17018
17091
|
function queryMessageHistory() {
|
|
@@ -17033,32 +17106,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
17033
17106
|
}, {
|
|
17034
17107
|
key: "updateFlags",
|
|
17035
17108
|
value: function () {
|
|
17036
|
-
var _updateFlags = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
17109
|
+
var _updateFlags = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee116(message_ids, reviewed_by) {
|
|
17037
17110
|
var options,
|
|
17038
|
-
|
|
17039
|
-
return _regeneratorRuntime.wrap(function
|
|
17111
|
+
_args116 = arguments;
|
|
17112
|
+
return _regeneratorRuntime.wrap(function _callee116$(_context116) {
|
|
17040
17113
|
while (1) {
|
|
17041
|
-
switch (
|
|
17114
|
+
switch (_context116.prev = _context116.next) {
|
|
17042
17115
|
case 0:
|
|
17043
|
-
options =
|
|
17044
|
-
|
|
17116
|
+
options = _args116.length > 2 && _args116[2] !== undefined ? _args116[2] : {};
|
|
17117
|
+
_context116.next = 3;
|
|
17045
17118
|
return this.post(this.baseURL + '/automod/v1/moderation/update_flags', _objectSpread({
|
|
17046
17119
|
message_ids: message_ids,
|
|
17047
17120
|
reviewed_by: reviewed_by
|
|
17048
17121
|
}, options));
|
|
17049
17122
|
|
|
17050
17123
|
case 3:
|
|
17051
|
-
return
|
|
17124
|
+
return _context116.abrupt("return", _context116.sent);
|
|
17052
17125
|
|
|
17053
17126
|
case 4:
|
|
17054
17127
|
case "end":
|
|
17055
|
-
return
|
|
17128
|
+
return _context116.stop();
|
|
17056
17129
|
}
|
|
17057
17130
|
}
|
|
17058
|
-
},
|
|
17131
|
+
}, _callee116, this);
|
|
17059
17132
|
}));
|
|
17060
17133
|
|
|
17061
|
-
function updateFlags(
|
|
17134
|
+
function updateFlags(_x177, _x178) {
|
|
17062
17135
|
return _updateFlags.apply(this, arguments);
|
|
17063
17136
|
}
|
|
17064
17137
|
|