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