stream-chat 4.5.0-beta.0 → 5.1.1
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 +530 -359
- 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 +530 -359
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +530 -359
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +530 -359
- 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 +3 -4
- package/dist/types/connection_fallback.d.ts.map +1 -1
- package/dist/types/errors.d.ts +1 -1
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/types.d.ts +80 -10
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts +1 -1
- package/dist/types/utils.d.ts.map +1 -1
- package/package.json +23 -29
- package/src/channel.ts +29 -1
- package/src/client.ts +64 -18
- package/src/connection_fallback.ts +11 -7
- package/src/errors.ts +1 -1
- package/src/types.ts +123 -9
- package/src/utils.ts +11 -2
package/dist/browser.js
CHANGED
|
@@ -108,7 +108,7 @@ var decodeBase64 = function decodeBase64(s) {
|
|
|
108
108
|
|
|
109
109
|
var https = null;
|
|
110
110
|
|
|
111
|
-
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; }
|
|
111
|
+
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; }
|
|
112
112
|
|
|
113
113
|
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__default['default'](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; }
|
|
114
114
|
|
|
@@ -720,7 +720,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
720
720
|
return ChannelState;
|
|
721
721
|
}();
|
|
722
722
|
|
|
723
|
-
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; }
|
|
723
|
+
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; }
|
|
724
724
|
|
|
725
725
|
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__default['default'](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; }
|
|
726
726
|
|
|
@@ -777,7 +777,7 @@ var isValidEventType = function isValidEventType(eventType) {
|
|
|
777
777
|
return IS_VALID_EVENT_MAP_TYPE[eventType] || false;
|
|
778
778
|
};
|
|
779
779
|
|
|
780
|
-
function _createForOfIteratorHelper$3(o, allowArrayLike) { var it
|
|
780
|
+
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; } } }; }
|
|
781
781
|
|
|
782
782
|
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); }
|
|
783
783
|
|
|
@@ -967,13 +967,23 @@ function convertErrorToJson(err) {
|
|
|
967
967
|
return jsonObj;
|
|
968
968
|
}
|
|
969
969
|
/**
|
|
970
|
-
* isOnline safely return the navigator.online value
|
|
970
|
+
* isOnline safely return the navigator.online value for browser env
|
|
971
971
|
* if navigator is not in global object, it always return true
|
|
972
972
|
*/
|
|
973
973
|
|
|
974
974
|
function isOnline() {
|
|
975
975
|
var nav = typeof navigator !== 'undefined' ? navigator : typeof window !== 'undefined' && window.navigator ? window.navigator : undefined;
|
|
976
|
-
|
|
976
|
+
|
|
977
|
+
if (!nav) {
|
|
978
|
+
console.warn('isOnline failed to access window.navigator and assume browser is online');
|
|
979
|
+
return true;
|
|
980
|
+
} // RN navigator has undefined for onLine
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
if (typeof nav.onLine !== 'boolean') {
|
|
984
|
+
return true;
|
|
985
|
+
}
|
|
986
|
+
|
|
977
987
|
return nav.onLine;
|
|
978
988
|
}
|
|
979
989
|
/**
|
|
@@ -993,13 +1003,13 @@ function removeConnectionEventListeners(cb) {
|
|
|
993
1003
|
}
|
|
994
1004
|
}
|
|
995
1005
|
|
|
996
|
-
function _createForOfIteratorHelper$2(o, allowArrayLike) { var it
|
|
1006
|
+
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; } } }; }
|
|
997
1007
|
|
|
998
1008
|
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); }
|
|
999
1009
|
|
|
1000
1010
|
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; }
|
|
1001
1011
|
|
|
1002
|
-
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; }
|
|
1012
|
+
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; }
|
|
1003
1013
|
|
|
1004
1014
|
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__default['default'](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; }
|
|
1005
1015
|
|
|
@@ -2584,6 +2594,50 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2584
2594
|
|
|
2585
2595
|
return getReplies;
|
|
2586
2596
|
}()
|
|
2597
|
+
/**
|
|
2598
|
+
* getPinnedMessages - List list pinned messages of the channel
|
|
2599
|
+
*
|
|
2600
|
+
* @param {PinnedMessagePaginationOptions & { user?: UserResponse<UserType>; user_id?: string }} options Pagination params, ie {limit:10, id_lte: 10}
|
|
2601
|
+
* @param {PinnedMessagesSort} sort defines sorting direction of pinned messages
|
|
2602
|
+
*
|
|
2603
|
+
* @return {Promise<GetRepliesAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} A response with a list of messages
|
|
2604
|
+
*/
|
|
2605
|
+
|
|
2606
|
+
}, {
|
|
2607
|
+
key: "getPinnedMessages",
|
|
2608
|
+
value: function () {
|
|
2609
|
+
var _getPinnedMessages = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee30(options) {
|
|
2610
|
+
var sort,
|
|
2611
|
+
_args30 = arguments;
|
|
2612
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee30$(_context30) {
|
|
2613
|
+
while (1) {
|
|
2614
|
+
switch (_context30.prev = _context30.next) {
|
|
2615
|
+
case 0:
|
|
2616
|
+
sort = _args30.length > 1 && _args30[1] !== undefined ? _args30[1] : [];
|
|
2617
|
+
_context30.next = 3;
|
|
2618
|
+
return this.getClient().get(this.getClient().baseURL + "/channels/".concat(this.type, "/").concat(this.id, "/pinned_messages"), {
|
|
2619
|
+
payload: _objectSpread$5(_objectSpread$5({}, options), {}, {
|
|
2620
|
+
sort: normalizeQuerySort(sort)
|
|
2621
|
+
})
|
|
2622
|
+
});
|
|
2623
|
+
|
|
2624
|
+
case 3:
|
|
2625
|
+
return _context30.abrupt("return", _context30.sent);
|
|
2626
|
+
|
|
2627
|
+
case 4:
|
|
2628
|
+
case "end":
|
|
2629
|
+
return _context30.stop();
|
|
2630
|
+
}
|
|
2631
|
+
}
|
|
2632
|
+
}, _callee30, this);
|
|
2633
|
+
}));
|
|
2634
|
+
|
|
2635
|
+
function getPinnedMessages(_x29) {
|
|
2636
|
+
return _getPinnedMessages.apply(this, arguments);
|
|
2637
|
+
}
|
|
2638
|
+
|
|
2639
|
+
return getPinnedMessages;
|
|
2640
|
+
}()
|
|
2587
2641
|
/**
|
|
2588
2642
|
* getReactions - List the reactions, supports pagination
|
|
2589
2643
|
*
|
|
@@ -2711,13 +2765,13 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2711
2765
|
* @return {Promise<ChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} Returns a query response
|
|
2712
2766
|
*/
|
|
2713
2767
|
function () {
|
|
2714
|
-
var _query = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2768
|
+
var _query = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee31(options) {
|
|
2715
2769
|
var queryURL, state, membersStr, tempChannelCid;
|
|
2716
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
2770
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee31$(_context31) {
|
|
2717
2771
|
while (1) {
|
|
2718
|
-
switch (
|
|
2772
|
+
switch (_context31.prev = _context31.next) {
|
|
2719
2773
|
case 0:
|
|
2720
|
-
|
|
2774
|
+
_context31.next = 2;
|
|
2721
2775
|
return this.getClient().wsPromise;
|
|
2722
2776
|
|
|
2723
2777
|
case 2:
|
|
@@ -2727,14 +2781,14 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2727
2781
|
queryURL += "/".concat(this.id);
|
|
2728
2782
|
}
|
|
2729
2783
|
|
|
2730
|
-
|
|
2784
|
+
_context31.next = 6;
|
|
2731
2785
|
return this.getClient().post(queryURL + '/query', _objectSpread$5({
|
|
2732
2786
|
data: this._data,
|
|
2733
2787
|
state: true
|
|
2734
2788
|
}, options));
|
|
2735
2789
|
|
|
2736
2790
|
case 6:
|
|
2737
|
-
state =
|
|
2791
|
+
state = _context31.sent;
|
|
2738
2792
|
|
|
2739
2793
|
// update the channel id if it was missing
|
|
2740
2794
|
if (!this.id) {
|
|
@@ -2764,17 +2818,17 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2764
2818
|
|
|
2765
2819
|
this._initializeState(state);
|
|
2766
2820
|
|
|
2767
|
-
return
|
|
2821
|
+
return _context31.abrupt("return", state);
|
|
2768
2822
|
|
|
2769
2823
|
case 11:
|
|
2770
2824
|
case "end":
|
|
2771
|
-
return
|
|
2825
|
+
return _context31.stop();
|
|
2772
2826
|
}
|
|
2773
2827
|
}
|
|
2774
|
-
},
|
|
2828
|
+
}, _callee31, this);
|
|
2775
2829
|
}));
|
|
2776
2830
|
|
|
2777
|
-
function query(
|
|
2831
|
+
function query(_x30) {
|
|
2778
2832
|
return _query.apply(this, arguments);
|
|
2779
2833
|
}
|
|
2780
2834
|
|
|
@@ -2791,31 +2845,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2791
2845
|
}, {
|
|
2792
2846
|
key: "banUser",
|
|
2793
2847
|
value: function () {
|
|
2794
|
-
var _banUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2795
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
2848
|
+
var _banUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee32(targetUserID, options) {
|
|
2849
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee32$(_context32) {
|
|
2796
2850
|
while (1) {
|
|
2797
|
-
switch (
|
|
2851
|
+
switch (_context32.prev = _context32.next) {
|
|
2798
2852
|
case 0:
|
|
2799
2853
|
this._checkInitialized();
|
|
2800
2854
|
|
|
2801
|
-
|
|
2855
|
+
_context32.next = 3;
|
|
2802
2856
|
return this.getClient().banUser(targetUserID, _objectSpread$5(_objectSpread$5({}, options), {}, {
|
|
2803
2857
|
type: this.type,
|
|
2804
2858
|
id: this.id
|
|
2805
2859
|
}));
|
|
2806
2860
|
|
|
2807
2861
|
case 3:
|
|
2808
|
-
return
|
|
2862
|
+
return _context32.abrupt("return", _context32.sent);
|
|
2809
2863
|
|
|
2810
2864
|
case 4:
|
|
2811
2865
|
case "end":
|
|
2812
|
-
return
|
|
2866
|
+
return _context32.stop();
|
|
2813
2867
|
}
|
|
2814
2868
|
}
|
|
2815
|
-
},
|
|
2869
|
+
}, _callee32, this);
|
|
2816
2870
|
}));
|
|
2817
2871
|
|
|
2818
|
-
function banUser(
|
|
2872
|
+
function banUser(_x31, _x32) {
|
|
2819
2873
|
return _banUser.apply(this, arguments);
|
|
2820
2874
|
}
|
|
2821
2875
|
|
|
@@ -2833,34 +2887,34 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2833
2887
|
}, {
|
|
2834
2888
|
key: "hide",
|
|
2835
2889
|
value: function () {
|
|
2836
|
-
var _hide = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2890
|
+
var _hide = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee33() {
|
|
2837
2891
|
var userId,
|
|
2838
2892
|
clearHistory,
|
|
2839
|
-
|
|
2840
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
2893
|
+
_args33 = arguments;
|
|
2894
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee33$(_context33) {
|
|
2841
2895
|
while (1) {
|
|
2842
|
-
switch (
|
|
2896
|
+
switch (_context33.prev = _context33.next) {
|
|
2843
2897
|
case 0:
|
|
2844
|
-
userId =
|
|
2845
|
-
clearHistory =
|
|
2898
|
+
userId = _args33.length > 0 && _args33[0] !== undefined ? _args33[0] : null;
|
|
2899
|
+
clearHistory = _args33.length > 1 && _args33[1] !== undefined ? _args33[1] : false;
|
|
2846
2900
|
|
|
2847
2901
|
this._checkInitialized();
|
|
2848
2902
|
|
|
2849
|
-
|
|
2903
|
+
_context33.next = 5;
|
|
2850
2904
|
return this.getClient().post("".concat(this._channelURL(), "/hide"), {
|
|
2851
2905
|
user_id: userId,
|
|
2852
2906
|
clear_history: clearHistory
|
|
2853
2907
|
});
|
|
2854
2908
|
|
|
2855
2909
|
case 5:
|
|
2856
|
-
return
|
|
2910
|
+
return _context33.abrupt("return", _context33.sent);
|
|
2857
2911
|
|
|
2858
2912
|
case 6:
|
|
2859
2913
|
case "end":
|
|
2860
|
-
return
|
|
2914
|
+
return _context33.stop();
|
|
2861
2915
|
}
|
|
2862
2916
|
}
|
|
2863
|
-
},
|
|
2917
|
+
}, _callee33, this);
|
|
2864
2918
|
}));
|
|
2865
2919
|
|
|
2866
2920
|
function hide() {
|
|
@@ -2879,31 +2933,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2879
2933
|
}, {
|
|
2880
2934
|
key: "show",
|
|
2881
2935
|
value: function () {
|
|
2882
|
-
var _show = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2936
|
+
var _show = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee34() {
|
|
2883
2937
|
var userId,
|
|
2884
|
-
|
|
2885
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
2938
|
+
_args34 = arguments;
|
|
2939
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee34$(_context34) {
|
|
2886
2940
|
while (1) {
|
|
2887
|
-
switch (
|
|
2941
|
+
switch (_context34.prev = _context34.next) {
|
|
2888
2942
|
case 0:
|
|
2889
|
-
userId =
|
|
2943
|
+
userId = _args34.length > 0 && _args34[0] !== undefined ? _args34[0] : null;
|
|
2890
2944
|
|
|
2891
2945
|
this._checkInitialized();
|
|
2892
2946
|
|
|
2893
|
-
|
|
2947
|
+
_context34.next = 4;
|
|
2894
2948
|
return this.getClient().post("".concat(this._channelURL(), "/show"), {
|
|
2895
2949
|
user_id: userId
|
|
2896
2950
|
});
|
|
2897
2951
|
|
|
2898
2952
|
case 4:
|
|
2899
|
-
return
|
|
2953
|
+
return _context34.abrupt("return", _context34.sent);
|
|
2900
2954
|
|
|
2901
2955
|
case 5:
|
|
2902
2956
|
case "end":
|
|
2903
|
-
return
|
|
2957
|
+
return _context34.stop();
|
|
2904
2958
|
}
|
|
2905
2959
|
}
|
|
2906
|
-
},
|
|
2960
|
+
}, _callee34, this);
|
|
2907
2961
|
}));
|
|
2908
2962
|
|
|
2909
2963
|
function show() {
|
|
@@ -2922,31 +2976,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2922
2976
|
}, {
|
|
2923
2977
|
key: "unbanUser",
|
|
2924
2978
|
value: function () {
|
|
2925
|
-
var _unbanUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2926
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
2979
|
+
var _unbanUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee35(targetUserID) {
|
|
2980
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee35$(_context35) {
|
|
2927
2981
|
while (1) {
|
|
2928
|
-
switch (
|
|
2982
|
+
switch (_context35.prev = _context35.next) {
|
|
2929
2983
|
case 0:
|
|
2930
2984
|
this._checkInitialized();
|
|
2931
2985
|
|
|
2932
|
-
|
|
2986
|
+
_context35.next = 3;
|
|
2933
2987
|
return this.getClient().unbanUser(targetUserID, {
|
|
2934
2988
|
type: this.type,
|
|
2935
2989
|
id: this.id
|
|
2936
2990
|
});
|
|
2937
2991
|
|
|
2938
2992
|
case 3:
|
|
2939
|
-
return
|
|
2993
|
+
return _context35.abrupt("return", _context35.sent);
|
|
2940
2994
|
|
|
2941
2995
|
case 4:
|
|
2942
2996
|
case "end":
|
|
2943
|
-
return
|
|
2997
|
+
return _context35.stop();
|
|
2944
2998
|
}
|
|
2945
2999
|
}
|
|
2946
|
-
},
|
|
3000
|
+
}, _callee35, this);
|
|
2947
3001
|
}));
|
|
2948
3002
|
|
|
2949
|
-
function unbanUser(
|
|
3003
|
+
function unbanUser(_x33) {
|
|
2950
3004
|
return _unbanUser.apply(this, arguments);
|
|
2951
3005
|
}
|
|
2952
3006
|
|
|
@@ -2963,31 +3017,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2963
3017
|
}, {
|
|
2964
3018
|
key: "shadowBan",
|
|
2965
3019
|
value: function () {
|
|
2966
|
-
var _shadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2967
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
3020
|
+
var _shadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee36(targetUserID, options) {
|
|
3021
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee36$(_context36) {
|
|
2968
3022
|
while (1) {
|
|
2969
|
-
switch (
|
|
3023
|
+
switch (_context36.prev = _context36.next) {
|
|
2970
3024
|
case 0:
|
|
2971
3025
|
this._checkInitialized();
|
|
2972
3026
|
|
|
2973
|
-
|
|
3027
|
+
_context36.next = 3;
|
|
2974
3028
|
return this.getClient().shadowBan(targetUserID, _objectSpread$5(_objectSpread$5({}, options), {}, {
|
|
2975
3029
|
type: this.type,
|
|
2976
3030
|
id: this.id
|
|
2977
3031
|
}));
|
|
2978
3032
|
|
|
2979
3033
|
case 3:
|
|
2980
|
-
return
|
|
3034
|
+
return _context36.abrupt("return", _context36.sent);
|
|
2981
3035
|
|
|
2982
3036
|
case 4:
|
|
2983
3037
|
case "end":
|
|
2984
|
-
return
|
|
3038
|
+
return _context36.stop();
|
|
2985
3039
|
}
|
|
2986
3040
|
}
|
|
2987
|
-
},
|
|
3041
|
+
}, _callee36, this);
|
|
2988
3042
|
}));
|
|
2989
3043
|
|
|
2990
|
-
function shadowBan(
|
|
3044
|
+
function shadowBan(_x34, _x35) {
|
|
2991
3045
|
return _shadowBan.apply(this, arguments);
|
|
2992
3046
|
}
|
|
2993
3047
|
|
|
@@ -3003,31 +3057,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3003
3057
|
}, {
|
|
3004
3058
|
key: "removeShadowBan",
|
|
3005
3059
|
value: function () {
|
|
3006
|
-
var _removeShadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
3007
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
3060
|
+
var _removeShadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee37(targetUserID) {
|
|
3061
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee37$(_context37) {
|
|
3008
3062
|
while (1) {
|
|
3009
|
-
switch (
|
|
3063
|
+
switch (_context37.prev = _context37.next) {
|
|
3010
3064
|
case 0:
|
|
3011
3065
|
this._checkInitialized();
|
|
3012
3066
|
|
|
3013
|
-
|
|
3067
|
+
_context37.next = 3;
|
|
3014
3068
|
return this.getClient().removeShadowBan(targetUserID, {
|
|
3015
3069
|
type: this.type,
|
|
3016
3070
|
id: this.id
|
|
3017
3071
|
});
|
|
3018
3072
|
|
|
3019
3073
|
case 3:
|
|
3020
|
-
return
|
|
3074
|
+
return _context37.abrupt("return", _context37.sent);
|
|
3021
3075
|
|
|
3022
3076
|
case 4:
|
|
3023
3077
|
case "end":
|
|
3024
|
-
return
|
|
3078
|
+
return _context37.stop();
|
|
3025
3079
|
}
|
|
3026
3080
|
}
|
|
3027
|
-
},
|
|
3081
|
+
}, _callee37, this);
|
|
3028
3082
|
}));
|
|
3029
3083
|
|
|
3030
|
-
function removeShadowBan(
|
|
3084
|
+
function removeShadowBan(_x36) {
|
|
3031
3085
|
return _removeShadowBan.apply(this, arguments);
|
|
3032
3086
|
}
|
|
3033
3087
|
|
|
@@ -3249,7 +3303,12 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3249
3303
|
|
|
3250
3304
|
case 'channel.updated':
|
|
3251
3305
|
if (event.channel) {
|
|
3252
|
-
channel
|
|
3306
|
+
var _event$channel$hidden, _event$channel, _channel$data, _event$channel$own_ca, _event$channel2, _channel$data2;
|
|
3307
|
+
|
|
3308
|
+
channel.data = _objectSpread$5(_objectSpread$5({}, event.channel), {}, {
|
|
3309
|
+
hidden: (_event$channel$hidden = (_event$channel = event.channel) === null || _event$channel === void 0 ? void 0 : _event$channel.hidden) !== null && _event$channel$hidden !== void 0 ? _event$channel$hidden : (_channel$data = channel.data) === null || _channel$data === void 0 ? void 0 : _channel$data.hidden,
|
|
3310
|
+
own_capabilities: (_event$channel$own_ca = (_event$channel2 = event.channel) === null || _event$channel2 === void 0 ? void 0 : _event$channel2.own_capabilities) !== null && _event$channel$own_ca !== void 0 ? _event$channel$own_ca : (_channel$data2 = channel.data) === null || _channel$data2 === void 0 ? void 0 : _channel$data2.own_capabilities
|
|
3311
|
+
});
|
|
3253
3312
|
}
|
|
3254
3313
|
|
|
3255
3314
|
break;
|
|
@@ -3436,7 +3495,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3436
3495
|
return Channel;
|
|
3437
3496
|
}();
|
|
3438
3497
|
|
|
3439
|
-
function _createForOfIteratorHelper$1(o, allowArrayLike) { var it
|
|
3498
|
+
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; } } }; }
|
|
3440
3499
|
|
|
3441
3500
|
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); }
|
|
3442
3501
|
|
|
@@ -3511,7 +3570,7 @@ var ClientState = /*#__PURE__*/function () {
|
|
|
3511
3570
|
return ClientState;
|
|
3512
3571
|
}();
|
|
3513
3572
|
|
|
3514
|
-
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; }
|
|
3573
|
+
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; }
|
|
3515
3574
|
|
|
3516
3575
|
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__default['default'](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; }
|
|
3517
3576
|
var InsightMetrics = function InsightMetrics() {
|
|
@@ -3625,7 +3684,7 @@ function buildWsSuccessAfterFailureInsight(connection) {
|
|
|
3625
3684
|
return buildWsBaseInsight(connection);
|
|
3626
3685
|
}
|
|
3627
3686
|
|
|
3628
|
-
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; }
|
|
3687
|
+
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; }
|
|
3629
3688
|
|
|
3630
3689
|
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__default['default'](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; }
|
|
3631
3690
|
|
|
@@ -4547,7 +4606,7 @@ var jwt = null;
|
|
|
4547
4606
|
|
|
4548
4607
|
var crypto$1 = null;
|
|
4549
4608
|
|
|
4550
|
-
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; }
|
|
4609
|
+
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; }
|
|
4551
4610
|
|
|
4552
4611
|
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__default['default'](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; }
|
|
4553
4612
|
|
|
@@ -4956,7 +5015,7 @@ function isWSFailure(err) {
|
|
|
4956
5015
|
}
|
|
4957
5016
|
}
|
|
4958
5017
|
|
|
4959
|
-
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; }
|
|
5018
|
+
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; }
|
|
4960
5019
|
|
|
4961
5020
|
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__default['default'](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; }
|
|
4962
5021
|
var ConnectionState;
|
|
@@ -5164,27 +5223,35 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5164
5223
|
reconnect = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : false;
|
|
5165
5224
|
|
|
5166
5225
|
if (!(_this.state === ConnectionState.Connecting)) {
|
|
5167
|
-
_context3.next =
|
|
5226
|
+
_context3.next = 4;
|
|
5168
5227
|
break;
|
|
5169
5228
|
}
|
|
5170
5229
|
|
|
5171
|
-
|
|
5230
|
+
_this._log('connect() - connecting already in progress', {
|
|
5231
|
+
reconnect: reconnect
|
|
5232
|
+
}, 'warn');
|
|
5172
5233
|
|
|
5173
|
-
|
|
5234
|
+
return _context3.abrupt("return");
|
|
5235
|
+
|
|
5236
|
+
case 4:
|
|
5174
5237
|
if (!(_this.state === ConnectionState.Connected)) {
|
|
5175
|
-
_context3.next =
|
|
5238
|
+
_context3.next = 7;
|
|
5176
5239
|
break;
|
|
5177
5240
|
}
|
|
5178
5241
|
|
|
5179
|
-
|
|
5242
|
+
_this._log('connect() - already connected and polling', {
|
|
5243
|
+
reconnect: reconnect
|
|
5244
|
+
}, 'warn');
|
|
5180
5245
|
|
|
5181
|
-
|
|
5246
|
+
return _context3.abrupt("return");
|
|
5247
|
+
|
|
5248
|
+
case 7:
|
|
5182
5249
|
_this._setState(ConnectionState.Connecting);
|
|
5183
5250
|
|
|
5184
5251
|
_this.connectionID = undefined; // connect should be sent with empty connection_id so API creates one
|
|
5185
5252
|
|
|
5186
|
-
_context3.prev =
|
|
5187
|
-
_context3.next =
|
|
5253
|
+
_context3.prev = 9;
|
|
5254
|
+
_context3.next = 12;
|
|
5188
5255
|
return _this._req({
|
|
5189
5256
|
json: _this.client._buildWSPayload()
|
|
5190
5257
|
}, {
|
|
@@ -5192,7 +5259,7 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5192
5259
|
}, // 8s
|
|
5193
5260
|
reconnect);
|
|
5194
5261
|
|
|
5195
|
-
case
|
|
5262
|
+
case 12:
|
|
5196
5263
|
_yield$_this$_req = _context3.sent;
|
|
5197
5264
|
event = _yield$_this$_req.event;
|
|
5198
5265
|
|
|
@@ -5208,30 +5275,31 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5208
5275
|
|
|
5209
5276
|
return _context3.abrupt("return", event);
|
|
5210
5277
|
|
|
5211
|
-
case
|
|
5212
|
-
_context3.prev =
|
|
5213
|
-
_context3.t0 = _context3["catch"](
|
|
5278
|
+
case 21:
|
|
5279
|
+
_context3.prev = 21;
|
|
5280
|
+
_context3.t0 = _context3["catch"](9);
|
|
5214
5281
|
|
|
5215
5282
|
_this._setState(ConnectionState.Closed);
|
|
5216
5283
|
|
|
5217
5284
|
throw _context3.t0;
|
|
5218
5285
|
|
|
5219
|
-
case
|
|
5286
|
+
case 25:
|
|
5220
5287
|
case "end":
|
|
5221
5288
|
return _context3.stop();
|
|
5222
5289
|
}
|
|
5223
5290
|
}
|
|
5224
|
-
}, _callee3, null, [[
|
|
5291
|
+
}, _callee3, null, [[9, 21]]);
|
|
5225
5292
|
})));
|
|
5226
5293
|
|
|
5227
5294
|
_defineProperty__default['default'](this, "isHealthy", function () {
|
|
5228
|
-
return _this.connectionID && _this.state === ConnectionState.Connected;
|
|
5295
|
+
return !!_this.connectionID && _this.state === ConnectionState.Connected;
|
|
5229
5296
|
});
|
|
5230
5297
|
|
|
5231
5298
|
_defineProperty__default['default'](this, "disconnect", /*#__PURE__*/_asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee4() {
|
|
5232
5299
|
var _this$cancelToken3;
|
|
5233
5300
|
|
|
5234
5301
|
var timeout,
|
|
5302
|
+
connection_id,
|
|
5235
5303
|
_args4 = arguments;
|
|
5236
5304
|
return _regeneratorRuntime__default['default'].wrap(function _callee4$(_context4) {
|
|
5237
5305
|
while (1) {
|
|
@@ -5244,36 +5312,37 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5244
5312
|
|
|
5245
5313
|
(_this$cancelToken3 = _this.cancelToken) === null || _this$cancelToken3 === void 0 ? void 0 : _this$cancelToken3.cancel('disconnect() is called');
|
|
5246
5314
|
_this.cancelToken = undefined;
|
|
5247
|
-
|
|
5248
|
-
|
|
5315
|
+
connection_id = _this.connectionID;
|
|
5316
|
+
_this.connectionID = undefined;
|
|
5317
|
+
_context4.prev = 7;
|
|
5318
|
+
_context4.next = 10;
|
|
5249
5319
|
return _this._req({
|
|
5250
|
-
close: true
|
|
5320
|
+
close: true,
|
|
5321
|
+
connection_id: connection_id
|
|
5251
5322
|
}, {
|
|
5252
5323
|
timeout: timeout
|
|
5253
5324
|
}, false);
|
|
5254
5325
|
|
|
5255
|
-
case
|
|
5256
|
-
_this.connectionID = undefined;
|
|
5257
|
-
|
|
5326
|
+
case 10:
|
|
5258
5327
|
_this._log("disconnect() - Closed connectionID");
|
|
5259
5328
|
|
|
5260
|
-
_context4.next =
|
|
5329
|
+
_context4.next = 16;
|
|
5261
5330
|
break;
|
|
5262
5331
|
|
|
5263
|
-
case
|
|
5264
|
-
_context4.prev =
|
|
5265
|
-
_context4.t0 = _context4["catch"](
|
|
5332
|
+
case 13:
|
|
5333
|
+
_context4.prev = 13;
|
|
5334
|
+
_context4.t0 = _context4["catch"](7);
|
|
5266
5335
|
|
|
5267
5336
|
_this._log("disconnect() - Failed", {
|
|
5268
5337
|
err: _context4.t0
|
|
5269
|
-
});
|
|
5338
|
+
}, 'error');
|
|
5270
5339
|
|
|
5271
|
-
case
|
|
5340
|
+
case 16:
|
|
5272
5341
|
case "end":
|
|
5273
5342
|
return _context4.stop();
|
|
5274
5343
|
}
|
|
5275
5344
|
}
|
|
5276
|
-
}, _callee4, null, [[
|
|
5345
|
+
}, _callee4, null, [[7, 13]]);
|
|
5277
5346
|
})));
|
|
5278
5347
|
|
|
5279
5348
|
this.client = client;
|
|
@@ -5322,13 +5391,15 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5322
5391
|
return WSConnectionFallback;
|
|
5323
5392
|
}();
|
|
5324
5393
|
|
|
5325
|
-
|
|
5394
|
+
var _excluded = ["created_at", "updated_at", "last_active", "online"];
|
|
5395
|
+
|
|
5396
|
+
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
5397
|
|
|
5327
5398
|
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
5399
|
|
|
5329
5400
|
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
5401
|
|
|
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; }
|
|
5402
|
+
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
5403
|
|
|
5333
5404
|
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__default['default'](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
5405
|
|
|
@@ -6086,8 +6157,6 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6086
6157
|
return JSON.stringify({
|
|
6087
6158
|
user_id: _this.userID,
|
|
6088
6159
|
user_details: _this._user,
|
|
6089
|
-
user_token: _this.tokenManager.getToken(),
|
|
6090
|
-
server_determines_connection_id: true,
|
|
6091
6160
|
device: _this.options.device,
|
|
6092
6161
|
client_request_id: client_request_id
|
|
6093
6162
|
});
|
|
@@ -6635,7 +6704,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6635
6704
|
case 11:
|
|
6636
6705
|
this.anonymous = false; // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6637
6706
|
|
|
6638
|
-
_response$user = response.user, _response$user.created_at, _response$user.updated_at, _response$user.last_active, _response$user.online, guestUser = _objectWithoutProperties__default['default'](_response$user,
|
|
6707
|
+
_response$user = response.user, _response$user.created_at, _response$user.updated_at, _response$user.last_active, _response$user.online, guestUser = _objectWithoutProperties__default['default'](_response$user, _excluded);
|
|
6639
6708
|
_context14.next = 15;
|
|
6640
6709
|
return this.connectUser(guestUser, response.access_token);
|
|
6641
6710
|
|
|
@@ -6998,23 +7067,41 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6998
7067
|
client: this
|
|
6999
7068
|
});
|
|
7000
7069
|
_context15.prev = 8;
|
|
7001
|
-
|
|
7070
|
+
|
|
7071
|
+
if (!this.wsFallback) {
|
|
7072
|
+
_context15.next = 13;
|
|
7073
|
+
break;
|
|
7074
|
+
}
|
|
7075
|
+
|
|
7076
|
+
_context15.next = 12;
|
|
7077
|
+
return this.wsFallback.connect();
|
|
7078
|
+
|
|
7079
|
+
case 12:
|
|
7080
|
+
return _context15.abrupt("return", _context15.sent);
|
|
7081
|
+
|
|
7082
|
+
case 13:
|
|
7083
|
+
_context15.next = 15;
|
|
7002
7084
|
return this.wsConnection.connect(this.options.enableWSFallback ? this.defaultWSTimeoutWithFallback : this.defaultWSTimeout);
|
|
7003
7085
|
|
|
7004
|
-
case
|
|
7086
|
+
case 15:
|
|
7005
7087
|
return _context15.abrupt("return", _context15.sent);
|
|
7006
7088
|
|
|
7007
|
-
case
|
|
7008
|
-
_context15.prev =
|
|
7089
|
+
case 18:
|
|
7090
|
+
_context15.prev = 18;
|
|
7009
7091
|
_context15.t0 = _context15["catch"](8);
|
|
7010
7092
|
|
|
7011
7093
|
if (!(this.options.enableWSFallback && isWSFailure(_context15.t0) && isOnline())) {
|
|
7012
|
-
_context15.next =
|
|
7094
|
+
_context15.next = 29;
|
|
7013
7095
|
break;
|
|
7014
7096
|
}
|
|
7015
7097
|
|
|
7016
7098
|
this.logger('info', 'client:connect() - WS failed, fallback to longpoll', {
|
|
7017
7099
|
tags: ['connection', 'client']
|
|
7100
|
+
}); // @ts-expect-error
|
|
7101
|
+
|
|
7102
|
+
this.dispatchEvent({
|
|
7103
|
+
type: 'transport.changed',
|
|
7104
|
+
mode: 'longpoll'
|
|
7018
7105
|
});
|
|
7019
7106
|
|
|
7020
7107
|
this.wsConnection._destroyCurrentWSConnection();
|
|
@@ -7024,21 +7111,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7024
7111
|
this.wsFallback = new WSConnectionFallback({
|
|
7025
7112
|
client: this
|
|
7026
7113
|
});
|
|
7027
|
-
_context15.next =
|
|
7114
|
+
_context15.next = 28;
|
|
7028
7115
|
return this.wsFallback.connect();
|
|
7029
7116
|
|
|
7030
|
-
case
|
|
7117
|
+
case 28:
|
|
7031
7118
|
return _context15.abrupt("return", _context15.sent);
|
|
7032
7119
|
|
|
7033
|
-
case
|
|
7120
|
+
case 29:
|
|
7034
7121
|
throw _context15.t0;
|
|
7035
7122
|
|
|
7036
|
-
case
|
|
7123
|
+
case 30:
|
|
7037
7124
|
case "end":
|
|
7038
7125
|
return _context15.stop();
|
|
7039
7126
|
}
|
|
7040
7127
|
}
|
|
7041
|
-
}, _callee15, this, [[8,
|
|
7128
|
+
}, _callee15, this, [[8, 18]]);
|
|
7042
7129
|
}));
|
|
7043
7130
|
|
|
7044
7131
|
function connect() {
|
|
@@ -8051,27 +8138,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8051
8138
|
while (1) {
|
|
8052
8139
|
switch (_context32.prev = _context32.next) {
|
|
8053
8140
|
case 0:
|
|
8054
|
-
|
|
8055
|
-
options.banned_by_id = options.user_id;
|
|
8056
|
-
delete options.user_id;
|
|
8057
|
-
console.warn("banUser: 'user_id' is deprecated, please consider switching to 'banned_by_id'");
|
|
8058
|
-
}
|
|
8059
|
-
|
|
8060
|
-
if ((options === null || options === void 0 ? void 0 : options.user) !== undefined) {
|
|
8061
|
-
options.banned_by = options.user;
|
|
8062
|
-
delete options.user;
|
|
8063
|
-
console.warn("banUser: 'user' is deprecated, please consider switching to 'banned_by'");
|
|
8064
|
-
}
|
|
8065
|
-
|
|
8066
|
-
_context32.next = 4;
|
|
8141
|
+
_context32.next = 2;
|
|
8067
8142
|
return this.post(this.baseURL + '/moderation/ban', _objectSpread({
|
|
8068
8143
|
target_user_id: targetUserID
|
|
8069
8144
|
}, options));
|
|
8070
8145
|
|
|
8071
|
-
case
|
|
8146
|
+
case 2:
|
|
8072
8147
|
return _context32.abrupt("return", _context32.sent);
|
|
8073
8148
|
|
|
8074
|
-
case
|
|
8149
|
+
case 3:
|
|
8075
8150
|
case "end":
|
|
8076
8151
|
return _context32.stop();
|
|
8077
8152
|
}
|
|
@@ -8457,6 +8532,101 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8457
8532
|
|
|
8458
8533
|
return unflagUser;
|
|
8459
8534
|
}()
|
|
8535
|
+
/**
|
|
8536
|
+
* _queryFlagReports - Query flag reports.
|
|
8537
|
+
*
|
|
8538
|
+
* Note: Do not use this.
|
|
8539
|
+
* It is present for internal usage only.
|
|
8540
|
+
* This function can, and will, break and/or be removed at any point in time.
|
|
8541
|
+
*
|
|
8542
|
+
* @param {FlagReportsFilters} filterConditions MongoDB style filter conditions
|
|
8543
|
+
* @param {FlagReportsPaginationOptions} options Option object, {limit: 10, offset:0}
|
|
8544
|
+
*
|
|
8545
|
+
* @return {Promise<FlagReportsResponse<ChannelType, CommandType, UserType>>} Flag Reports Response
|
|
8546
|
+
*/
|
|
8547
|
+
|
|
8548
|
+
}, {
|
|
8549
|
+
key: "_queryFlagReports",
|
|
8550
|
+
value: function () {
|
|
8551
|
+
var _queryFlagReports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee42() {
|
|
8552
|
+
var filterConditions,
|
|
8553
|
+
options,
|
|
8554
|
+
_args42 = arguments;
|
|
8555
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee42$(_context42) {
|
|
8556
|
+
while (1) {
|
|
8557
|
+
switch (_context42.prev = _context42.next) {
|
|
8558
|
+
case 0:
|
|
8559
|
+
filterConditions = _args42.length > 0 && _args42[0] !== undefined ? _args42[0] : {};
|
|
8560
|
+
options = _args42.length > 1 && _args42[1] !== undefined ? _args42[1] : {};
|
|
8561
|
+
_context42.next = 4;
|
|
8562
|
+
return this.post(this.baseURL + '/moderation/reports', _objectSpread({
|
|
8563
|
+
filter_conditions: filterConditions
|
|
8564
|
+
}, options));
|
|
8565
|
+
|
|
8566
|
+
case 4:
|
|
8567
|
+
return _context42.abrupt("return", _context42.sent);
|
|
8568
|
+
|
|
8569
|
+
case 5:
|
|
8570
|
+
case "end":
|
|
8571
|
+
return _context42.stop();
|
|
8572
|
+
}
|
|
8573
|
+
}
|
|
8574
|
+
}, _callee42, this);
|
|
8575
|
+
}));
|
|
8576
|
+
|
|
8577
|
+
function _queryFlagReports() {
|
|
8578
|
+
return _queryFlagReports2.apply(this, arguments);
|
|
8579
|
+
}
|
|
8580
|
+
|
|
8581
|
+
return _queryFlagReports;
|
|
8582
|
+
}()
|
|
8583
|
+
/**
|
|
8584
|
+
* _reviewFlagReport - review flag report
|
|
8585
|
+
*
|
|
8586
|
+
* Note: Do not use this.
|
|
8587
|
+
* It is present for internal usage only.
|
|
8588
|
+
* This function can, and will, break and/or be removed at any point in time.
|
|
8589
|
+
*
|
|
8590
|
+
* @param {string} [id] flag report to review
|
|
8591
|
+
* @param {string} [reviewResult] flag report review result
|
|
8592
|
+
* @param {string} [options.user_id] currentUserID, only used with serverside auth
|
|
8593
|
+
* @param {string} [options.review_details] custom information about review result
|
|
8594
|
+
* @returns {Promise<ReviewFlagReportResponse>>}
|
|
8595
|
+
*/
|
|
8596
|
+
|
|
8597
|
+
}, {
|
|
8598
|
+
key: "_reviewFlagReport",
|
|
8599
|
+
value: function () {
|
|
8600
|
+
var _reviewFlagReport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee43(id, reviewResult) {
|
|
8601
|
+
var options,
|
|
8602
|
+
_args43 = arguments;
|
|
8603
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee43$(_context43) {
|
|
8604
|
+
while (1) {
|
|
8605
|
+
switch (_context43.prev = _context43.next) {
|
|
8606
|
+
case 0:
|
|
8607
|
+
options = _args43.length > 2 && _args43[2] !== undefined ? _args43[2] : {};
|
|
8608
|
+
_context43.next = 3;
|
|
8609
|
+
return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
|
|
8610
|
+
review_result: reviewResult
|
|
8611
|
+
}, options));
|
|
8612
|
+
|
|
8613
|
+
case 3:
|
|
8614
|
+
return _context43.abrupt("return", _context43.sent);
|
|
8615
|
+
|
|
8616
|
+
case 4:
|
|
8617
|
+
case "end":
|
|
8618
|
+
return _context43.stop();
|
|
8619
|
+
}
|
|
8620
|
+
}
|
|
8621
|
+
}, _callee43, this);
|
|
8622
|
+
}));
|
|
8623
|
+
|
|
8624
|
+
function _reviewFlagReport(_x54, _x55) {
|
|
8625
|
+
return _reviewFlagReport2.apply(this, arguments);
|
|
8626
|
+
}
|
|
8627
|
+
|
|
8628
|
+
return _reviewFlagReport;
|
|
8629
|
+
}()
|
|
8460
8630
|
/**
|
|
8461
8631
|
* @deprecated use markChannelsRead instead
|
|
8462
8632
|
*
|
|
@@ -8478,23 +8648,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8478
8648
|
* @return {Promise<APIResponse>}
|
|
8479
8649
|
*/
|
|
8480
8650
|
function () {
|
|
8481
|
-
var _markChannelsRead = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8651
|
+
var _markChannelsRead = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee44() {
|
|
8482
8652
|
var data,
|
|
8483
|
-
|
|
8484
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8653
|
+
_args44 = arguments;
|
|
8654
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee44$(_context44) {
|
|
8485
8655
|
while (1) {
|
|
8486
|
-
switch (
|
|
8656
|
+
switch (_context44.prev = _context44.next) {
|
|
8487
8657
|
case 0:
|
|
8488
|
-
data =
|
|
8489
|
-
|
|
8658
|
+
data = _args44.length > 0 && _args44[0] !== undefined ? _args44[0] : {};
|
|
8659
|
+
_context44.next = 3;
|
|
8490
8660
|
return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
|
|
8491
8661
|
|
|
8492
8662
|
case 3:
|
|
8493
8663
|
case "end":
|
|
8494
|
-
return
|
|
8664
|
+
return _context44.stop();
|
|
8495
8665
|
}
|
|
8496
8666
|
}
|
|
8497
|
-
},
|
|
8667
|
+
}, _callee44, this);
|
|
8498
8668
|
}));
|
|
8499
8669
|
|
|
8500
8670
|
function markChannelsRead() {
|
|
@@ -8569,28 +8739,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8569
8739
|
}, {
|
|
8570
8740
|
key: "translateMessage",
|
|
8571
8741
|
value: function () {
|
|
8572
|
-
var _translateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8573
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8742
|
+
var _translateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee45(messageId, language) {
|
|
8743
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee45$(_context45) {
|
|
8574
8744
|
while (1) {
|
|
8575
|
-
switch (
|
|
8745
|
+
switch (_context45.prev = _context45.next) {
|
|
8576
8746
|
case 0:
|
|
8577
|
-
|
|
8747
|
+
_context45.next = 2;
|
|
8578
8748
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
|
|
8579
8749
|
language: language
|
|
8580
8750
|
});
|
|
8581
8751
|
|
|
8582
8752
|
case 2:
|
|
8583
|
-
return
|
|
8753
|
+
return _context45.abrupt("return", _context45.sent);
|
|
8584
8754
|
|
|
8585
8755
|
case 3:
|
|
8586
8756
|
case "end":
|
|
8587
|
-
return
|
|
8757
|
+
return _context45.stop();
|
|
8588
8758
|
}
|
|
8589
8759
|
}
|
|
8590
|
-
},
|
|
8760
|
+
}, _callee45, this);
|
|
8591
8761
|
}));
|
|
8592
8762
|
|
|
8593
|
-
function translateMessage(
|
|
8763
|
+
function translateMessage(_x56, _x57) {
|
|
8594
8764
|
return _translateMessage.apply(this, arguments);
|
|
8595
8765
|
}
|
|
8596
8766
|
|
|
@@ -8604,7 +8774,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8604
8774
|
}, {
|
|
8605
8775
|
key: "_normalizeExpiration",
|
|
8606
8776
|
value: function _normalizeExpiration(timeoutOrExpirationDate) {
|
|
8607
|
-
var pinExpires;
|
|
8777
|
+
var pinExpires = null;
|
|
8608
8778
|
|
|
8609
8779
|
if (typeof timeoutOrExpirationDate === 'number') {
|
|
8610
8780
|
var now = new Date();
|
|
@@ -8645,20 +8815,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8645
8815
|
* pinMessage - pins the message
|
|
8646
8816
|
* @param {string | { id: string }} messageOrMessageId message object or message id
|
|
8647
8817
|
* @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
|
|
8648
|
-
* @param {string | { id: string }} [
|
|
8818
|
+
* @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
|
|
8819
|
+
* @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
|
|
8649
8820
|
*/
|
|
8650
8821
|
|
|
8651
8822
|
}, {
|
|
8652
8823
|
key: "pinMessage",
|
|
8653
|
-
value: function pinMessage(messageOrMessageId, timeoutOrExpirationDate,
|
|
8824
|
+
value: function pinMessage(messageOrMessageId, timeoutOrExpirationDate, pinnedBy, pinnedAt) {
|
|
8654
8825
|
var messageId = this._validateAndGetMessageId(messageOrMessageId, 'Please specify the message id when calling unpinMessage');
|
|
8655
8826
|
|
|
8656
8827
|
return this.partialUpdateMessage(messageId, {
|
|
8657
8828
|
set: {
|
|
8658
8829
|
pinned: true,
|
|
8659
|
-
pin_expires: this._normalizeExpiration(timeoutOrExpirationDate)
|
|
8830
|
+
pin_expires: this._normalizeExpiration(timeoutOrExpirationDate),
|
|
8831
|
+
pinned_at: this._normalizeExpiration(pinnedAt)
|
|
8660
8832
|
}
|
|
8661
|
-
},
|
|
8833
|
+
}, pinnedBy);
|
|
8662
8834
|
}
|
|
8663
8835
|
/**
|
|
8664
8836
|
* unpinMessage - unpins the message that was previously pinned
|
|
@@ -8690,14 +8862,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8690
8862
|
}, {
|
|
8691
8863
|
key: "updateMessage",
|
|
8692
8864
|
value: function () {
|
|
8693
|
-
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8865
|
+
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee46(message, userId, options) {
|
|
8694
8866
|
var clonedMessage, reservedMessageFields;
|
|
8695
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8867
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee46$(_context46) {
|
|
8696
8868
|
while (1) {
|
|
8697
|
-
switch (
|
|
8869
|
+
switch (_context46.prev = _context46.next) {
|
|
8698
8870
|
case 0:
|
|
8699
8871
|
if (message.id) {
|
|
8700
|
-
|
|
8872
|
+
_context46.next = 2;
|
|
8701
8873
|
break;
|
|
8702
8874
|
}
|
|
8703
8875
|
|
|
@@ -8734,23 +8906,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8734
8906
|
});
|
|
8735
8907
|
}
|
|
8736
8908
|
|
|
8737
|
-
|
|
8909
|
+
_context46.next = 10;
|
|
8738
8910
|
return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
|
|
8739
8911
|
message: clonedMessage
|
|
8740
8912
|
}, options));
|
|
8741
8913
|
|
|
8742
8914
|
case 10:
|
|
8743
|
-
return
|
|
8915
|
+
return _context46.abrupt("return", _context46.sent);
|
|
8744
8916
|
|
|
8745
8917
|
case 11:
|
|
8746
8918
|
case "end":
|
|
8747
|
-
return
|
|
8919
|
+
return _context46.stop();
|
|
8748
8920
|
}
|
|
8749
8921
|
}
|
|
8750
|
-
},
|
|
8922
|
+
}, _callee46, this);
|
|
8751
8923
|
}));
|
|
8752
8924
|
|
|
8753
|
-
function updateMessage(
|
|
8925
|
+
function updateMessage(_x58, _x59, _x60) {
|
|
8754
8926
|
return _updateMessage.apply(this, arguments);
|
|
8755
8927
|
}
|
|
8756
8928
|
|
|
@@ -8773,14 +8945,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8773
8945
|
}, {
|
|
8774
8946
|
key: "partialUpdateMessage",
|
|
8775
8947
|
value: function () {
|
|
8776
|
-
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8948
|
+
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee47(id, partialMessageObject, userId, options) {
|
|
8777
8949
|
var user;
|
|
8778
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8950
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee47$(_context47) {
|
|
8779
8951
|
while (1) {
|
|
8780
|
-
switch (
|
|
8952
|
+
switch (_context47.prev = _context47.next) {
|
|
8781
8953
|
case 0:
|
|
8782
8954
|
if (id) {
|
|
8783
|
-
|
|
8955
|
+
_context47.next = 2;
|
|
8784
8956
|
break;
|
|
8785
8957
|
}
|
|
8786
8958
|
|
|
@@ -8795,23 +8967,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8795
8967
|
};
|
|
8796
8968
|
}
|
|
8797
8969
|
|
|
8798
|
-
|
|
8970
|
+
_context47.next = 6;
|
|
8799
8971
|
return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
8800
8972
|
user: user
|
|
8801
8973
|
}));
|
|
8802
8974
|
|
|
8803
8975
|
case 6:
|
|
8804
|
-
return
|
|
8976
|
+
return _context47.abrupt("return", _context47.sent);
|
|
8805
8977
|
|
|
8806
8978
|
case 7:
|
|
8807
8979
|
case "end":
|
|
8808
|
-
return
|
|
8980
|
+
return _context47.stop();
|
|
8809
8981
|
}
|
|
8810
8982
|
}
|
|
8811
|
-
},
|
|
8983
|
+
}, _callee47, this);
|
|
8812
8984
|
}));
|
|
8813
8985
|
|
|
8814
|
-
function partialUpdateMessage(
|
|
8986
|
+
function partialUpdateMessage(_x61, _x62, _x63, _x64) {
|
|
8815
8987
|
return _partialUpdateMessage.apply(this, arguments);
|
|
8816
8988
|
}
|
|
8817
8989
|
|
|
@@ -8820,11 +8992,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8820
8992
|
}, {
|
|
8821
8993
|
key: "deleteMessage",
|
|
8822
8994
|
value: function () {
|
|
8823
|
-
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8995
|
+
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee48(messageID, hardDelete) {
|
|
8824
8996
|
var params;
|
|
8825
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8997
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee48$(_context48) {
|
|
8826
8998
|
while (1) {
|
|
8827
|
-
switch (
|
|
8999
|
+
switch (_context48.prev = _context48.next) {
|
|
8828
9000
|
case 0:
|
|
8829
9001
|
params = {};
|
|
8830
9002
|
|
|
@@ -8834,21 +9006,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8834
9006
|
};
|
|
8835
9007
|
}
|
|
8836
9008
|
|
|
8837
|
-
|
|
9009
|
+
_context48.next = 4;
|
|
8838
9010
|
return this.delete(this.baseURL + "/messages/".concat(messageID), params);
|
|
8839
9011
|
|
|
8840
9012
|
case 4:
|
|
8841
|
-
return
|
|
9013
|
+
return _context48.abrupt("return", _context48.sent);
|
|
8842
9014
|
|
|
8843
9015
|
case 5:
|
|
8844
9016
|
case "end":
|
|
8845
|
-
return
|
|
9017
|
+
return _context48.stop();
|
|
8846
9018
|
}
|
|
8847
9019
|
}
|
|
8848
|
-
},
|
|
9020
|
+
}, _callee48, this);
|
|
8849
9021
|
}));
|
|
8850
9022
|
|
|
8851
|
-
function deleteMessage(
|
|
9023
|
+
function deleteMessage(_x65, _x66) {
|
|
8852
9024
|
return _deleteMessage.apply(this, arguments);
|
|
8853
9025
|
}
|
|
8854
9026
|
|
|
@@ -8857,26 +9029,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8857
9029
|
}, {
|
|
8858
9030
|
key: "getMessage",
|
|
8859
9031
|
value: function () {
|
|
8860
|
-
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8861
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9032
|
+
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee49(messageID) {
|
|
9033
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee49$(_context49) {
|
|
8862
9034
|
while (1) {
|
|
8863
|
-
switch (
|
|
9035
|
+
switch (_context49.prev = _context49.next) {
|
|
8864
9036
|
case 0:
|
|
8865
|
-
|
|
9037
|
+
_context49.next = 2;
|
|
8866
9038
|
return this.get(this.baseURL + "/messages/".concat(messageID));
|
|
8867
9039
|
|
|
8868
9040
|
case 2:
|
|
8869
|
-
return
|
|
9041
|
+
return _context49.abrupt("return", _context49.sent);
|
|
8870
9042
|
|
|
8871
9043
|
case 3:
|
|
8872
9044
|
case "end":
|
|
8873
|
-
return
|
|
9045
|
+
return _context49.stop();
|
|
8874
9046
|
}
|
|
8875
9047
|
}
|
|
8876
|
-
},
|
|
9048
|
+
}, _callee49, this);
|
|
8877
9049
|
}));
|
|
8878
9050
|
|
|
8879
|
-
function getMessage(
|
|
9051
|
+
function getMessage(_x67) {
|
|
8880
9052
|
return _getMessage.apply(this, arguments);
|
|
8881
9053
|
}
|
|
8882
9054
|
|
|
@@ -8885,7 +9057,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8885
9057
|
}, {
|
|
8886
9058
|
key: "getUserAgent",
|
|
8887
9059
|
value: function getUserAgent() {
|
|
8888
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "
|
|
9060
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.1.1");
|
|
8889
9061
|
}
|
|
8890
9062
|
}, {
|
|
8891
9063
|
key: "setUserAgent",
|
|
@@ -8920,12 +9092,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8920
9092
|
}
|
|
8921
9093
|
|
|
8922
9094
|
return _objectSpread({
|
|
8923
|
-
params: _objectSpread(
|
|
8924
|
-
user_id: this.userID
|
|
8925
|
-
|
|
8926
|
-
api_key: this.key
|
|
8927
|
-
|
|
8928
|
-
}),
|
|
9095
|
+
params: _objectSpread({
|
|
9096
|
+
user_id: this.userID,
|
|
9097
|
+
connection_id: this._getConnectionID(),
|
|
9098
|
+
api_key: this.key
|
|
9099
|
+
}, options.params),
|
|
8929
9100
|
headers: _objectSpread(_objectSpread({}, authorization), {}, {
|
|
8930
9101
|
'stream-auth-type': this.getAuthType(),
|
|
8931
9102
|
'X-Stream-Client': this.getUserAgent()
|
|
@@ -9081,28 +9252,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9081
9252
|
}, {
|
|
9082
9253
|
key: "sendUserCustomEvent",
|
|
9083
9254
|
value: function () {
|
|
9084
|
-
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9085
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9255
|
+
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee50(targetUserID, event) {
|
|
9256
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee50$(_context50) {
|
|
9086
9257
|
while (1) {
|
|
9087
|
-
switch (
|
|
9258
|
+
switch (_context50.prev = _context50.next) {
|
|
9088
9259
|
case 0:
|
|
9089
|
-
|
|
9260
|
+
_context50.next = 2;
|
|
9090
9261
|
return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
|
|
9091
9262
|
event: event
|
|
9092
9263
|
});
|
|
9093
9264
|
|
|
9094
9265
|
case 2:
|
|
9095
|
-
return
|
|
9266
|
+
return _context50.abrupt("return", _context50.sent);
|
|
9096
9267
|
|
|
9097
9268
|
case 3:
|
|
9098
9269
|
case "end":
|
|
9099
|
-
return
|
|
9270
|
+
return _context50.stop();
|
|
9100
9271
|
}
|
|
9101
9272
|
}
|
|
9102
|
-
},
|
|
9273
|
+
}, _callee50, this);
|
|
9103
9274
|
}));
|
|
9104
9275
|
|
|
9105
|
-
function sendUserCustomEvent(
|
|
9276
|
+
function sendUserCustomEvent(_x68, _x69) {
|
|
9106
9277
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
9107
9278
|
}
|
|
9108
9279
|
|
|
@@ -9165,32 +9336,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9165
9336
|
}, {
|
|
9166
9337
|
key: "createSegment",
|
|
9167
9338
|
value: function () {
|
|
9168
|
-
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9339
|
+
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee51(params) {
|
|
9169
9340
|
var _yield$this$post, segment;
|
|
9170
9341
|
|
|
9171
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9342
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee51$(_context51) {
|
|
9172
9343
|
while (1) {
|
|
9173
|
-
switch (
|
|
9344
|
+
switch (_context51.prev = _context51.next) {
|
|
9174
9345
|
case 0:
|
|
9175
|
-
|
|
9346
|
+
_context51.next = 2;
|
|
9176
9347
|
return this.post(this.baseURL + "/segments", {
|
|
9177
9348
|
segment: params
|
|
9178
9349
|
});
|
|
9179
9350
|
|
|
9180
9351
|
case 2:
|
|
9181
|
-
_yield$this$post =
|
|
9352
|
+
_yield$this$post = _context51.sent;
|
|
9182
9353
|
segment = _yield$this$post.segment;
|
|
9183
|
-
return
|
|
9354
|
+
return _context51.abrupt("return", segment);
|
|
9184
9355
|
|
|
9185
9356
|
case 5:
|
|
9186
9357
|
case "end":
|
|
9187
|
-
return
|
|
9358
|
+
return _context51.stop();
|
|
9188
9359
|
}
|
|
9189
9360
|
}
|
|
9190
|
-
},
|
|
9361
|
+
}, _callee51, this);
|
|
9191
9362
|
}));
|
|
9192
9363
|
|
|
9193
|
-
function createSegment(
|
|
9364
|
+
function createSegment(_x70) {
|
|
9194
9365
|
return _createSegment.apply(this, arguments);
|
|
9195
9366
|
}
|
|
9196
9367
|
|
|
@@ -9207,30 +9378,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9207
9378
|
}, {
|
|
9208
9379
|
key: "getSegment",
|
|
9209
9380
|
value: function () {
|
|
9210
|
-
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9381
|
+
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee52(id) {
|
|
9211
9382
|
var _yield$this$get, segment;
|
|
9212
9383
|
|
|
9213
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9384
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee52$(_context52) {
|
|
9214
9385
|
while (1) {
|
|
9215
|
-
switch (
|
|
9386
|
+
switch (_context52.prev = _context52.next) {
|
|
9216
9387
|
case 0:
|
|
9217
|
-
|
|
9388
|
+
_context52.next = 2;
|
|
9218
9389
|
return this.get(this.baseURL + "/segments/".concat(id));
|
|
9219
9390
|
|
|
9220
9391
|
case 2:
|
|
9221
|
-
_yield$this$get =
|
|
9392
|
+
_yield$this$get = _context52.sent;
|
|
9222
9393
|
segment = _yield$this$get.segment;
|
|
9223
|
-
return
|
|
9394
|
+
return _context52.abrupt("return", segment);
|
|
9224
9395
|
|
|
9225
9396
|
case 5:
|
|
9226
9397
|
case "end":
|
|
9227
|
-
return
|
|
9398
|
+
return _context52.stop();
|
|
9228
9399
|
}
|
|
9229
9400
|
}
|
|
9230
|
-
},
|
|
9401
|
+
}, _callee52, this);
|
|
9231
9402
|
}));
|
|
9232
9403
|
|
|
9233
|
-
function getSegment(
|
|
9404
|
+
function getSegment(_x71) {
|
|
9234
9405
|
return _getSegment.apply(this, arguments);
|
|
9235
9406
|
}
|
|
9236
9407
|
|
|
@@ -9246,30 +9417,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9246
9417
|
}, {
|
|
9247
9418
|
key: "listSegments",
|
|
9248
9419
|
value: function () {
|
|
9249
|
-
var _listSegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9420
|
+
var _listSegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee53(options) {
|
|
9250
9421
|
var _yield$this$get2, segments;
|
|
9251
9422
|
|
|
9252
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9423
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee53$(_context53) {
|
|
9253
9424
|
while (1) {
|
|
9254
|
-
switch (
|
|
9425
|
+
switch (_context53.prev = _context53.next) {
|
|
9255
9426
|
case 0:
|
|
9256
|
-
|
|
9427
|
+
_context53.next = 2;
|
|
9257
9428
|
return this.get(this.baseURL + "/segments", options);
|
|
9258
9429
|
|
|
9259
9430
|
case 2:
|
|
9260
|
-
_yield$this$get2 =
|
|
9431
|
+
_yield$this$get2 = _context53.sent;
|
|
9261
9432
|
segments = _yield$this$get2.segments;
|
|
9262
|
-
return
|
|
9433
|
+
return _context53.abrupt("return", segments);
|
|
9263
9434
|
|
|
9264
9435
|
case 5:
|
|
9265
9436
|
case "end":
|
|
9266
|
-
return
|
|
9437
|
+
return _context53.stop();
|
|
9267
9438
|
}
|
|
9268
9439
|
}
|
|
9269
|
-
},
|
|
9440
|
+
}, _callee53, this);
|
|
9270
9441
|
}));
|
|
9271
9442
|
|
|
9272
|
-
function listSegments(
|
|
9443
|
+
function listSegments(_x72) {
|
|
9273
9444
|
return _listSegments.apply(this, arguments);
|
|
9274
9445
|
}
|
|
9275
9446
|
|
|
@@ -9287,32 +9458,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9287
9458
|
}, {
|
|
9288
9459
|
key: "updateSegment",
|
|
9289
9460
|
value: function () {
|
|
9290
|
-
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9461
|
+
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee54(id, params) {
|
|
9291
9462
|
var _yield$this$put, segment;
|
|
9292
9463
|
|
|
9293
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9464
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee54$(_context54) {
|
|
9294
9465
|
while (1) {
|
|
9295
|
-
switch (
|
|
9466
|
+
switch (_context54.prev = _context54.next) {
|
|
9296
9467
|
case 0:
|
|
9297
|
-
|
|
9468
|
+
_context54.next = 2;
|
|
9298
9469
|
return this.put(this.baseURL + "/segments/".concat(id), {
|
|
9299
9470
|
segment: params
|
|
9300
9471
|
});
|
|
9301
9472
|
|
|
9302
9473
|
case 2:
|
|
9303
|
-
_yield$this$put =
|
|
9474
|
+
_yield$this$put = _context54.sent;
|
|
9304
9475
|
segment = _yield$this$put.segment;
|
|
9305
|
-
return
|
|
9476
|
+
return _context54.abrupt("return", segment);
|
|
9306
9477
|
|
|
9307
9478
|
case 5:
|
|
9308
9479
|
case "end":
|
|
9309
|
-
return
|
|
9480
|
+
return _context54.stop();
|
|
9310
9481
|
}
|
|
9311
9482
|
}
|
|
9312
|
-
},
|
|
9483
|
+
}, _callee54, this);
|
|
9313
9484
|
}));
|
|
9314
9485
|
|
|
9315
|
-
function updateSegment(
|
|
9486
|
+
function updateSegment(_x73, _x74) {
|
|
9316
9487
|
return _updateSegment.apply(this, arguments);
|
|
9317
9488
|
}
|
|
9318
9489
|
|
|
@@ -9329,22 +9500,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9329
9500
|
}, {
|
|
9330
9501
|
key: "deleteSegment",
|
|
9331
9502
|
value: function () {
|
|
9332
|
-
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9333
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9503
|
+
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee55(id) {
|
|
9504
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee55$(_context55) {
|
|
9334
9505
|
while (1) {
|
|
9335
|
-
switch (
|
|
9506
|
+
switch (_context55.prev = _context55.next) {
|
|
9336
9507
|
case 0:
|
|
9337
|
-
return
|
|
9508
|
+
return _context55.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
|
|
9338
9509
|
|
|
9339
9510
|
case 1:
|
|
9340
9511
|
case "end":
|
|
9341
|
-
return
|
|
9512
|
+
return _context55.stop();
|
|
9342
9513
|
}
|
|
9343
9514
|
}
|
|
9344
|
-
},
|
|
9515
|
+
}, _callee55, this);
|
|
9345
9516
|
}));
|
|
9346
9517
|
|
|
9347
|
-
function deleteSegment(
|
|
9518
|
+
function deleteSegment(_x75) {
|
|
9348
9519
|
return _deleteSegment.apply(this, arguments);
|
|
9349
9520
|
}
|
|
9350
9521
|
|
|
@@ -9361,32 +9532,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9361
9532
|
}, {
|
|
9362
9533
|
key: "createCampaign",
|
|
9363
9534
|
value: function () {
|
|
9364
|
-
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9535
|
+
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee56(params) {
|
|
9365
9536
|
var _yield$this$post2, campaign;
|
|
9366
9537
|
|
|
9367
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9538
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee56$(_context56) {
|
|
9368
9539
|
while (1) {
|
|
9369
|
-
switch (
|
|
9540
|
+
switch (_context56.prev = _context56.next) {
|
|
9370
9541
|
case 0:
|
|
9371
|
-
|
|
9542
|
+
_context56.next = 2;
|
|
9372
9543
|
return this.post(this.baseURL + "/campaigns", {
|
|
9373
9544
|
campaign: params
|
|
9374
9545
|
});
|
|
9375
9546
|
|
|
9376
9547
|
case 2:
|
|
9377
|
-
_yield$this$post2 =
|
|
9548
|
+
_yield$this$post2 = _context56.sent;
|
|
9378
9549
|
campaign = _yield$this$post2.campaign;
|
|
9379
|
-
return
|
|
9550
|
+
return _context56.abrupt("return", campaign);
|
|
9380
9551
|
|
|
9381
9552
|
case 5:
|
|
9382
9553
|
case "end":
|
|
9383
|
-
return
|
|
9554
|
+
return _context56.stop();
|
|
9384
9555
|
}
|
|
9385
9556
|
}
|
|
9386
|
-
},
|
|
9557
|
+
}, _callee56, this);
|
|
9387
9558
|
}));
|
|
9388
9559
|
|
|
9389
|
-
function createCampaign(
|
|
9560
|
+
function createCampaign(_x76) {
|
|
9390
9561
|
return _createCampaign.apply(this, arguments);
|
|
9391
9562
|
}
|
|
9392
9563
|
|
|
@@ -9403,30 +9574,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9403
9574
|
}, {
|
|
9404
9575
|
key: "getCampaign",
|
|
9405
9576
|
value: function () {
|
|
9406
|
-
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9577
|
+
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee57(id) {
|
|
9407
9578
|
var _yield$this$get3, campaign;
|
|
9408
9579
|
|
|
9409
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9580
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee57$(_context57) {
|
|
9410
9581
|
while (1) {
|
|
9411
|
-
switch (
|
|
9582
|
+
switch (_context57.prev = _context57.next) {
|
|
9412
9583
|
case 0:
|
|
9413
|
-
|
|
9584
|
+
_context57.next = 2;
|
|
9414
9585
|
return this.get(this.baseURL + "/campaigns/".concat(id));
|
|
9415
9586
|
|
|
9416
9587
|
case 2:
|
|
9417
|
-
_yield$this$get3 =
|
|
9588
|
+
_yield$this$get3 = _context57.sent;
|
|
9418
9589
|
campaign = _yield$this$get3.campaign;
|
|
9419
|
-
return
|
|
9590
|
+
return _context57.abrupt("return", campaign);
|
|
9420
9591
|
|
|
9421
9592
|
case 5:
|
|
9422
9593
|
case "end":
|
|
9423
|
-
return
|
|
9594
|
+
return _context57.stop();
|
|
9424
9595
|
}
|
|
9425
9596
|
}
|
|
9426
|
-
},
|
|
9597
|
+
}, _callee57, this);
|
|
9427
9598
|
}));
|
|
9428
9599
|
|
|
9429
|
-
function getCampaign(
|
|
9600
|
+
function getCampaign(_x77) {
|
|
9430
9601
|
return _getCampaign.apply(this, arguments);
|
|
9431
9602
|
}
|
|
9432
9603
|
|
|
@@ -9442,30 +9613,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9442
9613
|
}, {
|
|
9443
9614
|
key: "listCampaigns",
|
|
9444
9615
|
value: function () {
|
|
9445
|
-
var _listCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9616
|
+
var _listCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee58(options) {
|
|
9446
9617
|
var _yield$this$get4, campaigns;
|
|
9447
9618
|
|
|
9448
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9619
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee58$(_context58) {
|
|
9449
9620
|
while (1) {
|
|
9450
|
-
switch (
|
|
9621
|
+
switch (_context58.prev = _context58.next) {
|
|
9451
9622
|
case 0:
|
|
9452
|
-
|
|
9623
|
+
_context58.next = 2;
|
|
9453
9624
|
return this.get(this.baseURL + "/campaigns", options);
|
|
9454
9625
|
|
|
9455
9626
|
case 2:
|
|
9456
|
-
_yield$this$get4 =
|
|
9627
|
+
_yield$this$get4 = _context58.sent;
|
|
9457
9628
|
campaigns = _yield$this$get4.campaigns;
|
|
9458
|
-
return
|
|
9629
|
+
return _context58.abrupt("return", campaigns);
|
|
9459
9630
|
|
|
9460
9631
|
case 5:
|
|
9461
9632
|
case "end":
|
|
9462
|
-
return
|
|
9633
|
+
return _context58.stop();
|
|
9463
9634
|
}
|
|
9464
9635
|
}
|
|
9465
|
-
},
|
|
9636
|
+
}, _callee58, this);
|
|
9466
9637
|
}));
|
|
9467
9638
|
|
|
9468
|
-
function listCampaigns(
|
|
9639
|
+
function listCampaigns(_x78) {
|
|
9469
9640
|
return _listCampaigns.apply(this, arguments);
|
|
9470
9641
|
}
|
|
9471
9642
|
|
|
@@ -9483,32 +9654,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9483
9654
|
}, {
|
|
9484
9655
|
key: "updateCampaign",
|
|
9485
9656
|
value: function () {
|
|
9486
|
-
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9657
|
+
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee59(id, params) {
|
|
9487
9658
|
var _yield$this$put2, campaign;
|
|
9488
9659
|
|
|
9489
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9660
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee59$(_context59) {
|
|
9490
9661
|
while (1) {
|
|
9491
|
-
switch (
|
|
9662
|
+
switch (_context59.prev = _context59.next) {
|
|
9492
9663
|
case 0:
|
|
9493
|
-
|
|
9664
|
+
_context59.next = 2;
|
|
9494
9665
|
return this.put(this.baseURL + "/campaigns/".concat(id), {
|
|
9495
9666
|
campaign: params
|
|
9496
9667
|
});
|
|
9497
9668
|
|
|
9498
9669
|
case 2:
|
|
9499
|
-
_yield$this$put2 =
|
|
9670
|
+
_yield$this$put2 = _context59.sent;
|
|
9500
9671
|
campaign = _yield$this$put2.campaign;
|
|
9501
|
-
return
|
|
9672
|
+
return _context59.abrupt("return", campaign);
|
|
9502
9673
|
|
|
9503
9674
|
case 5:
|
|
9504
9675
|
case "end":
|
|
9505
|
-
return
|
|
9676
|
+
return _context59.stop();
|
|
9506
9677
|
}
|
|
9507
9678
|
}
|
|
9508
|
-
},
|
|
9679
|
+
}, _callee59, this);
|
|
9509
9680
|
}));
|
|
9510
9681
|
|
|
9511
|
-
function updateCampaign(
|
|
9682
|
+
function updateCampaign(_x79, _x80) {
|
|
9512
9683
|
return _updateCampaign.apply(this, arguments);
|
|
9513
9684
|
}
|
|
9514
9685
|
|
|
@@ -9525,22 +9696,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9525
9696
|
}, {
|
|
9526
9697
|
key: "deleteCampaign",
|
|
9527
9698
|
value: function () {
|
|
9528
|
-
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9529
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9699
|
+
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee60(id) {
|
|
9700
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee60$(_context60) {
|
|
9530
9701
|
while (1) {
|
|
9531
|
-
switch (
|
|
9702
|
+
switch (_context60.prev = _context60.next) {
|
|
9532
9703
|
case 0:
|
|
9533
|
-
return
|
|
9704
|
+
return _context60.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
|
|
9534
9705
|
|
|
9535
9706
|
case 1:
|
|
9536
9707
|
case "end":
|
|
9537
|
-
return
|
|
9708
|
+
return _context60.stop();
|
|
9538
9709
|
}
|
|
9539
9710
|
}
|
|
9540
|
-
},
|
|
9711
|
+
}, _callee60, this);
|
|
9541
9712
|
}));
|
|
9542
9713
|
|
|
9543
|
-
function deleteCampaign(
|
|
9714
|
+
function deleteCampaign(_x81) {
|
|
9544
9715
|
return _deleteCampaign.apply(this, arguments);
|
|
9545
9716
|
}
|
|
9546
9717
|
|
|
@@ -9558,33 +9729,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9558
9729
|
}, {
|
|
9559
9730
|
key: "scheduleCampaign",
|
|
9560
9731
|
value: function () {
|
|
9561
|
-
var _scheduleCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9732
|
+
var _scheduleCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee61(id, params) {
|
|
9562
9733
|
var sendAt, _yield$this$patch, campaign;
|
|
9563
9734
|
|
|
9564
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9735
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee61$(_context61) {
|
|
9565
9736
|
while (1) {
|
|
9566
|
-
switch (
|
|
9737
|
+
switch (_context61.prev = _context61.next) {
|
|
9567
9738
|
case 0:
|
|
9568
9739
|
sendAt = params.sendAt;
|
|
9569
|
-
|
|
9740
|
+
_context61.next = 3;
|
|
9570
9741
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
|
|
9571
9742
|
send_at: sendAt
|
|
9572
9743
|
});
|
|
9573
9744
|
|
|
9574
9745
|
case 3:
|
|
9575
|
-
_yield$this$patch =
|
|
9746
|
+
_yield$this$patch = _context61.sent;
|
|
9576
9747
|
campaign = _yield$this$patch.campaign;
|
|
9577
|
-
return
|
|
9748
|
+
return _context61.abrupt("return", campaign);
|
|
9578
9749
|
|
|
9579
9750
|
case 6:
|
|
9580
9751
|
case "end":
|
|
9581
|
-
return
|
|
9752
|
+
return _context61.stop();
|
|
9582
9753
|
}
|
|
9583
9754
|
}
|
|
9584
|
-
},
|
|
9755
|
+
}, _callee61, this);
|
|
9585
9756
|
}));
|
|
9586
9757
|
|
|
9587
|
-
function scheduleCampaign(
|
|
9758
|
+
function scheduleCampaign(_x82, _x83) {
|
|
9588
9759
|
return _scheduleCampaign.apply(this, arguments);
|
|
9589
9760
|
}
|
|
9590
9761
|
|
|
@@ -9601,30 +9772,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9601
9772
|
}, {
|
|
9602
9773
|
key: "stopCampaign",
|
|
9603
9774
|
value: function () {
|
|
9604
|
-
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9775
|
+
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee62(id) {
|
|
9605
9776
|
var _yield$this$patch2, campaign;
|
|
9606
9777
|
|
|
9607
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9778
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee62$(_context62) {
|
|
9608
9779
|
while (1) {
|
|
9609
|
-
switch (
|
|
9780
|
+
switch (_context62.prev = _context62.next) {
|
|
9610
9781
|
case 0:
|
|
9611
|
-
|
|
9782
|
+
_context62.next = 2;
|
|
9612
9783
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
|
|
9613
9784
|
|
|
9614
9785
|
case 2:
|
|
9615
|
-
_yield$this$patch2 =
|
|
9786
|
+
_yield$this$patch2 = _context62.sent;
|
|
9616
9787
|
campaign = _yield$this$patch2.campaign;
|
|
9617
|
-
return
|
|
9788
|
+
return _context62.abrupt("return", campaign);
|
|
9618
9789
|
|
|
9619
9790
|
case 5:
|
|
9620
9791
|
case "end":
|
|
9621
|
-
return
|
|
9792
|
+
return _context62.stop();
|
|
9622
9793
|
}
|
|
9623
9794
|
}
|
|
9624
|
-
},
|
|
9795
|
+
}, _callee62, this);
|
|
9625
9796
|
}));
|
|
9626
9797
|
|
|
9627
|
-
function stopCampaign(
|
|
9798
|
+
function stopCampaign(_x84) {
|
|
9628
9799
|
return _stopCampaign.apply(this, arguments);
|
|
9629
9800
|
}
|
|
9630
9801
|
|
|
@@ -9641,30 +9812,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9641
9812
|
}, {
|
|
9642
9813
|
key: "resumeCampaign",
|
|
9643
9814
|
value: function () {
|
|
9644
|
-
var _resumeCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9815
|
+
var _resumeCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee63(id) {
|
|
9645
9816
|
var _yield$this$patch3, campaign;
|
|
9646
9817
|
|
|
9647
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9818
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee63$(_context63) {
|
|
9648
9819
|
while (1) {
|
|
9649
|
-
switch (
|
|
9820
|
+
switch (_context63.prev = _context63.next) {
|
|
9650
9821
|
case 0:
|
|
9651
|
-
|
|
9822
|
+
_context63.next = 2;
|
|
9652
9823
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
|
|
9653
9824
|
|
|
9654
9825
|
case 2:
|
|
9655
|
-
_yield$this$patch3 =
|
|
9826
|
+
_yield$this$patch3 = _context63.sent;
|
|
9656
9827
|
campaign = _yield$this$patch3.campaign;
|
|
9657
|
-
return
|
|
9828
|
+
return _context63.abrupt("return", campaign);
|
|
9658
9829
|
|
|
9659
9830
|
case 5:
|
|
9660
9831
|
case "end":
|
|
9661
|
-
return
|
|
9832
|
+
return _context63.stop();
|
|
9662
9833
|
}
|
|
9663
9834
|
}
|
|
9664
|
-
},
|
|
9835
|
+
}, _callee63, this);
|
|
9665
9836
|
}));
|
|
9666
9837
|
|
|
9667
|
-
function resumeCampaign(
|
|
9838
|
+
function resumeCampaign(_x85) {
|
|
9668
9839
|
return _resumeCampaign.apply(this, arguments);
|
|
9669
9840
|
}
|
|
9670
9841
|
|
|
@@ -9681,33 +9852,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9681
9852
|
}, {
|
|
9682
9853
|
key: "testCampaign",
|
|
9683
9854
|
value: function () {
|
|
9684
|
-
var _testCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9855
|
+
var _testCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee64(id, params) {
|
|
9685
9856
|
var users, _yield$this$post3, campaign;
|
|
9686
9857
|
|
|
9687
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9858
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee64$(_context64) {
|
|
9688
9859
|
while (1) {
|
|
9689
|
-
switch (
|
|
9860
|
+
switch (_context64.prev = _context64.next) {
|
|
9690
9861
|
case 0:
|
|
9691
9862
|
users = params.users;
|
|
9692
|
-
|
|
9863
|
+
_context64.next = 3;
|
|
9693
9864
|
return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
|
|
9694
9865
|
users: users
|
|
9695
9866
|
});
|
|
9696
9867
|
|
|
9697
9868
|
case 3:
|
|
9698
|
-
_yield$this$post3 =
|
|
9869
|
+
_yield$this$post3 = _context64.sent;
|
|
9699
9870
|
campaign = _yield$this$post3.campaign;
|
|
9700
|
-
return
|
|
9871
|
+
return _context64.abrupt("return", campaign);
|
|
9701
9872
|
|
|
9702
9873
|
case 6:
|
|
9703
9874
|
case "end":
|
|
9704
|
-
return
|
|
9875
|
+
return _context64.stop();
|
|
9705
9876
|
}
|
|
9706
9877
|
}
|
|
9707
|
-
},
|
|
9878
|
+
}, _callee64, this);
|
|
9708
9879
|
}));
|
|
9709
9880
|
|
|
9710
|
-
function testCampaign(
|
|
9881
|
+
function testCampaign(_x86, _x87) {
|
|
9711
9882
|
return _testCampaign.apply(this, arguments);
|
|
9712
9883
|
}
|
|
9713
9884
|
|
|
@@ -9723,24 +9894,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9723
9894
|
}, {
|
|
9724
9895
|
key: "enrichURL",
|
|
9725
9896
|
value: function () {
|
|
9726
|
-
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9727
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9897
|
+
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee65(url) {
|
|
9898
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee65$(_context65) {
|
|
9728
9899
|
while (1) {
|
|
9729
|
-
switch (
|
|
9900
|
+
switch (_context65.prev = _context65.next) {
|
|
9730
9901
|
case 0:
|
|
9731
|
-
return
|
|
9902
|
+
return _context65.abrupt("return", this.get(this.baseURL + "/og", {
|
|
9732
9903
|
url: url
|
|
9733
9904
|
}));
|
|
9734
9905
|
|
|
9735
9906
|
case 1:
|
|
9736
9907
|
case "end":
|
|
9737
|
-
return
|
|
9908
|
+
return _context65.stop();
|
|
9738
9909
|
}
|
|
9739
9910
|
}
|
|
9740
|
-
},
|
|
9911
|
+
}, _callee65, this);
|
|
9741
9912
|
}));
|
|
9742
9913
|
|
|
9743
|
-
function enrichURL(
|
|
9914
|
+
function enrichURL(_x88) {
|
|
9744
9915
|
return _enrichURL.apply(this, arguments);
|
|
9745
9916
|
}
|
|
9746
9917
|
|
|
@@ -9757,22 +9928,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9757
9928
|
}, {
|
|
9758
9929
|
key: "getTask",
|
|
9759
9930
|
value: function () {
|
|
9760
|
-
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9761
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9931
|
+
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee66(id) {
|
|
9932
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee66$(_context66) {
|
|
9762
9933
|
while (1) {
|
|
9763
|
-
switch (
|
|
9934
|
+
switch (_context66.prev = _context66.next) {
|
|
9764
9935
|
case 0:
|
|
9765
|
-
return
|
|
9936
|
+
return _context66.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
9766
9937
|
|
|
9767
9938
|
case 1:
|
|
9768
9939
|
case "end":
|
|
9769
|
-
return
|
|
9940
|
+
return _context66.stop();
|
|
9770
9941
|
}
|
|
9771
9942
|
}
|
|
9772
|
-
},
|
|
9943
|
+
}, _callee66, this);
|
|
9773
9944
|
}));
|
|
9774
9945
|
|
|
9775
|
-
function getTask(
|
|
9946
|
+
function getTask(_x89) {
|
|
9776
9947
|
return _getTask.apply(this, arguments);
|
|
9777
9948
|
}
|
|
9778
9949
|
|
|
@@ -9790,31 +9961,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9790
9961
|
}, {
|
|
9791
9962
|
key: "deleteChannels",
|
|
9792
9963
|
value: function () {
|
|
9793
|
-
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9964
|
+
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee67(cids) {
|
|
9794
9965
|
var options,
|
|
9795
|
-
|
|
9796
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9966
|
+
_args67 = arguments;
|
|
9967
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee67$(_context67) {
|
|
9797
9968
|
while (1) {
|
|
9798
|
-
switch (
|
|
9969
|
+
switch (_context67.prev = _context67.next) {
|
|
9799
9970
|
case 0:
|
|
9800
|
-
options =
|
|
9801
|
-
|
|
9971
|
+
options = _args67.length > 1 && _args67[1] !== undefined ? _args67[1] : {};
|
|
9972
|
+
_context67.next = 3;
|
|
9802
9973
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
9803
9974
|
cids: cids
|
|
9804
9975
|
}, options));
|
|
9805
9976
|
|
|
9806
9977
|
case 3:
|
|
9807
|
-
return
|
|
9978
|
+
return _context67.abrupt("return", _context67.sent);
|
|
9808
9979
|
|
|
9809
9980
|
case 4:
|
|
9810
9981
|
case "end":
|
|
9811
|
-
return
|
|
9982
|
+
return _context67.stop();
|
|
9812
9983
|
}
|
|
9813
9984
|
}
|
|
9814
|
-
},
|
|
9985
|
+
}, _callee67, this);
|
|
9815
9986
|
}));
|
|
9816
9987
|
|
|
9817
|
-
function deleteChannels(
|
|
9988
|
+
function deleteChannels(_x90) {
|
|
9818
9989
|
return _deleteChannels.apply(this, arguments);
|
|
9819
9990
|
}
|
|
9820
9991
|
|
|
@@ -9832,13 +10003,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9832
10003
|
}, {
|
|
9833
10004
|
key: "deleteUsers",
|
|
9834
10005
|
value: function () {
|
|
9835
|
-
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9836
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10006
|
+
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee68(user_ids, options) {
|
|
10007
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee68$(_context68) {
|
|
9837
10008
|
while (1) {
|
|
9838
|
-
switch (
|
|
10009
|
+
switch (_context68.prev = _context68.next) {
|
|
9839
10010
|
case 0:
|
|
9840
10011
|
if (!((options === null || options === void 0 ? void 0 : options.user) !== 'soft' && (options === null || options === void 0 ? void 0 : options.user) !== 'hard')) {
|
|
9841
|
-
|
|
10012
|
+
_context68.next = 2;
|
|
9842
10013
|
break;
|
|
9843
10014
|
}
|
|
9844
10015
|
|
|
@@ -9846,7 +10017,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9846
10017
|
|
|
9847
10018
|
case 2:
|
|
9848
10019
|
if (!(options.messages !== undefined && options.messages !== 'soft' && options.messages !== 'hard')) {
|
|
9849
|
-
|
|
10020
|
+
_context68.next = 4;
|
|
9850
10021
|
break;
|
|
9851
10022
|
}
|
|
9852
10023
|
|
|
@@ -9854,30 +10025,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9854
10025
|
|
|
9855
10026
|
case 4:
|
|
9856
10027
|
if (!(options.conversations !== undefined && options.conversations !== 'soft' && options.conversations !== 'hard')) {
|
|
9857
|
-
|
|
10028
|
+
_context68.next = 6;
|
|
9858
10029
|
break;
|
|
9859
10030
|
}
|
|
9860
10031
|
|
|
9861
10032
|
throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
|
|
9862
10033
|
|
|
9863
10034
|
case 6:
|
|
9864
|
-
|
|
10035
|
+
_context68.next = 8;
|
|
9865
10036
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
9866
10037
|
user_ids: user_ids
|
|
9867
10038
|
}, options));
|
|
9868
10039
|
|
|
9869
10040
|
case 8:
|
|
9870
|
-
return
|
|
10041
|
+
return _context68.abrupt("return", _context68.sent);
|
|
9871
10042
|
|
|
9872
10043
|
case 9:
|
|
9873
10044
|
case "end":
|
|
9874
|
-
return
|
|
10045
|
+
return _context68.stop();
|
|
9875
10046
|
}
|
|
9876
10047
|
}
|
|
9877
|
-
},
|
|
10048
|
+
}, _callee68, this);
|
|
9878
10049
|
}));
|
|
9879
10050
|
|
|
9880
|
-
function deleteUsers(
|
|
10051
|
+
function deleteUsers(_x91, _x92) {
|
|
9881
10052
|
return _deleteUsers.apply(this, arguments);
|
|
9882
10053
|
}
|
|
9883
10054
|
|