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.js
CHANGED
|
@@ -937,10 +937,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
937
937
|
|
|
938
938
|
if (parentID && !initializing) {
|
|
939
939
|
var thread = this.threads[parentID] || [];
|
|
940
|
-
|
|
941
|
-
var threadMessages = this._addToMessageList(thread, message, timestampChanged, 'created_at', addIfDoesNotExist);
|
|
942
|
-
|
|
943
|
-
this.threads[parentID] = threadMessages;
|
|
940
|
+
this.threads[parentID] = this._addToMessageList(thread, message, timestampChanged, 'created_at', addIfDoesNotExist);
|
|
944
941
|
}
|
|
945
942
|
}
|
|
946
943
|
|
|
@@ -1048,10 +1045,13 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
1048
1045
|
return messageWithReaction;
|
|
1049
1046
|
}
|
|
1050
1047
|
}, {
|
|
1051
|
-
key: "
|
|
1052
|
-
value: function
|
|
1048
|
+
key: "_updateQuotedMessageReferences",
|
|
1049
|
+
value: function _updateQuotedMessageReferences(_ref) {
|
|
1053
1050
|
var _this4 = this;
|
|
1054
1051
|
|
|
1052
|
+
var message = _ref.message,
|
|
1053
|
+
remove = _ref.remove;
|
|
1054
|
+
|
|
1055
1055
|
var parseMessage = function parseMessage(m) {
|
|
1056
1056
|
var _m$pinned_at, _m$updated_at;
|
|
1057
1057
|
|
|
@@ -1062,18 +1062,37 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
1062
1062
|
});
|
|
1063
1063
|
};
|
|
1064
1064
|
|
|
1065
|
-
|
|
1066
|
-
var updatedMessages =
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
})
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1065
|
+
var update = function update(messages) {
|
|
1066
|
+
var updatedMessages = messages.reduce(function (acc, msg) {
|
|
1067
|
+
if (msg.quoted_message_id === message.id) {
|
|
1068
|
+
acc.push(_objectSpread$7(_objectSpread$7({}, parseMessage(msg)), {}, {
|
|
1069
|
+
quoted_message: remove ? _objectSpread$7(_objectSpread$7({}, message), {}, {
|
|
1070
|
+
attachments: []
|
|
1071
|
+
}) : message
|
|
1072
|
+
}));
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
return acc;
|
|
1076
|
+
}, []);
|
|
1075
1077
|
|
|
1076
1078
|
_this4.addMessagesSorted(updatedMessages, true);
|
|
1079
|
+
};
|
|
1080
|
+
|
|
1081
|
+
if (!message.parent_id) {
|
|
1082
|
+
this.messageSets.forEach(function (set) {
|
|
1083
|
+
return update(set.messages);
|
|
1084
|
+
});
|
|
1085
|
+
} else if (message.parent_id && this.threads[message.parent_id]) {
|
|
1086
|
+
// prevent going through all the threads even though it is possible to quote a message from another thread
|
|
1087
|
+
update(this.threads[message.parent_id]);
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
}, {
|
|
1091
|
+
key: "removeQuotedMessageReferences",
|
|
1092
|
+
value: function removeQuotedMessageReferences(message) {
|
|
1093
|
+
this._updateQuotedMessageReferences({
|
|
1094
|
+
message: message,
|
|
1095
|
+
remove: true
|
|
1077
1096
|
});
|
|
1078
1097
|
}
|
|
1079
1098
|
/**
|
|
@@ -4037,6 +4056,10 @@ var Channel = /*#__PURE__*/function () {
|
|
|
4037
4056
|
|
|
4038
4057
|
channelState.addMessageSorted(event.message, false, false);
|
|
4039
4058
|
|
|
4059
|
+
channelState._updateQuotedMessageReferences({
|
|
4060
|
+
message: event.message
|
|
4061
|
+
});
|
|
4062
|
+
|
|
4040
4063
|
if (event.message.pinned) {
|
|
4041
4064
|
channelState.addPinnedMessage(event.message);
|
|
4042
4065
|
} else {
|
|
@@ -10321,6 +10344,100 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10321
10344
|
|
|
10322
10345
|
return removeShadowBan;
|
|
10323
10346
|
}()
|
|
10347
|
+
}, {
|
|
10348
|
+
key: "blockUser",
|
|
10349
|
+
value: function () {
|
|
10350
|
+
var _blockUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee43(blockedUserID, user_id) {
|
|
10351
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee43$(_context43) {
|
|
10352
|
+
while (1) {
|
|
10353
|
+
switch (_context43.prev = _context43.next) {
|
|
10354
|
+
case 0:
|
|
10355
|
+
_context43.next = 2;
|
|
10356
|
+
return this.post(this.baseURL + '/users/block', _objectSpread({
|
|
10357
|
+
blocked_user_id: blockedUserID
|
|
10358
|
+
}, user_id ? {
|
|
10359
|
+
user_id: user_id
|
|
10360
|
+
} : {}));
|
|
10361
|
+
|
|
10362
|
+
case 2:
|
|
10363
|
+
return _context43.abrupt("return", _context43.sent);
|
|
10364
|
+
|
|
10365
|
+
case 3:
|
|
10366
|
+
case "end":
|
|
10367
|
+
return _context43.stop();
|
|
10368
|
+
}
|
|
10369
|
+
}
|
|
10370
|
+
}, _callee43, this);
|
|
10371
|
+
}));
|
|
10372
|
+
|
|
10373
|
+
function blockUser(_x56, _x57) {
|
|
10374
|
+
return _blockUser.apply(this, arguments);
|
|
10375
|
+
}
|
|
10376
|
+
|
|
10377
|
+
return blockUser;
|
|
10378
|
+
}()
|
|
10379
|
+
}, {
|
|
10380
|
+
key: "getBlockedUsers",
|
|
10381
|
+
value: function () {
|
|
10382
|
+
var _getBlockedUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee44(user_id) {
|
|
10383
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee44$(_context44) {
|
|
10384
|
+
while (1) {
|
|
10385
|
+
switch (_context44.prev = _context44.next) {
|
|
10386
|
+
case 0:
|
|
10387
|
+
_context44.next = 2;
|
|
10388
|
+
return this.get(this.baseURL + '/users/block', _objectSpread({}, user_id ? {
|
|
10389
|
+
user_id: user_id
|
|
10390
|
+
} : {}));
|
|
10391
|
+
|
|
10392
|
+
case 2:
|
|
10393
|
+
return _context44.abrupt("return", _context44.sent);
|
|
10394
|
+
|
|
10395
|
+
case 3:
|
|
10396
|
+
case "end":
|
|
10397
|
+
return _context44.stop();
|
|
10398
|
+
}
|
|
10399
|
+
}
|
|
10400
|
+
}, _callee44, this);
|
|
10401
|
+
}));
|
|
10402
|
+
|
|
10403
|
+
function getBlockedUsers(_x58) {
|
|
10404
|
+
return _getBlockedUsers.apply(this, arguments);
|
|
10405
|
+
}
|
|
10406
|
+
|
|
10407
|
+
return getBlockedUsers;
|
|
10408
|
+
}()
|
|
10409
|
+
}, {
|
|
10410
|
+
key: "unBlockUser",
|
|
10411
|
+
value: function () {
|
|
10412
|
+
var _unBlockUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee45(blockedUserID, userID) {
|
|
10413
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee45$(_context45) {
|
|
10414
|
+
while (1) {
|
|
10415
|
+
switch (_context45.prev = _context45.next) {
|
|
10416
|
+
case 0:
|
|
10417
|
+
_context45.next = 2;
|
|
10418
|
+
return this.post(this.baseURL + '/users/unblock', _objectSpread({
|
|
10419
|
+
blocked_user_id: blockedUserID
|
|
10420
|
+
}, userID ? {
|
|
10421
|
+
user_id: userID
|
|
10422
|
+
} : {}));
|
|
10423
|
+
|
|
10424
|
+
case 2:
|
|
10425
|
+
return _context45.abrupt("return", _context45.sent);
|
|
10426
|
+
|
|
10427
|
+
case 3:
|
|
10428
|
+
case "end":
|
|
10429
|
+
return _context45.stop();
|
|
10430
|
+
}
|
|
10431
|
+
}
|
|
10432
|
+
}, _callee45, this);
|
|
10433
|
+
}));
|
|
10434
|
+
|
|
10435
|
+
function unBlockUser(_x59, _x60) {
|
|
10436
|
+
return _unBlockUser.apply(this, arguments);
|
|
10437
|
+
}
|
|
10438
|
+
|
|
10439
|
+
return unBlockUser;
|
|
10440
|
+
}()
|
|
10324
10441
|
/** muteUser - mutes a user
|
|
10325
10442
|
*
|
|
10326
10443
|
* @param {string} targetID
|
|
@@ -10332,15 +10449,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10332
10449
|
}, {
|
|
10333
10450
|
key: "muteUser",
|
|
10334
10451
|
value: function () {
|
|
10335
|
-
var _muteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10452
|
+
var _muteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee46(targetID, userID) {
|
|
10336
10453
|
var options,
|
|
10337
|
-
|
|
10338
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10454
|
+
_args46 = arguments;
|
|
10455
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee46$(_context46) {
|
|
10339
10456
|
while (1) {
|
|
10340
|
-
switch (
|
|
10457
|
+
switch (_context46.prev = _context46.next) {
|
|
10341
10458
|
case 0:
|
|
10342
|
-
options =
|
|
10343
|
-
|
|
10459
|
+
options = _args46.length > 2 && _args46[2] !== undefined ? _args46[2] : {};
|
|
10460
|
+
_context46.next = 3;
|
|
10344
10461
|
return this.post(this.baseURL + '/moderation/mute', _objectSpread(_objectSpread({
|
|
10345
10462
|
target_id: targetID
|
|
10346
10463
|
}, userID ? {
|
|
@@ -10348,17 +10465,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10348
10465
|
} : {}), options));
|
|
10349
10466
|
|
|
10350
10467
|
case 3:
|
|
10351
|
-
return
|
|
10468
|
+
return _context46.abrupt("return", _context46.sent);
|
|
10352
10469
|
|
|
10353
10470
|
case 4:
|
|
10354
10471
|
case "end":
|
|
10355
|
-
return
|
|
10472
|
+
return _context46.stop();
|
|
10356
10473
|
}
|
|
10357
10474
|
}
|
|
10358
|
-
},
|
|
10475
|
+
}, _callee46, this);
|
|
10359
10476
|
}));
|
|
10360
10477
|
|
|
10361
|
-
function muteUser(
|
|
10478
|
+
function muteUser(_x61, _x62) {
|
|
10362
10479
|
return _muteUser.apply(this, arguments);
|
|
10363
10480
|
}
|
|
10364
10481
|
|
|
@@ -10374,12 +10491,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10374
10491
|
}, {
|
|
10375
10492
|
key: "unmuteUser",
|
|
10376
10493
|
value: function () {
|
|
10377
|
-
var _unmuteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10378
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10494
|
+
var _unmuteUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee47(targetID, currentUserID) {
|
|
10495
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee47$(_context47) {
|
|
10379
10496
|
while (1) {
|
|
10380
|
-
switch (
|
|
10497
|
+
switch (_context47.prev = _context47.next) {
|
|
10381
10498
|
case 0:
|
|
10382
|
-
|
|
10499
|
+
_context47.next = 2;
|
|
10383
10500
|
return this.post(this.baseURL + '/moderation/unmute', _objectSpread({
|
|
10384
10501
|
target_id: targetID
|
|
10385
10502
|
}, currentUserID ? {
|
|
@@ -10387,17 +10504,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10387
10504
|
} : {}));
|
|
10388
10505
|
|
|
10389
10506
|
case 2:
|
|
10390
|
-
return
|
|
10507
|
+
return _context47.abrupt("return", _context47.sent);
|
|
10391
10508
|
|
|
10392
10509
|
case 3:
|
|
10393
10510
|
case "end":
|
|
10394
|
-
return
|
|
10511
|
+
return _context47.stop();
|
|
10395
10512
|
}
|
|
10396
10513
|
}
|
|
10397
|
-
},
|
|
10514
|
+
}, _callee47, this);
|
|
10398
10515
|
}));
|
|
10399
10516
|
|
|
10400
|
-
function unmuteUser(
|
|
10517
|
+
function unmuteUser(_x63, _x64) {
|
|
10401
10518
|
return _unmuteUser.apply(this, arguments);
|
|
10402
10519
|
}
|
|
10403
10520
|
|
|
@@ -10432,31 +10549,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10432
10549
|
}, {
|
|
10433
10550
|
key: "flagMessage",
|
|
10434
10551
|
value: function () {
|
|
10435
|
-
var _flagMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10552
|
+
var _flagMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee48(targetMessageID) {
|
|
10436
10553
|
var options,
|
|
10437
|
-
|
|
10438
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10554
|
+
_args48 = arguments;
|
|
10555
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee48$(_context48) {
|
|
10439
10556
|
while (1) {
|
|
10440
|
-
switch (
|
|
10557
|
+
switch (_context48.prev = _context48.next) {
|
|
10441
10558
|
case 0:
|
|
10442
|
-
options =
|
|
10443
|
-
|
|
10559
|
+
options = _args48.length > 1 && _args48[1] !== undefined ? _args48[1] : {};
|
|
10560
|
+
_context48.next = 3;
|
|
10444
10561
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
10445
10562
|
target_message_id: targetMessageID
|
|
10446
10563
|
}, options));
|
|
10447
10564
|
|
|
10448
10565
|
case 3:
|
|
10449
|
-
return
|
|
10566
|
+
return _context48.abrupt("return", _context48.sent);
|
|
10450
10567
|
|
|
10451
10568
|
case 4:
|
|
10452
10569
|
case "end":
|
|
10453
|
-
return
|
|
10570
|
+
return _context48.stop();
|
|
10454
10571
|
}
|
|
10455
10572
|
}
|
|
10456
|
-
},
|
|
10573
|
+
}, _callee48, this);
|
|
10457
10574
|
}));
|
|
10458
10575
|
|
|
10459
|
-
function flagMessage(
|
|
10576
|
+
function flagMessage(_x65) {
|
|
10460
10577
|
return _flagMessage.apply(this, arguments);
|
|
10461
10578
|
}
|
|
10462
10579
|
|
|
@@ -10472,31 +10589,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10472
10589
|
}, {
|
|
10473
10590
|
key: "flagUser",
|
|
10474
10591
|
value: function () {
|
|
10475
|
-
var _flagUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10592
|
+
var _flagUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee49(targetID) {
|
|
10476
10593
|
var options,
|
|
10477
|
-
|
|
10478
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10594
|
+
_args49 = arguments;
|
|
10595
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee49$(_context49) {
|
|
10479
10596
|
while (1) {
|
|
10480
|
-
switch (
|
|
10597
|
+
switch (_context49.prev = _context49.next) {
|
|
10481
10598
|
case 0:
|
|
10482
|
-
options =
|
|
10483
|
-
|
|
10599
|
+
options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
|
|
10600
|
+
_context49.next = 3;
|
|
10484
10601
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
10485
10602
|
target_user_id: targetID
|
|
10486
10603
|
}, options));
|
|
10487
10604
|
|
|
10488
10605
|
case 3:
|
|
10489
|
-
return
|
|
10606
|
+
return _context49.abrupt("return", _context49.sent);
|
|
10490
10607
|
|
|
10491
10608
|
case 4:
|
|
10492
10609
|
case "end":
|
|
10493
|
-
return
|
|
10610
|
+
return _context49.stop();
|
|
10494
10611
|
}
|
|
10495
10612
|
}
|
|
10496
|
-
},
|
|
10613
|
+
}, _callee49, this);
|
|
10497
10614
|
}));
|
|
10498
10615
|
|
|
10499
|
-
function flagUser(
|
|
10616
|
+
function flagUser(_x66) {
|
|
10500
10617
|
return _flagUser.apply(this, arguments);
|
|
10501
10618
|
}
|
|
10502
10619
|
|
|
@@ -10512,31 +10629,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10512
10629
|
}, {
|
|
10513
10630
|
key: "unflagMessage",
|
|
10514
10631
|
value: function () {
|
|
10515
|
-
var _unflagMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10632
|
+
var _unflagMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee50(targetMessageID) {
|
|
10516
10633
|
var options,
|
|
10517
|
-
|
|
10518
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10634
|
+
_args50 = arguments;
|
|
10635
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee50$(_context50) {
|
|
10519
10636
|
while (1) {
|
|
10520
|
-
switch (
|
|
10637
|
+
switch (_context50.prev = _context50.next) {
|
|
10521
10638
|
case 0:
|
|
10522
|
-
options =
|
|
10523
|
-
|
|
10639
|
+
options = _args50.length > 1 && _args50[1] !== undefined ? _args50[1] : {};
|
|
10640
|
+
_context50.next = 3;
|
|
10524
10641
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
10525
10642
|
target_message_id: targetMessageID
|
|
10526
10643
|
}, options));
|
|
10527
10644
|
|
|
10528
10645
|
case 3:
|
|
10529
|
-
return
|
|
10646
|
+
return _context50.abrupt("return", _context50.sent);
|
|
10530
10647
|
|
|
10531
10648
|
case 4:
|
|
10532
10649
|
case "end":
|
|
10533
|
-
return
|
|
10650
|
+
return _context50.stop();
|
|
10534
10651
|
}
|
|
10535
10652
|
}
|
|
10536
|
-
},
|
|
10653
|
+
}, _callee50, this);
|
|
10537
10654
|
}));
|
|
10538
10655
|
|
|
10539
|
-
function unflagMessage(
|
|
10656
|
+
function unflagMessage(_x67) {
|
|
10540
10657
|
return _unflagMessage.apply(this, arguments);
|
|
10541
10658
|
}
|
|
10542
10659
|
|
|
@@ -10552,31 +10669,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10552
10669
|
}, {
|
|
10553
10670
|
key: "unflagUser",
|
|
10554
10671
|
value: function () {
|
|
10555
|
-
var _unflagUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10672
|
+
var _unflagUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee51(targetID) {
|
|
10556
10673
|
var options,
|
|
10557
|
-
|
|
10558
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10674
|
+
_args51 = arguments;
|
|
10675
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee51$(_context51) {
|
|
10559
10676
|
while (1) {
|
|
10560
|
-
switch (
|
|
10677
|
+
switch (_context51.prev = _context51.next) {
|
|
10561
10678
|
case 0:
|
|
10562
|
-
options =
|
|
10563
|
-
|
|
10679
|
+
options = _args51.length > 1 && _args51[1] !== undefined ? _args51[1] : {};
|
|
10680
|
+
_context51.next = 3;
|
|
10564
10681
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
10565
10682
|
target_user_id: targetID
|
|
10566
10683
|
}, options));
|
|
10567
10684
|
|
|
10568
10685
|
case 3:
|
|
10569
|
-
return
|
|
10686
|
+
return _context51.abrupt("return", _context51.sent);
|
|
10570
10687
|
|
|
10571
10688
|
case 4:
|
|
10572
10689
|
case "end":
|
|
10573
|
-
return
|
|
10690
|
+
return _context51.stop();
|
|
10574
10691
|
}
|
|
10575
10692
|
}
|
|
10576
|
-
},
|
|
10693
|
+
}, _callee51, this);
|
|
10577
10694
|
}));
|
|
10578
10695
|
|
|
10579
|
-
function unflagUser(
|
|
10696
|
+
function unflagUser(_x68) {
|
|
10580
10697
|
return _unflagUser.apply(this, arguments);
|
|
10581
10698
|
}
|
|
10582
10699
|
|
|
@@ -10593,29 +10710,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10593
10710
|
}, {
|
|
10594
10711
|
key: "getCallToken",
|
|
10595
10712
|
value: function () {
|
|
10596
|
-
var _getCallToken = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10713
|
+
var _getCallToken = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee52(callID) {
|
|
10597
10714
|
var options,
|
|
10598
|
-
|
|
10599
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10715
|
+
_args52 = arguments;
|
|
10716
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee52$(_context52) {
|
|
10600
10717
|
while (1) {
|
|
10601
|
-
switch (
|
|
10718
|
+
switch (_context52.prev = _context52.next) {
|
|
10602
10719
|
case 0:
|
|
10603
|
-
options =
|
|
10604
|
-
|
|
10720
|
+
options = _args52.length > 1 && _args52[1] !== undefined ? _args52[1] : {};
|
|
10721
|
+
_context52.next = 3;
|
|
10605
10722
|
return this.post(this.baseURL + "/calls/".concat(callID), _objectSpread({}, options));
|
|
10606
10723
|
|
|
10607
10724
|
case 3:
|
|
10608
|
-
return
|
|
10725
|
+
return _context52.abrupt("return", _context52.sent);
|
|
10609
10726
|
|
|
10610
10727
|
case 4:
|
|
10611
10728
|
case "end":
|
|
10612
|
-
return
|
|
10729
|
+
return _context52.stop();
|
|
10613
10730
|
}
|
|
10614
10731
|
}
|
|
10615
|
-
},
|
|
10732
|
+
}, _callee52, this);
|
|
10616
10733
|
}));
|
|
10617
10734
|
|
|
10618
|
-
function getCallToken(
|
|
10735
|
+
function getCallToken(_x69) {
|
|
10619
10736
|
return _getCallToken.apply(this, arguments);
|
|
10620
10737
|
}
|
|
10621
10738
|
|
|
@@ -10638,30 +10755,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10638
10755
|
}, {
|
|
10639
10756
|
key: "_queryFlags",
|
|
10640
10757
|
value: function () {
|
|
10641
|
-
var _queryFlags2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10758
|
+
var _queryFlags2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee53() {
|
|
10642
10759
|
var filterConditions,
|
|
10643
10760
|
options,
|
|
10644
|
-
|
|
10645
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10761
|
+
_args53 = arguments;
|
|
10762
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee53$(_context53) {
|
|
10646
10763
|
while (1) {
|
|
10647
|
-
switch (
|
|
10764
|
+
switch (_context53.prev = _context53.next) {
|
|
10648
10765
|
case 0:
|
|
10649
|
-
filterConditions =
|
|
10650
|
-
options =
|
|
10651
|
-
|
|
10766
|
+
filterConditions = _args53.length > 0 && _args53[0] !== undefined ? _args53[0] : {};
|
|
10767
|
+
options = _args53.length > 1 && _args53[1] !== undefined ? _args53[1] : {};
|
|
10768
|
+
_context53.next = 4;
|
|
10652
10769
|
return this.post(this.baseURL + '/moderation/flags', _objectSpread({
|
|
10653
10770
|
filter_conditions: filterConditions
|
|
10654
10771
|
}, options));
|
|
10655
10772
|
|
|
10656
10773
|
case 4:
|
|
10657
|
-
return
|
|
10774
|
+
return _context53.abrupt("return", _context53.sent);
|
|
10658
10775
|
|
|
10659
10776
|
case 5:
|
|
10660
10777
|
case "end":
|
|
10661
|
-
return
|
|
10778
|
+
return _context53.stop();
|
|
10662
10779
|
}
|
|
10663
10780
|
}
|
|
10664
|
-
},
|
|
10781
|
+
}, _callee53, this);
|
|
10665
10782
|
}));
|
|
10666
10783
|
|
|
10667
10784
|
function _queryFlags() {
|
|
@@ -10687,30 +10804,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10687
10804
|
}, {
|
|
10688
10805
|
key: "_queryFlagReports",
|
|
10689
10806
|
value: function () {
|
|
10690
|
-
var _queryFlagReports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10807
|
+
var _queryFlagReports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee54() {
|
|
10691
10808
|
var filterConditions,
|
|
10692
10809
|
options,
|
|
10693
|
-
|
|
10694
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10810
|
+
_args54 = arguments;
|
|
10811
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee54$(_context54) {
|
|
10695
10812
|
while (1) {
|
|
10696
|
-
switch (
|
|
10813
|
+
switch (_context54.prev = _context54.next) {
|
|
10697
10814
|
case 0:
|
|
10698
|
-
filterConditions =
|
|
10699
|
-
options =
|
|
10700
|
-
|
|
10815
|
+
filterConditions = _args54.length > 0 && _args54[0] !== undefined ? _args54[0] : {};
|
|
10816
|
+
options = _args54.length > 1 && _args54[1] !== undefined ? _args54[1] : {};
|
|
10817
|
+
_context54.next = 4;
|
|
10701
10818
|
return this.post(this.baseURL + '/moderation/reports', _objectSpread({
|
|
10702
10819
|
filter_conditions: filterConditions
|
|
10703
10820
|
}, options));
|
|
10704
10821
|
|
|
10705
10822
|
case 4:
|
|
10706
|
-
return
|
|
10823
|
+
return _context54.abrupt("return", _context54.sent);
|
|
10707
10824
|
|
|
10708
10825
|
case 5:
|
|
10709
10826
|
case "end":
|
|
10710
|
-
return
|
|
10827
|
+
return _context54.stop();
|
|
10711
10828
|
}
|
|
10712
10829
|
}
|
|
10713
|
-
},
|
|
10830
|
+
}, _callee54, this);
|
|
10714
10831
|
}));
|
|
10715
10832
|
|
|
10716
10833
|
function _queryFlagReports() {
|
|
@@ -10737,31 +10854,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10737
10854
|
}, {
|
|
10738
10855
|
key: "_reviewFlagReport",
|
|
10739
10856
|
value: function () {
|
|
10740
|
-
var _reviewFlagReport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10857
|
+
var _reviewFlagReport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee55(id, reviewResult) {
|
|
10741
10858
|
var options,
|
|
10742
|
-
|
|
10743
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10859
|
+
_args55 = arguments;
|
|
10860
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee55$(_context55) {
|
|
10744
10861
|
while (1) {
|
|
10745
|
-
switch (
|
|
10862
|
+
switch (_context55.prev = _context55.next) {
|
|
10746
10863
|
case 0:
|
|
10747
|
-
options =
|
|
10748
|
-
|
|
10864
|
+
options = _args55.length > 2 && _args55[2] !== undefined ? _args55[2] : {};
|
|
10865
|
+
_context55.next = 3;
|
|
10749
10866
|
return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
|
|
10750
10867
|
review_result: reviewResult
|
|
10751
10868
|
}, options));
|
|
10752
10869
|
|
|
10753
10870
|
case 3:
|
|
10754
|
-
return
|
|
10871
|
+
return _context55.abrupt("return", _context55.sent);
|
|
10755
10872
|
|
|
10756
10873
|
case 4:
|
|
10757
10874
|
case "end":
|
|
10758
|
-
return
|
|
10875
|
+
return _context55.stop();
|
|
10759
10876
|
}
|
|
10760
10877
|
}
|
|
10761
|
-
},
|
|
10878
|
+
}, _callee55, this);
|
|
10762
10879
|
}));
|
|
10763
10880
|
|
|
10764
|
-
function _reviewFlagReport(
|
|
10881
|
+
function _reviewFlagReport(_x70, _x71) {
|
|
10765
10882
|
return _reviewFlagReport2.apply(this, arguments);
|
|
10766
10883
|
}
|
|
10767
10884
|
|
|
@@ -10779,31 +10896,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10779
10896
|
}, {
|
|
10780
10897
|
key: "unblockMessage",
|
|
10781
10898
|
value: function () {
|
|
10782
|
-
var _unblockMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10899
|
+
var _unblockMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee56(targetMessageID) {
|
|
10783
10900
|
var options,
|
|
10784
|
-
|
|
10785
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10901
|
+
_args56 = arguments;
|
|
10902
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee56$(_context56) {
|
|
10786
10903
|
while (1) {
|
|
10787
|
-
switch (
|
|
10904
|
+
switch (_context56.prev = _context56.next) {
|
|
10788
10905
|
case 0:
|
|
10789
|
-
options =
|
|
10790
|
-
|
|
10906
|
+
options = _args56.length > 1 && _args56[1] !== undefined ? _args56[1] : {};
|
|
10907
|
+
_context56.next = 3;
|
|
10791
10908
|
return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
|
|
10792
10909
|
target_message_id: targetMessageID
|
|
10793
10910
|
}, options));
|
|
10794
10911
|
|
|
10795
10912
|
case 3:
|
|
10796
|
-
return
|
|
10913
|
+
return _context56.abrupt("return", _context56.sent);
|
|
10797
10914
|
|
|
10798
10915
|
case 4:
|
|
10799
10916
|
case "end":
|
|
10800
|
-
return
|
|
10917
|
+
return _context56.stop();
|
|
10801
10918
|
}
|
|
10802
10919
|
}
|
|
10803
|
-
},
|
|
10920
|
+
}, _callee56, this);
|
|
10804
10921
|
}));
|
|
10805
10922
|
|
|
10806
|
-
function unblockMessage(
|
|
10923
|
+
function unblockMessage(_x72) {
|
|
10807
10924
|
return _unblockMessage.apply(this, arguments);
|
|
10808
10925
|
}
|
|
10809
10926
|
|
|
@@ -10822,23 +10939,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10822
10939
|
* @return {Promise<APIResponse>}
|
|
10823
10940
|
*/
|
|
10824
10941
|
function () {
|
|
10825
|
-
var _markChannelsRead = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10942
|
+
var _markChannelsRead = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee57() {
|
|
10826
10943
|
var data,
|
|
10827
|
-
|
|
10828
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10944
|
+
_args57 = arguments;
|
|
10945
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee57$(_context57) {
|
|
10829
10946
|
while (1) {
|
|
10830
|
-
switch (
|
|
10947
|
+
switch (_context57.prev = _context57.next) {
|
|
10831
10948
|
case 0:
|
|
10832
|
-
data =
|
|
10833
|
-
|
|
10949
|
+
data = _args57.length > 0 && _args57[0] !== undefined ? _args57[0] : {};
|
|
10950
|
+
_context57.next = 3;
|
|
10834
10951
|
return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
|
|
10835
10952
|
|
|
10836
10953
|
case 3:
|
|
10837
10954
|
case "end":
|
|
10838
|
-
return
|
|
10955
|
+
return _context57.stop();
|
|
10839
10956
|
}
|
|
10840
10957
|
}
|
|
10841
|
-
},
|
|
10958
|
+
}, _callee57, this);
|
|
10842
10959
|
}));
|
|
10843
10960
|
|
|
10844
10961
|
function markChannelsRead() {
|
|
@@ -10913,28 +11030,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10913
11030
|
}, {
|
|
10914
11031
|
key: "translateMessage",
|
|
10915
11032
|
value: function () {
|
|
10916
|
-
var _translateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
10917
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11033
|
+
var _translateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee58(messageId, language) {
|
|
11034
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee58$(_context58) {
|
|
10918
11035
|
while (1) {
|
|
10919
|
-
switch (
|
|
11036
|
+
switch (_context58.prev = _context58.next) {
|
|
10920
11037
|
case 0:
|
|
10921
|
-
|
|
11038
|
+
_context58.next = 2;
|
|
10922
11039
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
|
|
10923
11040
|
language: language
|
|
10924
11041
|
});
|
|
10925
11042
|
|
|
10926
11043
|
case 2:
|
|
10927
|
-
return
|
|
11044
|
+
return _context58.abrupt("return", _context58.sent);
|
|
10928
11045
|
|
|
10929
11046
|
case 3:
|
|
10930
11047
|
case "end":
|
|
10931
|
-
return
|
|
11048
|
+
return _context58.stop();
|
|
10932
11049
|
}
|
|
10933
11050
|
}
|
|
10934
|
-
},
|
|
11051
|
+
}, _callee58, this);
|
|
10935
11052
|
}));
|
|
10936
11053
|
|
|
10937
|
-
function translateMessage(
|
|
11054
|
+
function translateMessage(_x73, _x74) {
|
|
10938
11055
|
return _translateMessage.apply(this, arguments);
|
|
10939
11056
|
}
|
|
10940
11057
|
|
|
@@ -11036,14 +11153,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11036
11153
|
}, {
|
|
11037
11154
|
key: "updateMessage",
|
|
11038
11155
|
value: function () {
|
|
11039
|
-
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11156
|
+
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee59(message, userId, options) {
|
|
11040
11157
|
var clonedMessage, reservedMessageFields;
|
|
11041
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11158
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee59$(_context59) {
|
|
11042
11159
|
while (1) {
|
|
11043
|
-
switch (
|
|
11160
|
+
switch (_context59.prev = _context59.next) {
|
|
11044
11161
|
case 0:
|
|
11045
11162
|
if (message.id) {
|
|
11046
|
-
|
|
11163
|
+
_context59.next = 2;
|
|
11047
11164
|
break;
|
|
11048
11165
|
}
|
|
11049
11166
|
|
|
@@ -11080,23 +11197,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11080
11197
|
});
|
|
11081
11198
|
}
|
|
11082
11199
|
|
|
11083
|
-
|
|
11200
|
+
_context59.next = 10;
|
|
11084
11201
|
return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
|
|
11085
11202
|
message: clonedMessage
|
|
11086
11203
|
}, options));
|
|
11087
11204
|
|
|
11088
11205
|
case 10:
|
|
11089
|
-
return
|
|
11206
|
+
return _context59.abrupt("return", _context59.sent);
|
|
11090
11207
|
|
|
11091
11208
|
case 11:
|
|
11092
11209
|
case "end":
|
|
11093
|
-
return
|
|
11210
|
+
return _context59.stop();
|
|
11094
11211
|
}
|
|
11095
11212
|
}
|
|
11096
|
-
},
|
|
11213
|
+
}, _callee59, this);
|
|
11097
11214
|
}));
|
|
11098
11215
|
|
|
11099
|
-
function updateMessage(
|
|
11216
|
+
function updateMessage(_x75, _x76, _x77) {
|
|
11100
11217
|
return _updateMessage.apply(this, arguments);
|
|
11101
11218
|
}
|
|
11102
11219
|
|
|
@@ -11119,14 +11236,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11119
11236
|
}, {
|
|
11120
11237
|
key: "partialUpdateMessage",
|
|
11121
11238
|
value: function () {
|
|
11122
|
-
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11239
|
+
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee60(id, partialMessageObject, userId, options) {
|
|
11123
11240
|
var user;
|
|
11124
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11241
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee60$(_context60) {
|
|
11125
11242
|
while (1) {
|
|
11126
|
-
switch (
|
|
11243
|
+
switch (_context60.prev = _context60.next) {
|
|
11127
11244
|
case 0:
|
|
11128
11245
|
if (id) {
|
|
11129
|
-
|
|
11246
|
+
_context60.next = 2;
|
|
11130
11247
|
break;
|
|
11131
11248
|
}
|
|
11132
11249
|
|
|
@@ -11141,23 +11258,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11141
11258
|
};
|
|
11142
11259
|
}
|
|
11143
11260
|
|
|
11144
|
-
|
|
11261
|
+
_context60.next = 6;
|
|
11145
11262
|
return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
11146
11263
|
user: user
|
|
11147
11264
|
}));
|
|
11148
11265
|
|
|
11149
11266
|
case 6:
|
|
11150
|
-
return
|
|
11267
|
+
return _context60.abrupt("return", _context60.sent);
|
|
11151
11268
|
|
|
11152
11269
|
case 7:
|
|
11153
11270
|
case "end":
|
|
11154
|
-
return
|
|
11271
|
+
return _context60.stop();
|
|
11155
11272
|
}
|
|
11156
11273
|
}
|
|
11157
|
-
},
|
|
11274
|
+
}, _callee60, this);
|
|
11158
11275
|
}));
|
|
11159
11276
|
|
|
11160
|
-
function partialUpdateMessage(
|
|
11277
|
+
function partialUpdateMessage(_x78, _x79, _x80, _x81) {
|
|
11161
11278
|
return _partialUpdateMessage.apply(this, arguments);
|
|
11162
11279
|
}
|
|
11163
11280
|
|
|
@@ -11166,11 +11283,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11166
11283
|
}, {
|
|
11167
11284
|
key: "deleteMessage",
|
|
11168
11285
|
value: function () {
|
|
11169
|
-
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11286
|
+
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee61(messageID, hardDelete) {
|
|
11170
11287
|
var params;
|
|
11171
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11288
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee61$(_context61) {
|
|
11172
11289
|
while (1) {
|
|
11173
|
-
switch (
|
|
11290
|
+
switch (_context61.prev = _context61.next) {
|
|
11174
11291
|
case 0:
|
|
11175
11292
|
params = {};
|
|
11176
11293
|
|
|
@@ -11180,21 +11297,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11180
11297
|
};
|
|
11181
11298
|
}
|
|
11182
11299
|
|
|
11183
|
-
|
|
11300
|
+
_context61.next = 4;
|
|
11184
11301
|
return this.delete(this.baseURL + "/messages/".concat(messageID), params);
|
|
11185
11302
|
|
|
11186
11303
|
case 4:
|
|
11187
|
-
return
|
|
11304
|
+
return _context61.abrupt("return", _context61.sent);
|
|
11188
11305
|
|
|
11189
11306
|
case 5:
|
|
11190
11307
|
case "end":
|
|
11191
|
-
return
|
|
11308
|
+
return _context61.stop();
|
|
11192
11309
|
}
|
|
11193
11310
|
}
|
|
11194
|
-
},
|
|
11311
|
+
}, _callee61, this);
|
|
11195
11312
|
}));
|
|
11196
11313
|
|
|
11197
|
-
function deleteMessage(
|
|
11314
|
+
function deleteMessage(_x82, _x83) {
|
|
11198
11315
|
return _deleteMessage.apply(this, arguments);
|
|
11199
11316
|
}
|
|
11200
11317
|
|
|
@@ -11216,28 +11333,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11216
11333
|
}, {
|
|
11217
11334
|
key: "undeleteMessage",
|
|
11218
11335
|
value: function () {
|
|
11219
|
-
var _undeleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11220
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11336
|
+
var _undeleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee62(messageID, userID) {
|
|
11337
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee62$(_context62) {
|
|
11221
11338
|
while (1) {
|
|
11222
|
-
switch (
|
|
11339
|
+
switch (_context62.prev = _context62.next) {
|
|
11223
11340
|
case 0:
|
|
11224
|
-
|
|
11341
|
+
_context62.next = 2;
|
|
11225
11342
|
return this.post(this.baseURL + "/messages/".concat(messageID, "/undelete"), {
|
|
11226
11343
|
undeleted_by: userID
|
|
11227
11344
|
});
|
|
11228
11345
|
|
|
11229
11346
|
case 2:
|
|
11230
|
-
return
|
|
11347
|
+
return _context62.abrupt("return", _context62.sent);
|
|
11231
11348
|
|
|
11232
11349
|
case 3:
|
|
11233
11350
|
case "end":
|
|
11234
|
-
return
|
|
11351
|
+
return _context62.stop();
|
|
11235
11352
|
}
|
|
11236
11353
|
}
|
|
11237
|
-
},
|
|
11354
|
+
}, _callee62, this);
|
|
11238
11355
|
}));
|
|
11239
11356
|
|
|
11240
|
-
function undeleteMessage(
|
|
11357
|
+
function undeleteMessage(_x84, _x85) {
|
|
11241
11358
|
return _undeleteMessage.apply(this, arguments);
|
|
11242
11359
|
}
|
|
11243
11360
|
|
|
@@ -11246,26 +11363,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11246
11363
|
}, {
|
|
11247
11364
|
key: "getMessage",
|
|
11248
11365
|
value: function () {
|
|
11249
|
-
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11250
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11366
|
+
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee63(messageID, options) {
|
|
11367
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee63$(_context63) {
|
|
11251
11368
|
while (1) {
|
|
11252
|
-
switch (
|
|
11369
|
+
switch (_context63.prev = _context63.next) {
|
|
11253
11370
|
case 0:
|
|
11254
|
-
|
|
11371
|
+
_context63.next = 2;
|
|
11255
11372
|
return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), _objectSpread({}, options));
|
|
11256
11373
|
|
|
11257
11374
|
case 2:
|
|
11258
|
-
return
|
|
11375
|
+
return _context63.abrupt("return", _context63.sent);
|
|
11259
11376
|
|
|
11260
11377
|
case 3:
|
|
11261
11378
|
case "end":
|
|
11262
|
-
return
|
|
11379
|
+
return _context63.stop();
|
|
11263
11380
|
}
|
|
11264
11381
|
}
|
|
11265
|
-
},
|
|
11382
|
+
}, _callee63, this);
|
|
11266
11383
|
}));
|
|
11267
11384
|
|
|
11268
|
-
function getMessage(
|
|
11385
|
+
function getMessage(_x86, _x87) {
|
|
11269
11386
|
return _getMessage.apply(this, arguments);
|
|
11270
11387
|
}
|
|
11271
11388
|
|
|
@@ -11286,13 +11403,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11286
11403
|
}, {
|
|
11287
11404
|
key: "queryThreads",
|
|
11288
11405
|
value: function () {
|
|
11289
|
-
var _queryThreads = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11406
|
+
var _queryThreads = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee64(options) {
|
|
11290
11407
|
var _this5 = this;
|
|
11291
11408
|
|
|
11292
11409
|
var opts, res;
|
|
11293
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11410
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee64$(_context64) {
|
|
11294
11411
|
while (1) {
|
|
11295
|
-
switch (
|
|
11412
|
+
switch (_context64.prev = _context64.next) {
|
|
11296
11413
|
case 0:
|
|
11297
11414
|
opts = _objectSpread({
|
|
11298
11415
|
limit: 10,
|
|
@@ -11300,12 +11417,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11300
11417
|
reply_limit: 3,
|
|
11301
11418
|
watch: true
|
|
11302
11419
|
}, options);
|
|
11303
|
-
|
|
11420
|
+
_context64.next = 3;
|
|
11304
11421
|
return this.post(this.baseURL + "/threads", opts);
|
|
11305
11422
|
|
|
11306
11423
|
case 3:
|
|
11307
|
-
res =
|
|
11308
|
-
return
|
|
11424
|
+
res = _context64.sent;
|
|
11425
|
+
return _context64.abrupt("return", {
|
|
11309
11426
|
threads: res.threads.map(function (thread) {
|
|
11310
11427
|
return new Thread(_this5, thread);
|
|
11311
11428
|
}),
|
|
@@ -11314,13 +11431,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11314
11431
|
|
|
11315
11432
|
case 5:
|
|
11316
11433
|
case "end":
|
|
11317
|
-
return
|
|
11434
|
+
return _context64.stop();
|
|
11318
11435
|
}
|
|
11319
11436
|
}
|
|
11320
|
-
},
|
|
11437
|
+
}, _callee64, this);
|
|
11321
11438
|
}));
|
|
11322
11439
|
|
|
11323
|
-
function queryThreads(
|
|
11440
|
+
function queryThreads(_x88) {
|
|
11324
11441
|
return _queryThreads.apply(this, arguments);
|
|
11325
11442
|
}
|
|
11326
11443
|
|
|
@@ -11341,19 +11458,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11341
11458
|
}, {
|
|
11342
11459
|
key: "getThread",
|
|
11343
11460
|
value: function () {
|
|
11344
|
-
var _getThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11461
|
+
var _getThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee65(messageId) {
|
|
11345
11462
|
var options,
|
|
11346
11463
|
opts,
|
|
11347
11464
|
res,
|
|
11348
|
-
|
|
11349
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11465
|
+
_args65 = arguments;
|
|
11466
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee65$(_context65) {
|
|
11350
11467
|
while (1) {
|
|
11351
|
-
switch (
|
|
11468
|
+
switch (_context65.prev = _context65.next) {
|
|
11352
11469
|
case 0:
|
|
11353
|
-
options =
|
|
11470
|
+
options = _args65.length > 1 && _args65[1] !== undefined ? _args65[1] : {};
|
|
11354
11471
|
|
|
11355
11472
|
if (messageId) {
|
|
11356
|
-
|
|
11473
|
+
_context65.next = 3;
|
|
11357
11474
|
break;
|
|
11358
11475
|
}
|
|
11359
11476
|
|
|
@@ -11365,22 +11482,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11365
11482
|
reply_limit: 3,
|
|
11366
11483
|
watch: true
|
|
11367
11484
|
}, options);
|
|
11368
|
-
|
|
11485
|
+
_context65.next = 6;
|
|
11369
11486
|
return this.get(this.baseURL + "/threads/".concat(messageId), opts);
|
|
11370
11487
|
|
|
11371
11488
|
case 6:
|
|
11372
|
-
res =
|
|
11373
|
-
return
|
|
11489
|
+
res = _context65.sent;
|
|
11490
|
+
return _context65.abrupt("return", new Thread(this, res.thread));
|
|
11374
11491
|
|
|
11375
11492
|
case 8:
|
|
11376
11493
|
case "end":
|
|
11377
|
-
return
|
|
11494
|
+
return _context65.stop();
|
|
11378
11495
|
}
|
|
11379
11496
|
}
|
|
11380
|
-
},
|
|
11497
|
+
}, _callee65, this);
|
|
11381
11498
|
}));
|
|
11382
11499
|
|
|
11383
|
-
function getThread(
|
|
11500
|
+
function getThread(_x89) {
|
|
11384
11501
|
return _getThread.apply(this, arguments);
|
|
11385
11502
|
}
|
|
11386
11503
|
|
|
@@ -11398,15 +11515,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11398
11515
|
}, {
|
|
11399
11516
|
key: "partialUpdateThread",
|
|
11400
11517
|
value: function () {
|
|
11401
|
-
var _partialUpdateThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11518
|
+
var _partialUpdateThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee66(messageId, partialThreadObject) {
|
|
11402
11519
|
var reservedThreadFields, _key5;
|
|
11403
11520
|
|
|
11404
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11521
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee66$(_context66) {
|
|
11405
11522
|
while (1) {
|
|
11406
|
-
switch (
|
|
11523
|
+
switch (_context66.prev = _context66.next) {
|
|
11407
11524
|
case 0:
|
|
11408
11525
|
if (messageId) {
|
|
11409
|
-
|
|
11526
|
+
_context66.next = 2;
|
|
11410
11527
|
break;
|
|
11411
11528
|
}
|
|
11412
11529
|
|
|
@@ -11416,43 +11533,43 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11416
11533
|
// check for reserved fields from ThreadResponse type within partialThreadObject's set and unset.
|
|
11417
11534
|
// Throw error if any of the reserved field is found.
|
|
11418
11535
|
reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel'];
|
|
11419
|
-
|
|
11536
|
+
_context66.t0 = _regeneratorRuntime__default['default'].keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
|
|
11420
11537
|
|
|
11421
11538
|
case 4:
|
|
11422
|
-
if ((
|
|
11423
|
-
|
|
11539
|
+
if ((_context66.t1 = _context66.t0()).done) {
|
|
11540
|
+
_context66.next = 10;
|
|
11424
11541
|
break;
|
|
11425
11542
|
}
|
|
11426
11543
|
|
|
11427
|
-
_key5 =
|
|
11544
|
+
_key5 = _context66.t1.value;
|
|
11428
11545
|
|
|
11429
11546
|
if (!reservedThreadFields.includes(_key5)) {
|
|
11430
|
-
|
|
11547
|
+
_context66.next = 8;
|
|
11431
11548
|
break;
|
|
11432
11549
|
}
|
|
11433
11550
|
|
|
11434
11551
|
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."));
|
|
11435
11552
|
|
|
11436
11553
|
case 8:
|
|
11437
|
-
|
|
11554
|
+
_context66.next = 4;
|
|
11438
11555
|
break;
|
|
11439
11556
|
|
|
11440
11557
|
case 10:
|
|
11441
|
-
|
|
11558
|
+
_context66.next = 12;
|
|
11442
11559
|
return this.patch(this.baseURL + "/threads/".concat(messageId), partialThreadObject);
|
|
11443
11560
|
|
|
11444
11561
|
case 12:
|
|
11445
|
-
return
|
|
11562
|
+
return _context66.abrupt("return", _context66.sent);
|
|
11446
11563
|
|
|
11447
11564
|
case 13:
|
|
11448
11565
|
case "end":
|
|
11449
|
-
return
|
|
11566
|
+
return _context66.stop();
|
|
11450
11567
|
}
|
|
11451
11568
|
}
|
|
11452
|
-
},
|
|
11569
|
+
}, _callee66, this);
|
|
11453
11570
|
}));
|
|
11454
11571
|
|
|
11455
|
-
function partialUpdateThread(
|
|
11572
|
+
function partialUpdateThread(_x90, _x91) {
|
|
11456
11573
|
return _partialUpdateThread.apply(this, arguments);
|
|
11457
11574
|
}
|
|
11458
11575
|
|
|
@@ -11461,7 +11578,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11461
11578
|
}, {
|
|
11462
11579
|
key: "getUserAgent",
|
|
11463
11580
|
value: function getUserAgent() {
|
|
11464
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
11581
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.34.0");
|
|
11465
11582
|
}
|
|
11466
11583
|
}, {
|
|
11467
11584
|
key: "setUserAgent",
|
|
@@ -11680,28 +11797,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11680
11797
|
}, {
|
|
11681
11798
|
key: "sendUserCustomEvent",
|
|
11682
11799
|
value: function () {
|
|
11683
|
-
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11684
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11800
|
+
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee67(targetUserID, event) {
|
|
11801
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee67$(_context67) {
|
|
11685
11802
|
while (1) {
|
|
11686
|
-
switch (
|
|
11803
|
+
switch (_context67.prev = _context67.next) {
|
|
11687
11804
|
case 0:
|
|
11688
|
-
|
|
11805
|
+
_context67.next = 2;
|
|
11689
11806
|
return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
|
|
11690
11807
|
event: event
|
|
11691
11808
|
});
|
|
11692
11809
|
|
|
11693
11810
|
case 2:
|
|
11694
|
-
return
|
|
11811
|
+
return _context67.abrupt("return", _context67.sent);
|
|
11695
11812
|
|
|
11696
11813
|
case 3:
|
|
11697
11814
|
case "end":
|
|
11698
|
-
return
|
|
11815
|
+
return _context67.stop();
|
|
11699
11816
|
}
|
|
11700
11817
|
}
|
|
11701
|
-
},
|
|
11818
|
+
}, _callee67, this);
|
|
11702
11819
|
}));
|
|
11703
11820
|
|
|
11704
|
-
function sendUserCustomEvent(
|
|
11821
|
+
function sendUserCustomEvent(_x92, _x93) {
|
|
11705
11822
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
11706
11823
|
}
|
|
11707
11824
|
|
|
@@ -11798,28 +11915,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11798
11915
|
}, {
|
|
11799
11916
|
key: "createSegment",
|
|
11800
11917
|
value: function () {
|
|
11801
|
-
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11918
|
+
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee68(type, id, data) {
|
|
11802
11919
|
var body;
|
|
11803
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11920
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee68$(_context68) {
|
|
11804
11921
|
while (1) {
|
|
11805
|
-
switch (
|
|
11922
|
+
switch (_context68.prev = _context68.next) {
|
|
11806
11923
|
case 0:
|
|
11807
11924
|
this.validateServerSideAuth();
|
|
11808
11925
|
body = _objectSpread({
|
|
11809
11926
|
id: id,
|
|
11810
11927
|
type: type
|
|
11811
11928
|
}, data);
|
|
11812
|
-
return
|
|
11929
|
+
return _context68.abrupt("return", this.post(this.baseURL + "/segments", body));
|
|
11813
11930
|
|
|
11814
11931
|
case 3:
|
|
11815
11932
|
case "end":
|
|
11816
|
-
return
|
|
11933
|
+
return _context68.stop();
|
|
11817
11934
|
}
|
|
11818
11935
|
}
|
|
11819
|
-
},
|
|
11936
|
+
}, _callee68, this);
|
|
11820
11937
|
}));
|
|
11821
11938
|
|
|
11822
|
-
function createSegment(
|
|
11939
|
+
function createSegment(_x94, _x95, _x96) {
|
|
11823
11940
|
return _createSegment.apply(this, arguments);
|
|
11824
11941
|
}
|
|
11825
11942
|
|
|
@@ -11838,23 +11955,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11838
11955
|
}, {
|
|
11839
11956
|
key: "createUserSegment",
|
|
11840
11957
|
value: function () {
|
|
11841
|
-
var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11842
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11958
|
+
var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee69(id, data) {
|
|
11959
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee69$(_context69) {
|
|
11843
11960
|
while (1) {
|
|
11844
|
-
switch (
|
|
11961
|
+
switch (_context69.prev = _context69.next) {
|
|
11845
11962
|
case 0:
|
|
11846
11963
|
this.validateServerSideAuth();
|
|
11847
|
-
return
|
|
11964
|
+
return _context69.abrupt("return", this.createSegment('user', id, data));
|
|
11848
11965
|
|
|
11849
11966
|
case 2:
|
|
11850
11967
|
case "end":
|
|
11851
|
-
return
|
|
11968
|
+
return _context69.stop();
|
|
11852
11969
|
}
|
|
11853
11970
|
}
|
|
11854
|
-
},
|
|
11971
|
+
}, _callee69, this);
|
|
11855
11972
|
}));
|
|
11856
11973
|
|
|
11857
|
-
function createUserSegment(
|
|
11974
|
+
function createUserSegment(_x97, _x98) {
|
|
11858
11975
|
return _createUserSegment.apply(this, arguments);
|
|
11859
11976
|
}
|
|
11860
11977
|
|
|
@@ -11873,23 +11990,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11873
11990
|
}, {
|
|
11874
11991
|
key: "createChannelSegment",
|
|
11875
11992
|
value: function () {
|
|
11876
|
-
var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11877
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
11993
|
+
var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee70(id, data) {
|
|
11994
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee70$(_context70) {
|
|
11878
11995
|
while (1) {
|
|
11879
|
-
switch (
|
|
11996
|
+
switch (_context70.prev = _context70.next) {
|
|
11880
11997
|
case 0:
|
|
11881
11998
|
this.validateServerSideAuth();
|
|
11882
|
-
return
|
|
11999
|
+
return _context70.abrupt("return", this.createSegment('channel', id, data));
|
|
11883
12000
|
|
|
11884
12001
|
case 2:
|
|
11885
12002
|
case "end":
|
|
11886
|
-
return
|
|
12003
|
+
return _context70.stop();
|
|
11887
12004
|
}
|
|
11888
12005
|
}
|
|
11889
|
-
},
|
|
12006
|
+
}, _callee70, this);
|
|
11890
12007
|
}));
|
|
11891
12008
|
|
|
11892
|
-
function createChannelSegment(
|
|
12009
|
+
function createChannelSegment(_x99, _x100) {
|
|
11893
12010
|
return _createChannelSegment.apply(this, arguments);
|
|
11894
12011
|
}
|
|
11895
12012
|
|
|
@@ -11898,23 +12015,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11898
12015
|
}, {
|
|
11899
12016
|
key: "getSegment",
|
|
11900
12017
|
value: function () {
|
|
11901
|
-
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11902
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12018
|
+
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee71(id) {
|
|
12019
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee71$(_context71) {
|
|
11903
12020
|
while (1) {
|
|
11904
|
-
switch (
|
|
12021
|
+
switch (_context71.prev = _context71.next) {
|
|
11905
12022
|
case 0:
|
|
11906
12023
|
this.validateServerSideAuth();
|
|
11907
|
-
return
|
|
12024
|
+
return _context71.abrupt("return", this.get(this.baseURL + "/segments/".concat(id)));
|
|
11908
12025
|
|
|
11909
12026
|
case 2:
|
|
11910
12027
|
case "end":
|
|
11911
|
-
return
|
|
12028
|
+
return _context71.stop();
|
|
11912
12029
|
}
|
|
11913
12030
|
}
|
|
11914
|
-
},
|
|
12031
|
+
}, _callee71, this);
|
|
11915
12032
|
}));
|
|
11916
12033
|
|
|
11917
|
-
function getSegment(
|
|
12034
|
+
function getSegment(_x101) {
|
|
11918
12035
|
return _getSegment.apply(this, arguments);
|
|
11919
12036
|
}
|
|
11920
12037
|
|
|
@@ -11932,23 +12049,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11932
12049
|
}, {
|
|
11933
12050
|
key: "updateSegment",
|
|
11934
12051
|
value: function () {
|
|
11935
|
-
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11936
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12052
|
+
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee72(id, data) {
|
|
12053
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee72$(_context72) {
|
|
11937
12054
|
while (1) {
|
|
11938
|
-
switch (
|
|
12055
|
+
switch (_context72.prev = _context72.next) {
|
|
11939
12056
|
case 0:
|
|
11940
12057
|
this.validateServerSideAuth();
|
|
11941
|
-
return
|
|
12058
|
+
return _context72.abrupt("return", this.put(this.baseURL + "/segments/".concat(id), data));
|
|
11942
12059
|
|
|
11943
12060
|
case 2:
|
|
11944
12061
|
case "end":
|
|
11945
|
-
return
|
|
12062
|
+
return _context72.stop();
|
|
11946
12063
|
}
|
|
11947
12064
|
}
|
|
11948
|
-
},
|
|
12065
|
+
}, _callee72, this);
|
|
11949
12066
|
}));
|
|
11950
12067
|
|
|
11951
|
-
function updateSegment(
|
|
12068
|
+
function updateSegment(_x102, _x103) {
|
|
11952
12069
|
return _updateSegment.apply(this, arguments);
|
|
11953
12070
|
}
|
|
11954
12071
|
|
|
@@ -11966,27 +12083,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11966
12083
|
}, {
|
|
11967
12084
|
key: "addSegmentTargets",
|
|
11968
12085
|
value: function () {
|
|
11969
|
-
var _addSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12086
|
+
var _addSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee73(id, targets) {
|
|
11970
12087
|
var body;
|
|
11971
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12088
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee73$(_context73) {
|
|
11972
12089
|
while (1) {
|
|
11973
|
-
switch (
|
|
12090
|
+
switch (_context73.prev = _context73.next) {
|
|
11974
12091
|
case 0:
|
|
11975
12092
|
this.validateServerSideAuth();
|
|
11976
12093
|
body = {
|
|
11977
12094
|
target_ids: targets
|
|
11978
12095
|
};
|
|
11979
|
-
return
|
|
12096
|
+
return _context73.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/addtargets"), body));
|
|
11980
12097
|
|
|
11981
12098
|
case 3:
|
|
11982
12099
|
case "end":
|
|
11983
|
-
return
|
|
12100
|
+
return _context73.stop();
|
|
11984
12101
|
}
|
|
11985
12102
|
}
|
|
11986
|
-
},
|
|
12103
|
+
}, _callee73, this);
|
|
11987
12104
|
}));
|
|
11988
12105
|
|
|
11989
|
-
function addSegmentTargets(
|
|
12106
|
+
function addSegmentTargets(_x104, _x105) {
|
|
11990
12107
|
return _addSegmentTargets.apply(this, arguments);
|
|
11991
12108
|
}
|
|
11992
12109
|
|
|
@@ -11995,33 +12112,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11995
12112
|
}, {
|
|
11996
12113
|
key: "querySegmentTargets",
|
|
11997
12114
|
value: function () {
|
|
11998
|
-
var _querySegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12115
|
+
var _querySegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee74(id) {
|
|
11999
12116
|
var filter,
|
|
12000
12117
|
sort,
|
|
12001
12118
|
options,
|
|
12002
|
-
|
|
12003
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12119
|
+
_args74 = arguments;
|
|
12120
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee74$(_context74) {
|
|
12004
12121
|
while (1) {
|
|
12005
|
-
switch (
|
|
12122
|
+
switch (_context74.prev = _context74.next) {
|
|
12006
12123
|
case 0:
|
|
12007
|
-
filter =
|
|
12008
|
-
sort =
|
|
12009
|
-
options =
|
|
12124
|
+
filter = _args74.length > 1 && _args74[1] !== undefined ? _args74[1] : {};
|
|
12125
|
+
sort = _args74.length > 2 && _args74[2] !== undefined ? _args74[2] : [];
|
|
12126
|
+
options = _args74.length > 3 && _args74[3] !== undefined ? _args74[3] : {};
|
|
12010
12127
|
this.validateServerSideAuth();
|
|
12011
|
-
return
|
|
12128
|
+
return _context74.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/targets/query"), _objectSpread({
|
|
12012
12129
|
filter: filter || {},
|
|
12013
12130
|
sort: sort || []
|
|
12014
12131
|
}, options)));
|
|
12015
12132
|
|
|
12016
12133
|
case 5:
|
|
12017
12134
|
case "end":
|
|
12018
|
-
return
|
|
12135
|
+
return _context74.stop();
|
|
12019
12136
|
}
|
|
12020
12137
|
}
|
|
12021
|
-
},
|
|
12138
|
+
}, _callee74, this);
|
|
12022
12139
|
}));
|
|
12023
12140
|
|
|
12024
|
-
function querySegmentTargets(
|
|
12141
|
+
function querySegmentTargets(_x106) {
|
|
12025
12142
|
return _querySegmentTargets.apply(this, arguments);
|
|
12026
12143
|
}
|
|
12027
12144
|
|
|
@@ -12039,27 +12156,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12039
12156
|
}, {
|
|
12040
12157
|
key: "removeSegmentTargets",
|
|
12041
12158
|
value: function () {
|
|
12042
|
-
var _removeSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12159
|
+
var _removeSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee75(id, targets) {
|
|
12043
12160
|
var body;
|
|
12044
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12161
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee75$(_context75) {
|
|
12045
12162
|
while (1) {
|
|
12046
|
-
switch (
|
|
12163
|
+
switch (_context75.prev = _context75.next) {
|
|
12047
12164
|
case 0:
|
|
12048
12165
|
this.validateServerSideAuth();
|
|
12049
12166
|
body = {
|
|
12050
12167
|
target_ids: targets
|
|
12051
12168
|
};
|
|
12052
|
-
return
|
|
12169
|
+
return _context75.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/deletetargets"), body));
|
|
12053
12170
|
|
|
12054
12171
|
case 3:
|
|
12055
12172
|
case "end":
|
|
12056
|
-
return
|
|
12173
|
+
return _context75.stop();
|
|
12057
12174
|
}
|
|
12058
12175
|
}
|
|
12059
|
-
},
|
|
12176
|
+
}, _callee75, this);
|
|
12060
12177
|
}));
|
|
12061
12178
|
|
|
12062
|
-
function removeSegmentTargets(
|
|
12179
|
+
function removeSegmentTargets(_x107, _x108) {
|
|
12063
12180
|
return _removeSegmentTargets.apply(this, arguments);
|
|
12064
12181
|
}
|
|
12065
12182
|
|
|
@@ -12077,29 +12194,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12077
12194
|
}, {
|
|
12078
12195
|
key: "querySegments",
|
|
12079
12196
|
value: function () {
|
|
12080
|
-
var _querySegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12197
|
+
var _querySegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee76(filter, sort) {
|
|
12081
12198
|
var options,
|
|
12082
|
-
|
|
12083
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12199
|
+
_args76 = arguments;
|
|
12200
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee76$(_context76) {
|
|
12084
12201
|
while (1) {
|
|
12085
|
-
switch (
|
|
12202
|
+
switch (_context76.prev = _context76.next) {
|
|
12086
12203
|
case 0:
|
|
12087
|
-
options =
|
|
12204
|
+
options = _args76.length > 2 && _args76[2] !== undefined ? _args76[2] : {};
|
|
12088
12205
|
this.validateServerSideAuth();
|
|
12089
|
-
return
|
|
12206
|
+
return _context76.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
|
|
12090
12207
|
filter: filter,
|
|
12091
12208
|
sort: sort
|
|
12092
12209
|
}, options)));
|
|
12093
12210
|
|
|
12094
12211
|
case 3:
|
|
12095
12212
|
case "end":
|
|
12096
|
-
return
|
|
12213
|
+
return _context76.stop();
|
|
12097
12214
|
}
|
|
12098
12215
|
}
|
|
12099
|
-
},
|
|
12216
|
+
}, _callee76, this);
|
|
12100
12217
|
}));
|
|
12101
12218
|
|
|
12102
|
-
function querySegments(
|
|
12219
|
+
function querySegments(_x109, _x110) {
|
|
12103
12220
|
return _querySegments.apply(this, arguments);
|
|
12104
12221
|
}
|
|
12105
12222
|
|
|
@@ -12116,23 +12233,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12116
12233
|
}, {
|
|
12117
12234
|
key: "deleteSegment",
|
|
12118
12235
|
value: function () {
|
|
12119
|
-
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12120
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12236
|
+
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee77(id) {
|
|
12237
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee77$(_context77) {
|
|
12121
12238
|
while (1) {
|
|
12122
|
-
switch (
|
|
12239
|
+
switch (_context77.prev = _context77.next) {
|
|
12123
12240
|
case 0:
|
|
12124
12241
|
this.validateServerSideAuth();
|
|
12125
|
-
return
|
|
12242
|
+
return _context77.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
|
|
12126
12243
|
|
|
12127
12244
|
case 2:
|
|
12128
12245
|
case "end":
|
|
12129
|
-
return
|
|
12246
|
+
return _context77.stop();
|
|
12130
12247
|
}
|
|
12131
12248
|
}
|
|
12132
|
-
},
|
|
12249
|
+
}, _callee77, this);
|
|
12133
12250
|
}));
|
|
12134
12251
|
|
|
12135
|
-
function deleteSegment(
|
|
12252
|
+
function deleteSegment(_x111) {
|
|
12136
12253
|
return _deleteSegment.apply(this, arguments);
|
|
12137
12254
|
}
|
|
12138
12255
|
|
|
@@ -12150,23 +12267,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12150
12267
|
}, {
|
|
12151
12268
|
key: "segmentTargetExists",
|
|
12152
12269
|
value: function () {
|
|
12153
|
-
var _segmentTargetExists = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12154
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12270
|
+
var _segmentTargetExists = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee78(segmentId, targetId) {
|
|
12271
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee78$(_context78) {
|
|
12155
12272
|
while (1) {
|
|
12156
|
-
switch (
|
|
12273
|
+
switch (_context78.prev = _context78.next) {
|
|
12157
12274
|
case 0:
|
|
12158
12275
|
this.validateServerSideAuth();
|
|
12159
|
-
return
|
|
12276
|
+
return _context78.abrupt("return", this.get(this.baseURL + "/segments/".concat(segmentId, "/target/").concat(targetId)));
|
|
12160
12277
|
|
|
12161
12278
|
case 2:
|
|
12162
12279
|
case "end":
|
|
12163
|
-
return
|
|
12280
|
+
return _context78.stop();
|
|
12164
12281
|
}
|
|
12165
12282
|
}
|
|
12166
|
-
},
|
|
12283
|
+
}, _callee78, this);
|
|
12167
12284
|
}));
|
|
12168
12285
|
|
|
12169
|
-
function segmentTargetExists(
|
|
12286
|
+
function segmentTargetExists(_x112, _x113) {
|
|
12170
12287
|
return _segmentTargetExists.apply(this, arguments);
|
|
12171
12288
|
}
|
|
12172
12289
|
|
|
@@ -12183,23 +12300,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12183
12300
|
}, {
|
|
12184
12301
|
key: "createCampaign",
|
|
12185
12302
|
value: function () {
|
|
12186
|
-
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12187
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12303
|
+
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee79(params) {
|
|
12304
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee79$(_context79) {
|
|
12188
12305
|
while (1) {
|
|
12189
|
-
switch (
|
|
12306
|
+
switch (_context79.prev = _context79.next) {
|
|
12190
12307
|
case 0:
|
|
12191
12308
|
this.validateServerSideAuth();
|
|
12192
|
-
return
|
|
12309
|
+
return _context79.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
|
|
12193
12310
|
|
|
12194
12311
|
case 2:
|
|
12195
12312
|
case "end":
|
|
12196
|
-
return
|
|
12313
|
+
return _context79.stop();
|
|
12197
12314
|
}
|
|
12198
12315
|
}
|
|
12199
|
-
},
|
|
12316
|
+
}, _callee79, this);
|
|
12200
12317
|
}));
|
|
12201
12318
|
|
|
12202
|
-
function createCampaign(
|
|
12319
|
+
function createCampaign(_x114) {
|
|
12203
12320
|
return _createCampaign.apply(this, arguments);
|
|
12204
12321
|
}
|
|
12205
12322
|
|
|
@@ -12208,23 +12325,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12208
12325
|
}, {
|
|
12209
12326
|
key: "getCampaign",
|
|
12210
12327
|
value: function () {
|
|
12211
|
-
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12212
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12328
|
+
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee80(id) {
|
|
12329
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee80$(_context80) {
|
|
12213
12330
|
while (1) {
|
|
12214
|
-
switch (
|
|
12331
|
+
switch (_context80.prev = _context80.next) {
|
|
12215
12332
|
case 0:
|
|
12216
12333
|
this.validateServerSideAuth();
|
|
12217
|
-
return
|
|
12334
|
+
return _context80.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(id)));
|
|
12218
12335
|
|
|
12219
12336
|
case 2:
|
|
12220
12337
|
case "end":
|
|
12221
|
-
return
|
|
12338
|
+
return _context80.stop();
|
|
12222
12339
|
}
|
|
12223
12340
|
}
|
|
12224
|
-
},
|
|
12341
|
+
}, _callee80, this);
|
|
12225
12342
|
}));
|
|
12226
12343
|
|
|
12227
|
-
function getCampaign(
|
|
12344
|
+
function getCampaign(_x115) {
|
|
12228
12345
|
return _getCampaign.apply(this, arguments);
|
|
12229
12346
|
}
|
|
12230
12347
|
|
|
@@ -12233,26 +12350,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12233
12350
|
}, {
|
|
12234
12351
|
key: "startCampaign",
|
|
12235
12352
|
value: function () {
|
|
12236
|
-
var _startCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12237
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12353
|
+
var _startCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee81(id, options) {
|
|
12354
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee81$(_context81) {
|
|
12238
12355
|
while (1) {
|
|
12239
|
-
switch (
|
|
12356
|
+
switch (_context81.prev = _context81.next) {
|
|
12240
12357
|
case 0:
|
|
12241
12358
|
this.validateServerSideAuth();
|
|
12242
|
-
return
|
|
12359
|
+
return _context81.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/start"), {
|
|
12243
12360
|
scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
|
|
12244
12361
|
stop_at: options === null || options === void 0 ? void 0 : options.stopAt
|
|
12245
12362
|
}));
|
|
12246
12363
|
|
|
12247
12364
|
case 2:
|
|
12248
12365
|
case "end":
|
|
12249
|
-
return
|
|
12366
|
+
return _context81.stop();
|
|
12250
12367
|
}
|
|
12251
12368
|
}
|
|
12252
|
-
},
|
|
12369
|
+
}, _callee81, this);
|
|
12253
12370
|
}));
|
|
12254
12371
|
|
|
12255
|
-
function startCampaign(
|
|
12372
|
+
function startCampaign(_x116, _x117) {
|
|
12256
12373
|
return _startCampaign.apply(this, arguments);
|
|
12257
12374
|
}
|
|
12258
12375
|
|
|
@@ -12268,30 +12385,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12268
12385
|
}, {
|
|
12269
12386
|
key: "queryCampaigns",
|
|
12270
12387
|
value: function () {
|
|
12271
|
-
var _queryCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12272
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12388
|
+
var _queryCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee82(filter, sort, options) {
|
|
12389
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee82$(_context82) {
|
|
12273
12390
|
while (1) {
|
|
12274
|
-
switch (
|
|
12391
|
+
switch (_context82.prev = _context82.next) {
|
|
12275
12392
|
case 0:
|
|
12276
12393
|
this.validateServerSideAuth();
|
|
12277
|
-
|
|
12394
|
+
_context82.next = 3;
|
|
12278
12395
|
return this.post(this.baseURL + "/campaigns/query", _objectSpread({
|
|
12279
12396
|
filter: filter,
|
|
12280
12397
|
sort: sort
|
|
12281
12398
|
}, options || {}));
|
|
12282
12399
|
|
|
12283
12400
|
case 3:
|
|
12284
|
-
return
|
|
12401
|
+
return _context82.abrupt("return", _context82.sent);
|
|
12285
12402
|
|
|
12286
12403
|
case 4:
|
|
12287
12404
|
case "end":
|
|
12288
|
-
return
|
|
12405
|
+
return _context82.stop();
|
|
12289
12406
|
}
|
|
12290
12407
|
}
|
|
12291
|
-
},
|
|
12408
|
+
}, _callee82, this);
|
|
12292
12409
|
}));
|
|
12293
12410
|
|
|
12294
|
-
function queryCampaigns(
|
|
12411
|
+
function queryCampaigns(_x118, _x119, _x120) {
|
|
12295
12412
|
return _queryCampaigns.apply(this, arguments);
|
|
12296
12413
|
}
|
|
12297
12414
|
|
|
@@ -12309,23 +12426,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12309
12426
|
}, {
|
|
12310
12427
|
key: "updateCampaign",
|
|
12311
12428
|
value: function () {
|
|
12312
|
-
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12313
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12429
|
+
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee83(id, params) {
|
|
12430
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee83$(_context83) {
|
|
12314
12431
|
while (1) {
|
|
12315
|
-
switch (
|
|
12432
|
+
switch (_context83.prev = _context83.next) {
|
|
12316
12433
|
case 0:
|
|
12317
12434
|
this.validateServerSideAuth();
|
|
12318
|
-
return
|
|
12435
|
+
return _context83.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(id), params));
|
|
12319
12436
|
|
|
12320
12437
|
case 2:
|
|
12321
12438
|
case "end":
|
|
12322
|
-
return
|
|
12439
|
+
return _context83.stop();
|
|
12323
12440
|
}
|
|
12324
12441
|
}
|
|
12325
|
-
},
|
|
12442
|
+
}, _callee83, this);
|
|
12326
12443
|
}));
|
|
12327
12444
|
|
|
12328
|
-
function updateCampaign(
|
|
12445
|
+
function updateCampaign(_x121, _x122) {
|
|
12329
12446
|
return _updateCampaign.apply(this, arguments);
|
|
12330
12447
|
}
|
|
12331
12448
|
|
|
@@ -12342,23 +12459,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12342
12459
|
}, {
|
|
12343
12460
|
key: "deleteCampaign",
|
|
12344
12461
|
value: function () {
|
|
12345
|
-
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12346
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12462
|
+
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee84(id) {
|
|
12463
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee84$(_context84) {
|
|
12347
12464
|
while (1) {
|
|
12348
|
-
switch (
|
|
12465
|
+
switch (_context84.prev = _context84.next) {
|
|
12349
12466
|
case 0:
|
|
12350
12467
|
this.validateServerSideAuth();
|
|
12351
|
-
return
|
|
12468
|
+
return _context84.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
|
|
12352
12469
|
|
|
12353
12470
|
case 2:
|
|
12354
12471
|
case "end":
|
|
12355
|
-
return
|
|
12472
|
+
return _context84.stop();
|
|
12356
12473
|
}
|
|
12357
12474
|
}
|
|
12358
|
-
},
|
|
12475
|
+
}, _callee84, this);
|
|
12359
12476
|
}));
|
|
12360
12477
|
|
|
12361
|
-
function deleteCampaign(
|
|
12478
|
+
function deleteCampaign(_x123) {
|
|
12362
12479
|
return _deleteCampaign.apply(this, arguments);
|
|
12363
12480
|
}
|
|
12364
12481
|
|
|
@@ -12375,23 +12492,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12375
12492
|
}, {
|
|
12376
12493
|
key: "stopCampaign",
|
|
12377
12494
|
value: function () {
|
|
12378
|
-
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12379
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12495
|
+
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee85(id) {
|
|
12496
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee85$(_context85) {
|
|
12380
12497
|
while (1) {
|
|
12381
|
-
switch (
|
|
12498
|
+
switch (_context85.prev = _context85.next) {
|
|
12382
12499
|
case 0:
|
|
12383
12500
|
this.validateServerSideAuth();
|
|
12384
|
-
return
|
|
12501
|
+
return _context85.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/stop")));
|
|
12385
12502
|
|
|
12386
12503
|
case 2:
|
|
12387
12504
|
case "end":
|
|
12388
|
-
return
|
|
12505
|
+
return _context85.stop();
|
|
12389
12506
|
}
|
|
12390
12507
|
}
|
|
12391
|
-
},
|
|
12508
|
+
}, _callee85, this);
|
|
12392
12509
|
}));
|
|
12393
12510
|
|
|
12394
|
-
function stopCampaign(
|
|
12511
|
+
function stopCampaign(_x124) {
|
|
12395
12512
|
return _stopCampaign.apply(this, arguments);
|
|
12396
12513
|
}
|
|
12397
12514
|
|
|
@@ -12407,24 +12524,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12407
12524
|
}, {
|
|
12408
12525
|
key: "enrichURL",
|
|
12409
12526
|
value: function () {
|
|
12410
|
-
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12411
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12527
|
+
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee86(url) {
|
|
12528
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee86$(_context86) {
|
|
12412
12529
|
while (1) {
|
|
12413
|
-
switch (
|
|
12530
|
+
switch (_context86.prev = _context86.next) {
|
|
12414
12531
|
case 0:
|
|
12415
|
-
return
|
|
12532
|
+
return _context86.abrupt("return", this.get(this.baseURL + "/og", {
|
|
12416
12533
|
url: url
|
|
12417
12534
|
}));
|
|
12418
12535
|
|
|
12419
12536
|
case 1:
|
|
12420
12537
|
case "end":
|
|
12421
|
-
return
|
|
12538
|
+
return _context86.stop();
|
|
12422
12539
|
}
|
|
12423
12540
|
}
|
|
12424
|
-
},
|
|
12541
|
+
}, _callee86, this);
|
|
12425
12542
|
}));
|
|
12426
12543
|
|
|
12427
|
-
function enrichURL(
|
|
12544
|
+
function enrichURL(_x125) {
|
|
12428
12545
|
return _enrichURL.apply(this, arguments);
|
|
12429
12546
|
}
|
|
12430
12547
|
|
|
@@ -12441,22 +12558,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12441
12558
|
}, {
|
|
12442
12559
|
key: "getTask",
|
|
12443
12560
|
value: function () {
|
|
12444
|
-
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12445
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12561
|
+
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee87(id) {
|
|
12562
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee87$(_context87) {
|
|
12446
12563
|
while (1) {
|
|
12447
|
-
switch (
|
|
12564
|
+
switch (_context87.prev = _context87.next) {
|
|
12448
12565
|
case 0:
|
|
12449
|
-
return
|
|
12566
|
+
return _context87.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
12450
12567
|
|
|
12451
12568
|
case 1:
|
|
12452
12569
|
case "end":
|
|
12453
|
-
return
|
|
12570
|
+
return _context87.stop();
|
|
12454
12571
|
}
|
|
12455
12572
|
}
|
|
12456
|
-
},
|
|
12573
|
+
}, _callee87, this);
|
|
12457
12574
|
}));
|
|
12458
12575
|
|
|
12459
|
-
function getTask(
|
|
12576
|
+
function getTask(_x126) {
|
|
12460
12577
|
return _getTask.apply(this, arguments);
|
|
12461
12578
|
}
|
|
12462
12579
|
|
|
@@ -12474,31 +12591,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12474
12591
|
}, {
|
|
12475
12592
|
key: "deleteChannels",
|
|
12476
12593
|
value: function () {
|
|
12477
|
-
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12594
|
+
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee88(cids) {
|
|
12478
12595
|
var options,
|
|
12479
|
-
|
|
12480
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12596
|
+
_args88 = arguments;
|
|
12597
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee88$(_context88) {
|
|
12481
12598
|
while (1) {
|
|
12482
|
-
switch (
|
|
12599
|
+
switch (_context88.prev = _context88.next) {
|
|
12483
12600
|
case 0:
|
|
12484
|
-
options =
|
|
12485
|
-
|
|
12601
|
+
options = _args88.length > 1 && _args88[1] !== undefined ? _args88[1] : {};
|
|
12602
|
+
_context88.next = 3;
|
|
12486
12603
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
12487
12604
|
cids: cids
|
|
12488
12605
|
}, options));
|
|
12489
12606
|
|
|
12490
12607
|
case 3:
|
|
12491
|
-
return
|
|
12608
|
+
return _context88.abrupt("return", _context88.sent);
|
|
12492
12609
|
|
|
12493
12610
|
case 4:
|
|
12494
12611
|
case "end":
|
|
12495
|
-
return
|
|
12612
|
+
return _context88.stop();
|
|
12496
12613
|
}
|
|
12497
12614
|
}
|
|
12498
|
-
},
|
|
12615
|
+
}, _callee88, this);
|
|
12499
12616
|
}));
|
|
12500
12617
|
|
|
12501
|
-
function deleteChannels(
|
|
12618
|
+
function deleteChannels(_x127) {
|
|
12502
12619
|
return _deleteChannels.apply(this, arguments);
|
|
12503
12620
|
}
|
|
12504
12621
|
|
|
@@ -12516,17 +12633,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12516
12633
|
}, {
|
|
12517
12634
|
key: "deleteUsers",
|
|
12518
12635
|
value: function () {
|
|
12519
|
-
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12636
|
+
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee89(user_ids) {
|
|
12520
12637
|
var options,
|
|
12521
|
-
|
|
12522
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12638
|
+
_args89 = arguments;
|
|
12639
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee89$(_context89) {
|
|
12523
12640
|
while (1) {
|
|
12524
|
-
switch (
|
|
12641
|
+
switch (_context89.prev = _context89.next) {
|
|
12525
12642
|
case 0:
|
|
12526
|
-
options =
|
|
12643
|
+
options = _args89.length > 1 && _args89[1] !== undefined ? _args89[1] : {};
|
|
12527
12644
|
|
|
12528
12645
|
if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
|
|
12529
|
-
|
|
12646
|
+
_context89.next = 3;
|
|
12530
12647
|
break;
|
|
12531
12648
|
}
|
|
12532
12649
|
|
|
@@ -12534,7 +12651,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12534
12651
|
|
|
12535
12652
|
case 3:
|
|
12536
12653
|
if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
|
|
12537
|
-
|
|
12654
|
+
_context89.next = 5;
|
|
12538
12655
|
break;
|
|
12539
12656
|
}
|
|
12540
12657
|
|
|
@@ -12542,30 +12659,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12542
12659
|
|
|
12543
12660
|
case 5:
|
|
12544
12661
|
if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
|
|
12545
|
-
|
|
12662
|
+
_context89.next = 7;
|
|
12546
12663
|
break;
|
|
12547
12664
|
}
|
|
12548
12665
|
|
|
12549
12666
|
throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
|
|
12550
12667
|
|
|
12551
12668
|
case 7:
|
|
12552
|
-
|
|
12669
|
+
_context89.next = 9;
|
|
12553
12670
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
12554
12671
|
user_ids: user_ids
|
|
12555
12672
|
}, options));
|
|
12556
12673
|
|
|
12557
12674
|
case 9:
|
|
12558
|
-
return
|
|
12675
|
+
return _context89.abrupt("return", _context89.sent);
|
|
12559
12676
|
|
|
12560
12677
|
case 10:
|
|
12561
12678
|
case "end":
|
|
12562
|
-
return
|
|
12679
|
+
return _context89.stop();
|
|
12563
12680
|
}
|
|
12564
12681
|
}
|
|
12565
|
-
},
|
|
12682
|
+
}, _callee89, this);
|
|
12566
12683
|
}));
|
|
12567
12684
|
|
|
12568
|
-
function deleteUsers(
|
|
12685
|
+
function deleteUsers(_x128) {
|
|
12569
12686
|
return _deleteUsers.apply(this, arguments);
|
|
12570
12687
|
}
|
|
12571
12688
|
|
|
@@ -12586,28 +12703,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12586
12703
|
}, {
|
|
12587
12704
|
key: "_createImportURL",
|
|
12588
12705
|
value: function () {
|
|
12589
|
-
var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12590
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12706
|
+
var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee90(filename) {
|
|
12707
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee90$(_context90) {
|
|
12591
12708
|
while (1) {
|
|
12592
|
-
switch (
|
|
12709
|
+
switch (_context90.prev = _context90.next) {
|
|
12593
12710
|
case 0:
|
|
12594
|
-
|
|
12711
|
+
_context90.next = 2;
|
|
12595
12712
|
return this.post(this.baseURL + "/import_urls", {
|
|
12596
12713
|
filename: filename
|
|
12597
12714
|
});
|
|
12598
12715
|
|
|
12599
12716
|
case 2:
|
|
12600
|
-
return
|
|
12717
|
+
return _context90.abrupt("return", _context90.sent);
|
|
12601
12718
|
|
|
12602
12719
|
case 3:
|
|
12603
12720
|
case "end":
|
|
12604
|
-
return
|
|
12721
|
+
return _context90.stop();
|
|
12605
12722
|
}
|
|
12606
12723
|
}
|
|
12607
|
-
},
|
|
12724
|
+
}, _callee90, this);
|
|
12608
12725
|
}));
|
|
12609
12726
|
|
|
12610
|
-
function _createImportURL(
|
|
12727
|
+
function _createImportURL(_x129) {
|
|
12611
12728
|
return _createImportURL2.apply(this, arguments);
|
|
12612
12729
|
}
|
|
12613
12730
|
|
|
@@ -12629,33 +12746,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12629
12746
|
}, {
|
|
12630
12747
|
key: "_createImport",
|
|
12631
12748
|
value: function () {
|
|
12632
|
-
var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12749
|
+
var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee91(path) {
|
|
12633
12750
|
var options,
|
|
12634
|
-
|
|
12635
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12751
|
+
_args91 = arguments;
|
|
12752
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee91$(_context91) {
|
|
12636
12753
|
while (1) {
|
|
12637
|
-
switch (
|
|
12754
|
+
switch (_context91.prev = _context91.next) {
|
|
12638
12755
|
case 0:
|
|
12639
|
-
options =
|
|
12756
|
+
options = _args91.length > 1 && _args91[1] !== undefined ? _args91[1] : {
|
|
12640
12757
|
mode: 'upsert'
|
|
12641
12758
|
};
|
|
12642
|
-
|
|
12759
|
+
_context91.next = 3;
|
|
12643
12760
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
12644
12761
|
path: path
|
|
12645
12762
|
}, options));
|
|
12646
12763
|
|
|
12647
12764
|
case 3:
|
|
12648
|
-
return
|
|
12765
|
+
return _context91.abrupt("return", _context91.sent);
|
|
12649
12766
|
|
|
12650
12767
|
case 4:
|
|
12651
12768
|
case "end":
|
|
12652
|
-
return
|
|
12769
|
+
return _context91.stop();
|
|
12653
12770
|
}
|
|
12654
12771
|
}
|
|
12655
|
-
},
|
|
12772
|
+
}, _callee91, this);
|
|
12656
12773
|
}));
|
|
12657
12774
|
|
|
12658
|
-
function _createImport(
|
|
12775
|
+
function _createImport(_x130) {
|
|
12659
12776
|
return _createImport2.apply(this, arguments);
|
|
12660
12777
|
}
|
|
12661
12778
|
|
|
@@ -12677,26 +12794,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12677
12794
|
}, {
|
|
12678
12795
|
key: "_getImport",
|
|
12679
12796
|
value: function () {
|
|
12680
|
-
var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12681
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12797
|
+
var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee92(id) {
|
|
12798
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee92$(_context92) {
|
|
12682
12799
|
while (1) {
|
|
12683
|
-
switch (
|
|
12800
|
+
switch (_context92.prev = _context92.next) {
|
|
12684
12801
|
case 0:
|
|
12685
|
-
|
|
12802
|
+
_context92.next = 2;
|
|
12686
12803
|
return this.get(this.baseURL + "/imports/".concat(id));
|
|
12687
12804
|
|
|
12688
12805
|
case 2:
|
|
12689
|
-
return
|
|
12806
|
+
return _context92.abrupt("return", _context92.sent);
|
|
12690
12807
|
|
|
12691
12808
|
case 3:
|
|
12692
12809
|
case "end":
|
|
12693
|
-
return
|
|
12810
|
+
return _context92.stop();
|
|
12694
12811
|
}
|
|
12695
12812
|
}
|
|
12696
|
-
},
|
|
12813
|
+
}, _callee92, this);
|
|
12697
12814
|
}));
|
|
12698
12815
|
|
|
12699
|
-
function _getImport(
|
|
12816
|
+
function _getImport(_x131) {
|
|
12700
12817
|
return _getImport2.apply(this, arguments);
|
|
12701
12818
|
}
|
|
12702
12819
|
|
|
@@ -12718,26 +12835,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12718
12835
|
}, {
|
|
12719
12836
|
key: "_listImports",
|
|
12720
12837
|
value: function () {
|
|
12721
|
-
var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12722
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12838
|
+
var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee93(options) {
|
|
12839
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee93$(_context93) {
|
|
12723
12840
|
while (1) {
|
|
12724
|
-
switch (
|
|
12841
|
+
switch (_context93.prev = _context93.next) {
|
|
12725
12842
|
case 0:
|
|
12726
|
-
|
|
12843
|
+
_context93.next = 2;
|
|
12727
12844
|
return this.get(this.baseURL + "/imports", options);
|
|
12728
12845
|
|
|
12729
12846
|
case 2:
|
|
12730
|
-
return
|
|
12847
|
+
return _context93.abrupt("return", _context93.sent);
|
|
12731
12848
|
|
|
12732
12849
|
case 3:
|
|
12733
12850
|
case "end":
|
|
12734
|
-
return
|
|
12851
|
+
return _context93.stop();
|
|
12735
12852
|
}
|
|
12736
12853
|
}
|
|
12737
|
-
},
|
|
12854
|
+
}, _callee93, this);
|
|
12738
12855
|
}));
|
|
12739
12856
|
|
|
12740
|
-
function _listImports(
|
|
12857
|
+
function _listImports(_x132) {
|
|
12741
12858
|
return _listImports2.apply(this, arguments);
|
|
12742
12859
|
}
|
|
12743
12860
|
|
|
@@ -12756,28 +12873,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12756
12873
|
}, {
|
|
12757
12874
|
key: "upsertPushProvider",
|
|
12758
12875
|
value: function () {
|
|
12759
|
-
var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12760
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12876
|
+
var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee94(pushProvider) {
|
|
12877
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee94$(_context94) {
|
|
12761
12878
|
while (1) {
|
|
12762
|
-
switch (
|
|
12879
|
+
switch (_context94.prev = _context94.next) {
|
|
12763
12880
|
case 0:
|
|
12764
|
-
|
|
12881
|
+
_context94.next = 2;
|
|
12765
12882
|
return this.post(this.baseURL + "/push_providers", {
|
|
12766
12883
|
push_provider: pushProvider
|
|
12767
12884
|
});
|
|
12768
12885
|
|
|
12769
12886
|
case 2:
|
|
12770
|
-
return
|
|
12887
|
+
return _context94.abrupt("return", _context94.sent);
|
|
12771
12888
|
|
|
12772
12889
|
case 3:
|
|
12773
12890
|
case "end":
|
|
12774
|
-
return
|
|
12891
|
+
return _context94.stop();
|
|
12775
12892
|
}
|
|
12776
12893
|
}
|
|
12777
|
-
},
|
|
12894
|
+
}, _callee94, this);
|
|
12778
12895
|
}));
|
|
12779
12896
|
|
|
12780
|
-
function upsertPushProvider(
|
|
12897
|
+
function upsertPushProvider(_x133) {
|
|
12781
12898
|
return _upsertPushProvider.apply(this, arguments);
|
|
12782
12899
|
}
|
|
12783
12900
|
|
|
@@ -12796,28 +12913,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12796
12913
|
}, {
|
|
12797
12914
|
key: "deletePushProvider",
|
|
12798
12915
|
value: function () {
|
|
12799
|
-
var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12916
|
+
var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee95(_ref10) {
|
|
12800
12917
|
var type, name;
|
|
12801
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12918
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee95$(_context95) {
|
|
12802
12919
|
while (1) {
|
|
12803
|
-
switch (
|
|
12920
|
+
switch (_context95.prev = _context95.next) {
|
|
12804
12921
|
case 0:
|
|
12805
12922
|
type = _ref10.type, name = _ref10.name;
|
|
12806
|
-
|
|
12923
|
+
_context95.next = 3;
|
|
12807
12924
|
return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
|
|
12808
12925
|
|
|
12809
12926
|
case 3:
|
|
12810
|
-
return
|
|
12927
|
+
return _context95.abrupt("return", _context95.sent);
|
|
12811
12928
|
|
|
12812
12929
|
case 4:
|
|
12813
12930
|
case "end":
|
|
12814
|
-
return
|
|
12931
|
+
return _context95.stop();
|
|
12815
12932
|
}
|
|
12816
12933
|
}
|
|
12817
|
-
},
|
|
12934
|
+
}, _callee95, this);
|
|
12818
12935
|
}));
|
|
12819
12936
|
|
|
12820
|
-
function deletePushProvider(
|
|
12937
|
+
function deletePushProvider(_x134) {
|
|
12821
12938
|
return _deletePushProvider.apply(this, arguments);
|
|
12822
12939
|
}
|
|
12823
12940
|
|
|
@@ -12834,23 +12951,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12834
12951
|
}, {
|
|
12835
12952
|
key: "listPushProviders",
|
|
12836
12953
|
value: function () {
|
|
12837
|
-
var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12838
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12954
|
+
var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee96() {
|
|
12955
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee96$(_context96) {
|
|
12839
12956
|
while (1) {
|
|
12840
|
-
switch (
|
|
12957
|
+
switch (_context96.prev = _context96.next) {
|
|
12841
12958
|
case 0:
|
|
12842
|
-
|
|
12959
|
+
_context96.next = 2;
|
|
12843
12960
|
return this.get(this.baseURL + "/push_providers");
|
|
12844
12961
|
|
|
12845
12962
|
case 2:
|
|
12846
|
-
return
|
|
12963
|
+
return _context96.abrupt("return", _context96.sent);
|
|
12847
12964
|
|
|
12848
12965
|
case 3:
|
|
12849
12966
|
case "end":
|
|
12850
|
-
return
|
|
12967
|
+
return _context96.stop();
|
|
12851
12968
|
}
|
|
12852
12969
|
}
|
|
12853
|
-
},
|
|
12970
|
+
}, _callee96, this);
|
|
12854
12971
|
}));
|
|
12855
12972
|
|
|
12856
12973
|
function listPushProviders() {
|
|
@@ -12878,26 +12995,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12878
12995
|
}, {
|
|
12879
12996
|
key: "commitMessage",
|
|
12880
12997
|
value: function () {
|
|
12881
|
-
var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12882
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12998
|
+
var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee97(id) {
|
|
12999
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee97$(_context97) {
|
|
12883
13000
|
while (1) {
|
|
12884
|
-
switch (
|
|
13001
|
+
switch (_context97.prev = _context97.next) {
|
|
12885
13002
|
case 0:
|
|
12886
|
-
|
|
13003
|
+
_context97.next = 2;
|
|
12887
13004
|
return this.post(this.baseURL + "/messages/".concat(id, "/commit"));
|
|
12888
13005
|
|
|
12889
13006
|
case 2:
|
|
12890
|
-
return
|
|
13007
|
+
return _context97.abrupt("return", _context97.sent);
|
|
12891
13008
|
|
|
12892
13009
|
case 3:
|
|
12893
13010
|
case "end":
|
|
12894
|
-
return
|
|
13011
|
+
return _context97.stop();
|
|
12895
13012
|
}
|
|
12896
13013
|
}
|
|
12897
|
-
},
|
|
13014
|
+
}, _callee97, this);
|
|
12898
13015
|
}));
|
|
12899
13016
|
|
|
12900
|
-
function commitMessage(
|
|
13017
|
+
function commitMessage(_x135) {
|
|
12901
13018
|
return _commitMessage.apply(this, arguments);
|
|
12902
13019
|
}
|
|
12903
13020
|
|
|
@@ -12912,26 +13029,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12912
13029
|
}, {
|
|
12913
13030
|
key: "createPoll",
|
|
12914
13031
|
value: function () {
|
|
12915
|
-
var _createPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12916
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13032
|
+
var _createPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee98(poll) {
|
|
13033
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee98$(_context98) {
|
|
12917
13034
|
while (1) {
|
|
12918
|
-
switch (
|
|
13035
|
+
switch (_context98.prev = _context98.next) {
|
|
12919
13036
|
case 0:
|
|
12920
|
-
|
|
13037
|
+
_context98.next = 2;
|
|
12921
13038
|
return this.post(this.baseURL + "/polls", poll);
|
|
12922
13039
|
|
|
12923
13040
|
case 2:
|
|
12924
|
-
return
|
|
13041
|
+
return _context98.abrupt("return", _context98.sent);
|
|
12925
13042
|
|
|
12926
13043
|
case 3:
|
|
12927
13044
|
case "end":
|
|
12928
|
-
return
|
|
13045
|
+
return _context98.stop();
|
|
12929
13046
|
}
|
|
12930
13047
|
}
|
|
12931
|
-
},
|
|
13048
|
+
}, _callee98, this);
|
|
12932
13049
|
}));
|
|
12933
13050
|
|
|
12934
|
-
function createPoll(
|
|
13051
|
+
function createPoll(_x136) {
|
|
12935
13052
|
return _createPoll.apply(this, arguments);
|
|
12936
13053
|
}
|
|
12937
13054
|
|
|
@@ -12946,28 +13063,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12946
13063
|
}, {
|
|
12947
13064
|
key: "getPoll",
|
|
12948
13065
|
value: function () {
|
|
12949
|
-
var _getPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12950
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13066
|
+
var _getPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee99(id, userId) {
|
|
13067
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee99$(_context99) {
|
|
12951
13068
|
while (1) {
|
|
12952
|
-
switch (
|
|
13069
|
+
switch (_context99.prev = _context99.next) {
|
|
12953
13070
|
case 0:
|
|
12954
|
-
|
|
13071
|
+
_context99.next = 2;
|
|
12955
13072
|
return this.get(this.baseURL + "/polls/".concat(id), _objectSpread({}, userId ? {
|
|
12956
13073
|
user_id: userId
|
|
12957
13074
|
} : {}));
|
|
12958
13075
|
|
|
12959
13076
|
case 2:
|
|
12960
|
-
return
|
|
13077
|
+
return _context99.abrupt("return", _context99.sent);
|
|
12961
13078
|
|
|
12962
13079
|
case 3:
|
|
12963
13080
|
case "end":
|
|
12964
|
-
return
|
|
13081
|
+
return _context99.stop();
|
|
12965
13082
|
}
|
|
12966
13083
|
}
|
|
12967
|
-
},
|
|
13084
|
+
}, _callee99, this);
|
|
12968
13085
|
}));
|
|
12969
13086
|
|
|
12970
|
-
function getPoll(
|
|
13087
|
+
function getPoll(_x137, _x138) {
|
|
12971
13088
|
return _getPoll.apply(this, arguments);
|
|
12972
13089
|
}
|
|
12973
13090
|
|
|
@@ -12982,26 +13099,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12982
13099
|
}, {
|
|
12983
13100
|
key: "updatePoll",
|
|
12984
13101
|
value: function () {
|
|
12985
|
-
var _updatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12986
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13102
|
+
var _updatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee100(poll) {
|
|
13103
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee100$(_context100) {
|
|
12987
13104
|
while (1) {
|
|
12988
|
-
switch (
|
|
13105
|
+
switch (_context100.prev = _context100.next) {
|
|
12989
13106
|
case 0:
|
|
12990
|
-
|
|
13107
|
+
_context100.next = 2;
|
|
12991
13108
|
return this.put(this.baseURL + "/polls", poll);
|
|
12992
13109
|
|
|
12993
13110
|
case 2:
|
|
12994
|
-
return
|
|
13111
|
+
return _context100.abrupt("return", _context100.sent);
|
|
12995
13112
|
|
|
12996
13113
|
case 3:
|
|
12997
13114
|
case "end":
|
|
12998
|
-
return
|
|
13115
|
+
return _context100.stop();
|
|
12999
13116
|
}
|
|
13000
13117
|
}
|
|
13001
|
-
},
|
|
13118
|
+
}, _callee100, this);
|
|
13002
13119
|
}));
|
|
13003
13120
|
|
|
13004
|
-
function updatePoll(
|
|
13121
|
+
function updatePoll(_x139) {
|
|
13005
13122
|
return _updatePoll.apply(this, arguments);
|
|
13006
13123
|
}
|
|
13007
13124
|
|
|
@@ -13018,26 +13135,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13018
13135
|
}, {
|
|
13019
13136
|
key: "partialUpdatePoll",
|
|
13020
13137
|
value: function () {
|
|
13021
|
-
var _partialUpdatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13022
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13138
|
+
var _partialUpdatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee101(id, partialPollObject) {
|
|
13139
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee101$(_context101) {
|
|
13023
13140
|
while (1) {
|
|
13024
|
-
switch (
|
|
13141
|
+
switch (_context101.prev = _context101.next) {
|
|
13025
13142
|
case 0:
|
|
13026
|
-
|
|
13143
|
+
_context101.next = 2;
|
|
13027
13144
|
return this.patch(this.baseURL + "/polls/".concat(id), partialPollObject);
|
|
13028
13145
|
|
|
13029
13146
|
case 2:
|
|
13030
|
-
return
|
|
13147
|
+
return _context101.abrupt("return", _context101.sent);
|
|
13031
13148
|
|
|
13032
13149
|
case 3:
|
|
13033
13150
|
case "end":
|
|
13034
|
-
return
|
|
13151
|
+
return _context101.stop();
|
|
13035
13152
|
}
|
|
13036
13153
|
}
|
|
13037
|
-
},
|
|
13154
|
+
}, _callee101, this);
|
|
13038
13155
|
}));
|
|
13039
13156
|
|
|
13040
|
-
function partialUpdatePoll(
|
|
13157
|
+
function partialUpdatePoll(_x140, _x141) {
|
|
13041
13158
|
return _partialUpdatePoll.apply(this, arguments);
|
|
13042
13159
|
}
|
|
13043
13160
|
|
|
@@ -13053,28 +13170,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13053
13170
|
}, {
|
|
13054
13171
|
key: "deletePoll",
|
|
13055
13172
|
value: function () {
|
|
13056
|
-
var _deletePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13057
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13173
|
+
var _deletePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee102(id, userId) {
|
|
13174
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee102$(_context102) {
|
|
13058
13175
|
while (1) {
|
|
13059
|
-
switch (
|
|
13176
|
+
switch (_context102.prev = _context102.next) {
|
|
13060
13177
|
case 0:
|
|
13061
|
-
|
|
13178
|
+
_context102.next = 2;
|
|
13062
13179
|
return this.delete(this.baseURL + "/polls/".concat(id), _objectSpread({}, userId ? {
|
|
13063
13180
|
user_id: userId
|
|
13064
13181
|
} : {}));
|
|
13065
13182
|
|
|
13066
13183
|
case 2:
|
|
13067
|
-
return
|
|
13184
|
+
return _context102.abrupt("return", _context102.sent);
|
|
13068
13185
|
|
|
13069
13186
|
case 3:
|
|
13070
13187
|
case "end":
|
|
13071
|
-
return
|
|
13188
|
+
return _context102.stop();
|
|
13072
13189
|
}
|
|
13073
13190
|
}
|
|
13074
|
-
},
|
|
13191
|
+
}, _callee102, this);
|
|
13075
13192
|
}));
|
|
13076
13193
|
|
|
13077
|
-
function deletePoll(
|
|
13194
|
+
function deletePoll(_x142, _x143) {
|
|
13078
13195
|
return _deletePoll.apply(this, arguments);
|
|
13079
13196
|
}
|
|
13080
13197
|
|
|
@@ -13089,12 +13206,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13089
13206
|
}, {
|
|
13090
13207
|
key: "closePoll",
|
|
13091
13208
|
value: function () {
|
|
13092
|
-
var _closePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13093
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13209
|
+
var _closePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee103(id) {
|
|
13210
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee103$(_context103) {
|
|
13094
13211
|
while (1) {
|
|
13095
|
-
switch (
|
|
13212
|
+
switch (_context103.prev = _context103.next) {
|
|
13096
13213
|
case 0:
|
|
13097
|
-
return
|
|
13214
|
+
return _context103.abrupt("return", this.partialUpdatePoll(id, {
|
|
13098
13215
|
set: {
|
|
13099
13216
|
is_closed: true
|
|
13100
13217
|
}
|
|
@@ -13102,13 +13219,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13102
13219
|
|
|
13103
13220
|
case 1:
|
|
13104
13221
|
case "end":
|
|
13105
|
-
return
|
|
13222
|
+
return _context103.stop();
|
|
13106
13223
|
}
|
|
13107
13224
|
}
|
|
13108
|
-
},
|
|
13225
|
+
}, _callee103, this);
|
|
13109
13226
|
}));
|
|
13110
13227
|
|
|
13111
|
-
function closePoll(
|
|
13228
|
+
function closePoll(_x144) {
|
|
13112
13229
|
return _closePoll.apply(this, arguments);
|
|
13113
13230
|
}
|
|
13114
13231
|
|
|
@@ -13124,26 +13241,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13124
13241
|
}, {
|
|
13125
13242
|
key: "createPollOption",
|
|
13126
13243
|
value: function () {
|
|
13127
|
-
var _createPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13128
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13244
|
+
var _createPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee104(pollId, option) {
|
|
13245
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee104$(_context104) {
|
|
13129
13246
|
while (1) {
|
|
13130
|
-
switch (
|
|
13247
|
+
switch (_context104.prev = _context104.next) {
|
|
13131
13248
|
case 0:
|
|
13132
|
-
|
|
13249
|
+
_context104.next = 2;
|
|
13133
13250
|
return this.post(this.baseURL + "/polls/".concat(pollId, "/options"), option);
|
|
13134
13251
|
|
|
13135
13252
|
case 2:
|
|
13136
|
-
return
|
|
13253
|
+
return _context104.abrupt("return", _context104.sent);
|
|
13137
13254
|
|
|
13138
13255
|
case 3:
|
|
13139
13256
|
case "end":
|
|
13140
|
-
return
|
|
13257
|
+
return _context104.stop();
|
|
13141
13258
|
}
|
|
13142
13259
|
}
|
|
13143
|
-
},
|
|
13260
|
+
}, _callee104, this);
|
|
13144
13261
|
}));
|
|
13145
13262
|
|
|
13146
|
-
function createPollOption(
|
|
13263
|
+
function createPollOption(_x145, _x146) {
|
|
13147
13264
|
return _createPollOption.apply(this, arguments);
|
|
13148
13265
|
}
|
|
13149
13266
|
|
|
@@ -13159,26 +13276,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13159
13276
|
}, {
|
|
13160
13277
|
key: "getPollOption",
|
|
13161
13278
|
value: function () {
|
|
13162
|
-
var _getPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13163
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13279
|
+
var _getPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee105(pollId, optionId) {
|
|
13280
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee105$(_context105) {
|
|
13164
13281
|
while (1) {
|
|
13165
|
-
switch (
|
|
13282
|
+
switch (_context105.prev = _context105.next) {
|
|
13166
13283
|
case 0:
|
|
13167
|
-
|
|
13284
|
+
_context105.next = 2;
|
|
13168
13285
|
return this.get(this.baseURL + "/polls/".concat(pollId, "/options/").concat(optionId));
|
|
13169
13286
|
|
|
13170
13287
|
case 2:
|
|
13171
|
-
return
|
|
13288
|
+
return _context105.abrupt("return", _context105.sent);
|
|
13172
13289
|
|
|
13173
13290
|
case 3:
|
|
13174
13291
|
case "end":
|
|
13175
|
-
return
|
|
13292
|
+
return _context105.stop();
|
|
13176
13293
|
}
|
|
13177
13294
|
}
|
|
13178
|
-
},
|
|
13295
|
+
}, _callee105, this);
|
|
13179
13296
|
}));
|
|
13180
13297
|
|
|
13181
|
-
function getPollOption(
|
|
13298
|
+
function getPollOption(_x147, _x148) {
|
|
13182
13299
|
return _getPollOption.apply(this, arguments);
|
|
13183
13300
|
}
|
|
13184
13301
|
|
|
@@ -13194,26 +13311,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13194
13311
|
}, {
|
|
13195
13312
|
key: "updatePollOption",
|
|
13196
13313
|
value: function () {
|
|
13197
|
-
var _updatePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13198
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13314
|
+
var _updatePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee106(pollId, option) {
|
|
13315
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee106$(_context106) {
|
|
13199
13316
|
while (1) {
|
|
13200
|
-
switch (
|
|
13317
|
+
switch (_context106.prev = _context106.next) {
|
|
13201
13318
|
case 0:
|
|
13202
|
-
|
|
13319
|
+
_context106.next = 2;
|
|
13203
13320
|
return this.put(this.baseURL + "/polls/".concat(pollId, "/options"), option);
|
|
13204
13321
|
|
|
13205
13322
|
case 2:
|
|
13206
|
-
return
|
|
13323
|
+
return _context106.abrupt("return", _context106.sent);
|
|
13207
13324
|
|
|
13208
13325
|
case 3:
|
|
13209
13326
|
case "end":
|
|
13210
|
-
return
|
|
13327
|
+
return _context106.stop();
|
|
13211
13328
|
}
|
|
13212
13329
|
}
|
|
13213
|
-
},
|
|
13330
|
+
}, _callee106, this);
|
|
13214
13331
|
}));
|
|
13215
13332
|
|
|
13216
|
-
function updatePollOption(
|
|
13333
|
+
function updatePollOption(_x149, _x150) {
|
|
13217
13334
|
return _updatePollOption.apply(this, arguments);
|
|
13218
13335
|
}
|
|
13219
13336
|
|
|
@@ -13229,26 +13346,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13229
13346
|
}, {
|
|
13230
13347
|
key: "deletePollOption",
|
|
13231
13348
|
value: function () {
|
|
13232
|
-
var _deletePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13233
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13349
|
+
var _deletePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee107(pollId, optionId) {
|
|
13350
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee107$(_context107) {
|
|
13234
13351
|
while (1) {
|
|
13235
|
-
switch (
|
|
13352
|
+
switch (_context107.prev = _context107.next) {
|
|
13236
13353
|
case 0:
|
|
13237
|
-
|
|
13354
|
+
_context107.next = 2;
|
|
13238
13355
|
return this.delete(this.baseURL + "/polls/".concat(pollId, "/options/").concat(optionId));
|
|
13239
13356
|
|
|
13240
13357
|
case 2:
|
|
13241
|
-
return
|
|
13358
|
+
return _context107.abrupt("return", _context107.sent);
|
|
13242
13359
|
|
|
13243
13360
|
case 3:
|
|
13244
13361
|
case "end":
|
|
13245
|
-
return
|
|
13362
|
+
return _context107.stop();
|
|
13246
13363
|
}
|
|
13247
13364
|
}
|
|
13248
|
-
},
|
|
13365
|
+
}, _callee107, this);
|
|
13249
13366
|
}));
|
|
13250
13367
|
|
|
13251
|
-
function deletePollOption(
|
|
13368
|
+
function deletePollOption(_x151, _x152) {
|
|
13252
13369
|
return _deletePollOption.apply(this, arguments);
|
|
13253
13370
|
}
|
|
13254
13371
|
|
|
@@ -13265,31 +13382,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13265
13382
|
}, {
|
|
13266
13383
|
key: "castPollVote",
|
|
13267
13384
|
value: function () {
|
|
13268
|
-
var _castPollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13385
|
+
var _castPollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee108(messageId, pollId, vote) {
|
|
13269
13386
|
var options,
|
|
13270
|
-
|
|
13271
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13387
|
+
_args108 = arguments;
|
|
13388
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee108$(_context108) {
|
|
13272
13389
|
while (1) {
|
|
13273
|
-
switch (
|
|
13390
|
+
switch (_context108.prev = _context108.next) {
|
|
13274
13391
|
case 0:
|
|
13275
|
-
options =
|
|
13276
|
-
|
|
13392
|
+
options = _args108.length > 3 && _args108[3] !== undefined ? _args108[3] : {};
|
|
13393
|
+
_context108.next = 3;
|
|
13277
13394
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/polls/").concat(pollId, "/vote"), _objectSpread({
|
|
13278
13395
|
vote: vote
|
|
13279
13396
|
}, options));
|
|
13280
13397
|
|
|
13281
13398
|
case 3:
|
|
13282
|
-
return
|
|
13399
|
+
return _context108.abrupt("return", _context108.sent);
|
|
13283
13400
|
|
|
13284
13401
|
case 4:
|
|
13285
13402
|
case "end":
|
|
13286
|
-
return
|
|
13403
|
+
return _context108.stop();
|
|
13287
13404
|
}
|
|
13288
13405
|
}
|
|
13289
|
-
},
|
|
13406
|
+
}, _callee108, this);
|
|
13290
13407
|
}));
|
|
13291
13408
|
|
|
13292
|
-
function castPollVote(
|
|
13409
|
+
function castPollVote(_x153, _x154, _x155) {
|
|
13293
13410
|
return _castPollVote.apply(this, arguments);
|
|
13294
13411
|
}
|
|
13295
13412
|
|
|
@@ -13305,24 +13422,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13305
13422
|
}, {
|
|
13306
13423
|
key: "addPollAnswer",
|
|
13307
13424
|
value: function () {
|
|
13308
|
-
var _addPollAnswer = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13309
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13425
|
+
var _addPollAnswer = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee109(messageId, pollId, answerText) {
|
|
13426
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee109$(_context109) {
|
|
13310
13427
|
while (1) {
|
|
13311
|
-
switch (
|
|
13428
|
+
switch (_context109.prev = _context109.next) {
|
|
13312
13429
|
case 0:
|
|
13313
|
-
return
|
|
13430
|
+
return _context109.abrupt("return", this.castPollVote(messageId, pollId, {
|
|
13314
13431
|
answer_text: answerText
|
|
13315
13432
|
}));
|
|
13316
13433
|
|
|
13317
13434
|
case 1:
|
|
13318
13435
|
case "end":
|
|
13319
|
-
return
|
|
13436
|
+
return _context109.stop();
|
|
13320
13437
|
}
|
|
13321
13438
|
}
|
|
13322
|
-
},
|
|
13439
|
+
}, _callee109, this);
|
|
13323
13440
|
}));
|
|
13324
13441
|
|
|
13325
|
-
function addPollAnswer(
|
|
13442
|
+
function addPollAnswer(_x156, _x157, _x158) {
|
|
13326
13443
|
return _addPollAnswer.apply(this, arguments);
|
|
13327
13444
|
}
|
|
13328
13445
|
|
|
@@ -13331,26 +13448,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13331
13448
|
}, {
|
|
13332
13449
|
key: "removePollVote",
|
|
13333
13450
|
value: function () {
|
|
13334
|
-
var _removePollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13335
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13451
|
+
var _removePollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee110(messageId, pollId, voteId) {
|
|
13452
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee110$(_context110) {
|
|
13336
13453
|
while (1) {
|
|
13337
|
-
switch (
|
|
13454
|
+
switch (_context110.prev = _context110.next) {
|
|
13338
13455
|
case 0:
|
|
13339
|
-
|
|
13456
|
+
_context110.next = 2;
|
|
13340
13457
|
return this.delete(this.baseURL + "/messages/".concat(messageId, "/polls/").concat(pollId, "/vote/").concat(voteId));
|
|
13341
13458
|
|
|
13342
13459
|
case 2:
|
|
13343
|
-
return
|
|
13460
|
+
return _context110.abrupt("return", _context110.sent);
|
|
13344
13461
|
|
|
13345
13462
|
case 3:
|
|
13346
13463
|
case "end":
|
|
13347
|
-
return
|
|
13464
|
+
return _context110.stop();
|
|
13348
13465
|
}
|
|
13349
13466
|
}
|
|
13350
|
-
},
|
|
13467
|
+
}, _callee110, this);
|
|
13351
13468
|
}));
|
|
13352
13469
|
|
|
13353
|
-
function removePollVote(
|
|
13470
|
+
function removePollVote(_x159, _x160, _x161) {
|
|
13354
13471
|
return _removePollVote.apply(this, arguments);
|
|
13355
13472
|
}
|
|
13356
13473
|
|
|
@@ -13367,33 +13484,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13367
13484
|
}, {
|
|
13368
13485
|
key: "queryPolls",
|
|
13369
13486
|
value: function () {
|
|
13370
|
-
var _queryPolls = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13487
|
+
var _queryPolls = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee111() {
|
|
13371
13488
|
var filter,
|
|
13372
13489
|
sort,
|
|
13373
13490
|
options,
|
|
13374
|
-
|
|
13375
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13491
|
+
_args111 = arguments;
|
|
13492
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee111$(_context111) {
|
|
13376
13493
|
while (1) {
|
|
13377
|
-
switch (
|
|
13494
|
+
switch (_context111.prev = _context111.next) {
|
|
13378
13495
|
case 0:
|
|
13379
|
-
filter =
|
|
13380
|
-
sort =
|
|
13381
|
-
options =
|
|
13382
|
-
|
|
13496
|
+
filter = _args111.length > 0 && _args111[0] !== undefined ? _args111[0] : {};
|
|
13497
|
+
sort = _args111.length > 1 && _args111[1] !== undefined ? _args111[1] : [];
|
|
13498
|
+
options = _args111.length > 2 && _args111[2] !== undefined ? _args111[2] : {};
|
|
13499
|
+
_context111.next = 5;
|
|
13383
13500
|
return this.post(this.baseURL + '/polls/query', _objectSpread({
|
|
13384
13501
|
filter: filter,
|
|
13385
13502
|
sort: normalizeQuerySort(sort)
|
|
13386
13503
|
}, options));
|
|
13387
13504
|
|
|
13388
13505
|
case 5:
|
|
13389
|
-
return
|
|
13506
|
+
return _context111.abrupt("return", _context111.sent);
|
|
13390
13507
|
|
|
13391
13508
|
case 6:
|
|
13392
13509
|
case "end":
|
|
13393
|
-
return
|
|
13510
|
+
return _context111.stop();
|
|
13394
13511
|
}
|
|
13395
13512
|
}
|
|
13396
|
-
},
|
|
13513
|
+
}, _callee111, this);
|
|
13397
13514
|
}));
|
|
13398
13515
|
|
|
13399
13516
|
function queryPolls() {
|
|
@@ -13414,36 +13531,36 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13414
13531
|
}, {
|
|
13415
13532
|
key: "queryPollVotes",
|
|
13416
13533
|
value: function () {
|
|
13417
|
-
var _queryPollVotes = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13534
|
+
var _queryPollVotes = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee112(pollId) {
|
|
13418
13535
|
var filter,
|
|
13419
13536
|
sort,
|
|
13420
13537
|
options,
|
|
13421
|
-
|
|
13422
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13538
|
+
_args112 = arguments;
|
|
13539
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee112$(_context112) {
|
|
13423
13540
|
while (1) {
|
|
13424
|
-
switch (
|
|
13541
|
+
switch (_context112.prev = _context112.next) {
|
|
13425
13542
|
case 0:
|
|
13426
|
-
filter =
|
|
13427
|
-
sort =
|
|
13428
|
-
options =
|
|
13429
|
-
|
|
13543
|
+
filter = _args112.length > 1 && _args112[1] !== undefined ? _args112[1] : {};
|
|
13544
|
+
sort = _args112.length > 2 && _args112[2] !== undefined ? _args112[2] : [];
|
|
13545
|
+
options = _args112.length > 3 && _args112[3] !== undefined ? _args112[3] : {};
|
|
13546
|
+
_context112.next = 5;
|
|
13430
13547
|
return this.post(this.baseURL + "/polls/".concat(pollId, "/votes"), _objectSpread({
|
|
13431
13548
|
filter: filter,
|
|
13432
13549
|
sort: normalizeQuerySort(sort)
|
|
13433
13550
|
}, options));
|
|
13434
13551
|
|
|
13435
13552
|
case 5:
|
|
13436
|
-
return
|
|
13553
|
+
return _context112.abrupt("return", _context112.sent);
|
|
13437
13554
|
|
|
13438
13555
|
case 6:
|
|
13439
13556
|
case "end":
|
|
13440
|
-
return
|
|
13557
|
+
return _context112.stop();
|
|
13441
13558
|
}
|
|
13442
13559
|
}
|
|
13443
|
-
},
|
|
13560
|
+
}, _callee112, this);
|
|
13444
13561
|
}));
|
|
13445
13562
|
|
|
13446
|
-
function queryPollVotes(
|
|
13563
|
+
function queryPollVotes(_x162) {
|
|
13447
13564
|
return _queryPollVotes.apply(this, arguments);
|
|
13448
13565
|
}
|
|
13449
13566
|
|
|
@@ -13460,33 +13577,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13460
13577
|
}, {
|
|
13461
13578
|
key: "queryMessageHistory",
|
|
13462
13579
|
value: function () {
|
|
13463
|
-
var _queryMessageHistory = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
13580
|
+
var _queryMessageHistory = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee113() {
|
|
13464
13581
|
var filter,
|
|
13465
13582
|
sort,
|
|
13466
13583
|
options,
|
|
13467
|
-
|
|
13468
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
13584
|
+
_args113 = arguments;
|
|
13585
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee113$(_context113) {
|
|
13469
13586
|
while (1) {
|
|
13470
|
-
switch (
|
|
13587
|
+
switch (_context113.prev = _context113.next) {
|
|
13471
13588
|
case 0:
|
|
13472
|
-
filter =
|
|
13473
|
-
sort =
|
|
13474
|
-
options =
|
|
13475
|
-
|
|
13589
|
+
filter = _args113.length > 0 && _args113[0] !== undefined ? _args113[0] : {};
|
|
13590
|
+
sort = _args113.length > 1 && _args113[1] !== undefined ? _args113[1] : [];
|
|
13591
|
+
options = _args113.length > 2 && _args113[2] !== undefined ? _args113[2] : {};
|
|
13592
|
+
_context113.next = 5;
|
|
13476
13593
|
return this.post(this.baseURL + '/messages/history', _objectSpread({
|
|
13477
13594
|
filter: filter,
|
|
13478
13595
|
sort: normalizeQuerySort(sort)
|
|
13479
13596
|
}, options));
|
|
13480
13597
|
|
|
13481
13598
|
case 5:
|
|
13482
|
-
return
|
|
13599
|
+
return _context113.abrupt("return", _context113.sent);
|
|
13483
13600
|
|
|
13484
13601
|
case 6:
|
|
13485
13602
|
case "end":
|
|
13486
|
-
return
|
|
13603
|
+
return _context113.stop();
|
|
13487
13604
|
}
|
|
13488
13605
|
}
|
|
13489
|
-
},
|
|
13606
|
+
}, _callee113, this);
|
|
13490
13607
|
}));
|
|
13491
13608
|
|
|
13492
13609
|
function queryMessageHistory() {
|