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/index.js
CHANGED
|
@@ -4261,7 +4261,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
4261
4261
|
delete this.getClient().activeChannels[tempChannelCid];
|
|
4262
4262
|
}
|
|
4263
4263
|
|
|
4264
|
-
if (!(this.cid in this.getClient().activeChannels)) {
|
|
4264
|
+
if (!(this.cid in this.getClient().activeChannels) && this.getClient()._cacheEnabled()) {
|
|
4265
4265
|
this.getClient().activeChannels[this.cid] = this;
|
|
4266
4266
|
}
|
|
4267
4267
|
}
|
|
@@ -5229,15 +5229,20 @@ function _arrayLikeToArray$3(arr, len) { if (len == null || len > arr.length) le
|
|
|
5229
5229
|
* ClientState - A container class for the client state.
|
|
5230
5230
|
*/
|
|
5231
5231
|
var ClientState = /*#__PURE__*/function () {
|
|
5232
|
-
function ClientState() {
|
|
5232
|
+
function ClientState(_ref) {
|
|
5233
|
+
var client = _ref.client;
|
|
5234
|
+
|
|
5233
5235
|
_classCallCheck__default['default'](this, ClientState);
|
|
5234
5236
|
|
|
5237
|
+
_defineProperty__default['default'](this, "client", void 0);
|
|
5238
|
+
|
|
5235
5239
|
_defineProperty__default['default'](this, "users", void 0);
|
|
5236
5240
|
|
|
5237
5241
|
_defineProperty__default['default'](this, "userChannelReferences", void 0);
|
|
5238
5242
|
|
|
5239
5243
|
// show the status for a certain user...
|
|
5240
5244
|
// ie online, offline etc
|
|
5245
|
+
this.client = client;
|
|
5241
5246
|
this.users = {}; // store which channels contain references to the specified user...
|
|
5242
5247
|
|
|
5243
5248
|
this.userChannelReferences = {};
|
|
@@ -5263,14 +5268,14 @@ var ClientState = /*#__PURE__*/function () {
|
|
|
5263
5268
|
}, {
|
|
5264
5269
|
key: "updateUser",
|
|
5265
5270
|
value: function updateUser(user) {
|
|
5266
|
-
if (user != null) {
|
|
5271
|
+
if (user != null && this.client._cacheEnabled()) {
|
|
5267
5272
|
this.users[user.id] = user;
|
|
5268
5273
|
}
|
|
5269
5274
|
}
|
|
5270
5275
|
}, {
|
|
5271
5276
|
key: "updateUserReference",
|
|
5272
5277
|
value: function updateUserReference(user, channelID) {
|
|
5273
|
-
if (user == null) {
|
|
5278
|
+
if (user == null || !this.client._cacheEnabled()) {
|
|
5274
5279
|
return;
|
|
5275
5280
|
}
|
|
5276
5281
|
|
|
@@ -10321,6 +10326,10 @@ var PollManager = /*#__PURE__*/function () {
|
|
|
10321
10326
|
});
|
|
10322
10327
|
|
|
10323
10328
|
_defineProperty__default['default'](this, "setOrOverwriteInCache", function (pollResponse, overwriteState) {
|
|
10329
|
+
if (!_this.client._cacheEnabled()) {
|
|
10330
|
+
return;
|
|
10331
|
+
}
|
|
10332
|
+
|
|
10324
10333
|
var pollFromCache = _this.fromState(pollResponse.id);
|
|
10325
10334
|
|
|
10326
10335
|
if (!pollFromCache) {
|
|
@@ -10743,7 +10752,9 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10743
10752
|
|
|
10744
10753
|
_this.activeChannels = {}; // reset client state
|
|
10745
10754
|
|
|
10746
|
-
_this.state = new ClientState(
|
|
10755
|
+
_this.state = new ClientState({
|
|
10756
|
+
client: _this
|
|
10757
|
+
}); // reset thread manager
|
|
10747
10758
|
|
|
10748
10759
|
_this.threads.resetState(); // reset token manager
|
|
10749
10760
|
|
|
@@ -11010,10 +11021,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11010
11021
|
|
|
11011
11022
|
for (var _channelID3 in refMap) {
|
|
11012
11023
|
var _channel4 = _this.activeChannels[_channelID3];
|
|
11013
|
-
var state = _channel4.state;
|
|
11014
|
-
/** deleted the messages from this user. */
|
|
11015
11024
|
|
|
11016
|
-
|
|
11025
|
+
if (_channel4) {
|
|
11026
|
+
var state = _channel4.state;
|
|
11027
|
+
/** deleted the messages from this user. */
|
|
11028
|
+
|
|
11029
|
+
state === null || state === void 0 ? void 0 : state.deleteUserMessages(user, hardDelete);
|
|
11030
|
+
}
|
|
11017
11031
|
}
|
|
11018
11032
|
});
|
|
11019
11033
|
|
|
@@ -11187,7 +11201,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11187
11201
|
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.
|
|
11188
11202
|
// In channel.query, we will replace it with 'cid'.
|
|
11189
11203
|
|
|
11190
|
-
_this.
|
|
11204
|
+
if (_this._cacheEnabled()) {
|
|
11205
|
+
_this.activeChannels[tempCid] = channel;
|
|
11206
|
+
}
|
|
11207
|
+
|
|
11191
11208
|
return channel;
|
|
11192
11209
|
});
|
|
11193
11210
|
|
|
@@ -11199,7 +11216,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11199
11216
|
|
|
11200
11217
|
var cid = "".concat(channelType, ":").concat(channelID);
|
|
11201
11218
|
|
|
11202
|
-
if (cid in _this.activeChannels && !_this.activeChannels[cid].disconnected) {
|
|
11219
|
+
if (cid in _this.activeChannels && _this.activeChannels[cid] && !_this.activeChannels[cid].disconnected) {
|
|
11203
11220
|
var _channel6 = _this.activeChannels[cid];
|
|
11204
11221
|
|
|
11205
11222
|
if (Object.keys(custom).length > 0) {
|
|
@@ -11211,7 +11228,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11211
11228
|
}
|
|
11212
11229
|
|
|
11213
11230
|
var channel = new Channel(_this, channelType, channelID, custom);
|
|
11214
|
-
|
|
11231
|
+
|
|
11232
|
+
if (_this._cacheEnabled()) {
|
|
11233
|
+
_this.activeChannels[channel.cid] = channel;
|
|
11234
|
+
}
|
|
11235
|
+
|
|
11215
11236
|
return channel;
|
|
11216
11237
|
});
|
|
11217
11238
|
|
|
@@ -11227,6 +11248,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11227
11248
|
return !!_this.secret;
|
|
11228
11249
|
});
|
|
11229
11250
|
|
|
11251
|
+
_defineProperty__default['default'](this, "_cacheEnabled", function () {
|
|
11252
|
+
return !_this._isUsingServerAuth() || !_this.options.disableCache;
|
|
11253
|
+
});
|
|
11254
|
+
|
|
11230
11255
|
_defineProperty__default['default'](this, "_buildWSPayload", function (client_request_id) {
|
|
11231
11256
|
return JSON.stringify({
|
|
11232
11257
|
user_id: _this.userID,
|
|
@@ -11239,7 +11264,9 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11239
11264
|
// set the key
|
|
11240
11265
|
this.key = _key;
|
|
11241
11266
|
this.listeners = {};
|
|
11242
|
-
this.state = new ClientState(
|
|
11267
|
+
this.state = new ClientState({
|
|
11268
|
+
client: this
|
|
11269
|
+
}); // a list of channels to hide ws events from
|
|
11243
11270
|
|
|
11244
11271
|
this.mutedChannels = [];
|
|
11245
11272
|
this.mutedUsers = [];
|
|
@@ -11258,7 +11285,8 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11258
11285
|
withCredentials: false,
|
|
11259
11286
|
// making sure cookies are not sent
|
|
11260
11287
|
warmUp: false,
|
|
11261
|
-
recoverStateOnReconnect: true
|
|
11288
|
+
recoverStateOnReconnect: true,
|
|
11289
|
+
disableCache: false
|
|
11262
11290
|
}, inputOptions);
|
|
11263
11291
|
|
|
11264
11292
|
if (this.node && !this.options.httpsAgent) {
|
|
@@ -12986,7 +13014,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12986
13014
|
value: function _addChannelConfig(_ref8) {
|
|
12987
13015
|
var cid = _ref8.cid,
|
|
12988
13016
|
config = _ref8.config;
|
|
12989
|
-
|
|
13017
|
+
|
|
13018
|
+
if (this._cacheEnabled()) {
|
|
13019
|
+
this.configs[cid] = config;
|
|
13020
|
+
}
|
|
12990
13021
|
}
|
|
12991
13022
|
/**
|
|
12992
13023
|
* channel - Returns a new channel with the given type, id and custom data
|
|
@@ -14397,6 +14428,48 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14397
14428
|
|
|
14398
14429
|
return translateMessage;
|
|
14399
14430
|
}()
|
|
14431
|
+
/**
|
|
14432
|
+
* translate - translates the given text to provided language
|
|
14433
|
+
*
|
|
14434
|
+
* @param {string} text
|
|
14435
|
+
* @param {string} destination_language
|
|
14436
|
+
* @param {string} source_language
|
|
14437
|
+
*
|
|
14438
|
+
* @return {TranslateResponse} Response that includes the message
|
|
14439
|
+
*/
|
|
14440
|
+
|
|
14441
|
+
}, {
|
|
14442
|
+
key: "translate",
|
|
14443
|
+
value: function () {
|
|
14444
|
+
var _translate = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee59(text, destination_language, source_language) {
|
|
14445
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee59$(_context59) {
|
|
14446
|
+
while (1) {
|
|
14447
|
+
switch (_context59.prev = _context59.next) {
|
|
14448
|
+
case 0:
|
|
14449
|
+
_context59.next = 2;
|
|
14450
|
+
return this.post(this.baseURL + "/translate", {
|
|
14451
|
+
text: text,
|
|
14452
|
+
source_language: source_language,
|
|
14453
|
+
destination_language: destination_language
|
|
14454
|
+
});
|
|
14455
|
+
|
|
14456
|
+
case 2:
|
|
14457
|
+
return _context59.abrupt("return", _context59.sent);
|
|
14458
|
+
|
|
14459
|
+
case 3:
|
|
14460
|
+
case "end":
|
|
14461
|
+
return _context59.stop();
|
|
14462
|
+
}
|
|
14463
|
+
}
|
|
14464
|
+
}, _callee59, this);
|
|
14465
|
+
}));
|
|
14466
|
+
|
|
14467
|
+
function translate(_x75, _x76, _x77) {
|
|
14468
|
+
return _translate.apply(this, arguments);
|
|
14469
|
+
}
|
|
14470
|
+
|
|
14471
|
+
return translate;
|
|
14472
|
+
}()
|
|
14400
14473
|
/**
|
|
14401
14474
|
* _normalizeExpiration - transforms expiration value into ISO string
|
|
14402
14475
|
* @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
|
|
@@ -14493,14 +14566,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14493
14566
|
}, {
|
|
14494
14567
|
key: "updateMessage",
|
|
14495
14568
|
value: function () {
|
|
14496
|
-
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14569
|
+
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee60(message, userId, options) {
|
|
14497
14570
|
var clonedMessage, reservedMessageFields;
|
|
14498
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14571
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee60$(_context60) {
|
|
14499
14572
|
while (1) {
|
|
14500
|
-
switch (
|
|
14573
|
+
switch (_context60.prev = _context60.next) {
|
|
14501
14574
|
case 0:
|
|
14502
14575
|
if (message.id) {
|
|
14503
|
-
|
|
14576
|
+
_context60.next = 2;
|
|
14504
14577
|
break;
|
|
14505
14578
|
}
|
|
14506
14579
|
|
|
@@ -14537,23 +14610,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14537
14610
|
});
|
|
14538
14611
|
}
|
|
14539
14612
|
|
|
14540
|
-
|
|
14613
|
+
_context60.next = 10;
|
|
14541
14614
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(message.id)), _objectSpread({
|
|
14542
14615
|
message: clonedMessage
|
|
14543
14616
|
}, options));
|
|
14544
14617
|
|
|
14545
14618
|
case 10:
|
|
14546
|
-
return
|
|
14619
|
+
return _context60.abrupt("return", _context60.sent);
|
|
14547
14620
|
|
|
14548
14621
|
case 11:
|
|
14549
14622
|
case "end":
|
|
14550
|
-
return
|
|
14623
|
+
return _context60.stop();
|
|
14551
14624
|
}
|
|
14552
14625
|
}
|
|
14553
|
-
},
|
|
14626
|
+
}, _callee60, this);
|
|
14554
14627
|
}));
|
|
14555
14628
|
|
|
14556
|
-
function updateMessage(
|
|
14629
|
+
function updateMessage(_x78, _x79, _x80) {
|
|
14557
14630
|
return _updateMessage.apply(this, arguments);
|
|
14558
14631
|
}
|
|
14559
14632
|
|
|
@@ -14576,14 +14649,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14576
14649
|
}, {
|
|
14577
14650
|
key: "partialUpdateMessage",
|
|
14578
14651
|
value: function () {
|
|
14579
|
-
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14652
|
+
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee61(id, partialMessageObject, userId, options) {
|
|
14580
14653
|
var user;
|
|
14581
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14654
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee61$(_context61) {
|
|
14582
14655
|
while (1) {
|
|
14583
|
-
switch (
|
|
14656
|
+
switch (_context61.prev = _context61.next) {
|
|
14584
14657
|
case 0:
|
|
14585
14658
|
if (id) {
|
|
14586
|
-
|
|
14659
|
+
_context61.next = 2;
|
|
14587
14660
|
break;
|
|
14588
14661
|
}
|
|
14589
14662
|
|
|
@@ -14598,23 +14671,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14598
14671
|
};
|
|
14599
14672
|
}
|
|
14600
14673
|
|
|
14601
|
-
|
|
14674
|
+
_context61.next = 6;
|
|
14602
14675
|
return this.put(this.baseURL + "/messages/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
14603
14676
|
user: user
|
|
14604
14677
|
}));
|
|
14605
14678
|
|
|
14606
14679
|
case 6:
|
|
14607
|
-
return
|
|
14680
|
+
return _context61.abrupt("return", _context61.sent);
|
|
14608
14681
|
|
|
14609
14682
|
case 7:
|
|
14610
14683
|
case "end":
|
|
14611
|
-
return
|
|
14684
|
+
return _context61.stop();
|
|
14612
14685
|
}
|
|
14613
14686
|
}
|
|
14614
|
-
},
|
|
14687
|
+
}, _callee61, this);
|
|
14615
14688
|
}));
|
|
14616
14689
|
|
|
14617
|
-
function partialUpdateMessage(
|
|
14690
|
+
function partialUpdateMessage(_x81, _x82, _x83, _x84) {
|
|
14618
14691
|
return _partialUpdateMessage.apply(this, arguments);
|
|
14619
14692
|
}
|
|
14620
14693
|
|
|
@@ -14623,11 +14696,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14623
14696
|
}, {
|
|
14624
14697
|
key: "deleteMessage",
|
|
14625
14698
|
value: function () {
|
|
14626
|
-
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14699
|
+
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee62(messageID, hardDelete) {
|
|
14627
14700
|
var params;
|
|
14628
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14701
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee62$(_context62) {
|
|
14629
14702
|
while (1) {
|
|
14630
|
-
switch (
|
|
14703
|
+
switch (_context62.prev = _context62.next) {
|
|
14631
14704
|
case 0:
|
|
14632
14705
|
params = {};
|
|
14633
14706
|
|
|
@@ -14637,21 +14710,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14637
14710
|
};
|
|
14638
14711
|
}
|
|
14639
14712
|
|
|
14640
|
-
|
|
14713
|
+
_context62.next = 4;
|
|
14641
14714
|
return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), params);
|
|
14642
14715
|
|
|
14643
14716
|
case 4:
|
|
14644
|
-
return
|
|
14717
|
+
return _context62.abrupt("return", _context62.sent);
|
|
14645
14718
|
|
|
14646
14719
|
case 5:
|
|
14647
14720
|
case "end":
|
|
14648
|
-
return
|
|
14721
|
+
return _context62.stop();
|
|
14649
14722
|
}
|
|
14650
14723
|
}
|
|
14651
|
-
},
|
|
14724
|
+
}, _callee62, this);
|
|
14652
14725
|
}));
|
|
14653
14726
|
|
|
14654
|
-
function deleteMessage(
|
|
14727
|
+
function deleteMessage(_x85, _x86) {
|
|
14655
14728
|
return _deleteMessage.apply(this, arguments);
|
|
14656
14729
|
}
|
|
14657
14730
|
|
|
@@ -14673,28 +14746,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14673
14746
|
}, {
|
|
14674
14747
|
key: "undeleteMessage",
|
|
14675
14748
|
value: function () {
|
|
14676
|
-
var _undeleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14677
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14749
|
+
var _undeleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee63(messageID, userID) {
|
|
14750
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee63$(_context63) {
|
|
14678
14751
|
while (1) {
|
|
14679
|
-
switch (
|
|
14752
|
+
switch (_context63.prev = _context63.next) {
|
|
14680
14753
|
case 0:
|
|
14681
|
-
|
|
14754
|
+
_context63.next = 2;
|
|
14682
14755
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageID), "/undelete"), {
|
|
14683
14756
|
undeleted_by: userID
|
|
14684
14757
|
});
|
|
14685
14758
|
|
|
14686
14759
|
case 2:
|
|
14687
|
-
return
|
|
14760
|
+
return _context63.abrupt("return", _context63.sent);
|
|
14688
14761
|
|
|
14689
14762
|
case 3:
|
|
14690
14763
|
case "end":
|
|
14691
|
-
return
|
|
14764
|
+
return _context63.stop();
|
|
14692
14765
|
}
|
|
14693
14766
|
}
|
|
14694
|
-
},
|
|
14767
|
+
}, _callee63, this);
|
|
14695
14768
|
}));
|
|
14696
14769
|
|
|
14697
|
-
function undeleteMessage(
|
|
14770
|
+
function undeleteMessage(_x87, _x88) {
|
|
14698
14771
|
return _undeleteMessage.apply(this, arguments);
|
|
14699
14772
|
}
|
|
14700
14773
|
|
|
@@ -14703,26 +14776,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14703
14776
|
}, {
|
|
14704
14777
|
key: "getMessage",
|
|
14705
14778
|
value: function () {
|
|
14706
|
-
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14707
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14779
|
+
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee64(messageID, options) {
|
|
14780
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee64$(_context64) {
|
|
14708
14781
|
while (1) {
|
|
14709
|
-
switch (
|
|
14782
|
+
switch (_context64.prev = _context64.next) {
|
|
14710
14783
|
case 0:
|
|
14711
|
-
|
|
14784
|
+
_context64.next = 2;
|
|
14712
14785
|
return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), _objectSpread({}, options));
|
|
14713
14786
|
|
|
14714
14787
|
case 2:
|
|
14715
|
-
return
|
|
14788
|
+
return _context64.abrupt("return", _context64.sent);
|
|
14716
14789
|
|
|
14717
14790
|
case 3:
|
|
14718
14791
|
case "end":
|
|
14719
|
-
return
|
|
14792
|
+
return _context64.stop();
|
|
14720
14793
|
}
|
|
14721
14794
|
}
|
|
14722
|
-
},
|
|
14795
|
+
}, _callee64, this);
|
|
14723
14796
|
}));
|
|
14724
14797
|
|
|
14725
|
-
function getMessage(
|
|
14798
|
+
function getMessage(_x89, _x90) {
|
|
14726
14799
|
return _getMessage.apply(this, arguments);
|
|
14727
14800
|
}
|
|
14728
14801
|
|
|
@@ -14743,30 +14816,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14743
14816
|
}, {
|
|
14744
14817
|
key: "queryThreads",
|
|
14745
14818
|
value: function () {
|
|
14746
|
-
var _queryThreads = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14819
|
+
var _queryThreads = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee65() {
|
|
14747
14820
|
var _this5 = this;
|
|
14748
14821
|
|
|
14749
14822
|
var options,
|
|
14750
14823
|
optionsWithDefaults,
|
|
14751
14824
|
response,
|
|
14752
|
-
|
|
14753
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14825
|
+
_args65 = arguments;
|
|
14826
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee65$(_context65) {
|
|
14754
14827
|
while (1) {
|
|
14755
|
-
switch (
|
|
14828
|
+
switch (_context65.prev = _context65.next) {
|
|
14756
14829
|
case 0:
|
|
14757
|
-
options =
|
|
14830
|
+
options = _args65.length > 0 && _args65[0] !== undefined ? _args65[0] : {};
|
|
14758
14831
|
optionsWithDefaults = _objectSpread({
|
|
14759
14832
|
limit: 10,
|
|
14760
14833
|
participant_limit: 10,
|
|
14761
14834
|
reply_limit: 3,
|
|
14762
14835
|
watch: true
|
|
14763
14836
|
}, options);
|
|
14764
|
-
|
|
14837
|
+
_context65.next = 4;
|
|
14765
14838
|
return this.post("".concat(this.baseURL, "/threads"), optionsWithDefaults);
|
|
14766
14839
|
|
|
14767
14840
|
case 4:
|
|
14768
|
-
response =
|
|
14769
|
-
return
|
|
14841
|
+
response = _context65.sent;
|
|
14842
|
+
return _context65.abrupt("return", {
|
|
14770
14843
|
threads: response.threads.map(function (thread) {
|
|
14771
14844
|
return new Thread({
|
|
14772
14845
|
client: _this5,
|
|
@@ -14778,10 +14851,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14778
14851
|
|
|
14779
14852
|
case 6:
|
|
14780
14853
|
case "end":
|
|
14781
|
-
return
|
|
14854
|
+
return _context65.stop();
|
|
14782
14855
|
}
|
|
14783
14856
|
}
|
|
14784
|
-
},
|
|
14857
|
+
}, _callee65, this);
|
|
14785
14858
|
}));
|
|
14786
14859
|
|
|
14787
14860
|
function queryThreads() {
|
|
@@ -14805,19 +14878,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14805
14878
|
}, {
|
|
14806
14879
|
key: "getThread",
|
|
14807
14880
|
value: function () {
|
|
14808
|
-
var _getThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14881
|
+
var _getThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee66(messageId) {
|
|
14809
14882
|
var options,
|
|
14810
14883
|
optionsWithDefaults,
|
|
14811
14884
|
response,
|
|
14812
|
-
|
|
14813
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14885
|
+
_args66 = arguments;
|
|
14886
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee66$(_context66) {
|
|
14814
14887
|
while (1) {
|
|
14815
|
-
switch (
|
|
14888
|
+
switch (_context66.prev = _context66.next) {
|
|
14816
14889
|
case 0:
|
|
14817
|
-
options =
|
|
14890
|
+
options = _args66.length > 1 && _args66[1] !== undefined ? _args66[1] : {};
|
|
14818
14891
|
|
|
14819
14892
|
if (messageId) {
|
|
14820
|
-
|
|
14893
|
+
_context66.next = 3;
|
|
14821
14894
|
break;
|
|
14822
14895
|
}
|
|
14823
14896
|
|
|
@@ -14829,25 +14902,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14829
14902
|
reply_limit: 3,
|
|
14830
14903
|
watch: true
|
|
14831
14904
|
}, options);
|
|
14832
|
-
|
|
14905
|
+
_context66.next = 6;
|
|
14833
14906
|
return this.get("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), optionsWithDefaults);
|
|
14834
14907
|
|
|
14835
14908
|
case 6:
|
|
14836
|
-
response =
|
|
14837
|
-
return
|
|
14909
|
+
response = _context66.sent;
|
|
14910
|
+
return _context66.abrupt("return", new Thread({
|
|
14838
14911
|
client: this,
|
|
14839
14912
|
threadData: response.thread
|
|
14840
14913
|
}));
|
|
14841
14914
|
|
|
14842
14915
|
case 8:
|
|
14843
14916
|
case "end":
|
|
14844
|
-
return
|
|
14917
|
+
return _context66.stop();
|
|
14845
14918
|
}
|
|
14846
14919
|
}
|
|
14847
|
-
},
|
|
14920
|
+
}, _callee66, this);
|
|
14848
14921
|
}));
|
|
14849
14922
|
|
|
14850
|
-
function getThread(
|
|
14923
|
+
function getThread(_x91) {
|
|
14851
14924
|
return _getThread.apply(this, arguments);
|
|
14852
14925
|
}
|
|
14853
14926
|
|
|
@@ -14865,15 +14938,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14865
14938
|
}, {
|
|
14866
14939
|
key: "partialUpdateThread",
|
|
14867
14940
|
value: function () {
|
|
14868
|
-
var _partialUpdateThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14941
|
+
var _partialUpdateThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee67(messageId, partialThreadObject) {
|
|
14869
14942
|
var reservedThreadFields, _key5;
|
|
14870
14943
|
|
|
14871
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14944
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee67$(_context67) {
|
|
14872
14945
|
while (1) {
|
|
14873
|
-
switch (
|
|
14946
|
+
switch (_context67.prev = _context67.next) {
|
|
14874
14947
|
case 0:
|
|
14875
14948
|
if (messageId) {
|
|
14876
|
-
|
|
14949
|
+
_context67.next = 2;
|
|
14877
14950
|
break;
|
|
14878
14951
|
}
|
|
14879
14952
|
|
|
@@ -14883,43 +14956,43 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14883
14956
|
// check for reserved fields from ThreadResponse type within partialThreadObject's set and unset.
|
|
14884
14957
|
// Throw error if any of the reserved field is found.
|
|
14885
14958
|
reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel', 'custom'];
|
|
14886
|
-
|
|
14959
|
+
_context67.t0 = _regeneratorRuntime__default['default'].keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
|
|
14887
14960
|
|
|
14888
14961
|
case 4:
|
|
14889
|
-
if ((
|
|
14890
|
-
|
|
14962
|
+
if ((_context67.t1 = _context67.t0()).done) {
|
|
14963
|
+
_context67.next = 10;
|
|
14891
14964
|
break;
|
|
14892
14965
|
}
|
|
14893
14966
|
|
|
14894
|
-
_key5 =
|
|
14967
|
+
_key5 = _context67.t1.value;
|
|
14895
14968
|
|
|
14896
14969
|
if (!reservedThreadFields.includes(_key5)) {
|
|
14897
|
-
|
|
14970
|
+
_context67.next = 8;
|
|
14898
14971
|
break;
|
|
14899
14972
|
}
|
|
14900
14973
|
|
|
14901
14974
|
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."));
|
|
14902
14975
|
|
|
14903
14976
|
case 8:
|
|
14904
|
-
|
|
14977
|
+
_context67.next = 4;
|
|
14905
14978
|
break;
|
|
14906
14979
|
|
|
14907
14980
|
case 10:
|
|
14908
|
-
|
|
14981
|
+
_context67.next = 12;
|
|
14909
14982
|
return this.patch("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), partialThreadObject);
|
|
14910
14983
|
|
|
14911
14984
|
case 12:
|
|
14912
|
-
return
|
|
14985
|
+
return _context67.abrupt("return", _context67.sent);
|
|
14913
14986
|
|
|
14914
14987
|
case 13:
|
|
14915
14988
|
case "end":
|
|
14916
|
-
return
|
|
14989
|
+
return _context67.stop();
|
|
14917
14990
|
}
|
|
14918
14991
|
}
|
|
14919
|
-
},
|
|
14992
|
+
}, _callee67, this);
|
|
14920
14993
|
}));
|
|
14921
14994
|
|
|
14922
|
-
function partialUpdateThread(
|
|
14995
|
+
function partialUpdateThread(_x92, _x93) {
|
|
14923
14996
|
return _partialUpdateThread.apply(this, arguments);
|
|
14924
14997
|
}
|
|
14925
14998
|
|
|
@@ -14928,7 +15001,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14928
15001
|
}, {
|
|
14929
15002
|
key: "getUserAgent",
|
|
14930
15003
|
value: function getUserAgent() {
|
|
14931
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
15004
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.52.1");
|
|
14932
15005
|
}
|
|
14933
15006
|
}, {
|
|
14934
15007
|
key: "setUserAgent",
|
|
@@ -15147,28 +15220,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15147
15220
|
}, {
|
|
15148
15221
|
key: "sendUserCustomEvent",
|
|
15149
15222
|
value: function () {
|
|
15150
|
-
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15151
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15223
|
+
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee68(targetUserID, event) {
|
|
15224
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee68$(_context68) {
|
|
15152
15225
|
while (1) {
|
|
15153
|
-
switch (
|
|
15226
|
+
switch (_context68.prev = _context68.next) {
|
|
15154
15227
|
case 0:
|
|
15155
|
-
|
|
15228
|
+
_context68.next = 2;
|
|
15156
15229
|
return this.post("".concat(this.baseURL, "/users/").concat(encodeURIComponent(targetUserID), "/event"), {
|
|
15157
15230
|
event: event
|
|
15158
15231
|
});
|
|
15159
15232
|
|
|
15160
15233
|
case 2:
|
|
15161
|
-
return
|
|
15234
|
+
return _context68.abrupt("return", _context68.sent);
|
|
15162
15235
|
|
|
15163
15236
|
case 3:
|
|
15164
15237
|
case "end":
|
|
15165
|
-
return
|
|
15238
|
+
return _context68.stop();
|
|
15166
15239
|
}
|
|
15167
15240
|
}
|
|
15168
|
-
},
|
|
15241
|
+
}, _callee68, this);
|
|
15169
15242
|
}));
|
|
15170
15243
|
|
|
15171
|
-
function sendUserCustomEvent(
|
|
15244
|
+
function sendUserCustomEvent(_x94, _x95) {
|
|
15172
15245
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
15173
15246
|
}
|
|
15174
15247
|
|
|
@@ -15265,28 +15338,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15265
15338
|
}, {
|
|
15266
15339
|
key: "createSegment",
|
|
15267
15340
|
value: function () {
|
|
15268
|
-
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15341
|
+
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee69(type, id, data) {
|
|
15269
15342
|
var body;
|
|
15270
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15343
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee69$(_context69) {
|
|
15271
15344
|
while (1) {
|
|
15272
|
-
switch (
|
|
15345
|
+
switch (_context69.prev = _context69.next) {
|
|
15273
15346
|
case 0:
|
|
15274
15347
|
this.validateServerSideAuth();
|
|
15275
15348
|
body = _objectSpread({
|
|
15276
15349
|
id: id,
|
|
15277
15350
|
type: type
|
|
15278
15351
|
}, data);
|
|
15279
|
-
return
|
|
15352
|
+
return _context69.abrupt("return", this.post(this.baseURL + "/segments", body));
|
|
15280
15353
|
|
|
15281
15354
|
case 3:
|
|
15282
15355
|
case "end":
|
|
15283
|
-
return
|
|
15356
|
+
return _context69.stop();
|
|
15284
15357
|
}
|
|
15285
15358
|
}
|
|
15286
|
-
},
|
|
15359
|
+
}, _callee69, this);
|
|
15287
15360
|
}));
|
|
15288
15361
|
|
|
15289
|
-
function createSegment(
|
|
15362
|
+
function createSegment(_x96, _x97, _x98) {
|
|
15290
15363
|
return _createSegment.apply(this, arguments);
|
|
15291
15364
|
}
|
|
15292
15365
|
|
|
@@ -15305,23 +15378,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15305
15378
|
}, {
|
|
15306
15379
|
key: "createUserSegment",
|
|
15307
15380
|
value: function () {
|
|
15308
|
-
var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15309
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15381
|
+
var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee70(id, data) {
|
|
15382
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee70$(_context70) {
|
|
15310
15383
|
while (1) {
|
|
15311
|
-
switch (
|
|
15384
|
+
switch (_context70.prev = _context70.next) {
|
|
15312
15385
|
case 0:
|
|
15313
15386
|
this.validateServerSideAuth();
|
|
15314
|
-
return
|
|
15387
|
+
return _context70.abrupt("return", this.createSegment('user', id, data));
|
|
15315
15388
|
|
|
15316
15389
|
case 2:
|
|
15317
15390
|
case "end":
|
|
15318
|
-
return
|
|
15391
|
+
return _context70.stop();
|
|
15319
15392
|
}
|
|
15320
15393
|
}
|
|
15321
|
-
},
|
|
15394
|
+
}, _callee70, this);
|
|
15322
15395
|
}));
|
|
15323
15396
|
|
|
15324
|
-
function createUserSegment(
|
|
15397
|
+
function createUserSegment(_x99, _x100) {
|
|
15325
15398
|
return _createUserSegment.apply(this, arguments);
|
|
15326
15399
|
}
|
|
15327
15400
|
|
|
@@ -15340,23 +15413,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15340
15413
|
}, {
|
|
15341
15414
|
key: "createChannelSegment",
|
|
15342
15415
|
value: function () {
|
|
15343
|
-
var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15344
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15416
|
+
var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee71(id, data) {
|
|
15417
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee71$(_context71) {
|
|
15345
15418
|
while (1) {
|
|
15346
|
-
switch (
|
|
15419
|
+
switch (_context71.prev = _context71.next) {
|
|
15347
15420
|
case 0:
|
|
15348
15421
|
this.validateServerSideAuth();
|
|
15349
|
-
return
|
|
15422
|
+
return _context71.abrupt("return", this.createSegment('channel', id, data));
|
|
15350
15423
|
|
|
15351
15424
|
case 2:
|
|
15352
15425
|
case "end":
|
|
15353
|
-
return
|
|
15426
|
+
return _context71.stop();
|
|
15354
15427
|
}
|
|
15355
15428
|
}
|
|
15356
|
-
},
|
|
15429
|
+
}, _callee71, this);
|
|
15357
15430
|
}));
|
|
15358
15431
|
|
|
15359
|
-
function createChannelSegment(
|
|
15432
|
+
function createChannelSegment(_x101, _x102) {
|
|
15360
15433
|
return _createChannelSegment.apply(this, arguments);
|
|
15361
15434
|
}
|
|
15362
15435
|
|
|
@@ -15365,23 +15438,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15365
15438
|
}, {
|
|
15366
15439
|
key: "getSegment",
|
|
15367
15440
|
value: function () {
|
|
15368
|
-
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15369
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15441
|
+
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee72(id) {
|
|
15442
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee72$(_context72) {
|
|
15370
15443
|
while (1) {
|
|
15371
|
-
switch (
|
|
15444
|
+
switch (_context72.prev = _context72.next) {
|
|
15372
15445
|
case 0:
|
|
15373
15446
|
this.validateServerSideAuth();
|
|
15374
|
-
return
|
|
15447
|
+
return _context72.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
|
|
15375
15448
|
|
|
15376
15449
|
case 2:
|
|
15377
15450
|
case "end":
|
|
15378
|
-
return
|
|
15451
|
+
return _context72.stop();
|
|
15379
15452
|
}
|
|
15380
15453
|
}
|
|
15381
|
-
},
|
|
15454
|
+
}, _callee72, this);
|
|
15382
15455
|
}));
|
|
15383
15456
|
|
|
15384
|
-
function getSegment(
|
|
15457
|
+
function getSegment(_x103) {
|
|
15385
15458
|
return _getSegment.apply(this, arguments);
|
|
15386
15459
|
}
|
|
15387
15460
|
|
|
@@ -15399,23 +15472,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15399
15472
|
}, {
|
|
15400
15473
|
key: "updateSegment",
|
|
15401
15474
|
value: function () {
|
|
15402
|
-
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15403
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15475
|
+
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee73(id, data) {
|
|
15476
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee73$(_context73) {
|
|
15404
15477
|
while (1) {
|
|
15405
|
-
switch (
|
|
15478
|
+
switch (_context73.prev = _context73.next) {
|
|
15406
15479
|
case 0:
|
|
15407
15480
|
this.validateServerSideAuth();
|
|
15408
|
-
return
|
|
15481
|
+
return _context73.abrupt("return", this.put(this.baseURL + "/segments/".concat(encodeURIComponent(id)), data));
|
|
15409
15482
|
|
|
15410
15483
|
case 2:
|
|
15411
15484
|
case "end":
|
|
15412
|
-
return
|
|
15485
|
+
return _context73.stop();
|
|
15413
15486
|
}
|
|
15414
15487
|
}
|
|
15415
|
-
},
|
|
15488
|
+
}, _callee73, this);
|
|
15416
15489
|
}));
|
|
15417
15490
|
|
|
15418
|
-
function updateSegment(
|
|
15491
|
+
function updateSegment(_x104, _x105) {
|
|
15419
15492
|
return _updateSegment.apply(this, arguments);
|
|
15420
15493
|
}
|
|
15421
15494
|
|
|
@@ -15433,27 +15506,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15433
15506
|
}, {
|
|
15434
15507
|
key: "addSegmentTargets",
|
|
15435
15508
|
value: function () {
|
|
15436
|
-
var _addSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15509
|
+
var _addSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee74(id, targets) {
|
|
15437
15510
|
var body;
|
|
15438
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15511
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee74$(_context74) {
|
|
15439
15512
|
while (1) {
|
|
15440
|
-
switch (
|
|
15513
|
+
switch (_context74.prev = _context74.next) {
|
|
15441
15514
|
case 0:
|
|
15442
15515
|
this.validateServerSideAuth();
|
|
15443
15516
|
body = {
|
|
15444
15517
|
target_ids: targets
|
|
15445
15518
|
};
|
|
15446
|
-
return
|
|
15519
|
+
return _context74.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/addtargets"), body));
|
|
15447
15520
|
|
|
15448
15521
|
case 3:
|
|
15449
15522
|
case "end":
|
|
15450
|
-
return
|
|
15523
|
+
return _context74.stop();
|
|
15451
15524
|
}
|
|
15452
15525
|
}
|
|
15453
|
-
},
|
|
15526
|
+
}, _callee74, this);
|
|
15454
15527
|
}));
|
|
15455
15528
|
|
|
15456
|
-
function addSegmentTargets(
|
|
15529
|
+
function addSegmentTargets(_x106, _x107) {
|
|
15457
15530
|
return _addSegmentTargets.apply(this, arguments);
|
|
15458
15531
|
}
|
|
15459
15532
|
|
|
@@ -15462,33 +15535,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15462
15535
|
}, {
|
|
15463
15536
|
key: "querySegmentTargets",
|
|
15464
15537
|
value: function () {
|
|
15465
|
-
var _querySegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15538
|
+
var _querySegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee75(id) {
|
|
15466
15539
|
var filter,
|
|
15467
15540
|
sort,
|
|
15468
15541
|
options,
|
|
15469
|
-
|
|
15470
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15542
|
+
_args75 = arguments;
|
|
15543
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee75$(_context75) {
|
|
15471
15544
|
while (1) {
|
|
15472
|
-
switch (
|
|
15545
|
+
switch (_context75.prev = _context75.next) {
|
|
15473
15546
|
case 0:
|
|
15474
|
-
filter =
|
|
15475
|
-
sort =
|
|
15476
|
-
options =
|
|
15547
|
+
filter = _args75.length > 1 && _args75[1] !== undefined ? _args75[1] : {};
|
|
15548
|
+
sort = _args75.length > 2 && _args75[2] !== undefined ? _args75[2] : [];
|
|
15549
|
+
options = _args75.length > 3 && _args75[3] !== undefined ? _args75[3] : {};
|
|
15477
15550
|
this.validateServerSideAuth();
|
|
15478
|
-
return
|
|
15551
|
+
return _context75.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/targets/query"), _objectSpread({
|
|
15479
15552
|
filter: filter || {},
|
|
15480
15553
|
sort: sort || []
|
|
15481
15554
|
}, options)));
|
|
15482
15555
|
|
|
15483
15556
|
case 5:
|
|
15484
15557
|
case "end":
|
|
15485
|
-
return
|
|
15558
|
+
return _context75.stop();
|
|
15486
15559
|
}
|
|
15487
15560
|
}
|
|
15488
|
-
},
|
|
15561
|
+
}, _callee75, this);
|
|
15489
15562
|
}));
|
|
15490
15563
|
|
|
15491
|
-
function querySegmentTargets(
|
|
15564
|
+
function querySegmentTargets(_x108) {
|
|
15492
15565
|
return _querySegmentTargets.apply(this, arguments);
|
|
15493
15566
|
}
|
|
15494
15567
|
|
|
@@ -15506,27 +15579,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15506
15579
|
}, {
|
|
15507
15580
|
key: "removeSegmentTargets",
|
|
15508
15581
|
value: function () {
|
|
15509
|
-
var _removeSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15582
|
+
var _removeSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee76(id, targets) {
|
|
15510
15583
|
var body;
|
|
15511
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15584
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee76$(_context76) {
|
|
15512
15585
|
while (1) {
|
|
15513
|
-
switch (
|
|
15586
|
+
switch (_context76.prev = _context76.next) {
|
|
15514
15587
|
case 0:
|
|
15515
15588
|
this.validateServerSideAuth();
|
|
15516
15589
|
body = {
|
|
15517
15590
|
target_ids: targets
|
|
15518
15591
|
};
|
|
15519
|
-
return
|
|
15592
|
+
return _context76.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/deletetargets"), body));
|
|
15520
15593
|
|
|
15521
15594
|
case 3:
|
|
15522
15595
|
case "end":
|
|
15523
|
-
return
|
|
15596
|
+
return _context76.stop();
|
|
15524
15597
|
}
|
|
15525
15598
|
}
|
|
15526
|
-
},
|
|
15599
|
+
}, _callee76, this);
|
|
15527
15600
|
}));
|
|
15528
15601
|
|
|
15529
|
-
function removeSegmentTargets(
|
|
15602
|
+
function removeSegmentTargets(_x109, _x110) {
|
|
15530
15603
|
return _removeSegmentTargets.apply(this, arguments);
|
|
15531
15604
|
}
|
|
15532
15605
|
|
|
@@ -15544,29 +15617,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15544
15617
|
}, {
|
|
15545
15618
|
key: "querySegments",
|
|
15546
15619
|
value: function () {
|
|
15547
|
-
var _querySegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15620
|
+
var _querySegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee77(filter, sort) {
|
|
15548
15621
|
var options,
|
|
15549
|
-
|
|
15550
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15622
|
+
_args77 = arguments;
|
|
15623
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee77$(_context77) {
|
|
15551
15624
|
while (1) {
|
|
15552
|
-
switch (
|
|
15625
|
+
switch (_context77.prev = _context77.next) {
|
|
15553
15626
|
case 0:
|
|
15554
|
-
options =
|
|
15627
|
+
options = _args77.length > 2 && _args77[2] !== undefined ? _args77[2] : {};
|
|
15555
15628
|
this.validateServerSideAuth();
|
|
15556
|
-
return
|
|
15629
|
+
return _context77.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
|
|
15557
15630
|
filter: filter,
|
|
15558
15631
|
sort: sort
|
|
15559
15632
|
}, options)));
|
|
15560
15633
|
|
|
15561
15634
|
case 3:
|
|
15562
15635
|
case "end":
|
|
15563
|
-
return
|
|
15636
|
+
return _context77.stop();
|
|
15564
15637
|
}
|
|
15565
15638
|
}
|
|
15566
|
-
},
|
|
15639
|
+
}, _callee77, this);
|
|
15567
15640
|
}));
|
|
15568
15641
|
|
|
15569
|
-
function querySegments(
|
|
15642
|
+
function querySegments(_x111, _x112) {
|
|
15570
15643
|
return _querySegments.apply(this, arguments);
|
|
15571
15644
|
}
|
|
15572
15645
|
|
|
@@ -15583,23 +15656,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15583
15656
|
}, {
|
|
15584
15657
|
key: "deleteSegment",
|
|
15585
15658
|
value: function () {
|
|
15586
|
-
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15587
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15659
|
+
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee78(id) {
|
|
15660
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee78$(_context78) {
|
|
15588
15661
|
while (1) {
|
|
15589
|
-
switch (
|
|
15662
|
+
switch (_context78.prev = _context78.next) {
|
|
15590
15663
|
case 0:
|
|
15591
15664
|
this.validateServerSideAuth();
|
|
15592
|
-
return
|
|
15665
|
+
return _context78.abrupt("return", this.delete(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
|
|
15593
15666
|
|
|
15594
15667
|
case 2:
|
|
15595
15668
|
case "end":
|
|
15596
|
-
return
|
|
15669
|
+
return _context78.stop();
|
|
15597
15670
|
}
|
|
15598
15671
|
}
|
|
15599
|
-
},
|
|
15672
|
+
}, _callee78, this);
|
|
15600
15673
|
}));
|
|
15601
15674
|
|
|
15602
|
-
function deleteSegment(
|
|
15675
|
+
function deleteSegment(_x113) {
|
|
15603
15676
|
return _deleteSegment.apply(this, arguments);
|
|
15604
15677
|
}
|
|
15605
15678
|
|
|
@@ -15617,23 +15690,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15617
15690
|
}, {
|
|
15618
15691
|
key: "segmentTargetExists",
|
|
15619
15692
|
value: function () {
|
|
15620
|
-
var _segmentTargetExists = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15621
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15693
|
+
var _segmentTargetExists = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee79(segmentId, targetId) {
|
|
15694
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee79$(_context79) {
|
|
15622
15695
|
while (1) {
|
|
15623
|
-
switch (
|
|
15696
|
+
switch (_context79.prev = _context79.next) {
|
|
15624
15697
|
case 0:
|
|
15625
15698
|
this.validateServerSideAuth();
|
|
15626
|
-
return
|
|
15699
|
+
return _context79.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(segmentId), "/target/").concat(encodeURIComponent(targetId))));
|
|
15627
15700
|
|
|
15628
15701
|
case 2:
|
|
15629
15702
|
case "end":
|
|
15630
|
-
return
|
|
15703
|
+
return _context79.stop();
|
|
15631
15704
|
}
|
|
15632
15705
|
}
|
|
15633
|
-
},
|
|
15706
|
+
}, _callee79, this);
|
|
15634
15707
|
}));
|
|
15635
15708
|
|
|
15636
|
-
function segmentTargetExists(
|
|
15709
|
+
function segmentTargetExists(_x114, _x115) {
|
|
15637
15710
|
return _segmentTargetExists.apply(this, arguments);
|
|
15638
15711
|
}
|
|
15639
15712
|
|
|
@@ -15650,23 +15723,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15650
15723
|
}, {
|
|
15651
15724
|
key: "createCampaign",
|
|
15652
15725
|
value: function () {
|
|
15653
|
-
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15654
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15726
|
+
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee80(params) {
|
|
15727
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee80$(_context80) {
|
|
15655
15728
|
while (1) {
|
|
15656
|
-
switch (
|
|
15729
|
+
switch (_context80.prev = _context80.next) {
|
|
15657
15730
|
case 0:
|
|
15658
15731
|
this.validateServerSideAuth();
|
|
15659
|
-
return
|
|
15732
|
+
return _context80.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
|
|
15660
15733
|
|
|
15661
15734
|
case 2:
|
|
15662
15735
|
case "end":
|
|
15663
|
-
return
|
|
15736
|
+
return _context80.stop();
|
|
15664
15737
|
}
|
|
15665
15738
|
}
|
|
15666
|
-
},
|
|
15739
|
+
}, _callee80, this);
|
|
15667
15740
|
}));
|
|
15668
15741
|
|
|
15669
|
-
function createCampaign(
|
|
15742
|
+
function createCampaign(_x116) {
|
|
15670
15743
|
return _createCampaign.apply(this, arguments);
|
|
15671
15744
|
}
|
|
15672
15745
|
|
|
@@ -15675,23 +15748,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15675
15748
|
}, {
|
|
15676
15749
|
key: "getCampaign",
|
|
15677
15750
|
value: function () {
|
|
15678
|
-
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15679
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15751
|
+
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee81(id) {
|
|
15752
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee81$(_context81) {
|
|
15680
15753
|
while (1) {
|
|
15681
|
-
switch (
|
|
15754
|
+
switch (_context81.prev = _context81.next) {
|
|
15682
15755
|
case 0:
|
|
15683
15756
|
this.validateServerSideAuth();
|
|
15684
|
-
return
|
|
15757
|
+
return _context81.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
|
|
15685
15758
|
|
|
15686
15759
|
case 2:
|
|
15687
15760
|
case "end":
|
|
15688
|
-
return
|
|
15761
|
+
return _context81.stop();
|
|
15689
15762
|
}
|
|
15690
15763
|
}
|
|
15691
|
-
},
|
|
15764
|
+
}, _callee81, this);
|
|
15692
15765
|
}));
|
|
15693
15766
|
|
|
15694
|
-
function getCampaign(
|
|
15767
|
+
function getCampaign(_x117) {
|
|
15695
15768
|
return _getCampaign.apply(this, arguments);
|
|
15696
15769
|
}
|
|
15697
15770
|
|
|
@@ -15700,26 +15773,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15700
15773
|
}, {
|
|
15701
15774
|
key: "startCampaign",
|
|
15702
15775
|
value: function () {
|
|
15703
|
-
var _startCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15704
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15776
|
+
var _startCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee82(id, options) {
|
|
15777
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee82$(_context82) {
|
|
15705
15778
|
while (1) {
|
|
15706
|
-
switch (
|
|
15779
|
+
switch (_context82.prev = _context82.next) {
|
|
15707
15780
|
case 0:
|
|
15708
15781
|
this.validateServerSideAuth();
|
|
15709
|
-
return
|
|
15782
|
+
return _context82.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/start"), {
|
|
15710
15783
|
scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
|
|
15711
15784
|
stop_at: options === null || options === void 0 ? void 0 : options.stopAt
|
|
15712
15785
|
}));
|
|
15713
15786
|
|
|
15714
15787
|
case 2:
|
|
15715
15788
|
case "end":
|
|
15716
|
-
return
|
|
15789
|
+
return _context82.stop();
|
|
15717
15790
|
}
|
|
15718
15791
|
}
|
|
15719
|
-
},
|
|
15792
|
+
}, _callee82, this);
|
|
15720
15793
|
}));
|
|
15721
15794
|
|
|
15722
|
-
function startCampaign(
|
|
15795
|
+
function startCampaign(_x118, _x119) {
|
|
15723
15796
|
return _startCampaign.apply(this, arguments);
|
|
15724
15797
|
}
|
|
15725
15798
|
|
|
@@ -15735,30 +15808,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15735
15808
|
}, {
|
|
15736
15809
|
key: "queryCampaigns",
|
|
15737
15810
|
value: function () {
|
|
15738
|
-
var _queryCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15739
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15811
|
+
var _queryCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee83(filter, sort, options) {
|
|
15812
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee83$(_context83) {
|
|
15740
15813
|
while (1) {
|
|
15741
|
-
switch (
|
|
15814
|
+
switch (_context83.prev = _context83.next) {
|
|
15742
15815
|
case 0:
|
|
15743
15816
|
this.validateServerSideAuth();
|
|
15744
|
-
|
|
15817
|
+
_context83.next = 3;
|
|
15745
15818
|
return this.post(this.baseURL + "/campaigns/query", _objectSpread({
|
|
15746
15819
|
filter: filter,
|
|
15747
15820
|
sort: sort
|
|
15748
15821
|
}, options || {}));
|
|
15749
15822
|
|
|
15750
15823
|
case 3:
|
|
15751
|
-
return
|
|
15824
|
+
return _context83.abrupt("return", _context83.sent);
|
|
15752
15825
|
|
|
15753
15826
|
case 4:
|
|
15754
15827
|
case "end":
|
|
15755
|
-
return
|
|
15828
|
+
return _context83.stop();
|
|
15756
15829
|
}
|
|
15757
15830
|
}
|
|
15758
|
-
},
|
|
15831
|
+
}, _callee83, this);
|
|
15759
15832
|
}));
|
|
15760
15833
|
|
|
15761
|
-
function queryCampaigns(
|
|
15834
|
+
function queryCampaigns(_x120, _x121, _x122) {
|
|
15762
15835
|
return _queryCampaigns.apply(this, arguments);
|
|
15763
15836
|
}
|
|
15764
15837
|
|
|
@@ -15776,23 +15849,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15776
15849
|
}, {
|
|
15777
15850
|
key: "updateCampaign",
|
|
15778
15851
|
value: function () {
|
|
15779
|
-
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15780
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15852
|
+
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee84(id, params) {
|
|
15853
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee84$(_context84) {
|
|
15781
15854
|
while (1) {
|
|
15782
|
-
switch (
|
|
15855
|
+
switch (_context84.prev = _context84.next) {
|
|
15783
15856
|
case 0:
|
|
15784
15857
|
this.validateServerSideAuth();
|
|
15785
|
-
return
|
|
15858
|
+
return _context84.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(encodeURIComponent(id)), params));
|
|
15786
15859
|
|
|
15787
15860
|
case 2:
|
|
15788
15861
|
case "end":
|
|
15789
|
-
return
|
|
15862
|
+
return _context84.stop();
|
|
15790
15863
|
}
|
|
15791
15864
|
}
|
|
15792
|
-
},
|
|
15865
|
+
}, _callee84, this);
|
|
15793
15866
|
}));
|
|
15794
15867
|
|
|
15795
|
-
function updateCampaign(
|
|
15868
|
+
function updateCampaign(_x123, _x124) {
|
|
15796
15869
|
return _updateCampaign.apply(this, arguments);
|
|
15797
15870
|
}
|
|
15798
15871
|
|
|
@@ -15809,23 +15882,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15809
15882
|
}, {
|
|
15810
15883
|
key: "deleteCampaign",
|
|
15811
15884
|
value: function () {
|
|
15812
|
-
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15813
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15885
|
+
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee85(id) {
|
|
15886
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee85$(_context85) {
|
|
15814
15887
|
while (1) {
|
|
15815
|
-
switch (
|
|
15888
|
+
switch (_context85.prev = _context85.next) {
|
|
15816
15889
|
case 0:
|
|
15817
15890
|
this.validateServerSideAuth();
|
|
15818
|
-
return
|
|
15891
|
+
return _context85.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
|
|
15819
15892
|
|
|
15820
15893
|
case 2:
|
|
15821
15894
|
case "end":
|
|
15822
|
-
return
|
|
15895
|
+
return _context85.stop();
|
|
15823
15896
|
}
|
|
15824
15897
|
}
|
|
15825
|
-
},
|
|
15898
|
+
}, _callee85, this);
|
|
15826
15899
|
}));
|
|
15827
15900
|
|
|
15828
|
-
function deleteCampaign(
|
|
15901
|
+
function deleteCampaign(_x125) {
|
|
15829
15902
|
return _deleteCampaign.apply(this, arguments);
|
|
15830
15903
|
}
|
|
15831
15904
|
|
|
@@ -15842,23 +15915,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15842
15915
|
}, {
|
|
15843
15916
|
key: "stopCampaign",
|
|
15844
15917
|
value: function () {
|
|
15845
|
-
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15846
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15918
|
+
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee86(id) {
|
|
15919
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee86$(_context86) {
|
|
15847
15920
|
while (1) {
|
|
15848
|
-
switch (
|
|
15921
|
+
switch (_context86.prev = _context86.next) {
|
|
15849
15922
|
case 0:
|
|
15850
15923
|
this.validateServerSideAuth();
|
|
15851
|
-
return
|
|
15924
|
+
return _context86.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/stop")));
|
|
15852
15925
|
|
|
15853
15926
|
case 2:
|
|
15854
15927
|
case "end":
|
|
15855
|
-
return
|
|
15928
|
+
return _context86.stop();
|
|
15856
15929
|
}
|
|
15857
15930
|
}
|
|
15858
|
-
},
|
|
15931
|
+
}, _callee86, this);
|
|
15859
15932
|
}));
|
|
15860
15933
|
|
|
15861
|
-
function stopCampaign(
|
|
15934
|
+
function stopCampaign(_x126) {
|
|
15862
15935
|
return _stopCampaign.apply(this, arguments);
|
|
15863
15936
|
}
|
|
15864
15937
|
|
|
@@ -15874,24 +15947,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15874
15947
|
}, {
|
|
15875
15948
|
key: "enrichURL",
|
|
15876
15949
|
value: function () {
|
|
15877
|
-
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15878
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15950
|
+
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee87(url) {
|
|
15951
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee87$(_context87) {
|
|
15879
15952
|
while (1) {
|
|
15880
|
-
switch (
|
|
15953
|
+
switch (_context87.prev = _context87.next) {
|
|
15881
15954
|
case 0:
|
|
15882
|
-
return
|
|
15955
|
+
return _context87.abrupt("return", this.get(this.baseURL + "/og", {
|
|
15883
15956
|
url: url
|
|
15884
15957
|
}));
|
|
15885
15958
|
|
|
15886
15959
|
case 1:
|
|
15887
15960
|
case "end":
|
|
15888
|
-
return
|
|
15961
|
+
return _context87.stop();
|
|
15889
15962
|
}
|
|
15890
15963
|
}
|
|
15891
|
-
},
|
|
15964
|
+
}, _callee87, this);
|
|
15892
15965
|
}));
|
|
15893
15966
|
|
|
15894
|
-
function enrichURL(
|
|
15967
|
+
function enrichURL(_x127) {
|
|
15895
15968
|
return _enrichURL.apply(this, arguments);
|
|
15896
15969
|
}
|
|
15897
15970
|
|
|
@@ -15908,22 +15981,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15908
15981
|
}, {
|
|
15909
15982
|
key: "getTask",
|
|
15910
15983
|
value: function () {
|
|
15911
|
-
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15912
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15984
|
+
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee88(id) {
|
|
15985
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee88$(_context88) {
|
|
15913
15986
|
while (1) {
|
|
15914
|
-
switch (
|
|
15987
|
+
switch (_context88.prev = _context88.next) {
|
|
15915
15988
|
case 0:
|
|
15916
|
-
return
|
|
15989
|
+
return _context88.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(encodeURIComponent(id))));
|
|
15917
15990
|
|
|
15918
15991
|
case 1:
|
|
15919
15992
|
case "end":
|
|
15920
|
-
return
|
|
15993
|
+
return _context88.stop();
|
|
15921
15994
|
}
|
|
15922
15995
|
}
|
|
15923
|
-
},
|
|
15996
|
+
}, _callee88, this);
|
|
15924
15997
|
}));
|
|
15925
15998
|
|
|
15926
|
-
function getTask(
|
|
15999
|
+
function getTask(_x128) {
|
|
15927
16000
|
return _getTask.apply(this, arguments);
|
|
15928
16001
|
}
|
|
15929
16002
|
|
|
@@ -15941,31 +16014,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15941
16014
|
}, {
|
|
15942
16015
|
key: "deleteChannels",
|
|
15943
16016
|
value: function () {
|
|
15944
|
-
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16017
|
+
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee89(cids) {
|
|
15945
16018
|
var options,
|
|
15946
|
-
|
|
15947
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16019
|
+
_args89 = arguments;
|
|
16020
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee89$(_context89) {
|
|
15948
16021
|
while (1) {
|
|
15949
|
-
switch (
|
|
16022
|
+
switch (_context89.prev = _context89.next) {
|
|
15950
16023
|
case 0:
|
|
15951
|
-
options =
|
|
15952
|
-
|
|
16024
|
+
options = _args89.length > 1 && _args89[1] !== undefined ? _args89[1] : {};
|
|
16025
|
+
_context89.next = 3;
|
|
15953
16026
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
15954
16027
|
cids: cids
|
|
15955
16028
|
}, options));
|
|
15956
16029
|
|
|
15957
16030
|
case 3:
|
|
15958
|
-
return
|
|
16031
|
+
return _context89.abrupt("return", _context89.sent);
|
|
15959
16032
|
|
|
15960
16033
|
case 4:
|
|
15961
16034
|
case "end":
|
|
15962
|
-
return
|
|
16035
|
+
return _context89.stop();
|
|
15963
16036
|
}
|
|
15964
16037
|
}
|
|
15965
|
-
},
|
|
16038
|
+
}, _callee89, this);
|
|
15966
16039
|
}));
|
|
15967
16040
|
|
|
15968
|
-
function deleteChannels(
|
|
16041
|
+
function deleteChannels(_x129) {
|
|
15969
16042
|
return _deleteChannels.apply(this, arguments);
|
|
15970
16043
|
}
|
|
15971
16044
|
|
|
@@ -15983,17 +16056,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15983
16056
|
}, {
|
|
15984
16057
|
key: "deleteUsers",
|
|
15985
16058
|
value: function () {
|
|
15986
|
-
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16059
|
+
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee90(user_ids) {
|
|
15987
16060
|
var options,
|
|
15988
|
-
|
|
15989
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16061
|
+
_args90 = arguments;
|
|
16062
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee90$(_context90) {
|
|
15990
16063
|
while (1) {
|
|
15991
|
-
switch (
|
|
16064
|
+
switch (_context90.prev = _context90.next) {
|
|
15992
16065
|
case 0:
|
|
15993
|
-
options =
|
|
16066
|
+
options = _args90.length > 1 && _args90[1] !== undefined ? _args90[1] : {};
|
|
15994
16067
|
|
|
15995
16068
|
if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
|
|
15996
|
-
|
|
16069
|
+
_context90.next = 3;
|
|
15997
16070
|
break;
|
|
15998
16071
|
}
|
|
15999
16072
|
|
|
@@ -16001,7 +16074,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16001
16074
|
|
|
16002
16075
|
case 3:
|
|
16003
16076
|
if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
|
|
16004
|
-
|
|
16077
|
+
_context90.next = 5;
|
|
16005
16078
|
break;
|
|
16006
16079
|
}
|
|
16007
16080
|
|
|
@@ -16009,30 +16082,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16009
16082
|
|
|
16010
16083
|
case 5:
|
|
16011
16084
|
if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
|
|
16012
|
-
|
|
16085
|
+
_context90.next = 7;
|
|
16013
16086
|
break;
|
|
16014
16087
|
}
|
|
16015
16088
|
|
|
16016
16089
|
throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
|
|
16017
16090
|
|
|
16018
16091
|
case 7:
|
|
16019
|
-
|
|
16092
|
+
_context90.next = 9;
|
|
16020
16093
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
16021
16094
|
user_ids: user_ids
|
|
16022
16095
|
}, options));
|
|
16023
16096
|
|
|
16024
16097
|
case 9:
|
|
16025
|
-
return
|
|
16098
|
+
return _context90.abrupt("return", _context90.sent);
|
|
16026
16099
|
|
|
16027
16100
|
case 10:
|
|
16028
16101
|
case "end":
|
|
16029
|
-
return
|
|
16102
|
+
return _context90.stop();
|
|
16030
16103
|
}
|
|
16031
16104
|
}
|
|
16032
|
-
},
|
|
16105
|
+
}, _callee90, this);
|
|
16033
16106
|
}));
|
|
16034
16107
|
|
|
16035
|
-
function deleteUsers(
|
|
16108
|
+
function deleteUsers(_x130) {
|
|
16036
16109
|
return _deleteUsers.apply(this, arguments);
|
|
16037
16110
|
}
|
|
16038
16111
|
|
|
@@ -16053,28 +16126,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16053
16126
|
}, {
|
|
16054
16127
|
key: "_createImportURL",
|
|
16055
16128
|
value: function () {
|
|
16056
|
-
var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16057
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16129
|
+
var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee91(filename) {
|
|
16130
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee91$(_context91) {
|
|
16058
16131
|
while (1) {
|
|
16059
|
-
switch (
|
|
16132
|
+
switch (_context91.prev = _context91.next) {
|
|
16060
16133
|
case 0:
|
|
16061
|
-
|
|
16134
|
+
_context91.next = 2;
|
|
16062
16135
|
return this.post(this.baseURL + "/import_urls", {
|
|
16063
16136
|
filename: filename
|
|
16064
16137
|
});
|
|
16065
16138
|
|
|
16066
16139
|
case 2:
|
|
16067
|
-
return
|
|
16140
|
+
return _context91.abrupt("return", _context91.sent);
|
|
16068
16141
|
|
|
16069
16142
|
case 3:
|
|
16070
16143
|
case "end":
|
|
16071
|
-
return
|
|
16144
|
+
return _context91.stop();
|
|
16072
16145
|
}
|
|
16073
16146
|
}
|
|
16074
|
-
},
|
|
16147
|
+
}, _callee91, this);
|
|
16075
16148
|
}));
|
|
16076
16149
|
|
|
16077
|
-
function _createImportURL(
|
|
16150
|
+
function _createImportURL(_x131) {
|
|
16078
16151
|
return _createImportURL2.apply(this, arguments);
|
|
16079
16152
|
}
|
|
16080
16153
|
|
|
@@ -16096,33 +16169,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16096
16169
|
}, {
|
|
16097
16170
|
key: "_createImport",
|
|
16098
16171
|
value: function () {
|
|
16099
|
-
var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16172
|
+
var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee92(path) {
|
|
16100
16173
|
var options,
|
|
16101
|
-
|
|
16102
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16174
|
+
_args92 = arguments;
|
|
16175
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee92$(_context92) {
|
|
16103
16176
|
while (1) {
|
|
16104
|
-
switch (
|
|
16177
|
+
switch (_context92.prev = _context92.next) {
|
|
16105
16178
|
case 0:
|
|
16106
|
-
options =
|
|
16179
|
+
options = _args92.length > 1 && _args92[1] !== undefined ? _args92[1] : {
|
|
16107
16180
|
mode: 'upsert'
|
|
16108
16181
|
};
|
|
16109
|
-
|
|
16182
|
+
_context92.next = 3;
|
|
16110
16183
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
16111
16184
|
path: path
|
|
16112
16185
|
}, options));
|
|
16113
16186
|
|
|
16114
16187
|
case 3:
|
|
16115
|
-
return
|
|
16188
|
+
return _context92.abrupt("return", _context92.sent);
|
|
16116
16189
|
|
|
16117
16190
|
case 4:
|
|
16118
16191
|
case "end":
|
|
16119
|
-
return
|
|
16192
|
+
return _context92.stop();
|
|
16120
16193
|
}
|
|
16121
16194
|
}
|
|
16122
|
-
},
|
|
16195
|
+
}, _callee92, this);
|
|
16123
16196
|
}));
|
|
16124
16197
|
|
|
16125
|
-
function _createImport(
|
|
16198
|
+
function _createImport(_x132) {
|
|
16126
16199
|
return _createImport2.apply(this, arguments);
|
|
16127
16200
|
}
|
|
16128
16201
|
|
|
@@ -16144,26 +16217,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16144
16217
|
}, {
|
|
16145
16218
|
key: "_getImport",
|
|
16146
16219
|
value: function () {
|
|
16147
|
-
var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16148
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16220
|
+
var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee93(id) {
|
|
16221
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee93$(_context93) {
|
|
16149
16222
|
while (1) {
|
|
16150
|
-
switch (
|
|
16223
|
+
switch (_context93.prev = _context93.next) {
|
|
16151
16224
|
case 0:
|
|
16152
|
-
|
|
16225
|
+
_context93.next = 2;
|
|
16153
16226
|
return this.get(this.baseURL + "/imports/".concat(encodeURIComponent(id)));
|
|
16154
16227
|
|
|
16155
16228
|
case 2:
|
|
16156
|
-
return
|
|
16229
|
+
return _context93.abrupt("return", _context93.sent);
|
|
16157
16230
|
|
|
16158
16231
|
case 3:
|
|
16159
16232
|
case "end":
|
|
16160
|
-
return
|
|
16233
|
+
return _context93.stop();
|
|
16161
16234
|
}
|
|
16162
16235
|
}
|
|
16163
|
-
},
|
|
16236
|
+
}, _callee93, this);
|
|
16164
16237
|
}));
|
|
16165
16238
|
|
|
16166
|
-
function _getImport(
|
|
16239
|
+
function _getImport(_x133) {
|
|
16167
16240
|
return _getImport2.apply(this, arguments);
|
|
16168
16241
|
}
|
|
16169
16242
|
|
|
@@ -16185,26 +16258,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16185
16258
|
}, {
|
|
16186
16259
|
key: "_listImports",
|
|
16187
16260
|
value: function () {
|
|
16188
|
-
var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16189
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16261
|
+
var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee94(options) {
|
|
16262
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee94$(_context94) {
|
|
16190
16263
|
while (1) {
|
|
16191
|
-
switch (
|
|
16264
|
+
switch (_context94.prev = _context94.next) {
|
|
16192
16265
|
case 0:
|
|
16193
|
-
|
|
16266
|
+
_context94.next = 2;
|
|
16194
16267
|
return this.get(this.baseURL + "/imports", options);
|
|
16195
16268
|
|
|
16196
16269
|
case 2:
|
|
16197
|
-
return
|
|
16270
|
+
return _context94.abrupt("return", _context94.sent);
|
|
16198
16271
|
|
|
16199
16272
|
case 3:
|
|
16200
16273
|
case "end":
|
|
16201
|
-
return
|
|
16274
|
+
return _context94.stop();
|
|
16202
16275
|
}
|
|
16203
16276
|
}
|
|
16204
|
-
},
|
|
16277
|
+
}, _callee94, this);
|
|
16205
16278
|
}));
|
|
16206
16279
|
|
|
16207
|
-
function _listImports(
|
|
16280
|
+
function _listImports(_x134) {
|
|
16208
16281
|
return _listImports2.apply(this, arguments);
|
|
16209
16282
|
}
|
|
16210
16283
|
|
|
@@ -16223,28 +16296,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16223
16296
|
}, {
|
|
16224
16297
|
key: "upsertPushProvider",
|
|
16225
16298
|
value: function () {
|
|
16226
|
-
var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16227
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16299
|
+
var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee95(pushProvider) {
|
|
16300
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee95$(_context95) {
|
|
16228
16301
|
while (1) {
|
|
16229
|
-
switch (
|
|
16302
|
+
switch (_context95.prev = _context95.next) {
|
|
16230
16303
|
case 0:
|
|
16231
|
-
|
|
16304
|
+
_context95.next = 2;
|
|
16232
16305
|
return this.post(this.baseURL + "/push_providers", {
|
|
16233
16306
|
push_provider: pushProvider
|
|
16234
16307
|
});
|
|
16235
16308
|
|
|
16236
16309
|
case 2:
|
|
16237
|
-
return
|
|
16310
|
+
return _context95.abrupt("return", _context95.sent);
|
|
16238
16311
|
|
|
16239
16312
|
case 3:
|
|
16240
16313
|
case "end":
|
|
16241
|
-
return
|
|
16314
|
+
return _context95.stop();
|
|
16242
16315
|
}
|
|
16243
16316
|
}
|
|
16244
|
-
},
|
|
16317
|
+
}, _callee95, this);
|
|
16245
16318
|
}));
|
|
16246
16319
|
|
|
16247
|
-
function upsertPushProvider(
|
|
16320
|
+
function upsertPushProvider(_x135) {
|
|
16248
16321
|
return _upsertPushProvider.apply(this, arguments);
|
|
16249
16322
|
}
|
|
16250
16323
|
|
|
@@ -16263,28 +16336,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16263
16336
|
}, {
|
|
16264
16337
|
key: "deletePushProvider",
|
|
16265
16338
|
value: function () {
|
|
16266
|
-
var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16339
|
+
var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee96(_ref10) {
|
|
16267
16340
|
var type, name;
|
|
16268
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16341
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee96$(_context96) {
|
|
16269
16342
|
while (1) {
|
|
16270
|
-
switch (
|
|
16343
|
+
switch (_context96.prev = _context96.next) {
|
|
16271
16344
|
case 0:
|
|
16272
16345
|
type = _ref10.type, name = _ref10.name;
|
|
16273
|
-
|
|
16346
|
+
_context96.next = 3;
|
|
16274
16347
|
return this.delete(this.baseURL + "/push_providers/".concat(encodeURIComponent(type), "/").concat(encodeURIComponent(name)));
|
|
16275
16348
|
|
|
16276
16349
|
case 3:
|
|
16277
|
-
return
|
|
16350
|
+
return _context96.abrupt("return", _context96.sent);
|
|
16278
16351
|
|
|
16279
16352
|
case 4:
|
|
16280
16353
|
case "end":
|
|
16281
|
-
return
|
|
16354
|
+
return _context96.stop();
|
|
16282
16355
|
}
|
|
16283
16356
|
}
|
|
16284
|
-
},
|
|
16357
|
+
}, _callee96, this);
|
|
16285
16358
|
}));
|
|
16286
16359
|
|
|
16287
|
-
function deletePushProvider(
|
|
16360
|
+
function deletePushProvider(_x136) {
|
|
16288
16361
|
return _deletePushProvider.apply(this, arguments);
|
|
16289
16362
|
}
|
|
16290
16363
|
|
|
@@ -16301,23 +16374,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16301
16374
|
}, {
|
|
16302
16375
|
key: "listPushProviders",
|
|
16303
16376
|
value: function () {
|
|
16304
|
-
var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16305
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16377
|
+
var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee97() {
|
|
16378
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee97$(_context97) {
|
|
16306
16379
|
while (1) {
|
|
16307
|
-
switch (
|
|
16380
|
+
switch (_context97.prev = _context97.next) {
|
|
16308
16381
|
case 0:
|
|
16309
|
-
|
|
16382
|
+
_context97.next = 2;
|
|
16310
16383
|
return this.get(this.baseURL + "/push_providers");
|
|
16311
16384
|
|
|
16312
16385
|
case 2:
|
|
16313
|
-
return
|
|
16386
|
+
return _context97.abrupt("return", _context97.sent);
|
|
16314
16387
|
|
|
16315
16388
|
case 3:
|
|
16316
16389
|
case "end":
|
|
16317
|
-
return
|
|
16390
|
+
return _context97.stop();
|
|
16318
16391
|
}
|
|
16319
16392
|
}
|
|
16320
|
-
},
|
|
16393
|
+
}, _callee97, this);
|
|
16321
16394
|
}));
|
|
16322
16395
|
|
|
16323
16396
|
function listPushProviders() {
|
|
@@ -16345,26 +16418,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16345
16418
|
}, {
|
|
16346
16419
|
key: "commitMessage",
|
|
16347
16420
|
value: function () {
|
|
16348
|
-
var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16349
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16421
|
+
var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee98(id) {
|
|
16422
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee98$(_context98) {
|
|
16350
16423
|
while (1) {
|
|
16351
|
-
switch (
|
|
16424
|
+
switch (_context98.prev = _context98.next) {
|
|
16352
16425
|
case 0:
|
|
16353
|
-
|
|
16426
|
+
_context98.next = 2;
|
|
16354
16427
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(id), "/commit"));
|
|
16355
16428
|
|
|
16356
16429
|
case 2:
|
|
16357
|
-
return
|
|
16430
|
+
return _context98.abrupt("return", _context98.sent);
|
|
16358
16431
|
|
|
16359
16432
|
case 3:
|
|
16360
16433
|
case "end":
|
|
16361
|
-
return
|
|
16434
|
+
return _context98.stop();
|
|
16362
16435
|
}
|
|
16363
16436
|
}
|
|
16364
|
-
},
|
|
16437
|
+
}, _callee98, this);
|
|
16365
16438
|
}));
|
|
16366
16439
|
|
|
16367
|
-
function commitMessage(
|
|
16440
|
+
function commitMessage(_x137) {
|
|
16368
16441
|
return _commitMessage.apply(this, arguments);
|
|
16369
16442
|
}
|
|
16370
16443
|
|
|
@@ -16380,28 +16453,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16380
16453
|
}, {
|
|
16381
16454
|
key: "createPoll",
|
|
16382
16455
|
value: function () {
|
|
16383
|
-
var _createPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16384
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16456
|
+
var _createPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee99(poll, userId) {
|
|
16457
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee99$(_context99) {
|
|
16385
16458
|
while (1) {
|
|
16386
|
-
switch (
|
|
16459
|
+
switch (_context99.prev = _context99.next) {
|
|
16387
16460
|
case 0:
|
|
16388
|
-
|
|
16461
|
+
_context99.next = 2;
|
|
16389
16462
|
return this.post(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
|
|
16390
16463
|
user_id: userId
|
|
16391
16464
|
} : {}));
|
|
16392
16465
|
|
|
16393
16466
|
case 2:
|
|
16394
|
-
return
|
|
16467
|
+
return _context99.abrupt("return", _context99.sent);
|
|
16395
16468
|
|
|
16396
16469
|
case 3:
|
|
16397
16470
|
case "end":
|
|
16398
|
-
return
|
|
16471
|
+
return _context99.stop();
|
|
16399
16472
|
}
|
|
16400
16473
|
}
|
|
16401
|
-
},
|
|
16474
|
+
}, _callee99, this);
|
|
16402
16475
|
}));
|
|
16403
16476
|
|
|
16404
|
-
function createPoll(
|
|
16477
|
+
function createPoll(_x138, _x139) {
|
|
16405
16478
|
return _createPoll.apply(this, arguments);
|
|
16406
16479
|
}
|
|
16407
16480
|
|
|
@@ -16417,28 +16490,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16417
16490
|
}, {
|
|
16418
16491
|
key: "getPoll",
|
|
16419
16492
|
value: function () {
|
|
16420
|
-
var _getPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16421
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16493
|
+
var _getPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee100(id, userId) {
|
|
16494
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee100$(_context100) {
|
|
16422
16495
|
while (1) {
|
|
16423
|
-
switch (
|
|
16496
|
+
switch (_context100.prev = _context100.next) {
|
|
16424
16497
|
case 0:
|
|
16425
|
-
|
|
16498
|
+
_context100.next = 2;
|
|
16426
16499
|
return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(id)), userId ? {
|
|
16427
16500
|
user_id: userId
|
|
16428
16501
|
} : {});
|
|
16429
16502
|
|
|
16430
16503
|
case 2:
|
|
16431
|
-
return
|
|
16504
|
+
return _context100.abrupt("return", _context100.sent);
|
|
16432
16505
|
|
|
16433
16506
|
case 3:
|
|
16434
16507
|
case "end":
|
|
16435
|
-
return
|
|
16508
|
+
return _context100.stop();
|
|
16436
16509
|
}
|
|
16437
16510
|
}
|
|
16438
|
-
},
|
|
16511
|
+
}, _callee100, this);
|
|
16439
16512
|
}));
|
|
16440
16513
|
|
|
16441
|
-
function getPoll(
|
|
16514
|
+
function getPoll(_x140, _x141) {
|
|
16442
16515
|
return _getPoll.apply(this, arguments);
|
|
16443
16516
|
}
|
|
16444
16517
|
|
|
@@ -16454,28 +16527,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16454
16527
|
}, {
|
|
16455
16528
|
key: "updatePoll",
|
|
16456
16529
|
value: function () {
|
|
16457
|
-
var _updatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16458
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16530
|
+
var _updatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee101(poll, userId) {
|
|
16531
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee101$(_context101) {
|
|
16459
16532
|
while (1) {
|
|
16460
|
-
switch (
|
|
16533
|
+
switch (_context101.prev = _context101.next) {
|
|
16461
16534
|
case 0:
|
|
16462
|
-
|
|
16535
|
+
_context101.next = 2;
|
|
16463
16536
|
return this.put(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
|
|
16464
16537
|
user_id: userId
|
|
16465
16538
|
} : {}));
|
|
16466
16539
|
|
|
16467
16540
|
case 2:
|
|
16468
|
-
return
|
|
16541
|
+
return _context101.abrupt("return", _context101.sent);
|
|
16469
16542
|
|
|
16470
16543
|
case 3:
|
|
16471
16544
|
case "end":
|
|
16472
|
-
return
|
|
16545
|
+
return _context101.stop();
|
|
16473
16546
|
}
|
|
16474
16547
|
}
|
|
16475
|
-
},
|
|
16548
|
+
}, _callee101, this);
|
|
16476
16549
|
}));
|
|
16477
16550
|
|
|
16478
|
-
function updatePoll(
|
|
16551
|
+
function updatePoll(_x142, _x143) {
|
|
16479
16552
|
return _updatePoll.apply(this, arguments);
|
|
16480
16553
|
}
|
|
16481
16554
|
|
|
@@ -16493,28 +16566,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16493
16566
|
}, {
|
|
16494
16567
|
key: "partialUpdatePoll",
|
|
16495
16568
|
value: function () {
|
|
16496
|
-
var _partialUpdatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16497
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16569
|
+
var _partialUpdatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee102(id, partialPollObject, userId) {
|
|
16570
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee102$(_context102) {
|
|
16498
16571
|
while (1) {
|
|
16499
|
-
switch (
|
|
16572
|
+
switch (_context102.prev = _context102.next) {
|
|
16500
16573
|
case 0:
|
|
16501
|
-
|
|
16574
|
+
_context102.next = 2;
|
|
16502
16575
|
return this.patch(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread({}, partialPollObject), userId ? {
|
|
16503
16576
|
user_id: userId
|
|
16504
16577
|
} : {}));
|
|
16505
16578
|
|
|
16506
16579
|
case 2:
|
|
16507
|
-
return
|
|
16580
|
+
return _context102.abrupt("return", _context102.sent);
|
|
16508
16581
|
|
|
16509
16582
|
case 3:
|
|
16510
16583
|
case "end":
|
|
16511
|
-
return
|
|
16584
|
+
return _context102.stop();
|
|
16512
16585
|
}
|
|
16513
16586
|
}
|
|
16514
|
-
},
|
|
16587
|
+
}, _callee102, this);
|
|
16515
16588
|
}));
|
|
16516
16589
|
|
|
16517
|
-
function partialUpdatePoll(
|
|
16590
|
+
function partialUpdatePoll(_x144, _x145, _x146) {
|
|
16518
16591
|
return _partialUpdatePoll.apply(this, arguments);
|
|
16519
16592
|
}
|
|
16520
16593
|
|
|
@@ -16530,28 +16603,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16530
16603
|
}, {
|
|
16531
16604
|
key: "deletePoll",
|
|
16532
16605
|
value: function () {
|
|
16533
|
-
var _deletePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16534
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16606
|
+
var _deletePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee103(id, userId) {
|
|
16607
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee103$(_context103) {
|
|
16535
16608
|
while (1) {
|
|
16536
|
-
switch (
|
|
16609
|
+
switch (_context103.prev = _context103.next) {
|
|
16537
16610
|
case 0:
|
|
16538
|
-
|
|
16611
|
+
_context103.next = 2;
|
|
16539
16612
|
return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread({}, userId ? {
|
|
16540
16613
|
user_id: userId
|
|
16541
16614
|
} : {}));
|
|
16542
16615
|
|
|
16543
16616
|
case 2:
|
|
16544
|
-
return
|
|
16617
|
+
return _context103.abrupt("return", _context103.sent);
|
|
16545
16618
|
|
|
16546
16619
|
case 3:
|
|
16547
16620
|
case "end":
|
|
16548
|
-
return
|
|
16621
|
+
return _context103.stop();
|
|
16549
16622
|
}
|
|
16550
16623
|
}
|
|
16551
|
-
},
|
|
16624
|
+
}, _callee103, this);
|
|
16552
16625
|
}));
|
|
16553
16626
|
|
|
16554
|
-
function deletePoll(
|
|
16627
|
+
function deletePoll(_x147, _x148) {
|
|
16555
16628
|
return _deletePoll.apply(this, arguments);
|
|
16556
16629
|
}
|
|
16557
16630
|
|
|
@@ -16567,12 +16640,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16567
16640
|
}, {
|
|
16568
16641
|
key: "closePoll",
|
|
16569
16642
|
value: function () {
|
|
16570
|
-
var _closePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16571
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16643
|
+
var _closePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee104(id, userId) {
|
|
16644
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee104$(_context104) {
|
|
16572
16645
|
while (1) {
|
|
16573
|
-
switch (
|
|
16646
|
+
switch (_context104.prev = _context104.next) {
|
|
16574
16647
|
case 0:
|
|
16575
|
-
return
|
|
16648
|
+
return _context104.abrupt("return", this.partialUpdatePoll(id, {
|
|
16576
16649
|
set: {
|
|
16577
16650
|
is_closed: true
|
|
16578
16651
|
}
|
|
@@ -16580,13 +16653,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16580
16653
|
|
|
16581
16654
|
case 1:
|
|
16582
16655
|
case "end":
|
|
16583
|
-
return
|
|
16656
|
+
return _context104.stop();
|
|
16584
16657
|
}
|
|
16585
16658
|
}
|
|
16586
|
-
},
|
|
16659
|
+
}, _callee104, this);
|
|
16587
16660
|
}));
|
|
16588
16661
|
|
|
16589
|
-
function closePoll(
|
|
16662
|
+
function closePoll(_x149, _x150) {
|
|
16590
16663
|
return _closePoll.apply(this, arguments);
|
|
16591
16664
|
}
|
|
16592
16665
|
|
|
@@ -16603,28 +16676,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16603
16676
|
}, {
|
|
16604
16677
|
key: "createPollOption",
|
|
16605
16678
|
value: function () {
|
|
16606
|
-
var _createPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16607
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16679
|
+
var _createPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee105(pollId, option, userId) {
|
|
16680
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee105$(_context105) {
|
|
16608
16681
|
while (1) {
|
|
16609
|
-
switch (
|
|
16682
|
+
switch (_context105.prev = _context105.next) {
|
|
16610
16683
|
case 0:
|
|
16611
|
-
|
|
16684
|
+
_context105.next = 2;
|
|
16612
16685
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
|
|
16613
16686
|
user_id: userId
|
|
16614
16687
|
} : {}));
|
|
16615
16688
|
|
|
16616
16689
|
case 2:
|
|
16617
|
-
return
|
|
16690
|
+
return _context105.abrupt("return", _context105.sent);
|
|
16618
16691
|
|
|
16619
16692
|
case 3:
|
|
16620
16693
|
case "end":
|
|
16621
|
-
return
|
|
16694
|
+
return _context105.stop();
|
|
16622
16695
|
}
|
|
16623
16696
|
}
|
|
16624
|
-
},
|
|
16697
|
+
}, _callee105, this);
|
|
16625
16698
|
}));
|
|
16626
16699
|
|
|
16627
|
-
function createPollOption(
|
|
16700
|
+
function createPollOption(_x151, _x152, _x153) {
|
|
16628
16701
|
return _createPollOption.apply(this, arguments);
|
|
16629
16702
|
}
|
|
16630
16703
|
|
|
@@ -16641,28 +16714,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16641
16714
|
}, {
|
|
16642
16715
|
key: "getPollOption",
|
|
16643
16716
|
value: function () {
|
|
16644
|
-
var _getPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16645
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16717
|
+
var _getPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee106(pollId, optionId, userId) {
|
|
16718
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee106$(_context106) {
|
|
16646
16719
|
while (1) {
|
|
16647
|
-
switch (
|
|
16720
|
+
switch (_context106.prev = _context106.next) {
|
|
16648
16721
|
case 0:
|
|
16649
|
-
|
|
16722
|
+
_context106.next = 2;
|
|
16650
16723
|
return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
|
|
16651
16724
|
user_id: userId
|
|
16652
16725
|
} : {});
|
|
16653
16726
|
|
|
16654
16727
|
case 2:
|
|
16655
|
-
return
|
|
16728
|
+
return _context106.abrupt("return", _context106.sent);
|
|
16656
16729
|
|
|
16657
16730
|
case 3:
|
|
16658
16731
|
case "end":
|
|
16659
|
-
return
|
|
16732
|
+
return _context106.stop();
|
|
16660
16733
|
}
|
|
16661
16734
|
}
|
|
16662
|
-
},
|
|
16735
|
+
}, _callee106, this);
|
|
16663
16736
|
}));
|
|
16664
16737
|
|
|
16665
|
-
function getPollOption(
|
|
16738
|
+
function getPollOption(_x154, _x155, _x156) {
|
|
16666
16739
|
return _getPollOption.apply(this, arguments);
|
|
16667
16740
|
}
|
|
16668
16741
|
|
|
@@ -16679,28 +16752,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16679
16752
|
}, {
|
|
16680
16753
|
key: "updatePollOption",
|
|
16681
16754
|
value: function () {
|
|
16682
|
-
var _updatePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16683
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16755
|
+
var _updatePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee107(pollId, option, userId) {
|
|
16756
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee107$(_context107) {
|
|
16684
16757
|
while (1) {
|
|
16685
|
-
switch (
|
|
16758
|
+
switch (_context107.prev = _context107.next) {
|
|
16686
16759
|
case 0:
|
|
16687
|
-
|
|
16760
|
+
_context107.next = 2;
|
|
16688
16761
|
return this.put(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
|
|
16689
16762
|
user_id: userId
|
|
16690
16763
|
} : {}));
|
|
16691
16764
|
|
|
16692
16765
|
case 2:
|
|
16693
|
-
return
|
|
16766
|
+
return _context107.abrupt("return", _context107.sent);
|
|
16694
16767
|
|
|
16695
16768
|
case 3:
|
|
16696
16769
|
case "end":
|
|
16697
|
-
return
|
|
16770
|
+
return _context107.stop();
|
|
16698
16771
|
}
|
|
16699
16772
|
}
|
|
16700
|
-
},
|
|
16773
|
+
}, _callee107, this);
|
|
16701
16774
|
}));
|
|
16702
16775
|
|
|
16703
|
-
function updatePollOption(
|
|
16776
|
+
function updatePollOption(_x157, _x158, _x159) {
|
|
16704
16777
|
return _updatePollOption.apply(this, arguments);
|
|
16705
16778
|
}
|
|
16706
16779
|
|
|
@@ -16717,28 +16790,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16717
16790
|
}, {
|
|
16718
16791
|
key: "deletePollOption",
|
|
16719
16792
|
value: function () {
|
|
16720
|
-
var _deletePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16721
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16793
|
+
var _deletePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee108(pollId, optionId, userId) {
|
|
16794
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee108$(_context108) {
|
|
16722
16795
|
while (1) {
|
|
16723
|
-
switch (
|
|
16796
|
+
switch (_context108.prev = _context108.next) {
|
|
16724
16797
|
case 0:
|
|
16725
|
-
|
|
16798
|
+
_context108.next = 2;
|
|
16726
16799
|
return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
|
|
16727
16800
|
user_id: userId
|
|
16728
16801
|
} : {});
|
|
16729
16802
|
|
|
16730
16803
|
case 2:
|
|
16731
|
-
return
|
|
16804
|
+
return _context108.abrupt("return", _context108.sent);
|
|
16732
16805
|
|
|
16733
16806
|
case 3:
|
|
16734
16807
|
case "end":
|
|
16735
|
-
return
|
|
16808
|
+
return _context108.stop();
|
|
16736
16809
|
}
|
|
16737
16810
|
}
|
|
16738
|
-
},
|
|
16811
|
+
}, _callee108, this);
|
|
16739
16812
|
}));
|
|
16740
16813
|
|
|
16741
|
-
function deletePollOption(
|
|
16814
|
+
function deletePollOption(_x160, _x161, _x162) {
|
|
16742
16815
|
return _deletePollOption.apply(this, arguments);
|
|
16743
16816
|
}
|
|
16744
16817
|
|
|
@@ -16756,12 +16829,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16756
16829
|
}, {
|
|
16757
16830
|
key: "castPollVote",
|
|
16758
16831
|
value: function () {
|
|
16759
|
-
var _castPollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16760
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16832
|
+
var _castPollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee109(messageId, pollId, vote, userId) {
|
|
16833
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee109$(_context109) {
|
|
16761
16834
|
while (1) {
|
|
16762
|
-
switch (
|
|
16835
|
+
switch (_context109.prev = _context109.next) {
|
|
16763
16836
|
case 0:
|
|
16764
|
-
|
|
16837
|
+
_context109.next = 2;
|
|
16765
16838
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote"), _objectSpread({
|
|
16766
16839
|
vote: vote
|
|
16767
16840
|
}, userId ? {
|
|
@@ -16769,17 +16842,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16769
16842
|
} : {}));
|
|
16770
16843
|
|
|
16771
16844
|
case 2:
|
|
16772
|
-
return
|
|
16845
|
+
return _context109.abrupt("return", _context109.sent);
|
|
16773
16846
|
|
|
16774
16847
|
case 3:
|
|
16775
16848
|
case "end":
|
|
16776
|
-
return
|
|
16849
|
+
return _context109.stop();
|
|
16777
16850
|
}
|
|
16778
16851
|
}
|
|
16779
|
-
},
|
|
16852
|
+
}, _callee109, this);
|
|
16780
16853
|
}));
|
|
16781
16854
|
|
|
16782
|
-
function castPollVote(
|
|
16855
|
+
function castPollVote(_x163, _x164, _x165, _x166) {
|
|
16783
16856
|
return _castPollVote.apply(this, arguments);
|
|
16784
16857
|
}
|
|
16785
16858
|
|
|
@@ -16796,24 +16869,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16796
16869
|
}, {
|
|
16797
16870
|
key: "addPollAnswer",
|
|
16798
16871
|
value: function () {
|
|
16799
|
-
var _addPollAnswer = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16800
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16872
|
+
var _addPollAnswer = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee110(messageId, pollId, answerText, userId) {
|
|
16873
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee110$(_context110) {
|
|
16801
16874
|
while (1) {
|
|
16802
|
-
switch (
|
|
16875
|
+
switch (_context110.prev = _context110.next) {
|
|
16803
16876
|
case 0:
|
|
16804
|
-
return
|
|
16877
|
+
return _context110.abrupt("return", this.castPollVote(messageId, pollId, {
|
|
16805
16878
|
answer_text: answerText
|
|
16806
16879
|
}, userId));
|
|
16807
16880
|
|
|
16808
16881
|
case 1:
|
|
16809
16882
|
case "end":
|
|
16810
|
-
return
|
|
16883
|
+
return _context110.stop();
|
|
16811
16884
|
}
|
|
16812
16885
|
}
|
|
16813
|
-
},
|
|
16886
|
+
}, _callee110, this);
|
|
16814
16887
|
}));
|
|
16815
16888
|
|
|
16816
|
-
function addPollAnswer(
|
|
16889
|
+
function addPollAnswer(_x167, _x168, _x169, _x170) {
|
|
16817
16890
|
return _addPollAnswer.apply(this, arguments);
|
|
16818
16891
|
}
|
|
16819
16892
|
|
|
@@ -16822,28 +16895,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16822
16895
|
}, {
|
|
16823
16896
|
key: "removePollVote",
|
|
16824
16897
|
value: function () {
|
|
16825
|
-
var _removePollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16826
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16898
|
+
var _removePollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee111(messageId, pollId, voteId, userId) {
|
|
16899
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee111$(_context111) {
|
|
16827
16900
|
while (1) {
|
|
16828
|
-
switch (
|
|
16901
|
+
switch (_context111.prev = _context111.next) {
|
|
16829
16902
|
case 0:
|
|
16830
|
-
|
|
16903
|
+
_context111.next = 2;
|
|
16831
16904
|
return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote/").concat(encodeURIComponent(voteId)), _objectSpread({}, userId ? {
|
|
16832
16905
|
user_id: userId
|
|
16833
16906
|
} : {}));
|
|
16834
16907
|
|
|
16835
16908
|
case 2:
|
|
16836
|
-
return
|
|
16909
|
+
return _context111.abrupt("return", _context111.sent);
|
|
16837
16910
|
|
|
16838
16911
|
case 3:
|
|
16839
16912
|
case "end":
|
|
16840
|
-
return
|
|
16913
|
+
return _context111.stop();
|
|
16841
16914
|
}
|
|
16842
16915
|
}
|
|
16843
|
-
},
|
|
16916
|
+
}, _callee111, this);
|
|
16844
16917
|
}));
|
|
16845
16918
|
|
|
16846
|
-
function removePollVote(
|
|
16919
|
+
function removePollVote(_x171, _x172, _x173, _x174) {
|
|
16847
16920
|
return _removePollVote.apply(this, arguments);
|
|
16848
16921
|
}
|
|
16849
16922
|
|
|
@@ -16861,37 +16934,37 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16861
16934
|
}, {
|
|
16862
16935
|
key: "queryPolls",
|
|
16863
16936
|
value: function () {
|
|
16864
|
-
var _queryPolls = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16937
|
+
var _queryPolls = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee112() {
|
|
16865
16938
|
var filter,
|
|
16866
16939
|
sort,
|
|
16867
16940
|
options,
|
|
16868
16941
|
userId,
|
|
16869
16942
|
q,
|
|
16870
|
-
|
|
16871
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16943
|
+
_args112 = arguments;
|
|
16944
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee112$(_context112) {
|
|
16872
16945
|
while (1) {
|
|
16873
|
-
switch (
|
|
16946
|
+
switch (_context112.prev = _context112.next) {
|
|
16874
16947
|
case 0:
|
|
16875
|
-
filter =
|
|
16876
|
-
sort =
|
|
16877
|
-
options =
|
|
16878
|
-
userId =
|
|
16948
|
+
filter = _args112.length > 0 && _args112[0] !== undefined ? _args112[0] : {};
|
|
16949
|
+
sort = _args112.length > 1 && _args112[1] !== undefined ? _args112[1] : [];
|
|
16950
|
+
options = _args112.length > 2 && _args112[2] !== undefined ? _args112[2] : {};
|
|
16951
|
+
userId = _args112.length > 3 ? _args112[3] : undefined;
|
|
16879
16952
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16880
|
-
|
|
16953
|
+
_context112.next = 7;
|
|
16881
16954
|
return this.post(this.baseURL + "/polls/query".concat(q), _objectSpread({
|
|
16882
16955
|
filter: filter,
|
|
16883
16956
|
sort: normalizeQuerySort(sort)
|
|
16884
16957
|
}, options));
|
|
16885
16958
|
|
|
16886
16959
|
case 7:
|
|
16887
|
-
return
|
|
16960
|
+
return _context112.abrupt("return", _context112.sent);
|
|
16888
16961
|
|
|
16889
16962
|
case 8:
|
|
16890
16963
|
case "end":
|
|
16891
|
-
return
|
|
16964
|
+
return _context112.stop();
|
|
16892
16965
|
}
|
|
16893
16966
|
}
|
|
16894
|
-
},
|
|
16967
|
+
}, _callee112, this);
|
|
16895
16968
|
}));
|
|
16896
16969
|
|
|
16897
16970
|
function queryPolls() {
|
|
@@ -16913,40 +16986,40 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16913
16986
|
}, {
|
|
16914
16987
|
key: "queryPollVotes",
|
|
16915
16988
|
value: function () {
|
|
16916
|
-
var _queryPollVotes = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16989
|
+
var _queryPollVotes = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee113(pollId) {
|
|
16917
16990
|
var filter,
|
|
16918
16991
|
sort,
|
|
16919
16992
|
options,
|
|
16920
16993
|
userId,
|
|
16921
16994
|
q,
|
|
16922
|
-
|
|
16923
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16995
|
+
_args113 = arguments;
|
|
16996
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee113$(_context113) {
|
|
16924
16997
|
while (1) {
|
|
16925
|
-
switch (
|
|
16998
|
+
switch (_context113.prev = _context113.next) {
|
|
16926
16999
|
case 0:
|
|
16927
|
-
filter =
|
|
16928
|
-
sort =
|
|
16929
|
-
options =
|
|
16930
|
-
userId =
|
|
17000
|
+
filter = _args113.length > 1 && _args113[1] !== undefined ? _args113[1] : {};
|
|
17001
|
+
sort = _args113.length > 2 && _args113[2] !== undefined ? _args113[2] : [];
|
|
17002
|
+
options = _args113.length > 3 && _args113[3] !== undefined ? _args113[3] : {};
|
|
17003
|
+
userId = _args113.length > 4 ? _args113[4] : undefined;
|
|
16931
17004
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16932
|
-
|
|
17005
|
+
_context113.next = 7;
|
|
16933
17006
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
|
|
16934
17007
|
filter: filter,
|
|
16935
17008
|
sort: normalizeQuerySort(sort)
|
|
16936
17009
|
}, options));
|
|
16937
17010
|
|
|
16938
17011
|
case 7:
|
|
16939
|
-
return
|
|
17012
|
+
return _context113.abrupt("return", _context113.sent);
|
|
16940
17013
|
|
|
16941
17014
|
case 8:
|
|
16942
17015
|
case "end":
|
|
16943
|
-
return
|
|
17016
|
+
return _context113.stop();
|
|
16944
17017
|
}
|
|
16945
17018
|
}
|
|
16946
|
-
},
|
|
17019
|
+
}, _callee113, this);
|
|
16947
17020
|
}));
|
|
16948
17021
|
|
|
16949
|
-
function queryPollVotes(
|
|
17022
|
+
function queryPollVotes(_x175) {
|
|
16950
17023
|
return _queryPollVotes.apply(this, arguments);
|
|
16951
17024
|
}
|
|
16952
17025
|
|
|
@@ -16965,23 +17038,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16965
17038
|
}, {
|
|
16966
17039
|
key: "queryPollAnswers",
|
|
16967
17040
|
value: function () {
|
|
16968
|
-
var _queryPollAnswers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
17041
|
+
var _queryPollAnswers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee114(pollId) {
|
|
16969
17042
|
var filter,
|
|
16970
17043
|
sort,
|
|
16971
17044
|
options,
|
|
16972
17045
|
userId,
|
|
16973
17046
|
q,
|
|
16974
|
-
|
|
16975
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
17047
|
+
_args114 = arguments;
|
|
17048
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee114$(_context114) {
|
|
16976
17049
|
while (1) {
|
|
16977
|
-
switch (
|
|
17050
|
+
switch (_context114.prev = _context114.next) {
|
|
16978
17051
|
case 0:
|
|
16979
|
-
filter =
|
|
16980
|
-
sort =
|
|
16981
|
-
options =
|
|
16982
|
-
userId =
|
|
17052
|
+
filter = _args114.length > 1 && _args114[1] !== undefined ? _args114[1] : {};
|
|
17053
|
+
sort = _args114.length > 2 && _args114[2] !== undefined ? _args114[2] : [];
|
|
17054
|
+
options = _args114.length > 3 && _args114[3] !== undefined ? _args114[3] : {};
|
|
17055
|
+
userId = _args114.length > 4 ? _args114[4] : undefined;
|
|
16983
17056
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16984
|
-
|
|
17057
|
+
_context114.next = 7;
|
|
16985
17058
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
|
|
16986
17059
|
filter: _objectSpread(_objectSpread({}, filter), {}, {
|
|
16987
17060
|
is_answer: true
|
|
@@ -16990,17 +17063,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16990
17063
|
}, options));
|
|
16991
17064
|
|
|
16992
17065
|
case 7:
|
|
16993
|
-
return
|
|
17066
|
+
return _context114.abrupt("return", _context114.sent);
|
|
16994
17067
|
|
|
16995
17068
|
case 8:
|
|
16996
17069
|
case "end":
|
|
16997
|
-
return
|
|
17070
|
+
return _context114.stop();
|
|
16998
17071
|
}
|
|
16999
17072
|
}
|
|
17000
|
-
},
|
|
17073
|
+
}, _callee114, this);
|
|
17001
17074
|
}));
|
|
17002
17075
|
|
|
17003
|
-
function queryPollAnswers(
|
|
17076
|
+
function queryPollAnswers(_x176) {
|
|
17004
17077
|
return _queryPollAnswers.apply(this, arguments);
|
|
17005
17078
|
}
|
|
17006
17079
|
|
|
@@ -17017,33 +17090,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
17017
17090
|
}, {
|
|
17018
17091
|
key: "queryMessageHistory",
|
|
17019
17092
|
value: function () {
|
|
17020
|
-
var _queryMessageHistory = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
17093
|
+
var _queryMessageHistory = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee115() {
|
|
17021
17094
|
var filter,
|
|
17022
17095
|
sort,
|
|
17023
17096
|
options,
|
|
17024
|
-
|
|
17025
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
17097
|
+
_args115 = arguments;
|
|
17098
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee115$(_context115) {
|
|
17026
17099
|
while (1) {
|
|
17027
|
-
switch (
|
|
17100
|
+
switch (_context115.prev = _context115.next) {
|
|
17028
17101
|
case 0:
|
|
17029
|
-
filter =
|
|
17030
|
-
sort =
|
|
17031
|
-
options =
|
|
17032
|
-
|
|
17102
|
+
filter = _args115.length > 0 && _args115[0] !== undefined ? _args115[0] : {};
|
|
17103
|
+
sort = _args115.length > 1 && _args115[1] !== undefined ? _args115[1] : [];
|
|
17104
|
+
options = _args115.length > 2 && _args115[2] !== undefined ? _args115[2] : {};
|
|
17105
|
+
_context115.next = 5;
|
|
17033
17106
|
return this.post(this.baseURL + '/messages/history', _objectSpread({
|
|
17034
17107
|
filter: filter,
|
|
17035
17108
|
sort: normalizeQuerySort(sort)
|
|
17036
17109
|
}, options));
|
|
17037
17110
|
|
|
17038
17111
|
case 5:
|
|
17039
|
-
return
|
|
17112
|
+
return _context115.abrupt("return", _context115.sent);
|
|
17040
17113
|
|
|
17041
17114
|
case 6:
|
|
17042
17115
|
case "end":
|
|
17043
|
-
return
|
|
17116
|
+
return _context115.stop();
|
|
17044
17117
|
}
|
|
17045
17118
|
}
|
|
17046
|
-
},
|
|
17119
|
+
}, _callee115, this);
|
|
17047
17120
|
}));
|
|
17048
17121
|
|
|
17049
17122
|
function queryMessageHistory() {
|
|
@@ -17064,32 +17137,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
17064
17137
|
}, {
|
|
17065
17138
|
key: "updateFlags",
|
|
17066
17139
|
value: function () {
|
|
17067
|
-
var _updateFlags = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
17140
|
+
var _updateFlags = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee116(message_ids, reviewed_by) {
|
|
17068
17141
|
var options,
|
|
17069
|
-
|
|
17070
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
17142
|
+
_args116 = arguments;
|
|
17143
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee116$(_context116) {
|
|
17071
17144
|
while (1) {
|
|
17072
|
-
switch (
|
|
17145
|
+
switch (_context116.prev = _context116.next) {
|
|
17073
17146
|
case 0:
|
|
17074
|
-
options =
|
|
17075
|
-
|
|
17147
|
+
options = _args116.length > 2 && _args116[2] !== undefined ? _args116[2] : {};
|
|
17148
|
+
_context116.next = 3;
|
|
17076
17149
|
return this.post(this.baseURL + '/automod/v1/moderation/update_flags', _objectSpread({
|
|
17077
17150
|
message_ids: message_ids,
|
|
17078
17151
|
reviewed_by: reviewed_by
|
|
17079
17152
|
}, options));
|
|
17080
17153
|
|
|
17081
17154
|
case 3:
|
|
17082
|
-
return
|
|
17155
|
+
return _context116.abrupt("return", _context116.sent);
|
|
17083
17156
|
|
|
17084
17157
|
case 4:
|
|
17085
17158
|
case "end":
|
|
17086
|
-
return
|
|
17159
|
+
return _context116.stop();
|
|
17087
17160
|
}
|
|
17088
17161
|
}
|
|
17089
|
-
},
|
|
17162
|
+
}, _callee116, this);
|
|
17090
17163
|
}));
|
|
17091
17164
|
|
|
17092
|
-
function updateFlags(
|
|
17165
|
+
function updateFlags(_x177, _x178) {
|
|
17093
17166
|
return _updateFlags.apply(this, arguments);
|
|
17094
17167
|
}
|
|
17095
17168
|
|