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