stream-chat 5.0.1 → 5.1.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/CHANGELOG.md +844 -0
- package/dist/browser.es.js +439 -296
- 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 +439 -296
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +439 -296
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +439 -296
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts +13 -1
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/client.d.ts +35 -5
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/connection_fallback.d.ts +1 -1
- package/dist/types/connection_fallback.d.ts.map +1 -1
- package/dist/types/types.d.ts +79 -1
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +23 -29
- package/src/channel.ts +24 -0
- package/src/client.ts +55 -4
- package/src/connection_fallback.ts +1 -1
- package/src/types.ts +122 -1
package/dist/browser.es.js
CHANGED
|
@@ -88,7 +88,7 @@ var decodeBase64 = function decodeBase64(s) {
|
|
|
88
88
|
|
|
89
89
|
var https = null;
|
|
90
90
|
|
|
91
|
-
function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
91
|
+
function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
92
92
|
|
|
93
93
|
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$7(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
94
94
|
|
|
@@ -700,7 +700,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
700
700
|
return ChannelState;
|
|
701
701
|
}();
|
|
702
702
|
|
|
703
|
-
function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
703
|
+
function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
704
704
|
|
|
705
705
|
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$6(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
706
706
|
|
|
@@ -757,7 +757,7 @@ var isValidEventType = function isValidEventType(eventType) {
|
|
|
757
757
|
return IS_VALID_EVENT_MAP_TYPE[eventType] || false;
|
|
758
758
|
};
|
|
759
759
|
|
|
760
|
-
function _createForOfIteratorHelper$3(o, allowArrayLike) { var it
|
|
760
|
+
function _createForOfIteratorHelper$3(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$3(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function (_e) { function e(_x) { return _e.apply(this, arguments); } e.toString = function () { return _e.toString(); }; return e; }(function (e) { throw e; }), f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function (_e2) { function e(_x2) { return _e2.apply(this, arguments); } e.toString = function () { return _e2.toString(); }; return e; }(function (e) { didErr = true; err = e; }), f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
761
761
|
|
|
762
762
|
function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$3(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$3(o, minLen); }
|
|
763
763
|
|
|
@@ -983,13 +983,13 @@ function removeConnectionEventListeners(cb) {
|
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
985
|
|
|
986
|
-
function _createForOfIteratorHelper$2(o, allowArrayLike) { var it
|
|
986
|
+
function _createForOfIteratorHelper$2(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$2(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
987
987
|
|
|
988
988
|
function _unsupportedIterableToArray$2(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$2(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen); }
|
|
989
989
|
|
|
990
990
|
function _arrayLikeToArray$2(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
991
991
|
|
|
992
|
-
function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
992
|
+
function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
993
993
|
|
|
994
994
|
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$5(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
995
995
|
|
|
@@ -2574,6 +2574,50 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2574
2574
|
|
|
2575
2575
|
return getReplies;
|
|
2576
2576
|
}()
|
|
2577
|
+
/**
|
|
2578
|
+
* getPinnedMessages - List list pinned messages of the channel
|
|
2579
|
+
*
|
|
2580
|
+
* @param {PinnedMessagePaginationOptions & { user?: UserResponse<UserType>; user_id?: string }} options Pagination params, ie {limit:10, id_lte: 10}
|
|
2581
|
+
* @param {PinnedMessagesSort} sort defines sorting direction of pinned messages
|
|
2582
|
+
*
|
|
2583
|
+
* @return {Promise<GetRepliesAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} A response with a list of messages
|
|
2584
|
+
*/
|
|
2585
|
+
|
|
2586
|
+
}, {
|
|
2587
|
+
key: "getPinnedMessages",
|
|
2588
|
+
value: function () {
|
|
2589
|
+
var _getPinnedMessages = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(options) {
|
|
2590
|
+
var sort,
|
|
2591
|
+
_args30 = arguments;
|
|
2592
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
2593
|
+
while (1) {
|
|
2594
|
+
switch (_context30.prev = _context30.next) {
|
|
2595
|
+
case 0:
|
|
2596
|
+
sort = _args30.length > 1 && _args30[1] !== undefined ? _args30[1] : [];
|
|
2597
|
+
_context30.next = 3;
|
|
2598
|
+
return this.getClient().get(this.getClient().baseURL + "/channels/".concat(this.type, "/").concat(this.id, "/pinned_messages"), {
|
|
2599
|
+
payload: _objectSpread$5(_objectSpread$5({}, options), {}, {
|
|
2600
|
+
sort: normalizeQuerySort(sort)
|
|
2601
|
+
})
|
|
2602
|
+
});
|
|
2603
|
+
|
|
2604
|
+
case 3:
|
|
2605
|
+
return _context30.abrupt("return", _context30.sent);
|
|
2606
|
+
|
|
2607
|
+
case 4:
|
|
2608
|
+
case "end":
|
|
2609
|
+
return _context30.stop();
|
|
2610
|
+
}
|
|
2611
|
+
}
|
|
2612
|
+
}, _callee30, this);
|
|
2613
|
+
}));
|
|
2614
|
+
|
|
2615
|
+
function getPinnedMessages(_x29) {
|
|
2616
|
+
return _getPinnedMessages.apply(this, arguments);
|
|
2617
|
+
}
|
|
2618
|
+
|
|
2619
|
+
return getPinnedMessages;
|
|
2620
|
+
}()
|
|
2577
2621
|
/**
|
|
2578
2622
|
* getReactions - List the reactions, supports pagination
|
|
2579
2623
|
*
|
|
@@ -2701,13 +2745,13 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2701
2745
|
* @return {Promise<ChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} Returns a query response
|
|
2702
2746
|
*/
|
|
2703
2747
|
function () {
|
|
2704
|
-
var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2748
|
+
var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(options) {
|
|
2705
2749
|
var queryURL, state, membersStr, tempChannelCid;
|
|
2706
|
-
return _regeneratorRuntime.wrap(function
|
|
2750
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
2707
2751
|
while (1) {
|
|
2708
|
-
switch (
|
|
2752
|
+
switch (_context31.prev = _context31.next) {
|
|
2709
2753
|
case 0:
|
|
2710
|
-
|
|
2754
|
+
_context31.next = 2;
|
|
2711
2755
|
return this.getClient().wsPromise;
|
|
2712
2756
|
|
|
2713
2757
|
case 2:
|
|
@@ -2717,14 +2761,14 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2717
2761
|
queryURL += "/".concat(this.id);
|
|
2718
2762
|
}
|
|
2719
2763
|
|
|
2720
|
-
|
|
2764
|
+
_context31.next = 6;
|
|
2721
2765
|
return this.getClient().post(queryURL + '/query', _objectSpread$5({
|
|
2722
2766
|
data: this._data,
|
|
2723
2767
|
state: true
|
|
2724
2768
|
}, options));
|
|
2725
2769
|
|
|
2726
2770
|
case 6:
|
|
2727
|
-
state =
|
|
2771
|
+
state = _context31.sent;
|
|
2728
2772
|
|
|
2729
2773
|
// update the channel id if it was missing
|
|
2730
2774
|
if (!this.id) {
|
|
@@ -2754,17 +2798,17 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2754
2798
|
|
|
2755
2799
|
this._initializeState(state);
|
|
2756
2800
|
|
|
2757
|
-
return
|
|
2801
|
+
return _context31.abrupt("return", state);
|
|
2758
2802
|
|
|
2759
2803
|
case 11:
|
|
2760
2804
|
case "end":
|
|
2761
|
-
return
|
|
2805
|
+
return _context31.stop();
|
|
2762
2806
|
}
|
|
2763
2807
|
}
|
|
2764
|
-
},
|
|
2808
|
+
}, _callee31, this);
|
|
2765
2809
|
}));
|
|
2766
2810
|
|
|
2767
|
-
function query(
|
|
2811
|
+
function query(_x30) {
|
|
2768
2812
|
return _query.apply(this, arguments);
|
|
2769
2813
|
}
|
|
2770
2814
|
|
|
@@ -2781,31 +2825,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2781
2825
|
}, {
|
|
2782
2826
|
key: "banUser",
|
|
2783
2827
|
value: function () {
|
|
2784
|
-
var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2785
|
-
return _regeneratorRuntime.wrap(function
|
|
2828
|
+
var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(targetUserID, options) {
|
|
2829
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
2786
2830
|
while (1) {
|
|
2787
|
-
switch (
|
|
2831
|
+
switch (_context32.prev = _context32.next) {
|
|
2788
2832
|
case 0:
|
|
2789
2833
|
this._checkInitialized();
|
|
2790
2834
|
|
|
2791
|
-
|
|
2835
|
+
_context32.next = 3;
|
|
2792
2836
|
return this.getClient().banUser(targetUserID, _objectSpread$5(_objectSpread$5({}, options), {}, {
|
|
2793
2837
|
type: this.type,
|
|
2794
2838
|
id: this.id
|
|
2795
2839
|
}));
|
|
2796
2840
|
|
|
2797
2841
|
case 3:
|
|
2798
|
-
return
|
|
2842
|
+
return _context32.abrupt("return", _context32.sent);
|
|
2799
2843
|
|
|
2800
2844
|
case 4:
|
|
2801
2845
|
case "end":
|
|
2802
|
-
return
|
|
2846
|
+
return _context32.stop();
|
|
2803
2847
|
}
|
|
2804
2848
|
}
|
|
2805
|
-
},
|
|
2849
|
+
}, _callee32, this);
|
|
2806
2850
|
}));
|
|
2807
2851
|
|
|
2808
|
-
function banUser(
|
|
2852
|
+
function banUser(_x31, _x32) {
|
|
2809
2853
|
return _banUser.apply(this, arguments);
|
|
2810
2854
|
}
|
|
2811
2855
|
|
|
@@ -2823,34 +2867,34 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2823
2867
|
}, {
|
|
2824
2868
|
key: "hide",
|
|
2825
2869
|
value: function () {
|
|
2826
|
-
var _hide = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2870
|
+
var _hide = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33() {
|
|
2827
2871
|
var userId,
|
|
2828
2872
|
clearHistory,
|
|
2829
|
-
|
|
2830
|
-
return _regeneratorRuntime.wrap(function
|
|
2873
|
+
_args33 = arguments;
|
|
2874
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
2831
2875
|
while (1) {
|
|
2832
|
-
switch (
|
|
2876
|
+
switch (_context33.prev = _context33.next) {
|
|
2833
2877
|
case 0:
|
|
2834
|
-
userId =
|
|
2835
|
-
clearHistory =
|
|
2878
|
+
userId = _args33.length > 0 && _args33[0] !== undefined ? _args33[0] : null;
|
|
2879
|
+
clearHistory = _args33.length > 1 && _args33[1] !== undefined ? _args33[1] : false;
|
|
2836
2880
|
|
|
2837
2881
|
this._checkInitialized();
|
|
2838
2882
|
|
|
2839
|
-
|
|
2883
|
+
_context33.next = 5;
|
|
2840
2884
|
return this.getClient().post("".concat(this._channelURL(), "/hide"), {
|
|
2841
2885
|
user_id: userId,
|
|
2842
2886
|
clear_history: clearHistory
|
|
2843
2887
|
});
|
|
2844
2888
|
|
|
2845
2889
|
case 5:
|
|
2846
|
-
return
|
|
2890
|
+
return _context33.abrupt("return", _context33.sent);
|
|
2847
2891
|
|
|
2848
2892
|
case 6:
|
|
2849
2893
|
case "end":
|
|
2850
|
-
return
|
|
2894
|
+
return _context33.stop();
|
|
2851
2895
|
}
|
|
2852
2896
|
}
|
|
2853
|
-
},
|
|
2897
|
+
}, _callee33, this);
|
|
2854
2898
|
}));
|
|
2855
2899
|
|
|
2856
2900
|
function hide() {
|
|
@@ -2869,31 +2913,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2869
2913
|
}, {
|
|
2870
2914
|
key: "show",
|
|
2871
2915
|
value: function () {
|
|
2872
|
-
var _show = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2916
|
+
var _show = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34() {
|
|
2873
2917
|
var userId,
|
|
2874
|
-
|
|
2875
|
-
return _regeneratorRuntime.wrap(function
|
|
2918
|
+
_args34 = arguments;
|
|
2919
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
2876
2920
|
while (1) {
|
|
2877
|
-
switch (
|
|
2921
|
+
switch (_context34.prev = _context34.next) {
|
|
2878
2922
|
case 0:
|
|
2879
|
-
userId =
|
|
2923
|
+
userId = _args34.length > 0 && _args34[0] !== undefined ? _args34[0] : null;
|
|
2880
2924
|
|
|
2881
2925
|
this._checkInitialized();
|
|
2882
2926
|
|
|
2883
|
-
|
|
2927
|
+
_context34.next = 4;
|
|
2884
2928
|
return this.getClient().post("".concat(this._channelURL(), "/show"), {
|
|
2885
2929
|
user_id: userId
|
|
2886
2930
|
});
|
|
2887
2931
|
|
|
2888
2932
|
case 4:
|
|
2889
|
-
return
|
|
2933
|
+
return _context34.abrupt("return", _context34.sent);
|
|
2890
2934
|
|
|
2891
2935
|
case 5:
|
|
2892
2936
|
case "end":
|
|
2893
|
-
return
|
|
2937
|
+
return _context34.stop();
|
|
2894
2938
|
}
|
|
2895
2939
|
}
|
|
2896
|
-
},
|
|
2940
|
+
}, _callee34, this);
|
|
2897
2941
|
}));
|
|
2898
2942
|
|
|
2899
2943
|
function show() {
|
|
@@ -2912,31 +2956,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2912
2956
|
}, {
|
|
2913
2957
|
key: "unbanUser",
|
|
2914
2958
|
value: function () {
|
|
2915
|
-
var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2916
|
-
return _regeneratorRuntime.wrap(function
|
|
2959
|
+
var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(targetUserID) {
|
|
2960
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
2917
2961
|
while (1) {
|
|
2918
|
-
switch (
|
|
2962
|
+
switch (_context35.prev = _context35.next) {
|
|
2919
2963
|
case 0:
|
|
2920
2964
|
this._checkInitialized();
|
|
2921
2965
|
|
|
2922
|
-
|
|
2966
|
+
_context35.next = 3;
|
|
2923
2967
|
return this.getClient().unbanUser(targetUserID, {
|
|
2924
2968
|
type: this.type,
|
|
2925
2969
|
id: this.id
|
|
2926
2970
|
});
|
|
2927
2971
|
|
|
2928
2972
|
case 3:
|
|
2929
|
-
return
|
|
2973
|
+
return _context35.abrupt("return", _context35.sent);
|
|
2930
2974
|
|
|
2931
2975
|
case 4:
|
|
2932
2976
|
case "end":
|
|
2933
|
-
return
|
|
2977
|
+
return _context35.stop();
|
|
2934
2978
|
}
|
|
2935
2979
|
}
|
|
2936
|
-
},
|
|
2980
|
+
}, _callee35, this);
|
|
2937
2981
|
}));
|
|
2938
2982
|
|
|
2939
|
-
function unbanUser(
|
|
2983
|
+
function unbanUser(_x33) {
|
|
2940
2984
|
return _unbanUser.apply(this, arguments);
|
|
2941
2985
|
}
|
|
2942
2986
|
|
|
@@ -2953,31 +2997,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2953
2997
|
}, {
|
|
2954
2998
|
key: "shadowBan",
|
|
2955
2999
|
value: function () {
|
|
2956
|
-
var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2957
|
-
return _regeneratorRuntime.wrap(function
|
|
3000
|
+
var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(targetUserID, options) {
|
|
3001
|
+
return _regeneratorRuntime.wrap(function _callee36$(_context36) {
|
|
2958
3002
|
while (1) {
|
|
2959
|
-
switch (
|
|
3003
|
+
switch (_context36.prev = _context36.next) {
|
|
2960
3004
|
case 0:
|
|
2961
3005
|
this._checkInitialized();
|
|
2962
3006
|
|
|
2963
|
-
|
|
3007
|
+
_context36.next = 3;
|
|
2964
3008
|
return this.getClient().shadowBan(targetUserID, _objectSpread$5(_objectSpread$5({}, options), {}, {
|
|
2965
3009
|
type: this.type,
|
|
2966
3010
|
id: this.id
|
|
2967
3011
|
}));
|
|
2968
3012
|
|
|
2969
3013
|
case 3:
|
|
2970
|
-
return
|
|
3014
|
+
return _context36.abrupt("return", _context36.sent);
|
|
2971
3015
|
|
|
2972
3016
|
case 4:
|
|
2973
3017
|
case "end":
|
|
2974
|
-
return
|
|
3018
|
+
return _context36.stop();
|
|
2975
3019
|
}
|
|
2976
3020
|
}
|
|
2977
|
-
},
|
|
3021
|
+
}, _callee36, this);
|
|
2978
3022
|
}));
|
|
2979
3023
|
|
|
2980
|
-
function shadowBan(
|
|
3024
|
+
function shadowBan(_x34, _x35) {
|
|
2981
3025
|
return _shadowBan.apply(this, arguments);
|
|
2982
3026
|
}
|
|
2983
3027
|
|
|
@@ -2993,31 +3037,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2993
3037
|
}, {
|
|
2994
3038
|
key: "removeShadowBan",
|
|
2995
3039
|
value: function () {
|
|
2996
|
-
var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2997
|
-
return _regeneratorRuntime.wrap(function
|
|
3040
|
+
var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(targetUserID) {
|
|
3041
|
+
return _regeneratorRuntime.wrap(function _callee37$(_context37) {
|
|
2998
3042
|
while (1) {
|
|
2999
|
-
switch (
|
|
3043
|
+
switch (_context37.prev = _context37.next) {
|
|
3000
3044
|
case 0:
|
|
3001
3045
|
this._checkInitialized();
|
|
3002
3046
|
|
|
3003
|
-
|
|
3047
|
+
_context37.next = 3;
|
|
3004
3048
|
return this.getClient().removeShadowBan(targetUserID, {
|
|
3005
3049
|
type: this.type,
|
|
3006
3050
|
id: this.id
|
|
3007
3051
|
});
|
|
3008
3052
|
|
|
3009
3053
|
case 3:
|
|
3010
|
-
return
|
|
3054
|
+
return _context37.abrupt("return", _context37.sent);
|
|
3011
3055
|
|
|
3012
3056
|
case 4:
|
|
3013
3057
|
case "end":
|
|
3014
|
-
return
|
|
3058
|
+
return _context37.stop();
|
|
3015
3059
|
}
|
|
3016
3060
|
}
|
|
3017
|
-
},
|
|
3061
|
+
}, _callee37, this);
|
|
3018
3062
|
}));
|
|
3019
3063
|
|
|
3020
|
-
function removeShadowBan(
|
|
3064
|
+
function removeShadowBan(_x36) {
|
|
3021
3065
|
return _removeShadowBan.apply(this, arguments);
|
|
3022
3066
|
}
|
|
3023
3067
|
|
|
@@ -3426,7 +3470,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3426
3470
|
return Channel;
|
|
3427
3471
|
}();
|
|
3428
3472
|
|
|
3429
|
-
function _createForOfIteratorHelper$1(o, allowArrayLike) { var it
|
|
3473
|
+
function _createForOfIteratorHelper$1(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
3430
3474
|
|
|
3431
3475
|
function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
|
|
3432
3476
|
|
|
@@ -3501,7 +3545,7 @@ var ClientState = /*#__PURE__*/function () {
|
|
|
3501
3545
|
return ClientState;
|
|
3502
3546
|
}();
|
|
3503
3547
|
|
|
3504
|
-
function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
3548
|
+
function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
3505
3549
|
|
|
3506
3550
|
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$4(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
3507
3551
|
var InsightMetrics = function InsightMetrics() {
|
|
@@ -3615,7 +3659,7 @@ function buildWsSuccessAfterFailureInsight(connection) {
|
|
|
3615
3659
|
return buildWsBaseInsight(connection);
|
|
3616
3660
|
}
|
|
3617
3661
|
|
|
3618
|
-
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
3662
|
+
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
3619
3663
|
|
|
3620
3664
|
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$3(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
3621
3665
|
|
|
@@ -4537,7 +4581,7 @@ var jwt = null;
|
|
|
4537
4581
|
|
|
4538
4582
|
var crypto$1 = null;
|
|
4539
4583
|
|
|
4540
|
-
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
4584
|
+
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
4541
4585
|
|
|
4542
4586
|
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4543
4587
|
|
|
@@ -4946,7 +4990,7 @@ function isWSFailure(err) {
|
|
|
4946
4990
|
}
|
|
4947
4991
|
}
|
|
4948
4992
|
|
|
4949
|
-
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
4993
|
+
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
4950
4994
|
|
|
4951
4995
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4952
4996
|
var ConnectionState;
|
|
@@ -5223,7 +5267,7 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5223
5267
|
})));
|
|
5224
5268
|
|
|
5225
5269
|
_defineProperty(this, "isHealthy", function () {
|
|
5226
|
-
return _this.connectionID && _this.state === ConnectionState.Connected;
|
|
5270
|
+
return !!_this.connectionID && _this.state === ConnectionState.Connected;
|
|
5227
5271
|
});
|
|
5228
5272
|
|
|
5229
5273
|
_defineProperty(this, "disconnect", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
|
@@ -5322,13 +5366,15 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5322
5366
|
return WSConnectionFallback;
|
|
5323
5367
|
}();
|
|
5324
5368
|
|
|
5325
|
-
|
|
5369
|
+
var _excluded = ["created_at", "updated_at", "last_active", "online"];
|
|
5370
|
+
|
|
5371
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
5326
5372
|
|
|
5327
5373
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5328
5374
|
|
|
5329
5375
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
5330
5376
|
|
|
5331
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
5377
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
5332
5378
|
|
|
5333
5379
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
5334
5380
|
|
|
@@ -6633,7 +6679,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6633
6679
|
case 11:
|
|
6634
6680
|
this.anonymous = false; // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6635
6681
|
|
|
6636
|
-
_response$user = response.user, _response$user.created_at, _response$user.updated_at, _response$user.last_active, _response$user.online, guestUser = _objectWithoutProperties(_response$user,
|
|
6682
|
+
_response$user = response.user, _response$user.created_at, _response$user.updated_at, _response$user.last_active, _response$user.online, guestUser = _objectWithoutProperties(_response$user, _excluded);
|
|
6637
6683
|
_context14.next = 15;
|
|
6638
6684
|
return this.connectUser(guestUser, response.access_token);
|
|
6639
6685
|
|
|
@@ -8461,6 +8507,101 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8461
8507
|
|
|
8462
8508
|
return unflagUser;
|
|
8463
8509
|
}()
|
|
8510
|
+
/**
|
|
8511
|
+
* _queryFlagReports - Query flag reports.
|
|
8512
|
+
*
|
|
8513
|
+
* Note: Do not use this.
|
|
8514
|
+
* It is present for internal usage only.
|
|
8515
|
+
* This function can, and will, break and/or be removed at any point in time.
|
|
8516
|
+
*
|
|
8517
|
+
* @param {FlagReportsFilters} filterConditions MongoDB style filter conditions
|
|
8518
|
+
* @param {FlagReportsPaginationOptions} options Option object, {limit: 10, offset:0}
|
|
8519
|
+
*
|
|
8520
|
+
* @return {Promise<FlagReportsResponse<ChannelType, CommandType, UserType>>} Flag Reports Response
|
|
8521
|
+
*/
|
|
8522
|
+
|
|
8523
|
+
}, {
|
|
8524
|
+
key: "_queryFlagReports",
|
|
8525
|
+
value: function () {
|
|
8526
|
+
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42() {
|
|
8527
|
+
var filterConditions,
|
|
8528
|
+
options,
|
|
8529
|
+
_args42 = arguments;
|
|
8530
|
+
return _regeneratorRuntime.wrap(function _callee42$(_context42) {
|
|
8531
|
+
while (1) {
|
|
8532
|
+
switch (_context42.prev = _context42.next) {
|
|
8533
|
+
case 0:
|
|
8534
|
+
filterConditions = _args42.length > 0 && _args42[0] !== undefined ? _args42[0] : {};
|
|
8535
|
+
options = _args42.length > 1 && _args42[1] !== undefined ? _args42[1] : {};
|
|
8536
|
+
_context42.next = 4;
|
|
8537
|
+
return this.post(this.baseURL + '/moderation/reports', _objectSpread({
|
|
8538
|
+
filter_conditions: filterConditions
|
|
8539
|
+
}, options));
|
|
8540
|
+
|
|
8541
|
+
case 4:
|
|
8542
|
+
return _context42.abrupt("return", _context42.sent);
|
|
8543
|
+
|
|
8544
|
+
case 5:
|
|
8545
|
+
case "end":
|
|
8546
|
+
return _context42.stop();
|
|
8547
|
+
}
|
|
8548
|
+
}
|
|
8549
|
+
}, _callee42, this);
|
|
8550
|
+
}));
|
|
8551
|
+
|
|
8552
|
+
function _queryFlagReports() {
|
|
8553
|
+
return _queryFlagReports2.apply(this, arguments);
|
|
8554
|
+
}
|
|
8555
|
+
|
|
8556
|
+
return _queryFlagReports;
|
|
8557
|
+
}()
|
|
8558
|
+
/**
|
|
8559
|
+
* _reviewFlagReport - review flag report
|
|
8560
|
+
*
|
|
8561
|
+
* Note: Do not use this.
|
|
8562
|
+
* It is present for internal usage only.
|
|
8563
|
+
* This function can, and will, break and/or be removed at any point in time.
|
|
8564
|
+
*
|
|
8565
|
+
* @param {string} [id] flag report to review
|
|
8566
|
+
* @param {string} [reviewResult] flag report review result
|
|
8567
|
+
* @param {string} [options.user_id] currentUserID, only used with serverside auth
|
|
8568
|
+
* @param {string} [options.review_details] custom information about review result
|
|
8569
|
+
* @returns {Promise<ReviewFlagReportResponse>>}
|
|
8570
|
+
*/
|
|
8571
|
+
|
|
8572
|
+
}, {
|
|
8573
|
+
key: "_reviewFlagReport",
|
|
8574
|
+
value: function () {
|
|
8575
|
+
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(id, reviewResult) {
|
|
8576
|
+
var options,
|
|
8577
|
+
_args43 = arguments;
|
|
8578
|
+
return _regeneratorRuntime.wrap(function _callee43$(_context43) {
|
|
8579
|
+
while (1) {
|
|
8580
|
+
switch (_context43.prev = _context43.next) {
|
|
8581
|
+
case 0:
|
|
8582
|
+
options = _args43.length > 2 && _args43[2] !== undefined ? _args43[2] : {};
|
|
8583
|
+
_context43.next = 3;
|
|
8584
|
+
return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
|
|
8585
|
+
review_result: reviewResult
|
|
8586
|
+
}, options));
|
|
8587
|
+
|
|
8588
|
+
case 3:
|
|
8589
|
+
return _context43.abrupt("return", _context43.sent);
|
|
8590
|
+
|
|
8591
|
+
case 4:
|
|
8592
|
+
case "end":
|
|
8593
|
+
return _context43.stop();
|
|
8594
|
+
}
|
|
8595
|
+
}
|
|
8596
|
+
}, _callee43, this);
|
|
8597
|
+
}));
|
|
8598
|
+
|
|
8599
|
+
function _reviewFlagReport(_x54, _x55) {
|
|
8600
|
+
return _reviewFlagReport2.apply(this, arguments);
|
|
8601
|
+
}
|
|
8602
|
+
|
|
8603
|
+
return _reviewFlagReport;
|
|
8604
|
+
}()
|
|
8464
8605
|
/**
|
|
8465
8606
|
* @deprecated use markChannelsRead instead
|
|
8466
8607
|
*
|
|
@@ -8482,23 +8623,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8482
8623
|
* @return {Promise<APIResponse>}
|
|
8483
8624
|
*/
|
|
8484
8625
|
function () {
|
|
8485
|
-
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8626
|
+
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44() {
|
|
8486
8627
|
var data,
|
|
8487
|
-
|
|
8488
|
-
return _regeneratorRuntime.wrap(function
|
|
8628
|
+
_args44 = arguments;
|
|
8629
|
+
return _regeneratorRuntime.wrap(function _callee44$(_context44) {
|
|
8489
8630
|
while (1) {
|
|
8490
|
-
switch (
|
|
8631
|
+
switch (_context44.prev = _context44.next) {
|
|
8491
8632
|
case 0:
|
|
8492
|
-
data =
|
|
8493
|
-
|
|
8633
|
+
data = _args44.length > 0 && _args44[0] !== undefined ? _args44[0] : {};
|
|
8634
|
+
_context44.next = 3;
|
|
8494
8635
|
return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
|
|
8495
8636
|
|
|
8496
8637
|
case 3:
|
|
8497
8638
|
case "end":
|
|
8498
|
-
return
|
|
8639
|
+
return _context44.stop();
|
|
8499
8640
|
}
|
|
8500
8641
|
}
|
|
8501
|
-
},
|
|
8642
|
+
}, _callee44, this);
|
|
8502
8643
|
}));
|
|
8503
8644
|
|
|
8504
8645
|
function markChannelsRead() {
|
|
@@ -8573,28 +8714,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8573
8714
|
}, {
|
|
8574
8715
|
key: "translateMessage",
|
|
8575
8716
|
value: function () {
|
|
8576
|
-
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8577
|
-
return _regeneratorRuntime.wrap(function
|
|
8717
|
+
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(messageId, language) {
|
|
8718
|
+
return _regeneratorRuntime.wrap(function _callee45$(_context45) {
|
|
8578
8719
|
while (1) {
|
|
8579
|
-
switch (
|
|
8720
|
+
switch (_context45.prev = _context45.next) {
|
|
8580
8721
|
case 0:
|
|
8581
|
-
|
|
8722
|
+
_context45.next = 2;
|
|
8582
8723
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
|
|
8583
8724
|
language: language
|
|
8584
8725
|
});
|
|
8585
8726
|
|
|
8586
8727
|
case 2:
|
|
8587
|
-
return
|
|
8728
|
+
return _context45.abrupt("return", _context45.sent);
|
|
8588
8729
|
|
|
8589
8730
|
case 3:
|
|
8590
8731
|
case "end":
|
|
8591
|
-
return
|
|
8732
|
+
return _context45.stop();
|
|
8592
8733
|
}
|
|
8593
8734
|
}
|
|
8594
|
-
},
|
|
8735
|
+
}, _callee45, this);
|
|
8595
8736
|
}));
|
|
8596
8737
|
|
|
8597
|
-
function translateMessage(
|
|
8738
|
+
function translateMessage(_x56, _x57) {
|
|
8598
8739
|
return _translateMessage.apply(this, arguments);
|
|
8599
8740
|
}
|
|
8600
8741
|
|
|
@@ -8608,7 +8749,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8608
8749
|
}, {
|
|
8609
8750
|
key: "_normalizeExpiration",
|
|
8610
8751
|
value: function _normalizeExpiration(timeoutOrExpirationDate) {
|
|
8611
|
-
var pinExpires;
|
|
8752
|
+
var pinExpires = null;
|
|
8612
8753
|
|
|
8613
8754
|
if (typeof timeoutOrExpirationDate === 'number') {
|
|
8614
8755
|
var now = new Date();
|
|
@@ -8649,20 +8790,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8649
8790
|
* pinMessage - pins the message
|
|
8650
8791
|
* @param {string | { id: string }} messageOrMessageId message object or message id
|
|
8651
8792
|
* @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
|
|
8652
|
-
* @param {string | { id: string }} [
|
|
8793
|
+
* @param {undefined|string | { id: string }} [pinnedBy] who will appear as a user who pinned a message. Only for server-side use. Provide `undefined` when pinning message client-side
|
|
8794
|
+
* @param {undefined|number|string|Date} pinnedAt date when message should be pinned. It affects the order of pinned messages. Use negative number to set relative time in the past, string or Date to set exact date of pin
|
|
8653
8795
|
*/
|
|
8654
8796
|
|
|
8655
8797
|
}, {
|
|
8656
8798
|
key: "pinMessage",
|
|
8657
|
-
value: function pinMessage(messageOrMessageId, timeoutOrExpirationDate,
|
|
8799
|
+
value: function pinMessage(messageOrMessageId, timeoutOrExpirationDate, pinnedBy, pinnedAt) {
|
|
8658
8800
|
var messageId = this._validateAndGetMessageId(messageOrMessageId, 'Please specify the message id when calling unpinMessage');
|
|
8659
8801
|
|
|
8660
8802
|
return this.partialUpdateMessage(messageId, {
|
|
8661
8803
|
set: {
|
|
8662
8804
|
pinned: true,
|
|
8663
|
-
pin_expires: this._normalizeExpiration(timeoutOrExpirationDate)
|
|
8805
|
+
pin_expires: this._normalizeExpiration(timeoutOrExpirationDate),
|
|
8806
|
+
pinned_at: this._normalizeExpiration(pinnedAt)
|
|
8664
8807
|
}
|
|
8665
|
-
},
|
|
8808
|
+
}, pinnedBy);
|
|
8666
8809
|
}
|
|
8667
8810
|
/**
|
|
8668
8811
|
* unpinMessage - unpins the message that was previously pinned
|
|
@@ -8694,14 +8837,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8694
8837
|
}, {
|
|
8695
8838
|
key: "updateMessage",
|
|
8696
8839
|
value: function () {
|
|
8697
|
-
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8840
|
+
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(message, userId, options) {
|
|
8698
8841
|
var clonedMessage, reservedMessageFields;
|
|
8699
|
-
return _regeneratorRuntime.wrap(function
|
|
8842
|
+
return _regeneratorRuntime.wrap(function _callee46$(_context46) {
|
|
8700
8843
|
while (1) {
|
|
8701
|
-
switch (
|
|
8844
|
+
switch (_context46.prev = _context46.next) {
|
|
8702
8845
|
case 0:
|
|
8703
8846
|
if (message.id) {
|
|
8704
|
-
|
|
8847
|
+
_context46.next = 2;
|
|
8705
8848
|
break;
|
|
8706
8849
|
}
|
|
8707
8850
|
|
|
@@ -8738,23 +8881,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8738
8881
|
});
|
|
8739
8882
|
}
|
|
8740
8883
|
|
|
8741
|
-
|
|
8884
|
+
_context46.next = 10;
|
|
8742
8885
|
return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
|
|
8743
8886
|
message: clonedMessage
|
|
8744
8887
|
}, options));
|
|
8745
8888
|
|
|
8746
8889
|
case 10:
|
|
8747
|
-
return
|
|
8890
|
+
return _context46.abrupt("return", _context46.sent);
|
|
8748
8891
|
|
|
8749
8892
|
case 11:
|
|
8750
8893
|
case "end":
|
|
8751
|
-
return
|
|
8894
|
+
return _context46.stop();
|
|
8752
8895
|
}
|
|
8753
8896
|
}
|
|
8754
|
-
},
|
|
8897
|
+
}, _callee46, this);
|
|
8755
8898
|
}));
|
|
8756
8899
|
|
|
8757
|
-
function updateMessage(
|
|
8900
|
+
function updateMessage(_x58, _x59, _x60) {
|
|
8758
8901
|
return _updateMessage.apply(this, arguments);
|
|
8759
8902
|
}
|
|
8760
8903
|
|
|
@@ -8777,14 +8920,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8777
8920
|
}, {
|
|
8778
8921
|
key: "partialUpdateMessage",
|
|
8779
8922
|
value: function () {
|
|
8780
|
-
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8923
|
+
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(id, partialMessageObject, userId, options) {
|
|
8781
8924
|
var user;
|
|
8782
|
-
return _regeneratorRuntime.wrap(function
|
|
8925
|
+
return _regeneratorRuntime.wrap(function _callee47$(_context47) {
|
|
8783
8926
|
while (1) {
|
|
8784
|
-
switch (
|
|
8927
|
+
switch (_context47.prev = _context47.next) {
|
|
8785
8928
|
case 0:
|
|
8786
8929
|
if (id) {
|
|
8787
|
-
|
|
8930
|
+
_context47.next = 2;
|
|
8788
8931
|
break;
|
|
8789
8932
|
}
|
|
8790
8933
|
|
|
@@ -8799,23 +8942,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8799
8942
|
};
|
|
8800
8943
|
}
|
|
8801
8944
|
|
|
8802
|
-
|
|
8945
|
+
_context47.next = 6;
|
|
8803
8946
|
return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
8804
8947
|
user: user
|
|
8805
8948
|
}));
|
|
8806
8949
|
|
|
8807
8950
|
case 6:
|
|
8808
|
-
return
|
|
8951
|
+
return _context47.abrupt("return", _context47.sent);
|
|
8809
8952
|
|
|
8810
8953
|
case 7:
|
|
8811
8954
|
case "end":
|
|
8812
|
-
return
|
|
8955
|
+
return _context47.stop();
|
|
8813
8956
|
}
|
|
8814
8957
|
}
|
|
8815
|
-
},
|
|
8958
|
+
}, _callee47, this);
|
|
8816
8959
|
}));
|
|
8817
8960
|
|
|
8818
|
-
function partialUpdateMessage(
|
|
8961
|
+
function partialUpdateMessage(_x61, _x62, _x63, _x64) {
|
|
8819
8962
|
return _partialUpdateMessage.apply(this, arguments);
|
|
8820
8963
|
}
|
|
8821
8964
|
|
|
@@ -8824,11 +8967,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8824
8967
|
}, {
|
|
8825
8968
|
key: "deleteMessage",
|
|
8826
8969
|
value: function () {
|
|
8827
|
-
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8970
|
+
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(messageID, hardDelete) {
|
|
8828
8971
|
var params;
|
|
8829
|
-
return _regeneratorRuntime.wrap(function
|
|
8972
|
+
return _regeneratorRuntime.wrap(function _callee48$(_context48) {
|
|
8830
8973
|
while (1) {
|
|
8831
|
-
switch (
|
|
8974
|
+
switch (_context48.prev = _context48.next) {
|
|
8832
8975
|
case 0:
|
|
8833
8976
|
params = {};
|
|
8834
8977
|
|
|
@@ -8838,21 +8981,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8838
8981
|
};
|
|
8839
8982
|
}
|
|
8840
8983
|
|
|
8841
|
-
|
|
8984
|
+
_context48.next = 4;
|
|
8842
8985
|
return this.delete(this.baseURL + "/messages/".concat(messageID), params);
|
|
8843
8986
|
|
|
8844
8987
|
case 4:
|
|
8845
|
-
return
|
|
8988
|
+
return _context48.abrupt("return", _context48.sent);
|
|
8846
8989
|
|
|
8847
8990
|
case 5:
|
|
8848
8991
|
case "end":
|
|
8849
|
-
return
|
|
8992
|
+
return _context48.stop();
|
|
8850
8993
|
}
|
|
8851
8994
|
}
|
|
8852
|
-
},
|
|
8995
|
+
}, _callee48, this);
|
|
8853
8996
|
}));
|
|
8854
8997
|
|
|
8855
|
-
function deleteMessage(
|
|
8998
|
+
function deleteMessage(_x65, _x66) {
|
|
8856
8999
|
return _deleteMessage.apply(this, arguments);
|
|
8857
9000
|
}
|
|
8858
9001
|
|
|
@@ -8861,26 +9004,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8861
9004
|
}, {
|
|
8862
9005
|
key: "getMessage",
|
|
8863
9006
|
value: function () {
|
|
8864
|
-
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8865
|
-
return _regeneratorRuntime.wrap(function
|
|
9007
|
+
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(messageID) {
|
|
9008
|
+
return _regeneratorRuntime.wrap(function _callee49$(_context49) {
|
|
8866
9009
|
while (1) {
|
|
8867
|
-
switch (
|
|
9010
|
+
switch (_context49.prev = _context49.next) {
|
|
8868
9011
|
case 0:
|
|
8869
|
-
|
|
9012
|
+
_context49.next = 2;
|
|
8870
9013
|
return this.get(this.baseURL + "/messages/".concat(messageID));
|
|
8871
9014
|
|
|
8872
9015
|
case 2:
|
|
8873
|
-
return
|
|
9016
|
+
return _context49.abrupt("return", _context49.sent);
|
|
8874
9017
|
|
|
8875
9018
|
case 3:
|
|
8876
9019
|
case "end":
|
|
8877
|
-
return
|
|
9020
|
+
return _context49.stop();
|
|
8878
9021
|
}
|
|
8879
9022
|
}
|
|
8880
|
-
},
|
|
9023
|
+
}, _callee49, this);
|
|
8881
9024
|
}));
|
|
8882
9025
|
|
|
8883
|
-
function getMessage(
|
|
9026
|
+
function getMessage(_x67) {
|
|
8884
9027
|
return _getMessage.apply(this, arguments);
|
|
8885
9028
|
}
|
|
8886
9029
|
|
|
@@ -8889,7 +9032,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8889
9032
|
}, {
|
|
8890
9033
|
key: "getUserAgent",
|
|
8891
9034
|
value: function getUserAgent() {
|
|
8892
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.0
|
|
9035
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.1.0");
|
|
8893
9036
|
}
|
|
8894
9037
|
}, {
|
|
8895
9038
|
key: "setUserAgent",
|
|
@@ -9084,28 +9227,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9084
9227
|
}, {
|
|
9085
9228
|
key: "sendUserCustomEvent",
|
|
9086
9229
|
value: function () {
|
|
9087
|
-
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9088
|
-
return _regeneratorRuntime.wrap(function
|
|
9230
|
+
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(targetUserID, event) {
|
|
9231
|
+
return _regeneratorRuntime.wrap(function _callee50$(_context50) {
|
|
9089
9232
|
while (1) {
|
|
9090
|
-
switch (
|
|
9233
|
+
switch (_context50.prev = _context50.next) {
|
|
9091
9234
|
case 0:
|
|
9092
|
-
|
|
9235
|
+
_context50.next = 2;
|
|
9093
9236
|
return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
|
|
9094
9237
|
event: event
|
|
9095
9238
|
});
|
|
9096
9239
|
|
|
9097
9240
|
case 2:
|
|
9098
|
-
return
|
|
9241
|
+
return _context50.abrupt("return", _context50.sent);
|
|
9099
9242
|
|
|
9100
9243
|
case 3:
|
|
9101
9244
|
case "end":
|
|
9102
|
-
return
|
|
9245
|
+
return _context50.stop();
|
|
9103
9246
|
}
|
|
9104
9247
|
}
|
|
9105
|
-
},
|
|
9248
|
+
}, _callee50, this);
|
|
9106
9249
|
}));
|
|
9107
9250
|
|
|
9108
|
-
function sendUserCustomEvent(
|
|
9251
|
+
function sendUserCustomEvent(_x68, _x69) {
|
|
9109
9252
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
9110
9253
|
}
|
|
9111
9254
|
|
|
@@ -9168,32 +9311,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9168
9311
|
}, {
|
|
9169
9312
|
key: "createSegment",
|
|
9170
9313
|
value: function () {
|
|
9171
|
-
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9314
|
+
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(params) {
|
|
9172
9315
|
var _yield$this$post, segment;
|
|
9173
9316
|
|
|
9174
|
-
return _regeneratorRuntime.wrap(function
|
|
9317
|
+
return _regeneratorRuntime.wrap(function _callee51$(_context51) {
|
|
9175
9318
|
while (1) {
|
|
9176
|
-
switch (
|
|
9319
|
+
switch (_context51.prev = _context51.next) {
|
|
9177
9320
|
case 0:
|
|
9178
|
-
|
|
9321
|
+
_context51.next = 2;
|
|
9179
9322
|
return this.post(this.baseURL + "/segments", {
|
|
9180
9323
|
segment: params
|
|
9181
9324
|
});
|
|
9182
9325
|
|
|
9183
9326
|
case 2:
|
|
9184
|
-
_yield$this$post =
|
|
9327
|
+
_yield$this$post = _context51.sent;
|
|
9185
9328
|
segment = _yield$this$post.segment;
|
|
9186
|
-
return
|
|
9329
|
+
return _context51.abrupt("return", segment);
|
|
9187
9330
|
|
|
9188
9331
|
case 5:
|
|
9189
9332
|
case "end":
|
|
9190
|
-
return
|
|
9333
|
+
return _context51.stop();
|
|
9191
9334
|
}
|
|
9192
9335
|
}
|
|
9193
|
-
},
|
|
9336
|
+
}, _callee51, this);
|
|
9194
9337
|
}));
|
|
9195
9338
|
|
|
9196
|
-
function createSegment(
|
|
9339
|
+
function createSegment(_x70) {
|
|
9197
9340
|
return _createSegment.apply(this, arguments);
|
|
9198
9341
|
}
|
|
9199
9342
|
|
|
@@ -9210,30 +9353,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9210
9353
|
}, {
|
|
9211
9354
|
key: "getSegment",
|
|
9212
9355
|
value: function () {
|
|
9213
|
-
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9356
|
+
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(id) {
|
|
9214
9357
|
var _yield$this$get, segment;
|
|
9215
9358
|
|
|
9216
|
-
return _regeneratorRuntime.wrap(function
|
|
9359
|
+
return _regeneratorRuntime.wrap(function _callee52$(_context52) {
|
|
9217
9360
|
while (1) {
|
|
9218
|
-
switch (
|
|
9361
|
+
switch (_context52.prev = _context52.next) {
|
|
9219
9362
|
case 0:
|
|
9220
|
-
|
|
9363
|
+
_context52.next = 2;
|
|
9221
9364
|
return this.get(this.baseURL + "/segments/".concat(id));
|
|
9222
9365
|
|
|
9223
9366
|
case 2:
|
|
9224
|
-
_yield$this$get =
|
|
9367
|
+
_yield$this$get = _context52.sent;
|
|
9225
9368
|
segment = _yield$this$get.segment;
|
|
9226
|
-
return
|
|
9369
|
+
return _context52.abrupt("return", segment);
|
|
9227
9370
|
|
|
9228
9371
|
case 5:
|
|
9229
9372
|
case "end":
|
|
9230
|
-
return
|
|
9373
|
+
return _context52.stop();
|
|
9231
9374
|
}
|
|
9232
9375
|
}
|
|
9233
|
-
},
|
|
9376
|
+
}, _callee52, this);
|
|
9234
9377
|
}));
|
|
9235
9378
|
|
|
9236
|
-
function getSegment(
|
|
9379
|
+
function getSegment(_x71) {
|
|
9237
9380
|
return _getSegment.apply(this, arguments);
|
|
9238
9381
|
}
|
|
9239
9382
|
|
|
@@ -9249,30 +9392,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9249
9392
|
}, {
|
|
9250
9393
|
key: "listSegments",
|
|
9251
9394
|
value: function () {
|
|
9252
|
-
var _listSegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9395
|
+
var _listSegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(options) {
|
|
9253
9396
|
var _yield$this$get2, segments;
|
|
9254
9397
|
|
|
9255
|
-
return _regeneratorRuntime.wrap(function
|
|
9398
|
+
return _regeneratorRuntime.wrap(function _callee53$(_context53) {
|
|
9256
9399
|
while (1) {
|
|
9257
|
-
switch (
|
|
9400
|
+
switch (_context53.prev = _context53.next) {
|
|
9258
9401
|
case 0:
|
|
9259
|
-
|
|
9402
|
+
_context53.next = 2;
|
|
9260
9403
|
return this.get(this.baseURL + "/segments", options);
|
|
9261
9404
|
|
|
9262
9405
|
case 2:
|
|
9263
|
-
_yield$this$get2 =
|
|
9406
|
+
_yield$this$get2 = _context53.sent;
|
|
9264
9407
|
segments = _yield$this$get2.segments;
|
|
9265
|
-
return
|
|
9408
|
+
return _context53.abrupt("return", segments);
|
|
9266
9409
|
|
|
9267
9410
|
case 5:
|
|
9268
9411
|
case "end":
|
|
9269
|
-
return
|
|
9412
|
+
return _context53.stop();
|
|
9270
9413
|
}
|
|
9271
9414
|
}
|
|
9272
|
-
},
|
|
9415
|
+
}, _callee53, this);
|
|
9273
9416
|
}));
|
|
9274
9417
|
|
|
9275
|
-
function listSegments(
|
|
9418
|
+
function listSegments(_x72) {
|
|
9276
9419
|
return _listSegments.apply(this, arguments);
|
|
9277
9420
|
}
|
|
9278
9421
|
|
|
@@ -9290,32 +9433,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9290
9433
|
}, {
|
|
9291
9434
|
key: "updateSegment",
|
|
9292
9435
|
value: function () {
|
|
9293
|
-
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9436
|
+
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(id, params) {
|
|
9294
9437
|
var _yield$this$put, segment;
|
|
9295
9438
|
|
|
9296
|
-
return _regeneratorRuntime.wrap(function
|
|
9439
|
+
return _regeneratorRuntime.wrap(function _callee54$(_context54) {
|
|
9297
9440
|
while (1) {
|
|
9298
|
-
switch (
|
|
9441
|
+
switch (_context54.prev = _context54.next) {
|
|
9299
9442
|
case 0:
|
|
9300
|
-
|
|
9443
|
+
_context54.next = 2;
|
|
9301
9444
|
return this.put(this.baseURL + "/segments/".concat(id), {
|
|
9302
9445
|
segment: params
|
|
9303
9446
|
});
|
|
9304
9447
|
|
|
9305
9448
|
case 2:
|
|
9306
|
-
_yield$this$put =
|
|
9449
|
+
_yield$this$put = _context54.sent;
|
|
9307
9450
|
segment = _yield$this$put.segment;
|
|
9308
|
-
return
|
|
9451
|
+
return _context54.abrupt("return", segment);
|
|
9309
9452
|
|
|
9310
9453
|
case 5:
|
|
9311
9454
|
case "end":
|
|
9312
|
-
return
|
|
9455
|
+
return _context54.stop();
|
|
9313
9456
|
}
|
|
9314
9457
|
}
|
|
9315
|
-
},
|
|
9458
|
+
}, _callee54, this);
|
|
9316
9459
|
}));
|
|
9317
9460
|
|
|
9318
|
-
function updateSegment(
|
|
9461
|
+
function updateSegment(_x73, _x74) {
|
|
9319
9462
|
return _updateSegment.apply(this, arguments);
|
|
9320
9463
|
}
|
|
9321
9464
|
|
|
@@ -9332,22 +9475,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9332
9475
|
}, {
|
|
9333
9476
|
key: "deleteSegment",
|
|
9334
9477
|
value: function () {
|
|
9335
|
-
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9336
|
-
return _regeneratorRuntime.wrap(function
|
|
9478
|
+
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(id) {
|
|
9479
|
+
return _regeneratorRuntime.wrap(function _callee55$(_context55) {
|
|
9337
9480
|
while (1) {
|
|
9338
|
-
switch (
|
|
9481
|
+
switch (_context55.prev = _context55.next) {
|
|
9339
9482
|
case 0:
|
|
9340
|
-
return
|
|
9483
|
+
return _context55.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
|
|
9341
9484
|
|
|
9342
9485
|
case 1:
|
|
9343
9486
|
case "end":
|
|
9344
|
-
return
|
|
9487
|
+
return _context55.stop();
|
|
9345
9488
|
}
|
|
9346
9489
|
}
|
|
9347
|
-
},
|
|
9490
|
+
}, _callee55, this);
|
|
9348
9491
|
}));
|
|
9349
9492
|
|
|
9350
|
-
function deleteSegment(
|
|
9493
|
+
function deleteSegment(_x75) {
|
|
9351
9494
|
return _deleteSegment.apply(this, arguments);
|
|
9352
9495
|
}
|
|
9353
9496
|
|
|
@@ -9364,32 +9507,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9364
9507
|
}, {
|
|
9365
9508
|
key: "createCampaign",
|
|
9366
9509
|
value: function () {
|
|
9367
|
-
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9510
|
+
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(params) {
|
|
9368
9511
|
var _yield$this$post2, campaign;
|
|
9369
9512
|
|
|
9370
|
-
return _regeneratorRuntime.wrap(function
|
|
9513
|
+
return _regeneratorRuntime.wrap(function _callee56$(_context56) {
|
|
9371
9514
|
while (1) {
|
|
9372
|
-
switch (
|
|
9515
|
+
switch (_context56.prev = _context56.next) {
|
|
9373
9516
|
case 0:
|
|
9374
|
-
|
|
9517
|
+
_context56.next = 2;
|
|
9375
9518
|
return this.post(this.baseURL + "/campaigns", {
|
|
9376
9519
|
campaign: params
|
|
9377
9520
|
});
|
|
9378
9521
|
|
|
9379
9522
|
case 2:
|
|
9380
|
-
_yield$this$post2 =
|
|
9523
|
+
_yield$this$post2 = _context56.sent;
|
|
9381
9524
|
campaign = _yield$this$post2.campaign;
|
|
9382
|
-
return
|
|
9525
|
+
return _context56.abrupt("return", campaign);
|
|
9383
9526
|
|
|
9384
9527
|
case 5:
|
|
9385
9528
|
case "end":
|
|
9386
|
-
return
|
|
9529
|
+
return _context56.stop();
|
|
9387
9530
|
}
|
|
9388
9531
|
}
|
|
9389
|
-
},
|
|
9532
|
+
}, _callee56, this);
|
|
9390
9533
|
}));
|
|
9391
9534
|
|
|
9392
|
-
function createCampaign(
|
|
9535
|
+
function createCampaign(_x76) {
|
|
9393
9536
|
return _createCampaign.apply(this, arguments);
|
|
9394
9537
|
}
|
|
9395
9538
|
|
|
@@ -9406,30 +9549,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9406
9549
|
}, {
|
|
9407
9550
|
key: "getCampaign",
|
|
9408
9551
|
value: function () {
|
|
9409
|
-
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9552
|
+
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(id) {
|
|
9410
9553
|
var _yield$this$get3, campaign;
|
|
9411
9554
|
|
|
9412
|
-
return _regeneratorRuntime.wrap(function
|
|
9555
|
+
return _regeneratorRuntime.wrap(function _callee57$(_context57) {
|
|
9413
9556
|
while (1) {
|
|
9414
|
-
switch (
|
|
9557
|
+
switch (_context57.prev = _context57.next) {
|
|
9415
9558
|
case 0:
|
|
9416
|
-
|
|
9559
|
+
_context57.next = 2;
|
|
9417
9560
|
return this.get(this.baseURL + "/campaigns/".concat(id));
|
|
9418
9561
|
|
|
9419
9562
|
case 2:
|
|
9420
|
-
_yield$this$get3 =
|
|
9563
|
+
_yield$this$get3 = _context57.sent;
|
|
9421
9564
|
campaign = _yield$this$get3.campaign;
|
|
9422
|
-
return
|
|
9565
|
+
return _context57.abrupt("return", campaign);
|
|
9423
9566
|
|
|
9424
9567
|
case 5:
|
|
9425
9568
|
case "end":
|
|
9426
|
-
return
|
|
9569
|
+
return _context57.stop();
|
|
9427
9570
|
}
|
|
9428
9571
|
}
|
|
9429
|
-
},
|
|
9572
|
+
}, _callee57, this);
|
|
9430
9573
|
}));
|
|
9431
9574
|
|
|
9432
|
-
function getCampaign(
|
|
9575
|
+
function getCampaign(_x77) {
|
|
9433
9576
|
return _getCampaign.apply(this, arguments);
|
|
9434
9577
|
}
|
|
9435
9578
|
|
|
@@ -9445,30 +9588,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9445
9588
|
}, {
|
|
9446
9589
|
key: "listCampaigns",
|
|
9447
9590
|
value: function () {
|
|
9448
|
-
var _listCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9591
|
+
var _listCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(options) {
|
|
9449
9592
|
var _yield$this$get4, campaigns;
|
|
9450
9593
|
|
|
9451
|
-
return _regeneratorRuntime.wrap(function
|
|
9594
|
+
return _regeneratorRuntime.wrap(function _callee58$(_context58) {
|
|
9452
9595
|
while (1) {
|
|
9453
|
-
switch (
|
|
9596
|
+
switch (_context58.prev = _context58.next) {
|
|
9454
9597
|
case 0:
|
|
9455
|
-
|
|
9598
|
+
_context58.next = 2;
|
|
9456
9599
|
return this.get(this.baseURL + "/campaigns", options);
|
|
9457
9600
|
|
|
9458
9601
|
case 2:
|
|
9459
|
-
_yield$this$get4 =
|
|
9602
|
+
_yield$this$get4 = _context58.sent;
|
|
9460
9603
|
campaigns = _yield$this$get4.campaigns;
|
|
9461
|
-
return
|
|
9604
|
+
return _context58.abrupt("return", campaigns);
|
|
9462
9605
|
|
|
9463
9606
|
case 5:
|
|
9464
9607
|
case "end":
|
|
9465
|
-
return
|
|
9608
|
+
return _context58.stop();
|
|
9466
9609
|
}
|
|
9467
9610
|
}
|
|
9468
|
-
},
|
|
9611
|
+
}, _callee58, this);
|
|
9469
9612
|
}));
|
|
9470
9613
|
|
|
9471
|
-
function listCampaigns(
|
|
9614
|
+
function listCampaigns(_x78) {
|
|
9472
9615
|
return _listCampaigns.apply(this, arguments);
|
|
9473
9616
|
}
|
|
9474
9617
|
|
|
@@ -9486,32 +9629,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9486
9629
|
}, {
|
|
9487
9630
|
key: "updateCampaign",
|
|
9488
9631
|
value: function () {
|
|
9489
|
-
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9632
|
+
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(id, params) {
|
|
9490
9633
|
var _yield$this$put2, campaign;
|
|
9491
9634
|
|
|
9492
|
-
return _regeneratorRuntime.wrap(function
|
|
9635
|
+
return _regeneratorRuntime.wrap(function _callee59$(_context59) {
|
|
9493
9636
|
while (1) {
|
|
9494
|
-
switch (
|
|
9637
|
+
switch (_context59.prev = _context59.next) {
|
|
9495
9638
|
case 0:
|
|
9496
|
-
|
|
9639
|
+
_context59.next = 2;
|
|
9497
9640
|
return this.put(this.baseURL + "/campaigns/".concat(id), {
|
|
9498
9641
|
campaign: params
|
|
9499
9642
|
});
|
|
9500
9643
|
|
|
9501
9644
|
case 2:
|
|
9502
|
-
_yield$this$put2 =
|
|
9645
|
+
_yield$this$put2 = _context59.sent;
|
|
9503
9646
|
campaign = _yield$this$put2.campaign;
|
|
9504
|
-
return
|
|
9647
|
+
return _context59.abrupt("return", campaign);
|
|
9505
9648
|
|
|
9506
9649
|
case 5:
|
|
9507
9650
|
case "end":
|
|
9508
|
-
return
|
|
9651
|
+
return _context59.stop();
|
|
9509
9652
|
}
|
|
9510
9653
|
}
|
|
9511
|
-
},
|
|
9654
|
+
}, _callee59, this);
|
|
9512
9655
|
}));
|
|
9513
9656
|
|
|
9514
|
-
function updateCampaign(
|
|
9657
|
+
function updateCampaign(_x79, _x80) {
|
|
9515
9658
|
return _updateCampaign.apply(this, arguments);
|
|
9516
9659
|
}
|
|
9517
9660
|
|
|
@@ -9528,22 +9671,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9528
9671
|
}, {
|
|
9529
9672
|
key: "deleteCampaign",
|
|
9530
9673
|
value: function () {
|
|
9531
|
-
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9532
|
-
return _regeneratorRuntime.wrap(function
|
|
9674
|
+
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(id) {
|
|
9675
|
+
return _regeneratorRuntime.wrap(function _callee60$(_context60) {
|
|
9533
9676
|
while (1) {
|
|
9534
|
-
switch (
|
|
9677
|
+
switch (_context60.prev = _context60.next) {
|
|
9535
9678
|
case 0:
|
|
9536
|
-
return
|
|
9679
|
+
return _context60.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
|
|
9537
9680
|
|
|
9538
9681
|
case 1:
|
|
9539
9682
|
case "end":
|
|
9540
|
-
return
|
|
9683
|
+
return _context60.stop();
|
|
9541
9684
|
}
|
|
9542
9685
|
}
|
|
9543
|
-
},
|
|
9686
|
+
}, _callee60, this);
|
|
9544
9687
|
}));
|
|
9545
9688
|
|
|
9546
|
-
function deleteCampaign(
|
|
9689
|
+
function deleteCampaign(_x81) {
|
|
9547
9690
|
return _deleteCampaign.apply(this, arguments);
|
|
9548
9691
|
}
|
|
9549
9692
|
|
|
@@ -9561,33 +9704,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9561
9704
|
}, {
|
|
9562
9705
|
key: "scheduleCampaign",
|
|
9563
9706
|
value: function () {
|
|
9564
|
-
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9707
|
+
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id, params) {
|
|
9565
9708
|
var sendAt, _yield$this$patch, campaign;
|
|
9566
9709
|
|
|
9567
|
-
return _regeneratorRuntime.wrap(function
|
|
9710
|
+
return _regeneratorRuntime.wrap(function _callee61$(_context61) {
|
|
9568
9711
|
while (1) {
|
|
9569
|
-
switch (
|
|
9712
|
+
switch (_context61.prev = _context61.next) {
|
|
9570
9713
|
case 0:
|
|
9571
9714
|
sendAt = params.sendAt;
|
|
9572
|
-
|
|
9715
|
+
_context61.next = 3;
|
|
9573
9716
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
|
|
9574
9717
|
send_at: sendAt
|
|
9575
9718
|
});
|
|
9576
9719
|
|
|
9577
9720
|
case 3:
|
|
9578
|
-
_yield$this$patch =
|
|
9721
|
+
_yield$this$patch = _context61.sent;
|
|
9579
9722
|
campaign = _yield$this$patch.campaign;
|
|
9580
|
-
return
|
|
9723
|
+
return _context61.abrupt("return", campaign);
|
|
9581
9724
|
|
|
9582
9725
|
case 6:
|
|
9583
9726
|
case "end":
|
|
9584
|
-
return
|
|
9727
|
+
return _context61.stop();
|
|
9585
9728
|
}
|
|
9586
9729
|
}
|
|
9587
|
-
},
|
|
9730
|
+
}, _callee61, this);
|
|
9588
9731
|
}));
|
|
9589
9732
|
|
|
9590
|
-
function scheduleCampaign(
|
|
9733
|
+
function scheduleCampaign(_x82, _x83) {
|
|
9591
9734
|
return _scheduleCampaign.apply(this, arguments);
|
|
9592
9735
|
}
|
|
9593
9736
|
|
|
@@ -9604,30 +9747,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9604
9747
|
}, {
|
|
9605
9748
|
key: "stopCampaign",
|
|
9606
9749
|
value: function () {
|
|
9607
|
-
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9750
|
+
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(id) {
|
|
9608
9751
|
var _yield$this$patch2, campaign;
|
|
9609
9752
|
|
|
9610
|
-
return _regeneratorRuntime.wrap(function
|
|
9753
|
+
return _regeneratorRuntime.wrap(function _callee62$(_context62) {
|
|
9611
9754
|
while (1) {
|
|
9612
|
-
switch (
|
|
9755
|
+
switch (_context62.prev = _context62.next) {
|
|
9613
9756
|
case 0:
|
|
9614
|
-
|
|
9757
|
+
_context62.next = 2;
|
|
9615
9758
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
|
|
9616
9759
|
|
|
9617
9760
|
case 2:
|
|
9618
|
-
_yield$this$patch2 =
|
|
9761
|
+
_yield$this$patch2 = _context62.sent;
|
|
9619
9762
|
campaign = _yield$this$patch2.campaign;
|
|
9620
|
-
return
|
|
9763
|
+
return _context62.abrupt("return", campaign);
|
|
9621
9764
|
|
|
9622
9765
|
case 5:
|
|
9623
9766
|
case "end":
|
|
9624
|
-
return
|
|
9767
|
+
return _context62.stop();
|
|
9625
9768
|
}
|
|
9626
9769
|
}
|
|
9627
|
-
},
|
|
9770
|
+
}, _callee62, this);
|
|
9628
9771
|
}));
|
|
9629
9772
|
|
|
9630
|
-
function stopCampaign(
|
|
9773
|
+
function stopCampaign(_x84) {
|
|
9631
9774
|
return _stopCampaign.apply(this, arguments);
|
|
9632
9775
|
}
|
|
9633
9776
|
|
|
@@ -9644,30 +9787,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9644
9787
|
}, {
|
|
9645
9788
|
key: "resumeCampaign",
|
|
9646
9789
|
value: function () {
|
|
9647
|
-
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9790
|
+
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(id) {
|
|
9648
9791
|
var _yield$this$patch3, campaign;
|
|
9649
9792
|
|
|
9650
|
-
return _regeneratorRuntime.wrap(function
|
|
9793
|
+
return _regeneratorRuntime.wrap(function _callee63$(_context63) {
|
|
9651
9794
|
while (1) {
|
|
9652
|
-
switch (
|
|
9795
|
+
switch (_context63.prev = _context63.next) {
|
|
9653
9796
|
case 0:
|
|
9654
|
-
|
|
9797
|
+
_context63.next = 2;
|
|
9655
9798
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
|
|
9656
9799
|
|
|
9657
9800
|
case 2:
|
|
9658
|
-
_yield$this$patch3 =
|
|
9801
|
+
_yield$this$patch3 = _context63.sent;
|
|
9659
9802
|
campaign = _yield$this$patch3.campaign;
|
|
9660
|
-
return
|
|
9803
|
+
return _context63.abrupt("return", campaign);
|
|
9661
9804
|
|
|
9662
9805
|
case 5:
|
|
9663
9806
|
case "end":
|
|
9664
|
-
return
|
|
9807
|
+
return _context63.stop();
|
|
9665
9808
|
}
|
|
9666
9809
|
}
|
|
9667
|
-
},
|
|
9810
|
+
}, _callee63, this);
|
|
9668
9811
|
}));
|
|
9669
9812
|
|
|
9670
|
-
function resumeCampaign(
|
|
9813
|
+
function resumeCampaign(_x85) {
|
|
9671
9814
|
return _resumeCampaign.apply(this, arguments);
|
|
9672
9815
|
}
|
|
9673
9816
|
|
|
@@ -9684,33 +9827,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9684
9827
|
}, {
|
|
9685
9828
|
key: "testCampaign",
|
|
9686
9829
|
value: function () {
|
|
9687
|
-
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9830
|
+
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id, params) {
|
|
9688
9831
|
var users, _yield$this$post3, campaign;
|
|
9689
9832
|
|
|
9690
|
-
return _regeneratorRuntime.wrap(function
|
|
9833
|
+
return _regeneratorRuntime.wrap(function _callee64$(_context64) {
|
|
9691
9834
|
while (1) {
|
|
9692
|
-
switch (
|
|
9835
|
+
switch (_context64.prev = _context64.next) {
|
|
9693
9836
|
case 0:
|
|
9694
9837
|
users = params.users;
|
|
9695
|
-
|
|
9838
|
+
_context64.next = 3;
|
|
9696
9839
|
return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
|
|
9697
9840
|
users: users
|
|
9698
9841
|
});
|
|
9699
9842
|
|
|
9700
9843
|
case 3:
|
|
9701
|
-
_yield$this$post3 =
|
|
9844
|
+
_yield$this$post3 = _context64.sent;
|
|
9702
9845
|
campaign = _yield$this$post3.campaign;
|
|
9703
|
-
return
|
|
9846
|
+
return _context64.abrupt("return", campaign);
|
|
9704
9847
|
|
|
9705
9848
|
case 6:
|
|
9706
9849
|
case "end":
|
|
9707
|
-
return
|
|
9850
|
+
return _context64.stop();
|
|
9708
9851
|
}
|
|
9709
9852
|
}
|
|
9710
|
-
},
|
|
9853
|
+
}, _callee64, this);
|
|
9711
9854
|
}));
|
|
9712
9855
|
|
|
9713
|
-
function testCampaign(
|
|
9856
|
+
function testCampaign(_x86, _x87) {
|
|
9714
9857
|
return _testCampaign.apply(this, arguments);
|
|
9715
9858
|
}
|
|
9716
9859
|
|
|
@@ -9726,24 +9869,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9726
9869
|
}, {
|
|
9727
9870
|
key: "enrichURL",
|
|
9728
9871
|
value: function () {
|
|
9729
|
-
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9730
|
-
return _regeneratorRuntime.wrap(function
|
|
9872
|
+
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(url) {
|
|
9873
|
+
return _regeneratorRuntime.wrap(function _callee65$(_context65) {
|
|
9731
9874
|
while (1) {
|
|
9732
|
-
switch (
|
|
9875
|
+
switch (_context65.prev = _context65.next) {
|
|
9733
9876
|
case 0:
|
|
9734
|
-
return
|
|
9877
|
+
return _context65.abrupt("return", this.get(this.baseURL + "/og", {
|
|
9735
9878
|
url: url
|
|
9736
9879
|
}));
|
|
9737
9880
|
|
|
9738
9881
|
case 1:
|
|
9739
9882
|
case "end":
|
|
9740
|
-
return
|
|
9883
|
+
return _context65.stop();
|
|
9741
9884
|
}
|
|
9742
9885
|
}
|
|
9743
|
-
},
|
|
9886
|
+
}, _callee65, this);
|
|
9744
9887
|
}));
|
|
9745
9888
|
|
|
9746
|
-
function enrichURL(
|
|
9889
|
+
function enrichURL(_x88) {
|
|
9747
9890
|
return _enrichURL.apply(this, arguments);
|
|
9748
9891
|
}
|
|
9749
9892
|
|
|
@@ -9760,22 +9903,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9760
9903
|
}, {
|
|
9761
9904
|
key: "getTask",
|
|
9762
9905
|
value: function () {
|
|
9763
|
-
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9764
|
-
return _regeneratorRuntime.wrap(function
|
|
9906
|
+
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id) {
|
|
9907
|
+
return _regeneratorRuntime.wrap(function _callee66$(_context66) {
|
|
9765
9908
|
while (1) {
|
|
9766
|
-
switch (
|
|
9909
|
+
switch (_context66.prev = _context66.next) {
|
|
9767
9910
|
case 0:
|
|
9768
|
-
return
|
|
9911
|
+
return _context66.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
9769
9912
|
|
|
9770
9913
|
case 1:
|
|
9771
9914
|
case "end":
|
|
9772
|
-
return
|
|
9915
|
+
return _context66.stop();
|
|
9773
9916
|
}
|
|
9774
9917
|
}
|
|
9775
|
-
},
|
|
9918
|
+
}, _callee66, this);
|
|
9776
9919
|
}));
|
|
9777
9920
|
|
|
9778
|
-
function getTask(
|
|
9921
|
+
function getTask(_x89) {
|
|
9779
9922
|
return _getTask.apply(this, arguments);
|
|
9780
9923
|
}
|
|
9781
9924
|
|
|
@@ -9793,31 +9936,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9793
9936
|
}, {
|
|
9794
9937
|
key: "deleteChannels",
|
|
9795
9938
|
value: function () {
|
|
9796
|
-
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9939
|
+
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(cids) {
|
|
9797
9940
|
var options,
|
|
9798
|
-
|
|
9799
|
-
return _regeneratorRuntime.wrap(function
|
|
9941
|
+
_args67 = arguments;
|
|
9942
|
+
return _regeneratorRuntime.wrap(function _callee67$(_context67) {
|
|
9800
9943
|
while (1) {
|
|
9801
|
-
switch (
|
|
9944
|
+
switch (_context67.prev = _context67.next) {
|
|
9802
9945
|
case 0:
|
|
9803
|
-
options =
|
|
9804
|
-
|
|
9946
|
+
options = _args67.length > 1 && _args67[1] !== undefined ? _args67[1] : {};
|
|
9947
|
+
_context67.next = 3;
|
|
9805
9948
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
9806
9949
|
cids: cids
|
|
9807
9950
|
}, options));
|
|
9808
9951
|
|
|
9809
9952
|
case 3:
|
|
9810
|
-
return
|
|
9953
|
+
return _context67.abrupt("return", _context67.sent);
|
|
9811
9954
|
|
|
9812
9955
|
case 4:
|
|
9813
9956
|
case "end":
|
|
9814
|
-
return
|
|
9957
|
+
return _context67.stop();
|
|
9815
9958
|
}
|
|
9816
9959
|
}
|
|
9817
|
-
},
|
|
9960
|
+
}, _callee67, this);
|
|
9818
9961
|
}));
|
|
9819
9962
|
|
|
9820
|
-
function deleteChannels(
|
|
9963
|
+
function deleteChannels(_x90) {
|
|
9821
9964
|
return _deleteChannels.apply(this, arguments);
|
|
9822
9965
|
}
|
|
9823
9966
|
|
|
@@ -9835,13 +9978,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9835
9978
|
}, {
|
|
9836
9979
|
key: "deleteUsers",
|
|
9837
9980
|
value: function () {
|
|
9838
|
-
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9839
|
-
return _regeneratorRuntime.wrap(function
|
|
9981
|
+
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(user_ids, options) {
|
|
9982
|
+
return _regeneratorRuntime.wrap(function _callee68$(_context68) {
|
|
9840
9983
|
while (1) {
|
|
9841
|
-
switch (
|
|
9984
|
+
switch (_context68.prev = _context68.next) {
|
|
9842
9985
|
case 0:
|
|
9843
9986
|
if (!((options === null || options === void 0 ? void 0 : options.user) !== 'soft' && (options === null || options === void 0 ? void 0 : options.user) !== 'hard')) {
|
|
9844
|
-
|
|
9987
|
+
_context68.next = 2;
|
|
9845
9988
|
break;
|
|
9846
9989
|
}
|
|
9847
9990
|
|
|
@@ -9849,7 +9992,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9849
9992
|
|
|
9850
9993
|
case 2:
|
|
9851
9994
|
if (!(options.messages !== undefined && options.messages !== 'soft' && options.messages !== 'hard')) {
|
|
9852
|
-
|
|
9995
|
+
_context68.next = 4;
|
|
9853
9996
|
break;
|
|
9854
9997
|
}
|
|
9855
9998
|
|
|
@@ -9857,30 +10000,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9857
10000
|
|
|
9858
10001
|
case 4:
|
|
9859
10002
|
if (!(options.conversations !== undefined && options.conversations !== 'soft' && options.conversations !== 'hard')) {
|
|
9860
|
-
|
|
10003
|
+
_context68.next = 6;
|
|
9861
10004
|
break;
|
|
9862
10005
|
}
|
|
9863
10006
|
|
|
9864
10007
|
throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
|
|
9865
10008
|
|
|
9866
10009
|
case 6:
|
|
9867
|
-
|
|
10010
|
+
_context68.next = 8;
|
|
9868
10011
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
9869
10012
|
user_ids: user_ids
|
|
9870
10013
|
}, options));
|
|
9871
10014
|
|
|
9872
10015
|
case 8:
|
|
9873
|
-
return
|
|
10016
|
+
return _context68.abrupt("return", _context68.sent);
|
|
9874
10017
|
|
|
9875
10018
|
case 9:
|
|
9876
10019
|
case "end":
|
|
9877
|
-
return
|
|
10020
|
+
return _context68.stop();
|
|
9878
10021
|
}
|
|
9879
10022
|
}
|
|
9880
|
-
},
|
|
10023
|
+
}, _callee68, this);
|
|
9881
10024
|
}));
|
|
9882
10025
|
|
|
9883
|
-
function deleteUsers(
|
|
10026
|
+
function deleteUsers(_x91, _x92) {
|
|
9884
10027
|
return _deleteUsers.apply(this, arguments);
|
|
9885
10028
|
}
|
|
9886
10029
|
|