stream-chat 8.51.0 → 8.52.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.es.js +571 -498
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.full-bundle.min.js +1 -1
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/browser.js +571 -498
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +571 -498
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +571 -498
- package/dist/index.js.map +1 -1
- package/dist/types/client.d.ts +12 -1
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/client_state.d.ts +5 -1
- package/dist/types/client_state.d.ts.map +1 -1
- package/dist/types/poll_manager.d.ts.map +1 -1
- package/dist/types/types.d.ts +17 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +1 -1
- package/src/client.ts +39 -9
- package/src/client_state.ts +6 -3
- package/src/poll_manager.ts +3 -0
- package/src/types.ts +18 -2
package/dist/browser.js
CHANGED
|
@@ -4257,7 +4257,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
4257
4257
|
delete this.getClient().activeChannels[tempChannelCid];
|
|
4258
4258
|
}
|
|
4259
4259
|
|
|
4260
|
-
if (!(this.cid in this.getClient().activeChannels)) {
|
|
4260
|
+
if (!(this.cid in this.getClient().activeChannels) && this.getClient()._cacheEnabled()) {
|
|
4261
4261
|
this.getClient().activeChannels[this.cid] = this;
|
|
4262
4262
|
}
|
|
4263
4263
|
}
|
|
@@ -5225,15 +5225,20 @@ function _arrayLikeToArray$3(arr, len) { if (len == null || len > arr.length) le
|
|
|
5225
5225
|
* ClientState - A container class for the client state.
|
|
5226
5226
|
*/
|
|
5227
5227
|
var ClientState = /*#__PURE__*/function () {
|
|
5228
|
-
function ClientState() {
|
|
5228
|
+
function ClientState(_ref) {
|
|
5229
|
+
var client = _ref.client;
|
|
5230
|
+
|
|
5229
5231
|
_classCallCheck__default['default'](this, ClientState);
|
|
5230
5232
|
|
|
5233
|
+
_defineProperty__default['default'](this, "client", void 0);
|
|
5234
|
+
|
|
5231
5235
|
_defineProperty__default['default'](this, "users", void 0);
|
|
5232
5236
|
|
|
5233
5237
|
_defineProperty__default['default'](this, "userChannelReferences", void 0);
|
|
5234
5238
|
|
|
5235
5239
|
// show the status for a certain user...
|
|
5236
5240
|
// ie online, offline etc
|
|
5241
|
+
this.client = client;
|
|
5237
5242
|
this.users = {}; // store which channels contain references to the specified user...
|
|
5238
5243
|
|
|
5239
5244
|
this.userChannelReferences = {};
|
|
@@ -5259,14 +5264,14 @@ var ClientState = /*#__PURE__*/function () {
|
|
|
5259
5264
|
}, {
|
|
5260
5265
|
key: "updateUser",
|
|
5261
5266
|
value: function updateUser(user) {
|
|
5262
|
-
if (user != null) {
|
|
5267
|
+
if (user != null && this.client._cacheEnabled()) {
|
|
5263
5268
|
this.users[user.id] = user;
|
|
5264
5269
|
}
|
|
5265
5270
|
}
|
|
5266
5271
|
}, {
|
|
5267
5272
|
key: "updateUserReference",
|
|
5268
5273
|
value: function updateUserReference(user, channelID) {
|
|
5269
|
-
if (user == null) {
|
|
5274
|
+
if (user == null || !this.client._cacheEnabled()) {
|
|
5270
5275
|
return;
|
|
5271
5276
|
}
|
|
5272
5277
|
|
|
@@ -10315,6 +10320,10 @@ var PollManager = /*#__PURE__*/function () {
|
|
|
10315
10320
|
});
|
|
10316
10321
|
|
|
10317
10322
|
_defineProperty__default['default'](this, "setOrOverwriteInCache", function (pollResponse, overwriteState) {
|
|
10323
|
+
if (!_this.client._cacheEnabled()) {
|
|
10324
|
+
return;
|
|
10325
|
+
}
|
|
10326
|
+
|
|
10318
10327
|
var pollFromCache = _this.fromState(pollResponse.id);
|
|
10319
10328
|
|
|
10320
10329
|
if (!pollFromCache) {
|
|
@@ -10737,7 +10746,9 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10737
10746
|
|
|
10738
10747
|
_this.activeChannels = {}; // reset client state
|
|
10739
10748
|
|
|
10740
|
-
_this.state = new ClientState(
|
|
10749
|
+
_this.state = new ClientState({
|
|
10750
|
+
client: _this
|
|
10751
|
+
}); // reset thread manager
|
|
10741
10752
|
|
|
10742
10753
|
_this.threads.resetState(); // reset token manager
|
|
10743
10754
|
|
|
@@ -11004,10 +11015,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11004
11015
|
|
|
11005
11016
|
for (var _channelID3 in refMap) {
|
|
11006
11017
|
var _channel4 = _this.activeChannels[_channelID3];
|
|
11007
|
-
var state = _channel4.state;
|
|
11008
|
-
/** deleted the messages from this user. */
|
|
11009
11018
|
|
|
11010
|
-
|
|
11019
|
+
if (_channel4) {
|
|
11020
|
+
var state = _channel4.state;
|
|
11021
|
+
/** deleted the messages from this user. */
|
|
11022
|
+
|
|
11023
|
+
state === null || state === void 0 ? void 0 : state.deleteUserMessages(user, hardDelete);
|
|
11024
|
+
}
|
|
11011
11025
|
}
|
|
11012
11026
|
});
|
|
11013
11027
|
|
|
@@ -11181,7 +11195,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11181
11195
|
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.
|
|
11182
11196
|
// In channel.query, we will replace it with 'cid'.
|
|
11183
11197
|
|
|
11184
|
-
_this.
|
|
11198
|
+
if (_this._cacheEnabled()) {
|
|
11199
|
+
_this.activeChannels[tempCid] = channel;
|
|
11200
|
+
}
|
|
11201
|
+
|
|
11185
11202
|
return channel;
|
|
11186
11203
|
});
|
|
11187
11204
|
|
|
@@ -11193,7 +11210,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11193
11210
|
|
|
11194
11211
|
var cid = "".concat(channelType, ":").concat(channelID);
|
|
11195
11212
|
|
|
11196
|
-
if (cid in _this.activeChannels && !_this.activeChannels[cid].disconnected) {
|
|
11213
|
+
if (cid in _this.activeChannels && _this.activeChannels[cid] && !_this.activeChannels[cid].disconnected) {
|
|
11197
11214
|
var _channel6 = _this.activeChannels[cid];
|
|
11198
11215
|
|
|
11199
11216
|
if (Object.keys(custom).length > 0) {
|
|
@@ -11205,7 +11222,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11205
11222
|
}
|
|
11206
11223
|
|
|
11207
11224
|
var channel = new Channel(_this, channelType, channelID, custom);
|
|
11208
|
-
|
|
11225
|
+
|
|
11226
|
+
if (_this._cacheEnabled()) {
|
|
11227
|
+
_this.activeChannels[channel.cid] = channel;
|
|
11228
|
+
}
|
|
11229
|
+
|
|
11209
11230
|
return channel;
|
|
11210
11231
|
});
|
|
11211
11232
|
|
|
@@ -11221,6 +11242,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11221
11242
|
return !!_this.secret;
|
|
11222
11243
|
});
|
|
11223
11244
|
|
|
11245
|
+
_defineProperty__default['default'](this, "_cacheEnabled", function () {
|
|
11246
|
+
return !_this._isUsingServerAuth() || !_this.options.disableCache;
|
|
11247
|
+
});
|
|
11248
|
+
|
|
11224
11249
|
_defineProperty__default['default'](this, "_buildWSPayload", function (client_request_id) {
|
|
11225
11250
|
return JSON.stringify({
|
|
11226
11251
|
user_id: _this.userID,
|
|
@@ -11233,7 +11258,9 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11233
11258
|
// set the key
|
|
11234
11259
|
this.key = _key;
|
|
11235
11260
|
this.listeners = {};
|
|
11236
|
-
this.state = new ClientState(
|
|
11261
|
+
this.state = new ClientState({
|
|
11262
|
+
client: this
|
|
11263
|
+
}); // a list of channels to hide ws events from
|
|
11237
11264
|
|
|
11238
11265
|
this.mutedChannels = [];
|
|
11239
11266
|
this.mutedUsers = [];
|
|
@@ -11252,7 +11279,8 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11252
11279
|
withCredentials: false,
|
|
11253
11280
|
// making sure cookies are not sent
|
|
11254
11281
|
warmUp: false,
|
|
11255
|
-
recoverStateOnReconnect: true
|
|
11282
|
+
recoverStateOnReconnect: true,
|
|
11283
|
+
disableCache: false
|
|
11256
11284
|
}, inputOptions);
|
|
11257
11285
|
|
|
11258
11286
|
if (this.node && !this.options.httpsAgent) {
|
|
@@ -12980,7 +13008,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12980
13008
|
value: function _addChannelConfig(_ref8) {
|
|
12981
13009
|
var cid = _ref8.cid,
|
|
12982
13010
|
config = _ref8.config;
|
|
12983
|
-
|
|
13011
|
+
|
|
13012
|
+
if (this._cacheEnabled()) {
|
|
13013
|
+
this.configs[cid] = config;
|
|
13014
|
+
}
|
|
12984
13015
|
}
|
|
12985
13016
|
/**
|
|
12986
13017
|
* channel - Returns a new channel with the given type, id and custom data
|
|
@@ -14391,6 +14422,48 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14391
14422
|
|
|
14392
14423
|
return translateMessage;
|
|
14393
14424
|
}()
|
|
14425
|
+
/**
|
|
14426
|
+
* translate - translates the given text to provided language
|
|
14427
|
+
*
|
|
14428
|
+
* @param {string} text
|
|
14429
|
+
* @param {string} destination_language
|
|
14430
|
+
* @param {string} source_language
|
|
14431
|
+
*
|
|
14432
|
+
* @return {TranslateResponse} Response that includes the message
|
|
14433
|
+
*/
|
|
14434
|
+
|
|
14435
|
+
}, {
|
|
14436
|
+
key: "translate",
|
|
14437
|
+
value: function () {
|
|
14438
|
+
var _translate = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee59(text, destination_language, source_language) {
|
|
14439
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee59$(_context59) {
|
|
14440
|
+
while (1) {
|
|
14441
|
+
switch (_context59.prev = _context59.next) {
|
|
14442
|
+
case 0:
|
|
14443
|
+
_context59.next = 2;
|
|
14444
|
+
return this.post(this.baseURL + "/translate", {
|
|
14445
|
+
text: text,
|
|
14446
|
+
source_language: source_language,
|
|
14447
|
+
destination_language: destination_language
|
|
14448
|
+
});
|
|
14449
|
+
|
|
14450
|
+
case 2:
|
|
14451
|
+
return _context59.abrupt("return", _context59.sent);
|
|
14452
|
+
|
|
14453
|
+
case 3:
|
|
14454
|
+
case "end":
|
|
14455
|
+
return _context59.stop();
|
|
14456
|
+
}
|
|
14457
|
+
}
|
|
14458
|
+
}, _callee59, this);
|
|
14459
|
+
}));
|
|
14460
|
+
|
|
14461
|
+
function translate(_x75, _x76, _x77) {
|
|
14462
|
+
return _translate.apply(this, arguments);
|
|
14463
|
+
}
|
|
14464
|
+
|
|
14465
|
+
return translate;
|
|
14466
|
+
}()
|
|
14394
14467
|
/**
|
|
14395
14468
|
* _normalizeExpiration - transforms expiration value into ISO string
|
|
14396
14469
|
* @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
|
|
@@ -14487,14 +14560,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14487
14560
|
}, {
|
|
14488
14561
|
key: "updateMessage",
|
|
14489
14562
|
value: function () {
|
|
14490
|
-
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14563
|
+
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee60(message, userId, options) {
|
|
14491
14564
|
var clonedMessage, reservedMessageFields;
|
|
14492
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14565
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee60$(_context60) {
|
|
14493
14566
|
while (1) {
|
|
14494
|
-
switch (
|
|
14567
|
+
switch (_context60.prev = _context60.next) {
|
|
14495
14568
|
case 0:
|
|
14496
14569
|
if (message.id) {
|
|
14497
|
-
|
|
14570
|
+
_context60.next = 2;
|
|
14498
14571
|
break;
|
|
14499
14572
|
}
|
|
14500
14573
|
|
|
@@ -14531,23 +14604,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14531
14604
|
});
|
|
14532
14605
|
}
|
|
14533
14606
|
|
|
14534
|
-
|
|
14607
|
+
_context60.next = 10;
|
|
14535
14608
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(message.id)), _objectSpread({
|
|
14536
14609
|
message: clonedMessage
|
|
14537
14610
|
}, options));
|
|
14538
14611
|
|
|
14539
14612
|
case 10:
|
|
14540
|
-
return
|
|
14613
|
+
return _context60.abrupt("return", _context60.sent);
|
|
14541
14614
|
|
|
14542
14615
|
case 11:
|
|
14543
14616
|
case "end":
|
|
14544
|
-
return
|
|
14617
|
+
return _context60.stop();
|
|
14545
14618
|
}
|
|
14546
14619
|
}
|
|
14547
|
-
},
|
|
14620
|
+
}, _callee60, this);
|
|
14548
14621
|
}));
|
|
14549
14622
|
|
|
14550
|
-
function updateMessage(
|
|
14623
|
+
function updateMessage(_x78, _x79, _x80) {
|
|
14551
14624
|
return _updateMessage.apply(this, arguments);
|
|
14552
14625
|
}
|
|
14553
14626
|
|
|
@@ -14570,14 +14643,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14570
14643
|
}, {
|
|
14571
14644
|
key: "partialUpdateMessage",
|
|
14572
14645
|
value: function () {
|
|
14573
|
-
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14646
|
+
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee61(id, partialMessageObject, userId, options) {
|
|
14574
14647
|
var user;
|
|
14575
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14648
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee61$(_context61) {
|
|
14576
14649
|
while (1) {
|
|
14577
|
-
switch (
|
|
14650
|
+
switch (_context61.prev = _context61.next) {
|
|
14578
14651
|
case 0:
|
|
14579
14652
|
if (id) {
|
|
14580
|
-
|
|
14653
|
+
_context61.next = 2;
|
|
14581
14654
|
break;
|
|
14582
14655
|
}
|
|
14583
14656
|
|
|
@@ -14592,23 +14665,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14592
14665
|
};
|
|
14593
14666
|
}
|
|
14594
14667
|
|
|
14595
|
-
|
|
14668
|
+
_context61.next = 6;
|
|
14596
14669
|
return this.put(this.baseURL + "/messages/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
14597
14670
|
user: user
|
|
14598
14671
|
}));
|
|
14599
14672
|
|
|
14600
14673
|
case 6:
|
|
14601
|
-
return
|
|
14674
|
+
return _context61.abrupt("return", _context61.sent);
|
|
14602
14675
|
|
|
14603
14676
|
case 7:
|
|
14604
14677
|
case "end":
|
|
14605
|
-
return
|
|
14678
|
+
return _context61.stop();
|
|
14606
14679
|
}
|
|
14607
14680
|
}
|
|
14608
|
-
},
|
|
14681
|
+
}, _callee61, this);
|
|
14609
14682
|
}));
|
|
14610
14683
|
|
|
14611
|
-
function partialUpdateMessage(
|
|
14684
|
+
function partialUpdateMessage(_x81, _x82, _x83, _x84) {
|
|
14612
14685
|
return _partialUpdateMessage.apply(this, arguments);
|
|
14613
14686
|
}
|
|
14614
14687
|
|
|
@@ -14617,11 +14690,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14617
14690
|
}, {
|
|
14618
14691
|
key: "deleteMessage",
|
|
14619
14692
|
value: function () {
|
|
14620
|
-
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14693
|
+
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee62(messageID, hardDelete) {
|
|
14621
14694
|
var params;
|
|
14622
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14695
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee62$(_context62) {
|
|
14623
14696
|
while (1) {
|
|
14624
|
-
switch (
|
|
14697
|
+
switch (_context62.prev = _context62.next) {
|
|
14625
14698
|
case 0:
|
|
14626
14699
|
params = {};
|
|
14627
14700
|
|
|
@@ -14631,21 +14704,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14631
14704
|
};
|
|
14632
14705
|
}
|
|
14633
14706
|
|
|
14634
|
-
|
|
14707
|
+
_context62.next = 4;
|
|
14635
14708
|
return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), params);
|
|
14636
14709
|
|
|
14637
14710
|
case 4:
|
|
14638
|
-
return
|
|
14711
|
+
return _context62.abrupt("return", _context62.sent);
|
|
14639
14712
|
|
|
14640
14713
|
case 5:
|
|
14641
14714
|
case "end":
|
|
14642
|
-
return
|
|
14715
|
+
return _context62.stop();
|
|
14643
14716
|
}
|
|
14644
14717
|
}
|
|
14645
|
-
},
|
|
14718
|
+
}, _callee62, this);
|
|
14646
14719
|
}));
|
|
14647
14720
|
|
|
14648
|
-
function deleteMessage(
|
|
14721
|
+
function deleteMessage(_x85, _x86) {
|
|
14649
14722
|
return _deleteMessage.apply(this, arguments);
|
|
14650
14723
|
}
|
|
14651
14724
|
|
|
@@ -14667,28 +14740,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14667
14740
|
}, {
|
|
14668
14741
|
key: "undeleteMessage",
|
|
14669
14742
|
value: function () {
|
|
14670
|
-
var _undeleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14671
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14743
|
+
var _undeleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee63(messageID, userID) {
|
|
14744
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee63$(_context63) {
|
|
14672
14745
|
while (1) {
|
|
14673
|
-
switch (
|
|
14746
|
+
switch (_context63.prev = _context63.next) {
|
|
14674
14747
|
case 0:
|
|
14675
|
-
|
|
14748
|
+
_context63.next = 2;
|
|
14676
14749
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageID), "/undelete"), {
|
|
14677
14750
|
undeleted_by: userID
|
|
14678
14751
|
});
|
|
14679
14752
|
|
|
14680
14753
|
case 2:
|
|
14681
|
-
return
|
|
14754
|
+
return _context63.abrupt("return", _context63.sent);
|
|
14682
14755
|
|
|
14683
14756
|
case 3:
|
|
14684
14757
|
case "end":
|
|
14685
|
-
return
|
|
14758
|
+
return _context63.stop();
|
|
14686
14759
|
}
|
|
14687
14760
|
}
|
|
14688
|
-
},
|
|
14761
|
+
}, _callee63, this);
|
|
14689
14762
|
}));
|
|
14690
14763
|
|
|
14691
|
-
function undeleteMessage(
|
|
14764
|
+
function undeleteMessage(_x87, _x88) {
|
|
14692
14765
|
return _undeleteMessage.apply(this, arguments);
|
|
14693
14766
|
}
|
|
14694
14767
|
|
|
@@ -14697,26 +14770,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14697
14770
|
}, {
|
|
14698
14771
|
key: "getMessage",
|
|
14699
14772
|
value: function () {
|
|
14700
|
-
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14701
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14773
|
+
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee64(messageID, options) {
|
|
14774
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee64$(_context64) {
|
|
14702
14775
|
while (1) {
|
|
14703
|
-
switch (
|
|
14776
|
+
switch (_context64.prev = _context64.next) {
|
|
14704
14777
|
case 0:
|
|
14705
|
-
|
|
14778
|
+
_context64.next = 2;
|
|
14706
14779
|
return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), _objectSpread({}, options));
|
|
14707
14780
|
|
|
14708
14781
|
case 2:
|
|
14709
|
-
return
|
|
14782
|
+
return _context64.abrupt("return", _context64.sent);
|
|
14710
14783
|
|
|
14711
14784
|
case 3:
|
|
14712
14785
|
case "end":
|
|
14713
|
-
return
|
|
14786
|
+
return _context64.stop();
|
|
14714
14787
|
}
|
|
14715
14788
|
}
|
|
14716
|
-
},
|
|
14789
|
+
}, _callee64, this);
|
|
14717
14790
|
}));
|
|
14718
14791
|
|
|
14719
|
-
function getMessage(
|
|
14792
|
+
function getMessage(_x89, _x90) {
|
|
14720
14793
|
return _getMessage.apply(this, arguments);
|
|
14721
14794
|
}
|
|
14722
14795
|
|
|
@@ -14737,30 +14810,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14737
14810
|
}, {
|
|
14738
14811
|
key: "queryThreads",
|
|
14739
14812
|
value: function () {
|
|
14740
|
-
var _queryThreads = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14813
|
+
var _queryThreads = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee65() {
|
|
14741
14814
|
var _this5 = this;
|
|
14742
14815
|
|
|
14743
14816
|
var options,
|
|
14744
14817
|
optionsWithDefaults,
|
|
14745
14818
|
response,
|
|
14746
|
-
|
|
14747
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14819
|
+
_args65 = arguments;
|
|
14820
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee65$(_context65) {
|
|
14748
14821
|
while (1) {
|
|
14749
|
-
switch (
|
|
14822
|
+
switch (_context65.prev = _context65.next) {
|
|
14750
14823
|
case 0:
|
|
14751
|
-
options =
|
|
14824
|
+
options = _args65.length > 0 && _args65[0] !== undefined ? _args65[0] : {};
|
|
14752
14825
|
optionsWithDefaults = _objectSpread({
|
|
14753
14826
|
limit: 10,
|
|
14754
14827
|
participant_limit: 10,
|
|
14755
14828
|
reply_limit: 3,
|
|
14756
14829
|
watch: true
|
|
14757
14830
|
}, options);
|
|
14758
|
-
|
|
14831
|
+
_context65.next = 4;
|
|
14759
14832
|
return this.post("".concat(this.baseURL, "/threads"), optionsWithDefaults);
|
|
14760
14833
|
|
|
14761
14834
|
case 4:
|
|
14762
|
-
response =
|
|
14763
|
-
return
|
|
14835
|
+
response = _context65.sent;
|
|
14836
|
+
return _context65.abrupt("return", {
|
|
14764
14837
|
threads: response.threads.map(function (thread) {
|
|
14765
14838
|
return new Thread({
|
|
14766
14839
|
client: _this5,
|
|
@@ -14772,10 +14845,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14772
14845
|
|
|
14773
14846
|
case 6:
|
|
14774
14847
|
case "end":
|
|
14775
|
-
return
|
|
14848
|
+
return _context65.stop();
|
|
14776
14849
|
}
|
|
14777
14850
|
}
|
|
14778
|
-
},
|
|
14851
|
+
}, _callee65, this);
|
|
14779
14852
|
}));
|
|
14780
14853
|
|
|
14781
14854
|
function queryThreads() {
|
|
@@ -14799,19 +14872,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14799
14872
|
}, {
|
|
14800
14873
|
key: "getThread",
|
|
14801
14874
|
value: function () {
|
|
14802
|
-
var _getThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14875
|
+
var _getThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee66(messageId) {
|
|
14803
14876
|
var options,
|
|
14804
14877
|
optionsWithDefaults,
|
|
14805
14878
|
response,
|
|
14806
|
-
|
|
14807
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14879
|
+
_args66 = arguments;
|
|
14880
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee66$(_context66) {
|
|
14808
14881
|
while (1) {
|
|
14809
|
-
switch (
|
|
14882
|
+
switch (_context66.prev = _context66.next) {
|
|
14810
14883
|
case 0:
|
|
14811
|
-
options =
|
|
14884
|
+
options = _args66.length > 1 && _args66[1] !== undefined ? _args66[1] : {};
|
|
14812
14885
|
|
|
14813
14886
|
if (messageId) {
|
|
14814
|
-
|
|
14887
|
+
_context66.next = 3;
|
|
14815
14888
|
break;
|
|
14816
14889
|
}
|
|
14817
14890
|
|
|
@@ -14823,25 +14896,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14823
14896
|
reply_limit: 3,
|
|
14824
14897
|
watch: true
|
|
14825
14898
|
}, options);
|
|
14826
|
-
|
|
14899
|
+
_context66.next = 6;
|
|
14827
14900
|
return this.get("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), optionsWithDefaults);
|
|
14828
14901
|
|
|
14829
14902
|
case 6:
|
|
14830
|
-
response =
|
|
14831
|
-
return
|
|
14903
|
+
response = _context66.sent;
|
|
14904
|
+
return _context66.abrupt("return", new Thread({
|
|
14832
14905
|
client: this,
|
|
14833
14906
|
threadData: response.thread
|
|
14834
14907
|
}));
|
|
14835
14908
|
|
|
14836
14909
|
case 8:
|
|
14837
14910
|
case "end":
|
|
14838
|
-
return
|
|
14911
|
+
return _context66.stop();
|
|
14839
14912
|
}
|
|
14840
14913
|
}
|
|
14841
|
-
},
|
|
14914
|
+
}, _callee66, this);
|
|
14842
14915
|
}));
|
|
14843
14916
|
|
|
14844
|
-
function getThread(
|
|
14917
|
+
function getThread(_x91) {
|
|
14845
14918
|
return _getThread.apply(this, arguments);
|
|
14846
14919
|
}
|
|
14847
14920
|
|
|
@@ -14859,15 +14932,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14859
14932
|
}, {
|
|
14860
14933
|
key: "partialUpdateThread",
|
|
14861
14934
|
value: function () {
|
|
14862
|
-
var _partialUpdateThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14935
|
+
var _partialUpdateThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee67(messageId, partialThreadObject) {
|
|
14863
14936
|
var reservedThreadFields, _key5;
|
|
14864
14937
|
|
|
14865
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14938
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee67$(_context67) {
|
|
14866
14939
|
while (1) {
|
|
14867
|
-
switch (
|
|
14940
|
+
switch (_context67.prev = _context67.next) {
|
|
14868
14941
|
case 0:
|
|
14869
14942
|
if (messageId) {
|
|
14870
|
-
|
|
14943
|
+
_context67.next = 2;
|
|
14871
14944
|
break;
|
|
14872
14945
|
}
|
|
14873
14946
|
|
|
@@ -14877,43 +14950,43 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14877
14950
|
// check for reserved fields from ThreadResponse type within partialThreadObject's set and unset.
|
|
14878
14951
|
// Throw error if any of the reserved field is found.
|
|
14879
14952
|
reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel', 'custom'];
|
|
14880
|
-
|
|
14953
|
+
_context67.t0 = _regeneratorRuntime__default['default'].keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
|
|
14881
14954
|
|
|
14882
14955
|
case 4:
|
|
14883
|
-
if ((
|
|
14884
|
-
|
|
14956
|
+
if ((_context67.t1 = _context67.t0()).done) {
|
|
14957
|
+
_context67.next = 10;
|
|
14885
14958
|
break;
|
|
14886
14959
|
}
|
|
14887
14960
|
|
|
14888
|
-
_key5 =
|
|
14961
|
+
_key5 = _context67.t1.value;
|
|
14889
14962
|
|
|
14890
14963
|
if (!reservedThreadFields.includes(_key5)) {
|
|
14891
|
-
|
|
14964
|
+
_context67.next = 8;
|
|
14892
14965
|
break;
|
|
14893
14966
|
}
|
|
14894
14967
|
|
|
14895
14968
|
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."));
|
|
14896
14969
|
|
|
14897
14970
|
case 8:
|
|
14898
|
-
|
|
14971
|
+
_context67.next = 4;
|
|
14899
14972
|
break;
|
|
14900
14973
|
|
|
14901
14974
|
case 10:
|
|
14902
|
-
|
|
14975
|
+
_context67.next = 12;
|
|
14903
14976
|
return this.patch("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), partialThreadObject);
|
|
14904
14977
|
|
|
14905
14978
|
case 12:
|
|
14906
|
-
return
|
|
14979
|
+
return _context67.abrupt("return", _context67.sent);
|
|
14907
14980
|
|
|
14908
14981
|
case 13:
|
|
14909
14982
|
case "end":
|
|
14910
|
-
return
|
|
14983
|
+
return _context67.stop();
|
|
14911
14984
|
}
|
|
14912
14985
|
}
|
|
14913
|
-
},
|
|
14986
|
+
}, _callee67, this);
|
|
14914
14987
|
}));
|
|
14915
14988
|
|
|
14916
|
-
function partialUpdateThread(
|
|
14989
|
+
function partialUpdateThread(_x92, _x93) {
|
|
14917
14990
|
return _partialUpdateThread.apply(this, arguments);
|
|
14918
14991
|
}
|
|
14919
14992
|
|
|
@@ -14922,7 +14995,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14922
14995
|
}, {
|
|
14923
14996
|
key: "getUserAgent",
|
|
14924
14997
|
value: function getUserAgent() {
|
|
14925
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
14998
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.52.1");
|
|
14926
14999
|
}
|
|
14927
15000
|
}, {
|
|
14928
15001
|
key: "setUserAgent",
|
|
@@ -15141,28 +15214,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15141
15214
|
}, {
|
|
15142
15215
|
key: "sendUserCustomEvent",
|
|
15143
15216
|
value: function () {
|
|
15144
|
-
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15145
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15217
|
+
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee68(targetUserID, event) {
|
|
15218
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee68$(_context68) {
|
|
15146
15219
|
while (1) {
|
|
15147
|
-
switch (
|
|
15220
|
+
switch (_context68.prev = _context68.next) {
|
|
15148
15221
|
case 0:
|
|
15149
|
-
|
|
15222
|
+
_context68.next = 2;
|
|
15150
15223
|
return this.post("".concat(this.baseURL, "/users/").concat(encodeURIComponent(targetUserID), "/event"), {
|
|
15151
15224
|
event: event
|
|
15152
15225
|
});
|
|
15153
15226
|
|
|
15154
15227
|
case 2:
|
|
15155
|
-
return
|
|
15228
|
+
return _context68.abrupt("return", _context68.sent);
|
|
15156
15229
|
|
|
15157
15230
|
case 3:
|
|
15158
15231
|
case "end":
|
|
15159
|
-
return
|
|
15232
|
+
return _context68.stop();
|
|
15160
15233
|
}
|
|
15161
15234
|
}
|
|
15162
|
-
},
|
|
15235
|
+
}, _callee68, this);
|
|
15163
15236
|
}));
|
|
15164
15237
|
|
|
15165
|
-
function sendUserCustomEvent(
|
|
15238
|
+
function sendUserCustomEvent(_x94, _x95) {
|
|
15166
15239
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
15167
15240
|
}
|
|
15168
15241
|
|
|
@@ -15259,28 +15332,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15259
15332
|
}, {
|
|
15260
15333
|
key: "createSegment",
|
|
15261
15334
|
value: function () {
|
|
15262
|
-
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15335
|
+
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee69(type, id, data) {
|
|
15263
15336
|
var body;
|
|
15264
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15337
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee69$(_context69) {
|
|
15265
15338
|
while (1) {
|
|
15266
|
-
switch (
|
|
15339
|
+
switch (_context69.prev = _context69.next) {
|
|
15267
15340
|
case 0:
|
|
15268
15341
|
this.validateServerSideAuth();
|
|
15269
15342
|
body = _objectSpread({
|
|
15270
15343
|
id: id,
|
|
15271
15344
|
type: type
|
|
15272
15345
|
}, data);
|
|
15273
|
-
return
|
|
15346
|
+
return _context69.abrupt("return", this.post(this.baseURL + "/segments", body));
|
|
15274
15347
|
|
|
15275
15348
|
case 3:
|
|
15276
15349
|
case "end":
|
|
15277
|
-
return
|
|
15350
|
+
return _context69.stop();
|
|
15278
15351
|
}
|
|
15279
15352
|
}
|
|
15280
|
-
},
|
|
15353
|
+
}, _callee69, this);
|
|
15281
15354
|
}));
|
|
15282
15355
|
|
|
15283
|
-
function createSegment(
|
|
15356
|
+
function createSegment(_x96, _x97, _x98) {
|
|
15284
15357
|
return _createSegment.apply(this, arguments);
|
|
15285
15358
|
}
|
|
15286
15359
|
|
|
@@ -15299,23 +15372,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15299
15372
|
}, {
|
|
15300
15373
|
key: "createUserSegment",
|
|
15301
15374
|
value: function () {
|
|
15302
|
-
var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15303
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15375
|
+
var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee70(id, data) {
|
|
15376
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee70$(_context70) {
|
|
15304
15377
|
while (1) {
|
|
15305
|
-
switch (
|
|
15378
|
+
switch (_context70.prev = _context70.next) {
|
|
15306
15379
|
case 0:
|
|
15307
15380
|
this.validateServerSideAuth();
|
|
15308
|
-
return
|
|
15381
|
+
return _context70.abrupt("return", this.createSegment('user', id, data));
|
|
15309
15382
|
|
|
15310
15383
|
case 2:
|
|
15311
15384
|
case "end":
|
|
15312
|
-
return
|
|
15385
|
+
return _context70.stop();
|
|
15313
15386
|
}
|
|
15314
15387
|
}
|
|
15315
|
-
},
|
|
15388
|
+
}, _callee70, this);
|
|
15316
15389
|
}));
|
|
15317
15390
|
|
|
15318
|
-
function createUserSegment(
|
|
15391
|
+
function createUserSegment(_x99, _x100) {
|
|
15319
15392
|
return _createUserSegment.apply(this, arguments);
|
|
15320
15393
|
}
|
|
15321
15394
|
|
|
@@ -15334,23 +15407,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15334
15407
|
}, {
|
|
15335
15408
|
key: "createChannelSegment",
|
|
15336
15409
|
value: function () {
|
|
15337
|
-
var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15338
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15410
|
+
var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee71(id, data) {
|
|
15411
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee71$(_context71) {
|
|
15339
15412
|
while (1) {
|
|
15340
|
-
switch (
|
|
15413
|
+
switch (_context71.prev = _context71.next) {
|
|
15341
15414
|
case 0:
|
|
15342
15415
|
this.validateServerSideAuth();
|
|
15343
|
-
return
|
|
15416
|
+
return _context71.abrupt("return", this.createSegment('channel', id, data));
|
|
15344
15417
|
|
|
15345
15418
|
case 2:
|
|
15346
15419
|
case "end":
|
|
15347
|
-
return
|
|
15420
|
+
return _context71.stop();
|
|
15348
15421
|
}
|
|
15349
15422
|
}
|
|
15350
|
-
},
|
|
15423
|
+
}, _callee71, this);
|
|
15351
15424
|
}));
|
|
15352
15425
|
|
|
15353
|
-
function createChannelSegment(
|
|
15426
|
+
function createChannelSegment(_x101, _x102) {
|
|
15354
15427
|
return _createChannelSegment.apply(this, arguments);
|
|
15355
15428
|
}
|
|
15356
15429
|
|
|
@@ -15359,23 +15432,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15359
15432
|
}, {
|
|
15360
15433
|
key: "getSegment",
|
|
15361
15434
|
value: function () {
|
|
15362
|
-
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15363
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15435
|
+
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee72(id) {
|
|
15436
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee72$(_context72) {
|
|
15364
15437
|
while (1) {
|
|
15365
|
-
switch (
|
|
15438
|
+
switch (_context72.prev = _context72.next) {
|
|
15366
15439
|
case 0:
|
|
15367
15440
|
this.validateServerSideAuth();
|
|
15368
|
-
return
|
|
15441
|
+
return _context72.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
|
|
15369
15442
|
|
|
15370
15443
|
case 2:
|
|
15371
15444
|
case "end":
|
|
15372
|
-
return
|
|
15445
|
+
return _context72.stop();
|
|
15373
15446
|
}
|
|
15374
15447
|
}
|
|
15375
|
-
},
|
|
15448
|
+
}, _callee72, this);
|
|
15376
15449
|
}));
|
|
15377
15450
|
|
|
15378
|
-
function getSegment(
|
|
15451
|
+
function getSegment(_x103) {
|
|
15379
15452
|
return _getSegment.apply(this, arguments);
|
|
15380
15453
|
}
|
|
15381
15454
|
|
|
@@ -15393,23 +15466,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15393
15466
|
}, {
|
|
15394
15467
|
key: "updateSegment",
|
|
15395
15468
|
value: function () {
|
|
15396
|
-
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15397
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15469
|
+
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee73(id, data) {
|
|
15470
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee73$(_context73) {
|
|
15398
15471
|
while (1) {
|
|
15399
|
-
switch (
|
|
15472
|
+
switch (_context73.prev = _context73.next) {
|
|
15400
15473
|
case 0:
|
|
15401
15474
|
this.validateServerSideAuth();
|
|
15402
|
-
return
|
|
15475
|
+
return _context73.abrupt("return", this.put(this.baseURL + "/segments/".concat(encodeURIComponent(id)), data));
|
|
15403
15476
|
|
|
15404
15477
|
case 2:
|
|
15405
15478
|
case "end":
|
|
15406
|
-
return
|
|
15479
|
+
return _context73.stop();
|
|
15407
15480
|
}
|
|
15408
15481
|
}
|
|
15409
|
-
},
|
|
15482
|
+
}, _callee73, this);
|
|
15410
15483
|
}));
|
|
15411
15484
|
|
|
15412
|
-
function updateSegment(
|
|
15485
|
+
function updateSegment(_x104, _x105) {
|
|
15413
15486
|
return _updateSegment.apply(this, arguments);
|
|
15414
15487
|
}
|
|
15415
15488
|
|
|
@@ -15427,27 +15500,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15427
15500
|
}, {
|
|
15428
15501
|
key: "addSegmentTargets",
|
|
15429
15502
|
value: function () {
|
|
15430
|
-
var _addSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15503
|
+
var _addSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee74(id, targets) {
|
|
15431
15504
|
var body;
|
|
15432
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15505
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee74$(_context74) {
|
|
15433
15506
|
while (1) {
|
|
15434
|
-
switch (
|
|
15507
|
+
switch (_context74.prev = _context74.next) {
|
|
15435
15508
|
case 0:
|
|
15436
15509
|
this.validateServerSideAuth();
|
|
15437
15510
|
body = {
|
|
15438
15511
|
target_ids: targets
|
|
15439
15512
|
};
|
|
15440
|
-
return
|
|
15513
|
+
return _context74.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/addtargets"), body));
|
|
15441
15514
|
|
|
15442
15515
|
case 3:
|
|
15443
15516
|
case "end":
|
|
15444
|
-
return
|
|
15517
|
+
return _context74.stop();
|
|
15445
15518
|
}
|
|
15446
15519
|
}
|
|
15447
|
-
},
|
|
15520
|
+
}, _callee74, this);
|
|
15448
15521
|
}));
|
|
15449
15522
|
|
|
15450
|
-
function addSegmentTargets(
|
|
15523
|
+
function addSegmentTargets(_x106, _x107) {
|
|
15451
15524
|
return _addSegmentTargets.apply(this, arguments);
|
|
15452
15525
|
}
|
|
15453
15526
|
|
|
@@ -15456,33 +15529,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15456
15529
|
}, {
|
|
15457
15530
|
key: "querySegmentTargets",
|
|
15458
15531
|
value: function () {
|
|
15459
|
-
var _querySegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15532
|
+
var _querySegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee75(id) {
|
|
15460
15533
|
var filter,
|
|
15461
15534
|
sort,
|
|
15462
15535
|
options,
|
|
15463
|
-
|
|
15464
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15536
|
+
_args75 = arguments;
|
|
15537
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee75$(_context75) {
|
|
15465
15538
|
while (1) {
|
|
15466
|
-
switch (
|
|
15539
|
+
switch (_context75.prev = _context75.next) {
|
|
15467
15540
|
case 0:
|
|
15468
|
-
filter =
|
|
15469
|
-
sort =
|
|
15470
|
-
options =
|
|
15541
|
+
filter = _args75.length > 1 && _args75[1] !== undefined ? _args75[1] : {};
|
|
15542
|
+
sort = _args75.length > 2 && _args75[2] !== undefined ? _args75[2] : [];
|
|
15543
|
+
options = _args75.length > 3 && _args75[3] !== undefined ? _args75[3] : {};
|
|
15471
15544
|
this.validateServerSideAuth();
|
|
15472
|
-
return
|
|
15545
|
+
return _context75.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/targets/query"), _objectSpread({
|
|
15473
15546
|
filter: filter || {},
|
|
15474
15547
|
sort: sort || []
|
|
15475
15548
|
}, options)));
|
|
15476
15549
|
|
|
15477
15550
|
case 5:
|
|
15478
15551
|
case "end":
|
|
15479
|
-
return
|
|
15552
|
+
return _context75.stop();
|
|
15480
15553
|
}
|
|
15481
15554
|
}
|
|
15482
|
-
},
|
|
15555
|
+
}, _callee75, this);
|
|
15483
15556
|
}));
|
|
15484
15557
|
|
|
15485
|
-
function querySegmentTargets(
|
|
15558
|
+
function querySegmentTargets(_x108) {
|
|
15486
15559
|
return _querySegmentTargets.apply(this, arguments);
|
|
15487
15560
|
}
|
|
15488
15561
|
|
|
@@ -15500,27 +15573,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15500
15573
|
}, {
|
|
15501
15574
|
key: "removeSegmentTargets",
|
|
15502
15575
|
value: function () {
|
|
15503
|
-
var _removeSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15576
|
+
var _removeSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee76(id, targets) {
|
|
15504
15577
|
var body;
|
|
15505
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15578
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee76$(_context76) {
|
|
15506
15579
|
while (1) {
|
|
15507
|
-
switch (
|
|
15580
|
+
switch (_context76.prev = _context76.next) {
|
|
15508
15581
|
case 0:
|
|
15509
15582
|
this.validateServerSideAuth();
|
|
15510
15583
|
body = {
|
|
15511
15584
|
target_ids: targets
|
|
15512
15585
|
};
|
|
15513
|
-
return
|
|
15586
|
+
return _context76.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/deletetargets"), body));
|
|
15514
15587
|
|
|
15515
15588
|
case 3:
|
|
15516
15589
|
case "end":
|
|
15517
|
-
return
|
|
15590
|
+
return _context76.stop();
|
|
15518
15591
|
}
|
|
15519
15592
|
}
|
|
15520
|
-
},
|
|
15593
|
+
}, _callee76, this);
|
|
15521
15594
|
}));
|
|
15522
15595
|
|
|
15523
|
-
function removeSegmentTargets(
|
|
15596
|
+
function removeSegmentTargets(_x109, _x110) {
|
|
15524
15597
|
return _removeSegmentTargets.apply(this, arguments);
|
|
15525
15598
|
}
|
|
15526
15599
|
|
|
@@ -15538,29 +15611,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15538
15611
|
}, {
|
|
15539
15612
|
key: "querySegments",
|
|
15540
15613
|
value: function () {
|
|
15541
|
-
var _querySegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15614
|
+
var _querySegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee77(filter, sort) {
|
|
15542
15615
|
var options,
|
|
15543
|
-
|
|
15544
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15616
|
+
_args77 = arguments;
|
|
15617
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee77$(_context77) {
|
|
15545
15618
|
while (1) {
|
|
15546
|
-
switch (
|
|
15619
|
+
switch (_context77.prev = _context77.next) {
|
|
15547
15620
|
case 0:
|
|
15548
|
-
options =
|
|
15621
|
+
options = _args77.length > 2 && _args77[2] !== undefined ? _args77[2] : {};
|
|
15549
15622
|
this.validateServerSideAuth();
|
|
15550
|
-
return
|
|
15623
|
+
return _context77.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
|
|
15551
15624
|
filter: filter,
|
|
15552
15625
|
sort: sort
|
|
15553
15626
|
}, options)));
|
|
15554
15627
|
|
|
15555
15628
|
case 3:
|
|
15556
15629
|
case "end":
|
|
15557
|
-
return
|
|
15630
|
+
return _context77.stop();
|
|
15558
15631
|
}
|
|
15559
15632
|
}
|
|
15560
|
-
},
|
|
15633
|
+
}, _callee77, this);
|
|
15561
15634
|
}));
|
|
15562
15635
|
|
|
15563
|
-
function querySegments(
|
|
15636
|
+
function querySegments(_x111, _x112) {
|
|
15564
15637
|
return _querySegments.apply(this, arguments);
|
|
15565
15638
|
}
|
|
15566
15639
|
|
|
@@ -15577,23 +15650,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15577
15650
|
}, {
|
|
15578
15651
|
key: "deleteSegment",
|
|
15579
15652
|
value: function () {
|
|
15580
|
-
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15581
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15653
|
+
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee78(id) {
|
|
15654
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee78$(_context78) {
|
|
15582
15655
|
while (1) {
|
|
15583
|
-
switch (
|
|
15656
|
+
switch (_context78.prev = _context78.next) {
|
|
15584
15657
|
case 0:
|
|
15585
15658
|
this.validateServerSideAuth();
|
|
15586
|
-
return
|
|
15659
|
+
return _context78.abrupt("return", this.delete(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
|
|
15587
15660
|
|
|
15588
15661
|
case 2:
|
|
15589
15662
|
case "end":
|
|
15590
|
-
return
|
|
15663
|
+
return _context78.stop();
|
|
15591
15664
|
}
|
|
15592
15665
|
}
|
|
15593
|
-
},
|
|
15666
|
+
}, _callee78, this);
|
|
15594
15667
|
}));
|
|
15595
15668
|
|
|
15596
|
-
function deleteSegment(
|
|
15669
|
+
function deleteSegment(_x113) {
|
|
15597
15670
|
return _deleteSegment.apply(this, arguments);
|
|
15598
15671
|
}
|
|
15599
15672
|
|
|
@@ -15611,23 +15684,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15611
15684
|
}, {
|
|
15612
15685
|
key: "segmentTargetExists",
|
|
15613
15686
|
value: function () {
|
|
15614
|
-
var _segmentTargetExists = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15615
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15687
|
+
var _segmentTargetExists = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee79(segmentId, targetId) {
|
|
15688
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee79$(_context79) {
|
|
15616
15689
|
while (1) {
|
|
15617
|
-
switch (
|
|
15690
|
+
switch (_context79.prev = _context79.next) {
|
|
15618
15691
|
case 0:
|
|
15619
15692
|
this.validateServerSideAuth();
|
|
15620
|
-
return
|
|
15693
|
+
return _context79.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(segmentId), "/target/").concat(encodeURIComponent(targetId))));
|
|
15621
15694
|
|
|
15622
15695
|
case 2:
|
|
15623
15696
|
case "end":
|
|
15624
|
-
return
|
|
15697
|
+
return _context79.stop();
|
|
15625
15698
|
}
|
|
15626
15699
|
}
|
|
15627
|
-
},
|
|
15700
|
+
}, _callee79, this);
|
|
15628
15701
|
}));
|
|
15629
15702
|
|
|
15630
|
-
function segmentTargetExists(
|
|
15703
|
+
function segmentTargetExists(_x114, _x115) {
|
|
15631
15704
|
return _segmentTargetExists.apply(this, arguments);
|
|
15632
15705
|
}
|
|
15633
15706
|
|
|
@@ -15644,23 +15717,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15644
15717
|
}, {
|
|
15645
15718
|
key: "createCampaign",
|
|
15646
15719
|
value: function () {
|
|
15647
|
-
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15648
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15720
|
+
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee80(params) {
|
|
15721
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee80$(_context80) {
|
|
15649
15722
|
while (1) {
|
|
15650
|
-
switch (
|
|
15723
|
+
switch (_context80.prev = _context80.next) {
|
|
15651
15724
|
case 0:
|
|
15652
15725
|
this.validateServerSideAuth();
|
|
15653
|
-
return
|
|
15726
|
+
return _context80.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
|
|
15654
15727
|
|
|
15655
15728
|
case 2:
|
|
15656
15729
|
case "end":
|
|
15657
|
-
return
|
|
15730
|
+
return _context80.stop();
|
|
15658
15731
|
}
|
|
15659
15732
|
}
|
|
15660
|
-
},
|
|
15733
|
+
}, _callee80, this);
|
|
15661
15734
|
}));
|
|
15662
15735
|
|
|
15663
|
-
function createCampaign(
|
|
15736
|
+
function createCampaign(_x116) {
|
|
15664
15737
|
return _createCampaign.apply(this, arguments);
|
|
15665
15738
|
}
|
|
15666
15739
|
|
|
@@ -15669,23 +15742,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15669
15742
|
}, {
|
|
15670
15743
|
key: "getCampaign",
|
|
15671
15744
|
value: function () {
|
|
15672
|
-
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15673
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15745
|
+
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee81(id) {
|
|
15746
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee81$(_context81) {
|
|
15674
15747
|
while (1) {
|
|
15675
|
-
switch (
|
|
15748
|
+
switch (_context81.prev = _context81.next) {
|
|
15676
15749
|
case 0:
|
|
15677
15750
|
this.validateServerSideAuth();
|
|
15678
|
-
return
|
|
15751
|
+
return _context81.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
|
|
15679
15752
|
|
|
15680
15753
|
case 2:
|
|
15681
15754
|
case "end":
|
|
15682
|
-
return
|
|
15755
|
+
return _context81.stop();
|
|
15683
15756
|
}
|
|
15684
15757
|
}
|
|
15685
|
-
},
|
|
15758
|
+
}, _callee81, this);
|
|
15686
15759
|
}));
|
|
15687
15760
|
|
|
15688
|
-
function getCampaign(
|
|
15761
|
+
function getCampaign(_x117) {
|
|
15689
15762
|
return _getCampaign.apply(this, arguments);
|
|
15690
15763
|
}
|
|
15691
15764
|
|
|
@@ -15694,26 +15767,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15694
15767
|
}, {
|
|
15695
15768
|
key: "startCampaign",
|
|
15696
15769
|
value: function () {
|
|
15697
|
-
var _startCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15698
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15770
|
+
var _startCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee82(id, options) {
|
|
15771
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee82$(_context82) {
|
|
15699
15772
|
while (1) {
|
|
15700
|
-
switch (
|
|
15773
|
+
switch (_context82.prev = _context82.next) {
|
|
15701
15774
|
case 0:
|
|
15702
15775
|
this.validateServerSideAuth();
|
|
15703
|
-
return
|
|
15776
|
+
return _context82.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/start"), {
|
|
15704
15777
|
scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
|
|
15705
15778
|
stop_at: options === null || options === void 0 ? void 0 : options.stopAt
|
|
15706
15779
|
}));
|
|
15707
15780
|
|
|
15708
15781
|
case 2:
|
|
15709
15782
|
case "end":
|
|
15710
|
-
return
|
|
15783
|
+
return _context82.stop();
|
|
15711
15784
|
}
|
|
15712
15785
|
}
|
|
15713
|
-
},
|
|
15786
|
+
}, _callee82, this);
|
|
15714
15787
|
}));
|
|
15715
15788
|
|
|
15716
|
-
function startCampaign(
|
|
15789
|
+
function startCampaign(_x118, _x119) {
|
|
15717
15790
|
return _startCampaign.apply(this, arguments);
|
|
15718
15791
|
}
|
|
15719
15792
|
|
|
@@ -15729,30 +15802,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15729
15802
|
}, {
|
|
15730
15803
|
key: "queryCampaigns",
|
|
15731
15804
|
value: function () {
|
|
15732
|
-
var _queryCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15733
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15805
|
+
var _queryCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee83(filter, sort, options) {
|
|
15806
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee83$(_context83) {
|
|
15734
15807
|
while (1) {
|
|
15735
|
-
switch (
|
|
15808
|
+
switch (_context83.prev = _context83.next) {
|
|
15736
15809
|
case 0:
|
|
15737
15810
|
this.validateServerSideAuth();
|
|
15738
|
-
|
|
15811
|
+
_context83.next = 3;
|
|
15739
15812
|
return this.post(this.baseURL + "/campaigns/query", _objectSpread({
|
|
15740
15813
|
filter: filter,
|
|
15741
15814
|
sort: sort
|
|
15742
15815
|
}, options || {}));
|
|
15743
15816
|
|
|
15744
15817
|
case 3:
|
|
15745
|
-
return
|
|
15818
|
+
return _context83.abrupt("return", _context83.sent);
|
|
15746
15819
|
|
|
15747
15820
|
case 4:
|
|
15748
15821
|
case "end":
|
|
15749
|
-
return
|
|
15822
|
+
return _context83.stop();
|
|
15750
15823
|
}
|
|
15751
15824
|
}
|
|
15752
|
-
},
|
|
15825
|
+
}, _callee83, this);
|
|
15753
15826
|
}));
|
|
15754
15827
|
|
|
15755
|
-
function queryCampaigns(
|
|
15828
|
+
function queryCampaigns(_x120, _x121, _x122) {
|
|
15756
15829
|
return _queryCampaigns.apply(this, arguments);
|
|
15757
15830
|
}
|
|
15758
15831
|
|
|
@@ -15770,23 +15843,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15770
15843
|
}, {
|
|
15771
15844
|
key: "updateCampaign",
|
|
15772
15845
|
value: function () {
|
|
15773
|
-
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15774
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15846
|
+
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee84(id, params) {
|
|
15847
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee84$(_context84) {
|
|
15775
15848
|
while (1) {
|
|
15776
|
-
switch (
|
|
15849
|
+
switch (_context84.prev = _context84.next) {
|
|
15777
15850
|
case 0:
|
|
15778
15851
|
this.validateServerSideAuth();
|
|
15779
|
-
return
|
|
15852
|
+
return _context84.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(encodeURIComponent(id)), params));
|
|
15780
15853
|
|
|
15781
15854
|
case 2:
|
|
15782
15855
|
case "end":
|
|
15783
|
-
return
|
|
15856
|
+
return _context84.stop();
|
|
15784
15857
|
}
|
|
15785
15858
|
}
|
|
15786
|
-
},
|
|
15859
|
+
}, _callee84, this);
|
|
15787
15860
|
}));
|
|
15788
15861
|
|
|
15789
|
-
function updateCampaign(
|
|
15862
|
+
function updateCampaign(_x123, _x124) {
|
|
15790
15863
|
return _updateCampaign.apply(this, arguments);
|
|
15791
15864
|
}
|
|
15792
15865
|
|
|
@@ -15803,23 +15876,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15803
15876
|
}, {
|
|
15804
15877
|
key: "deleteCampaign",
|
|
15805
15878
|
value: function () {
|
|
15806
|
-
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15807
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15879
|
+
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee85(id) {
|
|
15880
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee85$(_context85) {
|
|
15808
15881
|
while (1) {
|
|
15809
|
-
switch (
|
|
15882
|
+
switch (_context85.prev = _context85.next) {
|
|
15810
15883
|
case 0:
|
|
15811
15884
|
this.validateServerSideAuth();
|
|
15812
|
-
return
|
|
15885
|
+
return _context85.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
|
|
15813
15886
|
|
|
15814
15887
|
case 2:
|
|
15815
15888
|
case "end":
|
|
15816
|
-
return
|
|
15889
|
+
return _context85.stop();
|
|
15817
15890
|
}
|
|
15818
15891
|
}
|
|
15819
|
-
},
|
|
15892
|
+
}, _callee85, this);
|
|
15820
15893
|
}));
|
|
15821
15894
|
|
|
15822
|
-
function deleteCampaign(
|
|
15895
|
+
function deleteCampaign(_x125) {
|
|
15823
15896
|
return _deleteCampaign.apply(this, arguments);
|
|
15824
15897
|
}
|
|
15825
15898
|
|
|
@@ -15836,23 +15909,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15836
15909
|
}, {
|
|
15837
15910
|
key: "stopCampaign",
|
|
15838
15911
|
value: function () {
|
|
15839
|
-
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15840
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15912
|
+
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee86(id) {
|
|
15913
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee86$(_context86) {
|
|
15841
15914
|
while (1) {
|
|
15842
|
-
switch (
|
|
15915
|
+
switch (_context86.prev = _context86.next) {
|
|
15843
15916
|
case 0:
|
|
15844
15917
|
this.validateServerSideAuth();
|
|
15845
|
-
return
|
|
15918
|
+
return _context86.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/stop")));
|
|
15846
15919
|
|
|
15847
15920
|
case 2:
|
|
15848
15921
|
case "end":
|
|
15849
|
-
return
|
|
15922
|
+
return _context86.stop();
|
|
15850
15923
|
}
|
|
15851
15924
|
}
|
|
15852
|
-
},
|
|
15925
|
+
}, _callee86, this);
|
|
15853
15926
|
}));
|
|
15854
15927
|
|
|
15855
|
-
function stopCampaign(
|
|
15928
|
+
function stopCampaign(_x126) {
|
|
15856
15929
|
return _stopCampaign.apply(this, arguments);
|
|
15857
15930
|
}
|
|
15858
15931
|
|
|
@@ -15868,24 +15941,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15868
15941
|
}, {
|
|
15869
15942
|
key: "enrichURL",
|
|
15870
15943
|
value: function () {
|
|
15871
|
-
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15872
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15944
|
+
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee87(url) {
|
|
15945
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee87$(_context87) {
|
|
15873
15946
|
while (1) {
|
|
15874
|
-
switch (
|
|
15947
|
+
switch (_context87.prev = _context87.next) {
|
|
15875
15948
|
case 0:
|
|
15876
|
-
return
|
|
15949
|
+
return _context87.abrupt("return", this.get(this.baseURL + "/og", {
|
|
15877
15950
|
url: url
|
|
15878
15951
|
}));
|
|
15879
15952
|
|
|
15880
15953
|
case 1:
|
|
15881
15954
|
case "end":
|
|
15882
|
-
return
|
|
15955
|
+
return _context87.stop();
|
|
15883
15956
|
}
|
|
15884
15957
|
}
|
|
15885
|
-
},
|
|
15958
|
+
}, _callee87, this);
|
|
15886
15959
|
}));
|
|
15887
15960
|
|
|
15888
|
-
function enrichURL(
|
|
15961
|
+
function enrichURL(_x127) {
|
|
15889
15962
|
return _enrichURL.apply(this, arguments);
|
|
15890
15963
|
}
|
|
15891
15964
|
|
|
@@ -15902,22 +15975,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15902
15975
|
}, {
|
|
15903
15976
|
key: "getTask",
|
|
15904
15977
|
value: function () {
|
|
15905
|
-
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15906
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15978
|
+
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee88(id) {
|
|
15979
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee88$(_context88) {
|
|
15907
15980
|
while (1) {
|
|
15908
|
-
switch (
|
|
15981
|
+
switch (_context88.prev = _context88.next) {
|
|
15909
15982
|
case 0:
|
|
15910
|
-
return
|
|
15983
|
+
return _context88.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(encodeURIComponent(id))));
|
|
15911
15984
|
|
|
15912
15985
|
case 1:
|
|
15913
15986
|
case "end":
|
|
15914
|
-
return
|
|
15987
|
+
return _context88.stop();
|
|
15915
15988
|
}
|
|
15916
15989
|
}
|
|
15917
|
-
},
|
|
15990
|
+
}, _callee88, this);
|
|
15918
15991
|
}));
|
|
15919
15992
|
|
|
15920
|
-
function getTask(
|
|
15993
|
+
function getTask(_x128) {
|
|
15921
15994
|
return _getTask.apply(this, arguments);
|
|
15922
15995
|
}
|
|
15923
15996
|
|
|
@@ -15935,31 +16008,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15935
16008
|
}, {
|
|
15936
16009
|
key: "deleteChannels",
|
|
15937
16010
|
value: function () {
|
|
15938
|
-
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16011
|
+
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee89(cids) {
|
|
15939
16012
|
var options,
|
|
15940
|
-
|
|
15941
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16013
|
+
_args89 = arguments;
|
|
16014
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee89$(_context89) {
|
|
15942
16015
|
while (1) {
|
|
15943
|
-
switch (
|
|
16016
|
+
switch (_context89.prev = _context89.next) {
|
|
15944
16017
|
case 0:
|
|
15945
|
-
options =
|
|
15946
|
-
|
|
16018
|
+
options = _args89.length > 1 && _args89[1] !== undefined ? _args89[1] : {};
|
|
16019
|
+
_context89.next = 3;
|
|
15947
16020
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
15948
16021
|
cids: cids
|
|
15949
16022
|
}, options));
|
|
15950
16023
|
|
|
15951
16024
|
case 3:
|
|
15952
|
-
return
|
|
16025
|
+
return _context89.abrupt("return", _context89.sent);
|
|
15953
16026
|
|
|
15954
16027
|
case 4:
|
|
15955
16028
|
case "end":
|
|
15956
|
-
return
|
|
16029
|
+
return _context89.stop();
|
|
15957
16030
|
}
|
|
15958
16031
|
}
|
|
15959
|
-
},
|
|
16032
|
+
}, _callee89, this);
|
|
15960
16033
|
}));
|
|
15961
16034
|
|
|
15962
|
-
function deleteChannels(
|
|
16035
|
+
function deleteChannels(_x129) {
|
|
15963
16036
|
return _deleteChannels.apply(this, arguments);
|
|
15964
16037
|
}
|
|
15965
16038
|
|
|
@@ -15977,17 +16050,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15977
16050
|
}, {
|
|
15978
16051
|
key: "deleteUsers",
|
|
15979
16052
|
value: function () {
|
|
15980
|
-
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16053
|
+
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee90(user_ids) {
|
|
15981
16054
|
var options,
|
|
15982
|
-
|
|
15983
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16055
|
+
_args90 = arguments;
|
|
16056
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee90$(_context90) {
|
|
15984
16057
|
while (1) {
|
|
15985
|
-
switch (
|
|
16058
|
+
switch (_context90.prev = _context90.next) {
|
|
15986
16059
|
case 0:
|
|
15987
|
-
options =
|
|
16060
|
+
options = _args90.length > 1 && _args90[1] !== undefined ? _args90[1] : {};
|
|
15988
16061
|
|
|
15989
16062
|
if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
|
|
15990
|
-
|
|
16063
|
+
_context90.next = 3;
|
|
15991
16064
|
break;
|
|
15992
16065
|
}
|
|
15993
16066
|
|
|
@@ -15995,7 +16068,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15995
16068
|
|
|
15996
16069
|
case 3:
|
|
15997
16070
|
if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
|
|
15998
|
-
|
|
16071
|
+
_context90.next = 5;
|
|
15999
16072
|
break;
|
|
16000
16073
|
}
|
|
16001
16074
|
|
|
@@ -16003,30 +16076,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16003
16076
|
|
|
16004
16077
|
case 5:
|
|
16005
16078
|
if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
|
|
16006
|
-
|
|
16079
|
+
_context90.next = 7;
|
|
16007
16080
|
break;
|
|
16008
16081
|
}
|
|
16009
16082
|
|
|
16010
16083
|
throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
|
|
16011
16084
|
|
|
16012
16085
|
case 7:
|
|
16013
|
-
|
|
16086
|
+
_context90.next = 9;
|
|
16014
16087
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
16015
16088
|
user_ids: user_ids
|
|
16016
16089
|
}, options));
|
|
16017
16090
|
|
|
16018
16091
|
case 9:
|
|
16019
|
-
return
|
|
16092
|
+
return _context90.abrupt("return", _context90.sent);
|
|
16020
16093
|
|
|
16021
16094
|
case 10:
|
|
16022
16095
|
case "end":
|
|
16023
|
-
return
|
|
16096
|
+
return _context90.stop();
|
|
16024
16097
|
}
|
|
16025
16098
|
}
|
|
16026
|
-
},
|
|
16099
|
+
}, _callee90, this);
|
|
16027
16100
|
}));
|
|
16028
16101
|
|
|
16029
|
-
function deleteUsers(
|
|
16102
|
+
function deleteUsers(_x130) {
|
|
16030
16103
|
return _deleteUsers.apply(this, arguments);
|
|
16031
16104
|
}
|
|
16032
16105
|
|
|
@@ -16047,28 +16120,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16047
16120
|
}, {
|
|
16048
16121
|
key: "_createImportURL",
|
|
16049
16122
|
value: function () {
|
|
16050
|
-
var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16051
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16123
|
+
var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee91(filename) {
|
|
16124
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee91$(_context91) {
|
|
16052
16125
|
while (1) {
|
|
16053
|
-
switch (
|
|
16126
|
+
switch (_context91.prev = _context91.next) {
|
|
16054
16127
|
case 0:
|
|
16055
|
-
|
|
16128
|
+
_context91.next = 2;
|
|
16056
16129
|
return this.post(this.baseURL + "/import_urls", {
|
|
16057
16130
|
filename: filename
|
|
16058
16131
|
});
|
|
16059
16132
|
|
|
16060
16133
|
case 2:
|
|
16061
|
-
return
|
|
16134
|
+
return _context91.abrupt("return", _context91.sent);
|
|
16062
16135
|
|
|
16063
16136
|
case 3:
|
|
16064
16137
|
case "end":
|
|
16065
|
-
return
|
|
16138
|
+
return _context91.stop();
|
|
16066
16139
|
}
|
|
16067
16140
|
}
|
|
16068
|
-
},
|
|
16141
|
+
}, _callee91, this);
|
|
16069
16142
|
}));
|
|
16070
16143
|
|
|
16071
|
-
function _createImportURL(
|
|
16144
|
+
function _createImportURL(_x131) {
|
|
16072
16145
|
return _createImportURL2.apply(this, arguments);
|
|
16073
16146
|
}
|
|
16074
16147
|
|
|
@@ -16090,33 +16163,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16090
16163
|
}, {
|
|
16091
16164
|
key: "_createImport",
|
|
16092
16165
|
value: function () {
|
|
16093
|
-
var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16166
|
+
var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee92(path) {
|
|
16094
16167
|
var options,
|
|
16095
|
-
|
|
16096
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16168
|
+
_args92 = arguments;
|
|
16169
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee92$(_context92) {
|
|
16097
16170
|
while (1) {
|
|
16098
|
-
switch (
|
|
16171
|
+
switch (_context92.prev = _context92.next) {
|
|
16099
16172
|
case 0:
|
|
16100
|
-
options =
|
|
16173
|
+
options = _args92.length > 1 && _args92[1] !== undefined ? _args92[1] : {
|
|
16101
16174
|
mode: 'upsert'
|
|
16102
16175
|
};
|
|
16103
|
-
|
|
16176
|
+
_context92.next = 3;
|
|
16104
16177
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
16105
16178
|
path: path
|
|
16106
16179
|
}, options));
|
|
16107
16180
|
|
|
16108
16181
|
case 3:
|
|
16109
|
-
return
|
|
16182
|
+
return _context92.abrupt("return", _context92.sent);
|
|
16110
16183
|
|
|
16111
16184
|
case 4:
|
|
16112
16185
|
case "end":
|
|
16113
|
-
return
|
|
16186
|
+
return _context92.stop();
|
|
16114
16187
|
}
|
|
16115
16188
|
}
|
|
16116
|
-
},
|
|
16189
|
+
}, _callee92, this);
|
|
16117
16190
|
}));
|
|
16118
16191
|
|
|
16119
|
-
function _createImport(
|
|
16192
|
+
function _createImport(_x132) {
|
|
16120
16193
|
return _createImport2.apply(this, arguments);
|
|
16121
16194
|
}
|
|
16122
16195
|
|
|
@@ -16138,26 +16211,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16138
16211
|
}, {
|
|
16139
16212
|
key: "_getImport",
|
|
16140
16213
|
value: function () {
|
|
16141
|
-
var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16142
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16214
|
+
var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee93(id) {
|
|
16215
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee93$(_context93) {
|
|
16143
16216
|
while (1) {
|
|
16144
|
-
switch (
|
|
16217
|
+
switch (_context93.prev = _context93.next) {
|
|
16145
16218
|
case 0:
|
|
16146
|
-
|
|
16219
|
+
_context93.next = 2;
|
|
16147
16220
|
return this.get(this.baseURL + "/imports/".concat(encodeURIComponent(id)));
|
|
16148
16221
|
|
|
16149
16222
|
case 2:
|
|
16150
|
-
return
|
|
16223
|
+
return _context93.abrupt("return", _context93.sent);
|
|
16151
16224
|
|
|
16152
16225
|
case 3:
|
|
16153
16226
|
case "end":
|
|
16154
|
-
return
|
|
16227
|
+
return _context93.stop();
|
|
16155
16228
|
}
|
|
16156
16229
|
}
|
|
16157
|
-
},
|
|
16230
|
+
}, _callee93, this);
|
|
16158
16231
|
}));
|
|
16159
16232
|
|
|
16160
|
-
function _getImport(
|
|
16233
|
+
function _getImport(_x133) {
|
|
16161
16234
|
return _getImport2.apply(this, arguments);
|
|
16162
16235
|
}
|
|
16163
16236
|
|
|
@@ -16179,26 +16252,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16179
16252
|
}, {
|
|
16180
16253
|
key: "_listImports",
|
|
16181
16254
|
value: function () {
|
|
16182
|
-
var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16183
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16255
|
+
var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee94(options) {
|
|
16256
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee94$(_context94) {
|
|
16184
16257
|
while (1) {
|
|
16185
|
-
switch (
|
|
16258
|
+
switch (_context94.prev = _context94.next) {
|
|
16186
16259
|
case 0:
|
|
16187
|
-
|
|
16260
|
+
_context94.next = 2;
|
|
16188
16261
|
return this.get(this.baseURL + "/imports", options);
|
|
16189
16262
|
|
|
16190
16263
|
case 2:
|
|
16191
|
-
return
|
|
16264
|
+
return _context94.abrupt("return", _context94.sent);
|
|
16192
16265
|
|
|
16193
16266
|
case 3:
|
|
16194
16267
|
case "end":
|
|
16195
|
-
return
|
|
16268
|
+
return _context94.stop();
|
|
16196
16269
|
}
|
|
16197
16270
|
}
|
|
16198
|
-
},
|
|
16271
|
+
}, _callee94, this);
|
|
16199
16272
|
}));
|
|
16200
16273
|
|
|
16201
|
-
function _listImports(
|
|
16274
|
+
function _listImports(_x134) {
|
|
16202
16275
|
return _listImports2.apply(this, arguments);
|
|
16203
16276
|
}
|
|
16204
16277
|
|
|
@@ -16217,28 +16290,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16217
16290
|
}, {
|
|
16218
16291
|
key: "upsertPushProvider",
|
|
16219
16292
|
value: function () {
|
|
16220
|
-
var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16221
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16293
|
+
var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee95(pushProvider) {
|
|
16294
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee95$(_context95) {
|
|
16222
16295
|
while (1) {
|
|
16223
|
-
switch (
|
|
16296
|
+
switch (_context95.prev = _context95.next) {
|
|
16224
16297
|
case 0:
|
|
16225
|
-
|
|
16298
|
+
_context95.next = 2;
|
|
16226
16299
|
return this.post(this.baseURL + "/push_providers", {
|
|
16227
16300
|
push_provider: pushProvider
|
|
16228
16301
|
});
|
|
16229
16302
|
|
|
16230
16303
|
case 2:
|
|
16231
|
-
return
|
|
16304
|
+
return _context95.abrupt("return", _context95.sent);
|
|
16232
16305
|
|
|
16233
16306
|
case 3:
|
|
16234
16307
|
case "end":
|
|
16235
|
-
return
|
|
16308
|
+
return _context95.stop();
|
|
16236
16309
|
}
|
|
16237
16310
|
}
|
|
16238
|
-
},
|
|
16311
|
+
}, _callee95, this);
|
|
16239
16312
|
}));
|
|
16240
16313
|
|
|
16241
|
-
function upsertPushProvider(
|
|
16314
|
+
function upsertPushProvider(_x135) {
|
|
16242
16315
|
return _upsertPushProvider.apply(this, arguments);
|
|
16243
16316
|
}
|
|
16244
16317
|
|
|
@@ -16257,28 +16330,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16257
16330
|
}, {
|
|
16258
16331
|
key: "deletePushProvider",
|
|
16259
16332
|
value: function () {
|
|
16260
|
-
var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16333
|
+
var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee96(_ref10) {
|
|
16261
16334
|
var type, name;
|
|
16262
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16335
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee96$(_context96) {
|
|
16263
16336
|
while (1) {
|
|
16264
|
-
switch (
|
|
16337
|
+
switch (_context96.prev = _context96.next) {
|
|
16265
16338
|
case 0:
|
|
16266
16339
|
type = _ref10.type, name = _ref10.name;
|
|
16267
|
-
|
|
16340
|
+
_context96.next = 3;
|
|
16268
16341
|
return this.delete(this.baseURL + "/push_providers/".concat(encodeURIComponent(type), "/").concat(encodeURIComponent(name)));
|
|
16269
16342
|
|
|
16270
16343
|
case 3:
|
|
16271
|
-
return
|
|
16344
|
+
return _context96.abrupt("return", _context96.sent);
|
|
16272
16345
|
|
|
16273
16346
|
case 4:
|
|
16274
16347
|
case "end":
|
|
16275
|
-
return
|
|
16348
|
+
return _context96.stop();
|
|
16276
16349
|
}
|
|
16277
16350
|
}
|
|
16278
|
-
},
|
|
16351
|
+
}, _callee96, this);
|
|
16279
16352
|
}));
|
|
16280
16353
|
|
|
16281
|
-
function deletePushProvider(
|
|
16354
|
+
function deletePushProvider(_x136) {
|
|
16282
16355
|
return _deletePushProvider.apply(this, arguments);
|
|
16283
16356
|
}
|
|
16284
16357
|
|
|
@@ -16295,23 +16368,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16295
16368
|
}, {
|
|
16296
16369
|
key: "listPushProviders",
|
|
16297
16370
|
value: function () {
|
|
16298
|
-
var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16299
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16371
|
+
var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee97() {
|
|
16372
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee97$(_context97) {
|
|
16300
16373
|
while (1) {
|
|
16301
|
-
switch (
|
|
16374
|
+
switch (_context97.prev = _context97.next) {
|
|
16302
16375
|
case 0:
|
|
16303
|
-
|
|
16376
|
+
_context97.next = 2;
|
|
16304
16377
|
return this.get(this.baseURL + "/push_providers");
|
|
16305
16378
|
|
|
16306
16379
|
case 2:
|
|
16307
|
-
return
|
|
16380
|
+
return _context97.abrupt("return", _context97.sent);
|
|
16308
16381
|
|
|
16309
16382
|
case 3:
|
|
16310
16383
|
case "end":
|
|
16311
|
-
return
|
|
16384
|
+
return _context97.stop();
|
|
16312
16385
|
}
|
|
16313
16386
|
}
|
|
16314
|
-
},
|
|
16387
|
+
}, _callee97, this);
|
|
16315
16388
|
}));
|
|
16316
16389
|
|
|
16317
16390
|
function listPushProviders() {
|
|
@@ -16339,26 +16412,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16339
16412
|
}, {
|
|
16340
16413
|
key: "commitMessage",
|
|
16341
16414
|
value: function () {
|
|
16342
|
-
var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16343
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16415
|
+
var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee98(id) {
|
|
16416
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee98$(_context98) {
|
|
16344
16417
|
while (1) {
|
|
16345
|
-
switch (
|
|
16418
|
+
switch (_context98.prev = _context98.next) {
|
|
16346
16419
|
case 0:
|
|
16347
|
-
|
|
16420
|
+
_context98.next = 2;
|
|
16348
16421
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(id), "/commit"));
|
|
16349
16422
|
|
|
16350
16423
|
case 2:
|
|
16351
|
-
return
|
|
16424
|
+
return _context98.abrupt("return", _context98.sent);
|
|
16352
16425
|
|
|
16353
16426
|
case 3:
|
|
16354
16427
|
case "end":
|
|
16355
|
-
return
|
|
16428
|
+
return _context98.stop();
|
|
16356
16429
|
}
|
|
16357
16430
|
}
|
|
16358
|
-
},
|
|
16431
|
+
}, _callee98, this);
|
|
16359
16432
|
}));
|
|
16360
16433
|
|
|
16361
|
-
function commitMessage(
|
|
16434
|
+
function commitMessage(_x137) {
|
|
16362
16435
|
return _commitMessage.apply(this, arguments);
|
|
16363
16436
|
}
|
|
16364
16437
|
|
|
@@ -16374,28 +16447,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16374
16447
|
}, {
|
|
16375
16448
|
key: "createPoll",
|
|
16376
16449
|
value: function () {
|
|
16377
|
-
var _createPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16378
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16450
|
+
var _createPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee99(poll, userId) {
|
|
16451
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee99$(_context99) {
|
|
16379
16452
|
while (1) {
|
|
16380
|
-
switch (
|
|
16453
|
+
switch (_context99.prev = _context99.next) {
|
|
16381
16454
|
case 0:
|
|
16382
|
-
|
|
16455
|
+
_context99.next = 2;
|
|
16383
16456
|
return this.post(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
|
|
16384
16457
|
user_id: userId
|
|
16385
16458
|
} : {}));
|
|
16386
16459
|
|
|
16387
16460
|
case 2:
|
|
16388
|
-
return
|
|
16461
|
+
return _context99.abrupt("return", _context99.sent);
|
|
16389
16462
|
|
|
16390
16463
|
case 3:
|
|
16391
16464
|
case "end":
|
|
16392
|
-
return
|
|
16465
|
+
return _context99.stop();
|
|
16393
16466
|
}
|
|
16394
16467
|
}
|
|
16395
|
-
},
|
|
16468
|
+
}, _callee99, this);
|
|
16396
16469
|
}));
|
|
16397
16470
|
|
|
16398
|
-
function createPoll(
|
|
16471
|
+
function createPoll(_x138, _x139) {
|
|
16399
16472
|
return _createPoll.apply(this, arguments);
|
|
16400
16473
|
}
|
|
16401
16474
|
|
|
@@ -16411,28 +16484,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16411
16484
|
}, {
|
|
16412
16485
|
key: "getPoll",
|
|
16413
16486
|
value: function () {
|
|
16414
|
-
var _getPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16415
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16487
|
+
var _getPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee100(id, userId) {
|
|
16488
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee100$(_context100) {
|
|
16416
16489
|
while (1) {
|
|
16417
|
-
switch (
|
|
16490
|
+
switch (_context100.prev = _context100.next) {
|
|
16418
16491
|
case 0:
|
|
16419
|
-
|
|
16492
|
+
_context100.next = 2;
|
|
16420
16493
|
return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(id)), userId ? {
|
|
16421
16494
|
user_id: userId
|
|
16422
16495
|
} : {});
|
|
16423
16496
|
|
|
16424
16497
|
case 2:
|
|
16425
|
-
return
|
|
16498
|
+
return _context100.abrupt("return", _context100.sent);
|
|
16426
16499
|
|
|
16427
16500
|
case 3:
|
|
16428
16501
|
case "end":
|
|
16429
|
-
return
|
|
16502
|
+
return _context100.stop();
|
|
16430
16503
|
}
|
|
16431
16504
|
}
|
|
16432
|
-
},
|
|
16505
|
+
}, _callee100, this);
|
|
16433
16506
|
}));
|
|
16434
16507
|
|
|
16435
|
-
function getPoll(
|
|
16508
|
+
function getPoll(_x140, _x141) {
|
|
16436
16509
|
return _getPoll.apply(this, arguments);
|
|
16437
16510
|
}
|
|
16438
16511
|
|
|
@@ -16448,28 +16521,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16448
16521
|
}, {
|
|
16449
16522
|
key: "updatePoll",
|
|
16450
16523
|
value: function () {
|
|
16451
|
-
var _updatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16452
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16524
|
+
var _updatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee101(poll, userId) {
|
|
16525
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee101$(_context101) {
|
|
16453
16526
|
while (1) {
|
|
16454
|
-
switch (
|
|
16527
|
+
switch (_context101.prev = _context101.next) {
|
|
16455
16528
|
case 0:
|
|
16456
|
-
|
|
16529
|
+
_context101.next = 2;
|
|
16457
16530
|
return this.put(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
|
|
16458
16531
|
user_id: userId
|
|
16459
16532
|
} : {}));
|
|
16460
16533
|
|
|
16461
16534
|
case 2:
|
|
16462
|
-
return
|
|
16535
|
+
return _context101.abrupt("return", _context101.sent);
|
|
16463
16536
|
|
|
16464
16537
|
case 3:
|
|
16465
16538
|
case "end":
|
|
16466
|
-
return
|
|
16539
|
+
return _context101.stop();
|
|
16467
16540
|
}
|
|
16468
16541
|
}
|
|
16469
|
-
},
|
|
16542
|
+
}, _callee101, this);
|
|
16470
16543
|
}));
|
|
16471
16544
|
|
|
16472
|
-
function updatePoll(
|
|
16545
|
+
function updatePoll(_x142, _x143) {
|
|
16473
16546
|
return _updatePoll.apply(this, arguments);
|
|
16474
16547
|
}
|
|
16475
16548
|
|
|
@@ -16487,28 +16560,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16487
16560
|
}, {
|
|
16488
16561
|
key: "partialUpdatePoll",
|
|
16489
16562
|
value: function () {
|
|
16490
|
-
var _partialUpdatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16491
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16563
|
+
var _partialUpdatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee102(id, partialPollObject, userId) {
|
|
16564
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee102$(_context102) {
|
|
16492
16565
|
while (1) {
|
|
16493
|
-
switch (
|
|
16566
|
+
switch (_context102.prev = _context102.next) {
|
|
16494
16567
|
case 0:
|
|
16495
|
-
|
|
16568
|
+
_context102.next = 2;
|
|
16496
16569
|
return this.patch(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread({}, partialPollObject), userId ? {
|
|
16497
16570
|
user_id: userId
|
|
16498
16571
|
} : {}));
|
|
16499
16572
|
|
|
16500
16573
|
case 2:
|
|
16501
|
-
return
|
|
16574
|
+
return _context102.abrupt("return", _context102.sent);
|
|
16502
16575
|
|
|
16503
16576
|
case 3:
|
|
16504
16577
|
case "end":
|
|
16505
|
-
return
|
|
16578
|
+
return _context102.stop();
|
|
16506
16579
|
}
|
|
16507
16580
|
}
|
|
16508
|
-
},
|
|
16581
|
+
}, _callee102, this);
|
|
16509
16582
|
}));
|
|
16510
16583
|
|
|
16511
|
-
function partialUpdatePoll(
|
|
16584
|
+
function partialUpdatePoll(_x144, _x145, _x146) {
|
|
16512
16585
|
return _partialUpdatePoll.apply(this, arguments);
|
|
16513
16586
|
}
|
|
16514
16587
|
|
|
@@ -16524,28 +16597,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16524
16597
|
}, {
|
|
16525
16598
|
key: "deletePoll",
|
|
16526
16599
|
value: function () {
|
|
16527
|
-
var _deletePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16528
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16600
|
+
var _deletePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee103(id, userId) {
|
|
16601
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee103$(_context103) {
|
|
16529
16602
|
while (1) {
|
|
16530
|
-
switch (
|
|
16603
|
+
switch (_context103.prev = _context103.next) {
|
|
16531
16604
|
case 0:
|
|
16532
|
-
|
|
16605
|
+
_context103.next = 2;
|
|
16533
16606
|
return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread({}, userId ? {
|
|
16534
16607
|
user_id: userId
|
|
16535
16608
|
} : {}));
|
|
16536
16609
|
|
|
16537
16610
|
case 2:
|
|
16538
|
-
return
|
|
16611
|
+
return _context103.abrupt("return", _context103.sent);
|
|
16539
16612
|
|
|
16540
16613
|
case 3:
|
|
16541
16614
|
case "end":
|
|
16542
|
-
return
|
|
16615
|
+
return _context103.stop();
|
|
16543
16616
|
}
|
|
16544
16617
|
}
|
|
16545
|
-
},
|
|
16618
|
+
}, _callee103, this);
|
|
16546
16619
|
}));
|
|
16547
16620
|
|
|
16548
|
-
function deletePoll(
|
|
16621
|
+
function deletePoll(_x147, _x148) {
|
|
16549
16622
|
return _deletePoll.apply(this, arguments);
|
|
16550
16623
|
}
|
|
16551
16624
|
|
|
@@ -16561,12 +16634,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16561
16634
|
}, {
|
|
16562
16635
|
key: "closePoll",
|
|
16563
16636
|
value: function () {
|
|
16564
|
-
var _closePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16565
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16637
|
+
var _closePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee104(id, userId) {
|
|
16638
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee104$(_context104) {
|
|
16566
16639
|
while (1) {
|
|
16567
|
-
switch (
|
|
16640
|
+
switch (_context104.prev = _context104.next) {
|
|
16568
16641
|
case 0:
|
|
16569
|
-
return
|
|
16642
|
+
return _context104.abrupt("return", this.partialUpdatePoll(id, {
|
|
16570
16643
|
set: {
|
|
16571
16644
|
is_closed: true
|
|
16572
16645
|
}
|
|
@@ -16574,13 +16647,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16574
16647
|
|
|
16575
16648
|
case 1:
|
|
16576
16649
|
case "end":
|
|
16577
|
-
return
|
|
16650
|
+
return _context104.stop();
|
|
16578
16651
|
}
|
|
16579
16652
|
}
|
|
16580
|
-
},
|
|
16653
|
+
}, _callee104, this);
|
|
16581
16654
|
}));
|
|
16582
16655
|
|
|
16583
|
-
function closePoll(
|
|
16656
|
+
function closePoll(_x149, _x150) {
|
|
16584
16657
|
return _closePoll.apply(this, arguments);
|
|
16585
16658
|
}
|
|
16586
16659
|
|
|
@@ -16597,28 +16670,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16597
16670
|
}, {
|
|
16598
16671
|
key: "createPollOption",
|
|
16599
16672
|
value: function () {
|
|
16600
|
-
var _createPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16601
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16673
|
+
var _createPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee105(pollId, option, userId) {
|
|
16674
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee105$(_context105) {
|
|
16602
16675
|
while (1) {
|
|
16603
|
-
switch (
|
|
16676
|
+
switch (_context105.prev = _context105.next) {
|
|
16604
16677
|
case 0:
|
|
16605
|
-
|
|
16678
|
+
_context105.next = 2;
|
|
16606
16679
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
|
|
16607
16680
|
user_id: userId
|
|
16608
16681
|
} : {}));
|
|
16609
16682
|
|
|
16610
16683
|
case 2:
|
|
16611
|
-
return
|
|
16684
|
+
return _context105.abrupt("return", _context105.sent);
|
|
16612
16685
|
|
|
16613
16686
|
case 3:
|
|
16614
16687
|
case "end":
|
|
16615
|
-
return
|
|
16688
|
+
return _context105.stop();
|
|
16616
16689
|
}
|
|
16617
16690
|
}
|
|
16618
|
-
},
|
|
16691
|
+
}, _callee105, this);
|
|
16619
16692
|
}));
|
|
16620
16693
|
|
|
16621
|
-
function createPollOption(
|
|
16694
|
+
function createPollOption(_x151, _x152, _x153) {
|
|
16622
16695
|
return _createPollOption.apply(this, arguments);
|
|
16623
16696
|
}
|
|
16624
16697
|
|
|
@@ -16635,28 +16708,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16635
16708
|
}, {
|
|
16636
16709
|
key: "getPollOption",
|
|
16637
16710
|
value: function () {
|
|
16638
|
-
var _getPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16639
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16711
|
+
var _getPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee106(pollId, optionId, userId) {
|
|
16712
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee106$(_context106) {
|
|
16640
16713
|
while (1) {
|
|
16641
|
-
switch (
|
|
16714
|
+
switch (_context106.prev = _context106.next) {
|
|
16642
16715
|
case 0:
|
|
16643
|
-
|
|
16716
|
+
_context106.next = 2;
|
|
16644
16717
|
return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
|
|
16645
16718
|
user_id: userId
|
|
16646
16719
|
} : {});
|
|
16647
16720
|
|
|
16648
16721
|
case 2:
|
|
16649
|
-
return
|
|
16722
|
+
return _context106.abrupt("return", _context106.sent);
|
|
16650
16723
|
|
|
16651
16724
|
case 3:
|
|
16652
16725
|
case "end":
|
|
16653
|
-
return
|
|
16726
|
+
return _context106.stop();
|
|
16654
16727
|
}
|
|
16655
16728
|
}
|
|
16656
|
-
},
|
|
16729
|
+
}, _callee106, this);
|
|
16657
16730
|
}));
|
|
16658
16731
|
|
|
16659
|
-
function getPollOption(
|
|
16732
|
+
function getPollOption(_x154, _x155, _x156) {
|
|
16660
16733
|
return _getPollOption.apply(this, arguments);
|
|
16661
16734
|
}
|
|
16662
16735
|
|
|
@@ -16673,28 +16746,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16673
16746
|
}, {
|
|
16674
16747
|
key: "updatePollOption",
|
|
16675
16748
|
value: function () {
|
|
16676
|
-
var _updatePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16677
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16749
|
+
var _updatePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee107(pollId, option, userId) {
|
|
16750
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee107$(_context107) {
|
|
16678
16751
|
while (1) {
|
|
16679
|
-
switch (
|
|
16752
|
+
switch (_context107.prev = _context107.next) {
|
|
16680
16753
|
case 0:
|
|
16681
|
-
|
|
16754
|
+
_context107.next = 2;
|
|
16682
16755
|
return this.put(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
|
|
16683
16756
|
user_id: userId
|
|
16684
16757
|
} : {}));
|
|
16685
16758
|
|
|
16686
16759
|
case 2:
|
|
16687
|
-
return
|
|
16760
|
+
return _context107.abrupt("return", _context107.sent);
|
|
16688
16761
|
|
|
16689
16762
|
case 3:
|
|
16690
16763
|
case "end":
|
|
16691
|
-
return
|
|
16764
|
+
return _context107.stop();
|
|
16692
16765
|
}
|
|
16693
16766
|
}
|
|
16694
|
-
},
|
|
16767
|
+
}, _callee107, this);
|
|
16695
16768
|
}));
|
|
16696
16769
|
|
|
16697
|
-
function updatePollOption(
|
|
16770
|
+
function updatePollOption(_x157, _x158, _x159) {
|
|
16698
16771
|
return _updatePollOption.apply(this, arguments);
|
|
16699
16772
|
}
|
|
16700
16773
|
|
|
@@ -16711,28 +16784,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16711
16784
|
}, {
|
|
16712
16785
|
key: "deletePollOption",
|
|
16713
16786
|
value: function () {
|
|
16714
|
-
var _deletePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16715
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16787
|
+
var _deletePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee108(pollId, optionId, userId) {
|
|
16788
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee108$(_context108) {
|
|
16716
16789
|
while (1) {
|
|
16717
|
-
switch (
|
|
16790
|
+
switch (_context108.prev = _context108.next) {
|
|
16718
16791
|
case 0:
|
|
16719
|
-
|
|
16792
|
+
_context108.next = 2;
|
|
16720
16793
|
return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
|
|
16721
16794
|
user_id: userId
|
|
16722
16795
|
} : {});
|
|
16723
16796
|
|
|
16724
16797
|
case 2:
|
|
16725
|
-
return
|
|
16798
|
+
return _context108.abrupt("return", _context108.sent);
|
|
16726
16799
|
|
|
16727
16800
|
case 3:
|
|
16728
16801
|
case "end":
|
|
16729
|
-
return
|
|
16802
|
+
return _context108.stop();
|
|
16730
16803
|
}
|
|
16731
16804
|
}
|
|
16732
|
-
},
|
|
16805
|
+
}, _callee108, this);
|
|
16733
16806
|
}));
|
|
16734
16807
|
|
|
16735
|
-
function deletePollOption(
|
|
16808
|
+
function deletePollOption(_x160, _x161, _x162) {
|
|
16736
16809
|
return _deletePollOption.apply(this, arguments);
|
|
16737
16810
|
}
|
|
16738
16811
|
|
|
@@ -16750,12 +16823,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16750
16823
|
}, {
|
|
16751
16824
|
key: "castPollVote",
|
|
16752
16825
|
value: function () {
|
|
16753
|
-
var _castPollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16754
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16826
|
+
var _castPollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee109(messageId, pollId, vote, userId) {
|
|
16827
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee109$(_context109) {
|
|
16755
16828
|
while (1) {
|
|
16756
|
-
switch (
|
|
16829
|
+
switch (_context109.prev = _context109.next) {
|
|
16757
16830
|
case 0:
|
|
16758
|
-
|
|
16831
|
+
_context109.next = 2;
|
|
16759
16832
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote"), _objectSpread({
|
|
16760
16833
|
vote: vote
|
|
16761
16834
|
}, userId ? {
|
|
@@ -16763,17 +16836,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16763
16836
|
} : {}));
|
|
16764
16837
|
|
|
16765
16838
|
case 2:
|
|
16766
|
-
return
|
|
16839
|
+
return _context109.abrupt("return", _context109.sent);
|
|
16767
16840
|
|
|
16768
16841
|
case 3:
|
|
16769
16842
|
case "end":
|
|
16770
|
-
return
|
|
16843
|
+
return _context109.stop();
|
|
16771
16844
|
}
|
|
16772
16845
|
}
|
|
16773
|
-
},
|
|
16846
|
+
}, _callee109, this);
|
|
16774
16847
|
}));
|
|
16775
16848
|
|
|
16776
|
-
function castPollVote(
|
|
16849
|
+
function castPollVote(_x163, _x164, _x165, _x166) {
|
|
16777
16850
|
return _castPollVote.apply(this, arguments);
|
|
16778
16851
|
}
|
|
16779
16852
|
|
|
@@ -16790,24 +16863,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16790
16863
|
}, {
|
|
16791
16864
|
key: "addPollAnswer",
|
|
16792
16865
|
value: function () {
|
|
16793
|
-
var _addPollAnswer = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16794
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16866
|
+
var _addPollAnswer = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee110(messageId, pollId, answerText, userId) {
|
|
16867
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee110$(_context110) {
|
|
16795
16868
|
while (1) {
|
|
16796
|
-
switch (
|
|
16869
|
+
switch (_context110.prev = _context110.next) {
|
|
16797
16870
|
case 0:
|
|
16798
|
-
return
|
|
16871
|
+
return _context110.abrupt("return", this.castPollVote(messageId, pollId, {
|
|
16799
16872
|
answer_text: answerText
|
|
16800
16873
|
}, userId));
|
|
16801
16874
|
|
|
16802
16875
|
case 1:
|
|
16803
16876
|
case "end":
|
|
16804
|
-
return
|
|
16877
|
+
return _context110.stop();
|
|
16805
16878
|
}
|
|
16806
16879
|
}
|
|
16807
|
-
},
|
|
16880
|
+
}, _callee110, this);
|
|
16808
16881
|
}));
|
|
16809
16882
|
|
|
16810
|
-
function addPollAnswer(
|
|
16883
|
+
function addPollAnswer(_x167, _x168, _x169, _x170) {
|
|
16811
16884
|
return _addPollAnswer.apply(this, arguments);
|
|
16812
16885
|
}
|
|
16813
16886
|
|
|
@@ -16816,28 +16889,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16816
16889
|
}, {
|
|
16817
16890
|
key: "removePollVote",
|
|
16818
16891
|
value: function () {
|
|
16819
|
-
var _removePollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16820
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16892
|
+
var _removePollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee111(messageId, pollId, voteId, userId) {
|
|
16893
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee111$(_context111) {
|
|
16821
16894
|
while (1) {
|
|
16822
|
-
switch (
|
|
16895
|
+
switch (_context111.prev = _context111.next) {
|
|
16823
16896
|
case 0:
|
|
16824
|
-
|
|
16897
|
+
_context111.next = 2;
|
|
16825
16898
|
return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote/").concat(encodeURIComponent(voteId)), _objectSpread({}, userId ? {
|
|
16826
16899
|
user_id: userId
|
|
16827
16900
|
} : {}));
|
|
16828
16901
|
|
|
16829
16902
|
case 2:
|
|
16830
|
-
return
|
|
16903
|
+
return _context111.abrupt("return", _context111.sent);
|
|
16831
16904
|
|
|
16832
16905
|
case 3:
|
|
16833
16906
|
case "end":
|
|
16834
|
-
return
|
|
16907
|
+
return _context111.stop();
|
|
16835
16908
|
}
|
|
16836
16909
|
}
|
|
16837
|
-
},
|
|
16910
|
+
}, _callee111, this);
|
|
16838
16911
|
}));
|
|
16839
16912
|
|
|
16840
|
-
function removePollVote(
|
|
16913
|
+
function removePollVote(_x171, _x172, _x173, _x174) {
|
|
16841
16914
|
return _removePollVote.apply(this, arguments);
|
|
16842
16915
|
}
|
|
16843
16916
|
|
|
@@ -16855,37 +16928,37 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16855
16928
|
}, {
|
|
16856
16929
|
key: "queryPolls",
|
|
16857
16930
|
value: function () {
|
|
16858
|
-
var _queryPolls = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16931
|
+
var _queryPolls = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee112() {
|
|
16859
16932
|
var filter,
|
|
16860
16933
|
sort,
|
|
16861
16934
|
options,
|
|
16862
16935
|
userId,
|
|
16863
16936
|
q,
|
|
16864
|
-
|
|
16865
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16937
|
+
_args112 = arguments;
|
|
16938
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee112$(_context112) {
|
|
16866
16939
|
while (1) {
|
|
16867
|
-
switch (
|
|
16940
|
+
switch (_context112.prev = _context112.next) {
|
|
16868
16941
|
case 0:
|
|
16869
|
-
filter =
|
|
16870
|
-
sort =
|
|
16871
|
-
options =
|
|
16872
|
-
userId =
|
|
16942
|
+
filter = _args112.length > 0 && _args112[0] !== undefined ? _args112[0] : {};
|
|
16943
|
+
sort = _args112.length > 1 && _args112[1] !== undefined ? _args112[1] : [];
|
|
16944
|
+
options = _args112.length > 2 && _args112[2] !== undefined ? _args112[2] : {};
|
|
16945
|
+
userId = _args112.length > 3 ? _args112[3] : undefined;
|
|
16873
16946
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16874
|
-
|
|
16947
|
+
_context112.next = 7;
|
|
16875
16948
|
return this.post(this.baseURL + "/polls/query".concat(q), _objectSpread({
|
|
16876
16949
|
filter: filter,
|
|
16877
16950
|
sort: normalizeQuerySort(sort)
|
|
16878
16951
|
}, options));
|
|
16879
16952
|
|
|
16880
16953
|
case 7:
|
|
16881
|
-
return
|
|
16954
|
+
return _context112.abrupt("return", _context112.sent);
|
|
16882
16955
|
|
|
16883
16956
|
case 8:
|
|
16884
16957
|
case "end":
|
|
16885
|
-
return
|
|
16958
|
+
return _context112.stop();
|
|
16886
16959
|
}
|
|
16887
16960
|
}
|
|
16888
|
-
},
|
|
16961
|
+
}, _callee112, this);
|
|
16889
16962
|
}));
|
|
16890
16963
|
|
|
16891
16964
|
function queryPolls() {
|
|
@@ -16907,40 +16980,40 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16907
16980
|
}, {
|
|
16908
16981
|
key: "queryPollVotes",
|
|
16909
16982
|
value: function () {
|
|
16910
|
-
var _queryPollVotes = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16983
|
+
var _queryPollVotes = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee113(pollId) {
|
|
16911
16984
|
var filter,
|
|
16912
16985
|
sort,
|
|
16913
16986
|
options,
|
|
16914
16987
|
userId,
|
|
16915
16988
|
q,
|
|
16916
|
-
|
|
16917
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16989
|
+
_args113 = arguments;
|
|
16990
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee113$(_context113) {
|
|
16918
16991
|
while (1) {
|
|
16919
|
-
switch (
|
|
16992
|
+
switch (_context113.prev = _context113.next) {
|
|
16920
16993
|
case 0:
|
|
16921
|
-
filter =
|
|
16922
|
-
sort =
|
|
16923
|
-
options =
|
|
16924
|
-
userId =
|
|
16994
|
+
filter = _args113.length > 1 && _args113[1] !== undefined ? _args113[1] : {};
|
|
16995
|
+
sort = _args113.length > 2 && _args113[2] !== undefined ? _args113[2] : [];
|
|
16996
|
+
options = _args113.length > 3 && _args113[3] !== undefined ? _args113[3] : {};
|
|
16997
|
+
userId = _args113.length > 4 ? _args113[4] : undefined;
|
|
16925
16998
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16926
|
-
|
|
16999
|
+
_context113.next = 7;
|
|
16927
17000
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
|
|
16928
17001
|
filter: filter,
|
|
16929
17002
|
sort: normalizeQuerySort(sort)
|
|
16930
17003
|
}, options));
|
|
16931
17004
|
|
|
16932
17005
|
case 7:
|
|
16933
|
-
return
|
|
17006
|
+
return _context113.abrupt("return", _context113.sent);
|
|
16934
17007
|
|
|
16935
17008
|
case 8:
|
|
16936
17009
|
case "end":
|
|
16937
|
-
return
|
|
17010
|
+
return _context113.stop();
|
|
16938
17011
|
}
|
|
16939
17012
|
}
|
|
16940
|
-
},
|
|
17013
|
+
}, _callee113, this);
|
|
16941
17014
|
}));
|
|
16942
17015
|
|
|
16943
|
-
function queryPollVotes(
|
|
17016
|
+
function queryPollVotes(_x175) {
|
|
16944
17017
|
return _queryPollVotes.apply(this, arguments);
|
|
16945
17018
|
}
|
|
16946
17019
|
|
|
@@ -16959,23 +17032,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16959
17032
|
}, {
|
|
16960
17033
|
key: "queryPollAnswers",
|
|
16961
17034
|
value: function () {
|
|
16962
|
-
var _queryPollAnswers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
17035
|
+
var _queryPollAnswers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee114(pollId) {
|
|
16963
17036
|
var filter,
|
|
16964
17037
|
sort,
|
|
16965
17038
|
options,
|
|
16966
17039
|
userId,
|
|
16967
17040
|
q,
|
|
16968
|
-
|
|
16969
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
17041
|
+
_args114 = arguments;
|
|
17042
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee114$(_context114) {
|
|
16970
17043
|
while (1) {
|
|
16971
|
-
switch (
|
|
17044
|
+
switch (_context114.prev = _context114.next) {
|
|
16972
17045
|
case 0:
|
|
16973
|
-
filter =
|
|
16974
|
-
sort =
|
|
16975
|
-
options =
|
|
16976
|
-
userId =
|
|
17046
|
+
filter = _args114.length > 1 && _args114[1] !== undefined ? _args114[1] : {};
|
|
17047
|
+
sort = _args114.length > 2 && _args114[2] !== undefined ? _args114[2] : [];
|
|
17048
|
+
options = _args114.length > 3 && _args114[3] !== undefined ? _args114[3] : {};
|
|
17049
|
+
userId = _args114.length > 4 ? _args114[4] : undefined;
|
|
16977
17050
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16978
|
-
|
|
17051
|
+
_context114.next = 7;
|
|
16979
17052
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
|
|
16980
17053
|
filter: _objectSpread(_objectSpread({}, filter), {}, {
|
|
16981
17054
|
is_answer: true
|
|
@@ -16984,17 +17057,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16984
17057
|
}, options));
|
|
16985
17058
|
|
|
16986
17059
|
case 7:
|
|
16987
|
-
return
|
|
17060
|
+
return _context114.abrupt("return", _context114.sent);
|
|
16988
17061
|
|
|
16989
17062
|
case 8:
|
|
16990
17063
|
case "end":
|
|
16991
|
-
return
|
|
17064
|
+
return _context114.stop();
|
|
16992
17065
|
}
|
|
16993
17066
|
}
|
|
16994
|
-
},
|
|
17067
|
+
}, _callee114, this);
|
|
16995
17068
|
}));
|
|
16996
17069
|
|
|
16997
|
-
function queryPollAnswers(
|
|
17070
|
+
function queryPollAnswers(_x176) {
|
|
16998
17071
|
return _queryPollAnswers.apply(this, arguments);
|
|
16999
17072
|
}
|
|
17000
17073
|
|
|
@@ -17011,33 +17084,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
17011
17084
|
}, {
|
|
17012
17085
|
key: "queryMessageHistory",
|
|
17013
17086
|
value: function () {
|
|
17014
|
-
var _queryMessageHistory = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
17087
|
+
var _queryMessageHistory = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee115() {
|
|
17015
17088
|
var filter,
|
|
17016
17089
|
sort,
|
|
17017
17090
|
options,
|
|
17018
|
-
|
|
17019
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
17091
|
+
_args115 = arguments;
|
|
17092
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee115$(_context115) {
|
|
17020
17093
|
while (1) {
|
|
17021
|
-
switch (
|
|
17094
|
+
switch (_context115.prev = _context115.next) {
|
|
17022
17095
|
case 0:
|
|
17023
|
-
filter =
|
|
17024
|
-
sort =
|
|
17025
|
-
options =
|
|
17026
|
-
|
|
17096
|
+
filter = _args115.length > 0 && _args115[0] !== undefined ? _args115[0] : {};
|
|
17097
|
+
sort = _args115.length > 1 && _args115[1] !== undefined ? _args115[1] : [];
|
|
17098
|
+
options = _args115.length > 2 && _args115[2] !== undefined ? _args115[2] : {};
|
|
17099
|
+
_context115.next = 5;
|
|
17027
17100
|
return this.post(this.baseURL + '/messages/history', _objectSpread({
|
|
17028
17101
|
filter: filter,
|
|
17029
17102
|
sort: normalizeQuerySort(sort)
|
|
17030
17103
|
}, options));
|
|
17031
17104
|
|
|
17032
17105
|
case 5:
|
|
17033
|
-
return
|
|
17106
|
+
return _context115.abrupt("return", _context115.sent);
|
|
17034
17107
|
|
|
17035
17108
|
case 6:
|
|
17036
17109
|
case "end":
|
|
17037
|
-
return
|
|
17110
|
+
return _context115.stop();
|
|
17038
17111
|
}
|
|
17039
17112
|
}
|
|
17040
|
-
},
|
|
17113
|
+
}, _callee115, this);
|
|
17041
17114
|
}));
|
|
17042
17115
|
|
|
17043
17116
|
function queryMessageHistory() {
|
|
@@ -17058,32 +17131,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
17058
17131
|
}, {
|
|
17059
17132
|
key: "updateFlags",
|
|
17060
17133
|
value: function () {
|
|
17061
|
-
var _updateFlags = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
17134
|
+
var _updateFlags = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee116(message_ids, reviewed_by) {
|
|
17062
17135
|
var options,
|
|
17063
|
-
|
|
17064
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
17136
|
+
_args116 = arguments;
|
|
17137
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee116$(_context116) {
|
|
17065
17138
|
while (1) {
|
|
17066
|
-
switch (
|
|
17139
|
+
switch (_context116.prev = _context116.next) {
|
|
17067
17140
|
case 0:
|
|
17068
|
-
options =
|
|
17069
|
-
|
|
17141
|
+
options = _args116.length > 2 && _args116[2] !== undefined ? _args116[2] : {};
|
|
17142
|
+
_context116.next = 3;
|
|
17070
17143
|
return this.post(this.baseURL + '/automod/v1/moderation/update_flags', _objectSpread({
|
|
17071
17144
|
message_ids: message_ids,
|
|
17072
17145
|
reviewed_by: reviewed_by
|
|
17073
17146
|
}, options));
|
|
17074
17147
|
|
|
17075
17148
|
case 3:
|
|
17076
|
-
return
|
|
17149
|
+
return _context116.abrupt("return", _context116.sent);
|
|
17077
17150
|
|
|
17078
17151
|
case 4:
|
|
17079
17152
|
case "end":
|
|
17080
|
-
return
|
|
17153
|
+
return _context116.stop();
|
|
17081
17154
|
}
|
|
17082
17155
|
}
|
|
17083
|
-
},
|
|
17156
|
+
}, _callee116, this);
|
|
17084
17157
|
}));
|
|
17085
17158
|
|
|
17086
|
-
function updateFlags(
|
|
17159
|
+
function updateFlags(_x177, _x178) {
|
|
17087
17160
|
return _updateFlags.apply(this, arguments);
|
|
17088
17161
|
}
|
|
17089
17162
|
|