stream-chat 8.33.0 → 8.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.es.js +717 -600
- 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 +717 -600
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +717 -600
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +717 -600
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/channel_state.d.ts +5 -1
- package/dist/types/channel_state.d.ts.map +1 -1
- package/dist/types/client.d.ts +4 -1
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/types.d.ts +21 -2
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +1 -0
- package/src/channel_state.ts +33 -16
- package/src/client.ts +19 -0
- package/src/types.ts +27 -2
package/dist/index.es.js
CHANGED
|
@@ -909,10 +909,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
909
909
|
|
|
910
910
|
if (parentID && !initializing) {
|
|
911
911
|
var thread = this.threads[parentID] || [];
|
|
912
|
-
|
|
913
|
-
var threadMessages = this._addToMessageList(thread, message, timestampChanged, 'created_at', addIfDoesNotExist);
|
|
914
|
-
|
|
915
|
-
this.threads[parentID] = threadMessages;
|
|
912
|
+
this.threads[parentID] = this._addToMessageList(thread, message, timestampChanged, 'created_at', addIfDoesNotExist);
|
|
916
913
|
}
|
|
917
914
|
}
|
|
918
915
|
|
|
@@ -1020,10 +1017,13 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
1020
1017
|
return messageWithReaction;
|
|
1021
1018
|
}
|
|
1022
1019
|
}, {
|
|
1023
|
-
key: "
|
|
1024
|
-
value: function
|
|
1020
|
+
key: "_updateQuotedMessageReferences",
|
|
1021
|
+
value: function _updateQuotedMessageReferences(_ref) {
|
|
1025
1022
|
var _this4 = this;
|
|
1026
1023
|
|
|
1024
|
+
var message = _ref.message,
|
|
1025
|
+
remove = _ref.remove;
|
|
1026
|
+
|
|
1027
1027
|
var parseMessage = function parseMessage(m) {
|
|
1028
1028
|
var _m$pinned_at, _m$updated_at;
|
|
1029
1029
|
|
|
@@ -1034,18 +1034,37 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
1034
1034
|
});
|
|
1035
1035
|
};
|
|
1036
1036
|
|
|
1037
|
-
|
|
1038
|
-
var updatedMessages =
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
})
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1037
|
+
var update = function update(messages) {
|
|
1038
|
+
var updatedMessages = messages.reduce(function (acc, msg) {
|
|
1039
|
+
if (msg.quoted_message_id === message.id) {
|
|
1040
|
+
acc.push(_objectSpread$7(_objectSpread$7({}, parseMessage(msg)), {}, {
|
|
1041
|
+
quoted_message: remove ? _objectSpread$7(_objectSpread$7({}, message), {}, {
|
|
1042
|
+
attachments: []
|
|
1043
|
+
}) : message
|
|
1044
|
+
}));
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
return acc;
|
|
1048
|
+
}, []);
|
|
1047
1049
|
|
|
1048
1050
|
_this4.addMessagesSorted(updatedMessages, true);
|
|
1051
|
+
};
|
|
1052
|
+
|
|
1053
|
+
if (!message.parent_id) {
|
|
1054
|
+
this.messageSets.forEach(function (set) {
|
|
1055
|
+
return update(set.messages);
|
|
1056
|
+
});
|
|
1057
|
+
} else if (message.parent_id && this.threads[message.parent_id]) {
|
|
1058
|
+
// prevent going through all the threads even though it is possible to quote a message from another thread
|
|
1059
|
+
update(this.threads[message.parent_id]);
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
}, {
|
|
1063
|
+
key: "removeQuotedMessageReferences",
|
|
1064
|
+
value: function removeQuotedMessageReferences(message) {
|
|
1065
|
+
this._updateQuotedMessageReferences({
|
|
1066
|
+
message: message,
|
|
1067
|
+
remove: true
|
|
1049
1068
|
});
|
|
1050
1069
|
}
|
|
1051
1070
|
/**
|
|
@@ -4009,6 +4028,10 @@ var Channel = /*#__PURE__*/function () {
|
|
|
4009
4028
|
|
|
4010
4029
|
channelState.addMessageSorted(event.message, false, false);
|
|
4011
4030
|
|
|
4031
|
+
channelState._updateQuotedMessageReferences({
|
|
4032
|
+
message: event.message
|
|
4033
|
+
});
|
|
4034
|
+
|
|
4012
4035
|
if (event.message.pinned) {
|
|
4013
4036
|
channelState.addPinnedMessage(event.message);
|
|
4014
4037
|
} else {
|
|
@@ -10293,6 +10316,100 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10293
10316
|
|
|
10294
10317
|
return removeShadowBan;
|
|
10295
10318
|
}()
|
|
10319
|
+
}, {
|
|
10320
|
+
key: "blockUser",
|
|
10321
|
+
value: function () {
|
|
10322
|
+
var _blockUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(blockedUserID, user_id) {
|
|
10323
|
+
return _regeneratorRuntime.wrap(function _callee43$(_context43) {
|
|
10324
|
+
while (1) {
|
|
10325
|
+
switch (_context43.prev = _context43.next) {
|
|
10326
|
+
case 0:
|
|
10327
|
+
_context43.next = 2;
|
|
10328
|
+
return this.post(this.baseURL + '/users/block', _objectSpread({
|
|
10329
|
+
blocked_user_id: blockedUserID
|
|
10330
|
+
}, user_id ? {
|
|
10331
|
+
user_id: user_id
|
|
10332
|
+
} : {}));
|
|
10333
|
+
|
|
10334
|
+
case 2:
|
|
10335
|
+
return _context43.abrupt("return", _context43.sent);
|
|
10336
|
+
|
|
10337
|
+
case 3:
|
|
10338
|
+
case "end":
|
|
10339
|
+
return _context43.stop();
|
|
10340
|
+
}
|
|
10341
|
+
}
|
|
10342
|
+
}, _callee43, this);
|
|
10343
|
+
}));
|
|
10344
|
+
|
|
10345
|
+
function blockUser(_x56, _x57) {
|
|
10346
|
+
return _blockUser.apply(this, arguments);
|
|
10347
|
+
}
|
|
10348
|
+
|
|
10349
|
+
return blockUser;
|
|
10350
|
+
}()
|
|
10351
|
+
}, {
|
|
10352
|
+
key: "getBlockedUsers",
|
|
10353
|
+
value: function () {
|
|
10354
|
+
var _getBlockedUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(user_id) {
|
|
10355
|
+
return _regeneratorRuntime.wrap(function _callee44$(_context44) {
|
|
10356
|
+
while (1) {
|
|
10357
|
+
switch (_context44.prev = _context44.next) {
|
|
10358
|
+
case 0:
|
|
10359
|
+
_context44.next = 2;
|
|
10360
|
+
return this.get(this.baseURL + '/users/block', _objectSpread({}, user_id ? {
|
|
10361
|
+
user_id: user_id
|
|
10362
|
+
} : {}));
|
|
10363
|
+
|
|
10364
|
+
case 2:
|
|
10365
|
+
return _context44.abrupt("return", _context44.sent);
|
|
10366
|
+
|
|
10367
|
+
case 3:
|
|
10368
|
+
case "end":
|
|
10369
|
+
return _context44.stop();
|
|
10370
|
+
}
|
|
10371
|
+
}
|
|
10372
|
+
}, _callee44, this);
|
|
10373
|
+
}));
|
|
10374
|
+
|
|
10375
|
+
function getBlockedUsers(_x58) {
|
|
10376
|
+
return _getBlockedUsers.apply(this, arguments);
|
|
10377
|
+
}
|
|
10378
|
+
|
|
10379
|
+
return getBlockedUsers;
|
|
10380
|
+
}()
|
|
10381
|
+
}, {
|
|
10382
|
+
key: "unBlockUser",
|
|
10383
|
+
value: function () {
|
|
10384
|
+
var _unBlockUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(blockedUserID, userID) {
|
|
10385
|
+
return _regeneratorRuntime.wrap(function _callee45$(_context45) {
|
|
10386
|
+
while (1) {
|
|
10387
|
+
switch (_context45.prev = _context45.next) {
|
|
10388
|
+
case 0:
|
|
10389
|
+
_context45.next = 2;
|
|
10390
|
+
return this.post(this.baseURL + '/users/unblock', _objectSpread({
|
|
10391
|
+
blocked_user_id: blockedUserID
|
|
10392
|
+
}, userID ? {
|
|
10393
|
+
user_id: userID
|
|
10394
|
+
} : {}));
|
|
10395
|
+
|
|
10396
|
+
case 2:
|
|
10397
|
+
return _context45.abrupt("return", _context45.sent);
|
|
10398
|
+
|
|
10399
|
+
case 3:
|
|
10400
|
+
case "end":
|
|
10401
|
+
return _context45.stop();
|
|
10402
|
+
}
|
|
10403
|
+
}
|
|
10404
|
+
}, _callee45, this);
|
|
10405
|
+
}));
|
|
10406
|
+
|
|
10407
|
+
function unBlockUser(_x59, _x60) {
|
|
10408
|
+
return _unBlockUser.apply(this, arguments);
|
|
10409
|
+
}
|
|
10410
|
+
|
|
10411
|
+
return unBlockUser;
|
|
10412
|
+
}()
|
|
10296
10413
|
/** muteUser - mutes a user
|
|
10297
10414
|
*
|
|
10298
10415
|
* @param {string} targetID
|
|
@@ -10304,15 +10421,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10304
10421
|
}, {
|
|
10305
10422
|
key: "muteUser",
|
|
10306
10423
|
value: function () {
|
|
10307
|
-
var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10424
|
+
var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(targetID, userID) {
|
|
10308
10425
|
var options,
|
|
10309
|
-
|
|
10310
|
-
return _regeneratorRuntime.wrap(function
|
|
10426
|
+
_args46 = arguments;
|
|
10427
|
+
return _regeneratorRuntime.wrap(function _callee46$(_context46) {
|
|
10311
10428
|
while (1) {
|
|
10312
|
-
switch (
|
|
10429
|
+
switch (_context46.prev = _context46.next) {
|
|
10313
10430
|
case 0:
|
|
10314
|
-
options =
|
|
10315
|
-
|
|
10431
|
+
options = _args46.length > 2 && _args46[2] !== undefined ? _args46[2] : {};
|
|
10432
|
+
_context46.next = 3;
|
|
10316
10433
|
return this.post(this.baseURL + '/moderation/mute', _objectSpread(_objectSpread({
|
|
10317
10434
|
target_id: targetID
|
|
10318
10435
|
}, userID ? {
|
|
@@ -10320,17 +10437,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10320
10437
|
} : {}), options));
|
|
10321
10438
|
|
|
10322
10439
|
case 3:
|
|
10323
|
-
return
|
|
10440
|
+
return _context46.abrupt("return", _context46.sent);
|
|
10324
10441
|
|
|
10325
10442
|
case 4:
|
|
10326
10443
|
case "end":
|
|
10327
|
-
return
|
|
10444
|
+
return _context46.stop();
|
|
10328
10445
|
}
|
|
10329
10446
|
}
|
|
10330
|
-
},
|
|
10447
|
+
}, _callee46, this);
|
|
10331
10448
|
}));
|
|
10332
10449
|
|
|
10333
|
-
function muteUser(
|
|
10450
|
+
function muteUser(_x61, _x62) {
|
|
10334
10451
|
return _muteUser.apply(this, arguments);
|
|
10335
10452
|
}
|
|
10336
10453
|
|
|
@@ -10346,12 +10463,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10346
10463
|
}, {
|
|
10347
10464
|
key: "unmuteUser",
|
|
10348
10465
|
value: function () {
|
|
10349
|
-
var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10350
|
-
return _regeneratorRuntime.wrap(function
|
|
10466
|
+
var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(targetID, currentUserID) {
|
|
10467
|
+
return _regeneratorRuntime.wrap(function _callee47$(_context47) {
|
|
10351
10468
|
while (1) {
|
|
10352
|
-
switch (
|
|
10469
|
+
switch (_context47.prev = _context47.next) {
|
|
10353
10470
|
case 0:
|
|
10354
|
-
|
|
10471
|
+
_context47.next = 2;
|
|
10355
10472
|
return this.post(this.baseURL + '/moderation/unmute', _objectSpread({
|
|
10356
10473
|
target_id: targetID
|
|
10357
10474
|
}, currentUserID ? {
|
|
@@ -10359,17 +10476,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10359
10476
|
} : {}));
|
|
10360
10477
|
|
|
10361
10478
|
case 2:
|
|
10362
|
-
return
|
|
10479
|
+
return _context47.abrupt("return", _context47.sent);
|
|
10363
10480
|
|
|
10364
10481
|
case 3:
|
|
10365
10482
|
case "end":
|
|
10366
|
-
return
|
|
10483
|
+
return _context47.stop();
|
|
10367
10484
|
}
|
|
10368
10485
|
}
|
|
10369
|
-
},
|
|
10486
|
+
}, _callee47, this);
|
|
10370
10487
|
}));
|
|
10371
10488
|
|
|
10372
|
-
function unmuteUser(
|
|
10489
|
+
function unmuteUser(_x63, _x64) {
|
|
10373
10490
|
return _unmuteUser.apply(this, arguments);
|
|
10374
10491
|
}
|
|
10375
10492
|
|
|
@@ -10404,31 +10521,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10404
10521
|
}, {
|
|
10405
10522
|
key: "flagMessage",
|
|
10406
10523
|
value: function () {
|
|
10407
|
-
var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10524
|
+
var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(targetMessageID) {
|
|
10408
10525
|
var options,
|
|
10409
|
-
|
|
10410
|
-
return _regeneratorRuntime.wrap(function
|
|
10526
|
+
_args48 = arguments;
|
|
10527
|
+
return _regeneratorRuntime.wrap(function _callee48$(_context48) {
|
|
10411
10528
|
while (1) {
|
|
10412
|
-
switch (
|
|
10529
|
+
switch (_context48.prev = _context48.next) {
|
|
10413
10530
|
case 0:
|
|
10414
|
-
options =
|
|
10415
|
-
|
|
10531
|
+
options = _args48.length > 1 && _args48[1] !== undefined ? _args48[1] : {};
|
|
10532
|
+
_context48.next = 3;
|
|
10416
10533
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
10417
10534
|
target_message_id: targetMessageID
|
|
10418
10535
|
}, options));
|
|
10419
10536
|
|
|
10420
10537
|
case 3:
|
|
10421
|
-
return
|
|
10538
|
+
return _context48.abrupt("return", _context48.sent);
|
|
10422
10539
|
|
|
10423
10540
|
case 4:
|
|
10424
10541
|
case "end":
|
|
10425
|
-
return
|
|
10542
|
+
return _context48.stop();
|
|
10426
10543
|
}
|
|
10427
10544
|
}
|
|
10428
|
-
},
|
|
10545
|
+
}, _callee48, this);
|
|
10429
10546
|
}));
|
|
10430
10547
|
|
|
10431
|
-
function flagMessage(
|
|
10548
|
+
function flagMessage(_x65) {
|
|
10432
10549
|
return _flagMessage.apply(this, arguments);
|
|
10433
10550
|
}
|
|
10434
10551
|
|
|
@@ -10444,31 +10561,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10444
10561
|
}, {
|
|
10445
10562
|
key: "flagUser",
|
|
10446
10563
|
value: function () {
|
|
10447
|
-
var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10564
|
+
var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(targetID) {
|
|
10448
10565
|
var options,
|
|
10449
|
-
|
|
10450
|
-
return _regeneratorRuntime.wrap(function
|
|
10566
|
+
_args49 = arguments;
|
|
10567
|
+
return _regeneratorRuntime.wrap(function _callee49$(_context49) {
|
|
10451
10568
|
while (1) {
|
|
10452
|
-
switch (
|
|
10569
|
+
switch (_context49.prev = _context49.next) {
|
|
10453
10570
|
case 0:
|
|
10454
|
-
options =
|
|
10455
|
-
|
|
10571
|
+
options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
|
|
10572
|
+
_context49.next = 3;
|
|
10456
10573
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
10457
10574
|
target_user_id: targetID
|
|
10458
10575
|
}, options));
|
|
10459
10576
|
|
|
10460
10577
|
case 3:
|
|
10461
|
-
return
|
|
10578
|
+
return _context49.abrupt("return", _context49.sent);
|
|
10462
10579
|
|
|
10463
10580
|
case 4:
|
|
10464
10581
|
case "end":
|
|
10465
|
-
return
|
|
10582
|
+
return _context49.stop();
|
|
10466
10583
|
}
|
|
10467
10584
|
}
|
|
10468
|
-
},
|
|
10585
|
+
}, _callee49, this);
|
|
10469
10586
|
}));
|
|
10470
10587
|
|
|
10471
|
-
function flagUser(
|
|
10588
|
+
function flagUser(_x66) {
|
|
10472
10589
|
return _flagUser.apply(this, arguments);
|
|
10473
10590
|
}
|
|
10474
10591
|
|
|
@@ -10484,31 +10601,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10484
10601
|
}, {
|
|
10485
10602
|
key: "unflagMessage",
|
|
10486
10603
|
value: function () {
|
|
10487
|
-
var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10604
|
+
var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(targetMessageID) {
|
|
10488
10605
|
var options,
|
|
10489
|
-
|
|
10490
|
-
return _regeneratorRuntime.wrap(function
|
|
10606
|
+
_args50 = arguments;
|
|
10607
|
+
return _regeneratorRuntime.wrap(function _callee50$(_context50) {
|
|
10491
10608
|
while (1) {
|
|
10492
|
-
switch (
|
|
10609
|
+
switch (_context50.prev = _context50.next) {
|
|
10493
10610
|
case 0:
|
|
10494
|
-
options =
|
|
10495
|
-
|
|
10611
|
+
options = _args50.length > 1 && _args50[1] !== undefined ? _args50[1] : {};
|
|
10612
|
+
_context50.next = 3;
|
|
10496
10613
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
10497
10614
|
target_message_id: targetMessageID
|
|
10498
10615
|
}, options));
|
|
10499
10616
|
|
|
10500
10617
|
case 3:
|
|
10501
|
-
return
|
|
10618
|
+
return _context50.abrupt("return", _context50.sent);
|
|
10502
10619
|
|
|
10503
10620
|
case 4:
|
|
10504
10621
|
case "end":
|
|
10505
|
-
return
|
|
10622
|
+
return _context50.stop();
|
|
10506
10623
|
}
|
|
10507
10624
|
}
|
|
10508
|
-
},
|
|
10625
|
+
}, _callee50, this);
|
|
10509
10626
|
}));
|
|
10510
10627
|
|
|
10511
|
-
function unflagMessage(
|
|
10628
|
+
function unflagMessage(_x67) {
|
|
10512
10629
|
return _unflagMessage.apply(this, arguments);
|
|
10513
10630
|
}
|
|
10514
10631
|
|
|
@@ -10524,31 +10641,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10524
10641
|
}, {
|
|
10525
10642
|
key: "unflagUser",
|
|
10526
10643
|
value: function () {
|
|
10527
|
-
var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10644
|
+
var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(targetID) {
|
|
10528
10645
|
var options,
|
|
10529
|
-
|
|
10530
|
-
return _regeneratorRuntime.wrap(function
|
|
10646
|
+
_args51 = arguments;
|
|
10647
|
+
return _regeneratorRuntime.wrap(function _callee51$(_context51) {
|
|
10531
10648
|
while (1) {
|
|
10532
|
-
switch (
|
|
10649
|
+
switch (_context51.prev = _context51.next) {
|
|
10533
10650
|
case 0:
|
|
10534
|
-
options =
|
|
10535
|
-
|
|
10651
|
+
options = _args51.length > 1 && _args51[1] !== undefined ? _args51[1] : {};
|
|
10652
|
+
_context51.next = 3;
|
|
10536
10653
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
10537
10654
|
target_user_id: targetID
|
|
10538
10655
|
}, options));
|
|
10539
10656
|
|
|
10540
10657
|
case 3:
|
|
10541
|
-
return
|
|
10658
|
+
return _context51.abrupt("return", _context51.sent);
|
|
10542
10659
|
|
|
10543
10660
|
case 4:
|
|
10544
10661
|
case "end":
|
|
10545
|
-
return
|
|
10662
|
+
return _context51.stop();
|
|
10546
10663
|
}
|
|
10547
10664
|
}
|
|
10548
|
-
},
|
|
10665
|
+
}, _callee51, this);
|
|
10549
10666
|
}));
|
|
10550
10667
|
|
|
10551
|
-
function unflagUser(
|
|
10668
|
+
function unflagUser(_x68) {
|
|
10552
10669
|
return _unflagUser.apply(this, arguments);
|
|
10553
10670
|
}
|
|
10554
10671
|
|
|
@@ -10565,29 +10682,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10565
10682
|
}, {
|
|
10566
10683
|
key: "getCallToken",
|
|
10567
10684
|
value: function () {
|
|
10568
|
-
var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10685
|
+
var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(callID) {
|
|
10569
10686
|
var options,
|
|
10570
|
-
|
|
10571
|
-
return _regeneratorRuntime.wrap(function
|
|
10687
|
+
_args52 = arguments;
|
|
10688
|
+
return _regeneratorRuntime.wrap(function _callee52$(_context52) {
|
|
10572
10689
|
while (1) {
|
|
10573
|
-
switch (
|
|
10690
|
+
switch (_context52.prev = _context52.next) {
|
|
10574
10691
|
case 0:
|
|
10575
|
-
options =
|
|
10576
|
-
|
|
10692
|
+
options = _args52.length > 1 && _args52[1] !== undefined ? _args52[1] : {};
|
|
10693
|
+
_context52.next = 3;
|
|
10577
10694
|
return this.post(this.baseURL + "/calls/".concat(callID), _objectSpread({}, options));
|
|
10578
10695
|
|
|
10579
10696
|
case 3:
|
|
10580
|
-
return
|
|
10697
|
+
return _context52.abrupt("return", _context52.sent);
|
|
10581
10698
|
|
|
10582
10699
|
case 4:
|
|
10583
10700
|
case "end":
|
|
10584
|
-
return
|
|
10701
|
+
return _context52.stop();
|
|
10585
10702
|
}
|
|
10586
10703
|
}
|
|
10587
|
-
},
|
|
10704
|
+
}, _callee52, this);
|
|
10588
10705
|
}));
|
|
10589
10706
|
|
|
10590
|
-
function getCallToken(
|
|
10707
|
+
function getCallToken(_x69) {
|
|
10591
10708
|
return _getCallToken.apply(this, arguments);
|
|
10592
10709
|
}
|
|
10593
10710
|
|
|
@@ -10610,30 +10727,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10610
10727
|
}, {
|
|
10611
10728
|
key: "_queryFlags",
|
|
10612
10729
|
value: function () {
|
|
10613
|
-
var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10730
|
+
var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53() {
|
|
10614
10731
|
var filterConditions,
|
|
10615
10732
|
options,
|
|
10616
|
-
|
|
10617
|
-
return _regeneratorRuntime.wrap(function
|
|
10733
|
+
_args53 = arguments;
|
|
10734
|
+
return _regeneratorRuntime.wrap(function _callee53$(_context53) {
|
|
10618
10735
|
while (1) {
|
|
10619
|
-
switch (
|
|
10736
|
+
switch (_context53.prev = _context53.next) {
|
|
10620
10737
|
case 0:
|
|
10621
|
-
filterConditions =
|
|
10622
|
-
options =
|
|
10623
|
-
|
|
10738
|
+
filterConditions = _args53.length > 0 && _args53[0] !== undefined ? _args53[0] : {};
|
|
10739
|
+
options = _args53.length > 1 && _args53[1] !== undefined ? _args53[1] : {};
|
|
10740
|
+
_context53.next = 4;
|
|
10624
10741
|
return this.post(this.baseURL + '/moderation/flags', _objectSpread({
|
|
10625
10742
|
filter_conditions: filterConditions
|
|
10626
10743
|
}, options));
|
|
10627
10744
|
|
|
10628
10745
|
case 4:
|
|
10629
|
-
return
|
|
10746
|
+
return _context53.abrupt("return", _context53.sent);
|
|
10630
10747
|
|
|
10631
10748
|
case 5:
|
|
10632
10749
|
case "end":
|
|
10633
|
-
return
|
|
10750
|
+
return _context53.stop();
|
|
10634
10751
|
}
|
|
10635
10752
|
}
|
|
10636
|
-
},
|
|
10753
|
+
}, _callee53, this);
|
|
10637
10754
|
}));
|
|
10638
10755
|
|
|
10639
10756
|
function _queryFlags() {
|
|
@@ -10659,30 +10776,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10659
10776
|
}, {
|
|
10660
10777
|
key: "_queryFlagReports",
|
|
10661
10778
|
value: function () {
|
|
10662
|
-
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10779
|
+
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54() {
|
|
10663
10780
|
var filterConditions,
|
|
10664
10781
|
options,
|
|
10665
|
-
|
|
10666
|
-
return _regeneratorRuntime.wrap(function
|
|
10782
|
+
_args54 = arguments;
|
|
10783
|
+
return _regeneratorRuntime.wrap(function _callee54$(_context54) {
|
|
10667
10784
|
while (1) {
|
|
10668
|
-
switch (
|
|
10785
|
+
switch (_context54.prev = _context54.next) {
|
|
10669
10786
|
case 0:
|
|
10670
|
-
filterConditions =
|
|
10671
|
-
options =
|
|
10672
|
-
|
|
10787
|
+
filterConditions = _args54.length > 0 && _args54[0] !== undefined ? _args54[0] : {};
|
|
10788
|
+
options = _args54.length > 1 && _args54[1] !== undefined ? _args54[1] : {};
|
|
10789
|
+
_context54.next = 4;
|
|
10673
10790
|
return this.post(this.baseURL + '/moderation/reports', _objectSpread({
|
|
10674
10791
|
filter_conditions: filterConditions
|
|
10675
10792
|
}, options));
|
|
10676
10793
|
|
|
10677
10794
|
case 4:
|
|
10678
|
-
return
|
|
10795
|
+
return _context54.abrupt("return", _context54.sent);
|
|
10679
10796
|
|
|
10680
10797
|
case 5:
|
|
10681
10798
|
case "end":
|
|
10682
|
-
return
|
|
10799
|
+
return _context54.stop();
|
|
10683
10800
|
}
|
|
10684
10801
|
}
|
|
10685
|
-
},
|
|
10802
|
+
}, _callee54, this);
|
|
10686
10803
|
}));
|
|
10687
10804
|
|
|
10688
10805
|
function _queryFlagReports() {
|
|
@@ -10709,31 +10826,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10709
10826
|
}, {
|
|
10710
10827
|
key: "_reviewFlagReport",
|
|
10711
10828
|
value: function () {
|
|
10712
|
-
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10829
|
+
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(id, reviewResult) {
|
|
10713
10830
|
var options,
|
|
10714
|
-
|
|
10715
|
-
return _regeneratorRuntime.wrap(function
|
|
10831
|
+
_args55 = arguments;
|
|
10832
|
+
return _regeneratorRuntime.wrap(function _callee55$(_context55) {
|
|
10716
10833
|
while (1) {
|
|
10717
|
-
switch (
|
|
10834
|
+
switch (_context55.prev = _context55.next) {
|
|
10718
10835
|
case 0:
|
|
10719
|
-
options =
|
|
10720
|
-
|
|
10836
|
+
options = _args55.length > 2 && _args55[2] !== undefined ? _args55[2] : {};
|
|
10837
|
+
_context55.next = 3;
|
|
10721
10838
|
return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
|
|
10722
10839
|
review_result: reviewResult
|
|
10723
10840
|
}, options));
|
|
10724
10841
|
|
|
10725
10842
|
case 3:
|
|
10726
|
-
return
|
|
10843
|
+
return _context55.abrupt("return", _context55.sent);
|
|
10727
10844
|
|
|
10728
10845
|
case 4:
|
|
10729
10846
|
case "end":
|
|
10730
|
-
return
|
|
10847
|
+
return _context55.stop();
|
|
10731
10848
|
}
|
|
10732
10849
|
}
|
|
10733
|
-
},
|
|
10850
|
+
}, _callee55, this);
|
|
10734
10851
|
}));
|
|
10735
10852
|
|
|
10736
|
-
function _reviewFlagReport(
|
|
10853
|
+
function _reviewFlagReport(_x70, _x71) {
|
|
10737
10854
|
return _reviewFlagReport2.apply(this, arguments);
|
|
10738
10855
|
}
|
|
10739
10856
|
|
|
@@ -10751,31 +10868,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10751
10868
|
}, {
|
|
10752
10869
|
key: "unblockMessage",
|
|
10753
10870
|
value: function () {
|
|
10754
|
-
var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10871
|
+
var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(targetMessageID) {
|
|
10755
10872
|
var options,
|
|
10756
|
-
|
|
10757
|
-
return _regeneratorRuntime.wrap(function
|
|
10873
|
+
_args56 = arguments;
|
|
10874
|
+
return _regeneratorRuntime.wrap(function _callee56$(_context56) {
|
|
10758
10875
|
while (1) {
|
|
10759
|
-
switch (
|
|
10876
|
+
switch (_context56.prev = _context56.next) {
|
|
10760
10877
|
case 0:
|
|
10761
|
-
options =
|
|
10762
|
-
|
|
10878
|
+
options = _args56.length > 1 && _args56[1] !== undefined ? _args56[1] : {};
|
|
10879
|
+
_context56.next = 3;
|
|
10763
10880
|
return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
|
|
10764
10881
|
target_message_id: targetMessageID
|
|
10765
10882
|
}, options));
|
|
10766
10883
|
|
|
10767
10884
|
case 3:
|
|
10768
|
-
return
|
|
10885
|
+
return _context56.abrupt("return", _context56.sent);
|
|
10769
10886
|
|
|
10770
10887
|
case 4:
|
|
10771
10888
|
case "end":
|
|
10772
|
-
return
|
|
10889
|
+
return _context56.stop();
|
|
10773
10890
|
}
|
|
10774
10891
|
}
|
|
10775
|
-
},
|
|
10892
|
+
}, _callee56, this);
|
|
10776
10893
|
}));
|
|
10777
10894
|
|
|
10778
|
-
function unblockMessage(
|
|
10895
|
+
function unblockMessage(_x72) {
|
|
10779
10896
|
return _unblockMessage.apply(this, arguments);
|
|
10780
10897
|
}
|
|
10781
10898
|
|
|
@@ -10794,23 +10911,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10794
10911
|
* @return {Promise<APIResponse>}
|
|
10795
10912
|
*/
|
|
10796
10913
|
function () {
|
|
10797
|
-
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10914
|
+
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57() {
|
|
10798
10915
|
var data,
|
|
10799
|
-
|
|
10800
|
-
return _regeneratorRuntime.wrap(function
|
|
10916
|
+
_args57 = arguments;
|
|
10917
|
+
return _regeneratorRuntime.wrap(function _callee57$(_context57) {
|
|
10801
10918
|
while (1) {
|
|
10802
|
-
switch (
|
|
10919
|
+
switch (_context57.prev = _context57.next) {
|
|
10803
10920
|
case 0:
|
|
10804
|
-
data =
|
|
10805
|
-
|
|
10921
|
+
data = _args57.length > 0 && _args57[0] !== undefined ? _args57[0] : {};
|
|
10922
|
+
_context57.next = 3;
|
|
10806
10923
|
return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
|
|
10807
10924
|
|
|
10808
10925
|
case 3:
|
|
10809
10926
|
case "end":
|
|
10810
|
-
return
|
|
10927
|
+
return _context57.stop();
|
|
10811
10928
|
}
|
|
10812
10929
|
}
|
|
10813
|
-
},
|
|
10930
|
+
}, _callee57, this);
|
|
10814
10931
|
}));
|
|
10815
10932
|
|
|
10816
10933
|
function markChannelsRead() {
|
|
@@ -10885,28 +11002,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10885
11002
|
}, {
|
|
10886
11003
|
key: "translateMessage",
|
|
10887
11004
|
value: function () {
|
|
10888
|
-
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10889
|
-
return _regeneratorRuntime.wrap(function
|
|
11005
|
+
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(messageId, language) {
|
|
11006
|
+
return _regeneratorRuntime.wrap(function _callee58$(_context58) {
|
|
10890
11007
|
while (1) {
|
|
10891
|
-
switch (
|
|
11008
|
+
switch (_context58.prev = _context58.next) {
|
|
10892
11009
|
case 0:
|
|
10893
|
-
|
|
11010
|
+
_context58.next = 2;
|
|
10894
11011
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
|
|
10895
11012
|
language: language
|
|
10896
11013
|
});
|
|
10897
11014
|
|
|
10898
11015
|
case 2:
|
|
10899
|
-
return
|
|
11016
|
+
return _context58.abrupt("return", _context58.sent);
|
|
10900
11017
|
|
|
10901
11018
|
case 3:
|
|
10902
11019
|
case "end":
|
|
10903
|
-
return
|
|
11020
|
+
return _context58.stop();
|
|
10904
11021
|
}
|
|
10905
11022
|
}
|
|
10906
|
-
},
|
|
11023
|
+
}, _callee58, this);
|
|
10907
11024
|
}));
|
|
10908
11025
|
|
|
10909
|
-
function translateMessage(
|
|
11026
|
+
function translateMessage(_x73, _x74) {
|
|
10910
11027
|
return _translateMessage.apply(this, arguments);
|
|
10911
11028
|
}
|
|
10912
11029
|
|
|
@@ -11008,14 +11125,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11008
11125
|
}, {
|
|
11009
11126
|
key: "updateMessage",
|
|
11010
11127
|
value: function () {
|
|
11011
|
-
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11128
|
+
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(message, userId, options) {
|
|
11012
11129
|
var clonedMessage, reservedMessageFields;
|
|
11013
|
-
return _regeneratorRuntime.wrap(function
|
|
11130
|
+
return _regeneratorRuntime.wrap(function _callee59$(_context59) {
|
|
11014
11131
|
while (1) {
|
|
11015
|
-
switch (
|
|
11132
|
+
switch (_context59.prev = _context59.next) {
|
|
11016
11133
|
case 0:
|
|
11017
11134
|
if (message.id) {
|
|
11018
|
-
|
|
11135
|
+
_context59.next = 2;
|
|
11019
11136
|
break;
|
|
11020
11137
|
}
|
|
11021
11138
|
|
|
@@ -11052,23 +11169,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11052
11169
|
});
|
|
11053
11170
|
}
|
|
11054
11171
|
|
|
11055
|
-
|
|
11172
|
+
_context59.next = 10;
|
|
11056
11173
|
return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
|
|
11057
11174
|
message: clonedMessage
|
|
11058
11175
|
}, options));
|
|
11059
11176
|
|
|
11060
11177
|
case 10:
|
|
11061
|
-
return
|
|
11178
|
+
return _context59.abrupt("return", _context59.sent);
|
|
11062
11179
|
|
|
11063
11180
|
case 11:
|
|
11064
11181
|
case "end":
|
|
11065
|
-
return
|
|
11182
|
+
return _context59.stop();
|
|
11066
11183
|
}
|
|
11067
11184
|
}
|
|
11068
|
-
},
|
|
11185
|
+
}, _callee59, this);
|
|
11069
11186
|
}));
|
|
11070
11187
|
|
|
11071
|
-
function updateMessage(
|
|
11188
|
+
function updateMessage(_x75, _x76, _x77) {
|
|
11072
11189
|
return _updateMessage.apply(this, arguments);
|
|
11073
11190
|
}
|
|
11074
11191
|
|
|
@@ -11091,14 +11208,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11091
11208
|
}, {
|
|
11092
11209
|
key: "partialUpdateMessage",
|
|
11093
11210
|
value: function () {
|
|
11094
|
-
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11211
|
+
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(id, partialMessageObject, userId, options) {
|
|
11095
11212
|
var user;
|
|
11096
|
-
return _regeneratorRuntime.wrap(function
|
|
11213
|
+
return _regeneratorRuntime.wrap(function _callee60$(_context60) {
|
|
11097
11214
|
while (1) {
|
|
11098
|
-
switch (
|
|
11215
|
+
switch (_context60.prev = _context60.next) {
|
|
11099
11216
|
case 0:
|
|
11100
11217
|
if (id) {
|
|
11101
|
-
|
|
11218
|
+
_context60.next = 2;
|
|
11102
11219
|
break;
|
|
11103
11220
|
}
|
|
11104
11221
|
|
|
@@ -11113,23 +11230,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11113
11230
|
};
|
|
11114
11231
|
}
|
|
11115
11232
|
|
|
11116
|
-
|
|
11233
|
+
_context60.next = 6;
|
|
11117
11234
|
return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
11118
11235
|
user: user
|
|
11119
11236
|
}));
|
|
11120
11237
|
|
|
11121
11238
|
case 6:
|
|
11122
|
-
return
|
|
11239
|
+
return _context60.abrupt("return", _context60.sent);
|
|
11123
11240
|
|
|
11124
11241
|
case 7:
|
|
11125
11242
|
case "end":
|
|
11126
|
-
return
|
|
11243
|
+
return _context60.stop();
|
|
11127
11244
|
}
|
|
11128
11245
|
}
|
|
11129
|
-
},
|
|
11246
|
+
}, _callee60, this);
|
|
11130
11247
|
}));
|
|
11131
11248
|
|
|
11132
|
-
function partialUpdateMessage(
|
|
11249
|
+
function partialUpdateMessage(_x78, _x79, _x80, _x81) {
|
|
11133
11250
|
return _partialUpdateMessage.apply(this, arguments);
|
|
11134
11251
|
}
|
|
11135
11252
|
|
|
@@ -11138,11 +11255,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11138
11255
|
}, {
|
|
11139
11256
|
key: "deleteMessage",
|
|
11140
11257
|
value: function () {
|
|
11141
|
-
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11258
|
+
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(messageID, hardDelete) {
|
|
11142
11259
|
var params;
|
|
11143
|
-
return _regeneratorRuntime.wrap(function
|
|
11260
|
+
return _regeneratorRuntime.wrap(function _callee61$(_context61) {
|
|
11144
11261
|
while (1) {
|
|
11145
|
-
switch (
|
|
11262
|
+
switch (_context61.prev = _context61.next) {
|
|
11146
11263
|
case 0:
|
|
11147
11264
|
params = {};
|
|
11148
11265
|
|
|
@@ -11152,21 +11269,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11152
11269
|
};
|
|
11153
11270
|
}
|
|
11154
11271
|
|
|
11155
|
-
|
|
11272
|
+
_context61.next = 4;
|
|
11156
11273
|
return this.delete(this.baseURL + "/messages/".concat(messageID), params);
|
|
11157
11274
|
|
|
11158
11275
|
case 4:
|
|
11159
|
-
return
|
|
11276
|
+
return _context61.abrupt("return", _context61.sent);
|
|
11160
11277
|
|
|
11161
11278
|
case 5:
|
|
11162
11279
|
case "end":
|
|
11163
|
-
return
|
|
11280
|
+
return _context61.stop();
|
|
11164
11281
|
}
|
|
11165
11282
|
}
|
|
11166
|
-
},
|
|
11283
|
+
}, _callee61, this);
|
|
11167
11284
|
}));
|
|
11168
11285
|
|
|
11169
|
-
function deleteMessage(
|
|
11286
|
+
function deleteMessage(_x82, _x83) {
|
|
11170
11287
|
return _deleteMessage.apply(this, arguments);
|
|
11171
11288
|
}
|
|
11172
11289
|
|
|
@@ -11188,28 +11305,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11188
11305
|
}, {
|
|
11189
11306
|
key: "undeleteMessage",
|
|
11190
11307
|
value: function () {
|
|
11191
|
-
var _undeleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11192
|
-
return _regeneratorRuntime.wrap(function
|
|
11308
|
+
var _undeleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(messageID, userID) {
|
|
11309
|
+
return _regeneratorRuntime.wrap(function _callee62$(_context62) {
|
|
11193
11310
|
while (1) {
|
|
11194
|
-
switch (
|
|
11311
|
+
switch (_context62.prev = _context62.next) {
|
|
11195
11312
|
case 0:
|
|
11196
|
-
|
|
11313
|
+
_context62.next = 2;
|
|
11197
11314
|
return this.post(this.baseURL + "/messages/".concat(messageID, "/undelete"), {
|
|
11198
11315
|
undeleted_by: userID
|
|
11199
11316
|
});
|
|
11200
11317
|
|
|
11201
11318
|
case 2:
|
|
11202
|
-
return
|
|
11319
|
+
return _context62.abrupt("return", _context62.sent);
|
|
11203
11320
|
|
|
11204
11321
|
case 3:
|
|
11205
11322
|
case "end":
|
|
11206
|
-
return
|
|
11323
|
+
return _context62.stop();
|
|
11207
11324
|
}
|
|
11208
11325
|
}
|
|
11209
|
-
},
|
|
11326
|
+
}, _callee62, this);
|
|
11210
11327
|
}));
|
|
11211
11328
|
|
|
11212
|
-
function undeleteMessage(
|
|
11329
|
+
function undeleteMessage(_x84, _x85) {
|
|
11213
11330
|
return _undeleteMessage.apply(this, arguments);
|
|
11214
11331
|
}
|
|
11215
11332
|
|
|
@@ -11218,26 +11335,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11218
11335
|
}, {
|
|
11219
11336
|
key: "getMessage",
|
|
11220
11337
|
value: function () {
|
|
11221
|
-
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11222
|
-
return _regeneratorRuntime.wrap(function
|
|
11338
|
+
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(messageID, options) {
|
|
11339
|
+
return _regeneratorRuntime.wrap(function _callee63$(_context63) {
|
|
11223
11340
|
while (1) {
|
|
11224
|
-
switch (
|
|
11341
|
+
switch (_context63.prev = _context63.next) {
|
|
11225
11342
|
case 0:
|
|
11226
|
-
|
|
11343
|
+
_context63.next = 2;
|
|
11227
11344
|
return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), _objectSpread({}, options));
|
|
11228
11345
|
|
|
11229
11346
|
case 2:
|
|
11230
|
-
return
|
|
11347
|
+
return _context63.abrupt("return", _context63.sent);
|
|
11231
11348
|
|
|
11232
11349
|
case 3:
|
|
11233
11350
|
case "end":
|
|
11234
|
-
return
|
|
11351
|
+
return _context63.stop();
|
|
11235
11352
|
}
|
|
11236
11353
|
}
|
|
11237
|
-
},
|
|
11354
|
+
}, _callee63, this);
|
|
11238
11355
|
}));
|
|
11239
11356
|
|
|
11240
|
-
function getMessage(
|
|
11357
|
+
function getMessage(_x86, _x87) {
|
|
11241
11358
|
return _getMessage.apply(this, arguments);
|
|
11242
11359
|
}
|
|
11243
11360
|
|
|
@@ -11258,13 +11375,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11258
11375
|
}, {
|
|
11259
11376
|
key: "queryThreads",
|
|
11260
11377
|
value: function () {
|
|
11261
|
-
var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11378
|
+
var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(options) {
|
|
11262
11379
|
var _this5 = this;
|
|
11263
11380
|
|
|
11264
11381
|
var opts, res;
|
|
11265
|
-
return _regeneratorRuntime.wrap(function
|
|
11382
|
+
return _regeneratorRuntime.wrap(function _callee64$(_context64) {
|
|
11266
11383
|
while (1) {
|
|
11267
|
-
switch (
|
|
11384
|
+
switch (_context64.prev = _context64.next) {
|
|
11268
11385
|
case 0:
|
|
11269
11386
|
opts = _objectSpread({
|
|
11270
11387
|
limit: 10,
|
|
@@ -11272,12 +11389,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11272
11389
|
reply_limit: 3,
|
|
11273
11390
|
watch: true
|
|
11274
11391
|
}, options);
|
|
11275
|
-
|
|
11392
|
+
_context64.next = 3;
|
|
11276
11393
|
return this.post(this.baseURL + "/threads", opts);
|
|
11277
11394
|
|
|
11278
11395
|
case 3:
|
|
11279
|
-
res =
|
|
11280
|
-
return
|
|
11396
|
+
res = _context64.sent;
|
|
11397
|
+
return _context64.abrupt("return", {
|
|
11281
11398
|
threads: res.threads.map(function (thread) {
|
|
11282
11399
|
return new Thread(_this5, thread);
|
|
11283
11400
|
}),
|
|
@@ -11286,13 +11403,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11286
11403
|
|
|
11287
11404
|
case 5:
|
|
11288
11405
|
case "end":
|
|
11289
|
-
return
|
|
11406
|
+
return _context64.stop();
|
|
11290
11407
|
}
|
|
11291
11408
|
}
|
|
11292
|
-
},
|
|
11409
|
+
}, _callee64, this);
|
|
11293
11410
|
}));
|
|
11294
11411
|
|
|
11295
|
-
function queryThreads(
|
|
11412
|
+
function queryThreads(_x88) {
|
|
11296
11413
|
return _queryThreads.apply(this, arguments);
|
|
11297
11414
|
}
|
|
11298
11415
|
|
|
@@ -11313,19 +11430,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11313
11430
|
}, {
|
|
11314
11431
|
key: "getThread",
|
|
11315
11432
|
value: function () {
|
|
11316
|
-
var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11433
|
+
var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(messageId) {
|
|
11317
11434
|
var options,
|
|
11318
11435
|
opts,
|
|
11319
11436
|
res,
|
|
11320
|
-
|
|
11321
|
-
return _regeneratorRuntime.wrap(function
|
|
11437
|
+
_args65 = arguments;
|
|
11438
|
+
return _regeneratorRuntime.wrap(function _callee65$(_context65) {
|
|
11322
11439
|
while (1) {
|
|
11323
|
-
switch (
|
|
11440
|
+
switch (_context65.prev = _context65.next) {
|
|
11324
11441
|
case 0:
|
|
11325
|
-
options =
|
|
11442
|
+
options = _args65.length > 1 && _args65[1] !== undefined ? _args65[1] : {};
|
|
11326
11443
|
|
|
11327
11444
|
if (messageId) {
|
|
11328
|
-
|
|
11445
|
+
_context65.next = 3;
|
|
11329
11446
|
break;
|
|
11330
11447
|
}
|
|
11331
11448
|
|
|
@@ -11337,22 +11454,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11337
11454
|
reply_limit: 3,
|
|
11338
11455
|
watch: true
|
|
11339
11456
|
}, options);
|
|
11340
|
-
|
|
11457
|
+
_context65.next = 6;
|
|
11341
11458
|
return this.get(this.baseURL + "/threads/".concat(messageId), opts);
|
|
11342
11459
|
|
|
11343
11460
|
case 6:
|
|
11344
|
-
res =
|
|
11345
|
-
return
|
|
11461
|
+
res = _context65.sent;
|
|
11462
|
+
return _context65.abrupt("return", new Thread(this, res.thread));
|
|
11346
11463
|
|
|
11347
11464
|
case 8:
|
|
11348
11465
|
case "end":
|
|
11349
|
-
return
|
|
11466
|
+
return _context65.stop();
|
|
11350
11467
|
}
|
|
11351
11468
|
}
|
|
11352
|
-
},
|
|
11469
|
+
}, _callee65, this);
|
|
11353
11470
|
}));
|
|
11354
11471
|
|
|
11355
|
-
function getThread(
|
|
11472
|
+
function getThread(_x89) {
|
|
11356
11473
|
return _getThread.apply(this, arguments);
|
|
11357
11474
|
}
|
|
11358
11475
|
|
|
@@ -11370,15 +11487,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11370
11487
|
}, {
|
|
11371
11488
|
key: "partialUpdateThread",
|
|
11372
11489
|
value: function () {
|
|
11373
|
-
var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11490
|
+
var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(messageId, partialThreadObject) {
|
|
11374
11491
|
var reservedThreadFields, _key5;
|
|
11375
11492
|
|
|
11376
|
-
return _regeneratorRuntime.wrap(function
|
|
11493
|
+
return _regeneratorRuntime.wrap(function _callee66$(_context66) {
|
|
11377
11494
|
while (1) {
|
|
11378
|
-
switch (
|
|
11495
|
+
switch (_context66.prev = _context66.next) {
|
|
11379
11496
|
case 0:
|
|
11380
11497
|
if (messageId) {
|
|
11381
|
-
|
|
11498
|
+
_context66.next = 2;
|
|
11382
11499
|
break;
|
|
11383
11500
|
}
|
|
11384
11501
|
|
|
@@ -11388,43 +11505,43 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11388
11505
|
// check for reserved fields from ThreadResponse type within partialThreadObject's set and unset.
|
|
11389
11506
|
// Throw error if any of the reserved field is found.
|
|
11390
11507
|
reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel'];
|
|
11391
|
-
|
|
11508
|
+
_context66.t0 = _regeneratorRuntime.keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
|
|
11392
11509
|
|
|
11393
11510
|
case 4:
|
|
11394
|
-
if ((
|
|
11395
|
-
|
|
11511
|
+
if ((_context66.t1 = _context66.t0()).done) {
|
|
11512
|
+
_context66.next = 10;
|
|
11396
11513
|
break;
|
|
11397
11514
|
}
|
|
11398
11515
|
|
|
11399
|
-
_key5 =
|
|
11516
|
+
_key5 = _context66.t1.value;
|
|
11400
11517
|
|
|
11401
11518
|
if (!reservedThreadFields.includes(_key5)) {
|
|
11402
|
-
|
|
11519
|
+
_context66.next = 8;
|
|
11403
11520
|
break;
|
|
11404
11521
|
}
|
|
11405
11522
|
|
|
11406
11523
|
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."));
|
|
11407
11524
|
|
|
11408
11525
|
case 8:
|
|
11409
|
-
|
|
11526
|
+
_context66.next = 4;
|
|
11410
11527
|
break;
|
|
11411
11528
|
|
|
11412
11529
|
case 10:
|
|
11413
|
-
|
|
11530
|
+
_context66.next = 12;
|
|
11414
11531
|
return this.patch(this.baseURL + "/threads/".concat(messageId), partialThreadObject);
|
|
11415
11532
|
|
|
11416
11533
|
case 12:
|
|
11417
|
-
return
|
|
11534
|
+
return _context66.abrupt("return", _context66.sent);
|
|
11418
11535
|
|
|
11419
11536
|
case 13:
|
|
11420
11537
|
case "end":
|
|
11421
|
-
return
|
|
11538
|
+
return _context66.stop();
|
|
11422
11539
|
}
|
|
11423
11540
|
}
|
|
11424
|
-
},
|
|
11541
|
+
}, _callee66, this);
|
|
11425
11542
|
}));
|
|
11426
11543
|
|
|
11427
|
-
function partialUpdateThread(
|
|
11544
|
+
function partialUpdateThread(_x90, _x91) {
|
|
11428
11545
|
return _partialUpdateThread.apply(this, arguments);
|
|
11429
11546
|
}
|
|
11430
11547
|
|
|
@@ -11433,7 +11550,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11433
11550
|
}, {
|
|
11434
11551
|
key: "getUserAgent",
|
|
11435
11552
|
value: function getUserAgent() {
|
|
11436
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
11553
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.34.0");
|
|
11437
11554
|
}
|
|
11438
11555
|
}, {
|
|
11439
11556
|
key: "setUserAgent",
|
|
@@ -11652,28 +11769,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11652
11769
|
}, {
|
|
11653
11770
|
key: "sendUserCustomEvent",
|
|
11654
11771
|
value: function () {
|
|
11655
|
-
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11656
|
-
return _regeneratorRuntime.wrap(function
|
|
11772
|
+
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(targetUserID, event) {
|
|
11773
|
+
return _regeneratorRuntime.wrap(function _callee67$(_context67) {
|
|
11657
11774
|
while (1) {
|
|
11658
|
-
switch (
|
|
11775
|
+
switch (_context67.prev = _context67.next) {
|
|
11659
11776
|
case 0:
|
|
11660
|
-
|
|
11777
|
+
_context67.next = 2;
|
|
11661
11778
|
return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
|
|
11662
11779
|
event: event
|
|
11663
11780
|
});
|
|
11664
11781
|
|
|
11665
11782
|
case 2:
|
|
11666
|
-
return
|
|
11783
|
+
return _context67.abrupt("return", _context67.sent);
|
|
11667
11784
|
|
|
11668
11785
|
case 3:
|
|
11669
11786
|
case "end":
|
|
11670
|
-
return
|
|
11787
|
+
return _context67.stop();
|
|
11671
11788
|
}
|
|
11672
11789
|
}
|
|
11673
|
-
},
|
|
11790
|
+
}, _callee67, this);
|
|
11674
11791
|
}));
|
|
11675
11792
|
|
|
11676
|
-
function sendUserCustomEvent(
|
|
11793
|
+
function sendUserCustomEvent(_x92, _x93) {
|
|
11677
11794
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
11678
11795
|
}
|
|
11679
11796
|
|
|
@@ -11770,28 +11887,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11770
11887
|
}, {
|
|
11771
11888
|
key: "createSegment",
|
|
11772
11889
|
value: function () {
|
|
11773
|
-
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11890
|
+
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(type, id, data) {
|
|
11774
11891
|
var body;
|
|
11775
|
-
return _regeneratorRuntime.wrap(function
|
|
11892
|
+
return _regeneratorRuntime.wrap(function _callee68$(_context68) {
|
|
11776
11893
|
while (1) {
|
|
11777
|
-
switch (
|
|
11894
|
+
switch (_context68.prev = _context68.next) {
|
|
11778
11895
|
case 0:
|
|
11779
11896
|
this.validateServerSideAuth();
|
|
11780
11897
|
body = _objectSpread({
|
|
11781
11898
|
id: id,
|
|
11782
11899
|
type: type
|
|
11783
11900
|
}, data);
|
|
11784
|
-
return
|
|
11901
|
+
return _context68.abrupt("return", this.post(this.baseURL + "/segments", body));
|
|
11785
11902
|
|
|
11786
11903
|
case 3:
|
|
11787
11904
|
case "end":
|
|
11788
|
-
return
|
|
11905
|
+
return _context68.stop();
|
|
11789
11906
|
}
|
|
11790
11907
|
}
|
|
11791
|
-
},
|
|
11908
|
+
}, _callee68, this);
|
|
11792
11909
|
}));
|
|
11793
11910
|
|
|
11794
|
-
function createSegment(
|
|
11911
|
+
function createSegment(_x94, _x95, _x96) {
|
|
11795
11912
|
return _createSegment.apply(this, arguments);
|
|
11796
11913
|
}
|
|
11797
11914
|
|
|
@@ -11810,23 +11927,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11810
11927
|
}, {
|
|
11811
11928
|
key: "createUserSegment",
|
|
11812
11929
|
value: function () {
|
|
11813
|
-
var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11814
|
-
return _regeneratorRuntime.wrap(function
|
|
11930
|
+
var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id, data) {
|
|
11931
|
+
return _regeneratorRuntime.wrap(function _callee69$(_context69) {
|
|
11815
11932
|
while (1) {
|
|
11816
|
-
switch (
|
|
11933
|
+
switch (_context69.prev = _context69.next) {
|
|
11817
11934
|
case 0:
|
|
11818
11935
|
this.validateServerSideAuth();
|
|
11819
|
-
return
|
|
11936
|
+
return _context69.abrupt("return", this.createSegment('user', id, data));
|
|
11820
11937
|
|
|
11821
11938
|
case 2:
|
|
11822
11939
|
case "end":
|
|
11823
|
-
return
|
|
11940
|
+
return _context69.stop();
|
|
11824
11941
|
}
|
|
11825
11942
|
}
|
|
11826
|
-
},
|
|
11943
|
+
}, _callee69, this);
|
|
11827
11944
|
}));
|
|
11828
11945
|
|
|
11829
|
-
function createUserSegment(
|
|
11946
|
+
function createUserSegment(_x97, _x98) {
|
|
11830
11947
|
return _createUserSegment.apply(this, arguments);
|
|
11831
11948
|
}
|
|
11832
11949
|
|
|
@@ -11845,23 +11962,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11845
11962
|
}, {
|
|
11846
11963
|
key: "createChannelSegment",
|
|
11847
11964
|
value: function () {
|
|
11848
|
-
var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11849
|
-
return _regeneratorRuntime.wrap(function
|
|
11965
|
+
var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(id, data) {
|
|
11966
|
+
return _regeneratorRuntime.wrap(function _callee70$(_context70) {
|
|
11850
11967
|
while (1) {
|
|
11851
|
-
switch (
|
|
11968
|
+
switch (_context70.prev = _context70.next) {
|
|
11852
11969
|
case 0:
|
|
11853
11970
|
this.validateServerSideAuth();
|
|
11854
|
-
return
|
|
11971
|
+
return _context70.abrupt("return", this.createSegment('channel', id, data));
|
|
11855
11972
|
|
|
11856
11973
|
case 2:
|
|
11857
11974
|
case "end":
|
|
11858
|
-
return
|
|
11975
|
+
return _context70.stop();
|
|
11859
11976
|
}
|
|
11860
11977
|
}
|
|
11861
|
-
},
|
|
11978
|
+
}, _callee70, this);
|
|
11862
11979
|
}));
|
|
11863
11980
|
|
|
11864
|
-
function createChannelSegment(
|
|
11981
|
+
function createChannelSegment(_x99, _x100) {
|
|
11865
11982
|
return _createChannelSegment.apply(this, arguments);
|
|
11866
11983
|
}
|
|
11867
11984
|
|
|
@@ -11870,23 +11987,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11870
11987
|
}, {
|
|
11871
11988
|
key: "getSegment",
|
|
11872
11989
|
value: function () {
|
|
11873
|
-
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11874
|
-
return _regeneratorRuntime.wrap(function
|
|
11990
|
+
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id) {
|
|
11991
|
+
return _regeneratorRuntime.wrap(function _callee71$(_context71) {
|
|
11875
11992
|
while (1) {
|
|
11876
|
-
switch (
|
|
11993
|
+
switch (_context71.prev = _context71.next) {
|
|
11877
11994
|
case 0:
|
|
11878
11995
|
this.validateServerSideAuth();
|
|
11879
|
-
return
|
|
11996
|
+
return _context71.abrupt("return", this.get(this.baseURL + "/segments/".concat(id)));
|
|
11880
11997
|
|
|
11881
11998
|
case 2:
|
|
11882
11999
|
case "end":
|
|
11883
|
-
return
|
|
12000
|
+
return _context71.stop();
|
|
11884
12001
|
}
|
|
11885
12002
|
}
|
|
11886
|
-
},
|
|
12003
|
+
}, _callee71, this);
|
|
11887
12004
|
}));
|
|
11888
12005
|
|
|
11889
|
-
function getSegment(
|
|
12006
|
+
function getSegment(_x101) {
|
|
11890
12007
|
return _getSegment.apply(this, arguments);
|
|
11891
12008
|
}
|
|
11892
12009
|
|
|
@@ -11904,23 +12021,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11904
12021
|
}, {
|
|
11905
12022
|
key: "updateSegment",
|
|
11906
12023
|
value: function () {
|
|
11907
|
-
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11908
|
-
return _regeneratorRuntime.wrap(function
|
|
12024
|
+
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id, data) {
|
|
12025
|
+
return _regeneratorRuntime.wrap(function _callee72$(_context72) {
|
|
11909
12026
|
while (1) {
|
|
11910
|
-
switch (
|
|
12027
|
+
switch (_context72.prev = _context72.next) {
|
|
11911
12028
|
case 0:
|
|
11912
12029
|
this.validateServerSideAuth();
|
|
11913
|
-
return
|
|
12030
|
+
return _context72.abrupt("return", this.put(this.baseURL + "/segments/".concat(id), data));
|
|
11914
12031
|
|
|
11915
12032
|
case 2:
|
|
11916
12033
|
case "end":
|
|
11917
|
-
return
|
|
12034
|
+
return _context72.stop();
|
|
11918
12035
|
}
|
|
11919
12036
|
}
|
|
11920
|
-
},
|
|
12037
|
+
}, _callee72, this);
|
|
11921
12038
|
}));
|
|
11922
12039
|
|
|
11923
|
-
function updateSegment(
|
|
12040
|
+
function updateSegment(_x102, _x103) {
|
|
11924
12041
|
return _updateSegment.apply(this, arguments);
|
|
11925
12042
|
}
|
|
11926
12043
|
|
|
@@ -11938,27 +12055,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11938
12055
|
}, {
|
|
11939
12056
|
key: "addSegmentTargets",
|
|
11940
12057
|
value: function () {
|
|
11941
|
-
var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12058
|
+
var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id, targets) {
|
|
11942
12059
|
var body;
|
|
11943
|
-
return _regeneratorRuntime.wrap(function
|
|
12060
|
+
return _regeneratorRuntime.wrap(function _callee73$(_context73) {
|
|
11944
12061
|
while (1) {
|
|
11945
|
-
switch (
|
|
12062
|
+
switch (_context73.prev = _context73.next) {
|
|
11946
12063
|
case 0:
|
|
11947
12064
|
this.validateServerSideAuth();
|
|
11948
12065
|
body = {
|
|
11949
12066
|
target_ids: targets
|
|
11950
12067
|
};
|
|
11951
|
-
return
|
|
12068
|
+
return _context73.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/addtargets"), body));
|
|
11952
12069
|
|
|
11953
12070
|
case 3:
|
|
11954
12071
|
case "end":
|
|
11955
|
-
return
|
|
12072
|
+
return _context73.stop();
|
|
11956
12073
|
}
|
|
11957
12074
|
}
|
|
11958
|
-
},
|
|
12075
|
+
}, _callee73, this);
|
|
11959
12076
|
}));
|
|
11960
12077
|
|
|
11961
|
-
function addSegmentTargets(
|
|
12078
|
+
function addSegmentTargets(_x104, _x105) {
|
|
11962
12079
|
return _addSegmentTargets.apply(this, arguments);
|
|
11963
12080
|
}
|
|
11964
12081
|
|
|
@@ -11967,33 +12084,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11967
12084
|
}, {
|
|
11968
12085
|
key: "querySegmentTargets",
|
|
11969
12086
|
value: function () {
|
|
11970
|
-
var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12087
|
+
var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(id) {
|
|
11971
12088
|
var filter,
|
|
11972
12089
|
sort,
|
|
11973
12090
|
options,
|
|
11974
|
-
|
|
11975
|
-
return _regeneratorRuntime.wrap(function
|
|
12091
|
+
_args74 = arguments;
|
|
12092
|
+
return _regeneratorRuntime.wrap(function _callee74$(_context74) {
|
|
11976
12093
|
while (1) {
|
|
11977
|
-
switch (
|
|
12094
|
+
switch (_context74.prev = _context74.next) {
|
|
11978
12095
|
case 0:
|
|
11979
|
-
filter =
|
|
11980
|
-
sort =
|
|
11981
|
-
options =
|
|
12096
|
+
filter = _args74.length > 1 && _args74[1] !== undefined ? _args74[1] : {};
|
|
12097
|
+
sort = _args74.length > 2 && _args74[2] !== undefined ? _args74[2] : [];
|
|
12098
|
+
options = _args74.length > 3 && _args74[3] !== undefined ? _args74[3] : {};
|
|
11982
12099
|
this.validateServerSideAuth();
|
|
11983
|
-
return
|
|
12100
|
+
return _context74.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/targets/query"), _objectSpread({
|
|
11984
12101
|
filter: filter || {},
|
|
11985
12102
|
sort: sort || []
|
|
11986
12103
|
}, options)));
|
|
11987
12104
|
|
|
11988
12105
|
case 5:
|
|
11989
12106
|
case "end":
|
|
11990
|
-
return
|
|
12107
|
+
return _context74.stop();
|
|
11991
12108
|
}
|
|
11992
12109
|
}
|
|
11993
|
-
},
|
|
12110
|
+
}, _callee74, this);
|
|
11994
12111
|
}));
|
|
11995
12112
|
|
|
11996
|
-
function querySegmentTargets(
|
|
12113
|
+
function querySegmentTargets(_x106) {
|
|
11997
12114
|
return _querySegmentTargets.apply(this, arguments);
|
|
11998
12115
|
}
|
|
11999
12116
|
|
|
@@ -12011,27 +12128,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12011
12128
|
}, {
|
|
12012
12129
|
key: "removeSegmentTargets",
|
|
12013
12130
|
value: function () {
|
|
12014
|
-
var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12131
|
+
var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(id, targets) {
|
|
12015
12132
|
var body;
|
|
12016
|
-
return _regeneratorRuntime.wrap(function
|
|
12133
|
+
return _regeneratorRuntime.wrap(function _callee75$(_context75) {
|
|
12017
12134
|
while (1) {
|
|
12018
|
-
switch (
|
|
12135
|
+
switch (_context75.prev = _context75.next) {
|
|
12019
12136
|
case 0:
|
|
12020
12137
|
this.validateServerSideAuth();
|
|
12021
12138
|
body = {
|
|
12022
12139
|
target_ids: targets
|
|
12023
12140
|
};
|
|
12024
|
-
return
|
|
12141
|
+
return _context75.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/deletetargets"), body));
|
|
12025
12142
|
|
|
12026
12143
|
case 3:
|
|
12027
12144
|
case "end":
|
|
12028
|
-
return
|
|
12145
|
+
return _context75.stop();
|
|
12029
12146
|
}
|
|
12030
12147
|
}
|
|
12031
|
-
},
|
|
12148
|
+
}, _callee75, this);
|
|
12032
12149
|
}));
|
|
12033
12150
|
|
|
12034
|
-
function removeSegmentTargets(
|
|
12151
|
+
function removeSegmentTargets(_x107, _x108) {
|
|
12035
12152
|
return _removeSegmentTargets.apply(this, arguments);
|
|
12036
12153
|
}
|
|
12037
12154
|
|
|
@@ -12049,29 +12166,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12049
12166
|
}, {
|
|
12050
12167
|
key: "querySegments",
|
|
12051
12168
|
value: function () {
|
|
12052
|
-
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12169
|
+
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(filter, sort) {
|
|
12053
12170
|
var options,
|
|
12054
|
-
|
|
12055
|
-
return _regeneratorRuntime.wrap(function
|
|
12171
|
+
_args76 = arguments;
|
|
12172
|
+
return _regeneratorRuntime.wrap(function _callee76$(_context76) {
|
|
12056
12173
|
while (1) {
|
|
12057
|
-
switch (
|
|
12174
|
+
switch (_context76.prev = _context76.next) {
|
|
12058
12175
|
case 0:
|
|
12059
|
-
options =
|
|
12176
|
+
options = _args76.length > 2 && _args76[2] !== undefined ? _args76[2] : {};
|
|
12060
12177
|
this.validateServerSideAuth();
|
|
12061
|
-
return
|
|
12178
|
+
return _context76.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
|
|
12062
12179
|
filter: filter,
|
|
12063
12180
|
sort: sort
|
|
12064
12181
|
}, options)));
|
|
12065
12182
|
|
|
12066
12183
|
case 3:
|
|
12067
12184
|
case "end":
|
|
12068
|
-
return
|
|
12185
|
+
return _context76.stop();
|
|
12069
12186
|
}
|
|
12070
12187
|
}
|
|
12071
|
-
},
|
|
12188
|
+
}, _callee76, this);
|
|
12072
12189
|
}));
|
|
12073
12190
|
|
|
12074
|
-
function querySegments(
|
|
12191
|
+
function querySegments(_x109, _x110) {
|
|
12075
12192
|
return _querySegments.apply(this, arguments);
|
|
12076
12193
|
}
|
|
12077
12194
|
|
|
@@ -12088,23 +12205,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12088
12205
|
}, {
|
|
12089
12206
|
key: "deleteSegment",
|
|
12090
12207
|
value: function () {
|
|
12091
|
-
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12092
|
-
return _regeneratorRuntime.wrap(function
|
|
12208
|
+
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(id) {
|
|
12209
|
+
return _regeneratorRuntime.wrap(function _callee77$(_context77) {
|
|
12093
12210
|
while (1) {
|
|
12094
|
-
switch (
|
|
12211
|
+
switch (_context77.prev = _context77.next) {
|
|
12095
12212
|
case 0:
|
|
12096
12213
|
this.validateServerSideAuth();
|
|
12097
|
-
return
|
|
12214
|
+
return _context77.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
|
|
12098
12215
|
|
|
12099
12216
|
case 2:
|
|
12100
12217
|
case "end":
|
|
12101
|
-
return
|
|
12218
|
+
return _context77.stop();
|
|
12102
12219
|
}
|
|
12103
12220
|
}
|
|
12104
|
-
},
|
|
12221
|
+
}, _callee77, this);
|
|
12105
12222
|
}));
|
|
12106
12223
|
|
|
12107
|
-
function deleteSegment(
|
|
12224
|
+
function deleteSegment(_x111) {
|
|
12108
12225
|
return _deleteSegment.apply(this, arguments);
|
|
12109
12226
|
}
|
|
12110
12227
|
|
|
@@ -12122,23 +12239,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12122
12239
|
}, {
|
|
12123
12240
|
key: "segmentTargetExists",
|
|
12124
12241
|
value: function () {
|
|
12125
|
-
var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12126
|
-
return _regeneratorRuntime.wrap(function
|
|
12242
|
+
var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(segmentId, targetId) {
|
|
12243
|
+
return _regeneratorRuntime.wrap(function _callee78$(_context78) {
|
|
12127
12244
|
while (1) {
|
|
12128
|
-
switch (
|
|
12245
|
+
switch (_context78.prev = _context78.next) {
|
|
12129
12246
|
case 0:
|
|
12130
12247
|
this.validateServerSideAuth();
|
|
12131
|
-
return
|
|
12248
|
+
return _context78.abrupt("return", this.get(this.baseURL + "/segments/".concat(segmentId, "/target/").concat(targetId)));
|
|
12132
12249
|
|
|
12133
12250
|
case 2:
|
|
12134
12251
|
case "end":
|
|
12135
|
-
return
|
|
12252
|
+
return _context78.stop();
|
|
12136
12253
|
}
|
|
12137
12254
|
}
|
|
12138
|
-
},
|
|
12255
|
+
}, _callee78, this);
|
|
12139
12256
|
}));
|
|
12140
12257
|
|
|
12141
|
-
function segmentTargetExists(
|
|
12258
|
+
function segmentTargetExists(_x112, _x113) {
|
|
12142
12259
|
return _segmentTargetExists.apply(this, arguments);
|
|
12143
12260
|
}
|
|
12144
12261
|
|
|
@@ -12155,23 +12272,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12155
12272
|
}, {
|
|
12156
12273
|
key: "createCampaign",
|
|
12157
12274
|
value: function () {
|
|
12158
|
-
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12159
|
-
return _regeneratorRuntime.wrap(function
|
|
12275
|
+
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(params) {
|
|
12276
|
+
return _regeneratorRuntime.wrap(function _callee79$(_context79) {
|
|
12160
12277
|
while (1) {
|
|
12161
|
-
switch (
|
|
12278
|
+
switch (_context79.prev = _context79.next) {
|
|
12162
12279
|
case 0:
|
|
12163
12280
|
this.validateServerSideAuth();
|
|
12164
|
-
return
|
|
12281
|
+
return _context79.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
|
|
12165
12282
|
|
|
12166
12283
|
case 2:
|
|
12167
12284
|
case "end":
|
|
12168
|
-
return
|
|
12285
|
+
return _context79.stop();
|
|
12169
12286
|
}
|
|
12170
12287
|
}
|
|
12171
|
-
},
|
|
12288
|
+
}, _callee79, this);
|
|
12172
12289
|
}));
|
|
12173
12290
|
|
|
12174
|
-
function createCampaign(
|
|
12291
|
+
function createCampaign(_x114) {
|
|
12175
12292
|
return _createCampaign.apply(this, arguments);
|
|
12176
12293
|
}
|
|
12177
12294
|
|
|
@@ -12180,23 +12297,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12180
12297
|
}, {
|
|
12181
12298
|
key: "getCampaign",
|
|
12182
12299
|
value: function () {
|
|
12183
|
-
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12184
|
-
return _regeneratorRuntime.wrap(function
|
|
12300
|
+
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(id) {
|
|
12301
|
+
return _regeneratorRuntime.wrap(function _callee80$(_context80) {
|
|
12185
12302
|
while (1) {
|
|
12186
|
-
switch (
|
|
12303
|
+
switch (_context80.prev = _context80.next) {
|
|
12187
12304
|
case 0:
|
|
12188
12305
|
this.validateServerSideAuth();
|
|
12189
|
-
return
|
|
12306
|
+
return _context80.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(id)));
|
|
12190
12307
|
|
|
12191
12308
|
case 2:
|
|
12192
12309
|
case "end":
|
|
12193
|
-
return
|
|
12310
|
+
return _context80.stop();
|
|
12194
12311
|
}
|
|
12195
12312
|
}
|
|
12196
|
-
},
|
|
12313
|
+
}, _callee80, this);
|
|
12197
12314
|
}));
|
|
12198
12315
|
|
|
12199
|
-
function getCampaign(
|
|
12316
|
+
function getCampaign(_x115) {
|
|
12200
12317
|
return _getCampaign.apply(this, arguments);
|
|
12201
12318
|
}
|
|
12202
12319
|
|
|
@@ -12205,26 +12322,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12205
12322
|
}, {
|
|
12206
12323
|
key: "startCampaign",
|
|
12207
12324
|
value: function () {
|
|
12208
|
-
var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12209
|
-
return _regeneratorRuntime.wrap(function
|
|
12325
|
+
var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(id, options) {
|
|
12326
|
+
return _regeneratorRuntime.wrap(function _callee81$(_context81) {
|
|
12210
12327
|
while (1) {
|
|
12211
|
-
switch (
|
|
12328
|
+
switch (_context81.prev = _context81.next) {
|
|
12212
12329
|
case 0:
|
|
12213
12330
|
this.validateServerSideAuth();
|
|
12214
|
-
return
|
|
12331
|
+
return _context81.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/start"), {
|
|
12215
12332
|
scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
|
|
12216
12333
|
stop_at: options === null || options === void 0 ? void 0 : options.stopAt
|
|
12217
12334
|
}));
|
|
12218
12335
|
|
|
12219
12336
|
case 2:
|
|
12220
12337
|
case "end":
|
|
12221
|
-
return
|
|
12338
|
+
return _context81.stop();
|
|
12222
12339
|
}
|
|
12223
12340
|
}
|
|
12224
|
-
},
|
|
12341
|
+
}, _callee81, this);
|
|
12225
12342
|
}));
|
|
12226
12343
|
|
|
12227
|
-
function startCampaign(
|
|
12344
|
+
function startCampaign(_x116, _x117) {
|
|
12228
12345
|
return _startCampaign.apply(this, arguments);
|
|
12229
12346
|
}
|
|
12230
12347
|
|
|
@@ -12240,30 +12357,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12240
12357
|
}, {
|
|
12241
12358
|
key: "queryCampaigns",
|
|
12242
12359
|
value: function () {
|
|
12243
|
-
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12244
|
-
return _regeneratorRuntime.wrap(function
|
|
12360
|
+
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(filter, sort, options) {
|
|
12361
|
+
return _regeneratorRuntime.wrap(function _callee82$(_context82) {
|
|
12245
12362
|
while (1) {
|
|
12246
|
-
switch (
|
|
12363
|
+
switch (_context82.prev = _context82.next) {
|
|
12247
12364
|
case 0:
|
|
12248
12365
|
this.validateServerSideAuth();
|
|
12249
|
-
|
|
12366
|
+
_context82.next = 3;
|
|
12250
12367
|
return this.post(this.baseURL + "/campaigns/query", _objectSpread({
|
|
12251
12368
|
filter: filter,
|
|
12252
12369
|
sort: sort
|
|
12253
12370
|
}, options || {}));
|
|
12254
12371
|
|
|
12255
12372
|
case 3:
|
|
12256
|
-
return
|
|
12373
|
+
return _context82.abrupt("return", _context82.sent);
|
|
12257
12374
|
|
|
12258
12375
|
case 4:
|
|
12259
12376
|
case "end":
|
|
12260
|
-
return
|
|
12377
|
+
return _context82.stop();
|
|
12261
12378
|
}
|
|
12262
12379
|
}
|
|
12263
|
-
},
|
|
12380
|
+
}, _callee82, this);
|
|
12264
12381
|
}));
|
|
12265
12382
|
|
|
12266
|
-
function queryCampaigns(
|
|
12383
|
+
function queryCampaigns(_x118, _x119, _x120) {
|
|
12267
12384
|
return _queryCampaigns.apply(this, arguments);
|
|
12268
12385
|
}
|
|
12269
12386
|
|
|
@@ -12281,23 +12398,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12281
12398
|
}, {
|
|
12282
12399
|
key: "updateCampaign",
|
|
12283
12400
|
value: function () {
|
|
12284
|
-
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12285
|
-
return _regeneratorRuntime.wrap(function
|
|
12401
|
+
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(id, params) {
|
|
12402
|
+
return _regeneratorRuntime.wrap(function _callee83$(_context83) {
|
|
12286
12403
|
while (1) {
|
|
12287
|
-
switch (
|
|
12404
|
+
switch (_context83.prev = _context83.next) {
|
|
12288
12405
|
case 0:
|
|
12289
12406
|
this.validateServerSideAuth();
|
|
12290
|
-
return
|
|
12407
|
+
return _context83.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(id), params));
|
|
12291
12408
|
|
|
12292
12409
|
case 2:
|
|
12293
12410
|
case "end":
|
|
12294
|
-
return
|
|
12411
|
+
return _context83.stop();
|
|
12295
12412
|
}
|
|
12296
12413
|
}
|
|
12297
|
-
},
|
|
12414
|
+
}, _callee83, this);
|
|
12298
12415
|
}));
|
|
12299
12416
|
|
|
12300
|
-
function updateCampaign(
|
|
12417
|
+
function updateCampaign(_x121, _x122) {
|
|
12301
12418
|
return _updateCampaign.apply(this, arguments);
|
|
12302
12419
|
}
|
|
12303
12420
|
|
|
@@ -12314,23 +12431,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12314
12431
|
}, {
|
|
12315
12432
|
key: "deleteCampaign",
|
|
12316
12433
|
value: function () {
|
|
12317
|
-
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12318
|
-
return _regeneratorRuntime.wrap(function
|
|
12434
|
+
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(id) {
|
|
12435
|
+
return _regeneratorRuntime.wrap(function _callee84$(_context84) {
|
|
12319
12436
|
while (1) {
|
|
12320
|
-
switch (
|
|
12437
|
+
switch (_context84.prev = _context84.next) {
|
|
12321
12438
|
case 0:
|
|
12322
12439
|
this.validateServerSideAuth();
|
|
12323
|
-
return
|
|
12440
|
+
return _context84.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
|
|
12324
12441
|
|
|
12325
12442
|
case 2:
|
|
12326
12443
|
case "end":
|
|
12327
|
-
return
|
|
12444
|
+
return _context84.stop();
|
|
12328
12445
|
}
|
|
12329
12446
|
}
|
|
12330
|
-
},
|
|
12447
|
+
}, _callee84, this);
|
|
12331
12448
|
}));
|
|
12332
12449
|
|
|
12333
|
-
function deleteCampaign(
|
|
12450
|
+
function deleteCampaign(_x123) {
|
|
12334
12451
|
return _deleteCampaign.apply(this, arguments);
|
|
12335
12452
|
}
|
|
12336
12453
|
|
|
@@ -12347,23 +12464,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12347
12464
|
}, {
|
|
12348
12465
|
key: "stopCampaign",
|
|
12349
12466
|
value: function () {
|
|
12350
|
-
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12351
|
-
return _regeneratorRuntime.wrap(function
|
|
12467
|
+
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(id) {
|
|
12468
|
+
return _regeneratorRuntime.wrap(function _callee85$(_context85) {
|
|
12352
12469
|
while (1) {
|
|
12353
|
-
switch (
|
|
12470
|
+
switch (_context85.prev = _context85.next) {
|
|
12354
12471
|
case 0:
|
|
12355
12472
|
this.validateServerSideAuth();
|
|
12356
|
-
return
|
|
12473
|
+
return _context85.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/stop")));
|
|
12357
12474
|
|
|
12358
12475
|
case 2:
|
|
12359
12476
|
case "end":
|
|
12360
|
-
return
|
|
12477
|
+
return _context85.stop();
|
|
12361
12478
|
}
|
|
12362
12479
|
}
|
|
12363
|
-
},
|
|
12480
|
+
}, _callee85, this);
|
|
12364
12481
|
}));
|
|
12365
12482
|
|
|
12366
|
-
function stopCampaign(
|
|
12483
|
+
function stopCampaign(_x124) {
|
|
12367
12484
|
return _stopCampaign.apply(this, arguments);
|
|
12368
12485
|
}
|
|
12369
12486
|
|
|
@@ -12379,24 +12496,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12379
12496
|
}, {
|
|
12380
12497
|
key: "enrichURL",
|
|
12381
12498
|
value: function () {
|
|
12382
|
-
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12383
|
-
return _regeneratorRuntime.wrap(function
|
|
12499
|
+
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(url) {
|
|
12500
|
+
return _regeneratorRuntime.wrap(function _callee86$(_context86) {
|
|
12384
12501
|
while (1) {
|
|
12385
|
-
switch (
|
|
12502
|
+
switch (_context86.prev = _context86.next) {
|
|
12386
12503
|
case 0:
|
|
12387
|
-
return
|
|
12504
|
+
return _context86.abrupt("return", this.get(this.baseURL + "/og", {
|
|
12388
12505
|
url: url
|
|
12389
12506
|
}));
|
|
12390
12507
|
|
|
12391
12508
|
case 1:
|
|
12392
12509
|
case "end":
|
|
12393
|
-
return
|
|
12510
|
+
return _context86.stop();
|
|
12394
12511
|
}
|
|
12395
12512
|
}
|
|
12396
|
-
},
|
|
12513
|
+
}, _callee86, this);
|
|
12397
12514
|
}));
|
|
12398
12515
|
|
|
12399
|
-
function enrichURL(
|
|
12516
|
+
function enrichURL(_x125) {
|
|
12400
12517
|
return _enrichURL.apply(this, arguments);
|
|
12401
12518
|
}
|
|
12402
12519
|
|
|
@@ -12413,22 +12530,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12413
12530
|
}, {
|
|
12414
12531
|
key: "getTask",
|
|
12415
12532
|
value: function () {
|
|
12416
|
-
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12417
|
-
return _regeneratorRuntime.wrap(function
|
|
12533
|
+
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87(id) {
|
|
12534
|
+
return _regeneratorRuntime.wrap(function _callee87$(_context87) {
|
|
12418
12535
|
while (1) {
|
|
12419
|
-
switch (
|
|
12536
|
+
switch (_context87.prev = _context87.next) {
|
|
12420
12537
|
case 0:
|
|
12421
|
-
return
|
|
12538
|
+
return _context87.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
12422
12539
|
|
|
12423
12540
|
case 1:
|
|
12424
12541
|
case "end":
|
|
12425
|
-
return
|
|
12542
|
+
return _context87.stop();
|
|
12426
12543
|
}
|
|
12427
12544
|
}
|
|
12428
|
-
},
|
|
12545
|
+
}, _callee87, this);
|
|
12429
12546
|
}));
|
|
12430
12547
|
|
|
12431
|
-
function getTask(
|
|
12548
|
+
function getTask(_x126) {
|
|
12432
12549
|
return _getTask.apply(this, arguments);
|
|
12433
12550
|
}
|
|
12434
12551
|
|
|
@@ -12446,31 +12563,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12446
12563
|
}, {
|
|
12447
12564
|
key: "deleteChannels",
|
|
12448
12565
|
value: function () {
|
|
12449
|
-
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12566
|
+
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(cids) {
|
|
12450
12567
|
var options,
|
|
12451
|
-
|
|
12452
|
-
return _regeneratorRuntime.wrap(function
|
|
12568
|
+
_args88 = arguments;
|
|
12569
|
+
return _regeneratorRuntime.wrap(function _callee88$(_context88) {
|
|
12453
12570
|
while (1) {
|
|
12454
|
-
switch (
|
|
12571
|
+
switch (_context88.prev = _context88.next) {
|
|
12455
12572
|
case 0:
|
|
12456
|
-
options =
|
|
12457
|
-
|
|
12573
|
+
options = _args88.length > 1 && _args88[1] !== undefined ? _args88[1] : {};
|
|
12574
|
+
_context88.next = 3;
|
|
12458
12575
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
12459
12576
|
cids: cids
|
|
12460
12577
|
}, options));
|
|
12461
12578
|
|
|
12462
12579
|
case 3:
|
|
12463
|
-
return
|
|
12580
|
+
return _context88.abrupt("return", _context88.sent);
|
|
12464
12581
|
|
|
12465
12582
|
case 4:
|
|
12466
12583
|
case "end":
|
|
12467
|
-
return
|
|
12584
|
+
return _context88.stop();
|
|
12468
12585
|
}
|
|
12469
12586
|
}
|
|
12470
|
-
},
|
|
12587
|
+
}, _callee88, this);
|
|
12471
12588
|
}));
|
|
12472
12589
|
|
|
12473
|
-
function deleteChannels(
|
|
12590
|
+
function deleteChannels(_x127) {
|
|
12474
12591
|
return _deleteChannels.apply(this, arguments);
|
|
12475
12592
|
}
|
|
12476
12593
|
|
|
@@ -12488,17 +12605,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12488
12605
|
}, {
|
|
12489
12606
|
key: "deleteUsers",
|
|
12490
12607
|
value: function () {
|
|
12491
|
-
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12608
|
+
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee89(user_ids) {
|
|
12492
12609
|
var options,
|
|
12493
|
-
|
|
12494
|
-
return _regeneratorRuntime.wrap(function
|
|
12610
|
+
_args89 = arguments;
|
|
12611
|
+
return _regeneratorRuntime.wrap(function _callee89$(_context89) {
|
|
12495
12612
|
while (1) {
|
|
12496
|
-
switch (
|
|
12613
|
+
switch (_context89.prev = _context89.next) {
|
|
12497
12614
|
case 0:
|
|
12498
|
-
options =
|
|
12615
|
+
options = _args89.length > 1 && _args89[1] !== undefined ? _args89[1] : {};
|
|
12499
12616
|
|
|
12500
12617
|
if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
|
|
12501
|
-
|
|
12618
|
+
_context89.next = 3;
|
|
12502
12619
|
break;
|
|
12503
12620
|
}
|
|
12504
12621
|
|
|
@@ -12506,7 +12623,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12506
12623
|
|
|
12507
12624
|
case 3:
|
|
12508
12625
|
if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
|
|
12509
|
-
|
|
12626
|
+
_context89.next = 5;
|
|
12510
12627
|
break;
|
|
12511
12628
|
}
|
|
12512
12629
|
|
|
@@ -12514,30 +12631,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12514
12631
|
|
|
12515
12632
|
case 5:
|
|
12516
12633
|
if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
|
|
12517
|
-
|
|
12634
|
+
_context89.next = 7;
|
|
12518
12635
|
break;
|
|
12519
12636
|
}
|
|
12520
12637
|
|
|
12521
12638
|
throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
|
|
12522
12639
|
|
|
12523
12640
|
case 7:
|
|
12524
|
-
|
|
12641
|
+
_context89.next = 9;
|
|
12525
12642
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
12526
12643
|
user_ids: user_ids
|
|
12527
12644
|
}, options));
|
|
12528
12645
|
|
|
12529
12646
|
case 9:
|
|
12530
|
-
return
|
|
12647
|
+
return _context89.abrupt("return", _context89.sent);
|
|
12531
12648
|
|
|
12532
12649
|
case 10:
|
|
12533
12650
|
case "end":
|
|
12534
|
-
return
|
|
12651
|
+
return _context89.stop();
|
|
12535
12652
|
}
|
|
12536
12653
|
}
|
|
12537
|
-
},
|
|
12654
|
+
}, _callee89, this);
|
|
12538
12655
|
}));
|
|
12539
12656
|
|
|
12540
|
-
function deleteUsers(
|
|
12657
|
+
function deleteUsers(_x128) {
|
|
12541
12658
|
return _deleteUsers.apply(this, arguments);
|
|
12542
12659
|
}
|
|
12543
12660
|
|
|
@@ -12558,28 +12675,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12558
12675
|
}, {
|
|
12559
12676
|
key: "_createImportURL",
|
|
12560
12677
|
value: function () {
|
|
12561
|
-
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12562
|
-
return _regeneratorRuntime.wrap(function
|
|
12678
|
+
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee90(filename) {
|
|
12679
|
+
return _regeneratorRuntime.wrap(function _callee90$(_context90) {
|
|
12563
12680
|
while (1) {
|
|
12564
|
-
switch (
|
|
12681
|
+
switch (_context90.prev = _context90.next) {
|
|
12565
12682
|
case 0:
|
|
12566
|
-
|
|
12683
|
+
_context90.next = 2;
|
|
12567
12684
|
return this.post(this.baseURL + "/import_urls", {
|
|
12568
12685
|
filename: filename
|
|
12569
12686
|
});
|
|
12570
12687
|
|
|
12571
12688
|
case 2:
|
|
12572
|
-
return
|
|
12689
|
+
return _context90.abrupt("return", _context90.sent);
|
|
12573
12690
|
|
|
12574
12691
|
case 3:
|
|
12575
12692
|
case "end":
|
|
12576
|
-
return
|
|
12693
|
+
return _context90.stop();
|
|
12577
12694
|
}
|
|
12578
12695
|
}
|
|
12579
|
-
},
|
|
12696
|
+
}, _callee90, this);
|
|
12580
12697
|
}));
|
|
12581
12698
|
|
|
12582
|
-
function _createImportURL(
|
|
12699
|
+
function _createImportURL(_x129) {
|
|
12583
12700
|
return _createImportURL2.apply(this, arguments);
|
|
12584
12701
|
}
|
|
12585
12702
|
|
|
@@ -12601,33 +12718,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12601
12718
|
}, {
|
|
12602
12719
|
key: "_createImport",
|
|
12603
12720
|
value: function () {
|
|
12604
|
-
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12721
|
+
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee91(path) {
|
|
12605
12722
|
var options,
|
|
12606
|
-
|
|
12607
|
-
return _regeneratorRuntime.wrap(function
|
|
12723
|
+
_args91 = arguments;
|
|
12724
|
+
return _regeneratorRuntime.wrap(function _callee91$(_context91) {
|
|
12608
12725
|
while (1) {
|
|
12609
|
-
switch (
|
|
12726
|
+
switch (_context91.prev = _context91.next) {
|
|
12610
12727
|
case 0:
|
|
12611
|
-
options =
|
|
12728
|
+
options = _args91.length > 1 && _args91[1] !== undefined ? _args91[1] : {
|
|
12612
12729
|
mode: 'upsert'
|
|
12613
12730
|
};
|
|
12614
|
-
|
|
12731
|
+
_context91.next = 3;
|
|
12615
12732
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
12616
12733
|
path: path
|
|
12617
12734
|
}, options));
|
|
12618
12735
|
|
|
12619
12736
|
case 3:
|
|
12620
|
-
return
|
|
12737
|
+
return _context91.abrupt("return", _context91.sent);
|
|
12621
12738
|
|
|
12622
12739
|
case 4:
|
|
12623
12740
|
case "end":
|
|
12624
|
-
return
|
|
12741
|
+
return _context91.stop();
|
|
12625
12742
|
}
|
|
12626
12743
|
}
|
|
12627
|
-
},
|
|
12744
|
+
}, _callee91, this);
|
|
12628
12745
|
}));
|
|
12629
12746
|
|
|
12630
|
-
function _createImport(
|
|
12747
|
+
function _createImport(_x130) {
|
|
12631
12748
|
return _createImport2.apply(this, arguments);
|
|
12632
12749
|
}
|
|
12633
12750
|
|
|
@@ -12649,26 +12766,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12649
12766
|
}, {
|
|
12650
12767
|
key: "_getImport",
|
|
12651
12768
|
value: function () {
|
|
12652
|
-
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12653
|
-
return _regeneratorRuntime.wrap(function
|
|
12769
|
+
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee92(id) {
|
|
12770
|
+
return _regeneratorRuntime.wrap(function _callee92$(_context92) {
|
|
12654
12771
|
while (1) {
|
|
12655
|
-
switch (
|
|
12772
|
+
switch (_context92.prev = _context92.next) {
|
|
12656
12773
|
case 0:
|
|
12657
|
-
|
|
12774
|
+
_context92.next = 2;
|
|
12658
12775
|
return this.get(this.baseURL + "/imports/".concat(id));
|
|
12659
12776
|
|
|
12660
12777
|
case 2:
|
|
12661
|
-
return
|
|
12778
|
+
return _context92.abrupt("return", _context92.sent);
|
|
12662
12779
|
|
|
12663
12780
|
case 3:
|
|
12664
12781
|
case "end":
|
|
12665
|
-
return
|
|
12782
|
+
return _context92.stop();
|
|
12666
12783
|
}
|
|
12667
12784
|
}
|
|
12668
|
-
},
|
|
12785
|
+
}, _callee92, this);
|
|
12669
12786
|
}));
|
|
12670
12787
|
|
|
12671
|
-
function _getImport(
|
|
12788
|
+
function _getImport(_x131) {
|
|
12672
12789
|
return _getImport2.apply(this, arguments);
|
|
12673
12790
|
}
|
|
12674
12791
|
|
|
@@ -12690,26 +12807,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12690
12807
|
}, {
|
|
12691
12808
|
key: "_listImports",
|
|
12692
12809
|
value: function () {
|
|
12693
|
-
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12694
|
-
return _regeneratorRuntime.wrap(function
|
|
12810
|
+
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee93(options) {
|
|
12811
|
+
return _regeneratorRuntime.wrap(function _callee93$(_context93) {
|
|
12695
12812
|
while (1) {
|
|
12696
|
-
switch (
|
|
12813
|
+
switch (_context93.prev = _context93.next) {
|
|
12697
12814
|
case 0:
|
|
12698
|
-
|
|
12815
|
+
_context93.next = 2;
|
|
12699
12816
|
return this.get(this.baseURL + "/imports", options);
|
|
12700
12817
|
|
|
12701
12818
|
case 2:
|
|
12702
|
-
return
|
|
12819
|
+
return _context93.abrupt("return", _context93.sent);
|
|
12703
12820
|
|
|
12704
12821
|
case 3:
|
|
12705
12822
|
case "end":
|
|
12706
|
-
return
|
|
12823
|
+
return _context93.stop();
|
|
12707
12824
|
}
|
|
12708
12825
|
}
|
|
12709
|
-
},
|
|
12826
|
+
}, _callee93, this);
|
|
12710
12827
|
}));
|
|
12711
12828
|
|
|
12712
|
-
function _listImports(
|
|
12829
|
+
function _listImports(_x132) {
|
|
12713
12830
|
return _listImports2.apply(this, arguments);
|
|
12714
12831
|
}
|
|
12715
12832
|
|
|
@@ -12728,28 +12845,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12728
12845
|
}, {
|
|
12729
12846
|
key: "upsertPushProvider",
|
|
12730
12847
|
value: function () {
|
|
12731
|
-
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12732
|
-
return _regeneratorRuntime.wrap(function
|
|
12848
|
+
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee94(pushProvider) {
|
|
12849
|
+
return _regeneratorRuntime.wrap(function _callee94$(_context94) {
|
|
12733
12850
|
while (1) {
|
|
12734
|
-
switch (
|
|
12851
|
+
switch (_context94.prev = _context94.next) {
|
|
12735
12852
|
case 0:
|
|
12736
|
-
|
|
12853
|
+
_context94.next = 2;
|
|
12737
12854
|
return this.post(this.baseURL + "/push_providers", {
|
|
12738
12855
|
push_provider: pushProvider
|
|
12739
12856
|
});
|
|
12740
12857
|
|
|
12741
12858
|
case 2:
|
|
12742
|
-
return
|
|
12859
|
+
return _context94.abrupt("return", _context94.sent);
|
|
12743
12860
|
|
|
12744
12861
|
case 3:
|
|
12745
12862
|
case "end":
|
|
12746
|
-
return
|
|
12863
|
+
return _context94.stop();
|
|
12747
12864
|
}
|
|
12748
12865
|
}
|
|
12749
|
-
},
|
|
12866
|
+
}, _callee94, this);
|
|
12750
12867
|
}));
|
|
12751
12868
|
|
|
12752
|
-
function upsertPushProvider(
|
|
12869
|
+
function upsertPushProvider(_x133) {
|
|
12753
12870
|
return _upsertPushProvider.apply(this, arguments);
|
|
12754
12871
|
}
|
|
12755
12872
|
|
|
@@ -12768,28 +12885,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12768
12885
|
}, {
|
|
12769
12886
|
key: "deletePushProvider",
|
|
12770
12887
|
value: function () {
|
|
12771
|
-
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12888
|
+
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee95(_ref10) {
|
|
12772
12889
|
var type, name;
|
|
12773
|
-
return _regeneratorRuntime.wrap(function
|
|
12890
|
+
return _regeneratorRuntime.wrap(function _callee95$(_context95) {
|
|
12774
12891
|
while (1) {
|
|
12775
|
-
switch (
|
|
12892
|
+
switch (_context95.prev = _context95.next) {
|
|
12776
12893
|
case 0:
|
|
12777
12894
|
type = _ref10.type, name = _ref10.name;
|
|
12778
|
-
|
|
12895
|
+
_context95.next = 3;
|
|
12779
12896
|
return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
|
|
12780
12897
|
|
|
12781
12898
|
case 3:
|
|
12782
|
-
return
|
|
12899
|
+
return _context95.abrupt("return", _context95.sent);
|
|
12783
12900
|
|
|
12784
12901
|
case 4:
|
|
12785
12902
|
case "end":
|
|
12786
|
-
return
|
|
12903
|
+
return _context95.stop();
|
|
12787
12904
|
}
|
|
12788
12905
|
}
|
|
12789
|
-
},
|
|
12906
|
+
}, _callee95, this);
|
|
12790
12907
|
}));
|
|
12791
12908
|
|
|
12792
|
-
function deletePushProvider(
|
|
12909
|
+
function deletePushProvider(_x134) {
|
|
12793
12910
|
return _deletePushProvider.apply(this, arguments);
|
|
12794
12911
|
}
|
|
12795
12912
|
|
|
@@ -12806,23 +12923,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12806
12923
|
}, {
|
|
12807
12924
|
key: "listPushProviders",
|
|
12808
12925
|
value: function () {
|
|
12809
|
-
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12810
|
-
return _regeneratorRuntime.wrap(function
|
|
12926
|
+
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee96() {
|
|
12927
|
+
return _regeneratorRuntime.wrap(function _callee96$(_context96) {
|
|
12811
12928
|
while (1) {
|
|
12812
|
-
switch (
|
|
12929
|
+
switch (_context96.prev = _context96.next) {
|
|
12813
12930
|
case 0:
|
|
12814
|
-
|
|
12931
|
+
_context96.next = 2;
|
|
12815
12932
|
return this.get(this.baseURL + "/push_providers");
|
|
12816
12933
|
|
|
12817
12934
|
case 2:
|
|
12818
|
-
return
|
|
12935
|
+
return _context96.abrupt("return", _context96.sent);
|
|
12819
12936
|
|
|
12820
12937
|
case 3:
|
|
12821
12938
|
case "end":
|
|
12822
|
-
return
|
|
12939
|
+
return _context96.stop();
|
|
12823
12940
|
}
|
|
12824
12941
|
}
|
|
12825
|
-
},
|
|
12942
|
+
}, _callee96, this);
|
|
12826
12943
|
}));
|
|
12827
12944
|
|
|
12828
12945
|
function listPushProviders() {
|
|
@@ -12850,26 +12967,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12850
12967
|
}, {
|
|
12851
12968
|
key: "commitMessage",
|
|
12852
12969
|
value: function () {
|
|
12853
|
-
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12854
|
-
return _regeneratorRuntime.wrap(function
|
|
12970
|
+
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee97(id) {
|
|
12971
|
+
return _regeneratorRuntime.wrap(function _callee97$(_context97) {
|
|
12855
12972
|
while (1) {
|
|
12856
|
-
switch (
|
|
12973
|
+
switch (_context97.prev = _context97.next) {
|
|
12857
12974
|
case 0:
|
|
12858
|
-
|
|
12975
|
+
_context97.next = 2;
|
|
12859
12976
|
return this.post(this.baseURL + "/messages/".concat(id, "/commit"));
|
|
12860
12977
|
|
|
12861
12978
|
case 2:
|
|
12862
|
-
return
|
|
12979
|
+
return _context97.abrupt("return", _context97.sent);
|
|
12863
12980
|
|
|
12864
12981
|
case 3:
|
|
12865
12982
|
case "end":
|
|
12866
|
-
return
|
|
12983
|
+
return _context97.stop();
|
|
12867
12984
|
}
|
|
12868
12985
|
}
|
|
12869
|
-
},
|
|
12986
|
+
}, _callee97, this);
|
|
12870
12987
|
}));
|
|
12871
12988
|
|
|
12872
|
-
function commitMessage(
|
|
12989
|
+
function commitMessage(_x135) {
|
|
12873
12990
|
return _commitMessage.apply(this, arguments);
|
|
12874
12991
|
}
|
|
12875
12992
|
|
|
@@ -12884,26 +13001,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12884
13001
|
}, {
|
|
12885
13002
|
key: "createPoll",
|
|
12886
13003
|
value: function () {
|
|
12887
|
-
var _createPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12888
|
-
return _regeneratorRuntime.wrap(function
|
|
13004
|
+
var _createPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee98(poll) {
|
|
13005
|
+
return _regeneratorRuntime.wrap(function _callee98$(_context98) {
|
|
12889
13006
|
while (1) {
|
|
12890
|
-
switch (
|
|
13007
|
+
switch (_context98.prev = _context98.next) {
|
|
12891
13008
|
case 0:
|
|
12892
|
-
|
|
13009
|
+
_context98.next = 2;
|
|
12893
13010
|
return this.post(this.baseURL + "/polls", poll);
|
|
12894
13011
|
|
|
12895
13012
|
case 2:
|
|
12896
|
-
return
|
|
13013
|
+
return _context98.abrupt("return", _context98.sent);
|
|
12897
13014
|
|
|
12898
13015
|
case 3:
|
|
12899
13016
|
case "end":
|
|
12900
|
-
return
|
|
13017
|
+
return _context98.stop();
|
|
12901
13018
|
}
|
|
12902
13019
|
}
|
|
12903
|
-
},
|
|
13020
|
+
}, _callee98, this);
|
|
12904
13021
|
}));
|
|
12905
13022
|
|
|
12906
|
-
function createPoll(
|
|
13023
|
+
function createPoll(_x136) {
|
|
12907
13024
|
return _createPoll.apply(this, arguments);
|
|
12908
13025
|
}
|
|
12909
13026
|
|
|
@@ -12918,28 +13035,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12918
13035
|
}, {
|
|
12919
13036
|
key: "getPoll",
|
|
12920
13037
|
value: function () {
|
|
12921
|
-
var _getPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12922
|
-
return _regeneratorRuntime.wrap(function
|
|
13038
|
+
var _getPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee99(id, userId) {
|
|
13039
|
+
return _regeneratorRuntime.wrap(function _callee99$(_context99) {
|
|
12923
13040
|
while (1) {
|
|
12924
|
-
switch (
|
|
13041
|
+
switch (_context99.prev = _context99.next) {
|
|
12925
13042
|
case 0:
|
|
12926
|
-
|
|
13043
|
+
_context99.next = 2;
|
|
12927
13044
|
return this.get(this.baseURL + "/polls/".concat(id), _objectSpread({}, userId ? {
|
|
12928
13045
|
user_id: userId
|
|
12929
13046
|
} : {}));
|
|
12930
13047
|
|
|
12931
13048
|
case 2:
|
|
12932
|
-
return
|
|
13049
|
+
return _context99.abrupt("return", _context99.sent);
|
|
12933
13050
|
|
|
12934
13051
|
case 3:
|
|
12935
13052
|
case "end":
|
|
12936
|
-
return
|
|
13053
|
+
return _context99.stop();
|
|
12937
13054
|
}
|
|
12938
13055
|
}
|
|
12939
|
-
},
|
|
13056
|
+
}, _callee99, this);
|
|
12940
13057
|
}));
|
|
12941
13058
|
|
|
12942
|
-
function getPoll(
|
|
13059
|
+
function getPoll(_x137, _x138) {
|
|
12943
13060
|
return _getPoll.apply(this, arguments);
|
|
12944
13061
|
}
|
|
12945
13062
|
|
|
@@ -12954,26 +13071,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12954
13071
|
}, {
|
|
12955
13072
|
key: "updatePoll",
|
|
12956
13073
|
value: function () {
|
|
12957
|
-
var _updatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12958
|
-
return _regeneratorRuntime.wrap(function
|
|
13074
|
+
var _updatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee100(poll) {
|
|
13075
|
+
return _regeneratorRuntime.wrap(function _callee100$(_context100) {
|
|
12959
13076
|
while (1) {
|
|
12960
|
-
switch (
|
|
13077
|
+
switch (_context100.prev = _context100.next) {
|
|
12961
13078
|
case 0:
|
|
12962
|
-
|
|
13079
|
+
_context100.next = 2;
|
|
12963
13080
|
return this.put(this.baseURL + "/polls", poll);
|
|
12964
13081
|
|
|
12965
13082
|
case 2:
|
|
12966
|
-
return
|
|
13083
|
+
return _context100.abrupt("return", _context100.sent);
|
|
12967
13084
|
|
|
12968
13085
|
case 3:
|
|
12969
13086
|
case "end":
|
|
12970
|
-
return
|
|
13087
|
+
return _context100.stop();
|
|
12971
13088
|
}
|
|
12972
13089
|
}
|
|
12973
|
-
},
|
|
13090
|
+
}, _callee100, this);
|
|
12974
13091
|
}));
|
|
12975
13092
|
|
|
12976
|
-
function updatePoll(
|
|
13093
|
+
function updatePoll(_x139) {
|
|
12977
13094
|
return _updatePoll.apply(this, arguments);
|
|
12978
13095
|
}
|
|
12979
13096
|
|
|
@@ -12990,26 +13107,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12990
13107
|
}, {
|
|
12991
13108
|
key: "partialUpdatePoll",
|
|
12992
13109
|
value: function () {
|
|
12993
|
-
var _partialUpdatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12994
|
-
return _regeneratorRuntime.wrap(function
|
|
13110
|
+
var _partialUpdatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee101(id, partialPollObject) {
|
|
13111
|
+
return _regeneratorRuntime.wrap(function _callee101$(_context101) {
|
|
12995
13112
|
while (1) {
|
|
12996
|
-
switch (
|
|
13113
|
+
switch (_context101.prev = _context101.next) {
|
|
12997
13114
|
case 0:
|
|
12998
|
-
|
|
13115
|
+
_context101.next = 2;
|
|
12999
13116
|
return this.patch(this.baseURL + "/polls/".concat(id), partialPollObject);
|
|
13000
13117
|
|
|
13001
13118
|
case 2:
|
|
13002
|
-
return
|
|
13119
|
+
return _context101.abrupt("return", _context101.sent);
|
|
13003
13120
|
|
|
13004
13121
|
case 3:
|
|
13005
13122
|
case "end":
|
|
13006
|
-
return
|
|
13123
|
+
return _context101.stop();
|
|
13007
13124
|
}
|
|
13008
13125
|
}
|
|
13009
|
-
},
|
|
13126
|
+
}, _callee101, this);
|
|
13010
13127
|
}));
|
|
13011
13128
|
|
|
13012
|
-
function partialUpdatePoll(
|
|
13129
|
+
function partialUpdatePoll(_x140, _x141) {
|
|
13013
13130
|
return _partialUpdatePoll.apply(this, arguments);
|
|
13014
13131
|
}
|
|
13015
13132
|
|
|
@@ -13025,28 +13142,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13025
13142
|
}, {
|
|
13026
13143
|
key: "deletePoll",
|
|
13027
13144
|
value: function () {
|
|
13028
|
-
var _deletePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13029
|
-
return _regeneratorRuntime.wrap(function
|
|
13145
|
+
var _deletePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee102(id, userId) {
|
|
13146
|
+
return _regeneratorRuntime.wrap(function _callee102$(_context102) {
|
|
13030
13147
|
while (1) {
|
|
13031
|
-
switch (
|
|
13148
|
+
switch (_context102.prev = _context102.next) {
|
|
13032
13149
|
case 0:
|
|
13033
|
-
|
|
13150
|
+
_context102.next = 2;
|
|
13034
13151
|
return this.delete(this.baseURL + "/polls/".concat(id), _objectSpread({}, userId ? {
|
|
13035
13152
|
user_id: userId
|
|
13036
13153
|
} : {}));
|
|
13037
13154
|
|
|
13038
13155
|
case 2:
|
|
13039
|
-
return
|
|
13156
|
+
return _context102.abrupt("return", _context102.sent);
|
|
13040
13157
|
|
|
13041
13158
|
case 3:
|
|
13042
13159
|
case "end":
|
|
13043
|
-
return
|
|
13160
|
+
return _context102.stop();
|
|
13044
13161
|
}
|
|
13045
13162
|
}
|
|
13046
|
-
},
|
|
13163
|
+
}, _callee102, this);
|
|
13047
13164
|
}));
|
|
13048
13165
|
|
|
13049
|
-
function deletePoll(
|
|
13166
|
+
function deletePoll(_x142, _x143) {
|
|
13050
13167
|
return _deletePoll.apply(this, arguments);
|
|
13051
13168
|
}
|
|
13052
13169
|
|
|
@@ -13061,12 +13178,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13061
13178
|
}, {
|
|
13062
13179
|
key: "closePoll",
|
|
13063
13180
|
value: function () {
|
|
13064
|
-
var _closePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13065
|
-
return _regeneratorRuntime.wrap(function
|
|
13181
|
+
var _closePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee103(id) {
|
|
13182
|
+
return _regeneratorRuntime.wrap(function _callee103$(_context103) {
|
|
13066
13183
|
while (1) {
|
|
13067
|
-
switch (
|
|
13184
|
+
switch (_context103.prev = _context103.next) {
|
|
13068
13185
|
case 0:
|
|
13069
|
-
return
|
|
13186
|
+
return _context103.abrupt("return", this.partialUpdatePoll(id, {
|
|
13070
13187
|
set: {
|
|
13071
13188
|
is_closed: true
|
|
13072
13189
|
}
|
|
@@ -13074,13 +13191,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13074
13191
|
|
|
13075
13192
|
case 1:
|
|
13076
13193
|
case "end":
|
|
13077
|
-
return
|
|
13194
|
+
return _context103.stop();
|
|
13078
13195
|
}
|
|
13079
13196
|
}
|
|
13080
|
-
},
|
|
13197
|
+
}, _callee103, this);
|
|
13081
13198
|
}));
|
|
13082
13199
|
|
|
13083
|
-
function closePoll(
|
|
13200
|
+
function closePoll(_x144) {
|
|
13084
13201
|
return _closePoll.apply(this, arguments);
|
|
13085
13202
|
}
|
|
13086
13203
|
|
|
@@ -13096,26 +13213,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13096
13213
|
}, {
|
|
13097
13214
|
key: "createPollOption",
|
|
13098
13215
|
value: function () {
|
|
13099
|
-
var _createPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13100
|
-
return _regeneratorRuntime.wrap(function
|
|
13216
|
+
var _createPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee104(pollId, option) {
|
|
13217
|
+
return _regeneratorRuntime.wrap(function _callee104$(_context104) {
|
|
13101
13218
|
while (1) {
|
|
13102
|
-
switch (
|
|
13219
|
+
switch (_context104.prev = _context104.next) {
|
|
13103
13220
|
case 0:
|
|
13104
|
-
|
|
13221
|
+
_context104.next = 2;
|
|
13105
13222
|
return this.post(this.baseURL + "/polls/".concat(pollId, "/options"), option);
|
|
13106
13223
|
|
|
13107
13224
|
case 2:
|
|
13108
|
-
return
|
|
13225
|
+
return _context104.abrupt("return", _context104.sent);
|
|
13109
13226
|
|
|
13110
13227
|
case 3:
|
|
13111
13228
|
case "end":
|
|
13112
|
-
return
|
|
13229
|
+
return _context104.stop();
|
|
13113
13230
|
}
|
|
13114
13231
|
}
|
|
13115
|
-
},
|
|
13232
|
+
}, _callee104, this);
|
|
13116
13233
|
}));
|
|
13117
13234
|
|
|
13118
|
-
function createPollOption(
|
|
13235
|
+
function createPollOption(_x145, _x146) {
|
|
13119
13236
|
return _createPollOption.apply(this, arguments);
|
|
13120
13237
|
}
|
|
13121
13238
|
|
|
@@ -13131,26 +13248,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13131
13248
|
}, {
|
|
13132
13249
|
key: "getPollOption",
|
|
13133
13250
|
value: function () {
|
|
13134
|
-
var _getPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13135
|
-
return _regeneratorRuntime.wrap(function
|
|
13251
|
+
var _getPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee105(pollId, optionId) {
|
|
13252
|
+
return _regeneratorRuntime.wrap(function _callee105$(_context105) {
|
|
13136
13253
|
while (1) {
|
|
13137
|
-
switch (
|
|
13254
|
+
switch (_context105.prev = _context105.next) {
|
|
13138
13255
|
case 0:
|
|
13139
|
-
|
|
13256
|
+
_context105.next = 2;
|
|
13140
13257
|
return this.get(this.baseURL + "/polls/".concat(pollId, "/options/").concat(optionId));
|
|
13141
13258
|
|
|
13142
13259
|
case 2:
|
|
13143
|
-
return
|
|
13260
|
+
return _context105.abrupt("return", _context105.sent);
|
|
13144
13261
|
|
|
13145
13262
|
case 3:
|
|
13146
13263
|
case "end":
|
|
13147
|
-
return
|
|
13264
|
+
return _context105.stop();
|
|
13148
13265
|
}
|
|
13149
13266
|
}
|
|
13150
|
-
},
|
|
13267
|
+
}, _callee105, this);
|
|
13151
13268
|
}));
|
|
13152
13269
|
|
|
13153
|
-
function getPollOption(
|
|
13270
|
+
function getPollOption(_x147, _x148) {
|
|
13154
13271
|
return _getPollOption.apply(this, arguments);
|
|
13155
13272
|
}
|
|
13156
13273
|
|
|
@@ -13166,26 +13283,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13166
13283
|
}, {
|
|
13167
13284
|
key: "updatePollOption",
|
|
13168
13285
|
value: function () {
|
|
13169
|
-
var _updatePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13170
|
-
return _regeneratorRuntime.wrap(function
|
|
13286
|
+
var _updatePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee106(pollId, option) {
|
|
13287
|
+
return _regeneratorRuntime.wrap(function _callee106$(_context106) {
|
|
13171
13288
|
while (1) {
|
|
13172
|
-
switch (
|
|
13289
|
+
switch (_context106.prev = _context106.next) {
|
|
13173
13290
|
case 0:
|
|
13174
|
-
|
|
13291
|
+
_context106.next = 2;
|
|
13175
13292
|
return this.put(this.baseURL + "/polls/".concat(pollId, "/options"), option);
|
|
13176
13293
|
|
|
13177
13294
|
case 2:
|
|
13178
|
-
return
|
|
13295
|
+
return _context106.abrupt("return", _context106.sent);
|
|
13179
13296
|
|
|
13180
13297
|
case 3:
|
|
13181
13298
|
case "end":
|
|
13182
|
-
return
|
|
13299
|
+
return _context106.stop();
|
|
13183
13300
|
}
|
|
13184
13301
|
}
|
|
13185
|
-
},
|
|
13302
|
+
}, _callee106, this);
|
|
13186
13303
|
}));
|
|
13187
13304
|
|
|
13188
|
-
function updatePollOption(
|
|
13305
|
+
function updatePollOption(_x149, _x150) {
|
|
13189
13306
|
return _updatePollOption.apply(this, arguments);
|
|
13190
13307
|
}
|
|
13191
13308
|
|
|
@@ -13201,26 +13318,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13201
13318
|
}, {
|
|
13202
13319
|
key: "deletePollOption",
|
|
13203
13320
|
value: function () {
|
|
13204
|
-
var _deletePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13205
|
-
return _regeneratorRuntime.wrap(function
|
|
13321
|
+
var _deletePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee107(pollId, optionId) {
|
|
13322
|
+
return _regeneratorRuntime.wrap(function _callee107$(_context107) {
|
|
13206
13323
|
while (1) {
|
|
13207
|
-
switch (
|
|
13324
|
+
switch (_context107.prev = _context107.next) {
|
|
13208
13325
|
case 0:
|
|
13209
|
-
|
|
13326
|
+
_context107.next = 2;
|
|
13210
13327
|
return this.delete(this.baseURL + "/polls/".concat(pollId, "/options/").concat(optionId));
|
|
13211
13328
|
|
|
13212
13329
|
case 2:
|
|
13213
|
-
return
|
|
13330
|
+
return _context107.abrupt("return", _context107.sent);
|
|
13214
13331
|
|
|
13215
13332
|
case 3:
|
|
13216
13333
|
case "end":
|
|
13217
|
-
return
|
|
13334
|
+
return _context107.stop();
|
|
13218
13335
|
}
|
|
13219
13336
|
}
|
|
13220
|
-
},
|
|
13337
|
+
}, _callee107, this);
|
|
13221
13338
|
}));
|
|
13222
13339
|
|
|
13223
|
-
function deletePollOption(
|
|
13340
|
+
function deletePollOption(_x151, _x152) {
|
|
13224
13341
|
return _deletePollOption.apply(this, arguments);
|
|
13225
13342
|
}
|
|
13226
13343
|
|
|
@@ -13237,31 +13354,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13237
13354
|
}, {
|
|
13238
13355
|
key: "castPollVote",
|
|
13239
13356
|
value: function () {
|
|
13240
|
-
var _castPollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13357
|
+
var _castPollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee108(messageId, pollId, vote) {
|
|
13241
13358
|
var options,
|
|
13242
|
-
|
|
13243
|
-
return _regeneratorRuntime.wrap(function
|
|
13359
|
+
_args108 = arguments;
|
|
13360
|
+
return _regeneratorRuntime.wrap(function _callee108$(_context108) {
|
|
13244
13361
|
while (1) {
|
|
13245
|
-
switch (
|
|
13362
|
+
switch (_context108.prev = _context108.next) {
|
|
13246
13363
|
case 0:
|
|
13247
|
-
options =
|
|
13248
|
-
|
|
13364
|
+
options = _args108.length > 3 && _args108[3] !== undefined ? _args108[3] : {};
|
|
13365
|
+
_context108.next = 3;
|
|
13249
13366
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/polls/").concat(pollId, "/vote"), _objectSpread({
|
|
13250
13367
|
vote: vote
|
|
13251
13368
|
}, options));
|
|
13252
13369
|
|
|
13253
13370
|
case 3:
|
|
13254
|
-
return
|
|
13371
|
+
return _context108.abrupt("return", _context108.sent);
|
|
13255
13372
|
|
|
13256
13373
|
case 4:
|
|
13257
13374
|
case "end":
|
|
13258
|
-
return
|
|
13375
|
+
return _context108.stop();
|
|
13259
13376
|
}
|
|
13260
13377
|
}
|
|
13261
|
-
},
|
|
13378
|
+
}, _callee108, this);
|
|
13262
13379
|
}));
|
|
13263
13380
|
|
|
13264
|
-
function castPollVote(
|
|
13381
|
+
function castPollVote(_x153, _x154, _x155) {
|
|
13265
13382
|
return _castPollVote.apply(this, arguments);
|
|
13266
13383
|
}
|
|
13267
13384
|
|
|
@@ -13277,24 +13394,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13277
13394
|
}, {
|
|
13278
13395
|
key: "addPollAnswer",
|
|
13279
13396
|
value: function () {
|
|
13280
|
-
var _addPollAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13281
|
-
return _regeneratorRuntime.wrap(function
|
|
13397
|
+
var _addPollAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee109(messageId, pollId, answerText) {
|
|
13398
|
+
return _regeneratorRuntime.wrap(function _callee109$(_context109) {
|
|
13282
13399
|
while (1) {
|
|
13283
|
-
switch (
|
|
13400
|
+
switch (_context109.prev = _context109.next) {
|
|
13284
13401
|
case 0:
|
|
13285
|
-
return
|
|
13402
|
+
return _context109.abrupt("return", this.castPollVote(messageId, pollId, {
|
|
13286
13403
|
answer_text: answerText
|
|
13287
13404
|
}));
|
|
13288
13405
|
|
|
13289
13406
|
case 1:
|
|
13290
13407
|
case "end":
|
|
13291
|
-
return
|
|
13408
|
+
return _context109.stop();
|
|
13292
13409
|
}
|
|
13293
13410
|
}
|
|
13294
|
-
},
|
|
13411
|
+
}, _callee109, this);
|
|
13295
13412
|
}));
|
|
13296
13413
|
|
|
13297
|
-
function addPollAnswer(
|
|
13414
|
+
function addPollAnswer(_x156, _x157, _x158) {
|
|
13298
13415
|
return _addPollAnswer.apply(this, arguments);
|
|
13299
13416
|
}
|
|
13300
13417
|
|
|
@@ -13303,26 +13420,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13303
13420
|
}, {
|
|
13304
13421
|
key: "removePollVote",
|
|
13305
13422
|
value: function () {
|
|
13306
|
-
var _removePollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13307
|
-
return _regeneratorRuntime.wrap(function
|
|
13423
|
+
var _removePollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee110(messageId, pollId, voteId) {
|
|
13424
|
+
return _regeneratorRuntime.wrap(function _callee110$(_context110) {
|
|
13308
13425
|
while (1) {
|
|
13309
|
-
switch (
|
|
13426
|
+
switch (_context110.prev = _context110.next) {
|
|
13310
13427
|
case 0:
|
|
13311
|
-
|
|
13428
|
+
_context110.next = 2;
|
|
13312
13429
|
return this.delete(this.baseURL + "/messages/".concat(messageId, "/polls/").concat(pollId, "/vote/").concat(voteId));
|
|
13313
13430
|
|
|
13314
13431
|
case 2:
|
|
13315
|
-
return
|
|
13432
|
+
return _context110.abrupt("return", _context110.sent);
|
|
13316
13433
|
|
|
13317
13434
|
case 3:
|
|
13318
13435
|
case "end":
|
|
13319
|
-
return
|
|
13436
|
+
return _context110.stop();
|
|
13320
13437
|
}
|
|
13321
13438
|
}
|
|
13322
|
-
},
|
|
13439
|
+
}, _callee110, this);
|
|
13323
13440
|
}));
|
|
13324
13441
|
|
|
13325
|
-
function removePollVote(
|
|
13442
|
+
function removePollVote(_x159, _x160, _x161) {
|
|
13326
13443
|
return _removePollVote.apply(this, arguments);
|
|
13327
13444
|
}
|
|
13328
13445
|
|
|
@@ -13339,33 +13456,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13339
13456
|
}, {
|
|
13340
13457
|
key: "queryPolls",
|
|
13341
13458
|
value: function () {
|
|
13342
|
-
var _queryPolls = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13459
|
+
var _queryPolls = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee111() {
|
|
13343
13460
|
var filter,
|
|
13344
13461
|
sort,
|
|
13345
13462
|
options,
|
|
13346
|
-
|
|
13347
|
-
return _regeneratorRuntime.wrap(function
|
|
13463
|
+
_args111 = arguments;
|
|
13464
|
+
return _regeneratorRuntime.wrap(function _callee111$(_context111) {
|
|
13348
13465
|
while (1) {
|
|
13349
|
-
switch (
|
|
13466
|
+
switch (_context111.prev = _context111.next) {
|
|
13350
13467
|
case 0:
|
|
13351
|
-
filter =
|
|
13352
|
-
sort =
|
|
13353
|
-
options =
|
|
13354
|
-
|
|
13468
|
+
filter = _args111.length > 0 && _args111[0] !== undefined ? _args111[0] : {};
|
|
13469
|
+
sort = _args111.length > 1 && _args111[1] !== undefined ? _args111[1] : [];
|
|
13470
|
+
options = _args111.length > 2 && _args111[2] !== undefined ? _args111[2] : {};
|
|
13471
|
+
_context111.next = 5;
|
|
13355
13472
|
return this.post(this.baseURL + '/polls/query', _objectSpread({
|
|
13356
13473
|
filter: filter,
|
|
13357
13474
|
sort: normalizeQuerySort(sort)
|
|
13358
13475
|
}, options));
|
|
13359
13476
|
|
|
13360
13477
|
case 5:
|
|
13361
|
-
return
|
|
13478
|
+
return _context111.abrupt("return", _context111.sent);
|
|
13362
13479
|
|
|
13363
13480
|
case 6:
|
|
13364
13481
|
case "end":
|
|
13365
|
-
return
|
|
13482
|
+
return _context111.stop();
|
|
13366
13483
|
}
|
|
13367
13484
|
}
|
|
13368
|
-
},
|
|
13485
|
+
}, _callee111, this);
|
|
13369
13486
|
}));
|
|
13370
13487
|
|
|
13371
13488
|
function queryPolls() {
|
|
@@ -13386,36 +13503,36 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13386
13503
|
}, {
|
|
13387
13504
|
key: "queryPollVotes",
|
|
13388
13505
|
value: function () {
|
|
13389
|
-
var _queryPollVotes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13506
|
+
var _queryPollVotes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee112(pollId) {
|
|
13390
13507
|
var filter,
|
|
13391
13508
|
sort,
|
|
13392
13509
|
options,
|
|
13393
|
-
|
|
13394
|
-
return _regeneratorRuntime.wrap(function
|
|
13510
|
+
_args112 = arguments;
|
|
13511
|
+
return _regeneratorRuntime.wrap(function _callee112$(_context112) {
|
|
13395
13512
|
while (1) {
|
|
13396
|
-
switch (
|
|
13513
|
+
switch (_context112.prev = _context112.next) {
|
|
13397
13514
|
case 0:
|
|
13398
|
-
filter =
|
|
13399
|
-
sort =
|
|
13400
|
-
options =
|
|
13401
|
-
|
|
13515
|
+
filter = _args112.length > 1 && _args112[1] !== undefined ? _args112[1] : {};
|
|
13516
|
+
sort = _args112.length > 2 && _args112[2] !== undefined ? _args112[2] : [];
|
|
13517
|
+
options = _args112.length > 3 && _args112[3] !== undefined ? _args112[3] : {};
|
|
13518
|
+
_context112.next = 5;
|
|
13402
13519
|
return this.post(this.baseURL + "/polls/".concat(pollId, "/votes"), _objectSpread({
|
|
13403
13520
|
filter: filter,
|
|
13404
13521
|
sort: normalizeQuerySort(sort)
|
|
13405
13522
|
}, options));
|
|
13406
13523
|
|
|
13407
13524
|
case 5:
|
|
13408
|
-
return
|
|
13525
|
+
return _context112.abrupt("return", _context112.sent);
|
|
13409
13526
|
|
|
13410
13527
|
case 6:
|
|
13411
13528
|
case "end":
|
|
13412
|
-
return
|
|
13529
|
+
return _context112.stop();
|
|
13413
13530
|
}
|
|
13414
13531
|
}
|
|
13415
|
-
},
|
|
13532
|
+
}, _callee112, this);
|
|
13416
13533
|
}));
|
|
13417
13534
|
|
|
13418
|
-
function queryPollVotes(
|
|
13535
|
+
function queryPollVotes(_x162) {
|
|
13419
13536
|
return _queryPollVotes.apply(this, arguments);
|
|
13420
13537
|
}
|
|
13421
13538
|
|
|
@@ -13432,33 +13549,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13432
13549
|
}, {
|
|
13433
13550
|
key: "queryMessageHistory",
|
|
13434
13551
|
value: function () {
|
|
13435
|
-
var _queryMessageHistory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13552
|
+
var _queryMessageHistory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee113() {
|
|
13436
13553
|
var filter,
|
|
13437
13554
|
sort,
|
|
13438
13555
|
options,
|
|
13439
|
-
|
|
13440
|
-
return _regeneratorRuntime.wrap(function
|
|
13556
|
+
_args113 = arguments;
|
|
13557
|
+
return _regeneratorRuntime.wrap(function _callee113$(_context113) {
|
|
13441
13558
|
while (1) {
|
|
13442
|
-
switch (
|
|
13559
|
+
switch (_context113.prev = _context113.next) {
|
|
13443
13560
|
case 0:
|
|
13444
|
-
filter =
|
|
13445
|
-
sort =
|
|
13446
|
-
options =
|
|
13447
|
-
|
|
13561
|
+
filter = _args113.length > 0 && _args113[0] !== undefined ? _args113[0] : {};
|
|
13562
|
+
sort = _args113.length > 1 && _args113[1] !== undefined ? _args113[1] : [];
|
|
13563
|
+
options = _args113.length > 2 && _args113[2] !== undefined ? _args113[2] : {};
|
|
13564
|
+
_context113.next = 5;
|
|
13448
13565
|
return this.post(this.baseURL + '/messages/history', _objectSpread({
|
|
13449
13566
|
filter: filter,
|
|
13450
13567
|
sort: normalizeQuerySort(sort)
|
|
13451
13568
|
}, options));
|
|
13452
13569
|
|
|
13453
13570
|
case 5:
|
|
13454
|
-
return
|
|
13571
|
+
return _context113.abrupt("return", _context113.sent);
|
|
13455
13572
|
|
|
13456
13573
|
case 6:
|
|
13457
13574
|
case "end":
|
|
13458
|
-
return
|
|
13575
|
+
return _context113.stop();
|
|
13459
13576
|
}
|
|
13460
13577
|
}
|
|
13461
|
-
},
|
|
13578
|
+
}, _callee113, this);
|
|
13462
13579
|
}));
|
|
13463
13580
|
|
|
13464
13581
|
function queryMessageHistory() {
|