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/index.js
CHANGED
|
@@ -112,7 +112,7 @@ var decodeBase64 = function decodeBase64(s) {
|
|
|
112
112
|
return r;
|
|
113
113
|
};
|
|
114
114
|
|
|
115
|
-
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; }
|
|
115
|
+
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; }
|
|
116
116
|
|
|
117
117
|
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; }
|
|
118
118
|
|
|
@@ -724,7 +724,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
724
724
|
return ChannelState;
|
|
725
725
|
}();
|
|
726
726
|
|
|
727
|
-
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; }
|
|
727
|
+
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; }
|
|
728
728
|
|
|
729
729
|
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; }
|
|
730
730
|
|
|
@@ -781,7 +781,7 @@ var isValidEventType = function isValidEventType(eventType) {
|
|
|
781
781
|
return IS_VALID_EVENT_MAP_TYPE[eventType] || false;
|
|
782
782
|
};
|
|
783
783
|
|
|
784
|
-
function _createForOfIteratorHelper$3(o, allowArrayLike) { var it
|
|
784
|
+
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; } } }; }
|
|
785
785
|
|
|
786
786
|
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); }
|
|
787
787
|
|
|
@@ -971,13 +971,23 @@ function convertErrorToJson(err) {
|
|
|
971
971
|
return jsonObj;
|
|
972
972
|
}
|
|
973
973
|
/**
|
|
974
|
-
* isOnline safely return the navigator.online value
|
|
974
|
+
* isOnline safely return the navigator.online value for browser env
|
|
975
975
|
* if navigator is not in global object, it always return true
|
|
976
976
|
*/
|
|
977
977
|
|
|
978
978
|
function isOnline() {
|
|
979
979
|
var nav = typeof navigator !== 'undefined' ? navigator : typeof window !== 'undefined' && window.navigator ? window.navigator : undefined;
|
|
980
|
-
|
|
980
|
+
|
|
981
|
+
if (!nav) {
|
|
982
|
+
console.warn('isOnline failed to access window.navigator and assume browser is online');
|
|
983
|
+
return true;
|
|
984
|
+
} // RN navigator has undefined for onLine
|
|
985
|
+
|
|
986
|
+
|
|
987
|
+
if (typeof nav.onLine !== 'boolean') {
|
|
988
|
+
return true;
|
|
989
|
+
}
|
|
990
|
+
|
|
981
991
|
return nav.onLine;
|
|
982
992
|
}
|
|
983
993
|
/**
|
|
@@ -997,13 +1007,13 @@ function removeConnectionEventListeners(cb) {
|
|
|
997
1007
|
}
|
|
998
1008
|
}
|
|
999
1009
|
|
|
1000
|
-
function _createForOfIteratorHelper$2(o, allowArrayLike) { var it
|
|
1010
|
+
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; } } }; }
|
|
1001
1011
|
|
|
1002
1012
|
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); }
|
|
1003
1013
|
|
|
1004
1014
|
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; }
|
|
1005
1015
|
|
|
1006
|
-
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; }
|
|
1016
|
+
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; }
|
|
1007
1017
|
|
|
1008
1018
|
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; }
|
|
1009
1019
|
|
|
@@ -2588,6 +2598,50 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2588
2598
|
|
|
2589
2599
|
return getReplies;
|
|
2590
2600
|
}()
|
|
2601
|
+
/**
|
|
2602
|
+
* getPinnedMessages - List list pinned messages of the channel
|
|
2603
|
+
*
|
|
2604
|
+
* @param {PinnedMessagePaginationOptions & { user?: UserResponse<UserType>; user_id?: string }} options Pagination params, ie {limit:10, id_lte: 10}
|
|
2605
|
+
* @param {PinnedMessagesSort} sort defines sorting direction of pinned messages
|
|
2606
|
+
*
|
|
2607
|
+
* @return {Promise<GetRepliesAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} A response with a list of messages
|
|
2608
|
+
*/
|
|
2609
|
+
|
|
2610
|
+
}, {
|
|
2611
|
+
key: "getPinnedMessages",
|
|
2612
|
+
value: function () {
|
|
2613
|
+
var _getPinnedMessages = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee30(options) {
|
|
2614
|
+
var sort,
|
|
2615
|
+
_args30 = arguments;
|
|
2616
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee30$(_context30) {
|
|
2617
|
+
while (1) {
|
|
2618
|
+
switch (_context30.prev = _context30.next) {
|
|
2619
|
+
case 0:
|
|
2620
|
+
sort = _args30.length > 1 && _args30[1] !== undefined ? _args30[1] : [];
|
|
2621
|
+
_context30.next = 3;
|
|
2622
|
+
return this.getClient().get(this.getClient().baseURL + "/channels/".concat(this.type, "/").concat(this.id, "/pinned_messages"), {
|
|
2623
|
+
payload: _objectSpread$5(_objectSpread$5({}, options), {}, {
|
|
2624
|
+
sort: normalizeQuerySort(sort)
|
|
2625
|
+
})
|
|
2626
|
+
});
|
|
2627
|
+
|
|
2628
|
+
case 3:
|
|
2629
|
+
return _context30.abrupt("return", _context30.sent);
|
|
2630
|
+
|
|
2631
|
+
case 4:
|
|
2632
|
+
case "end":
|
|
2633
|
+
return _context30.stop();
|
|
2634
|
+
}
|
|
2635
|
+
}
|
|
2636
|
+
}, _callee30, this);
|
|
2637
|
+
}));
|
|
2638
|
+
|
|
2639
|
+
function getPinnedMessages(_x29) {
|
|
2640
|
+
return _getPinnedMessages.apply(this, arguments);
|
|
2641
|
+
}
|
|
2642
|
+
|
|
2643
|
+
return getPinnedMessages;
|
|
2644
|
+
}()
|
|
2591
2645
|
/**
|
|
2592
2646
|
* getReactions - List the reactions, supports pagination
|
|
2593
2647
|
*
|
|
@@ -2715,13 +2769,13 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2715
2769
|
* @return {Promise<ChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} Returns a query response
|
|
2716
2770
|
*/
|
|
2717
2771
|
function () {
|
|
2718
|
-
var _query = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2772
|
+
var _query = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee31(options) {
|
|
2719
2773
|
var queryURL, state, membersStr, tempChannelCid;
|
|
2720
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
2774
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee31$(_context31) {
|
|
2721
2775
|
while (1) {
|
|
2722
|
-
switch (
|
|
2776
|
+
switch (_context31.prev = _context31.next) {
|
|
2723
2777
|
case 0:
|
|
2724
|
-
|
|
2778
|
+
_context31.next = 2;
|
|
2725
2779
|
return this.getClient().wsPromise;
|
|
2726
2780
|
|
|
2727
2781
|
case 2:
|
|
@@ -2731,14 +2785,14 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2731
2785
|
queryURL += "/".concat(this.id);
|
|
2732
2786
|
}
|
|
2733
2787
|
|
|
2734
|
-
|
|
2788
|
+
_context31.next = 6;
|
|
2735
2789
|
return this.getClient().post(queryURL + '/query', _objectSpread$5({
|
|
2736
2790
|
data: this._data,
|
|
2737
2791
|
state: true
|
|
2738
2792
|
}, options));
|
|
2739
2793
|
|
|
2740
2794
|
case 6:
|
|
2741
|
-
state =
|
|
2795
|
+
state = _context31.sent;
|
|
2742
2796
|
|
|
2743
2797
|
// update the channel id if it was missing
|
|
2744
2798
|
if (!this.id) {
|
|
@@ -2768,17 +2822,17 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2768
2822
|
|
|
2769
2823
|
this._initializeState(state);
|
|
2770
2824
|
|
|
2771
|
-
return
|
|
2825
|
+
return _context31.abrupt("return", state);
|
|
2772
2826
|
|
|
2773
2827
|
case 11:
|
|
2774
2828
|
case "end":
|
|
2775
|
-
return
|
|
2829
|
+
return _context31.stop();
|
|
2776
2830
|
}
|
|
2777
2831
|
}
|
|
2778
|
-
},
|
|
2832
|
+
}, _callee31, this);
|
|
2779
2833
|
}));
|
|
2780
2834
|
|
|
2781
|
-
function query(
|
|
2835
|
+
function query(_x30) {
|
|
2782
2836
|
return _query.apply(this, arguments);
|
|
2783
2837
|
}
|
|
2784
2838
|
|
|
@@ -2795,31 +2849,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2795
2849
|
}, {
|
|
2796
2850
|
key: "banUser",
|
|
2797
2851
|
value: function () {
|
|
2798
|
-
var _banUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2799
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
2852
|
+
var _banUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee32(targetUserID, options) {
|
|
2853
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee32$(_context32) {
|
|
2800
2854
|
while (1) {
|
|
2801
|
-
switch (
|
|
2855
|
+
switch (_context32.prev = _context32.next) {
|
|
2802
2856
|
case 0:
|
|
2803
2857
|
this._checkInitialized();
|
|
2804
2858
|
|
|
2805
|
-
|
|
2859
|
+
_context32.next = 3;
|
|
2806
2860
|
return this.getClient().banUser(targetUserID, _objectSpread$5(_objectSpread$5({}, options), {}, {
|
|
2807
2861
|
type: this.type,
|
|
2808
2862
|
id: this.id
|
|
2809
2863
|
}));
|
|
2810
2864
|
|
|
2811
2865
|
case 3:
|
|
2812
|
-
return
|
|
2866
|
+
return _context32.abrupt("return", _context32.sent);
|
|
2813
2867
|
|
|
2814
2868
|
case 4:
|
|
2815
2869
|
case "end":
|
|
2816
|
-
return
|
|
2870
|
+
return _context32.stop();
|
|
2817
2871
|
}
|
|
2818
2872
|
}
|
|
2819
|
-
},
|
|
2873
|
+
}, _callee32, this);
|
|
2820
2874
|
}));
|
|
2821
2875
|
|
|
2822
|
-
function banUser(
|
|
2876
|
+
function banUser(_x31, _x32) {
|
|
2823
2877
|
return _banUser.apply(this, arguments);
|
|
2824
2878
|
}
|
|
2825
2879
|
|
|
@@ -2837,34 +2891,34 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2837
2891
|
}, {
|
|
2838
2892
|
key: "hide",
|
|
2839
2893
|
value: function () {
|
|
2840
|
-
var _hide = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2894
|
+
var _hide = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee33() {
|
|
2841
2895
|
var userId,
|
|
2842
2896
|
clearHistory,
|
|
2843
|
-
|
|
2844
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
2897
|
+
_args33 = arguments;
|
|
2898
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee33$(_context33) {
|
|
2845
2899
|
while (1) {
|
|
2846
|
-
switch (
|
|
2900
|
+
switch (_context33.prev = _context33.next) {
|
|
2847
2901
|
case 0:
|
|
2848
|
-
userId =
|
|
2849
|
-
clearHistory =
|
|
2902
|
+
userId = _args33.length > 0 && _args33[0] !== undefined ? _args33[0] : null;
|
|
2903
|
+
clearHistory = _args33.length > 1 && _args33[1] !== undefined ? _args33[1] : false;
|
|
2850
2904
|
|
|
2851
2905
|
this._checkInitialized();
|
|
2852
2906
|
|
|
2853
|
-
|
|
2907
|
+
_context33.next = 5;
|
|
2854
2908
|
return this.getClient().post("".concat(this._channelURL(), "/hide"), {
|
|
2855
2909
|
user_id: userId,
|
|
2856
2910
|
clear_history: clearHistory
|
|
2857
2911
|
});
|
|
2858
2912
|
|
|
2859
2913
|
case 5:
|
|
2860
|
-
return
|
|
2914
|
+
return _context33.abrupt("return", _context33.sent);
|
|
2861
2915
|
|
|
2862
2916
|
case 6:
|
|
2863
2917
|
case "end":
|
|
2864
|
-
return
|
|
2918
|
+
return _context33.stop();
|
|
2865
2919
|
}
|
|
2866
2920
|
}
|
|
2867
|
-
},
|
|
2921
|
+
}, _callee33, this);
|
|
2868
2922
|
}));
|
|
2869
2923
|
|
|
2870
2924
|
function hide() {
|
|
@@ -2883,31 +2937,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2883
2937
|
}, {
|
|
2884
2938
|
key: "show",
|
|
2885
2939
|
value: function () {
|
|
2886
|
-
var _show = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2940
|
+
var _show = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee34() {
|
|
2887
2941
|
var userId,
|
|
2888
|
-
|
|
2889
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
2942
|
+
_args34 = arguments;
|
|
2943
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee34$(_context34) {
|
|
2890
2944
|
while (1) {
|
|
2891
|
-
switch (
|
|
2945
|
+
switch (_context34.prev = _context34.next) {
|
|
2892
2946
|
case 0:
|
|
2893
|
-
userId =
|
|
2947
|
+
userId = _args34.length > 0 && _args34[0] !== undefined ? _args34[0] : null;
|
|
2894
2948
|
|
|
2895
2949
|
this._checkInitialized();
|
|
2896
2950
|
|
|
2897
|
-
|
|
2951
|
+
_context34.next = 4;
|
|
2898
2952
|
return this.getClient().post("".concat(this._channelURL(), "/show"), {
|
|
2899
2953
|
user_id: userId
|
|
2900
2954
|
});
|
|
2901
2955
|
|
|
2902
2956
|
case 4:
|
|
2903
|
-
return
|
|
2957
|
+
return _context34.abrupt("return", _context34.sent);
|
|
2904
2958
|
|
|
2905
2959
|
case 5:
|
|
2906
2960
|
case "end":
|
|
2907
|
-
return
|
|
2961
|
+
return _context34.stop();
|
|
2908
2962
|
}
|
|
2909
2963
|
}
|
|
2910
|
-
},
|
|
2964
|
+
}, _callee34, this);
|
|
2911
2965
|
}));
|
|
2912
2966
|
|
|
2913
2967
|
function show() {
|
|
@@ -2926,31 +2980,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2926
2980
|
}, {
|
|
2927
2981
|
key: "unbanUser",
|
|
2928
2982
|
value: function () {
|
|
2929
|
-
var _unbanUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2930
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
2983
|
+
var _unbanUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee35(targetUserID) {
|
|
2984
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee35$(_context35) {
|
|
2931
2985
|
while (1) {
|
|
2932
|
-
switch (
|
|
2986
|
+
switch (_context35.prev = _context35.next) {
|
|
2933
2987
|
case 0:
|
|
2934
2988
|
this._checkInitialized();
|
|
2935
2989
|
|
|
2936
|
-
|
|
2990
|
+
_context35.next = 3;
|
|
2937
2991
|
return this.getClient().unbanUser(targetUserID, {
|
|
2938
2992
|
type: this.type,
|
|
2939
2993
|
id: this.id
|
|
2940
2994
|
});
|
|
2941
2995
|
|
|
2942
2996
|
case 3:
|
|
2943
|
-
return
|
|
2997
|
+
return _context35.abrupt("return", _context35.sent);
|
|
2944
2998
|
|
|
2945
2999
|
case 4:
|
|
2946
3000
|
case "end":
|
|
2947
|
-
return
|
|
3001
|
+
return _context35.stop();
|
|
2948
3002
|
}
|
|
2949
3003
|
}
|
|
2950
|
-
},
|
|
3004
|
+
}, _callee35, this);
|
|
2951
3005
|
}));
|
|
2952
3006
|
|
|
2953
|
-
function unbanUser(
|
|
3007
|
+
function unbanUser(_x33) {
|
|
2954
3008
|
return _unbanUser.apply(this, arguments);
|
|
2955
3009
|
}
|
|
2956
3010
|
|
|
@@ -2967,31 +3021,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2967
3021
|
}, {
|
|
2968
3022
|
key: "shadowBan",
|
|
2969
3023
|
value: function () {
|
|
2970
|
-
var _shadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2971
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
3024
|
+
var _shadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee36(targetUserID, options) {
|
|
3025
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee36$(_context36) {
|
|
2972
3026
|
while (1) {
|
|
2973
|
-
switch (
|
|
3027
|
+
switch (_context36.prev = _context36.next) {
|
|
2974
3028
|
case 0:
|
|
2975
3029
|
this._checkInitialized();
|
|
2976
3030
|
|
|
2977
|
-
|
|
3031
|
+
_context36.next = 3;
|
|
2978
3032
|
return this.getClient().shadowBan(targetUserID, _objectSpread$5(_objectSpread$5({}, options), {}, {
|
|
2979
3033
|
type: this.type,
|
|
2980
3034
|
id: this.id
|
|
2981
3035
|
}));
|
|
2982
3036
|
|
|
2983
3037
|
case 3:
|
|
2984
|
-
return
|
|
3038
|
+
return _context36.abrupt("return", _context36.sent);
|
|
2985
3039
|
|
|
2986
3040
|
case 4:
|
|
2987
3041
|
case "end":
|
|
2988
|
-
return
|
|
3042
|
+
return _context36.stop();
|
|
2989
3043
|
}
|
|
2990
3044
|
}
|
|
2991
|
-
},
|
|
3045
|
+
}, _callee36, this);
|
|
2992
3046
|
}));
|
|
2993
3047
|
|
|
2994
|
-
function shadowBan(
|
|
3048
|
+
function shadowBan(_x34, _x35) {
|
|
2995
3049
|
return _shadowBan.apply(this, arguments);
|
|
2996
3050
|
}
|
|
2997
3051
|
|
|
@@ -3007,31 +3061,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3007
3061
|
}, {
|
|
3008
3062
|
key: "removeShadowBan",
|
|
3009
3063
|
value: function () {
|
|
3010
|
-
var _removeShadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
3011
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
3064
|
+
var _removeShadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee37(targetUserID) {
|
|
3065
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee37$(_context37) {
|
|
3012
3066
|
while (1) {
|
|
3013
|
-
switch (
|
|
3067
|
+
switch (_context37.prev = _context37.next) {
|
|
3014
3068
|
case 0:
|
|
3015
3069
|
this._checkInitialized();
|
|
3016
3070
|
|
|
3017
|
-
|
|
3071
|
+
_context37.next = 3;
|
|
3018
3072
|
return this.getClient().removeShadowBan(targetUserID, {
|
|
3019
3073
|
type: this.type,
|
|
3020
3074
|
id: this.id
|
|
3021
3075
|
});
|
|
3022
3076
|
|
|
3023
3077
|
case 3:
|
|
3024
|
-
return
|
|
3078
|
+
return _context37.abrupt("return", _context37.sent);
|
|
3025
3079
|
|
|
3026
3080
|
case 4:
|
|
3027
3081
|
case "end":
|
|
3028
|
-
return
|
|
3082
|
+
return _context37.stop();
|
|
3029
3083
|
}
|
|
3030
3084
|
}
|
|
3031
|
-
},
|
|
3085
|
+
}, _callee37, this);
|
|
3032
3086
|
}));
|
|
3033
3087
|
|
|
3034
|
-
function removeShadowBan(
|
|
3088
|
+
function removeShadowBan(_x36) {
|
|
3035
3089
|
return _removeShadowBan.apply(this, arguments);
|
|
3036
3090
|
}
|
|
3037
3091
|
|
|
@@ -3253,7 +3307,12 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3253
3307
|
|
|
3254
3308
|
case 'channel.updated':
|
|
3255
3309
|
if (event.channel) {
|
|
3256
|
-
channel
|
|
3310
|
+
var _event$channel$hidden, _event$channel, _channel$data, _event$channel$own_ca, _event$channel2, _channel$data2;
|
|
3311
|
+
|
|
3312
|
+
channel.data = _objectSpread$5(_objectSpread$5({}, event.channel), {}, {
|
|
3313
|
+
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,
|
|
3314
|
+
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
|
|
3315
|
+
});
|
|
3257
3316
|
}
|
|
3258
3317
|
|
|
3259
3318
|
break;
|
|
@@ -3440,7 +3499,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3440
3499
|
return Channel;
|
|
3441
3500
|
}();
|
|
3442
3501
|
|
|
3443
|
-
function _createForOfIteratorHelper$1(o, allowArrayLike) { var it
|
|
3502
|
+
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; } } }; }
|
|
3444
3503
|
|
|
3445
3504
|
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); }
|
|
3446
3505
|
|
|
@@ -3515,7 +3574,7 @@ var ClientState = /*#__PURE__*/function () {
|
|
|
3515
3574
|
return ClientState;
|
|
3516
3575
|
}();
|
|
3517
3576
|
|
|
3518
|
-
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; }
|
|
3577
|
+
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; }
|
|
3519
3578
|
|
|
3520
3579
|
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; }
|
|
3521
3580
|
var InsightMetrics = function InsightMetrics() {
|
|
@@ -3629,7 +3688,7 @@ function buildWsSuccessAfterFailureInsight(connection) {
|
|
|
3629
3688
|
return buildWsBaseInsight(connection);
|
|
3630
3689
|
}
|
|
3631
3690
|
|
|
3632
|
-
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; }
|
|
3691
|
+
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; }
|
|
3633
3692
|
|
|
3634
3693
|
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; }
|
|
3635
3694
|
|
|
@@ -4547,7 +4606,7 @@ var StableWSConnection = /*#__PURE__*/function () {
|
|
|
4547
4606
|
return StableWSConnection;
|
|
4548
4607
|
}();
|
|
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
|
|
|
@@ -4962,7 +5021,7 @@ function isWSFailure(err) {
|
|
|
4962
5021
|
}
|
|
4963
5022
|
}
|
|
4964
5023
|
|
|
4965
|
-
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; }
|
|
5024
|
+
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; }
|
|
4966
5025
|
|
|
4967
5026
|
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; }
|
|
4968
5027
|
var ConnectionState;
|
|
@@ -5170,27 +5229,35 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5170
5229
|
reconnect = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : false;
|
|
5171
5230
|
|
|
5172
5231
|
if (!(_this.state === ConnectionState.Connecting)) {
|
|
5173
|
-
_context3.next =
|
|
5232
|
+
_context3.next = 4;
|
|
5174
5233
|
break;
|
|
5175
5234
|
}
|
|
5176
5235
|
|
|
5177
|
-
|
|
5236
|
+
_this._log('connect() - connecting already in progress', {
|
|
5237
|
+
reconnect: reconnect
|
|
5238
|
+
}, 'warn');
|
|
5178
5239
|
|
|
5179
|
-
|
|
5240
|
+
return _context3.abrupt("return");
|
|
5241
|
+
|
|
5242
|
+
case 4:
|
|
5180
5243
|
if (!(_this.state === ConnectionState.Connected)) {
|
|
5181
|
-
_context3.next =
|
|
5244
|
+
_context3.next = 7;
|
|
5182
5245
|
break;
|
|
5183
5246
|
}
|
|
5184
5247
|
|
|
5185
|
-
|
|
5248
|
+
_this._log('connect() - already connected and polling', {
|
|
5249
|
+
reconnect: reconnect
|
|
5250
|
+
}, 'warn');
|
|
5186
5251
|
|
|
5187
|
-
|
|
5252
|
+
return _context3.abrupt("return");
|
|
5253
|
+
|
|
5254
|
+
case 7:
|
|
5188
5255
|
_this._setState(ConnectionState.Connecting);
|
|
5189
5256
|
|
|
5190
5257
|
_this.connectionID = undefined; // connect should be sent with empty connection_id so API creates one
|
|
5191
5258
|
|
|
5192
|
-
_context3.prev =
|
|
5193
|
-
_context3.next =
|
|
5259
|
+
_context3.prev = 9;
|
|
5260
|
+
_context3.next = 12;
|
|
5194
5261
|
return _this._req({
|
|
5195
5262
|
json: _this.client._buildWSPayload()
|
|
5196
5263
|
}, {
|
|
@@ -5198,7 +5265,7 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5198
5265
|
}, // 8s
|
|
5199
5266
|
reconnect);
|
|
5200
5267
|
|
|
5201
|
-
case
|
|
5268
|
+
case 12:
|
|
5202
5269
|
_yield$_this$_req = _context3.sent;
|
|
5203
5270
|
event = _yield$_this$_req.event;
|
|
5204
5271
|
|
|
@@ -5214,30 +5281,31 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5214
5281
|
|
|
5215
5282
|
return _context3.abrupt("return", event);
|
|
5216
5283
|
|
|
5217
|
-
case
|
|
5218
|
-
_context3.prev =
|
|
5219
|
-
_context3.t0 = _context3["catch"](
|
|
5284
|
+
case 21:
|
|
5285
|
+
_context3.prev = 21;
|
|
5286
|
+
_context3.t0 = _context3["catch"](9);
|
|
5220
5287
|
|
|
5221
5288
|
_this._setState(ConnectionState.Closed);
|
|
5222
5289
|
|
|
5223
5290
|
throw _context3.t0;
|
|
5224
5291
|
|
|
5225
|
-
case
|
|
5292
|
+
case 25:
|
|
5226
5293
|
case "end":
|
|
5227
5294
|
return _context3.stop();
|
|
5228
5295
|
}
|
|
5229
5296
|
}
|
|
5230
|
-
}, _callee3, null, [[
|
|
5297
|
+
}, _callee3, null, [[9, 21]]);
|
|
5231
5298
|
})));
|
|
5232
5299
|
|
|
5233
5300
|
_defineProperty__default['default'](this, "isHealthy", function () {
|
|
5234
|
-
return _this.connectionID && _this.state === ConnectionState.Connected;
|
|
5301
|
+
return !!_this.connectionID && _this.state === ConnectionState.Connected;
|
|
5235
5302
|
});
|
|
5236
5303
|
|
|
5237
5304
|
_defineProperty__default['default'](this, "disconnect", /*#__PURE__*/_asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee4() {
|
|
5238
5305
|
var _this$cancelToken3;
|
|
5239
5306
|
|
|
5240
5307
|
var timeout,
|
|
5308
|
+
connection_id,
|
|
5241
5309
|
_args4 = arguments;
|
|
5242
5310
|
return _regeneratorRuntime__default['default'].wrap(function _callee4$(_context4) {
|
|
5243
5311
|
while (1) {
|
|
@@ -5250,36 +5318,37 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5250
5318
|
|
|
5251
5319
|
(_this$cancelToken3 = _this.cancelToken) === null || _this$cancelToken3 === void 0 ? void 0 : _this$cancelToken3.cancel('disconnect() is called');
|
|
5252
5320
|
_this.cancelToken = undefined;
|
|
5253
|
-
|
|
5254
|
-
|
|
5321
|
+
connection_id = _this.connectionID;
|
|
5322
|
+
_this.connectionID = undefined;
|
|
5323
|
+
_context4.prev = 7;
|
|
5324
|
+
_context4.next = 10;
|
|
5255
5325
|
return _this._req({
|
|
5256
|
-
close: true
|
|
5326
|
+
close: true,
|
|
5327
|
+
connection_id: connection_id
|
|
5257
5328
|
}, {
|
|
5258
5329
|
timeout: timeout
|
|
5259
5330
|
}, false);
|
|
5260
5331
|
|
|
5261
|
-
case
|
|
5262
|
-
_this.connectionID = undefined;
|
|
5263
|
-
|
|
5332
|
+
case 10:
|
|
5264
5333
|
_this._log("disconnect() - Closed connectionID");
|
|
5265
5334
|
|
|
5266
|
-
_context4.next =
|
|
5335
|
+
_context4.next = 16;
|
|
5267
5336
|
break;
|
|
5268
5337
|
|
|
5269
|
-
case
|
|
5270
|
-
_context4.prev =
|
|
5271
|
-
_context4.t0 = _context4["catch"](
|
|
5338
|
+
case 13:
|
|
5339
|
+
_context4.prev = 13;
|
|
5340
|
+
_context4.t0 = _context4["catch"](7);
|
|
5272
5341
|
|
|
5273
5342
|
_this._log("disconnect() - Failed", {
|
|
5274
5343
|
err: _context4.t0
|
|
5275
|
-
});
|
|
5344
|
+
}, 'error');
|
|
5276
5345
|
|
|
5277
|
-
case
|
|
5346
|
+
case 16:
|
|
5278
5347
|
case "end":
|
|
5279
5348
|
return _context4.stop();
|
|
5280
5349
|
}
|
|
5281
5350
|
}
|
|
5282
|
-
}, _callee4, null, [[
|
|
5351
|
+
}, _callee4, null, [[7, 13]]);
|
|
5283
5352
|
})));
|
|
5284
5353
|
|
|
5285
5354
|
this.client = client;
|
|
@@ -5328,13 +5397,15 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5328
5397
|
return WSConnectionFallback;
|
|
5329
5398
|
}();
|
|
5330
5399
|
|
|
5331
|
-
|
|
5400
|
+
var _excluded = ["created_at", "updated_at", "last_active", "online"];
|
|
5401
|
+
|
|
5402
|
+
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; } } }; }
|
|
5332
5403
|
|
|
5333
5404
|
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); }
|
|
5334
5405
|
|
|
5335
5406
|
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; }
|
|
5336
5407
|
|
|
5337
|
-
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; }
|
|
5408
|
+
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; }
|
|
5338
5409
|
|
|
5339
5410
|
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; }
|
|
5340
5411
|
|
|
@@ -6092,8 +6163,6 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6092
6163
|
return JSON.stringify({
|
|
6093
6164
|
user_id: _this.userID,
|
|
6094
6165
|
user_details: _this._user,
|
|
6095
|
-
user_token: _this.tokenManager.getToken(),
|
|
6096
|
-
server_determines_connection_id: true,
|
|
6097
6166
|
device: _this.options.device,
|
|
6098
6167
|
client_request_id: client_request_id
|
|
6099
6168
|
});
|
|
@@ -6641,7 +6710,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6641
6710
|
case 11:
|
|
6642
6711
|
this.anonymous = false; // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6643
6712
|
|
|
6644
|
-
_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,
|
|
6713
|
+
_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);
|
|
6645
6714
|
_context14.next = 15;
|
|
6646
6715
|
return this.connectUser(guestUser, response.access_token);
|
|
6647
6716
|
|
|
@@ -7004,23 +7073,41 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7004
7073
|
client: this
|
|
7005
7074
|
});
|
|
7006
7075
|
_context15.prev = 8;
|
|
7007
|
-
|
|
7076
|
+
|
|
7077
|
+
if (!this.wsFallback) {
|
|
7078
|
+
_context15.next = 13;
|
|
7079
|
+
break;
|
|
7080
|
+
}
|
|
7081
|
+
|
|
7082
|
+
_context15.next = 12;
|
|
7083
|
+
return this.wsFallback.connect();
|
|
7084
|
+
|
|
7085
|
+
case 12:
|
|
7086
|
+
return _context15.abrupt("return", _context15.sent);
|
|
7087
|
+
|
|
7088
|
+
case 13:
|
|
7089
|
+
_context15.next = 15;
|
|
7008
7090
|
return this.wsConnection.connect(this.options.enableWSFallback ? this.defaultWSTimeoutWithFallback : this.defaultWSTimeout);
|
|
7009
7091
|
|
|
7010
|
-
case
|
|
7092
|
+
case 15:
|
|
7011
7093
|
return _context15.abrupt("return", _context15.sent);
|
|
7012
7094
|
|
|
7013
|
-
case
|
|
7014
|
-
_context15.prev =
|
|
7095
|
+
case 18:
|
|
7096
|
+
_context15.prev = 18;
|
|
7015
7097
|
_context15.t0 = _context15["catch"](8);
|
|
7016
7098
|
|
|
7017
7099
|
if (!(this.options.enableWSFallback && isWSFailure(_context15.t0) && isOnline())) {
|
|
7018
|
-
_context15.next =
|
|
7100
|
+
_context15.next = 29;
|
|
7019
7101
|
break;
|
|
7020
7102
|
}
|
|
7021
7103
|
|
|
7022
7104
|
this.logger('info', 'client:connect() - WS failed, fallback to longpoll', {
|
|
7023
7105
|
tags: ['connection', 'client']
|
|
7106
|
+
}); // @ts-expect-error
|
|
7107
|
+
|
|
7108
|
+
this.dispatchEvent({
|
|
7109
|
+
type: 'transport.changed',
|
|
7110
|
+
mode: 'longpoll'
|
|
7024
7111
|
});
|
|
7025
7112
|
|
|
7026
7113
|
this.wsConnection._destroyCurrentWSConnection();
|
|
@@ -7030,21 +7117,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7030
7117
|
this.wsFallback = new WSConnectionFallback({
|
|
7031
7118
|
client: this
|
|
7032
7119
|
});
|
|
7033
|
-
_context15.next =
|
|
7120
|
+
_context15.next = 28;
|
|
7034
7121
|
return this.wsFallback.connect();
|
|
7035
7122
|
|
|
7036
|
-
case
|
|
7123
|
+
case 28:
|
|
7037
7124
|
return _context15.abrupt("return", _context15.sent);
|
|
7038
7125
|
|
|
7039
|
-
case
|
|
7126
|
+
case 29:
|
|
7040
7127
|
throw _context15.t0;
|
|
7041
7128
|
|
|
7042
|
-
case
|
|
7129
|
+
case 30:
|
|
7043
7130
|
case "end":
|
|
7044
7131
|
return _context15.stop();
|
|
7045
7132
|
}
|
|
7046
7133
|
}
|
|
7047
|
-
}, _callee15, this, [[8,
|
|
7134
|
+
}, _callee15, this, [[8, 18]]);
|
|
7048
7135
|
}));
|
|
7049
7136
|
|
|
7050
7137
|
function connect() {
|
|
@@ -8057,27 +8144,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8057
8144
|
while (1) {
|
|
8058
8145
|
switch (_context32.prev = _context32.next) {
|
|
8059
8146
|
case 0:
|
|
8060
|
-
|
|
8061
|
-
options.banned_by_id = options.user_id;
|
|
8062
|
-
delete options.user_id;
|
|
8063
|
-
console.warn("banUser: 'user_id' is deprecated, please consider switching to 'banned_by_id'");
|
|
8064
|
-
}
|
|
8065
|
-
|
|
8066
|
-
if ((options === null || options === void 0 ? void 0 : options.user) !== undefined) {
|
|
8067
|
-
options.banned_by = options.user;
|
|
8068
|
-
delete options.user;
|
|
8069
|
-
console.warn("banUser: 'user' is deprecated, please consider switching to 'banned_by'");
|
|
8070
|
-
}
|
|
8071
|
-
|
|
8072
|
-
_context32.next = 4;
|
|
8147
|
+
_context32.next = 2;
|
|
8073
8148
|
return this.post(this.baseURL + '/moderation/ban', _objectSpread({
|
|
8074
8149
|
target_user_id: targetUserID
|
|
8075
8150
|
}, options));
|
|
8076
8151
|
|
|
8077
|
-
case
|
|
8152
|
+
case 2:
|
|
8078
8153
|
return _context32.abrupt("return", _context32.sent);
|
|
8079
8154
|
|
|
8080
|
-
case
|
|
8155
|
+
case 3:
|
|
8081
8156
|
case "end":
|
|
8082
8157
|
return _context32.stop();
|
|
8083
8158
|
}
|
|
@@ -8463,6 +8538,101 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8463
8538
|
|
|
8464
8539
|
return unflagUser;
|
|
8465
8540
|
}()
|
|
8541
|
+
/**
|
|
8542
|
+
* _queryFlagReports - Query flag reports.
|
|
8543
|
+
*
|
|
8544
|
+
* Note: Do not use this.
|
|
8545
|
+
* It is present for internal usage only.
|
|
8546
|
+
* This function can, and will, break and/or be removed at any point in time.
|
|
8547
|
+
*
|
|
8548
|
+
* @param {FlagReportsFilters} filterConditions MongoDB style filter conditions
|
|
8549
|
+
* @param {FlagReportsPaginationOptions} options Option object, {limit: 10, offset:0}
|
|
8550
|
+
*
|
|
8551
|
+
* @return {Promise<FlagReportsResponse<ChannelType, CommandType, UserType>>} Flag Reports Response
|
|
8552
|
+
*/
|
|
8553
|
+
|
|
8554
|
+
}, {
|
|
8555
|
+
key: "_queryFlagReports",
|
|
8556
|
+
value: function () {
|
|
8557
|
+
var _queryFlagReports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee42() {
|
|
8558
|
+
var filterConditions,
|
|
8559
|
+
options,
|
|
8560
|
+
_args42 = arguments;
|
|
8561
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee42$(_context42) {
|
|
8562
|
+
while (1) {
|
|
8563
|
+
switch (_context42.prev = _context42.next) {
|
|
8564
|
+
case 0:
|
|
8565
|
+
filterConditions = _args42.length > 0 && _args42[0] !== undefined ? _args42[0] : {};
|
|
8566
|
+
options = _args42.length > 1 && _args42[1] !== undefined ? _args42[1] : {};
|
|
8567
|
+
_context42.next = 4;
|
|
8568
|
+
return this.post(this.baseURL + '/moderation/reports', _objectSpread({
|
|
8569
|
+
filter_conditions: filterConditions
|
|
8570
|
+
}, options));
|
|
8571
|
+
|
|
8572
|
+
case 4:
|
|
8573
|
+
return _context42.abrupt("return", _context42.sent);
|
|
8574
|
+
|
|
8575
|
+
case 5:
|
|
8576
|
+
case "end":
|
|
8577
|
+
return _context42.stop();
|
|
8578
|
+
}
|
|
8579
|
+
}
|
|
8580
|
+
}, _callee42, this);
|
|
8581
|
+
}));
|
|
8582
|
+
|
|
8583
|
+
function _queryFlagReports() {
|
|
8584
|
+
return _queryFlagReports2.apply(this, arguments);
|
|
8585
|
+
}
|
|
8586
|
+
|
|
8587
|
+
return _queryFlagReports;
|
|
8588
|
+
}()
|
|
8589
|
+
/**
|
|
8590
|
+
* _reviewFlagReport - review flag report
|
|
8591
|
+
*
|
|
8592
|
+
* Note: Do not use this.
|
|
8593
|
+
* It is present for internal usage only.
|
|
8594
|
+
* This function can, and will, break and/or be removed at any point in time.
|
|
8595
|
+
*
|
|
8596
|
+
* @param {string} [id] flag report to review
|
|
8597
|
+
* @param {string} [reviewResult] flag report review result
|
|
8598
|
+
* @param {string} [options.user_id] currentUserID, only used with serverside auth
|
|
8599
|
+
* @param {string} [options.review_details] custom information about review result
|
|
8600
|
+
* @returns {Promise<ReviewFlagReportResponse>>}
|
|
8601
|
+
*/
|
|
8602
|
+
|
|
8603
|
+
}, {
|
|
8604
|
+
key: "_reviewFlagReport",
|
|
8605
|
+
value: function () {
|
|
8606
|
+
var _reviewFlagReport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee43(id, reviewResult) {
|
|
8607
|
+
var options,
|
|
8608
|
+
_args43 = arguments;
|
|
8609
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee43$(_context43) {
|
|
8610
|
+
while (1) {
|
|
8611
|
+
switch (_context43.prev = _context43.next) {
|
|
8612
|
+
case 0:
|
|
8613
|
+
options = _args43.length > 2 && _args43[2] !== undefined ? _args43[2] : {};
|
|
8614
|
+
_context43.next = 3;
|
|
8615
|
+
return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
|
|
8616
|
+
review_result: reviewResult
|
|
8617
|
+
}, options));
|
|
8618
|
+
|
|
8619
|
+
case 3:
|
|
8620
|
+
return _context43.abrupt("return", _context43.sent);
|
|
8621
|
+
|
|
8622
|
+
case 4:
|
|
8623
|
+
case "end":
|
|
8624
|
+
return _context43.stop();
|
|
8625
|
+
}
|
|
8626
|
+
}
|
|
8627
|
+
}, _callee43, this);
|
|
8628
|
+
}));
|
|
8629
|
+
|
|
8630
|
+
function _reviewFlagReport(_x54, _x55) {
|
|
8631
|
+
return _reviewFlagReport2.apply(this, arguments);
|
|
8632
|
+
}
|
|
8633
|
+
|
|
8634
|
+
return _reviewFlagReport;
|
|
8635
|
+
}()
|
|
8466
8636
|
/**
|
|
8467
8637
|
* @deprecated use markChannelsRead instead
|
|
8468
8638
|
*
|
|
@@ -8484,23 +8654,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8484
8654
|
* @return {Promise<APIResponse>}
|
|
8485
8655
|
*/
|
|
8486
8656
|
function () {
|
|
8487
|
-
var _markChannelsRead = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8657
|
+
var _markChannelsRead = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee44() {
|
|
8488
8658
|
var data,
|
|
8489
|
-
|
|
8490
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8659
|
+
_args44 = arguments;
|
|
8660
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee44$(_context44) {
|
|
8491
8661
|
while (1) {
|
|
8492
|
-
switch (
|
|
8662
|
+
switch (_context44.prev = _context44.next) {
|
|
8493
8663
|
case 0:
|
|
8494
|
-
data =
|
|
8495
|
-
|
|
8664
|
+
data = _args44.length > 0 && _args44[0] !== undefined ? _args44[0] : {};
|
|
8665
|
+
_context44.next = 3;
|
|
8496
8666
|
return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
|
|
8497
8667
|
|
|
8498
8668
|
case 3:
|
|
8499
8669
|
case "end":
|
|
8500
|
-
return
|
|
8670
|
+
return _context44.stop();
|
|
8501
8671
|
}
|
|
8502
8672
|
}
|
|
8503
|
-
},
|
|
8673
|
+
}, _callee44, this);
|
|
8504
8674
|
}));
|
|
8505
8675
|
|
|
8506
8676
|
function markChannelsRead() {
|
|
@@ -8575,28 +8745,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8575
8745
|
}, {
|
|
8576
8746
|
key: "translateMessage",
|
|
8577
8747
|
value: function () {
|
|
8578
|
-
var _translateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8579
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8748
|
+
var _translateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee45(messageId, language) {
|
|
8749
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee45$(_context45) {
|
|
8580
8750
|
while (1) {
|
|
8581
|
-
switch (
|
|
8751
|
+
switch (_context45.prev = _context45.next) {
|
|
8582
8752
|
case 0:
|
|
8583
|
-
|
|
8753
|
+
_context45.next = 2;
|
|
8584
8754
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
|
|
8585
8755
|
language: language
|
|
8586
8756
|
});
|
|
8587
8757
|
|
|
8588
8758
|
case 2:
|
|
8589
|
-
return
|
|
8759
|
+
return _context45.abrupt("return", _context45.sent);
|
|
8590
8760
|
|
|
8591
8761
|
case 3:
|
|
8592
8762
|
case "end":
|
|
8593
|
-
return
|
|
8763
|
+
return _context45.stop();
|
|
8594
8764
|
}
|
|
8595
8765
|
}
|
|
8596
|
-
},
|
|
8766
|
+
}, _callee45, this);
|
|
8597
8767
|
}));
|
|
8598
8768
|
|
|
8599
|
-
function translateMessage(
|
|
8769
|
+
function translateMessage(_x56, _x57) {
|
|
8600
8770
|
return _translateMessage.apply(this, arguments);
|
|
8601
8771
|
}
|
|
8602
8772
|
|
|
@@ -8610,7 +8780,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8610
8780
|
}, {
|
|
8611
8781
|
key: "_normalizeExpiration",
|
|
8612
8782
|
value: function _normalizeExpiration(timeoutOrExpirationDate) {
|
|
8613
|
-
var pinExpires;
|
|
8783
|
+
var pinExpires = null;
|
|
8614
8784
|
|
|
8615
8785
|
if (typeof timeoutOrExpirationDate === 'number') {
|
|
8616
8786
|
var now = new Date();
|
|
@@ -8651,20 +8821,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8651
8821
|
* pinMessage - pins the message
|
|
8652
8822
|
* @param {string | { id: string }} messageOrMessageId message object or message id
|
|
8653
8823
|
* @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
|
|
8654
|
-
* @param {string | { id: string }} [
|
|
8824
|
+
* @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
|
|
8825
|
+
* @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
|
|
8655
8826
|
*/
|
|
8656
8827
|
|
|
8657
8828
|
}, {
|
|
8658
8829
|
key: "pinMessage",
|
|
8659
|
-
value: function pinMessage(messageOrMessageId, timeoutOrExpirationDate,
|
|
8830
|
+
value: function pinMessage(messageOrMessageId, timeoutOrExpirationDate, pinnedBy, pinnedAt) {
|
|
8660
8831
|
var messageId = this._validateAndGetMessageId(messageOrMessageId, 'Please specify the message id when calling unpinMessage');
|
|
8661
8832
|
|
|
8662
8833
|
return this.partialUpdateMessage(messageId, {
|
|
8663
8834
|
set: {
|
|
8664
8835
|
pinned: true,
|
|
8665
|
-
pin_expires: this._normalizeExpiration(timeoutOrExpirationDate)
|
|
8836
|
+
pin_expires: this._normalizeExpiration(timeoutOrExpirationDate),
|
|
8837
|
+
pinned_at: this._normalizeExpiration(pinnedAt)
|
|
8666
8838
|
}
|
|
8667
|
-
},
|
|
8839
|
+
}, pinnedBy);
|
|
8668
8840
|
}
|
|
8669
8841
|
/**
|
|
8670
8842
|
* unpinMessage - unpins the message that was previously pinned
|
|
@@ -8696,14 +8868,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8696
8868
|
}, {
|
|
8697
8869
|
key: "updateMessage",
|
|
8698
8870
|
value: function () {
|
|
8699
|
-
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8871
|
+
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee46(message, userId, options) {
|
|
8700
8872
|
var clonedMessage, reservedMessageFields;
|
|
8701
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8873
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee46$(_context46) {
|
|
8702
8874
|
while (1) {
|
|
8703
|
-
switch (
|
|
8875
|
+
switch (_context46.prev = _context46.next) {
|
|
8704
8876
|
case 0:
|
|
8705
8877
|
if (message.id) {
|
|
8706
|
-
|
|
8878
|
+
_context46.next = 2;
|
|
8707
8879
|
break;
|
|
8708
8880
|
}
|
|
8709
8881
|
|
|
@@ -8740,23 +8912,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8740
8912
|
});
|
|
8741
8913
|
}
|
|
8742
8914
|
|
|
8743
|
-
|
|
8915
|
+
_context46.next = 10;
|
|
8744
8916
|
return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
|
|
8745
8917
|
message: clonedMessage
|
|
8746
8918
|
}, options));
|
|
8747
8919
|
|
|
8748
8920
|
case 10:
|
|
8749
|
-
return
|
|
8921
|
+
return _context46.abrupt("return", _context46.sent);
|
|
8750
8922
|
|
|
8751
8923
|
case 11:
|
|
8752
8924
|
case "end":
|
|
8753
|
-
return
|
|
8925
|
+
return _context46.stop();
|
|
8754
8926
|
}
|
|
8755
8927
|
}
|
|
8756
|
-
},
|
|
8928
|
+
}, _callee46, this);
|
|
8757
8929
|
}));
|
|
8758
8930
|
|
|
8759
|
-
function updateMessage(
|
|
8931
|
+
function updateMessage(_x58, _x59, _x60) {
|
|
8760
8932
|
return _updateMessage.apply(this, arguments);
|
|
8761
8933
|
}
|
|
8762
8934
|
|
|
@@ -8779,14 +8951,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8779
8951
|
}, {
|
|
8780
8952
|
key: "partialUpdateMessage",
|
|
8781
8953
|
value: function () {
|
|
8782
|
-
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8954
|
+
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee47(id, partialMessageObject, userId, options) {
|
|
8783
8955
|
var user;
|
|
8784
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8956
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee47$(_context47) {
|
|
8785
8957
|
while (1) {
|
|
8786
|
-
switch (
|
|
8958
|
+
switch (_context47.prev = _context47.next) {
|
|
8787
8959
|
case 0:
|
|
8788
8960
|
if (id) {
|
|
8789
|
-
|
|
8961
|
+
_context47.next = 2;
|
|
8790
8962
|
break;
|
|
8791
8963
|
}
|
|
8792
8964
|
|
|
@@ -8801,23 +8973,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8801
8973
|
};
|
|
8802
8974
|
}
|
|
8803
8975
|
|
|
8804
|
-
|
|
8976
|
+
_context47.next = 6;
|
|
8805
8977
|
return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
8806
8978
|
user: user
|
|
8807
8979
|
}));
|
|
8808
8980
|
|
|
8809
8981
|
case 6:
|
|
8810
|
-
return
|
|
8982
|
+
return _context47.abrupt("return", _context47.sent);
|
|
8811
8983
|
|
|
8812
8984
|
case 7:
|
|
8813
8985
|
case "end":
|
|
8814
|
-
return
|
|
8986
|
+
return _context47.stop();
|
|
8815
8987
|
}
|
|
8816
8988
|
}
|
|
8817
|
-
},
|
|
8989
|
+
}, _callee47, this);
|
|
8818
8990
|
}));
|
|
8819
8991
|
|
|
8820
|
-
function partialUpdateMessage(
|
|
8992
|
+
function partialUpdateMessage(_x61, _x62, _x63, _x64) {
|
|
8821
8993
|
return _partialUpdateMessage.apply(this, arguments);
|
|
8822
8994
|
}
|
|
8823
8995
|
|
|
@@ -8826,11 +8998,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8826
8998
|
}, {
|
|
8827
8999
|
key: "deleteMessage",
|
|
8828
9000
|
value: function () {
|
|
8829
|
-
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9001
|
+
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee48(messageID, hardDelete) {
|
|
8830
9002
|
var params;
|
|
8831
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9003
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee48$(_context48) {
|
|
8832
9004
|
while (1) {
|
|
8833
|
-
switch (
|
|
9005
|
+
switch (_context48.prev = _context48.next) {
|
|
8834
9006
|
case 0:
|
|
8835
9007
|
params = {};
|
|
8836
9008
|
|
|
@@ -8840,21 +9012,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8840
9012
|
};
|
|
8841
9013
|
}
|
|
8842
9014
|
|
|
8843
|
-
|
|
9015
|
+
_context48.next = 4;
|
|
8844
9016
|
return this.delete(this.baseURL + "/messages/".concat(messageID), params);
|
|
8845
9017
|
|
|
8846
9018
|
case 4:
|
|
8847
|
-
return
|
|
9019
|
+
return _context48.abrupt("return", _context48.sent);
|
|
8848
9020
|
|
|
8849
9021
|
case 5:
|
|
8850
9022
|
case "end":
|
|
8851
|
-
return
|
|
9023
|
+
return _context48.stop();
|
|
8852
9024
|
}
|
|
8853
9025
|
}
|
|
8854
|
-
},
|
|
9026
|
+
}, _callee48, this);
|
|
8855
9027
|
}));
|
|
8856
9028
|
|
|
8857
|
-
function deleteMessage(
|
|
9029
|
+
function deleteMessage(_x65, _x66) {
|
|
8858
9030
|
return _deleteMessage.apply(this, arguments);
|
|
8859
9031
|
}
|
|
8860
9032
|
|
|
@@ -8863,26 +9035,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8863
9035
|
}, {
|
|
8864
9036
|
key: "getMessage",
|
|
8865
9037
|
value: function () {
|
|
8866
|
-
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8867
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9038
|
+
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee49(messageID) {
|
|
9039
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee49$(_context49) {
|
|
8868
9040
|
while (1) {
|
|
8869
|
-
switch (
|
|
9041
|
+
switch (_context49.prev = _context49.next) {
|
|
8870
9042
|
case 0:
|
|
8871
|
-
|
|
9043
|
+
_context49.next = 2;
|
|
8872
9044
|
return this.get(this.baseURL + "/messages/".concat(messageID));
|
|
8873
9045
|
|
|
8874
9046
|
case 2:
|
|
8875
|
-
return
|
|
9047
|
+
return _context49.abrupt("return", _context49.sent);
|
|
8876
9048
|
|
|
8877
9049
|
case 3:
|
|
8878
9050
|
case "end":
|
|
8879
|
-
return
|
|
9051
|
+
return _context49.stop();
|
|
8880
9052
|
}
|
|
8881
9053
|
}
|
|
8882
|
-
},
|
|
9054
|
+
}, _callee49, this);
|
|
8883
9055
|
}));
|
|
8884
9056
|
|
|
8885
|
-
function getMessage(
|
|
9057
|
+
function getMessage(_x67) {
|
|
8886
9058
|
return _getMessage.apply(this, arguments);
|
|
8887
9059
|
}
|
|
8888
9060
|
|
|
@@ -8891,7 +9063,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8891
9063
|
}, {
|
|
8892
9064
|
key: "getUserAgent",
|
|
8893
9065
|
value: function getUserAgent() {
|
|
8894
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "
|
|
9066
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.1.1");
|
|
8895
9067
|
}
|
|
8896
9068
|
}, {
|
|
8897
9069
|
key: "setUserAgent",
|
|
@@ -8926,12 +9098,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8926
9098
|
}
|
|
8927
9099
|
|
|
8928
9100
|
return _objectSpread({
|
|
8929
|
-
params: _objectSpread(
|
|
8930
|
-
user_id: this.userID
|
|
8931
|
-
|
|
8932
|
-
api_key: this.key
|
|
8933
|
-
|
|
8934
|
-
}),
|
|
9101
|
+
params: _objectSpread({
|
|
9102
|
+
user_id: this.userID,
|
|
9103
|
+
connection_id: this._getConnectionID(),
|
|
9104
|
+
api_key: this.key
|
|
9105
|
+
}, options.params),
|
|
8935
9106
|
headers: _objectSpread(_objectSpread({}, authorization), {}, {
|
|
8936
9107
|
'stream-auth-type': this.getAuthType(),
|
|
8937
9108
|
'X-Stream-Client': this.getUserAgent()
|
|
@@ -9087,28 +9258,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9087
9258
|
}, {
|
|
9088
9259
|
key: "sendUserCustomEvent",
|
|
9089
9260
|
value: function () {
|
|
9090
|
-
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9091
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9261
|
+
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee50(targetUserID, event) {
|
|
9262
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee50$(_context50) {
|
|
9092
9263
|
while (1) {
|
|
9093
|
-
switch (
|
|
9264
|
+
switch (_context50.prev = _context50.next) {
|
|
9094
9265
|
case 0:
|
|
9095
|
-
|
|
9266
|
+
_context50.next = 2;
|
|
9096
9267
|
return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
|
|
9097
9268
|
event: event
|
|
9098
9269
|
});
|
|
9099
9270
|
|
|
9100
9271
|
case 2:
|
|
9101
|
-
return
|
|
9272
|
+
return _context50.abrupt("return", _context50.sent);
|
|
9102
9273
|
|
|
9103
9274
|
case 3:
|
|
9104
9275
|
case "end":
|
|
9105
|
-
return
|
|
9276
|
+
return _context50.stop();
|
|
9106
9277
|
}
|
|
9107
9278
|
}
|
|
9108
|
-
},
|
|
9279
|
+
}, _callee50, this);
|
|
9109
9280
|
}));
|
|
9110
9281
|
|
|
9111
|
-
function sendUserCustomEvent(
|
|
9282
|
+
function sendUserCustomEvent(_x68, _x69) {
|
|
9112
9283
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
9113
9284
|
}
|
|
9114
9285
|
|
|
@@ -9171,32 +9342,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9171
9342
|
}, {
|
|
9172
9343
|
key: "createSegment",
|
|
9173
9344
|
value: function () {
|
|
9174
|
-
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9345
|
+
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee51(params) {
|
|
9175
9346
|
var _yield$this$post, segment;
|
|
9176
9347
|
|
|
9177
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9348
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee51$(_context51) {
|
|
9178
9349
|
while (1) {
|
|
9179
|
-
switch (
|
|
9350
|
+
switch (_context51.prev = _context51.next) {
|
|
9180
9351
|
case 0:
|
|
9181
|
-
|
|
9352
|
+
_context51.next = 2;
|
|
9182
9353
|
return this.post(this.baseURL + "/segments", {
|
|
9183
9354
|
segment: params
|
|
9184
9355
|
});
|
|
9185
9356
|
|
|
9186
9357
|
case 2:
|
|
9187
|
-
_yield$this$post =
|
|
9358
|
+
_yield$this$post = _context51.sent;
|
|
9188
9359
|
segment = _yield$this$post.segment;
|
|
9189
|
-
return
|
|
9360
|
+
return _context51.abrupt("return", segment);
|
|
9190
9361
|
|
|
9191
9362
|
case 5:
|
|
9192
9363
|
case "end":
|
|
9193
|
-
return
|
|
9364
|
+
return _context51.stop();
|
|
9194
9365
|
}
|
|
9195
9366
|
}
|
|
9196
|
-
},
|
|
9367
|
+
}, _callee51, this);
|
|
9197
9368
|
}));
|
|
9198
9369
|
|
|
9199
|
-
function createSegment(
|
|
9370
|
+
function createSegment(_x70) {
|
|
9200
9371
|
return _createSegment.apply(this, arguments);
|
|
9201
9372
|
}
|
|
9202
9373
|
|
|
@@ -9213,30 +9384,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9213
9384
|
}, {
|
|
9214
9385
|
key: "getSegment",
|
|
9215
9386
|
value: function () {
|
|
9216
|
-
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9387
|
+
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee52(id) {
|
|
9217
9388
|
var _yield$this$get, segment;
|
|
9218
9389
|
|
|
9219
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9390
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee52$(_context52) {
|
|
9220
9391
|
while (1) {
|
|
9221
|
-
switch (
|
|
9392
|
+
switch (_context52.prev = _context52.next) {
|
|
9222
9393
|
case 0:
|
|
9223
|
-
|
|
9394
|
+
_context52.next = 2;
|
|
9224
9395
|
return this.get(this.baseURL + "/segments/".concat(id));
|
|
9225
9396
|
|
|
9226
9397
|
case 2:
|
|
9227
|
-
_yield$this$get =
|
|
9398
|
+
_yield$this$get = _context52.sent;
|
|
9228
9399
|
segment = _yield$this$get.segment;
|
|
9229
|
-
return
|
|
9400
|
+
return _context52.abrupt("return", segment);
|
|
9230
9401
|
|
|
9231
9402
|
case 5:
|
|
9232
9403
|
case "end":
|
|
9233
|
-
return
|
|
9404
|
+
return _context52.stop();
|
|
9234
9405
|
}
|
|
9235
9406
|
}
|
|
9236
|
-
},
|
|
9407
|
+
}, _callee52, this);
|
|
9237
9408
|
}));
|
|
9238
9409
|
|
|
9239
|
-
function getSegment(
|
|
9410
|
+
function getSegment(_x71) {
|
|
9240
9411
|
return _getSegment.apply(this, arguments);
|
|
9241
9412
|
}
|
|
9242
9413
|
|
|
@@ -9252,30 +9423,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9252
9423
|
}, {
|
|
9253
9424
|
key: "listSegments",
|
|
9254
9425
|
value: function () {
|
|
9255
|
-
var _listSegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9426
|
+
var _listSegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee53(options) {
|
|
9256
9427
|
var _yield$this$get2, segments;
|
|
9257
9428
|
|
|
9258
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9429
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee53$(_context53) {
|
|
9259
9430
|
while (1) {
|
|
9260
|
-
switch (
|
|
9431
|
+
switch (_context53.prev = _context53.next) {
|
|
9261
9432
|
case 0:
|
|
9262
|
-
|
|
9433
|
+
_context53.next = 2;
|
|
9263
9434
|
return this.get(this.baseURL + "/segments", options);
|
|
9264
9435
|
|
|
9265
9436
|
case 2:
|
|
9266
|
-
_yield$this$get2 =
|
|
9437
|
+
_yield$this$get2 = _context53.sent;
|
|
9267
9438
|
segments = _yield$this$get2.segments;
|
|
9268
|
-
return
|
|
9439
|
+
return _context53.abrupt("return", segments);
|
|
9269
9440
|
|
|
9270
9441
|
case 5:
|
|
9271
9442
|
case "end":
|
|
9272
|
-
return
|
|
9443
|
+
return _context53.stop();
|
|
9273
9444
|
}
|
|
9274
9445
|
}
|
|
9275
|
-
},
|
|
9446
|
+
}, _callee53, this);
|
|
9276
9447
|
}));
|
|
9277
9448
|
|
|
9278
|
-
function listSegments(
|
|
9449
|
+
function listSegments(_x72) {
|
|
9279
9450
|
return _listSegments.apply(this, arguments);
|
|
9280
9451
|
}
|
|
9281
9452
|
|
|
@@ -9293,32 +9464,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9293
9464
|
}, {
|
|
9294
9465
|
key: "updateSegment",
|
|
9295
9466
|
value: function () {
|
|
9296
|
-
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9467
|
+
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee54(id, params) {
|
|
9297
9468
|
var _yield$this$put, segment;
|
|
9298
9469
|
|
|
9299
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9470
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee54$(_context54) {
|
|
9300
9471
|
while (1) {
|
|
9301
|
-
switch (
|
|
9472
|
+
switch (_context54.prev = _context54.next) {
|
|
9302
9473
|
case 0:
|
|
9303
|
-
|
|
9474
|
+
_context54.next = 2;
|
|
9304
9475
|
return this.put(this.baseURL + "/segments/".concat(id), {
|
|
9305
9476
|
segment: params
|
|
9306
9477
|
});
|
|
9307
9478
|
|
|
9308
9479
|
case 2:
|
|
9309
|
-
_yield$this$put =
|
|
9480
|
+
_yield$this$put = _context54.sent;
|
|
9310
9481
|
segment = _yield$this$put.segment;
|
|
9311
|
-
return
|
|
9482
|
+
return _context54.abrupt("return", segment);
|
|
9312
9483
|
|
|
9313
9484
|
case 5:
|
|
9314
9485
|
case "end":
|
|
9315
|
-
return
|
|
9486
|
+
return _context54.stop();
|
|
9316
9487
|
}
|
|
9317
9488
|
}
|
|
9318
|
-
},
|
|
9489
|
+
}, _callee54, this);
|
|
9319
9490
|
}));
|
|
9320
9491
|
|
|
9321
|
-
function updateSegment(
|
|
9492
|
+
function updateSegment(_x73, _x74) {
|
|
9322
9493
|
return _updateSegment.apply(this, arguments);
|
|
9323
9494
|
}
|
|
9324
9495
|
|
|
@@ -9335,22 +9506,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9335
9506
|
}, {
|
|
9336
9507
|
key: "deleteSegment",
|
|
9337
9508
|
value: function () {
|
|
9338
|
-
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9339
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9509
|
+
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee55(id) {
|
|
9510
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee55$(_context55) {
|
|
9340
9511
|
while (1) {
|
|
9341
|
-
switch (
|
|
9512
|
+
switch (_context55.prev = _context55.next) {
|
|
9342
9513
|
case 0:
|
|
9343
|
-
return
|
|
9514
|
+
return _context55.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
|
|
9344
9515
|
|
|
9345
9516
|
case 1:
|
|
9346
9517
|
case "end":
|
|
9347
|
-
return
|
|
9518
|
+
return _context55.stop();
|
|
9348
9519
|
}
|
|
9349
9520
|
}
|
|
9350
|
-
},
|
|
9521
|
+
}, _callee55, this);
|
|
9351
9522
|
}));
|
|
9352
9523
|
|
|
9353
|
-
function deleteSegment(
|
|
9524
|
+
function deleteSegment(_x75) {
|
|
9354
9525
|
return _deleteSegment.apply(this, arguments);
|
|
9355
9526
|
}
|
|
9356
9527
|
|
|
@@ -9367,32 +9538,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9367
9538
|
}, {
|
|
9368
9539
|
key: "createCampaign",
|
|
9369
9540
|
value: function () {
|
|
9370
|
-
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9541
|
+
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee56(params) {
|
|
9371
9542
|
var _yield$this$post2, campaign;
|
|
9372
9543
|
|
|
9373
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9544
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee56$(_context56) {
|
|
9374
9545
|
while (1) {
|
|
9375
|
-
switch (
|
|
9546
|
+
switch (_context56.prev = _context56.next) {
|
|
9376
9547
|
case 0:
|
|
9377
|
-
|
|
9548
|
+
_context56.next = 2;
|
|
9378
9549
|
return this.post(this.baseURL + "/campaigns", {
|
|
9379
9550
|
campaign: params
|
|
9380
9551
|
});
|
|
9381
9552
|
|
|
9382
9553
|
case 2:
|
|
9383
|
-
_yield$this$post2 =
|
|
9554
|
+
_yield$this$post2 = _context56.sent;
|
|
9384
9555
|
campaign = _yield$this$post2.campaign;
|
|
9385
|
-
return
|
|
9556
|
+
return _context56.abrupt("return", campaign);
|
|
9386
9557
|
|
|
9387
9558
|
case 5:
|
|
9388
9559
|
case "end":
|
|
9389
|
-
return
|
|
9560
|
+
return _context56.stop();
|
|
9390
9561
|
}
|
|
9391
9562
|
}
|
|
9392
|
-
},
|
|
9563
|
+
}, _callee56, this);
|
|
9393
9564
|
}));
|
|
9394
9565
|
|
|
9395
|
-
function createCampaign(
|
|
9566
|
+
function createCampaign(_x76) {
|
|
9396
9567
|
return _createCampaign.apply(this, arguments);
|
|
9397
9568
|
}
|
|
9398
9569
|
|
|
@@ -9409,30 +9580,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9409
9580
|
}, {
|
|
9410
9581
|
key: "getCampaign",
|
|
9411
9582
|
value: function () {
|
|
9412
|
-
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9583
|
+
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee57(id) {
|
|
9413
9584
|
var _yield$this$get3, campaign;
|
|
9414
9585
|
|
|
9415
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9586
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee57$(_context57) {
|
|
9416
9587
|
while (1) {
|
|
9417
|
-
switch (
|
|
9588
|
+
switch (_context57.prev = _context57.next) {
|
|
9418
9589
|
case 0:
|
|
9419
|
-
|
|
9590
|
+
_context57.next = 2;
|
|
9420
9591
|
return this.get(this.baseURL + "/campaigns/".concat(id));
|
|
9421
9592
|
|
|
9422
9593
|
case 2:
|
|
9423
|
-
_yield$this$get3 =
|
|
9594
|
+
_yield$this$get3 = _context57.sent;
|
|
9424
9595
|
campaign = _yield$this$get3.campaign;
|
|
9425
|
-
return
|
|
9596
|
+
return _context57.abrupt("return", campaign);
|
|
9426
9597
|
|
|
9427
9598
|
case 5:
|
|
9428
9599
|
case "end":
|
|
9429
|
-
return
|
|
9600
|
+
return _context57.stop();
|
|
9430
9601
|
}
|
|
9431
9602
|
}
|
|
9432
|
-
},
|
|
9603
|
+
}, _callee57, this);
|
|
9433
9604
|
}));
|
|
9434
9605
|
|
|
9435
|
-
function getCampaign(
|
|
9606
|
+
function getCampaign(_x77) {
|
|
9436
9607
|
return _getCampaign.apply(this, arguments);
|
|
9437
9608
|
}
|
|
9438
9609
|
|
|
@@ -9448,30 +9619,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9448
9619
|
}, {
|
|
9449
9620
|
key: "listCampaigns",
|
|
9450
9621
|
value: function () {
|
|
9451
|
-
var _listCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9622
|
+
var _listCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee58(options) {
|
|
9452
9623
|
var _yield$this$get4, campaigns;
|
|
9453
9624
|
|
|
9454
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9625
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee58$(_context58) {
|
|
9455
9626
|
while (1) {
|
|
9456
|
-
switch (
|
|
9627
|
+
switch (_context58.prev = _context58.next) {
|
|
9457
9628
|
case 0:
|
|
9458
|
-
|
|
9629
|
+
_context58.next = 2;
|
|
9459
9630
|
return this.get(this.baseURL + "/campaigns", options);
|
|
9460
9631
|
|
|
9461
9632
|
case 2:
|
|
9462
|
-
_yield$this$get4 =
|
|
9633
|
+
_yield$this$get4 = _context58.sent;
|
|
9463
9634
|
campaigns = _yield$this$get4.campaigns;
|
|
9464
|
-
return
|
|
9635
|
+
return _context58.abrupt("return", campaigns);
|
|
9465
9636
|
|
|
9466
9637
|
case 5:
|
|
9467
9638
|
case "end":
|
|
9468
|
-
return
|
|
9639
|
+
return _context58.stop();
|
|
9469
9640
|
}
|
|
9470
9641
|
}
|
|
9471
|
-
},
|
|
9642
|
+
}, _callee58, this);
|
|
9472
9643
|
}));
|
|
9473
9644
|
|
|
9474
|
-
function listCampaigns(
|
|
9645
|
+
function listCampaigns(_x78) {
|
|
9475
9646
|
return _listCampaigns.apply(this, arguments);
|
|
9476
9647
|
}
|
|
9477
9648
|
|
|
@@ -9489,32 +9660,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9489
9660
|
}, {
|
|
9490
9661
|
key: "updateCampaign",
|
|
9491
9662
|
value: function () {
|
|
9492
|
-
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9663
|
+
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee59(id, params) {
|
|
9493
9664
|
var _yield$this$put2, campaign;
|
|
9494
9665
|
|
|
9495
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9666
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee59$(_context59) {
|
|
9496
9667
|
while (1) {
|
|
9497
|
-
switch (
|
|
9668
|
+
switch (_context59.prev = _context59.next) {
|
|
9498
9669
|
case 0:
|
|
9499
|
-
|
|
9670
|
+
_context59.next = 2;
|
|
9500
9671
|
return this.put(this.baseURL + "/campaigns/".concat(id), {
|
|
9501
9672
|
campaign: params
|
|
9502
9673
|
});
|
|
9503
9674
|
|
|
9504
9675
|
case 2:
|
|
9505
|
-
_yield$this$put2 =
|
|
9676
|
+
_yield$this$put2 = _context59.sent;
|
|
9506
9677
|
campaign = _yield$this$put2.campaign;
|
|
9507
|
-
return
|
|
9678
|
+
return _context59.abrupt("return", campaign);
|
|
9508
9679
|
|
|
9509
9680
|
case 5:
|
|
9510
9681
|
case "end":
|
|
9511
|
-
return
|
|
9682
|
+
return _context59.stop();
|
|
9512
9683
|
}
|
|
9513
9684
|
}
|
|
9514
|
-
},
|
|
9685
|
+
}, _callee59, this);
|
|
9515
9686
|
}));
|
|
9516
9687
|
|
|
9517
|
-
function updateCampaign(
|
|
9688
|
+
function updateCampaign(_x79, _x80) {
|
|
9518
9689
|
return _updateCampaign.apply(this, arguments);
|
|
9519
9690
|
}
|
|
9520
9691
|
|
|
@@ -9531,22 +9702,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9531
9702
|
}, {
|
|
9532
9703
|
key: "deleteCampaign",
|
|
9533
9704
|
value: function () {
|
|
9534
|
-
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9535
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9705
|
+
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee60(id) {
|
|
9706
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee60$(_context60) {
|
|
9536
9707
|
while (1) {
|
|
9537
|
-
switch (
|
|
9708
|
+
switch (_context60.prev = _context60.next) {
|
|
9538
9709
|
case 0:
|
|
9539
|
-
return
|
|
9710
|
+
return _context60.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
|
|
9540
9711
|
|
|
9541
9712
|
case 1:
|
|
9542
9713
|
case "end":
|
|
9543
|
-
return
|
|
9714
|
+
return _context60.stop();
|
|
9544
9715
|
}
|
|
9545
9716
|
}
|
|
9546
|
-
},
|
|
9717
|
+
}, _callee60, this);
|
|
9547
9718
|
}));
|
|
9548
9719
|
|
|
9549
|
-
function deleteCampaign(
|
|
9720
|
+
function deleteCampaign(_x81) {
|
|
9550
9721
|
return _deleteCampaign.apply(this, arguments);
|
|
9551
9722
|
}
|
|
9552
9723
|
|
|
@@ -9564,33 +9735,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9564
9735
|
}, {
|
|
9565
9736
|
key: "scheduleCampaign",
|
|
9566
9737
|
value: function () {
|
|
9567
|
-
var _scheduleCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9738
|
+
var _scheduleCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee61(id, params) {
|
|
9568
9739
|
var sendAt, _yield$this$patch, campaign;
|
|
9569
9740
|
|
|
9570
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9741
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee61$(_context61) {
|
|
9571
9742
|
while (1) {
|
|
9572
|
-
switch (
|
|
9743
|
+
switch (_context61.prev = _context61.next) {
|
|
9573
9744
|
case 0:
|
|
9574
9745
|
sendAt = params.sendAt;
|
|
9575
|
-
|
|
9746
|
+
_context61.next = 3;
|
|
9576
9747
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
|
|
9577
9748
|
send_at: sendAt
|
|
9578
9749
|
});
|
|
9579
9750
|
|
|
9580
9751
|
case 3:
|
|
9581
|
-
_yield$this$patch =
|
|
9752
|
+
_yield$this$patch = _context61.sent;
|
|
9582
9753
|
campaign = _yield$this$patch.campaign;
|
|
9583
|
-
return
|
|
9754
|
+
return _context61.abrupt("return", campaign);
|
|
9584
9755
|
|
|
9585
9756
|
case 6:
|
|
9586
9757
|
case "end":
|
|
9587
|
-
return
|
|
9758
|
+
return _context61.stop();
|
|
9588
9759
|
}
|
|
9589
9760
|
}
|
|
9590
|
-
},
|
|
9761
|
+
}, _callee61, this);
|
|
9591
9762
|
}));
|
|
9592
9763
|
|
|
9593
|
-
function scheduleCampaign(
|
|
9764
|
+
function scheduleCampaign(_x82, _x83) {
|
|
9594
9765
|
return _scheduleCampaign.apply(this, arguments);
|
|
9595
9766
|
}
|
|
9596
9767
|
|
|
@@ -9607,30 +9778,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9607
9778
|
}, {
|
|
9608
9779
|
key: "stopCampaign",
|
|
9609
9780
|
value: function () {
|
|
9610
|
-
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9781
|
+
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee62(id) {
|
|
9611
9782
|
var _yield$this$patch2, campaign;
|
|
9612
9783
|
|
|
9613
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9784
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee62$(_context62) {
|
|
9614
9785
|
while (1) {
|
|
9615
|
-
switch (
|
|
9786
|
+
switch (_context62.prev = _context62.next) {
|
|
9616
9787
|
case 0:
|
|
9617
|
-
|
|
9788
|
+
_context62.next = 2;
|
|
9618
9789
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
|
|
9619
9790
|
|
|
9620
9791
|
case 2:
|
|
9621
|
-
_yield$this$patch2 =
|
|
9792
|
+
_yield$this$patch2 = _context62.sent;
|
|
9622
9793
|
campaign = _yield$this$patch2.campaign;
|
|
9623
|
-
return
|
|
9794
|
+
return _context62.abrupt("return", campaign);
|
|
9624
9795
|
|
|
9625
9796
|
case 5:
|
|
9626
9797
|
case "end":
|
|
9627
|
-
return
|
|
9798
|
+
return _context62.stop();
|
|
9628
9799
|
}
|
|
9629
9800
|
}
|
|
9630
|
-
},
|
|
9801
|
+
}, _callee62, this);
|
|
9631
9802
|
}));
|
|
9632
9803
|
|
|
9633
|
-
function stopCampaign(
|
|
9804
|
+
function stopCampaign(_x84) {
|
|
9634
9805
|
return _stopCampaign.apply(this, arguments);
|
|
9635
9806
|
}
|
|
9636
9807
|
|
|
@@ -9647,30 +9818,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9647
9818
|
}, {
|
|
9648
9819
|
key: "resumeCampaign",
|
|
9649
9820
|
value: function () {
|
|
9650
|
-
var _resumeCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9821
|
+
var _resumeCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee63(id) {
|
|
9651
9822
|
var _yield$this$patch3, campaign;
|
|
9652
9823
|
|
|
9653
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9824
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee63$(_context63) {
|
|
9654
9825
|
while (1) {
|
|
9655
|
-
switch (
|
|
9826
|
+
switch (_context63.prev = _context63.next) {
|
|
9656
9827
|
case 0:
|
|
9657
|
-
|
|
9828
|
+
_context63.next = 2;
|
|
9658
9829
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
|
|
9659
9830
|
|
|
9660
9831
|
case 2:
|
|
9661
|
-
_yield$this$patch3 =
|
|
9832
|
+
_yield$this$patch3 = _context63.sent;
|
|
9662
9833
|
campaign = _yield$this$patch3.campaign;
|
|
9663
|
-
return
|
|
9834
|
+
return _context63.abrupt("return", campaign);
|
|
9664
9835
|
|
|
9665
9836
|
case 5:
|
|
9666
9837
|
case "end":
|
|
9667
|
-
return
|
|
9838
|
+
return _context63.stop();
|
|
9668
9839
|
}
|
|
9669
9840
|
}
|
|
9670
|
-
},
|
|
9841
|
+
}, _callee63, this);
|
|
9671
9842
|
}));
|
|
9672
9843
|
|
|
9673
|
-
function resumeCampaign(
|
|
9844
|
+
function resumeCampaign(_x85) {
|
|
9674
9845
|
return _resumeCampaign.apply(this, arguments);
|
|
9675
9846
|
}
|
|
9676
9847
|
|
|
@@ -9687,33 +9858,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9687
9858
|
}, {
|
|
9688
9859
|
key: "testCampaign",
|
|
9689
9860
|
value: function () {
|
|
9690
|
-
var _testCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9861
|
+
var _testCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee64(id, params) {
|
|
9691
9862
|
var users, _yield$this$post3, campaign;
|
|
9692
9863
|
|
|
9693
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9864
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee64$(_context64) {
|
|
9694
9865
|
while (1) {
|
|
9695
|
-
switch (
|
|
9866
|
+
switch (_context64.prev = _context64.next) {
|
|
9696
9867
|
case 0:
|
|
9697
9868
|
users = params.users;
|
|
9698
|
-
|
|
9869
|
+
_context64.next = 3;
|
|
9699
9870
|
return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
|
|
9700
9871
|
users: users
|
|
9701
9872
|
});
|
|
9702
9873
|
|
|
9703
9874
|
case 3:
|
|
9704
|
-
_yield$this$post3 =
|
|
9875
|
+
_yield$this$post3 = _context64.sent;
|
|
9705
9876
|
campaign = _yield$this$post3.campaign;
|
|
9706
|
-
return
|
|
9877
|
+
return _context64.abrupt("return", campaign);
|
|
9707
9878
|
|
|
9708
9879
|
case 6:
|
|
9709
9880
|
case "end":
|
|
9710
|
-
return
|
|
9881
|
+
return _context64.stop();
|
|
9711
9882
|
}
|
|
9712
9883
|
}
|
|
9713
|
-
},
|
|
9884
|
+
}, _callee64, this);
|
|
9714
9885
|
}));
|
|
9715
9886
|
|
|
9716
|
-
function testCampaign(
|
|
9887
|
+
function testCampaign(_x86, _x87) {
|
|
9717
9888
|
return _testCampaign.apply(this, arguments);
|
|
9718
9889
|
}
|
|
9719
9890
|
|
|
@@ -9729,24 +9900,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9729
9900
|
}, {
|
|
9730
9901
|
key: "enrichURL",
|
|
9731
9902
|
value: function () {
|
|
9732
|
-
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9733
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9903
|
+
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee65(url) {
|
|
9904
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee65$(_context65) {
|
|
9734
9905
|
while (1) {
|
|
9735
|
-
switch (
|
|
9906
|
+
switch (_context65.prev = _context65.next) {
|
|
9736
9907
|
case 0:
|
|
9737
|
-
return
|
|
9908
|
+
return _context65.abrupt("return", this.get(this.baseURL + "/og", {
|
|
9738
9909
|
url: url
|
|
9739
9910
|
}));
|
|
9740
9911
|
|
|
9741
9912
|
case 1:
|
|
9742
9913
|
case "end":
|
|
9743
|
-
return
|
|
9914
|
+
return _context65.stop();
|
|
9744
9915
|
}
|
|
9745
9916
|
}
|
|
9746
|
-
},
|
|
9917
|
+
}, _callee65, this);
|
|
9747
9918
|
}));
|
|
9748
9919
|
|
|
9749
|
-
function enrichURL(
|
|
9920
|
+
function enrichURL(_x88) {
|
|
9750
9921
|
return _enrichURL.apply(this, arguments);
|
|
9751
9922
|
}
|
|
9752
9923
|
|
|
@@ -9763,22 +9934,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9763
9934
|
}, {
|
|
9764
9935
|
key: "getTask",
|
|
9765
9936
|
value: function () {
|
|
9766
|
-
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9767
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9937
|
+
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee66(id) {
|
|
9938
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee66$(_context66) {
|
|
9768
9939
|
while (1) {
|
|
9769
|
-
switch (
|
|
9940
|
+
switch (_context66.prev = _context66.next) {
|
|
9770
9941
|
case 0:
|
|
9771
|
-
return
|
|
9942
|
+
return _context66.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
9772
9943
|
|
|
9773
9944
|
case 1:
|
|
9774
9945
|
case "end":
|
|
9775
|
-
return
|
|
9946
|
+
return _context66.stop();
|
|
9776
9947
|
}
|
|
9777
9948
|
}
|
|
9778
|
-
},
|
|
9949
|
+
}, _callee66, this);
|
|
9779
9950
|
}));
|
|
9780
9951
|
|
|
9781
|
-
function getTask(
|
|
9952
|
+
function getTask(_x89) {
|
|
9782
9953
|
return _getTask.apply(this, arguments);
|
|
9783
9954
|
}
|
|
9784
9955
|
|
|
@@ -9796,31 +9967,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9796
9967
|
}, {
|
|
9797
9968
|
key: "deleteChannels",
|
|
9798
9969
|
value: function () {
|
|
9799
|
-
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9970
|
+
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee67(cids) {
|
|
9800
9971
|
var options,
|
|
9801
|
-
|
|
9802
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9972
|
+
_args67 = arguments;
|
|
9973
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee67$(_context67) {
|
|
9803
9974
|
while (1) {
|
|
9804
|
-
switch (
|
|
9975
|
+
switch (_context67.prev = _context67.next) {
|
|
9805
9976
|
case 0:
|
|
9806
|
-
options =
|
|
9807
|
-
|
|
9977
|
+
options = _args67.length > 1 && _args67[1] !== undefined ? _args67[1] : {};
|
|
9978
|
+
_context67.next = 3;
|
|
9808
9979
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
9809
9980
|
cids: cids
|
|
9810
9981
|
}, options));
|
|
9811
9982
|
|
|
9812
9983
|
case 3:
|
|
9813
|
-
return
|
|
9984
|
+
return _context67.abrupt("return", _context67.sent);
|
|
9814
9985
|
|
|
9815
9986
|
case 4:
|
|
9816
9987
|
case "end":
|
|
9817
|
-
return
|
|
9988
|
+
return _context67.stop();
|
|
9818
9989
|
}
|
|
9819
9990
|
}
|
|
9820
|
-
},
|
|
9991
|
+
}, _callee67, this);
|
|
9821
9992
|
}));
|
|
9822
9993
|
|
|
9823
|
-
function deleteChannels(
|
|
9994
|
+
function deleteChannels(_x90) {
|
|
9824
9995
|
return _deleteChannels.apply(this, arguments);
|
|
9825
9996
|
}
|
|
9826
9997
|
|
|
@@ -9838,13 +10009,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9838
10009
|
}, {
|
|
9839
10010
|
key: "deleteUsers",
|
|
9840
10011
|
value: function () {
|
|
9841
|
-
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9842
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10012
|
+
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee68(user_ids, options) {
|
|
10013
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee68$(_context68) {
|
|
9843
10014
|
while (1) {
|
|
9844
|
-
switch (
|
|
10015
|
+
switch (_context68.prev = _context68.next) {
|
|
9845
10016
|
case 0:
|
|
9846
10017
|
if (!((options === null || options === void 0 ? void 0 : options.user) !== 'soft' && (options === null || options === void 0 ? void 0 : options.user) !== 'hard')) {
|
|
9847
|
-
|
|
10018
|
+
_context68.next = 2;
|
|
9848
10019
|
break;
|
|
9849
10020
|
}
|
|
9850
10021
|
|
|
@@ -9852,7 +10023,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9852
10023
|
|
|
9853
10024
|
case 2:
|
|
9854
10025
|
if (!(options.messages !== undefined && options.messages !== 'soft' && options.messages !== 'hard')) {
|
|
9855
|
-
|
|
10026
|
+
_context68.next = 4;
|
|
9856
10027
|
break;
|
|
9857
10028
|
}
|
|
9858
10029
|
|
|
@@ -9860,30 +10031,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9860
10031
|
|
|
9861
10032
|
case 4:
|
|
9862
10033
|
if (!(options.conversations !== undefined && options.conversations !== 'soft' && options.conversations !== 'hard')) {
|
|
9863
|
-
|
|
10034
|
+
_context68.next = 6;
|
|
9864
10035
|
break;
|
|
9865
10036
|
}
|
|
9866
10037
|
|
|
9867
10038
|
throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
|
|
9868
10039
|
|
|
9869
10040
|
case 6:
|
|
9870
|
-
|
|
10041
|
+
_context68.next = 8;
|
|
9871
10042
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
9872
10043
|
user_ids: user_ids
|
|
9873
10044
|
}, options));
|
|
9874
10045
|
|
|
9875
10046
|
case 8:
|
|
9876
|
-
return
|
|
10047
|
+
return _context68.abrupt("return", _context68.sent);
|
|
9877
10048
|
|
|
9878
10049
|
case 9:
|
|
9879
10050
|
case "end":
|
|
9880
|
-
return
|
|
10051
|
+
return _context68.stop();
|
|
9881
10052
|
}
|
|
9882
10053
|
}
|
|
9883
|
-
},
|
|
10054
|
+
}, _callee68, this);
|
|
9884
10055
|
}));
|
|
9885
10056
|
|
|
9886
|
-
function deleteUsers(
|
|
10057
|
+
function deleteUsers(_x91, _x92) {
|
|
9887
10058
|
return _deleteUsers.apply(this, arguments);
|
|
9888
10059
|
}
|
|
9889
10060
|
|