stream-chat 5.0.0 → 5.1.2
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/README.md +0 -1
- package/dist/browser.es.js +525 -340
- 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 +525 -340
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +525 -340
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +525 -340
- 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/channel_state.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 +2 -2
- package/dist/types/connection_fallback.d.ts.map +1 -1
- package/dist/types/types.d.ts +84 -2
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts.map +1 -1
- package/package.json +23 -29
- package/src/channel.ts +29 -1
- package/src/channel_state.ts +4 -0
- package/src/client.ts +64 -6
- package/src/connection_fallback.ts +9 -5
- package/src/types.ts +127 -1
- package/src/utils.ts +5 -1
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
|
|
|
@@ -335,6 +335,12 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
335
335
|
for (var i = 0; i < newMessages.length; i += 1) {
|
|
336
336
|
var _this$_channel;
|
|
337
337
|
|
|
338
|
+
var isFromShadowBannedUser = newMessages[i].shadowed;
|
|
339
|
+
|
|
340
|
+
if (isFromShadowBannedUser) {
|
|
341
|
+
continue;
|
|
342
|
+
}
|
|
343
|
+
|
|
338
344
|
var message = this.formatMessage(newMessages[i]);
|
|
339
345
|
|
|
340
346
|
if (message.user && (_this$_channel = this._channel) !== null && _this$_channel !== void 0 && _this$_channel.cid) {
|
|
@@ -724,7 +730,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
724
730
|
return ChannelState;
|
|
725
731
|
}();
|
|
726
732
|
|
|
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; }
|
|
733
|
+
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
734
|
|
|
729
735
|
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
736
|
|
|
@@ -781,7 +787,7 @@ var isValidEventType = function isValidEventType(eventType) {
|
|
|
781
787
|
return IS_VALID_EVENT_MAP_TYPE[eventType] || false;
|
|
782
788
|
};
|
|
783
789
|
|
|
784
|
-
function _createForOfIteratorHelper$3(o, allowArrayLike) { var it
|
|
790
|
+
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
791
|
|
|
786
792
|
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
793
|
|
|
@@ -827,6 +833,10 @@ function isFileWebAPI(uri) {
|
|
|
827
833
|
return typeof window !== 'undefined' && 'File' in window && uri instanceof File;
|
|
828
834
|
}
|
|
829
835
|
|
|
836
|
+
function isBlobWebAPI(uri) {
|
|
837
|
+
return typeof window !== 'undefined' && 'Blob' in window && uri instanceof Blob;
|
|
838
|
+
}
|
|
839
|
+
|
|
830
840
|
function isOwnUser(user) {
|
|
831
841
|
return (user === null || user === void 0 ? void 0 : user.total_unread_count) !== undefined;
|
|
832
842
|
}
|
|
@@ -846,7 +856,7 @@ function isOwnUserBaseProperty(property) {
|
|
|
846
856
|
function addFileToFormData(uri, name, contentType) {
|
|
847
857
|
var data = new FormData__default['default']();
|
|
848
858
|
|
|
849
|
-
if (isReadableStream(uri) || isBuffer(uri) || isFileWebAPI(uri)) {
|
|
859
|
+
if (isReadableStream(uri) || isBuffer(uri) || isFileWebAPI(uri) || isBlobWebAPI(uri)) {
|
|
850
860
|
if (name) data.append('file', uri, name);else data.append('file', uri);
|
|
851
861
|
} else {
|
|
852
862
|
data.append('file', {
|
|
@@ -1007,13 +1017,13 @@ function removeConnectionEventListeners(cb) {
|
|
|
1007
1017
|
}
|
|
1008
1018
|
}
|
|
1009
1019
|
|
|
1010
|
-
function _createForOfIteratorHelper$2(o, allowArrayLike) { var it
|
|
1020
|
+
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; } } }; }
|
|
1011
1021
|
|
|
1012
1022
|
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); }
|
|
1013
1023
|
|
|
1014
1024
|
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; }
|
|
1015
1025
|
|
|
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; }
|
|
1026
|
+
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; }
|
|
1017
1027
|
|
|
1018
1028
|
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; }
|
|
1019
1029
|
|
|
@@ -2598,6 +2608,50 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2598
2608
|
|
|
2599
2609
|
return getReplies;
|
|
2600
2610
|
}()
|
|
2611
|
+
/**
|
|
2612
|
+
* getPinnedMessages - List list pinned messages of the channel
|
|
2613
|
+
*
|
|
2614
|
+
* @param {PinnedMessagePaginationOptions & { user?: UserResponse<UserType>; user_id?: string }} options Pagination params, ie {limit:10, id_lte: 10}
|
|
2615
|
+
* @param {PinnedMessagesSort} sort defines sorting direction of pinned messages
|
|
2616
|
+
*
|
|
2617
|
+
* @return {Promise<GetRepliesAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} A response with a list of messages
|
|
2618
|
+
*/
|
|
2619
|
+
|
|
2620
|
+
}, {
|
|
2621
|
+
key: "getPinnedMessages",
|
|
2622
|
+
value: function () {
|
|
2623
|
+
var _getPinnedMessages = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee30(options) {
|
|
2624
|
+
var sort,
|
|
2625
|
+
_args30 = arguments;
|
|
2626
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee30$(_context30) {
|
|
2627
|
+
while (1) {
|
|
2628
|
+
switch (_context30.prev = _context30.next) {
|
|
2629
|
+
case 0:
|
|
2630
|
+
sort = _args30.length > 1 && _args30[1] !== undefined ? _args30[1] : [];
|
|
2631
|
+
_context30.next = 3;
|
|
2632
|
+
return this.getClient().get(this.getClient().baseURL + "/channels/".concat(this.type, "/").concat(this.id, "/pinned_messages"), {
|
|
2633
|
+
payload: _objectSpread$5(_objectSpread$5({}, options), {}, {
|
|
2634
|
+
sort: normalizeQuerySort(sort)
|
|
2635
|
+
})
|
|
2636
|
+
});
|
|
2637
|
+
|
|
2638
|
+
case 3:
|
|
2639
|
+
return _context30.abrupt("return", _context30.sent);
|
|
2640
|
+
|
|
2641
|
+
case 4:
|
|
2642
|
+
case "end":
|
|
2643
|
+
return _context30.stop();
|
|
2644
|
+
}
|
|
2645
|
+
}
|
|
2646
|
+
}, _callee30, this);
|
|
2647
|
+
}));
|
|
2648
|
+
|
|
2649
|
+
function getPinnedMessages(_x29) {
|
|
2650
|
+
return _getPinnedMessages.apply(this, arguments);
|
|
2651
|
+
}
|
|
2652
|
+
|
|
2653
|
+
return getPinnedMessages;
|
|
2654
|
+
}()
|
|
2601
2655
|
/**
|
|
2602
2656
|
* getReactions - List the reactions, supports pagination
|
|
2603
2657
|
*
|
|
@@ -2725,13 +2779,13 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2725
2779
|
* @return {Promise<ChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} Returns a query response
|
|
2726
2780
|
*/
|
|
2727
2781
|
function () {
|
|
2728
|
-
var _query = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2782
|
+
var _query = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee31(options) {
|
|
2729
2783
|
var queryURL, state, membersStr, tempChannelCid;
|
|
2730
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
2784
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee31$(_context31) {
|
|
2731
2785
|
while (1) {
|
|
2732
|
-
switch (
|
|
2786
|
+
switch (_context31.prev = _context31.next) {
|
|
2733
2787
|
case 0:
|
|
2734
|
-
|
|
2788
|
+
_context31.next = 2;
|
|
2735
2789
|
return this.getClient().wsPromise;
|
|
2736
2790
|
|
|
2737
2791
|
case 2:
|
|
@@ -2741,14 +2795,14 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2741
2795
|
queryURL += "/".concat(this.id);
|
|
2742
2796
|
}
|
|
2743
2797
|
|
|
2744
|
-
|
|
2798
|
+
_context31.next = 6;
|
|
2745
2799
|
return this.getClient().post(queryURL + '/query', _objectSpread$5({
|
|
2746
2800
|
data: this._data,
|
|
2747
2801
|
state: true
|
|
2748
2802
|
}, options));
|
|
2749
2803
|
|
|
2750
2804
|
case 6:
|
|
2751
|
-
state =
|
|
2805
|
+
state = _context31.sent;
|
|
2752
2806
|
|
|
2753
2807
|
// update the channel id if it was missing
|
|
2754
2808
|
if (!this.id) {
|
|
@@ -2778,17 +2832,17 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2778
2832
|
|
|
2779
2833
|
this._initializeState(state);
|
|
2780
2834
|
|
|
2781
|
-
return
|
|
2835
|
+
return _context31.abrupt("return", state);
|
|
2782
2836
|
|
|
2783
2837
|
case 11:
|
|
2784
2838
|
case "end":
|
|
2785
|
-
return
|
|
2839
|
+
return _context31.stop();
|
|
2786
2840
|
}
|
|
2787
2841
|
}
|
|
2788
|
-
},
|
|
2842
|
+
}, _callee31, this);
|
|
2789
2843
|
}));
|
|
2790
2844
|
|
|
2791
|
-
function query(
|
|
2845
|
+
function query(_x30) {
|
|
2792
2846
|
return _query.apply(this, arguments);
|
|
2793
2847
|
}
|
|
2794
2848
|
|
|
@@ -2805,31 +2859,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2805
2859
|
}, {
|
|
2806
2860
|
key: "banUser",
|
|
2807
2861
|
value: function () {
|
|
2808
|
-
var _banUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2809
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
2862
|
+
var _banUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee32(targetUserID, options) {
|
|
2863
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee32$(_context32) {
|
|
2810
2864
|
while (1) {
|
|
2811
|
-
switch (
|
|
2865
|
+
switch (_context32.prev = _context32.next) {
|
|
2812
2866
|
case 0:
|
|
2813
2867
|
this._checkInitialized();
|
|
2814
2868
|
|
|
2815
|
-
|
|
2869
|
+
_context32.next = 3;
|
|
2816
2870
|
return this.getClient().banUser(targetUserID, _objectSpread$5(_objectSpread$5({}, options), {}, {
|
|
2817
2871
|
type: this.type,
|
|
2818
2872
|
id: this.id
|
|
2819
2873
|
}));
|
|
2820
2874
|
|
|
2821
2875
|
case 3:
|
|
2822
|
-
return
|
|
2876
|
+
return _context32.abrupt("return", _context32.sent);
|
|
2823
2877
|
|
|
2824
2878
|
case 4:
|
|
2825
2879
|
case "end":
|
|
2826
|
-
return
|
|
2880
|
+
return _context32.stop();
|
|
2827
2881
|
}
|
|
2828
2882
|
}
|
|
2829
|
-
},
|
|
2883
|
+
}, _callee32, this);
|
|
2830
2884
|
}));
|
|
2831
2885
|
|
|
2832
|
-
function banUser(
|
|
2886
|
+
function banUser(_x31, _x32) {
|
|
2833
2887
|
return _banUser.apply(this, arguments);
|
|
2834
2888
|
}
|
|
2835
2889
|
|
|
@@ -2847,34 +2901,34 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2847
2901
|
}, {
|
|
2848
2902
|
key: "hide",
|
|
2849
2903
|
value: function () {
|
|
2850
|
-
var _hide = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2904
|
+
var _hide = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee33() {
|
|
2851
2905
|
var userId,
|
|
2852
2906
|
clearHistory,
|
|
2853
|
-
|
|
2854
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
2907
|
+
_args33 = arguments;
|
|
2908
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee33$(_context33) {
|
|
2855
2909
|
while (1) {
|
|
2856
|
-
switch (
|
|
2910
|
+
switch (_context33.prev = _context33.next) {
|
|
2857
2911
|
case 0:
|
|
2858
|
-
userId =
|
|
2859
|
-
clearHistory =
|
|
2912
|
+
userId = _args33.length > 0 && _args33[0] !== undefined ? _args33[0] : null;
|
|
2913
|
+
clearHistory = _args33.length > 1 && _args33[1] !== undefined ? _args33[1] : false;
|
|
2860
2914
|
|
|
2861
2915
|
this._checkInitialized();
|
|
2862
2916
|
|
|
2863
|
-
|
|
2917
|
+
_context33.next = 5;
|
|
2864
2918
|
return this.getClient().post("".concat(this._channelURL(), "/hide"), {
|
|
2865
2919
|
user_id: userId,
|
|
2866
2920
|
clear_history: clearHistory
|
|
2867
2921
|
});
|
|
2868
2922
|
|
|
2869
2923
|
case 5:
|
|
2870
|
-
return
|
|
2924
|
+
return _context33.abrupt("return", _context33.sent);
|
|
2871
2925
|
|
|
2872
2926
|
case 6:
|
|
2873
2927
|
case "end":
|
|
2874
|
-
return
|
|
2928
|
+
return _context33.stop();
|
|
2875
2929
|
}
|
|
2876
2930
|
}
|
|
2877
|
-
},
|
|
2931
|
+
}, _callee33, this);
|
|
2878
2932
|
}));
|
|
2879
2933
|
|
|
2880
2934
|
function hide() {
|
|
@@ -2893,31 +2947,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2893
2947
|
}, {
|
|
2894
2948
|
key: "show",
|
|
2895
2949
|
value: function () {
|
|
2896
|
-
var _show = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2950
|
+
var _show = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee34() {
|
|
2897
2951
|
var userId,
|
|
2898
|
-
|
|
2899
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
2952
|
+
_args34 = arguments;
|
|
2953
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee34$(_context34) {
|
|
2900
2954
|
while (1) {
|
|
2901
|
-
switch (
|
|
2955
|
+
switch (_context34.prev = _context34.next) {
|
|
2902
2956
|
case 0:
|
|
2903
|
-
userId =
|
|
2957
|
+
userId = _args34.length > 0 && _args34[0] !== undefined ? _args34[0] : null;
|
|
2904
2958
|
|
|
2905
2959
|
this._checkInitialized();
|
|
2906
2960
|
|
|
2907
|
-
|
|
2961
|
+
_context34.next = 4;
|
|
2908
2962
|
return this.getClient().post("".concat(this._channelURL(), "/show"), {
|
|
2909
2963
|
user_id: userId
|
|
2910
2964
|
});
|
|
2911
2965
|
|
|
2912
2966
|
case 4:
|
|
2913
|
-
return
|
|
2967
|
+
return _context34.abrupt("return", _context34.sent);
|
|
2914
2968
|
|
|
2915
2969
|
case 5:
|
|
2916
2970
|
case "end":
|
|
2917
|
-
return
|
|
2971
|
+
return _context34.stop();
|
|
2918
2972
|
}
|
|
2919
2973
|
}
|
|
2920
|
-
},
|
|
2974
|
+
}, _callee34, this);
|
|
2921
2975
|
}));
|
|
2922
2976
|
|
|
2923
2977
|
function show() {
|
|
@@ -2936,31 +2990,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2936
2990
|
}, {
|
|
2937
2991
|
key: "unbanUser",
|
|
2938
2992
|
value: function () {
|
|
2939
|
-
var _unbanUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2940
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
2993
|
+
var _unbanUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee35(targetUserID) {
|
|
2994
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee35$(_context35) {
|
|
2941
2995
|
while (1) {
|
|
2942
|
-
switch (
|
|
2996
|
+
switch (_context35.prev = _context35.next) {
|
|
2943
2997
|
case 0:
|
|
2944
2998
|
this._checkInitialized();
|
|
2945
2999
|
|
|
2946
|
-
|
|
3000
|
+
_context35.next = 3;
|
|
2947
3001
|
return this.getClient().unbanUser(targetUserID, {
|
|
2948
3002
|
type: this.type,
|
|
2949
3003
|
id: this.id
|
|
2950
3004
|
});
|
|
2951
3005
|
|
|
2952
3006
|
case 3:
|
|
2953
|
-
return
|
|
3007
|
+
return _context35.abrupt("return", _context35.sent);
|
|
2954
3008
|
|
|
2955
3009
|
case 4:
|
|
2956
3010
|
case "end":
|
|
2957
|
-
return
|
|
3011
|
+
return _context35.stop();
|
|
2958
3012
|
}
|
|
2959
3013
|
}
|
|
2960
|
-
},
|
|
3014
|
+
}, _callee35, this);
|
|
2961
3015
|
}));
|
|
2962
3016
|
|
|
2963
|
-
function unbanUser(
|
|
3017
|
+
function unbanUser(_x33) {
|
|
2964
3018
|
return _unbanUser.apply(this, arguments);
|
|
2965
3019
|
}
|
|
2966
3020
|
|
|
@@ -2977,31 +3031,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2977
3031
|
}, {
|
|
2978
3032
|
key: "shadowBan",
|
|
2979
3033
|
value: function () {
|
|
2980
|
-
var _shadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2981
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
3034
|
+
var _shadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee36(targetUserID, options) {
|
|
3035
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee36$(_context36) {
|
|
2982
3036
|
while (1) {
|
|
2983
|
-
switch (
|
|
3037
|
+
switch (_context36.prev = _context36.next) {
|
|
2984
3038
|
case 0:
|
|
2985
3039
|
this._checkInitialized();
|
|
2986
3040
|
|
|
2987
|
-
|
|
3041
|
+
_context36.next = 3;
|
|
2988
3042
|
return this.getClient().shadowBan(targetUserID, _objectSpread$5(_objectSpread$5({}, options), {}, {
|
|
2989
3043
|
type: this.type,
|
|
2990
3044
|
id: this.id
|
|
2991
3045
|
}));
|
|
2992
3046
|
|
|
2993
3047
|
case 3:
|
|
2994
|
-
return
|
|
3048
|
+
return _context36.abrupt("return", _context36.sent);
|
|
2995
3049
|
|
|
2996
3050
|
case 4:
|
|
2997
3051
|
case "end":
|
|
2998
|
-
return
|
|
3052
|
+
return _context36.stop();
|
|
2999
3053
|
}
|
|
3000
3054
|
}
|
|
3001
|
-
},
|
|
3055
|
+
}, _callee36, this);
|
|
3002
3056
|
}));
|
|
3003
3057
|
|
|
3004
|
-
function shadowBan(
|
|
3058
|
+
function shadowBan(_x34, _x35) {
|
|
3005
3059
|
return _shadowBan.apply(this, arguments);
|
|
3006
3060
|
}
|
|
3007
3061
|
|
|
@@ -3017,31 +3071,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3017
3071
|
}, {
|
|
3018
3072
|
key: "removeShadowBan",
|
|
3019
3073
|
value: function () {
|
|
3020
|
-
var _removeShadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
3021
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
3074
|
+
var _removeShadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee37(targetUserID) {
|
|
3075
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee37$(_context37) {
|
|
3022
3076
|
while (1) {
|
|
3023
|
-
switch (
|
|
3077
|
+
switch (_context37.prev = _context37.next) {
|
|
3024
3078
|
case 0:
|
|
3025
3079
|
this._checkInitialized();
|
|
3026
3080
|
|
|
3027
|
-
|
|
3081
|
+
_context37.next = 3;
|
|
3028
3082
|
return this.getClient().removeShadowBan(targetUserID, {
|
|
3029
3083
|
type: this.type,
|
|
3030
3084
|
id: this.id
|
|
3031
3085
|
});
|
|
3032
3086
|
|
|
3033
3087
|
case 3:
|
|
3034
|
-
return
|
|
3088
|
+
return _context37.abrupt("return", _context37.sent);
|
|
3035
3089
|
|
|
3036
3090
|
case 4:
|
|
3037
3091
|
case "end":
|
|
3038
|
-
return
|
|
3092
|
+
return _context37.stop();
|
|
3039
3093
|
}
|
|
3040
3094
|
}
|
|
3041
|
-
},
|
|
3095
|
+
}, _callee37, this);
|
|
3042
3096
|
}));
|
|
3043
3097
|
|
|
3044
|
-
function removeShadowBan(
|
|
3098
|
+
function removeShadowBan(_x36) {
|
|
3045
3099
|
return _removeShadowBan.apply(this, arguments);
|
|
3046
3100
|
}
|
|
3047
3101
|
|
|
@@ -3263,7 +3317,12 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3263
3317
|
|
|
3264
3318
|
case 'channel.updated':
|
|
3265
3319
|
if (event.channel) {
|
|
3266
|
-
channel
|
|
3320
|
+
var _event$channel$hidden, _event$channel, _channel$data, _event$channel$own_ca, _event$channel2, _channel$data2;
|
|
3321
|
+
|
|
3322
|
+
channel.data = _objectSpread$5(_objectSpread$5({}, event.channel), {}, {
|
|
3323
|
+
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,
|
|
3324
|
+
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
|
|
3325
|
+
});
|
|
3267
3326
|
}
|
|
3268
3327
|
|
|
3269
3328
|
break;
|
|
@@ -3450,7 +3509,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3450
3509
|
return Channel;
|
|
3451
3510
|
}();
|
|
3452
3511
|
|
|
3453
|
-
function _createForOfIteratorHelper$1(o, allowArrayLike) { var it
|
|
3512
|
+
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; } } }; }
|
|
3454
3513
|
|
|
3455
3514
|
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); }
|
|
3456
3515
|
|
|
@@ -3525,7 +3584,7 @@ var ClientState = /*#__PURE__*/function () {
|
|
|
3525
3584
|
return ClientState;
|
|
3526
3585
|
}();
|
|
3527
3586
|
|
|
3528
|
-
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; }
|
|
3587
|
+
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; }
|
|
3529
3588
|
|
|
3530
3589
|
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; }
|
|
3531
3590
|
var InsightMetrics = function InsightMetrics() {
|
|
@@ -3639,7 +3698,7 @@ function buildWsSuccessAfterFailureInsight(connection) {
|
|
|
3639
3698
|
return buildWsBaseInsight(connection);
|
|
3640
3699
|
}
|
|
3641
3700
|
|
|
3642
|
-
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; }
|
|
3701
|
+
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; }
|
|
3643
3702
|
|
|
3644
3703
|
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; }
|
|
3645
3704
|
|
|
@@ -4557,7 +4616,7 @@ var StableWSConnection = /*#__PURE__*/function () {
|
|
|
4557
4616
|
return StableWSConnection;
|
|
4558
4617
|
}();
|
|
4559
4618
|
|
|
4560
|
-
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; }
|
|
4619
|
+
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; }
|
|
4561
4620
|
|
|
4562
4621
|
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; }
|
|
4563
4622
|
|
|
@@ -4972,7 +5031,7 @@ function isWSFailure(err) {
|
|
|
4972
5031
|
}
|
|
4973
5032
|
}
|
|
4974
5033
|
|
|
4975
|
-
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; }
|
|
5034
|
+
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; }
|
|
4976
5035
|
|
|
4977
5036
|
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; }
|
|
4978
5037
|
var ConnectionState;
|
|
@@ -5180,27 +5239,35 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5180
5239
|
reconnect = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : false;
|
|
5181
5240
|
|
|
5182
5241
|
if (!(_this.state === ConnectionState.Connecting)) {
|
|
5183
|
-
_context3.next =
|
|
5242
|
+
_context3.next = 4;
|
|
5184
5243
|
break;
|
|
5185
5244
|
}
|
|
5186
5245
|
|
|
5187
|
-
|
|
5246
|
+
_this._log('connect() - connecting already in progress', {
|
|
5247
|
+
reconnect: reconnect
|
|
5248
|
+
}, 'warn');
|
|
5188
5249
|
|
|
5189
|
-
|
|
5250
|
+
return _context3.abrupt("return");
|
|
5251
|
+
|
|
5252
|
+
case 4:
|
|
5190
5253
|
if (!(_this.state === ConnectionState.Connected)) {
|
|
5191
|
-
_context3.next =
|
|
5254
|
+
_context3.next = 7;
|
|
5192
5255
|
break;
|
|
5193
5256
|
}
|
|
5194
5257
|
|
|
5195
|
-
|
|
5258
|
+
_this._log('connect() - already connected and polling', {
|
|
5259
|
+
reconnect: reconnect
|
|
5260
|
+
}, 'warn');
|
|
5196
5261
|
|
|
5197
|
-
|
|
5262
|
+
return _context3.abrupt("return");
|
|
5263
|
+
|
|
5264
|
+
case 7:
|
|
5198
5265
|
_this._setState(ConnectionState.Connecting);
|
|
5199
5266
|
|
|
5200
5267
|
_this.connectionID = undefined; // connect should be sent with empty connection_id so API creates one
|
|
5201
5268
|
|
|
5202
|
-
_context3.prev =
|
|
5203
|
-
_context3.next =
|
|
5269
|
+
_context3.prev = 9;
|
|
5270
|
+
_context3.next = 12;
|
|
5204
5271
|
return _this._req({
|
|
5205
5272
|
json: _this.client._buildWSPayload()
|
|
5206
5273
|
}, {
|
|
@@ -5208,7 +5275,7 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5208
5275
|
}, // 8s
|
|
5209
5276
|
reconnect);
|
|
5210
5277
|
|
|
5211
|
-
case
|
|
5278
|
+
case 12:
|
|
5212
5279
|
_yield$_this$_req = _context3.sent;
|
|
5213
5280
|
event = _yield$_this$_req.event;
|
|
5214
5281
|
|
|
@@ -5224,30 +5291,31 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5224
5291
|
|
|
5225
5292
|
return _context3.abrupt("return", event);
|
|
5226
5293
|
|
|
5227
|
-
case
|
|
5228
|
-
_context3.prev =
|
|
5229
|
-
_context3.t0 = _context3["catch"](
|
|
5294
|
+
case 21:
|
|
5295
|
+
_context3.prev = 21;
|
|
5296
|
+
_context3.t0 = _context3["catch"](9);
|
|
5230
5297
|
|
|
5231
5298
|
_this._setState(ConnectionState.Closed);
|
|
5232
5299
|
|
|
5233
5300
|
throw _context3.t0;
|
|
5234
5301
|
|
|
5235
|
-
case
|
|
5302
|
+
case 25:
|
|
5236
5303
|
case "end":
|
|
5237
5304
|
return _context3.stop();
|
|
5238
5305
|
}
|
|
5239
5306
|
}
|
|
5240
|
-
}, _callee3, null, [[
|
|
5307
|
+
}, _callee3, null, [[9, 21]]);
|
|
5241
5308
|
})));
|
|
5242
5309
|
|
|
5243
5310
|
_defineProperty__default['default'](this, "isHealthy", function () {
|
|
5244
|
-
return _this.connectionID && _this.state === ConnectionState.Connected;
|
|
5311
|
+
return !!_this.connectionID && _this.state === ConnectionState.Connected;
|
|
5245
5312
|
});
|
|
5246
5313
|
|
|
5247
5314
|
_defineProperty__default['default'](this, "disconnect", /*#__PURE__*/_asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee4() {
|
|
5248
5315
|
var _this$cancelToken3;
|
|
5249
5316
|
|
|
5250
5317
|
var timeout,
|
|
5318
|
+
connection_id,
|
|
5251
5319
|
_args4 = arguments;
|
|
5252
5320
|
return _regeneratorRuntime__default['default'].wrap(function _callee4$(_context4) {
|
|
5253
5321
|
while (1) {
|
|
@@ -5260,36 +5328,37 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5260
5328
|
|
|
5261
5329
|
(_this$cancelToken3 = _this.cancelToken) === null || _this$cancelToken3 === void 0 ? void 0 : _this$cancelToken3.cancel('disconnect() is called');
|
|
5262
5330
|
_this.cancelToken = undefined;
|
|
5263
|
-
|
|
5264
|
-
|
|
5331
|
+
connection_id = _this.connectionID;
|
|
5332
|
+
_this.connectionID = undefined;
|
|
5333
|
+
_context4.prev = 7;
|
|
5334
|
+
_context4.next = 10;
|
|
5265
5335
|
return _this._req({
|
|
5266
|
-
close: true
|
|
5336
|
+
close: true,
|
|
5337
|
+
connection_id: connection_id
|
|
5267
5338
|
}, {
|
|
5268
5339
|
timeout: timeout
|
|
5269
5340
|
}, false);
|
|
5270
5341
|
|
|
5271
|
-
case
|
|
5272
|
-
_this.connectionID = undefined;
|
|
5273
|
-
|
|
5342
|
+
case 10:
|
|
5274
5343
|
_this._log("disconnect() - Closed connectionID");
|
|
5275
5344
|
|
|
5276
|
-
_context4.next =
|
|
5345
|
+
_context4.next = 16;
|
|
5277
5346
|
break;
|
|
5278
5347
|
|
|
5279
|
-
case
|
|
5280
|
-
_context4.prev =
|
|
5281
|
-
_context4.t0 = _context4["catch"](
|
|
5348
|
+
case 13:
|
|
5349
|
+
_context4.prev = 13;
|
|
5350
|
+
_context4.t0 = _context4["catch"](7);
|
|
5282
5351
|
|
|
5283
5352
|
_this._log("disconnect() - Failed", {
|
|
5284
5353
|
err: _context4.t0
|
|
5285
5354
|
}, 'error');
|
|
5286
5355
|
|
|
5287
|
-
case
|
|
5356
|
+
case 16:
|
|
5288
5357
|
case "end":
|
|
5289
5358
|
return _context4.stop();
|
|
5290
5359
|
}
|
|
5291
5360
|
}
|
|
5292
|
-
}, _callee4, null, [[
|
|
5361
|
+
}, _callee4, null, [[7, 13]]);
|
|
5293
5362
|
})));
|
|
5294
5363
|
|
|
5295
5364
|
this.client = client;
|
|
@@ -5338,13 +5407,15 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5338
5407
|
return WSConnectionFallback;
|
|
5339
5408
|
}();
|
|
5340
5409
|
|
|
5341
|
-
|
|
5410
|
+
var _excluded = ["created_at", "updated_at", "last_active", "online"];
|
|
5411
|
+
|
|
5412
|
+
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; } } }; }
|
|
5342
5413
|
|
|
5343
5414
|
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); }
|
|
5344
5415
|
|
|
5345
5416
|
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; }
|
|
5346
5417
|
|
|
5347
|
-
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; }
|
|
5418
|
+
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; }
|
|
5348
5419
|
|
|
5349
5420
|
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; }
|
|
5350
5421
|
|
|
@@ -6649,7 +6720,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6649
6720
|
case 11:
|
|
6650
6721
|
this.anonymous = false; // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6651
6722
|
|
|
6652
|
-
_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,
|
|
6723
|
+
_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);
|
|
6653
6724
|
_context14.next = 15;
|
|
6654
6725
|
return this.connectUser(guestUser, response.access_token);
|
|
6655
6726
|
|
|
@@ -7012,23 +7083,41 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7012
7083
|
client: this
|
|
7013
7084
|
});
|
|
7014
7085
|
_context15.prev = 8;
|
|
7015
|
-
|
|
7086
|
+
|
|
7087
|
+
if (!this.wsFallback) {
|
|
7088
|
+
_context15.next = 13;
|
|
7089
|
+
break;
|
|
7090
|
+
}
|
|
7091
|
+
|
|
7092
|
+
_context15.next = 12;
|
|
7093
|
+
return this.wsFallback.connect();
|
|
7094
|
+
|
|
7095
|
+
case 12:
|
|
7096
|
+
return _context15.abrupt("return", _context15.sent);
|
|
7097
|
+
|
|
7098
|
+
case 13:
|
|
7099
|
+
_context15.next = 15;
|
|
7016
7100
|
return this.wsConnection.connect(this.options.enableWSFallback ? this.defaultWSTimeoutWithFallback : this.defaultWSTimeout);
|
|
7017
7101
|
|
|
7018
|
-
case
|
|
7102
|
+
case 15:
|
|
7019
7103
|
return _context15.abrupt("return", _context15.sent);
|
|
7020
7104
|
|
|
7021
|
-
case
|
|
7022
|
-
_context15.prev =
|
|
7105
|
+
case 18:
|
|
7106
|
+
_context15.prev = 18;
|
|
7023
7107
|
_context15.t0 = _context15["catch"](8);
|
|
7024
7108
|
|
|
7025
7109
|
if (!(this.options.enableWSFallback && isWSFailure(_context15.t0) && isOnline())) {
|
|
7026
|
-
_context15.next =
|
|
7110
|
+
_context15.next = 29;
|
|
7027
7111
|
break;
|
|
7028
7112
|
}
|
|
7029
7113
|
|
|
7030
7114
|
this.logger('info', 'client:connect() - WS failed, fallback to longpoll', {
|
|
7031
7115
|
tags: ['connection', 'client']
|
|
7116
|
+
}); // @ts-expect-error
|
|
7117
|
+
|
|
7118
|
+
this.dispatchEvent({
|
|
7119
|
+
type: 'transport.changed',
|
|
7120
|
+
mode: 'longpoll'
|
|
7032
7121
|
});
|
|
7033
7122
|
|
|
7034
7123
|
this.wsConnection._destroyCurrentWSConnection();
|
|
@@ -7038,21 +7127,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7038
7127
|
this.wsFallback = new WSConnectionFallback({
|
|
7039
7128
|
client: this
|
|
7040
7129
|
});
|
|
7041
|
-
_context15.next =
|
|
7130
|
+
_context15.next = 28;
|
|
7042
7131
|
return this.wsFallback.connect();
|
|
7043
7132
|
|
|
7044
|
-
case
|
|
7133
|
+
case 28:
|
|
7045
7134
|
return _context15.abrupt("return", _context15.sent);
|
|
7046
7135
|
|
|
7047
|
-
case
|
|
7136
|
+
case 29:
|
|
7048
7137
|
throw _context15.t0;
|
|
7049
7138
|
|
|
7050
|
-
case
|
|
7139
|
+
case 30:
|
|
7051
7140
|
case "end":
|
|
7052
7141
|
return _context15.stop();
|
|
7053
7142
|
}
|
|
7054
7143
|
}
|
|
7055
|
-
}, _callee15, this, [[8,
|
|
7144
|
+
}, _callee15, this, [[8, 18]]);
|
|
7056
7145
|
}));
|
|
7057
7146
|
|
|
7058
7147
|
function connect() {
|
|
@@ -8459,6 +8548,101 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8459
8548
|
|
|
8460
8549
|
return unflagUser;
|
|
8461
8550
|
}()
|
|
8551
|
+
/**
|
|
8552
|
+
* _queryFlagReports - Query flag reports.
|
|
8553
|
+
*
|
|
8554
|
+
* Note: Do not use this.
|
|
8555
|
+
* It is present for internal usage only.
|
|
8556
|
+
* This function can, and will, break and/or be removed at any point in time.
|
|
8557
|
+
*
|
|
8558
|
+
* @param {FlagReportsFilters} filterConditions MongoDB style filter conditions
|
|
8559
|
+
* @param {FlagReportsPaginationOptions} options Option object, {limit: 10, offset:0}
|
|
8560
|
+
*
|
|
8561
|
+
* @return {Promise<FlagReportsResponse<ChannelType, CommandType, UserType>>} Flag Reports Response
|
|
8562
|
+
*/
|
|
8563
|
+
|
|
8564
|
+
}, {
|
|
8565
|
+
key: "_queryFlagReports",
|
|
8566
|
+
value: function () {
|
|
8567
|
+
var _queryFlagReports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee42() {
|
|
8568
|
+
var filterConditions,
|
|
8569
|
+
options,
|
|
8570
|
+
_args42 = arguments;
|
|
8571
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee42$(_context42) {
|
|
8572
|
+
while (1) {
|
|
8573
|
+
switch (_context42.prev = _context42.next) {
|
|
8574
|
+
case 0:
|
|
8575
|
+
filterConditions = _args42.length > 0 && _args42[0] !== undefined ? _args42[0] : {};
|
|
8576
|
+
options = _args42.length > 1 && _args42[1] !== undefined ? _args42[1] : {};
|
|
8577
|
+
_context42.next = 4;
|
|
8578
|
+
return this.post(this.baseURL + '/moderation/reports', _objectSpread({
|
|
8579
|
+
filter_conditions: filterConditions
|
|
8580
|
+
}, options));
|
|
8581
|
+
|
|
8582
|
+
case 4:
|
|
8583
|
+
return _context42.abrupt("return", _context42.sent);
|
|
8584
|
+
|
|
8585
|
+
case 5:
|
|
8586
|
+
case "end":
|
|
8587
|
+
return _context42.stop();
|
|
8588
|
+
}
|
|
8589
|
+
}
|
|
8590
|
+
}, _callee42, this);
|
|
8591
|
+
}));
|
|
8592
|
+
|
|
8593
|
+
function _queryFlagReports() {
|
|
8594
|
+
return _queryFlagReports2.apply(this, arguments);
|
|
8595
|
+
}
|
|
8596
|
+
|
|
8597
|
+
return _queryFlagReports;
|
|
8598
|
+
}()
|
|
8599
|
+
/**
|
|
8600
|
+
* _reviewFlagReport - review flag report
|
|
8601
|
+
*
|
|
8602
|
+
* Note: Do not use this.
|
|
8603
|
+
* It is present for internal usage only.
|
|
8604
|
+
* This function can, and will, break and/or be removed at any point in time.
|
|
8605
|
+
*
|
|
8606
|
+
* @param {string} [id] flag report to review
|
|
8607
|
+
* @param {string} [reviewResult] flag report review result
|
|
8608
|
+
* @param {string} [options.user_id] currentUserID, only used with serverside auth
|
|
8609
|
+
* @param {string} [options.review_details] custom information about review result
|
|
8610
|
+
* @returns {Promise<ReviewFlagReportResponse>>}
|
|
8611
|
+
*/
|
|
8612
|
+
|
|
8613
|
+
}, {
|
|
8614
|
+
key: "_reviewFlagReport",
|
|
8615
|
+
value: function () {
|
|
8616
|
+
var _reviewFlagReport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee43(id, reviewResult) {
|
|
8617
|
+
var options,
|
|
8618
|
+
_args43 = arguments;
|
|
8619
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee43$(_context43) {
|
|
8620
|
+
while (1) {
|
|
8621
|
+
switch (_context43.prev = _context43.next) {
|
|
8622
|
+
case 0:
|
|
8623
|
+
options = _args43.length > 2 && _args43[2] !== undefined ? _args43[2] : {};
|
|
8624
|
+
_context43.next = 3;
|
|
8625
|
+
return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
|
|
8626
|
+
review_result: reviewResult
|
|
8627
|
+
}, options));
|
|
8628
|
+
|
|
8629
|
+
case 3:
|
|
8630
|
+
return _context43.abrupt("return", _context43.sent);
|
|
8631
|
+
|
|
8632
|
+
case 4:
|
|
8633
|
+
case "end":
|
|
8634
|
+
return _context43.stop();
|
|
8635
|
+
}
|
|
8636
|
+
}
|
|
8637
|
+
}, _callee43, this);
|
|
8638
|
+
}));
|
|
8639
|
+
|
|
8640
|
+
function _reviewFlagReport(_x54, _x55) {
|
|
8641
|
+
return _reviewFlagReport2.apply(this, arguments);
|
|
8642
|
+
}
|
|
8643
|
+
|
|
8644
|
+
return _reviewFlagReport;
|
|
8645
|
+
}()
|
|
8462
8646
|
/**
|
|
8463
8647
|
* @deprecated use markChannelsRead instead
|
|
8464
8648
|
*
|
|
@@ -8480,23 +8664,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8480
8664
|
* @return {Promise<APIResponse>}
|
|
8481
8665
|
*/
|
|
8482
8666
|
function () {
|
|
8483
|
-
var _markChannelsRead = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8667
|
+
var _markChannelsRead = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee44() {
|
|
8484
8668
|
var data,
|
|
8485
|
-
|
|
8486
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8669
|
+
_args44 = arguments;
|
|
8670
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee44$(_context44) {
|
|
8487
8671
|
while (1) {
|
|
8488
|
-
switch (
|
|
8672
|
+
switch (_context44.prev = _context44.next) {
|
|
8489
8673
|
case 0:
|
|
8490
|
-
data =
|
|
8491
|
-
|
|
8674
|
+
data = _args44.length > 0 && _args44[0] !== undefined ? _args44[0] : {};
|
|
8675
|
+
_context44.next = 3;
|
|
8492
8676
|
return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
|
|
8493
8677
|
|
|
8494
8678
|
case 3:
|
|
8495
8679
|
case "end":
|
|
8496
|
-
return
|
|
8680
|
+
return _context44.stop();
|
|
8497
8681
|
}
|
|
8498
8682
|
}
|
|
8499
|
-
},
|
|
8683
|
+
}, _callee44, this);
|
|
8500
8684
|
}));
|
|
8501
8685
|
|
|
8502
8686
|
function markChannelsRead() {
|
|
@@ -8571,28 +8755,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8571
8755
|
}, {
|
|
8572
8756
|
key: "translateMessage",
|
|
8573
8757
|
value: function () {
|
|
8574
|
-
var _translateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8575
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8758
|
+
var _translateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee45(messageId, language) {
|
|
8759
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee45$(_context45) {
|
|
8576
8760
|
while (1) {
|
|
8577
|
-
switch (
|
|
8761
|
+
switch (_context45.prev = _context45.next) {
|
|
8578
8762
|
case 0:
|
|
8579
|
-
|
|
8763
|
+
_context45.next = 2;
|
|
8580
8764
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
|
|
8581
8765
|
language: language
|
|
8582
8766
|
});
|
|
8583
8767
|
|
|
8584
8768
|
case 2:
|
|
8585
|
-
return
|
|
8769
|
+
return _context45.abrupt("return", _context45.sent);
|
|
8586
8770
|
|
|
8587
8771
|
case 3:
|
|
8588
8772
|
case "end":
|
|
8589
|
-
return
|
|
8773
|
+
return _context45.stop();
|
|
8590
8774
|
}
|
|
8591
8775
|
}
|
|
8592
|
-
},
|
|
8776
|
+
}, _callee45, this);
|
|
8593
8777
|
}));
|
|
8594
8778
|
|
|
8595
|
-
function translateMessage(
|
|
8779
|
+
function translateMessage(_x56, _x57) {
|
|
8596
8780
|
return _translateMessage.apply(this, arguments);
|
|
8597
8781
|
}
|
|
8598
8782
|
|
|
@@ -8606,7 +8790,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8606
8790
|
}, {
|
|
8607
8791
|
key: "_normalizeExpiration",
|
|
8608
8792
|
value: function _normalizeExpiration(timeoutOrExpirationDate) {
|
|
8609
|
-
var pinExpires;
|
|
8793
|
+
var pinExpires = null;
|
|
8610
8794
|
|
|
8611
8795
|
if (typeof timeoutOrExpirationDate === 'number') {
|
|
8612
8796
|
var now = new Date();
|
|
@@ -8647,20 +8831,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8647
8831
|
* pinMessage - pins the message
|
|
8648
8832
|
* @param {string | { id: string }} messageOrMessageId message object or message id
|
|
8649
8833
|
* @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
|
|
8650
|
-
* @param {string | { id: string }} [
|
|
8834
|
+
* @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
|
|
8835
|
+
* @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
|
|
8651
8836
|
*/
|
|
8652
8837
|
|
|
8653
8838
|
}, {
|
|
8654
8839
|
key: "pinMessage",
|
|
8655
|
-
value: function pinMessage(messageOrMessageId, timeoutOrExpirationDate,
|
|
8840
|
+
value: function pinMessage(messageOrMessageId, timeoutOrExpirationDate, pinnedBy, pinnedAt) {
|
|
8656
8841
|
var messageId = this._validateAndGetMessageId(messageOrMessageId, 'Please specify the message id when calling unpinMessage');
|
|
8657
8842
|
|
|
8658
8843
|
return this.partialUpdateMessage(messageId, {
|
|
8659
8844
|
set: {
|
|
8660
8845
|
pinned: true,
|
|
8661
|
-
pin_expires: this._normalizeExpiration(timeoutOrExpirationDate)
|
|
8846
|
+
pin_expires: this._normalizeExpiration(timeoutOrExpirationDate),
|
|
8847
|
+
pinned_at: this._normalizeExpiration(pinnedAt)
|
|
8662
8848
|
}
|
|
8663
|
-
},
|
|
8849
|
+
}, pinnedBy);
|
|
8664
8850
|
}
|
|
8665
8851
|
/**
|
|
8666
8852
|
* unpinMessage - unpins the message that was previously pinned
|
|
@@ -8692,14 +8878,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8692
8878
|
}, {
|
|
8693
8879
|
key: "updateMessage",
|
|
8694
8880
|
value: function () {
|
|
8695
|
-
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8881
|
+
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee46(message, userId, options) {
|
|
8696
8882
|
var clonedMessage, reservedMessageFields;
|
|
8697
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8883
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee46$(_context46) {
|
|
8698
8884
|
while (1) {
|
|
8699
|
-
switch (
|
|
8885
|
+
switch (_context46.prev = _context46.next) {
|
|
8700
8886
|
case 0:
|
|
8701
8887
|
if (message.id) {
|
|
8702
|
-
|
|
8888
|
+
_context46.next = 2;
|
|
8703
8889
|
break;
|
|
8704
8890
|
}
|
|
8705
8891
|
|
|
@@ -8736,23 +8922,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8736
8922
|
});
|
|
8737
8923
|
}
|
|
8738
8924
|
|
|
8739
|
-
|
|
8925
|
+
_context46.next = 10;
|
|
8740
8926
|
return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
|
|
8741
8927
|
message: clonedMessage
|
|
8742
8928
|
}, options));
|
|
8743
8929
|
|
|
8744
8930
|
case 10:
|
|
8745
|
-
return
|
|
8931
|
+
return _context46.abrupt("return", _context46.sent);
|
|
8746
8932
|
|
|
8747
8933
|
case 11:
|
|
8748
8934
|
case "end":
|
|
8749
|
-
return
|
|
8935
|
+
return _context46.stop();
|
|
8750
8936
|
}
|
|
8751
8937
|
}
|
|
8752
|
-
},
|
|
8938
|
+
}, _callee46, this);
|
|
8753
8939
|
}));
|
|
8754
8940
|
|
|
8755
|
-
function updateMessage(
|
|
8941
|
+
function updateMessage(_x58, _x59, _x60) {
|
|
8756
8942
|
return _updateMessage.apply(this, arguments);
|
|
8757
8943
|
}
|
|
8758
8944
|
|
|
@@ -8775,14 +8961,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8775
8961
|
}, {
|
|
8776
8962
|
key: "partialUpdateMessage",
|
|
8777
8963
|
value: function () {
|
|
8778
|
-
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8964
|
+
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee47(id, partialMessageObject, userId, options) {
|
|
8779
8965
|
var user;
|
|
8780
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
8966
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee47$(_context47) {
|
|
8781
8967
|
while (1) {
|
|
8782
|
-
switch (
|
|
8968
|
+
switch (_context47.prev = _context47.next) {
|
|
8783
8969
|
case 0:
|
|
8784
8970
|
if (id) {
|
|
8785
|
-
|
|
8971
|
+
_context47.next = 2;
|
|
8786
8972
|
break;
|
|
8787
8973
|
}
|
|
8788
8974
|
|
|
@@ -8797,23 +8983,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8797
8983
|
};
|
|
8798
8984
|
}
|
|
8799
8985
|
|
|
8800
|
-
|
|
8986
|
+
_context47.next = 6;
|
|
8801
8987
|
return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
8802
8988
|
user: user
|
|
8803
8989
|
}));
|
|
8804
8990
|
|
|
8805
8991
|
case 6:
|
|
8806
|
-
return
|
|
8992
|
+
return _context47.abrupt("return", _context47.sent);
|
|
8807
8993
|
|
|
8808
8994
|
case 7:
|
|
8809
8995
|
case "end":
|
|
8810
|
-
return
|
|
8996
|
+
return _context47.stop();
|
|
8811
8997
|
}
|
|
8812
8998
|
}
|
|
8813
|
-
},
|
|
8999
|
+
}, _callee47, this);
|
|
8814
9000
|
}));
|
|
8815
9001
|
|
|
8816
|
-
function partialUpdateMessage(
|
|
9002
|
+
function partialUpdateMessage(_x61, _x62, _x63, _x64) {
|
|
8817
9003
|
return _partialUpdateMessage.apply(this, arguments);
|
|
8818
9004
|
}
|
|
8819
9005
|
|
|
@@ -8822,11 +9008,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8822
9008
|
}, {
|
|
8823
9009
|
key: "deleteMessage",
|
|
8824
9010
|
value: function () {
|
|
8825
|
-
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9011
|
+
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee48(messageID, hardDelete) {
|
|
8826
9012
|
var params;
|
|
8827
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9013
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee48$(_context48) {
|
|
8828
9014
|
while (1) {
|
|
8829
|
-
switch (
|
|
9015
|
+
switch (_context48.prev = _context48.next) {
|
|
8830
9016
|
case 0:
|
|
8831
9017
|
params = {};
|
|
8832
9018
|
|
|
@@ -8836,21 +9022,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8836
9022
|
};
|
|
8837
9023
|
}
|
|
8838
9024
|
|
|
8839
|
-
|
|
9025
|
+
_context48.next = 4;
|
|
8840
9026
|
return this.delete(this.baseURL + "/messages/".concat(messageID), params);
|
|
8841
9027
|
|
|
8842
9028
|
case 4:
|
|
8843
|
-
return
|
|
9029
|
+
return _context48.abrupt("return", _context48.sent);
|
|
8844
9030
|
|
|
8845
9031
|
case 5:
|
|
8846
9032
|
case "end":
|
|
8847
|
-
return
|
|
9033
|
+
return _context48.stop();
|
|
8848
9034
|
}
|
|
8849
9035
|
}
|
|
8850
|
-
},
|
|
9036
|
+
}, _callee48, this);
|
|
8851
9037
|
}));
|
|
8852
9038
|
|
|
8853
|
-
function deleteMessage(
|
|
9039
|
+
function deleteMessage(_x65, _x66) {
|
|
8854
9040
|
return _deleteMessage.apply(this, arguments);
|
|
8855
9041
|
}
|
|
8856
9042
|
|
|
@@ -8859,26 +9045,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8859
9045
|
}, {
|
|
8860
9046
|
key: "getMessage",
|
|
8861
9047
|
value: function () {
|
|
8862
|
-
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
8863
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9048
|
+
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee49(messageID) {
|
|
9049
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee49$(_context49) {
|
|
8864
9050
|
while (1) {
|
|
8865
|
-
switch (
|
|
9051
|
+
switch (_context49.prev = _context49.next) {
|
|
8866
9052
|
case 0:
|
|
8867
|
-
|
|
9053
|
+
_context49.next = 2;
|
|
8868
9054
|
return this.get(this.baseURL + "/messages/".concat(messageID));
|
|
8869
9055
|
|
|
8870
9056
|
case 2:
|
|
8871
|
-
return
|
|
9057
|
+
return _context49.abrupt("return", _context49.sent);
|
|
8872
9058
|
|
|
8873
9059
|
case 3:
|
|
8874
9060
|
case "end":
|
|
8875
|
-
return
|
|
9061
|
+
return _context49.stop();
|
|
8876
9062
|
}
|
|
8877
9063
|
}
|
|
8878
|
-
},
|
|
9064
|
+
}, _callee49, this);
|
|
8879
9065
|
}));
|
|
8880
9066
|
|
|
8881
|
-
function getMessage(
|
|
9067
|
+
function getMessage(_x67) {
|
|
8882
9068
|
return _getMessage.apply(this, arguments);
|
|
8883
9069
|
}
|
|
8884
9070
|
|
|
@@ -8887,7 +9073,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8887
9073
|
}, {
|
|
8888
9074
|
key: "getUserAgent",
|
|
8889
9075
|
value: function getUserAgent() {
|
|
8890
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.
|
|
9076
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.1.2");
|
|
8891
9077
|
}
|
|
8892
9078
|
}, {
|
|
8893
9079
|
key: "setUserAgent",
|
|
@@ -8922,12 +9108,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8922
9108
|
}
|
|
8923
9109
|
|
|
8924
9110
|
return _objectSpread({
|
|
8925
|
-
params: _objectSpread(
|
|
8926
|
-
user_id: this.userID
|
|
8927
|
-
|
|
8928
|
-
api_key: this.key
|
|
8929
|
-
|
|
8930
|
-
}),
|
|
9111
|
+
params: _objectSpread({
|
|
9112
|
+
user_id: this.userID,
|
|
9113
|
+
connection_id: this._getConnectionID(),
|
|
9114
|
+
api_key: this.key
|
|
9115
|
+
}, options.params),
|
|
8931
9116
|
headers: _objectSpread(_objectSpread({}, authorization), {}, {
|
|
8932
9117
|
'stream-auth-type': this.getAuthType(),
|
|
8933
9118
|
'X-Stream-Client': this.getUserAgent()
|
|
@@ -9083,28 +9268,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9083
9268
|
}, {
|
|
9084
9269
|
key: "sendUserCustomEvent",
|
|
9085
9270
|
value: function () {
|
|
9086
|
-
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9087
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9271
|
+
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee50(targetUserID, event) {
|
|
9272
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee50$(_context50) {
|
|
9088
9273
|
while (1) {
|
|
9089
|
-
switch (
|
|
9274
|
+
switch (_context50.prev = _context50.next) {
|
|
9090
9275
|
case 0:
|
|
9091
|
-
|
|
9276
|
+
_context50.next = 2;
|
|
9092
9277
|
return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
|
|
9093
9278
|
event: event
|
|
9094
9279
|
});
|
|
9095
9280
|
|
|
9096
9281
|
case 2:
|
|
9097
|
-
return
|
|
9282
|
+
return _context50.abrupt("return", _context50.sent);
|
|
9098
9283
|
|
|
9099
9284
|
case 3:
|
|
9100
9285
|
case "end":
|
|
9101
|
-
return
|
|
9286
|
+
return _context50.stop();
|
|
9102
9287
|
}
|
|
9103
9288
|
}
|
|
9104
|
-
},
|
|
9289
|
+
}, _callee50, this);
|
|
9105
9290
|
}));
|
|
9106
9291
|
|
|
9107
|
-
function sendUserCustomEvent(
|
|
9292
|
+
function sendUserCustomEvent(_x68, _x69) {
|
|
9108
9293
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
9109
9294
|
}
|
|
9110
9295
|
|
|
@@ -9167,32 +9352,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9167
9352
|
}, {
|
|
9168
9353
|
key: "createSegment",
|
|
9169
9354
|
value: function () {
|
|
9170
|
-
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9355
|
+
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee51(params) {
|
|
9171
9356
|
var _yield$this$post, segment;
|
|
9172
9357
|
|
|
9173
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9358
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee51$(_context51) {
|
|
9174
9359
|
while (1) {
|
|
9175
|
-
switch (
|
|
9360
|
+
switch (_context51.prev = _context51.next) {
|
|
9176
9361
|
case 0:
|
|
9177
|
-
|
|
9362
|
+
_context51.next = 2;
|
|
9178
9363
|
return this.post(this.baseURL + "/segments", {
|
|
9179
9364
|
segment: params
|
|
9180
9365
|
});
|
|
9181
9366
|
|
|
9182
9367
|
case 2:
|
|
9183
|
-
_yield$this$post =
|
|
9368
|
+
_yield$this$post = _context51.sent;
|
|
9184
9369
|
segment = _yield$this$post.segment;
|
|
9185
|
-
return
|
|
9370
|
+
return _context51.abrupt("return", segment);
|
|
9186
9371
|
|
|
9187
9372
|
case 5:
|
|
9188
9373
|
case "end":
|
|
9189
|
-
return
|
|
9374
|
+
return _context51.stop();
|
|
9190
9375
|
}
|
|
9191
9376
|
}
|
|
9192
|
-
},
|
|
9377
|
+
}, _callee51, this);
|
|
9193
9378
|
}));
|
|
9194
9379
|
|
|
9195
|
-
function createSegment(
|
|
9380
|
+
function createSegment(_x70) {
|
|
9196
9381
|
return _createSegment.apply(this, arguments);
|
|
9197
9382
|
}
|
|
9198
9383
|
|
|
@@ -9209,30 +9394,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9209
9394
|
}, {
|
|
9210
9395
|
key: "getSegment",
|
|
9211
9396
|
value: function () {
|
|
9212
|
-
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9397
|
+
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee52(id) {
|
|
9213
9398
|
var _yield$this$get, segment;
|
|
9214
9399
|
|
|
9215
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9400
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee52$(_context52) {
|
|
9216
9401
|
while (1) {
|
|
9217
|
-
switch (
|
|
9402
|
+
switch (_context52.prev = _context52.next) {
|
|
9218
9403
|
case 0:
|
|
9219
|
-
|
|
9404
|
+
_context52.next = 2;
|
|
9220
9405
|
return this.get(this.baseURL + "/segments/".concat(id));
|
|
9221
9406
|
|
|
9222
9407
|
case 2:
|
|
9223
|
-
_yield$this$get =
|
|
9408
|
+
_yield$this$get = _context52.sent;
|
|
9224
9409
|
segment = _yield$this$get.segment;
|
|
9225
|
-
return
|
|
9410
|
+
return _context52.abrupt("return", segment);
|
|
9226
9411
|
|
|
9227
9412
|
case 5:
|
|
9228
9413
|
case "end":
|
|
9229
|
-
return
|
|
9414
|
+
return _context52.stop();
|
|
9230
9415
|
}
|
|
9231
9416
|
}
|
|
9232
|
-
},
|
|
9417
|
+
}, _callee52, this);
|
|
9233
9418
|
}));
|
|
9234
9419
|
|
|
9235
|
-
function getSegment(
|
|
9420
|
+
function getSegment(_x71) {
|
|
9236
9421
|
return _getSegment.apply(this, arguments);
|
|
9237
9422
|
}
|
|
9238
9423
|
|
|
@@ -9248,30 +9433,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9248
9433
|
}, {
|
|
9249
9434
|
key: "listSegments",
|
|
9250
9435
|
value: function () {
|
|
9251
|
-
var _listSegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9436
|
+
var _listSegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee53(options) {
|
|
9252
9437
|
var _yield$this$get2, segments;
|
|
9253
9438
|
|
|
9254
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9439
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee53$(_context53) {
|
|
9255
9440
|
while (1) {
|
|
9256
|
-
switch (
|
|
9441
|
+
switch (_context53.prev = _context53.next) {
|
|
9257
9442
|
case 0:
|
|
9258
|
-
|
|
9443
|
+
_context53.next = 2;
|
|
9259
9444
|
return this.get(this.baseURL + "/segments", options);
|
|
9260
9445
|
|
|
9261
9446
|
case 2:
|
|
9262
|
-
_yield$this$get2 =
|
|
9447
|
+
_yield$this$get2 = _context53.sent;
|
|
9263
9448
|
segments = _yield$this$get2.segments;
|
|
9264
|
-
return
|
|
9449
|
+
return _context53.abrupt("return", segments);
|
|
9265
9450
|
|
|
9266
9451
|
case 5:
|
|
9267
9452
|
case "end":
|
|
9268
|
-
return
|
|
9453
|
+
return _context53.stop();
|
|
9269
9454
|
}
|
|
9270
9455
|
}
|
|
9271
|
-
},
|
|
9456
|
+
}, _callee53, this);
|
|
9272
9457
|
}));
|
|
9273
9458
|
|
|
9274
|
-
function listSegments(
|
|
9459
|
+
function listSegments(_x72) {
|
|
9275
9460
|
return _listSegments.apply(this, arguments);
|
|
9276
9461
|
}
|
|
9277
9462
|
|
|
@@ -9289,32 +9474,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9289
9474
|
}, {
|
|
9290
9475
|
key: "updateSegment",
|
|
9291
9476
|
value: function () {
|
|
9292
|
-
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9477
|
+
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee54(id, params) {
|
|
9293
9478
|
var _yield$this$put, segment;
|
|
9294
9479
|
|
|
9295
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9480
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee54$(_context54) {
|
|
9296
9481
|
while (1) {
|
|
9297
|
-
switch (
|
|
9482
|
+
switch (_context54.prev = _context54.next) {
|
|
9298
9483
|
case 0:
|
|
9299
|
-
|
|
9484
|
+
_context54.next = 2;
|
|
9300
9485
|
return this.put(this.baseURL + "/segments/".concat(id), {
|
|
9301
9486
|
segment: params
|
|
9302
9487
|
});
|
|
9303
9488
|
|
|
9304
9489
|
case 2:
|
|
9305
|
-
_yield$this$put =
|
|
9490
|
+
_yield$this$put = _context54.sent;
|
|
9306
9491
|
segment = _yield$this$put.segment;
|
|
9307
|
-
return
|
|
9492
|
+
return _context54.abrupt("return", segment);
|
|
9308
9493
|
|
|
9309
9494
|
case 5:
|
|
9310
9495
|
case "end":
|
|
9311
|
-
return
|
|
9496
|
+
return _context54.stop();
|
|
9312
9497
|
}
|
|
9313
9498
|
}
|
|
9314
|
-
},
|
|
9499
|
+
}, _callee54, this);
|
|
9315
9500
|
}));
|
|
9316
9501
|
|
|
9317
|
-
function updateSegment(
|
|
9502
|
+
function updateSegment(_x73, _x74) {
|
|
9318
9503
|
return _updateSegment.apply(this, arguments);
|
|
9319
9504
|
}
|
|
9320
9505
|
|
|
@@ -9331,22 +9516,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9331
9516
|
}, {
|
|
9332
9517
|
key: "deleteSegment",
|
|
9333
9518
|
value: function () {
|
|
9334
|
-
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9335
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9519
|
+
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee55(id) {
|
|
9520
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee55$(_context55) {
|
|
9336
9521
|
while (1) {
|
|
9337
|
-
switch (
|
|
9522
|
+
switch (_context55.prev = _context55.next) {
|
|
9338
9523
|
case 0:
|
|
9339
|
-
return
|
|
9524
|
+
return _context55.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
|
|
9340
9525
|
|
|
9341
9526
|
case 1:
|
|
9342
9527
|
case "end":
|
|
9343
|
-
return
|
|
9528
|
+
return _context55.stop();
|
|
9344
9529
|
}
|
|
9345
9530
|
}
|
|
9346
|
-
},
|
|
9531
|
+
}, _callee55, this);
|
|
9347
9532
|
}));
|
|
9348
9533
|
|
|
9349
|
-
function deleteSegment(
|
|
9534
|
+
function deleteSegment(_x75) {
|
|
9350
9535
|
return _deleteSegment.apply(this, arguments);
|
|
9351
9536
|
}
|
|
9352
9537
|
|
|
@@ -9363,32 +9548,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9363
9548
|
}, {
|
|
9364
9549
|
key: "createCampaign",
|
|
9365
9550
|
value: function () {
|
|
9366
|
-
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9551
|
+
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee56(params) {
|
|
9367
9552
|
var _yield$this$post2, campaign;
|
|
9368
9553
|
|
|
9369
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9554
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee56$(_context56) {
|
|
9370
9555
|
while (1) {
|
|
9371
|
-
switch (
|
|
9556
|
+
switch (_context56.prev = _context56.next) {
|
|
9372
9557
|
case 0:
|
|
9373
|
-
|
|
9558
|
+
_context56.next = 2;
|
|
9374
9559
|
return this.post(this.baseURL + "/campaigns", {
|
|
9375
9560
|
campaign: params
|
|
9376
9561
|
});
|
|
9377
9562
|
|
|
9378
9563
|
case 2:
|
|
9379
|
-
_yield$this$post2 =
|
|
9564
|
+
_yield$this$post2 = _context56.sent;
|
|
9380
9565
|
campaign = _yield$this$post2.campaign;
|
|
9381
|
-
return
|
|
9566
|
+
return _context56.abrupt("return", campaign);
|
|
9382
9567
|
|
|
9383
9568
|
case 5:
|
|
9384
9569
|
case "end":
|
|
9385
|
-
return
|
|
9570
|
+
return _context56.stop();
|
|
9386
9571
|
}
|
|
9387
9572
|
}
|
|
9388
|
-
},
|
|
9573
|
+
}, _callee56, this);
|
|
9389
9574
|
}));
|
|
9390
9575
|
|
|
9391
|
-
function createCampaign(
|
|
9576
|
+
function createCampaign(_x76) {
|
|
9392
9577
|
return _createCampaign.apply(this, arguments);
|
|
9393
9578
|
}
|
|
9394
9579
|
|
|
@@ -9405,30 +9590,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9405
9590
|
}, {
|
|
9406
9591
|
key: "getCampaign",
|
|
9407
9592
|
value: function () {
|
|
9408
|
-
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9593
|
+
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee57(id) {
|
|
9409
9594
|
var _yield$this$get3, campaign;
|
|
9410
9595
|
|
|
9411
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9596
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee57$(_context57) {
|
|
9412
9597
|
while (1) {
|
|
9413
|
-
switch (
|
|
9598
|
+
switch (_context57.prev = _context57.next) {
|
|
9414
9599
|
case 0:
|
|
9415
|
-
|
|
9600
|
+
_context57.next = 2;
|
|
9416
9601
|
return this.get(this.baseURL + "/campaigns/".concat(id));
|
|
9417
9602
|
|
|
9418
9603
|
case 2:
|
|
9419
|
-
_yield$this$get3 =
|
|
9604
|
+
_yield$this$get3 = _context57.sent;
|
|
9420
9605
|
campaign = _yield$this$get3.campaign;
|
|
9421
|
-
return
|
|
9606
|
+
return _context57.abrupt("return", campaign);
|
|
9422
9607
|
|
|
9423
9608
|
case 5:
|
|
9424
9609
|
case "end":
|
|
9425
|
-
return
|
|
9610
|
+
return _context57.stop();
|
|
9426
9611
|
}
|
|
9427
9612
|
}
|
|
9428
|
-
},
|
|
9613
|
+
}, _callee57, this);
|
|
9429
9614
|
}));
|
|
9430
9615
|
|
|
9431
|
-
function getCampaign(
|
|
9616
|
+
function getCampaign(_x77) {
|
|
9432
9617
|
return _getCampaign.apply(this, arguments);
|
|
9433
9618
|
}
|
|
9434
9619
|
|
|
@@ -9444,30 +9629,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9444
9629
|
}, {
|
|
9445
9630
|
key: "listCampaigns",
|
|
9446
9631
|
value: function () {
|
|
9447
|
-
var _listCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9632
|
+
var _listCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee58(options) {
|
|
9448
9633
|
var _yield$this$get4, campaigns;
|
|
9449
9634
|
|
|
9450
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9635
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee58$(_context58) {
|
|
9451
9636
|
while (1) {
|
|
9452
|
-
switch (
|
|
9637
|
+
switch (_context58.prev = _context58.next) {
|
|
9453
9638
|
case 0:
|
|
9454
|
-
|
|
9639
|
+
_context58.next = 2;
|
|
9455
9640
|
return this.get(this.baseURL + "/campaigns", options);
|
|
9456
9641
|
|
|
9457
9642
|
case 2:
|
|
9458
|
-
_yield$this$get4 =
|
|
9643
|
+
_yield$this$get4 = _context58.sent;
|
|
9459
9644
|
campaigns = _yield$this$get4.campaigns;
|
|
9460
|
-
return
|
|
9645
|
+
return _context58.abrupt("return", campaigns);
|
|
9461
9646
|
|
|
9462
9647
|
case 5:
|
|
9463
9648
|
case "end":
|
|
9464
|
-
return
|
|
9649
|
+
return _context58.stop();
|
|
9465
9650
|
}
|
|
9466
9651
|
}
|
|
9467
|
-
},
|
|
9652
|
+
}, _callee58, this);
|
|
9468
9653
|
}));
|
|
9469
9654
|
|
|
9470
|
-
function listCampaigns(
|
|
9655
|
+
function listCampaigns(_x78) {
|
|
9471
9656
|
return _listCampaigns.apply(this, arguments);
|
|
9472
9657
|
}
|
|
9473
9658
|
|
|
@@ -9485,32 +9670,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9485
9670
|
}, {
|
|
9486
9671
|
key: "updateCampaign",
|
|
9487
9672
|
value: function () {
|
|
9488
|
-
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9673
|
+
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee59(id, params) {
|
|
9489
9674
|
var _yield$this$put2, campaign;
|
|
9490
9675
|
|
|
9491
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9676
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee59$(_context59) {
|
|
9492
9677
|
while (1) {
|
|
9493
|
-
switch (
|
|
9678
|
+
switch (_context59.prev = _context59.next) {
|
|
9494
9679
|
case 0:
|
|
9495
|
-
|
|
9680
|
+
_context59.next = 2;
|
|
9496
9681
|
return this.put(this.baseURL + "/campaigns/".concat(id), {
|
|
9497
9682
|
campaign: params
|
|
9498
9683
|
});
|
|
9499
9684
|
|
|
9500
9685
|
case 2:
|
|
9501
|
-
_yield$this$put2 =
|
|
9686
|
+
_yield$this$put2 = _context59.sent;
|
|
9502
9687
|
campaign = _yield$this$put2.campaign;
|
|
9503
|
-
return
|
|
9688
|
+
return _context59.abrupt("return", campaign);
|
|
9504
9689
|
|
|
9505
9690
|
case 5:
|
|
9506
9691
|
case "end":
|
|
9507
|
-
return
|
|
9692
|
+
return _context59.stop();
|
|
9508
9693
|
}
|
|
9509
9694
|
}
|
|
9510
|
-
},
|
|
9695
|
+
}, _callee59, this);
|
|
9511
9696
|
}));
|
|
9512
9697
|
|
|
9513
|
-
function updateCampaign(
|
|
9698
|
+
function updateCampaign(_x79, _x80) {
|
|
9514
9699
|
return _updateCampaign.apply(this, arguments);
|
|
9515
9700
|
}
|
|
9516
9701
|
|
|
@@ -9527,22 +9712,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9527
9712
|
}, {
|
|
9528
9713
|
key: "deleteCampaign",
|
|
9529
9714
|
value: function () {
|
|
9530
|
-
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9531
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9715
|
+
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee60(id) {
|
|
9716
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee60$(_context60) {
|
|
9532
9717
|
while (1) {
|
|
9533
|
-
switch (
|
|
9718
|
+
switch (_context60.prev = _context60.next) {
|
|
9534
9719
|
case 0:
|
|
9535
|
-
return
|
|
9720
|
+
return _context60.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
|
|
9536
9721
|
|
|
9537
9722
|
case 1:
|
|
9538
9723
|
case "end":
|
|
9539
|
-
return
|
|
9724
|
+
return _context60.stop();
|
|
9540
9725
|
}
|
|
9541
9726
|
}
|
|
9542
|
-
},
|
|
9727
|
+
}, _callee60, this);
|
|
9543
9728
|
}));
|
|
9544
9729
|
|
|
9545
|
-
function deleteCampaign(
|
|
9730
|
+
function deleteCampaign(_x81) {
|
|
9546
9731
|
return _deleteCampaign.apply(this, arguments);
|
|
9547
9732
|
}
|
|
9548
9733
|
|
|
@@ -9560,33 +9745,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9560
9745
|
}, {
|
|
9561
9746
|
key: "scheduleCampaign",
|
|
9562
9747
|
value: function () {
|
|
9563
|
-
var _scheduleCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9748
|
+
var _scheduleCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee61(id, params) {
|
|
9564
9749
|
var sendAt, _yield$this$patch, campaign;
|
|
9565
9750
|
|
|
9566
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9751
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee61$(_context61) {
|
|
9567
9752
|
while (1) {
|
|
9568
|
-
switch (
|
|
9753
|
+
switch (_context61.prev = _context61.next) {
|
|
9569
9754
|
case 0:
|
|
9570
9755
|
sendAt = params.sendAt;
|
|
9571
|
-
|
|
9756
|
+
_context61.next = 3;
|
|
9572
9757
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
|
|
9573
9758
|
send_at: sendAt
|
|
9574
9759
|
});
|
|
9575
9760
|
|
|
9576
9761
|
case 3:
|
|
9577
|
-
_yield$this$patch =
|
|
9762
|
+
_yield$this$patch = _context61.sent;
|
|
9578
9763
|
campaign = _yield$this$patch.campaign;
|
|
9579
|
-
return
|
|
9764
|
+
return _context61.abrupt("return", campaign);
|
|
9580
9765
|
|
|
9581
9766
|
case 6:
|
|
9582
9767
|
case "end":
|
|
9583
|
-
return
|
|
9768
|
+
return _context61.stop();
|
|
9584
9769
|
}
|
|
9585
9770
|
}
|
|
9586
|
-
},
|
|
9771
|
+
}, _callee61, this);
|
|
9587
9772
|
}));
|
|
9588
9773
|
|
|
9589
|
-
function scheduleCampaign(
|
|
9774
|
+
function scheduleCampaign(_x82, _x83) {
|
|
9590
9775
|
return _scheduleCampaign.apply(this, arguments);
|
|
9591
9776
|
}
|
|
9592
9777
|
|
|
@@ -9603,30 +9788,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9603
9788
|
}, {
|
|
9604
9789
|
key: "stopCampaign",
|
|
9605
9790
|
value: function () {
|
|
9606
|
-
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9791
|
+
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee62(id) {
|
|
9607
9792
|
var _yield$this$patch2, campaign;
|
|
9608
9793
|
|
|
9609
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9794
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee62$(_context62) {
|
|
9610
9795
|
while (1) {
|
|
9611
|
-
switch (
|
|
9796
|
+
switch (_context62.prev = _context62.next) {
|
|
9612
9797
|
case 0:
|
|
9613
|
-
|
|
9798
|
+
_context62.next = 2;
|
|
9614
9799
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
|
|
9615
9800
|
|
|
9616
9801
|
case 2:
|
|
9617
|
-
_yield$this$patch2 =
|
|
9802
|
+
_yield$this$patch2 = _context62.sent;
|
|
9618
9803
|
campaign = _yield$this$patch2.campaign;
|
|
9619
|
-
return
|
|
9804
|
+
return _context62.abrupt("return", campaign);
|
|
9620
9805
|
|
|
9621
9806
|
case 5:
|
|
9622
9807
|
case "end":
|
|
9623
|
-
return
|
|
9808
|
+
return _context62.stop();
|
|
9624
9809
|
}
|
|
9625
9810
|
}
|
|
9626
|
-
},
|
|
9811
|
+
}, _callee62, this);
|
|
9627
9812
|
}));
|
|
9628
9813
|
|
|
9629
|
-
function stopCampaign(
|
|
9814
|
+
function stopCampaign(_x84) {
|
|
9630
9815
|
return _stopCampaign.apply(this, arguments);
|
|
9631
9816
|
}
|
|
9632
9817
|
|
|
@@ -9643,30 +9828,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9643
9828
|
}, {
|
|
9644
9829
|
key: "resumeCampaign",
|
|
9645
9830
|
value: function () {
|
|
9646
|
-
var _resumeCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9831
|
+
var _resumeCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee63(id) {
|
|
9647
9832
|
var _yield$this$patch3, campaign;
|
|
9648
9833
|
|
|
9649
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9834
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee63$(_context63) {
|
|
9650
9835
|
while (1) {
|
|
9651
|
-
switch (
|
|
9836
|
+
switch (_context63.prev = _context63.next) {
|
|
9652
9837
|
case 0:
|
|
9653
|
-
|
|
9838
|
+
_context63.next = 2;
|
|
9654
9839
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
|
|
9655
9840
|
|
|
9656
9841
|
case 2:
|
|
9657
|
-
_yield$this$patch3 =
|
|
9842
|
+
_yield$this$patch3 = _context63.sent;
|
|
9658
9843
|
campaign = _yield$this$patch3.campaign;
|
|
9659
|
-
return
|
|
9844
|
+
return _context63.abrupt("return", campaign);
|
|
9660
9845
|
|
|
9661
9846
|
case 5:
|
|
9662
9847
|
case "end":
|
|
9663
|
-
return
|
|
9848
|
+
return _context63.stop();
|
|
9664
9849
|
}
|
|
9665
9850
|
}
|
|
9666
|
-
},
|
|
9851
|
+
}, _callee63, this);
|
|
9667
9852
|
}));
|
|
9668
9853
|
|
|
9669
|
-
function resumeCampaign(
|
|
9854
|
+
function resumeCampaign(_x85) {
|
|
9670
9855
|
return _resumeCampaign.apply(this, arguments);
|
|
9671
9856
|
}
|
|
9672
9857
|
|
|
@@ -9683,33 +9868,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9683
9868
|
}, {
|
|
9684
9869
|
key: "testCampaign",
|
|
9685
9870
|
value: function () {
|
|
9686
|
-
var _testCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9871
|
+
var _testCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee64(id, params) {
|
|
9687
9872
|
var users, _yield$this$post3, campaign;
|
|
9688
9873
|
|
|
9689
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9874
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee64$(_context64) {
|
|
9690
9875
|
while (1) {
|
|
9691
|
-
switch (
|
|
9876
|
+
switch (_context64.prev = _context64.next) {
|
|
9692
9877
|
case 0:
|
|
9693
9878
|
users = params.users;
|
|
9694
|
-
|
|
9879
|
+
_context64.next = 3;
|
|
9695
9880
|
return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
|
|
9696
9881
|
users: users
|
|
9697
9882
|
});
|
|
9698
9883
|
|
|
9699
9884
|
case 3:
|
|
9700
|
-
_yield$this$post3 =
|
|
9885
|
+
_yield$this$post3 = _context64.sent;
|
|
9701
9886
|
campaign = _yield$this$post3.campaign;
|
|
9702
|
-
return
|
|
9887
|
+
return _context64.abrupt("return", campaign);
|
|
9703
9888
|
|
|
9704
9889
|
case 6:
|
|
9705
9890
|
case "end":
|
|
9706
|
-
return
|
|
9891
|
+
return _context64.stop();
|
|
9707
9892
|
}
|
|
9708
9893
|
}
|
|
9709
|
-
},
|
|
9894
|
+
}, _callee64, this);
|
|
9710
9895
|
}));
|
|
9711
9896
|
|
|
9712
|
-
function testCampaign(
|
|
9897
|
+
function testCampaign(_x86, _x87) {
|
|
9713
9898
|
return _testCampaign.apply(this, arguments);
|
|
9714
9899
|
}
|
|
9715
9900
|
|
|
@@ -9725,24 +9910,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9725
9910
|
}, {
|
|
9726
9911
|
key: "enrichURL",
|
|
9727
9912
|
value: function () {
|
|
9728
|
-
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9729
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9913
|
+
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee65(url) {
|
|
9914
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee65$(_context65) {
|
|
9730
9915
|
while (1) {
|
|
9731
|
-
switch (
|
|
9916
|
+
switch (_context65.prev = _context65.next) {
|
|
9732
9917
|
case 0:
|
|
9733
|
-
return
|
|
9918
|
+
return _context65.abrupt("return", this.get(this.baseURL + "/og", {
|
|
9734
9919
|
url: url
|
|
9735
9920
|
}));
|
|
9736
9921
|
|
|
9737
9922
|
case 1:
|
|
9738
9923
|
case "end":
|
|
9739
|
-
return
|
|
9924
|
+
return _context65.stop();
|
|
9740
9925
|
}
|
|
9741
9926
|
}
|
|
9742
|
-
},
|
|
9927
|
+
}, _callee65, this);
|
|
9743
9928
|
}));
|
|
9744
9929
|
|
|
9745
|
-
function enrichURL(
|
|
9930
|
+
function enrichURL(_x88) {
|
|
9746
9931
|
return _enrichURL.apply(this, arguments);
|
|
9747
9932
|
}
|
|
9748
9933
|
|
|
@@ -9759,22 +9944,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9759
9944
|
}, {
|
|
9760
9945
|
key: "getTask",
|
|
9761
9946
|
value: function () {
|
|
9762
|
-
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9763
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9947
|
+
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee66(id) {
|
|
9948
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee66$(_context66) {
|
|
9764
9949
|
while (1) {
|
|
9765
|
-
switch (
|
|
9950
|
+
switch (_context66.prev = _context66.next) {
|
|
9766
9951
|
case 0:
|
|
9767
|
-
return
|
|
9952
|
+
return _context66.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
9768
9953
|
|
|
9769
9954
|
case 1:
|
|
9770
9955
|
case "end":
|
|
9771
|
-
return
|
|
9956
|
+
return _context66.stop();
|
|
9772
9957
|
}
|
|
9773
9958
|
}
|
|
9774
|
-
},
|
|
9959
|
+
}, _callee66, this);
|
|
9775
9960
|
}));
|
|
9776
9961
|
|
|
9777
|
-
function getTask(
|
|
9962
|
+
function getTask(_x89) {
|
|
9778
9963
|
return _getTask.apply(this, arguments);
|
|
9779
9964
|
}
|
|
9780
9965
|
|
|
@@ -9792,31 +9977,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9792
9977
|
}, {
|
|
9793
9978
|
key: "deleteChannels",
|
|
9794
9979
|
value: function () {
|
|
9795
|
-
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9980
|
+
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee67(cids) {
|
|
9796
9981
|
var options,
|
|
9797
|
-
|
|
9798
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
9982
|
+
_args67 = arguments;
|
|
9983
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee67$(_context67) {
|
|
9799
9984
|
while (1) {
|
|
9800
|
-
switch (
|
|
9985
|
+
switch (_context67.prev = _context67.next) {
|
|
9801
9986
|
case 0:
|
|
9802
|
-
options =
|
|
9803
|
-
|
|
9987
|
+
options = _args67.length > 1 && _args67[1] !== undefined ? _args67[1] : {};
|
|
9988
|
+
_context67.next = 3;
|
|
9804
9989
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
9805
9990
|
cids: cids
|
|
9806
9991
|
}, options));
|
|
9807
9992
|
|
|
9808
9993
|
case 3:
|
|
9809
|
-
return
|
|
9994
|
+
return _context67.abrupt("return", _context67.sent);
|
|
9810
9995
|
|
|
9811
9996
|
case 4:
|
|
9812
9997
|
case "end":
|
|
9813
|
-
return
|
|
9998
|
+
return _context67.stop();
|
|
9814
9999
|
}
|
|
9815
10000
|
}
|
|
9816
|
-
},
|
|
10001
|
+
}, _callee67, this);
|
|
9817
10002
|
}));
|
|
9818
10003
|
|
|
9819
|
-
function deleteChannels(
|
|
10004
|
+
function deleteChannels(_x90) {
|
|
9820
10005
|
return _deleteChannels.apply(this, arguments);
|
|
9821
10006
|
}
|
|
9822
10007
|
|
|
@@ -9834,13 +10019,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9834
10019
|
}, {
|
|
9835
10020
|
key: "deleteUsers",
|
|
9836
10021
|
value: function () {
|
|
9837
|
-
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
9838
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
10022
|
+
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee68(user_ids, options) {
|
|
10023
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee68$(_context68) {
|
|
9839
10024
|
while (1) {
|
|
9840
|
-
switch (
|
|
10025
|
+
switch (_context68.prev = _context68.next) {
|
|
9841
10026
|
case 0:
|
|
9842
10027
|
if (!((options === null || options === void 0 ? void 0 : options.user) !== 'soft' && (options === null || options === void 0 ? void 0 : options.user) !== 'hard')) {
|
|
9843
|
-
|
|
10028
|
+
_context68.next = 2;
|
|
9844
10029
|
break;
|
|
9845
10030
|
}
|
|
9846
10031
|
|
|
@@ -9848,7 +10033,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9848
10033
|
|
|
9849
10034
|
case 2:
|
|
9850
10035
|
if (!(options.messages !== undefined && options.messages !== 'soft' && options.messages !== 'hard')) {
|
|
9851
|
-
|
|
10036
|
+
_context68.next = 4;
|
|
9852
10037
|
break;
|
|
9853
10038
|
}
|
|
9854
10039
|
|
|
@@ -9856,30 +10041,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9856
10041
|
|
|
9857
10042
|
case 4:
|
|
9858
10043
|
if (!(options.conversations !== undefined && options.conversations !== 'soft' && options.conversations !== 'hard')) {
|
|
9859
|
-
|
|
10044
|
+
_context68.next = 6;
|
|
9860
10045
|
break;
|
|
9861
10046
|
}
|
|
9862
10047
|
|
|
9863
10048
|
throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
|
|
9864
10049
|
|
|
9865
10050
|
case 6:
|
|
9866
|
-
|
|
10051
|
+
_context68.next = 8;
|
|
9867
10052
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
9868
10053
|
user_ids: user_ids
|
|
9869
10054
|
}, options));
|
|
9870
10055
|
|
|
9871
10056
|
case 8:
|
|
9872
|
-
return
|
|
10057
|
+
return _context68.abrupt("return", _context68.sent);
|
|
9873
10058
|
|
|
9874
10059
|
case 9:
|
|
9875
10060
|
case "end":
|
|
9876
|
-
return
|
|
10061
|
+
return _context68.stop();
|
|
9877
10062
|
}
|
|
9878
10063
|
}
|
|
9879
|
-
},
|
|
10064
|
+
}, _callee68, this);
|
|
9880
10065
|
}));
|
|
9881
10066
|
|
|
9882
|
-
function deleteUsers(
|
|
10067
|
+
function deleteUsers(_x91, _x92) {
|
|
9883
10068
|
return _deleteUsers.apply(this, arguments);
|
|
9884
10069
|
}
|
|
9885
10070
|
|