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