stream-chat 8.51.0 → 8.52.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 +526 -484
- 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 +526 -484
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +526 -484
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +526 -484
- package/dist/index.js.map +1 -1
- package/dist/types/client.d.ts +11 -1
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/types.d.ts +4 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +18 -0
- package/src/types.ts +5 -0
package/dist/index.js
CHANGED
|
@@ -14397,6 +14397,48 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14397
14397
|
|
|
14398
14398
|
return translateMessage;
|
|
14399
14399
|
}()
|
|
14400
|
+
/**
|
|
14401
|
+
* translate - translates the given text to provided language
|
|
14402
|
+
*
|
|
14403
|
+
* @param {string} text
|
|
14404
|
+
* @param {string} destination_language
|
|
14405
|
+
* @param {string} source_language
|
|
14406
|
+
*
|
|
14407
|
+
* @return {TranslateResponse} Response that includes the message
|
|
14408
|
+
*/
|
|
14409
|
+
|
|
14410
|
+
}, {
|
|
14411
|
+
key: "translate",
|
|
14412
|
+
value: function () {
|
|
14413
|
+
var _translate = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee59(text, destination_language, source_language) {
|
|
14414
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee59$(_context59) {
|
|
14415
|
+
while (1) {
|
|
14416
|
+
switch (_context59.prev = _context59.next) {
|
|
14417
|
+
case 0:
|
|
14418
|
+
_context59.next = 2;
|
|
14419
|
+
return this.post(this.baseURL + "/translate", {
|
|
14420
|
+
text: text,
|
|
14421
|
+
source_language: source_language,
|
|
14422
|
+
destination_language: destination_language
|
|
14423
|
+
});
|
|
14424
|
+
|
|
14425
|
+
case 2:
|
|
14426
|
+
return _context59.abrupt("return", _context59.sent);
|
|
14427
|
+
|
|
14428
|
+
case 3:
|
|
14429
|
+
case "end":
|
|
14430
|
+
return _context59.stop();
|
|
14431
|
+
}
|
|
14432
|
+
}
|
|
14433
|
+
}, _callee59, this);
|
|
14434
|
+
}));
|
|
14435
|
+
|
|
14436
|
+
function translate(_x75, _x76, _x77) {
|
|
14437
|
+
return _translate.apply(this, arguments);
|
|
14438
|
+
}
|
|
14439
|
+
|
|
14440
|
+
return translate;
|
|
14441
|
+
}()
|
|
14400
14442
|
/**
|
|
14401
14443
|
* _normalizeExpiration - transforms expiration value into ISO string
|
|
14402
14444
|
* @param {undefined|null|number|string|Date} timeoutOrExpirationDate expiration date or timeout. Use number type to set timeout in seconds, string or Date to set exact expiration date
|
|
@@ -14493,14 +14535,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14493
14535
|
}, {
|
|
14494
14536
|
key: "updateMessage",
|
|
14495
14537
|
value: function () {
|
|
14496
|
-
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14538
|
+
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee60(message, userId, options) {
|
|
14497
14539
|
var clonedMessage, reservedMessageFields;
|
|
14498
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14540
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee60$(_context60) {
|
|
14499
14541
|
while (1) {
|
|
14500
|
-
switch (
|
|
14542
|
+
switch (_context60.prev = _context60.next) {
|
|
14501
14543
|
case 0:
|
|
14502
14544
|
if (message.id) {
|
|
14503
|
-
|
|
14545
|
+
_context60.next = 2;
|
|
14504
14546
|
break;
|
|
14505
14547
|
}
|
|
14506
14548
|
|
|
@@ -14537,23 +14579,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14537
14579
|
});
|
|
14538
14580
|
}
|
|
14539
14581
|
|
|
14540
|
-
|
|
14582
|
+
_context60.next = 10;
|
|
14541
14583
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(message.id)), _objectSpread({
|
|
14542
14584
|
message: clonedMessage
|
|
14543
14585
|
}, options));
|
|
14544
14586
|
|
|
14545
14587
|
case 10:
|
|
14546
|
-
return
|
|
14588
|
+
return _context60.abrupt("return", _context60.sent);
|
|
14547
14589
|
|
|
14548
14590
|
case 11:
|
|
14549
14591
|
case "end":
|
|
14550
|
-
return
|
|
14592
|
+
return _context60.stop();
|
|
14551
14593
|
}
|
|
14552
14594
|
}
|
|
14553
|
-
},
|
|
14595
|
+
}, _callee60, this);
|
|
14554
14596
|
}));
|
|
14555
14597
|
|
|
14556
|
-
function updateMessage(
|
|
14598
|
+
function updateMessage(_x78, _x79, _x80) {
|
|
14557
14599
|
return _updateMessage.apply(this, arguments);
|
|
14558
14600
|
}
|
|
14559
14601
|
|
|
@@ -14576,14 +14618,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14576
14618
|
}, {
|
|
14577
14619
|
key: "partialUpdateMessage",
|
|
14578
14620
|
value: function () {
|
|
14579
|
-
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14621
|
+
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee61(id, partialMessageObject, userId, options) {
|
|
14580
14622
|
var user;
|
|
14581
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14623
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee61$(_context61) {
|
|
14582
14624
|
while (1) {
|
|
14583
|
-
switch (
|
|
14625
|
+
switch (_context61.prev = _context61.next) {
|
|
14584
14626
|
case 0:
|
|
14585
14627
|
if (id) {
|
|
14586
|
-
|
|
14628
|
+
_context61.next = 2;
|
|
14587
14629
|
break;
|
|
14588
14630
|
}
|
|
14589
14631
|
|
|
@@ -14598,23 +14640,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14598
14640
|
};
|
|
14599
14641
|
}
|
|
14600
14642
|
|
|
14601
|
-
|
|
14643
|
+
_context61.next = 6;
|
|
14602
14644
|
return this.put(this.baseURL + "/messages/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
14603
14645
|
user: user
|
|
14604
14646
|
}));
|
|
14605
14647
|
|
|
14606
14648
|
case 6:
|
|
14607
|
-
return
|
|
14649
|
+
return _context61.abrupt("return", _context61.sent);
|
|
14608
14650
|
|
|
14609
14651
|
case 7:
|
|
14610
14652
|
case "end":
|
|
14611
|
-
return
|
|
14653
|
+
return _context61.stop();
|
|
14612
14654
|
}
|
|
14613
14655
|
}
|
|
14614
|
-
},
|
|
14656
|
+
}, _callee61, this);
|
|
14615
14657
|
}));
|
|
14616
14658
|
|
|
14617
|
-
function partialUpdateMessage(
|
|
14659
|
+
function partialUpdateMessage(_x81, _x82, _x83, _x84) {
|
|
14618
14660
|
return _partialUpdateMessage.apply(this, arguments);
|
|
14619
14661
|
}
|
|
14620
14662
|
|
|
@@ -14623,11 +14665,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14623
14665
|
}, {
|
|
14624
14666
|
key: "deleteMessage",
|
|
14625
14667
|
value: function () {
|
|
14626
|
-
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14668
|
+
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee62(messageID, hardDelete) {
|
|
14627
14669
|
var params;
|
|
14628
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14670
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee62$(_context62) {
|
|
14629
14671
|
while (1) {
|
|
14630
|
-
switch (
|
|
14672
|
+
switch (_context62.prev = _context62.next) {
|
|
14631
14673
|
case 0:
|
|
14632
14674
|
params = {};
|
|
14633
14675
|
|
|
@@ -14637,21 +14679,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14637
14679
|
};
|
|
14638
14680
|
}
|
|
14639
14681
|
|
|
14640
|
-
|
|
14682
|
+
_context62.next = 4;
|
|
14641
14683
|
return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), params);
|
|
14642
14684
|
|
|
14643
14685
|
case 4:
|
|
14644
|
-
return
|
|
14686
|
+
return _context62.abrupt("return", _context62.sent);
|
|
14645
14687
|
|
|
14646
14688
|
case 5:
|
|
14647
14689
|
case "end":
|
|
14648
|
-
return
|
|
14690
|
+
return _context62.stop();
|
|
14649
14691
|
}
|
|
14650
14692
|
}
|
|
14651
|
-
},
|
|
14693
|
+
}, _callee62, this);
|
|
14652
14694
|
}));
|
|
14653
14695
|
|
|
14654
|
-
function deleteMessage(
|
|
14696
|
+
function deleteMessage(_x85, _x86) {
|
|
14655
14697
|
return _deleteMessage.apply(this, arguments);
|
|
14656
14698
|
}
|
|
14657
14699
|
|
|
@@ -14673,28 +14715,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14673
14715
|
}, {
|
|
14674
14716
|
key: "undeleteMessage",
|
|
14675
14717
|
value: function () {
|
|
14676
|
-
var _undeleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14677
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14718
|
+
var _undeleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee63(messageID, userID) {
|
|
14719
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee63$(_context63) {
|
|
14678
14720
|
while (1) {
|
|
14679
|
-
switch (
|
|
14721
|
+
switch (_context63.prev = _context63.next) {
|
|
14680
14722
|
case 0:
|
|
14681
|
-
|
|
14723
|
+
_context63.next = 2;
|
|
14682
14724
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageID), "/undelete"), {
|
|
14683
14725
|
undeleted_by: userID
|
|
14684
14726
|
});
|
|
14685
14727
|
|
|
14686
14728
|
case 2:
|
|
14687
|
-
return
|
|
14729
|
+
return _context63.abrupt("return", _context63.sent);
|
|
14688
14730
|
|
|
14689
14731
|
case 3:
|
|
14690
14732
|
case "end":
|
|
14691
|
-
return
|
|
14733
|
+
return _context63.stop();
|
|
14692
14734
|
}
|
|
14693
14735
|
}
|
|
14694
|
-
},
|
|
14736
|
+
}, _callee63, this);
|
|
14695
14737
|
}));
|
|
14696
14738
|
|
|
14697
|
-
function undeleteMessage(
|
|
14739
|
+
function undeleteMessage(_x87, _x88) {
|
|
14698
14740
|
return _undeleteMessage.apply(this, arguments);
|
|
14699
14741
|
}
|
|
14700
14742
|
|
|
@@ -14703,26 +14745,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14703
14745
|
}, {
|
|
14704
14746
|
key: "getMessage",
|
|
14705
14747
|
value: function () {
|
|
14706
|
-
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14707
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14748
|
+
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee64(messageID, options) {
|
|
14749
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee64$(_context64) {
|
|
14708
14750
|
while (1) {
|
|
14709
|
-
switch (
|
|
14751
|
+
switch (_context64.prev = _context64.next) {
|
|
14710
14752
|
case 0:
|
|
14711
|
-
|
|
14753
|
+
_context64.next = 2;
|
|
14712
14754
|
return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), _objectSpread({}, options));
|
|
14713
14755
|
|
|
14714
14756
|
case 2:
|
|
14715
|
-
return
|
|
14757
|
+
return _context64.abrupt("return", _context64.sent);
|
|
14716
14758
|
|
|
14717
14759
|
case 3:
|
|
14718
14760
|
case "end":
|
|
14719
|
-
return
|
|
14761
|
+
return _context64.stop();
|
|
14720
14762
|
}
|
|
14721
14763
|
}
|
|
14722
|
-
},
|
|
14764
|
+
}, _callee64, this);
|
|
14723
14765
|
}));
|
|
14724
14766
|
|
|
14725
|
-
function getMessage(
|
|
14767
|
+
function getMessage(_x89, _x90) {
|
|
14726
14768
|
return _getMessage.apply(this, arguments);
|
|
14727
14769
|
}
|
|
14728
14770
|
|
|
@@ -14743,30 +14785,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14743
14785
|
}, {
|
|
14744
14786
|
key: "queryThreads",
|
|
14745
14787
|
value: function () {
|
|
14746
|
-
var _queryThreads = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14788
|
+
var _queryThreads = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee65() {
|
|
14747
14789
|
var _this5 = this;
|
|
14748
14790
|
|
|
14749
14791
|
var options,
|
|
14750
14792
|
optionsWithDefaults,
|
|
14751
14793
|
response,
|
|
14752
|
-
|
|
14753
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14794
|
+
_args65 = arguments;
|
|
14795
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee65$(_context65) {
|
|
14754
14796
|
while (1) {
|
|
14755
|
-
switch (
|
|
14797
|
+
switch (_context65.prev = _context65.next) {
|
|
14756
14798
|
case 0:
|
|
14757
|
-
options =
|
|
14799
|
+
options = _args65.length > 0 && _args65[0] !== undefined ? _args65[0] : {};
|
|
14758
14800
|
optionsWithDefaults = _objectSpread({
|
|
14759
14801
|
limit: 10,
|
|
14760
14802
|
participant_limit: 10,
|
|
14761
14803
|
reply_limit: 3,
|
|
14762
14804
|
watch: true
|
|
14763
14805
|
}, options);
|
|
14764
|
-
|
|
14806
|
+
_context65.next = 4;
|
|
14765
14807
|
return this.post("".concat(this.baseURL, "/threads"), optionsWithDefaults);
|
|
14766
14808
|
|
|
14767
14809
|
case 4:
|
|
14768
|
-
response =
|
|
14769
|
-
return
|
|
14810
|
+
response = _context65.sent;
|
|
14811
|
+
return _context65.abrupt("return", {
|
|
14770
14812
|
threads: response.threads.map(function (thread) {
|
|
14771
14813
|
return new Thread({
|
|
14772
14814
|
client: _this5,
|
|
@@ -14778,10 +14820,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14778
14820
|
|
|
14779
14821
|
case 6:
|
|
14780
14822
|
case "end":
|
|
14781
|
-
return
|
|
14823
|
+
return _context65.stop();
|
|
14782
14824
|
}
|
|
14783
14825
|
}
|
|
14784
|
-
},
|
|
14826
|
+
}, _callee65, this);
|
|
14785
14827
|
}));
|
|
14786
14828
|
|
|
14787
14829
|
function queryThreads() {
|
|
@@ -14805,19 +14847,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14805
14847
|
}, {
|
|
14806
14848
|
key: "getThread",
|
|
14807
14849
|
value: function () {
|
|
14808
|
-
var _getThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14850
|
+
var _getThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee66(messageId) {
|
|
14809
14851
|
var options,
|
|
14810
14852
|
optionsWithDefaults,
|
|
14811
14853
|
response,
|
|
14812
|
-
|
|
14813
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14854
|
+
_args66 = arguments;
|
|
14855
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee66$(_context66) {
|
|
14814
14856
|
while (1) {
|
|
14815
|
-
switch (
|
|
14857
|
+
switch (_context66.prev = _context66.next) {
|
|
14816
14858
|
case 0:
|
|
14817
|
-
options =
|
|
14859
|
+
options = _args66.length > 1 && _args66[1] !== undefined ? _args66[1] : {};
|
|
14818
14860
|
|
|
14819
14861
|
if (messageId) {
|
|
14820
|
-
|
|
14862
|
+
_context66.next = 3;
|
|
14821
14863
|
break;
|
|
14822
14864
|
}
|
|
14823
14865
|
|
|
@@ -14829,25 +14871,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14829
14871
|
reply_limit: 3,
|
|
14830
14872
|
watch: true
|
|
14831
14873
|
}, options);
|
|
14832
|
-
|
|
14874
|
+
_context66.next = 6;
|
|
14833
14875
|
return this.get("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), optionsWithDefaults);
|
|
14834
14876
|
|
|
14835
14877
|
case 6:
|
|
14836
|
-
response =
|
|
14837
|
-
return
|
|
14878
|
+
response = _context66.sent;
|
|
14879
|
+
return _context66.abrupt("return", new Thread({
|
|
14838
14880
|
client: this,
|
|
14839
14881
|
threadData: response.thread
|
|
14840
14882
|
}));
|
|
14841
14883
|
|
|
14842
14884
|
case 8:
|
|
14843
14885
|
case "end":
|
|
14844
|
-
return
|
|
14886
|
+
return _context66.stop();
|
|
14845
14887
|
}
|
|
14846
14888
|
}
|
|
14847
|
-
},
|
|
14889
|
+
}, _callee66, this);
|
|
14848
14890
|
}));
|
|
14849
14891
|
|
|
14850
|
-
function getThread(
|
|
14892
|
+
function getThread(_x91) {
|
|
14851
14893
|
return _getThread.apply(this, arguments);
|
|
14852
14894
|
}
|
|
14853
14895
|
|
|
@@ -14865,15 +14907,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14865
14907
|
}, {
|
|
14866
14908
|
key: "partialUpdateThread",
|
|
14867
14909
|
value: function () {
|
|
14868
|
-
var _partialUpdateThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14910
|
+
var _partialUpdateThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee67(messageId, partialThreadObject) {
|
|
14869
14911
|
var reservedThreadFields, _key5;
|
|
14870
14912
|
|
|
14871
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14913
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee67$(_context67) {
|
|
14872
14914
|
while (1) {
|
|
14873
|
-
switch (
|
|
14915
|
+
switch (_context67.prev = _context67.next) {
|
|
14874
14916
|
case 0:
|
|
14875
14917
|
if (messageId) {
|
|
14876
|
-
|
|
14918
|
+
_context67.next = 2;
|
|
14877
14919
|
break;
|
|
14878
14920
|
}
|
|
14879
14921
|
|
|
@@ -14883,43 +14925,43 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14883
14925
|
// check for reserved fields from ThreadResponse type within partialThreadObject's set and unset.
|
|
14884
14926
|
// Throw error if any of the reserved field is found.
|
|
14885
14927
|
reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel', 'custom'];
|
|
14886
|
-
|
|
14928
|
+
_context67.t0 = _regeneratorRuntime__default['default'].keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
|
|
14887
14929
|
|
|
14888
14930
|
case 4:
|
|
14889
|
-
if ((
|
|
14890
|
-
|
|
14931
|
+
if ((_context67.t1 = _context67.t0()).done) {
|
|
14932
|
+
_context67.next = 10;
|
|
14891
14933
|
break;
|
|
14892
14934
|
}
|
|
14893
14935
|
|
|
14894
|
-
_key5 =
|
|
14936
|
+
_key5 = _context67.t1.value;
|
|
14895
14937
|
|
|
14896
14938
|
if (!reservedThreadFields.includes(_key5)) {
|
|
14897
|
-
|
|
14939
|
+
_context67.next = 8;
|
|
14898
14940
|
break;
|
|
14899
14941
|
}
|
|
14900
14942
|
|
|
14901
14943
|
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."));
|
|
14902
14944
|
|
|
14903
14945
|
case 8:
|
|
14904
|
-
|
|
14946
|
+
_context67.next = 4;
|
|
14905
14947
|
break;
|
|
14906
14948
|
|
|
14907
14949
|
case 10:
|
|
14908
|
-
|
|
14950
|
+
_context67.next = 12;
|
|
14909
14951
|
return this.patch("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), partialThreadObject);
|
|
14910
14952
|
|
|
14911
14953
|
case 12:
|
|
14912
|
-
return
|
|
14954
|
+
return _context67.abrupt("return", _context67.sent);
|
|
14913
14955
|
|
|
14914
14956
|
case 13:
|
|
14915
14957
|
case "end":
|
|
14916
|
-
return
|
|
14958
|
+
return _context67.stop();
|
|
14917
14959
|
}
|
|
14918
14960
|
}
|
|
14919
|
-
},
|
|
14961
|
+
}, _callee67, this);
|
|
14920
14962
|
}));
|
|
14921
14963
|
|
|
14922
|
-
function partialUpdateThread(
|
|
14964
|
+
function partialUpdateThread(_x92, _x93) {
|
|
14923
14965
|
return _partialUpdateThread.apply(this, arguments);
|
|
14924
14966
|
}
|
|
14925
14967
|
|
|
@@ -14928,7 +14970,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14928
14970
|
}, {
|
|
14929
14971
|
key: "getUserAgent",
|
|
14930
14972
|
value: function getUserAgent() {
|
|
14931
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
14973
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.52.0");
|
|
14932
14974
|
}
|
|
14933
14975
|
}, {
|
|
14934
14976
|
key: "setUserAgent",
|
|
@@ -15147,28 +15189,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15147
15189
|
}, {
|
|
15148
15190
|
key: "sendUserCustomEvent",
|
|
15149
15191
|
value: function () {
|
|
15150
|
-
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15151
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15192
|
+
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee68(targetUserID, event) {
|
|
15193
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee68$(_context68) {
|
|
15152
15194
|
while (1) {
|
|
15153
|
-
switch (
|
|
15195
|
+
switch (_context68.prev = _context68.next) {
|
|
15154
15196
|
case 0:
|
|
15155
|
-
|
|
15197
|
+
_context68.next = 2;
|
|
15156
15198
|
return this.post("".concat(this.baseURL, "/users/").concat(encodeURIComponent(targetUserID), "/event"), {
|
|
15157
15199
|
event: event
|
|
15158
15200
|
});
|
|
15159
15201
|
|
|
15160
15202
|
case 2:
|
|
15161
|
-
return
|
|
15203
|
+
return _context68.abrupt("return", _context68.sent);
|
|
15162
15204
|
|
|
15163
15205
|
case 3:
|
|
15164
15206
|
case "end":
|
|
15165
|
-
return
|
|
15207
|
+
return _context68.stop();
|
|
15166
15208
|
}
|
|
15167
15209
|
}
|
|
15168
|
-
},
|
|
15210
|
+
}, _callee68, this);
|
|
15169
15211
|
}));
|
|
15170
15212
|
|
|
15171
|
-
function sendUserCustomEvent(
|
|
15213
|
+
function sendUserCustomEvent(_x94, _x95) {
|
|
15172
15214
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
15173
15215
|
}
|
|
15174
15216
|
|
|
@@ -15265,28 +15307,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15265
15307
|
}, {
|
|
15266
15308
|
key: "createSegment",
|
|
15267
15309
|
value: function () {
|
|
15268
|
-
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15310
|
+
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee69(type, id, data) {
|
|
15269
15311
|
var body;
|
|
15270
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15312
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee69$(_context69) {
|
|
15271
15313
|
while (1) {
|
|
15272
|
-
switch (
|
|
15314
|
+
switch (_context69.prev = _context69.next) {
|
|
15273
15315
|
case 0:
|
|
15274
15316
|
this.validateServerSideAuth();
|
|
15275
15317
|
body = _objectSpread({
|
|
15276
15318
|
id: id,
|
|
15277
15319
|
type: type
|
|
15278
15320
|
}, data);
|
|
15279
|
-
return
|
|
15321
|
+
return _context69.abrupt("return", this.post(this.baseURL + "/segments", body));
|
|
15280
15322
|
|
|
15281
15323
|
case 3:
|
|
15282
15324
|
case "end":
|
|
15283
|
-
return
|
|
15325
|
+
return _context69.stop();
|
|
15284
15326
|
}
|
|
15285
15327
|
}
|
|
15286
|
-
},
|
|
15328
|
+
}, _callee69, this);
|
|
15287
15329
|
}));
|
|
15288
15330
|
|
|
15289
|
-
function createSegment(
|
|
15331
|
+
function createSegment(_x96, _x97, _x98) {
|
|
15290
15332
|
return _createSegment.apply(this, arguments);
|
|
15291
15333
|
}
|
|
15292
15334
|
|
|
@@ -15305,23 +15347,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15305
15347
|
}, {
|
|
15306
15348
|
key: "createUserSegment",
|
|
15307
15349
|
value: function () {
|
|
15308
|
-
var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15309
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15350
|
+
var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee70(id, data) {
|
|
15351
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee70$(_context70) {
|
|
15310
15352
|
while (1) {
|
|
15311
|
-
switch (
|
|
15353
|
+
switch (_context70.prev = _context70.next) {
|
|
15312
15354
|
case 0:
|
|
15313
15355
|
this.validateServerSideAuth();
|
|
15314
|
-
return
|
|
15356
|
+
return _context70.abrupt("return", this.createSegment('user', id, data));
|
|
15315
15357
|
|
|
15316
15358
|
case 2:
|
|
15317
15359
|
case "end":
|
|
15318
|
-
return
|
|
15360
|
+
return _context70.stop();
|
|
15319
15361
|
}
|
|
15320
15362
|
}
|
|
15321
|
-
},
|
|
15363
|
+
}, _callee70, this);
|
|
15322
15364
|
}));
|
|
15323
15365
|
|
|
15324
|
-
function createUserSegment(
|
|
15366
|
+
function createUserSegment(_x99, _x100) {
|
|
15325
15367
|
return _createUserSegment.apply(this, arguments);
|
|
15326
15368
|
}
|
|
15327
15369
|
|
|
@@ -15340,23 +15382,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15340
15382
|
}, {
|
|
15341
15383
|
key: "createChannelSegment",
|
|
15342
15384
|
value: function () {
|
|
15343
|
-
var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15344
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15385
|
+
var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee71(id, data) {
|
|
15386
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee71$(_context71) {
|
|
15345
15387
|
while (1) {
|
|
15346
|
-
switch (
|
|
15388
|
+
switch (_context71.prev = _context71.next) {
|
|
15347
15389
|
case 0:
|
|
15348
15390
|
this.validateServerSideAuth();
|
|
15349
|
-
return
|
|
15391
|
+
return _context71.abrupt("return", this.createSegment('channel', id, data));
|
|
15350
15392
|
|
|
15351
15393
|
case 2:
|
|
15352
15394
|
case "end":
|
|
15353
|
-
return
|
|
15395
|
+
return _context71.stop();
|
|
15354
15396
|
}
|
|
15355
15397
|
}
|
|
15356
|
-
},
|
|
15398
|
+
}, _callee71, this);
|
|
15357
15399
|
}));
|
|
15358
15400
|
|
|
15359
|
-
function createChannelSegment(
|
|
15401
|
+
function createChannelSegment(_x101, _x102) {
|
|
15360
15402
|
return _createChannelSegment.apply(this, arguments);
|
|
15361
15403
|
}
|
|
15362
15404
|
|
|
@@ -15365,23 +15407,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15365
15407
|
}, {
|
|
15366
15408
|
key: "getSegment",
|
|
15367
15409
|
value: function () {
|
|
15368
|
-
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15369
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15410
|
+
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee72(id) {
|
|
15411
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee72$(_context72) {
|
|
15370
15412
|
while (1) {
|
|
15371
|
-
switch (
|
|
15413
|
+
switch (_context72.prev = _context72.next) {
|
|
15372
15414
|
case 0:
|
|
15373
15415
|
this.validateServerSideAuth();
|
|
15374
|
-
return
|
|
15416
|
+
return _context72.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
|
|
15375
15417
|
|
|
15376
15418
|
case 2:
|
|
15377
15419
|
case "end":
|
|
15378
|
-
return
|
|
15420
|
+
return _context72.stop();
|
|
15379
15421
|
}
|
|
15380
15422
|
}
|
|
15381
|
-
},
|
|
15423
|
+
}, _callee72, this);
|
|
15382
15424
|
}));
|
|
15383
15425
|
|
|
15384
|
-
function getSegment(
|
|
15426
|
+
function getSegment(_x103) {
|
|
15385
15427
|
return _getSegment.apply(this, arguments);
|
|
15386
15428
|
}
|
|
15387
15429
|
|
|
@@ -15399,23 +15441,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15399
15441
|
}, {
|
|
15400
15442
|
key: "updateSegment",
|
|
15401
15443
|
value: function () {
|
|
15402
|
-
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15403
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15444
|
+
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee73(id, data) {
|
|
15445
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee73$(_context73) {
|
|
15404
15446
|
while (1) {
|
|
15405
|
-
switch (
|
|
15447
|
+
switch (_context73.prev = _context73.next) {
|
|
15406
15448
|
case 0:
|
|
15407
15449
|
this.validateServerSideAuth();
|
|
15408
|
-
return
|
|
15450
|
+
return _context73.abrupt("return", this.put(this.baseURL + "/segments/".concat(encodeURIComponent(id)), data));
|
|
15409
15451
|
|
|
15410
15452
|
case 2:
|
|
15411
15453
|
case "end":
|
|
15412
|
-
return
|
|
15454
|
+
return _context73.stop();
|
|
15413
15455
|
}
|
|
15414
15456
|
}
|
|
15415
|
-
},
|
|
15457
|
+
}, _callee73, this);
|
|
15416
15458
|
}));
|
|
15417
15459
|
|
|
15418
|
-
function updateSegment(
|
|
15460
|
+
function updateSegment(_x104, _x105) {
|
|
15419
15461
|
return _updateSegment.apply(this, arguments);
|
|
15420
15462
|
}
|
|
15421
15463
|
|
|
@@ -15433,27 +15475,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15433
15475
|
}, {
|
|
15434
15476
|
key: "addSegmentTargets",
|
|
15435
15477
|
value: function () {
|
|
15436
|
-
var _addSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15478
|
+
var _addSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee74(id, targets) {
|
|
15437
15479
|
var body;
|
|
15438
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15480
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee74$(_context74) {
|
|
15439
15481
|
while (1) {
|
|
15440
|
-
switch (
|
|
15482
|
+
switch (_context74.prev = _context74.next) {
|
|
15441
15483
|
case 0:
|
|
15442
15484
|
this.validateServerSideAuth();
|
|
15443
15485
|
body = {
|
|
15444
15486
|
target_ids: targets
|
|
15445
15487
|
};
|
|
15446
|
-
return
|
|
15488
|
+
return _context74.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/addtargets"), body));
|
|
15447
15489
|
|
|
15448
15490
|
case 3:
|
|
15449
15491
|
case "end":
|
|
15450
|
-
return
|
|
15492
|
+
return _context74.stop();
|
|
15451
15493
|
}
|
|
15452
15494
|
}
|
|
15453
|
-
},
|
|
15495
|
+
}, _callee74, this);
|
|
15454
15496
|
}));
|
|
15455
15497
|
|
|
15456
|
-
function addSegmentTargets(
|
|
15498
|
+
function addSegmentTargets(_x106, _x107) {
|
|
15457
15499
|
return _addSegmentTargets.apply(this, arguments);
|
|
15458
15500
|
}
|
|
15459
15501
|
|
|
@@ -15462,33 +15504,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15462
15504
|
}, {
|
|
15463
15505
|
key: "querySegmentTargets",
|
|
15464
15506
|
value: function () {
|
|
15465
|
-
var _querySegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15507
|
+
var _querySegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee75(id) {
|
|
15466
15508
|
var filter,
|
|
15467
15509
|
sort,
|
|
15468
15510
|
options,
|
|
15469
|
-
|
|
15470
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15511
|
+
_args75 = arguments;
|
|
15512
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee75$(_context75) {
|
|
15471
15513
|
while (1) {
|
|
15472
|
-
switch (
|
|
15514
|
+
switch (_context75.prev = _context75.next) {
|
|
15473
15515
|
case 0:
|
|
15474
|
-
filter =
|
|
15475
|
-
sort =
|
|
15476
|
-
options =
|
|
15516
|
+
filter = _args75.length > 1 && _args75[1] !== undefined ? _args75[1] : {};
|
|
15517
|
+
sort = _args75.length > 2 && _args75[2] !== undefined ? _args75[2] : [];
|
|
15518
|
+
options = _args75.length > 3 && _args75[3] !== undefined ? _args75[3] : {};
|
|
15477
15519
|
this.validateServerSideAuth();
|
|
15478
|
-
return
|
|
15520
|
+
return _context75.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/targets/query"), _objectSpread({
|
|
15479
15521
|
filter: filter || {},
|
|
15480
15522
|
sort: sort || []
|
|
15481
15523
|
}, options)));
|
|
15482
15524
|
|
|
15483
15525
|
case 5:
|
|
15484
15526
|
case "end":
|
|
15485
|
-
return
|
|
15527
|
+
return _context75.stop();
|
|
15486
15528
|
}
|
|
15487
15529
|
}
|
|
15488
|
-
},
|
|
15530
|
+
}, _callee75, this);
|
|
15489
15531
|
}));
|
|
15490
15532
|
|
|
15491
|
-
function querySegmentTargets(
|
|
15533
|
+
function querySegmentTargets(_x108) {
|
|
15492
15534
|
return _querySegmentTargets.apply(this, arguments);
|
|
15493
15535
|
}
|
|
15494
15536
|
|
|
@@ -15506,27 +15548,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15506
15548
|
}, {
|
|
15507
15549
|
key: "removeSegmentTargets",
|
|
15508
15550
|
value: function () {
|
|
15509
|
-
var _removeSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15551
|
+
var _removeSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee76(id, targets) {
|
|
15510
15552
|
var body;
|
|
15511
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15553
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee76$(_context76) {
|
|
15512
15554
|
while (1) {
|
|
15513
|
-
switch (
|
|
15555
|
+
switch (_context76.prev = _context76.next) {
|
|
15514
15556
|
case 0:
|
|
15515
15557
|
this.validateServerSideAuth();
|
|
15516
15558
|
body = {
|
|
15517
15559
|
target_ids: targets
|
|
15518
15560
|
};
|
|
15519
|
-
return
|
|
15561
|
+
return _context76.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/deletetargets"), body));
|
|
15520
15562
|
|
|
15521
15563
|
case 3:
|
|
15522
15564
|
case "end":
|
|
15523
|
-
return
|
|
15565
|
+
return _context76.stop();
|
|
15524
15566
|
}
|
|
15525
15567
|
}
|
|
15526
|
-
},
|
|
15568
|
+
}, _callee76, this);
|
|
15527
15569
|
}));
|
|
15528
15570
|
|
|
15529
|
-
function removeSegmentTargets(
|
|
15571
|
+
function removeSegmentTargets(_x109, _x110) {
|
|
15530
15572
|
return _removeSegmentTargets.apply(this, arguments);
|
|
15531
15573
|
}
|
|
15532
15574
|
|
|
@@ -15544,29 +15586,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15544
15586
|
}, {
|
|
15545
15587
|
key: "querySegments",
|
|
15546
15588
|
value: function () {
|
|
15547
|
-
var _querySegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15589
|
+
var _querySegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee77(filter, sort) {
|
|
15548
15590
|
var options,
|
|
15549
|
-
|
|
15550
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15591
|
+
_args77 = arguments;
|
|
15592
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee77$(_context77) {
|
|
15551
15593
|
while (1) {
|
|
15552
|
-
switch (
|
|
15594
|
+
switch (_context77.prev = _context77.next) {
|
|
15553
15595
|
case 0:
|
|
15554
|
-
options =
|
|
15596
|
+
options = _args77.length > 2 && _args77[2] !== undefined ? _args77[2] : {};
|
|
15555
15597
|
this.validateServerSideAuth();
|
|
15556
|
-
return
|
|
15598
|
+
return _context77.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
|
|
15557
15599
|
filter: filter,
|
|
15558
15600
|
sort: sort
|
|
15559
15601
|
}, options)));
|
|
15560
15602
|
|
|
15561
15603
|
case 3:
|
|
15562
15604
|
case "end":
|
|
15563
|
-
return
|
|
15605
|
+
return _context77.stop();
|
|
15564
15606
|
}
|
|
15565
15607
|
}
|
|
15566
|
-
},
|
|
15608
|
+
}, _callee77, this);
|
|
15567
15609
|
}));
|
|
15568
15610
|
|
|
15569
|
-
function querySegments(
|
|
15611
|
+
function querySegments(_x111, _x112) {
|
|
15570
15612
|
return _querySegments.apply(this, arguments);
|
|
15571
15613
|
}
|
|
15572
15614
|
|
|
@@ -15583,23 +15625,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15583
15625
|
}, {
|
|
15584
15626
|
key: "deleteSegment",
|
|
15585
15627
|
value: function () {
|
|
15586
|
-
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15587
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15628
|
+
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee78(id) {
|
|
15629
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee78$(_context78) {
|
|
15588
15630
|
while (1) {
|
|
15589
|
-
switch (
|
|
15631
|
+
switch (_context78.prev = _context78.next) {
|
|
15590
15632
|
case 0:
|
|
15591
15633
|
this.validateServerSideAuth();
|
|
15592
|
-
return
|
|
15634
|
+
return _context78.abrupt("return", this.delete(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
|
|
15593
15635
|
|
|
15594
15636
|
case 2:
|
|
15595
15637
|
case "end":
|
|
15596
|
-
return
|
|
15638
|
+
return _context78.stop();
|
|
15597
15639
|
}
|
|
15598
15640
|
}
|
|
15599
|
-
},
|
|
15641
|
+
}, _callee78, this);
|
|
15600
15642
|
}));
|
|
15601
15643
|
|
|
15602
|
-
function deleteSegment(
|
|
15644
|
+
function deleteSegment(_x113) {
|
|
15603
15645
|
return _deleteSegment.apply(this, arguments);
|
|
15604
15646
|
}
|
|
15605
15647
|
|
|
@@ -15617,23 +15659,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15617
15659
|
}, {
|
|
15618
15660
|
key: "segmentTargetExists",
|
|
15619
15661
|
value: function () {
|
|
15620
|
-
var _segmentTargetExists = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15621
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15662
|
+
var _segmentTargetExists = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee79(segmentId, targetId) {
|
|
15663
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee79$(_context79) {
|
|
15622
15664
|
while (1) {
|
|
15623
|
-
switch (
|
|
15665
|
+
switch (_context79.prev = _context79.next) {
|
|
15624
15666
|
case 0:
|
|
15625
15667
|
this.validateServerSideAuth();
|
|
15626
|
-
return
|
|
15668
|
+
return _context79.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(segmentId), "/target/").concat(encodeURIComponent(targetId))));
|
|
15627
15669
|
|
|
15628
15670
|
case 2:
|
|
15629
15671
|
case "end":
|
|
15630
|
-
return
|
|
15672
|
+
return _context79.stop();
|
|
15631
15673
|
}
|
|
15632
15674
|
}
|
|
15633
|
-
},
|
|
15675
|
+
}, _callee79, this);
|
|
15634
15676
|
}));
|
|
15635
15677
|
|
|
15636
|
-
function segmentTargetExists(
|
|
15678
|
+
function segmentTargetExists(_x114, _x115) {
|
|
15637
15679
|
return _segmentTargetExists.apply(this, arguments);
|
|
15638
15680
|
}
|
|
15639
15681
|
|
|
@@ -15650,23 +15692,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15650
15692
|
}, {
|
|
15651
15693
|
key: "createCampaign",
|
|
15652
15694
|
value: function () {
|
|
15653
|
-
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15654
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15695
|
+
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee80(params) {
|
|
15696
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee80$(_context80) {
|
|
15655
15697
|
while (1) {
|
|
15656
|
-
switch (
|
|
15698
|
+
switch (_context80.prev = _context80.next) {
|
|
15657
15699
|
case 0:
|
|
15658
15700
|
this.validateServerSideAuth();
|
|
15659
|
-
return
|
|
15701
|
+
return _context80.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
|
|
15660
15702
|
|
|
15661
15703
|
case 2:
|
|
15662
15704
|
case "end":
|
|
15663
|
-
return
|
|
15705
|
+
return _context80.stop();
|
|
15664
15706
|
}
|
|
15665
15707
|
}
|
|
15666
|
-
},
|
|
15708
|
+
}, _callee80, this);
|
|
15667
15709
|
}));
|
|
15668
15710
|
|
|
15669
|
-
function createCampaign(
|
|
15711
|
+
function createCampaign(_x116) {
|
|
15670
15712
|
return _createCampaign.apply(this, arguments);
|
|
15671
15713
|
}
|
|
15672
15714
|
|
|
@@ -15675,23 +15717,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15675
15717
|
}, {
|
|
15676
15718
|
key: "getCampaign",
|
|
15677
15719
|
value: function () {
|
|
15678
|
-
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15679
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15720
|
+
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee81(id) {
|
|
15721
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee81$(_context81) {
|
|
15680
15722
|
while (1) {
|
|
15681
|
-
switch (
|
|
15723
|
+
switch (_context81.prev = _context81.next) {
|
|
15682
15724
|
case 0:
|
|
15683
15725
|
this.validateServerSideAuth();
|
|
15684
|
-
return
|
|
15726
|
+
return _context81.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
|
|
15685
15727
|
|
|
15686
15728
|
case 2:
|
|
15687
15729
|
case "end":
|
|
15688
|
-
return
|
|
15730
|
+
return _context81.stop();
|
|
15689
15731
|
}
|
|
15690
15732
|
}
|
|
15691
|
-
},
|
|
15733
|
+
}, _callee81, this);
|
|
15692
15734
|
}));
|
|
15693
15735
|
|
|
15694
|
-
function getCampaign(
|
|
15736
|
+
function getCampaign(_x117) {
|
|
15695
15737
|
return _getCampaign.apply(this, arguments);
|
|
15696
15738
|
}
|
|
15697
15739
|
|
|
@@ -15700,26 +15742,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15700
15742
|
}, {
|
|
15701
15743
|
key: "startCampaign",
|
|
15702
15744
|
value: function () {
|
|
15703
|
-
var _startCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15704
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15745
|
+
var _startCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee82(id, options) {
|
|
15746
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee82$(_context82) {
|
|
15705
15747
|
while (1) {
|
|
15706
|
-
switch (
|
|
15748
|
+
switch (_context82.prev = _context82.next) {
|
|
15707
15749
|
case 0:
|
|
15708
15750
|
this.validateServerSideAuth();
|
|
15709
|
-
return
|
|
15751
|
+
return _context82.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/start"), {
|
|
15710
15752
|
scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
|
|
15711
15753
|
stop_at: options === null || options === void 0 ? void 0 : options.stopAt
|
|
15712
15754
|
}));
|
|
15713
15755
|
|
|
15714
15756
|
case 2:
|
|
15715
15757
|
case "end":
|
|
15716
|
-
return
|
|
15758
|
+
return _context82.stop();
|
|
15717
15759
|
}
|
|
15718
15760
|
}
|
|
15719
|
-
},
|
|
15761
|
+
}, _callee82, this);
|
|
15720
15762
|
}));
|
|
15721
15763
|
|
|
15722
|
-
function startCampaign(
|
|
15764
|
+
function startCampaign(_x118, _x119) {
|
|
15723
15765
|
return _startCampaign.apply(this, arguments);
|
|
15724
15766
|
}
|
|
15725
15767
|
|
|
@@ -15735,30 +15777,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15735
15777
|
}, {
|
|
15736
15778
|
key: "queryCampaigns",
|
|
15737
15779
|
value: function () {
|
|
15738
|
-
var _queryCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15739
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15780
|
+
var _queryCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee83(filter, sort, options) {
|
|
15781
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee83$(_context83) {
|
|
15740
15782
|
while (1) {
|
|
15741
|
-
switch (
|
|
15783
|
+
switch (_context83.prev = _context83.next) {
|
|
15742
15784
|
case 0:
|
|
15743
15785
|
this.validateServerSideAuth();
|
|
15744
|
-
|
|
15786
|
+
_context83.next = 3;
|
|
15745
15787
|
return this.post(this.baseURL + "/campaigns/query", _objectSpread({
|
|
15746
15788
|
filter: filter,
|
|
15747
15789
|
sort: sort
|
|
15748
15790
|
}, options || {}));
|
|
15749
15791
|
|
|
15750
15792
|
case 3:
|
|
15751
|
-
return
|
|
15793
|
+
return _context83.abrupt("return", _context83.sent);
|
|
15752
15794
|
|
|
15753
15795
|
case 4:
|
|
15754
15796
|
case "end":
|
|
15755
|
-
return
|
|
15797
|
+
return _context83.stop();
|
|
15756
15798
|
}
|
|
15757
15799
|
}
|
|
15758
|
-
},
|
|
15800
|
+
}, _callee83, this);
|
|
15759
15801
|
}));
|
|
15760
15802
|
|
|
15761
|
-
function queryCampaigns(
|
|
15803
|
+
function queryCampaigns(_x120, _x121, _x122) {
|
|
15762
15804
|
return _queryCampaigns.apply(this, arguments);
|
|
15763
15805
|
}
|
|
15764
15806
|
|
|
@@ -15776,23 +15818,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15776
15818
|
}, {
|
|
15777
15819
|
key: "updateCampaign",
|
|
15778
15820
|
value: function () {
|
|
15779
|
-
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15780
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15821
|
+
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee84(id, params) {
|
|
15822
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee84$(_context84) {
|
|
15781
15823
|
while (1) {
|
|
15782
|
-
switch (
|
|
15824
|
+
switch (_context84.prev = _context84.next) {
|
|
15783
15825
|
case 0:
|
|
15784
15826
|
this.validateServerSideAuth();
|
|
15785
|
-
return
|
|
15827
|
+
return _context84.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(encodeURIComponent(id)), params));
|
|
15786
15828
|
|
|
15787
15829
|
case 2:
|
|
15788
15830
|
case "end":
|
|
15789
|
-
return
|
|
15831
|
+
return _context84.stop();
|
|
15790
15832
|
}
|
|
15791
15833
|
}
|
|
15792
|
-
},
|
|
15834
|
+
}, _callee84, this);
|
|
15793
15835
|
}));
|
|
15794
15836
|
|
|
15795
|
-
function updateCampaign(
|
|
15837
|
+
function updateCampaign(_x123, _x124) {
|
|
15796
15838
|
return _updateCampaign.apply(this, arguments);
|
|
15797
15839
|
}
|
|
15798
15840
|
|
|
@@ -15809,23 +15851,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15809
15851
|
}, {
|
|
15810
15852
|
key: "deleteCampaign",
|
|
15811
15853
|
value: function () {
|
|
15812
|
-
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15813
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15854
|
+
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee85(id) {
|
|
15855
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee85$(_context85) {
|
|
15814
15856
|
while (1) {
|
|
15815
|
-
switch (
|
|
15857
|
+
switch (_context85.prev = _context85.next) {
|
|
15816
15858
|
case 0:
|
|
15817
15859
|
this.validateServerSideAuth();
|
|
15818
|
-
return
|
|
15860
|
+
return _context85.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
|
|
15819
15861
|
|
|
15820
15862
|
case 2:
|
|
15821
15863
|
case "end":
|
|
15822
|
-
return
|
|
15864
|
+
return _context85.stop();
|
|
15823
15865
|
}
|
|
15824
15866
|
}
|
|
15825
|
-
},
|
|
15867
|
+
}, _callee85, this);
|
|
15826
15868
|
}));
|
|
15827
15869
|
|
|
15828
|
-
function deleteCampaign(
|
|
15870
|
+
function deleteCampaign(_x125) {
|
|
15829
15871
|
return _deleteCampaign.apply(this, arguments);
|
|
15830
15872
|
}
|
|
15831
15873
|
|
|
@@ -15842,23 +15884,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15842
15884
|
}, {
|
|
15843
15885
|
key: "stopCampaign",
|
|
15844
15886
|
value: function () {
|
|
15845
|
-
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15846
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15887
|
+
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee86(id) {
|
|
15888
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee86$(_context86) {
|
|
15847
15889
|
while (1) {
|
|
15848
|
-
switch (
|
|
15890
|
+
switch (_context86.prev = _context86.next) {
|
|
15849
15891
|
case 0:
|
|
15850
15892
|
this.validateServerSideAuth();
|
|
15851
|
-
return
|
|
15893
|
+
return _context86.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/stop")));
|
|
15852
15894
|
|
|
15853
15895
|
case 2:
|
|
15854
15896
|
case "end":
|
|
15855
|
-
return
|
|
15897
|
+
return _context86.stop();
|
|
15856
15898
|
}
|
|
15857
15899
|
}
|
|
15858
|
-
},
|
|
15900
|
+
}, _callee86, this);
|
|
15859
15901
|
}));
|
|
15860
15902
|
|
|
15861
|
-
function stopCampaign(
|
|
15903
|
+
function stopCampaign(_x126) {
|
|
15862
15904
|
return _stopCampaign.apply(this, arguments);
|
|
15863
15905
|
}
|
|
15864
15906
|
|
|
@@ -15874,24 +15916,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15874
15916
|
}, {
|
|
15875
15917
|
key: "enrichURL",
|
|
15876
15918
|
value: function () {
|
|
15877
|
-
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15878
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15919
|
+
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee87(url) {
|
|
15920
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee87$(_context87) {
|
|
15879
15921
|
while (1) {
|
|
15880
|
-
switch (
|
|
15922
|
+
switch (_context87.prev = _context87.next) {
|
|
15881
15923
|
case 0:
|
|
15882
|
-
return
|
|
15924
|
+
return _context87.abrupt("return", this.get(this.baseURL + "/og", {
|
|
15883
15925
|
url: url
|
|
15884
15926
|
}));
|
|
15885
15927
|
|
|
15886
15928
|
case 1:
|
|
15887
15929
|
case "end":
|
|
15888
|
-
return
|
|
15930
|
+
return _context87.stop();
|
|
15889
15931
|
}
|
|
15890
15932
|
}
|
|
15891
|
-
},
|
|
15933
|
+
}, _callee87, this);
|
|
15892
15934
|
}));
|
|
15893
15935
|
|
|
15894
|
-
function enrichURL(
|
|
15936
|
+
function enrichURL(_x127) {
|
|
15895
15937
|
return _enrichURL.apply(this, arguments);
|
|
15896
15938
|
}
|
|
15897
15939
|
|
|
@@ -15908,22 +15950,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15908
15950
|
}, {
|
|
15909
15951
|
key: "getTask",
|
|
15910
15952
|
value: function () {
|
|
15911
|
-
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15912
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15953
|
+
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee88(id) {
|
|
15954
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee88$(_context88) {
|
|
15913
15955
|
while (1) {
|
|
15914
|
-
switch (
|
|
15956
|
+
switch (_context88.prev = _context88.next) {
|
|
15915
15957
|
case 0:
|
|
15916
|
-
return
|
|
15958
|
+
return _context88.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(encodeURIComponent(id))));
|
|
15917
15959
|
|
|
15918
15960
|
case 1:
|
|
15919
15961
|
case "end":
|
|
15920
|
-
return
|
|
15962
|
+
return _context88.stop();
|
|
15921
15963
|
}
|
|
15922
15964
|
}
|
|
15923
|
-
},
|
|
15965
|
+
}, _callee88, this);
|
|
15924
15966
|
}));
|
|
15925
15967
|
|
|
15926
|
-
function getTask(
|
|
15968
|
+
function getTask(_x128) {
|
|
15927
15969
|
return _getTask.apply(this, arguments);
|
|
15928
15970
|
}
|
|
15929
15971
|
|
|
@@ -15941,31 +15983,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15941
15983
|
}, {
|
|
15942
15984
|
key: "deleteChannels",
|
|
15943
15985
|
value: function () {
|
|
15944
|
-
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15986
|
+
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee89(cids) {
|
|
15945
15987
|
var options,
|
|
15946
|
-
|
|
15947
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15988
|
+
_args89 = arguments;
|
|
15989
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee89$(_context89) {
|
|
15948
15990
|
while (1) {
|
|
15949
|
-
switch (
|
|
15991
|
+
switch (_context89.prev = _context89.next) {
|
|
15950
15992
|
case 0:
|
|
15951
|
-
options =
|
|
15952
|
-
|
|
15993
|
+
options = _args89.length > 1 && _args89[1] !== undefined ? _args89[1] : {};
|
|
15994
|
+
_context89.next = 3;
|
|
15953
15995
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
15954
15996
|
cids: cids
|
|
15955
15997
|
}, options));
|
|
15956
15998
|
|
|
15957
15999
|
case 3:
|
|
15958
|
-
return
|
|
16000
|
+
return _context89.abrupt("return", _context89.sent);
|
|
15959
16001
|
|
|
15960
16002
|
case 4:
|
|
15961
16003
|
case "end":
|
|
15962
|
-
return
|
|
16004
|
+
return _context89.stop();
|
|
15963
16005
|
}
|
|
15964
16006
|
}
|
|
15965
|
-
},
|
|
16007
|
+
}, _callee89, this);
|
|
15966
16008
|
}));
|
|
15967
16009
|
|
|
15968
|
-
function deleteChannels(
|
|
16010
|
+
function deleteChannels(_x129) {
|
|
15969
16011
|
return _deleteChannels.apply(this, arguments);
|
|
15970
16012
|
}
|
|
15971
16013
|
|
|
@@ -15983,17 +16025,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15983
16025
|
}, {
|
|
15984
16026
|
key: "deleteUsers",
|
|
15985
16027
|
value: function () {
|
|
15986
|
-
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16028
|
+
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee90(user_ids) {
|
|
15987
16029
|
var options,
|
|
15988
|
-
|
|
15989
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16030
|
+
_args90 = arguments;
|
|
16031
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee90$(_context90) {
|
|
15990
16032
|
while (1) {
|
|
15991
|
-
switch (
|
|
16033
|
+
switch (_context90.prev = _context90.next) {
|
|
15992
16034
|
case 0:
|
|
15993
|
-
options =
|
|
16035
|
+
options = _args90.length > 1 && _args90[1] !== undefined ? _args90[1] : {};
|
|
15994
16036
|
|
|
15995
16037
|
if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
|
|
15996
|
-
|
|
16038
|
+
_context90.next = 3;
|
|
15997
16039
|
break;
|
|
15998
16040
|
}
|
|
15999
16041
|
|
|
@@ -16001,7 +16043,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16001
16043
|
|
|
16002
16044
|
case 3:
|
|
16003
16045
|
if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
|
|
16004
|
-
|
|
16046
|
+
_context90.next = 5;
|
|
16005
16047
|
break;
|
|
16006
16048
|
}
|
|
16007
16049
|
|
|
@@ -16009,30 +16051,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16009
16051
|
|
|
16010
16052
|
case 5:
|
|
16011
16053
|
if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
|
|
16012
|
-
|
|
16054
|
+
_context90.next = 7;
|
|
16013
16055
|
break;
|
|
16014
16056
|
}
|
|
16015
16057
|
|
|
16016
16058
|
throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
|
|
16017
16059
|
|
|
16018
16060
|
case 7:
|
|
16019
|
-
|
|
16061
|
+
_context90.next = 9;
|
|
16020
16062
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
16021
16063
|
user_ids: user_ids
|
|
16022
16064
|
}, options));
|
|
16023
16065
|
|
|
16024
16066
|
case 9:
|
|
16025
|
-
return
|
|
16067
|
+
return _context90.abrupt("return", _context90.sent);
|
|
16026
16068
|
|
|
16027
16069
|
case 10:
|
|
16028
16070
|
case "end":
|
|
16029
|
-
return
|
|
16071
|
+
return _context90.stop();
|
|
16030
16072
|
}
|
|
16031
16073
|
}
|
|
16032
|
-
},
|
|
16074
|
+
}, _callee90, this);
|
|
16033
16075
|
}));
|
|
16034
16076
|
|
|
16035
|
-
function deleteUsers(
|
|
16077
|
+
function deleteUsers(_x130) {
|
|
16036
16078
|
return _deleteUsers.apply(this, arguments);
|
|
16037
16079
|
}
|
|
16038
16080
|
|
|
@@ -16053,28 +16095,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16053
16095
|
}, {
|
|
16054
16096
|
key: "_createImportURL",
|
|
16055
16097
|
value: function () {
|
|
16056
|
-
var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16057
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16098
|
+
var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee91(filename) {
|
|
16099
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee91$(_context91) {
|
|
16058
16100
|
while (1) {
|
|
16059
|
-
switch (
|
|
16101
|
+
switch (_context91.prev = _context91.next) {
|
|
16060
16102
|
case 0:
|
|
16061
|
-
|
|
16103
|
+
_context91.next = 2;
|
|
16062
16104
|
return this.post(this.baseURL + "/import_urls", {
|
|
16063
16105
|
filename: filename
|
|
16064
16106
|
});
|
|
16065
16107
|
|
|
16066
16108
|
case 2:
|
|
16067
|
-
return
|
|
16109
|
+
return _context91.abrupt("return", _context91.sent);
|
|
16068
16110
|
|
|
16069
16111
|
case 3:
|
|
16070
16112
|
case "end":
|
|
16071
|
-
return
|
|
16113
|
+
return _context91.stop();
|
|
16072
16114
|
}
|
|
16073
16115
|
}
|
|
16074
|
-
},
|
|
16116
|
+
}, _callee91, this);
|
|
16075
16117
|
}));
|
|
16076
16118
|
|
|
16077
|
-
function _createImportURL(
|
|
16119
|
+
function _createImportURL(_x131) {
|
|
16078
16120
|
return _createImportURL2.apply(this, arguments);
|
|
16079
16121
|
}
|
|
16080
16122
|
|
|
@@ -16096,33 +16138,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16096
16138
|
}, {
|
|
16097
16139
|
key: "_createImport",
|
|
16098
16140
|
value: function () {
|
|
16099
|
-
var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16141
|
+
var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee92(path) {
|
|
16100
16142
|
var options,
|
|
16101
|
-
|
|
16102
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16143
|
+
_args92 = arguments;
|
|
16144
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee92$(_context92) {
|
|
16103
16145
|
while (1) {
|
|
16104
|
-
switch (
|
|
16146
|
+
switch (_context92.prev = _context92.next) {
|
|
16105
16147
|
case 0:
|
|
16106
|
-
options =
|
|
16148
|
+
options = _args92.length > 1 && _args92[1] !== undefined ? _args92[1] : {
|
|
16107
16149
|
mode: 'upsert'
|
|
16108
16150
|
};
|
|
16109
|
-
|
|
16151
|
+
_context92.next = 3;
|
|
16110
16152
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
16111
16153
|
path: path
|
|
16112
16154
|
}, options));
|
|
16113
16155
|
|
|
16114
16156
|
case 3:
|
|
16115
|
-
return
|
|
16157
|
+
return _context92.abrupt("return", _context92.sent);
|
|
16116
16158
|
|
|
16117
16159
|
case 4:
|
|
16118
16160
|
case "end":
|
|
16119
|
-
return
|
|
16161
|
+
return _context92.stop();
|
|
16120
16162
|
}
|
|
16121
16163
|
}
|
|
16122
|
-
},
|
|
16164
|
+
}, _callee92, this);
|
|
16123
16165
|
}));
|
|
16124
16166
|
|
|
16125
|
-
function _createImport(
|
|
16167
|
+
function _createImport(_x132) {
|
|
16126
16168
|
return _createImport2.apply(this, arguments);
|
|
16127
16169
|
}
|
|
16128
16170
|
|
|
@@ -16144,26 +16186,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16144
16186
|
}, {
|
|
16145
16187
|
key: "_getImport",
|
|
16146
16188
|
value: function () {
|
|
16147
|
-
var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16148
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16189
|
+
var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee93(id) {
|
|
16190
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee93$(_context93) {
|
|
16149
16191
|
while (1) {
|
|
16150
|
-
switch (
|
|
16192
|
+
switch (_context93.prev = _context93.next) {
|
|
16151
16193
|
case 0:
|
|
16152
|
-
|
|
16194
|
+
_context93.next = 2;
|
|
16153
16195
|
return this.get(this.baseURL + "/imports/".concat(encodeURIComponent(id)));
|
|
16154
16196
|
|
|
16155
16197
|
case 2:
|
|
16156
|
-
return
|
|
16198
|
+
return _context93.abrupt("return", _context93.sent);
|
|
16157
16199
|
|
|
16158
16200
|
case 3:
|
|
16159
16201
|
case "end":
|
|
16160
|
-
return
|
|
16202
|
+
return _context93.stop();
|
|
16161
16203
|
}
|
|
16162
16204
|
}
|
|
16163
|
-
},
|
|
16205
|
+
}, _callee93, this);
|
|
16164
16206
|
}));
|
|
16165
16207
|
|
|
16166
|
-
function _getImport(
|
|
16208
|
+
function _getImport(_x133) {
|
|
16167
16209
|
return _getImport2.apply(this, arguments);
|
|
16168
16210
|
}
|
|
16169
16211
|
|
|
@@ -16185,26 +16227,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16185
16227
|
}, {
|
|
16186
16228
|
key: "_listImports",
|
|
16187
16229
|
value: function () {
|
|
16188
|
-
var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16189
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16230
|
+
var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee94(options) {
|
|
16231
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee94$(_context94) {
|
|
16190
16232
|
while (1) {
|
|
16191
|
-
switch (
|
|
16233
|
+
switch (_context94.prev = _context94.next) {
|
|
16192
16234
|
case 0:
|
|
16193
|
-
|
|
16235
|
+
_context94.next = 2;
|
|
16194
16236
|
return this.get(this.baseURL + "/imports", options);
|
|
16195
16237
|
|
|
16196
16238
|
case 2:
|
|
16197
|
-
return
|
|
16239
|
+
return _context94.abrupt("return", _context94.sent);
|
|
16198
16240
|
|
|
16199
16241
|
case 3:
|
|
16200
16242
|
case "end":
|
|
16201
|
-
return
|
|
16243
|
+
return _context94.stop();
|
|
16202
16244
|
}
|
|
16203
16245
|
}
|
|
16204
|
-
},
|
|
16246
|
+
}, _callee94, this);
|
|
16205
16247
|
}));
|
|
16206
16248
|
|
|
16207
|
-
function _listImports(
|
|
16249
|
+
function _listImports(_x134) {
|
|
16208
16250
|
return _listImports2.apply(this, arguments);
|
|
16209
16251
|
}
|
|
16210
16252
|
|
|
@@ -16223,28 +16265,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16223
16265
|
}, {
|
|
16224
16266
|
key: "upsertPushProvider",
|
|
16225
16267
|
value: function () {
|
|
16226
|
-
var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16227
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16268
|
+
var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee95(pushProvider) {
|
|
16269
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee95$(_context95) {
|
|
16228
16270
|
while (1) {
|
|
16229
|
-
switch (
|
|
16271
|
+
switch (_context95.prev = _context95.next) {
|
|
16230
16272
|
case 0:
|
|
16231
|
-
|
|
16273
|
+
_context95.next = 2;
|
|
16232
16274
|
return this.post(this.baseURL + "/push_providers", {
|
|
16233
16275
|
push_provider: pushProvider
|
|
16234
16276
|
});
|
|
16235
16277
|
|
|
16236
16278
|
case 2:
|
|
16237
|
-
return
|
|
16279
|
+
return _context95.abrupt("return", _context95.sent);
|
|
16238
16280
|
|
|
16239
16281
|
case 3:
|
|
16240
16282
|
case "end":
|
|
16241
|
-
return
|
|
16283
|
+
return _context95.stop();
|
|
16242
16284
|
}
|
|
16243
16285
|
}
|
|
16244
|
-
},
|
|
16286
|
+
}, _callee95, this);
|
|
16245
16287
|
}));
|
|
16246
16288
|
|
|
16247
|
-
function upsertPushProvider(
|
|
16289
|
+
function upsertPushProvider(_x135) {
|
|
16248
16290
|
return _upsertPushProvider.apply(this, arguments);
|
|
16249
16291
|
}
|
|
16250
16292
|
|
|
@@ -16263,28 +16305,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16263
16305
|
}, {
|
|
16264
16306
|
key: "deletePushProvider",
|
|
16265
16307
|
value: function () {
|
|
16266
|
-
var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16308
|
+
var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee96(_ref10) {
|
|
16267
16309
|
var type, name;
|
|
16268
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16310
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee96$(_context96) {
|
|
16269
16311
|
while (1) {
|
|
16270
|
-
switch (
|
|
16312
|
+
switch (_context96.prev = _context96.next) {
|
|
16271
16313
|
case 0:
|
|
16272
16314
|
type = _ref10.type, name = _ref10.name;
|
|
16273
|
-
|
|
16315
|
+
_context96.next = 3;
|
|
16274
16316
|
return this.delete(this.baseURL + "/push_providers/".concat(encodeURIComponent(type), "/").concat(encodeURIComponent(name)));
|
|
16275
16317
|
|
|
16276
16318
|
case 3:
|
|
16277
|
-
return
|
|
16319
|
+
return _context96.abrupt("return", _context96.sent);
|
|
16278
16320
|
|
|
16279
16321
|
case 4:
|
|
16280
16322
|
case "end":
|
|
16281
|
-
return
|
|
16323
|
+
return _context96.stop();
|
|
16282
16324
|
}
|
|
16283
16325
|
}
|
|
16284
|
-
},
|
|
16326
|
+
}, _callee96, this);
|
|
16285
16327
|
}));
|
|
16286
16328
|
|
|
16287
|
-
function deletePushProvider(
|
|
16329
|
+
function deletePushProvider(_x136) {
|
|
16288
16330
|
return _deletePushProvider.apply(this, arguments);
|
|
16289
16331
|
}
|
|
16290
16332
|
|
|
@@ -16301,23 +16343,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16301
16343
|
}, {
|
|
16302
16344
|
key: "listPushProviders",
|
|
16303
16345
|
value: function () {
|
|
16304
|
-
var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16305
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16346
|
+
var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee97() {
|
|
16347
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee97$(_context97) {
|
|
16306
16348
|
while (1) {
|
|
16307
|
-
switch (
|
|
16349
|
+
switch (_context97.prev = _context97.next) {
|
|
16308
16350
|
case 0:
|
|
16309
|
-
|
|
16351
|
+
_context97.next = 2;
|
|
16310
16352
|
return this.get(this.baseURL + "/push_providers");
|
|
16311
16353
|
|
|
16312
16354
|
case 2:
|
|
16313
|
-
return
|
|
16355
|
+
return _context97.abrupt("return", _context97.sent);
|
|
16314
16356
|
|
|
16315
16357
|
case 3:
|
|
16316
16358
|
case "end":
|
|
16317
|
-
return
|
|
16359
|
+
return _context97.stop();
|
|
16318
16360
|
}
|
|
16319
16361
|
}
|
|
16320
|
-
},
|
|
16362
|
+
}, _callee97, this);
|
|
16321
16363
|
}));
|
|
16322
16364
|
|
|
16323
16365
|
function listPushProviders() {
|
|
@@ -16345,26 +16387,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16345
16387
|
}, {
|
|
16346
16388
|
key: "commitMessage",
|
|
16347
16389
|
value: function () {
|
|
16348
|
-
var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16349
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16390
|
+
var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee98(id) {
|
|
16391
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee98$(_context98) {
|
|
16350
16392
|
while (1) {
|
|
16351
|
-
switch (
|
|
16393
|
+
switch (_context98.prev = _context98.next) {
|
|
16352
16394
|
case 0:
|
|
16353
|
-
|
|
16395
|
+
_context98.next = 2;
|
|
16354
16396
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(id), "/commit"));
|
|
16355
16397
|
|
|
16356
16398
|
case 2:
|
|
16357
|
-
return
|
|
16399
|
+
return _context98.abrupt("return", _context98.sent);
|
|
16358
16400
|
|
|
16359
16401
|
case 3:
|
|
16360
16402
|
case "end":
|
|
16361
|
-
return
|
|
16403
|
+
return _context98.stop();
|
|
16362
16404
|
}
|
|
16363
16405
|
}
|
|
16364
|
-
},
|
|
16406
|
+
}, _callee98, this);
|
|
16365
16407
|
}));
|
|
16366
16408
|
|
|
16367
|
-
function commitMessage(
|
|
16409
|
+
function commitMessage(_x137) {
|
|
16368
16410
|
return _commitMessage.apply(this, arguments);
|
|
16369
16411
|
}
|
|
16370
16412
|
|
|
@@ -16380,28 +16422,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16380
16422
|
}, {
|
|
16381
16423
|
key: "createPoll",
|
|
16382
16424
|
value: function () {
|
|
16383
|
-
var _createPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16384
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16425
|
+
var _createPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee99(poll, userId) {
|
|
16426
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee99$(_context99) {
|
|
16385
16427
|
while (1) {
|
|
16386
|
-
switch (
|
|
16428
|
+
switch (_context99.prev = _context99.next) {
|
|
16387
16429
|
case 0:
|
|
16388
|
-
|
|
16430
|
+
_context99.next = 2;
|
|
16389
16431
|
return this.post(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
|
|
16390
16432
|
user_id: userId
|
|
16391
16433
|
} : {}));
|
|
16392
16434
|
|
|
16393
16435
|
case 2:
|
|
16394
|
-
return
|
|
16436
|
+
return _context99.abrupt("return", _context99.sent);
|
|
16395
16437
|
|
|
16396
16438
|
case 3:
|
|
16397
16439
|
case "end":
|
|
16398
|
-
return
|
|
16440
|
+
return _context99.stop();
|
|
16399
16441
|
}
|
|
16400
16442
|
}
|
|
16401
|
-
},
|
|
16443
|
+
}, _callee99, this);
|
|
16402
16444
|
}));
|
|
16403
16445
|
|
|
16404
|
-
function createPoll(
|
|
16446
|
+
function createPoll(_x138, _x139) {
|
|
16405
16447
|
return _createPoll.apply(this, arguments);
|
|
16406
16448
|
}
|
|
16407
16449
|
|
|
@@ -16417,28 +16459,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16417
16459
|
}, {
|
|
16418
16460
|
key: "getPoll",
|
|
16419
16461
|
value: function () {
|
|
16420
|
-
var _getPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16421
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16462
|
+
var _getPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee100(id, userId) {
|
|
16463
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee100$(_context100) {
|
|
16422
16464
|
while (1) {
|
|
16423
|
-
switch (
|
|
16465
|
+
switch (_context100.prev = _context100.next) {
|
|
16424
16466
|
case 0:
|
|
16425
|
-
|
|
16467
|
+
_context100.next = 2;
|
|
16426
16468
|
return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(id)), userId ? {
|
|
16427
16469
|
user_id: userId
|
|
16428
16470
|
} : {});
|
|
16429
16471
|
|
|
16430
16472
|
case 2:
|
|
16431
|
-
return
|
|
16473
|
+
return _context100.abrupt("return", _context100.sent);
|
|
16432
16474
|
|
|
16433
16475
|
case 3:
|
|
16434
16476
|
case "end":
|
|
16435
|
-
return
|
|
16477
|
+
return _context100.stop();
|
|
16436
16478
|
}
|
|
16437
16479
|
}
|
|
16438
|
-
},
|
|
16480
|
+
}, _callee100, this);
|
|
16439
16481
|
}));
|
|
16440
16482
|
|
|
16441
|
-
function getPoll(
|
|
16483
|
+
function getPoll(_x140, _x141) {
|
|
16442
16484
|
return _getPoll.apply(this, arguments);
|
|
16443
16485
|
}
|
|
16444
16486
|
|
|
@@ -16454,28 +16496,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16454
16496
|
}, {
|
|
16455
16497
|
key: "updatePoll",
|
|
16456
16498
|
value: function () {
|
|
16457
|
-
var _updatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16458
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16499
|
+
var _updatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee101(poll, userId) {
|
|
16500
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee101$(_context101) {
|
|
16459
16501
|
while (1) {
|
|
16460
|
-
switch (
|
|
16502
|
+
switch (_context101.prev = _context101.next) {
|
|
16461
16503
|
case 0:
|
|
16462
|
-
|
|
16504
|
+
_context101.next = 2;
|
|
16463
16505
|
return this.put(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
|
|
16464
16506
|
user_id: userId
|
|
16465
16507
|
} : {}));
|
|
16466
16508
|
|
|
16467
16509
|
case 2:
|
|
16468
|
-
return
|
|
16510
|
+
return _context101.abrupt("return", _context101.sent);
|
|
16469
16511
|
|
|
16470
16512
|
case 3:
|
|
16471
16513
|
case "end":
|
|
16472
|
-
return
|
|
16514
|
+
return _context101.stop();
|
|
16473
16515
|
}
|
|
16474
16516
|
}
|
|
16475
|
-
},
|
|
16517
|
+
}, _callee101, this);
|
|
16476
16518
|
}));
|
|
16477
16519
|
|
|
16478
|
-
function updatePoll(
|
|
16520
|
+
function updatePoll(_x142, _x143) {
|
|
16479
16521
|
return _updatePoll.apply(this, arguments);
|
|
16480
16522
|
}
|
|
16481
16523
|
|
|
@@ -16493,28 +16535,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16493
16535
|
}, {
|
|
16494
16536
|
key: "partialUpdatePoll",
|
|
16495
16537
|
value: function () {
|
|
16496
|
-
var _partialUpdatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16497
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16538
|
+
var _partialUpdatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee102(id, partialPollObject, userId) {
|
|
16539
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee102$(_context102) {
|
|
16498
16540
|
while (1) {
|
|
16499
|
-
switch (
|
|
16541
|
+
switch (_context102.prev = _context102.next) {
|
|
16500
16542
|
case 0:
|
|
16501
|
-
|
|
16543
|
+
_context102.next = 2;
|
|
16502
16544
|
return this.patch(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread({}, partialPollObject), userId ? {
|
|
16503
16545
|
user_id: userId
|
|
16504
16546
|
} : {}));
|
|
16505
16547
|
|
|
16506
16548
|
case 2:
|
|
16507
|
-
return
|
|
16549
|
+
return _context102.abrupt("return", _context102.sent);
|
|
16508
16550
|
|
|
16509
16551
|
case 3:
|
|
16510
16552
|
case "end":
|
|
16511
|
-
return
|
|
16553
|
+
return _context102.stop();
|
|
16512
16554
|
}
|
|
16513
16555
|
}
|
|
16514
|
-
},
|
|
16556
|
+
}, _callee102, this);
|
|
16515
16557
|
}));
|
|
16516
16558
|
|
|
16517
|
-
function partialUpdatePoll(
|
|
16559
|
+
function partialUpdatePoll(_x144, _x145, _x146) {
|
|
16518
16560
|
return _partialUpdatePoll.apply(this, arguments);
|
|
16519
16561
|
}
|
|
16520
16562
|
|
|
@@ -16530,28 +16572,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16530
16572
|
}, {
|
|
16531
16573
|
key: "deletePoll",
|
|
16532
16574
|
value: function () {
|
|
16533
|
-
var _deletePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16534
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16575
|
+
var _deletePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee103(id, userId) {
|
|
16576
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee103$(_context103) {
|
|
16535
16577
|
while (1) {
|
|
16536
|
-
switch (
|
|
16578
|
+
switch (_context103.prev = _context103.next) {
|
|
16537
16579
|
case 0:
|
|
16538
|
-
|
|
16580
|
+
_context103.next = 2;
|
|
16539
16581
|
return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread({}, userId ? {
|
|
16540
16582
|
user_id: userId
|
|
16541
16583
|
} : {}));
|
|
16542
16584
|
|
|
16543
16585
|
case 2:
|
|
16544
|
-
return
|
|
16586
|
+
return _context103.abrupt("return", _context103.sent);
|
|
16545
16587
|
|
|
16546
16588
|
case 3:
|
|
16547
16589
|
case "end":
|
|
16548
|
-
return
|
|
16590
|
+
return _context103.stop();
|
|
16549
16591
|
}
|
|
16550
16592
|
}
|
|
16551
|
-
},
|
|
16593
|
+
}, _callee103, this);
|
|
16552
16594
|
}));
|
|
16553
16595
|
|
|
16554
|
-
function deletePoll(
|
|
16596
|
+
function deletePoll(_x147, _x148) {
|
|
16555
16597
|
return _deletePoll.apply(this, arguments);
|
|
16556
16598
|
}
|
|
16557
16599
|
|
|
@@ -16567,12 +16609,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16567
16609
|
}, {
|
|
16568
16610
|
key: "closePoll",
|
|
16569
16611
|
value: function () {
|
|
16570
|
-
var _closePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16571
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16612
|
+
var _closePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee104(id, userId) {
|
|
16613
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee104$(_context104) {
|
|
16572
16614
|
while (1) {
|
|
16573
|
-
switch (
|
|
16615
|
+
switch (_context104.prev = _context104.next) {
|
|
16574
16616
|
case 0:
|
|
16575
|
-
return
|
|
16617
|
+
return _context104.abrupt("return", this.partialUpdatePoll(id, {
|
|
16576
16618
|
set: {
|
|
16577
16619
|
is_closed: true
|
|
16578
16620
|
}
|
|
@@ -16580,13 +16622,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16580
16622
|
|
|
16581
16623
|
case 1:
|
|
16582
16624
|
case "end":
|
|
16583
|
-
return
|
|
16625
|
+
return _context104.stop();
|
|
16584
16626
|
}
|
|
16585
16627
|
}
|
|
16586
|
-
},
|
|
16628
|
+
}, _callee104, this);
|
|
16587
16629
|
}));
|
|
16588
16630
|
|
|
16589
|
-
function closePoll(
|
|
16631
|
+
function closePoll(_x149, _x150) {
|
|
16590
16632
|
return _closePoll.apply(this, arguments);
|
|
16591
16633
|
}
|
|
16592
16634
|
|
|
@@ -16603,28 +16645,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16603
16645
|
}, {
|
|
16604
16646
|
key: "createPollOption",
|
|
16605
16647
|
value: function () {
|
|
16606
|
-
var _createPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16607
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16648
|
+
var _createPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee105(pollId, option, userId) {
|
|
16649
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee105$(_context105) {
|
|
16608
16650
|
while (1) {
|
|
16609
|
-
switch (
|
|
16651
|
+
switch (_context105.prev = _context105.next) {
|
|
16610
16652
|
case 0:
|
|
16611
|
-
|
|
16653
|
+
_context105.next = 2;
|
|
16612
16654
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
|
|
16613
16655
|
user_id: userId
|
|
16614
16656
|
} : {}));
|
|
16615
16657
|
|
|
16616
16658
|
case 2:
|
|
16617
|
-
return
|
|
16659
|
+
return _context105.abrupt("return", _context105.sent);
|
|
16618
16660
|
|
|
16619
16661
|
case 3:
|
|
16620
16662
|
case "end":
|
|
16621
|
-
return
|
|
16663
|
+
return _context105.stop();
|
|
16622
16664
|
}
|
|
16623
16665
|
}
|
|
16624
|
-
},
|
|
16666
|
+
}, _callee105, this);
|
|
16625
16667
|
}));
|
|
16626
16668
|
|
|
16627
|
-
function createPollOption(
|
|
16669
|
+
function createPollOption(_x151, _x152, _x153) {
|
|
16628
16670
|
return _createPollOption.apply(this, arguments);
|
|
16629
16671
|
}
|
|
16630
16672
|
|
|
@@ -16641,28 +16683,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16641
16683
|
}, {
|
|
16642
16684
|
key: "getPollOption",
|
|
16643
16685
|
value: function () {
|
|
16644
|
-
var _getPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16645
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16686
|
+
var _getPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee106(pollId, optionId, userId) {
|
|
16687
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee106$(_context106) {
|
|
16646
16688
|
while (1) {
|
|
16647
|
-
switch (
|
|
16689
|
+
switch (_context106.prev = _context106.next) {
|
|
16648
16690
|
case 0:
|
|
16649
|
-
|
|
16691
|
+
_context106.next = 2;
|
|
16650
16692
|
return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
|
|
16651
16693
|
user_id: userId
|
|
16652
16694
|
} : {});
|
|
16653
16695
|
|
|
16654
16696
|
case 2:
|
|
16655
|
-
return
|
|
16697
|
+
return _context106.abrupt("return", _context106.sent);
|
|
16656
16698
|
|
|
16657
16699
|
case 3:
|
|
16658
16700
|
case "end":
|
|
16659
|
-
return
|
|
16701
|
+
return _context106.stop();
|
|
16660
16702
|
}
|
|
16661
16703
|
}
|
|
16662
|
-
},
|
|
16704
|
+
}, _callee106, this);
|
|
16663
16705
|
}));
|
|
16664
16706
|
|
|
16665
|
-
function getPollOption(
|
|
16707
|
+
function getPollOption(_x154, _x155, _x156) {
|
|
16666
16708
|
return _getPollOption.apply(this, arguments);
|
|
16667
16709
|
}
|
|
16668
16710
|
|
|
@@ -16679,28 +16721,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16679
16721
|
}, {
|
|
16680
16722
|
key: "updatePollOption",
|
|
16681
16723
|
value: function () {
|
|
16682
|
-
var _updatePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16683
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16724
|
+
var _updatePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee107(pollId, option, userId) {
|
|
16725
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee107$(_context107) {
|
|
16684
16726
|
while (1) {
|
|
16685
|
-
switch (
|
|
16727
|
+
switch (_context107.prev = _context107.next) {
|
|
16686
16728
|
case 0:
|
|
16687
|
-
|
|
16729
|
+
_context107.next = 2;
|
|
16688
16730
|
return this.put(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
|
|
16689
16731
|
user_id: userId
|
|
16690
16732
|
} : {}));
|
|
16691
16733
|
|
|
16692
16734
|
case 2:
|
|
16693
|
-
return
|
|
16735
|
+
return _context107.abrupt("return", _context107.sent);
|
|
16694
16736
|
|
|
16695
16737
|
case 3:
|
|
16696
16738
|
case "end":
|
|
16697
|
-
return
|
|
16739
|
+
return _context107.stop();
|
|
16698
16740
|
}
|
|
16699
16741
|
}
|
|
16700
|
-
},
|
|
16742
|
+
}, _callee107, this);
|
|
16701
16743
|
}));
|
|
16702
16744
|
|
|
16703
|
-
function updatePollOption(
|
|
16745
|
+
function updatePollOption(_x157, _x158, _x159) {
|
|
16704
16746
|
return _updatePollOption.apply(this, arguments);
|
|
16705
16747
|
}
|
|
16706
16748
|
|
|
@@ -16717,28 +16759,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16717
16759
|
}, {
|
|
16718
16760
|
key: "deletePollOption",
|
|
16719
16761
|
value: function () {
|
|
16720
|
-
var _deletePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16721
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16762
|
+
var _deletePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee108(pollId, optionId, userId) {
|
|
16763
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee108$(_context108) {
|
|
16722
16764
|
while (1) {
|
|
16723
|
-
switch (
|
|
16765
|
+
switch (_context108.prev = _context108.next) {
|
|
16724
16766
|
case 0:
|
|
16725
|
-
|
|
16767
|
+
_context108.next = 2;
|
|
16726
16768
|
return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
|
|
16727
16769
|
user_id: userId
|
|
16728
16770
|
} : {});
|
|
16729
16771
|
|
|
16730
16772
|
case 2:
|
|
16731
|
-
return
|
|
16773
|
+
return _context108.abrupt("return", _context108.sent);
|
|
16732
16774
|
|
|
16733
16775
|
case 3:
|
|
16734
16776
|
case "end":
|
|
16735
|
-
return
|
|
16777
|
+
return _context108.stop();
|
|
16736
16778
|
}
|
|
16737
16779
|
}
|
|
16738
|
-
},
|
|
16780
|
+
}, _callee108, this);
|
|
16739
16781
|
}));
|
|
16740
16782
|
|
|
16741
|
-
function deletePollOption(
|
|
16783
|
+
function deletePollOption(_x160, _x161, _x162) {
|
|
16742
16784
|
return _deletePollOption.apply(this, arguments);
|
|
16743
16785
|
}
|
|
16744
16786
|
|
|
@@ -16756,12 +16798,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16756
16798
|
}, {
|
|
16757
16799
|
key: "castPollVote",
|
|
16758
16800
|
value: function () {
|
|
16759
|
-
var _castPollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16760
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16801
|
+
var _castPollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee109(messageId, pollId, vote, userId) {
|
|
16802
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee109$(_context109) {
|
|
16761
16803
|
while (1) {
|
|
16762
|
-
switch (
|
|
16804
|
+
switch (_context109.prev = _context109.next) {
|
|
16763
16805
|
case 0:
|
|
16764
|
-
|
|
16806
|
+
_context109.next = 2;
|
|
16765
16807
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote"), _objectSpread({
|
|
16766
16808
|
vote: vote
|
|
16767
16809
|
}, userId ? {
|
|
@@ -16769,17 +16811,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16769
16811
|
} : {}));
|
|
16770
16812
|
|
|
16771
16813
|
case 2:
|
|
16772
|
-
return
|
|
16814
|
+
return _context109.abrupt("return", _context109.sent);
|
|
16773
16815
|
|
|
16774
16816
|
case 3:
|
|
16775
16817
|
case "end":
|
|
16776
|
-
return
|
|
16818
|
+
return _context109.stop();
|
|
16777
16819
|
}
|
|
16778
16820
|
}
|
|
16779
|
-
},
|
|
16821
|
+
}, _callee109, this);
|
|
16780
16822
|
}));
|
|
16781
16823
|
|
|
16782
|
-
function castPollVote(
|
|
16824
|
+
function castPollVote(_x163, _x164, _x165, _x166) {
|
|
16783
16825
|
return _castPollVote.apply(this, arguments);
|
|
16784
16826
|
}
|
|
16785
16827
|
|
|
@@ -16796,24 +16838,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16796
16838
|
}, {
|
|
16797
16839
|
key: "addPollAnswer",
|
|
16798
16840
|
value: function () {
|
|
16799
|
-
var _addPollAnswer = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16800
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16841
|
+
var _addPollAnswer = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee110(messageId, pollId, answerText, userId) {
|
|
16842
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee110$(_context110) {
|
|
16801
16843
|
while (1) {
|
|
16802
|
-
switch (
|
|
16844
|
+
switch (_context110.prev = _context110.next) {
|
|
16803
16845
|
case 0:
|
|
16804
|
-
return
|
|
16846
|
+
return _context110.abrupt("return", this.castPollVote(messageId, pollId, {
|
|
16805
16847
|
answer_text: answerText
|
|
16806
16848
|
}, userId));
|
|
16807
16849
|
|
|
16808
16850
|
case 1:
|
|
16809
16851
|
case "end":
|
|
16810
|
-
return
|
|
16852
|
+
return _context110.stop();
|
|
16811
16853
|
}
|
|
16812
16854
|
}
|
|
16813
|
-
},
|
|
16855
|
+
}, _callee110, this);
|
|
16814
16856
|
}));
|
|
16815
16857
|
|
|
16816
|
-
function addPollAnswer(
|
|
16858
|
+
function addPollAnswer(_x167, _x168, _x169, _x170) {
|
|
16817
16859
|
return _addPollAnswer.apply(this, arguments);
|
|
16818
16860
|
}
|
|
16819
16861
|
|
|
@@ -16822,28 +16864,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16822
16864
|
}, {
|
|
16823
16865
|
key: "removePollVote",
|
|
16824
16866
|
value: function () {
|
|
16825
|
-
var _removePollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16826
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16867
|
+
var _removePollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee111(messageId, pollId, voteId, userId) {
|
|
16868
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee111$(_context111) {
|
|
16827
16869
|
while (1) {
|
|
16828
|
-
switch (
|
|
16870
|
+
switch (_context111.prev = _context111.next) {
|
|
16829
16871
|
case 0:
|
|
16830
|
-
|
|
16872
|
+
_context111.next = 2;
|
|
16831
16873
|
return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote/").concat(encodeURIComponent(voteId)), _objectSpread({}, userId ? {
|
|
16832
16874
|
user_id: userId
|
|
16833
16875
|
} : {}));
|
|
16834
16876
|
|
|
16835
16877
|
case 2:
|
|
16836
|
-
return
|
|
16878
|
+
return _context111.abrupt("return", _context111.sent);
|
|
16837
16879
|
|
|
16838
16880
|
case 3:
|
|
16839
16881
|
case "end":
|
|
16840
|
-
return
|
|
16882
|
+
return _context111.stop();
|
|
16841
16883
|
}
|
|
16842
16884
|
}
|
|
16843
|
-
},
|
|
16885
|
+
}, _callee111, this);
|
|
16844
16886
|
}));
|
|
16845
16887
|
|
|
16846
|
-
function removePollVote(
|
|
16888
|
+
function removePollVote(_x171, _x172, _x173, _x174) {
|
|
16847
16889
|
return _removePollVote.apply(this, arguments);
|
|
16848
16890
|
}
|
|
16849
16891
|
|
|
@@ -16861,37 +16903,37 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16861
16903
|
}, {
|
|
16862
16904
|
key: "queryPolls",
|
|
16863
16905
|
value: function () {
|
|
16864
|
-
var _queryPolls = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16906
|
+
var _queryPolls = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee112() {
|
|
16865
16907
|
var filter,
|
|
16866
16908
|
sort,
|
|
16867
16909
|
options,
|
|
16868
16910
|
userId,
|
|
16869
16911
|
q,
|
|
16870
|
-
|
|
16871
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16912
|
+
_args112 = arguments;
|
|
16913
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee112$(_context112) {
|
|
16872
16914
|
while (1) {
|
|
16873
|
-
switch (
|
|
16915
|
+
switch (_context112.prev = _context112.next) {
|
|
16874
16916
|
case 0:
|
|
16875
|
-
filter =
|
|
16876
|
-
sort =
|
|
16877
|
-
options =
|
|
16878
|
-
userId =
|
|
16917
|
+
filter = _args112.length > 0 && _args112[0] !== undefined ? _args112[0] : {};
|
|
16918
|
+
sort = _args112.length > 1 && _args112[1] !== undefined ? _args112[1] : [];
|
|
16919
|
+
options = _args112.length > 2 && _args112[2] !== undefined ? _args112[2] : {};
|
|
16920
|
+
userId = _args112.length > 3 ? _args112[3] : undefined;
|
|
16879
16921
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16880
|
-
|
|
16922
|
+
_context112.next = 7;
|
|
16881
16923
|
return this.post(this.baseURL + "/polls/query".concat(q), _objectSpread({
|
|
16882
16924
|
filter: filter,
|
|
16883
16925
|
sort: normalizeQuerySort(sort)
|
|
16884
16926
|
}, options));
|
|
16885
16927
|
|
|
16886
16928
|
case 7:
|
|
16887
|
-
return
|
|
16929
|
+
return _context112.abrupt("return", _context112.sent);
|
|
16888
16930
|
|
|
16889
16931
|
case 8:
|
|
16890
16932
|
case "end":
|
|
16891
|
-
return
|
|
16933
|
+
return _context112.stop();
|
|
16892
16934
|
}
|
|
16893
16935
|
}
|
|
16894
|
-
},
|
|
16936
|
+
}, _callee112, this);
|
|
16895
16937
|
}));
|
|
16896
16938
|
|
|
16897
16939
|
function queryPolls() {
|
|
@@ -16913,40 +16955,40 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16913
16955
|
}, {
|
|
16914
16956
|
key: "queryPollVotes",
|
|
16915
16957
|
value: function () {
|
|
16916
|
-
var _queryPollVotes = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16958
|
+
var _queryPollVotes = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee113(pollId) {
|
|
16917
16959
|
var filter,
|
|
16918
16960
|
sort,
|
|
16919
16961
|
options,
|
|
16920
16962
|
userId,
|
|
16921
16963
|
q,
|
|
16922
|
-
|
|
16923
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16964
|
+
_args113 = arguments;
|
|
16965
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee113$(_context113) {
|
|
16924
16966
|
while (1) {
|
|
16925
|
-
switch (
|
|
16967
|
+
switch (_context113.prev = _context113.next) {
|
|
16926
16968
|
case 0:
|
|
16927
|
-
filter =
|
|
16928
|
-
sort =
|
|
16929
|
-
options =
|
|
16930
|
-
userId =
|
|
16969
|
+
filter = _args113.length > 1 && _args113[1] !== undefined ? _args113[1] : {};
|
|
16970
|
+
sort = _args113.length > 2 && _args113[2] !== undefined ? _args113[2] : [];
|
|
16971
|
+
options = _args113.length > 3 && _args113[3] !== undefined ? _args113[3] : {};
|
|
16972
|
+
userId = _args113.length > 4 ? _args113[4] : undefined;
|
|
16931
16973
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16932
|
-
|
|
16974
|
+
_context113.next = 7;
|
|
16933
16975
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
|
|
16934
16976
|
filter: filter,
|
|
16935
16977
|
sort: normalizeQuerySort(sort)
|
|
16936
16978
|
}, options));
|
|
16937
16979
|
|
|
16938
16980
|
case 7:
|
|
16939
|
-
return
|
|
16981
|
+
return _context113.abrupt("return", _context113.sent);
|
|
16940
16982
|
|
|
16941
16983
|
case 8:
|
|
16942
16984
|
case "end":
|
|
16943
|
-
return
|
|
16985
|
+
return _context113.stop();
|
|
16944
16986
|
}
|
|
16945
16987
|
}
|
|
16946
|
-
},
|
|
16988
|
+
}, _callee113, this);
|
|
16947
16989
|
}));
|
|
16948
16990
|
|
|
16949
|
-
function queryPollVotes(
|
|
16991
|
+
function queryPollVotes(_x175) {
|
|
16950
16992
|
return _queryPollVotes.apply(this, arguments);
|
|
16951
16993
|
}
|
|
16952
16994
|
|
|
@@ -16965,23 +17007,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16965
17007
|
}, {
|
|
16966
17008
|
key: "queryPollAnswers",
|
|
16967
17009
|
value: function () {
|
|
16968
|
-
var _queryPollAnswers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
17010
|
+
var _queryPollAnswers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee114(pollId) {
|
|
16969
17011
|
var filter,
|
|
16970
17012
|
sort,
|
|
16971
17013
|
options,
|
|
16972
17014
|
userId,
|
|
16973
17015
|
q,
|
|
16974
|
-
|
|
16975
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
17016
|
+
_args114 = arguments;
|
|
17017
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee114$(_context114) {
|
|
16976
17018
|
while (1) {
|
|
16977
|
-
switch (
|
|
17019
|
+
switch (_context114.prev = _context114.next) {
|
|
16978
17020
|
case 0:
|
|
16979
|
-
filter =
|
|
16980
|
-
sort =
|
|
16981
|
-
options =
|
|
16982
|
-
userId =
|
|
17021
|
+
filter = _args114.length > 1 && _args114[1] !== undefined ? _args114[1] : {};
|
|
17022
|
+
sort = _args114.length > 2 && _args114[2] !== undefined ? _args114[2] : [];
|
|
17023
|
+
options = _args114.length > 3 && _args114[3] !== undefined ? _args114[3] : {};
|
|
17024
|
+
userId = _args114.length > 4 ? _args114[4] : undefined;
|
|
16983
17025
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16984
|
-
|
|
17026
|
+
_context114.next = 7;
|
|
16985
17027
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
|
|
16986
17028
|
filter: _objectSpread(_objectSpread({}, filter), {}, {
|
|
16987
17029
|
is_answer: true
|
|
@@ -16990,17 +17032,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16990
17032
|
}, options));
|
|
16991
17033
|
|
|
16992
17034
|
case 7:
|
|
16993
|
-
return
|
|
17035
|
+
return _context114.abrupt("return", _context114.sent);
|
|
16994
17036
|
|
|
16995
17037
|
case 8:
|
|
16996
17038
|
case "end":
|
|
16997
|
-
return
|
|
17039
|
+
return _context114.stop();
|
|
16998
17040
|
}
|
|
16999
17041
|
}
|
|
17000
|
-
},
|
|
17042
|
+
}, _callee114, this);
|
|
17001
17043
|
}));
|
|
17002
17044
|
|
|
17003
|
-
function queryPollAnswers(
|
|
17045
|
+
function queryPollAnswers(_x176) {
|
|
17004
17046
|
return _queryPollAnswers.apply(this, arguments);
|
|
17005
17047
|
}
|
|
17006
17048
|
|
|
@@ -17017,33 +17059,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
17017
17059
|
}, {
|
|
17018
17060
|
key: "queryMessageHistory",
|
|
17019
17061
|
value: function () {
|
|
17020
|
-
var _queryMessageHistory = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
17062
|
+
var _queryMessageHistory = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee115() {
|
|
17021
17063
|
var filter,
|
|
17022
17064
|
sort,
|
|
17023
17065
|
options,
|
|
17024
|
-
|
|
17025
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
17066
|
+
_args115 = arguments;
|
|
17067
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee115$(_context115) {
|
|
17026
17068
|
while (1) {
|
|
17027
|
-
switch (
|
|
17069
|
+
switch (_context115.prev = _context115.next) {
|
|
17028
17070
|
case 0:
|
|
17029
|
-
filter =
|
|
17030
|
-
sort =
|
|
17031
|
-
options =
|
|
17032
|
-
|
|
17071
|
+
filter = _args115.length > 0 && _args115[0] !== undefined ? _args115[0] : {};
|
|
17072
|
+
sort = _args115.length > 1 && _args115[1] !== undefined ? _args115[1] : [];
|
|
17073
|
+
options = _args115.length > 2 && _args115[2] !== undefined ? _args115[2] : {};
|
|
17074
|
+
_context115.next = 5;
|
|
17033
17075
|
return this.post(this.baseURL + '/messages/history', _objectSpread({
|
|
17034
17076
|
filter: filter,
|
|
17035
17077
|
sort: normalizeQuerySort(sort)
|
|
17036
17078
|
}, options));
|
|
17037
17079
|
|
|
17038
17080
|
case 5:
|
|
17039
|
-
return
|
|
17081
|
+
return _context115.abrupt("return", _context115.sent);
|
|
17040
17082
|
|
|
17041
17083
|
case 6:
|
|
17042
17084
|
case "end":
|
|
17043
|
-
return
|
|
17085
|
+
return _context115.stop();
|
|
17044
17086
|
}
|
|
17045
17087
|
}
|
|
17046
|
-
},
|
|
17088
|
+
}, _callee115, this);
|
|
17047
17089
|
}));
|
|
17048
17090
|
|
|
17049
17091
|
function queryMessageHistory() {
|
|
@@ -17064,32 +17106,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
17064
17106
|
}, {
|
|
17065
17107
|
key: "updateFlags",
|
|
17066
17108
|
value: function () {
|
|
17067
|
-
var _updateFlags = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
17109
|
+
var _updateFlags = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee116(message_ids, reviewed_by) {
|
|
17068
17110
|
var options,
|
|
17069
|
-
|
|
17070
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
17111
|
+
_args116 = arguments;
|
|
17112
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee116$(_context116) {
|
|
17071
17113
|
while (1) {
|
|
17072
|
-
switch (
|
|
17114
|
+
switch (_context116.prev = _context116.next) {
|
|
17073
17115
|
case 0:
|
|
17074
|
-
options =
|
|
17075
|
-
|
|
17116
|
+
options = _args116.length > 2 && _args116[2] !== undefined ? _args116[2] : {};
|
|
17117
|
+
_context116.next = 3;
|
|
17076
17118
|
return this.post(this.baseURL + '/automod/v1/moderation/update_flags', _objectSpread({
|
|
17077
17119
|
message_ids: message_ids,
|
|
17078
17120
|
reviewed_by: reviewed_by
|
|
17079
17121
|
}, options));
|
|
17080
17122
|
|
|
17081
17123
|
case 3:
|
|
17082
|
-
return
|
|
17124
|
+
return _context116.abrupt("return", _context116.sent);
|
|
17083
17125
|
|
|
17084
17126
|
case 4:
|
|
17085
17127
|
case "end":
|
|
17086
|
-
return
|
|
17128
|
+
return _context116.stop();
|
|
17087
17129
|
}
|
|
17088
17130
|
}
|
|
17089
|
-
},
|
|
17131
|
+
}, _callee116, this);
|
|
17090
17132
|
}));
|
|
17091
17133
|
|
|
17092
|
-
function updateFlags(
|
|
17134
|
+
function updateFlags(_x177, _x178) {
|
|
17093
17135
|
return _updateFlags.apply(this, arguments);
|
|
17094
17136
|
}
|
|
17095
17137
|
|