stream-chat 8.4.0 → 8.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.es.js +69 -56
- 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 +69 -56
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +69 -56
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +69 -56
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts +3 -1
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/types.d.ts +2 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +6 -3
- package/src/client.ts +6 -1
- package/src/types.ts +4 -0
package/dist/browser.es.js
CHANGED
|
@@ -1386,30 +1386,36 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1386
1386
|
|
|
1387
1387
|
_defineProperty(this, "disconnected", void 0);
|
|
1388
1388
|
|
|
1389
|
-
_defineProperty(this, "create", /*#__PURE__*/
|
|
1390
|
-
var options
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1389
|
+
_defineProperty(this, "create", /*#__PURE__*/function () {
|
|
1390
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
|
|
1391
|
+
var defaultOptions;
|
|
1392
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
1393
|
+
while (1) {
|
|
1394
|
+
switch (_context.prev = _context.next) {
|
|
1395
|
+
case 0:
|
|
1396
|
+
defaultOptions = _objectSpread$5(_objectSpread$5({}, options), {}, {
|
|
1397
|
+
watch: false,
|
|
1398
|
+
state: false,
|
|
1399
|
+
presence: false
|
|
1400
|
+
});
|
|
1401
|
+
_context.next = 3;
|
|
1402
|
+
return _this.query(defaultOptions, 'latest');
|
|
1402
1403
|
|
|
1403
|
-
|
|
1404
|
-
|
|
1404
|
+
case 3:
|
|
1405
|
+
return _context.abrupt("return", _context.sent);
|
|
1405
1406
|
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1407
|
+
case 4:
|
|
1408
|
+
case "end":
|
|
1409
|
+
return _context.stop();
|
|
1410
|
+
}
|
|
1409
1411
|
}
|
|
1410
|
-
}
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1412
|
+
}, _callee);
|
|
1413
|
+
}));
|
|
1414
|
+
|
|
1415
|
+
return function (_x) {
|
|
1416
|
+
return _ref.apply(this, arguments);
|
|
1417
|
+
};
|
|
1418
|
+
}());
|
|
1413
1419
|
|
|
1414
1420
|
_defineProperty(this, "_callChannelListeners", function (event) {
|
|
1415
1421
|
var channel = _this; // gather and call the listeners
|
|
@@ -1539,7 +1545,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1539
1545
|
}, _callee2, this);
|
|
1540
1546
|
}));
|
|
1541
1547
|
|
|
1542
|
-
function sendMessage(
|
|
1548
|
+
function sendMessage(_x2, _x3) {
|
|
1543
1549
|
return _sendMessage.apply(this, arguments);
|
|
1544
1550
|
}
|
|
1545
1551
|
|
|
@@ -1603,7 +1609,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1603
1609
|
}, _callee3, this);
|
|
1604
1610
|
}));
|
|
1605
1611
|
|
|
1606
|
-
function sendEvent(
|
|
1612
|
+
function sendEvent(_x4) {
|
|
1607
1613
|
return _sendEvent.apply(this, arguments);
|
|
1608
1614
|
}
|
|
1609
1615
|
|
|
@@ -1691,7 +1697,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1691
1697
|
}, _callee4, this);
|
|
1692
1698
|
}));
|
|
1693
1699
|
|
|
1694
|
-
function search(
|
|
1700
|
+
function search(_x5) {
|
|
1695
1701
|
return _search.apply(this, arguments);
|
|
1696
1702
|
}
|
|
1697
1703
|
|
|
@@ -1757,7 +1763,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1757
1763
|
}, _callee5, this);
|
|
1758
1764
|
}));
|
|
1759
1765
|
|
|
1760
|
-
function queryMembers(
|
|
1766
|
+
function queryMembers(_x6) {
|
|
1761
1767
|
return _queryMembers.apply(this, arguments);
|
|
1762
1768
|
}
|
|
1763
1769
|
|
|
@@ -1813,7 +1819,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1813
1819
|
}, _callee6, this);
|
|
1814
1820
|
}));
|
|
1815
1821
|
|
|
1816
|
-
function sendReaction(
|
|
1822
|
+
function sendReaction(_x7, _x8, _x9) {
|
|
1817
1823
|
return _sendReaction.apply(this, arguments);
|
|
1818
1824
|
}
|
|
1819
1825
|
|
|
@@ -1934,7 +1940,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1934
1940
|
}, _callee8, this);
|
|
1935
1941
|
}));
|
|
1936
1942
|
|
|
1937
|
-
function updatePartial(
|
|
1943
|
+
function updatePartial(_x10) {
|
|
1938
1944
|
return _updatePartial.apply(this, arguments);
|
|
1939
1945
|
}
|
|
1940
1946
|
|
|
@@ -1974,7 +1980,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1974
1980
|
}, _callee9, this);
|
|
1975
1981
|
}));
|
|
1976
1982
|
|
|
1977
|
-
function enableSlowMode(
|
|
1983
|
+
function enableSlowMode(_x11) {
|
|
1978
1984
|
return _enableSlowMode.apply(this, arguments);
|
|
1979
1985
|
}
|
|
1980
1986
|
|
|
@@ -2214,7 +2220,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2214
2220
|
}, _callee15, this);
|
|
2215
2221
|
}));
|
|
2216
2222
|
|
|
2217
|
-
function addMembers(
|
|
2223
|
+
function addMembers(_x12, _x13) {
|
|
2218
2224
|
return _addMembers.apply(this, arguments);
|
|
2219
2225
|
}
|
|
2220
2226
|
|
|
@@ -2257,7 +2263,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2257
2263
|
}, _callee16, this);
|
|
2258
2264
|
}));
|
|
2259
2265
|
|
|
2260
|
-
function addModerators(
|
|
2266
|
+
function addModerators(_x14, _x15) {
|
|
2261
2267
|
return _addModerators.apply(this, arguments);
|
|
2262
2268
|
}
|
|
2263
2269
|
|
|
@@ -2300,7 +2306,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2300
2306
|
}, _callee17, this);
|
|
2301
2307
|
}));
|
|
2302
2308
|
|
|
2303
|
-
function assignRoles(
|
|
2309
|
+
function assignRoles(_x16, _x17) {
|
|
2304
2310
|
return _assignRoles.apply(this, arguments);
|
|
2305
2311
|
}
|
|
2306
2312
|
|
|
@@ -2343,7 +2349,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2343
2349
|
}, _callee18, this);
|
|
2344
2350
|
}));
|
|
2345
2351
|
|
|
2346
|
-
function inviteMembers(
|
|
2352
|
+
function inviteMembers(_x18, _x19) {
|
|
2347
2353
|
return _inviteMembers.apply(this, arguments);
|
|
2348
2354
|
}
|
|
2349
2355
|
|
|
@@ -2386,7 +2392,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2386
2392
|
}, _callee19, this);
|
|
2387
2393
|
}));
|
|
2388
2394
|
|
|
2389
|
-
function removeMembers(
|
|
2395
|
+
function removeMembers(_x20, _x21) {
|
|
2390
2396
|
return _removeMembers.apply(this, arguments);
|
|
2391
2397
|
}
|
|
2392
2398
|
|
|
@@ -2429,7 +2435,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2429
2435
|
}, _callee20, this);
|
|
2430
2436
|
}));
|
|
2431
2437
|
|
|
2432
|
-
function demoteModerators(
|
|
2438
|
+
function demoteModerators(_x22, _x23) {
|
|
2433
2439
|
return _demoteModerators.apply(this, arguments);
|
|
2434
2440
|
}
|
|
2435
2441
|
|
|
@@ -2467,7 +2473,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2467
2473
|
}, _callee21, this);
|
|
2468
2474
|
}));
|
|
2469
2475
|
|
|
2470
|
-
function _update(
|
|
2476
|
+
function _update(_x24) {
|
|
2471
2477
|
return _update3.apply(this, arguments);
|
|
2472
2478
|
}
|
|
2473
2479
|
|
|
@@ -2640,7 +2646,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2640
2646
|
}, _callee24, this);
|
|
2641
2647
|
}));
|
|
2642
2648
|
|
|
2643
|
-
function keystroke(
|
|
2649
|
+
function keystroke(_x25) {
|
|
2644
2650
|
return _keystroke.apply(this, arguments);
|
|
2645
2651
|
}
|
|
2646
2652
|
|
|
@@ -2686,7 +2692,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2686
2692
|
}, _callee25, this);
|
|
2687
2693
|
}));
|
|
2688
2694
|
|
|
2689
|
-
function stopTyping(
|
|
2695
|
+
function stopTyping(_x26) {
|
|
2690
2696
|
return _stopTyping.apply(this, arguments);
|
|
2691
2697
|
}
|
|
2692
2698
|
|
|
@@ -2809,7 +2815,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2809
2815
|
}, _callee27, this);
|
|
2810
2816
|
}));
|
|
2811
2817
|
|
|
2812
|
-
function markUnread(
|
|
2818
|
+
function markUnread(_x27) {
|
|
2813
2819
|
return _markUnread.apply(this, arguments);
|
|
2814
2820
|
}
|
|
2815
2821
|
|
|
@@ -2888,7 +2894,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2888
2894
|
}, _callee28, this);
|
|
2889
2895
|
}));
|
|
2890
2896
|
|
|
2891
|
-
function watch(
|
|
2897
|
+
function watch(_x28) {
|
|
2892
2898
|
return _watch.apply(this, arguments);
|
|
2893
2899
|
}
|
|
2894
2900
|
|
|
@@ -2975,7 +2981,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2975
2981
|
}, _callee30, this);
|
|
2976
2982
|
}));
|
|
2977
2983
|
|
|
2978
|
-
function getReplies(
|
|
2984
|
+
function getReplies(_x29, _x30) {
|
|
2979
2985
|
return _getReplies.apply(this, arguments);
|
|
2980
2986
|
}
|
|
2981
2987
|
|
|
@@ -3019,7 +3025,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3019
3025
|
}, _callee31, this);
|
|
3020
3026
|
}));
|
|
3021
3027
|
|
|
3022
|
-
function getPinnedMessages(
|
|
3028
|
+
function getPinnedMessages(_x31) {
|
|
3023
3029
|
return _getPinnedMessages.apply(this, arguments);
|
|
3024
3030
|
}
|
|
3025
3031
|
|
|
@@ -3142,6 +3148,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3142
3148
|
* create - Creates a new channel
|
|
3143
3149
|
*
|
|
3144
3150
|
* @return {Promise<QueryChannelAPIResponse<StreamChatGenerics>>} The Server Response
|
|
3151
|
+
*
|
|
3145
3152
|
*/
|
|
3146
3153
|
|
|
3147
3154
|
}, {
|
|
@@ -3235,7 +3242,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3235
3242
|
}, _callee32, this);
|
|
3236
3243
|
}));
|
|
3237
3244
|
|
|
3238
|
-
function query(
|
|
3245
|
+
function query(_x32) {
|
|
3239
3246
|
return _query.apply(this, arguments);
|
|
3240
3247
|
}
|
|
3241
3248
|
|
|
@@ -3276,7 +3283,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3276
3283
|
}, _callee33, this);
|
|
3277
3284
|
}));
|
|
3278
3285
|
|
|
3279
|
-
function banUser(
|
|
3286
|
+
function banUser(_x33, _x34) {
|
|
3280
3287
|
return _banUser.apply(this, arguments);
|
|
3281
3288
|
}
|
|
3282
3289
|
|
|
@@ -3407,7 +3414,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3407
3414
|
}, _callee36, this);
|
|
3408
3415
|
}));
|
|
3409
3416
|
|
|
3410
|
-
function unbanUser(
|
|
3417
|
+
function unbanUser(_x35) {
|
|
3411
3418
|
return _unbanUser.apply(this, arguments);
|
|
3412
3419
|
}
|
|
3413
3420
|
|
|
@@ -3448,7 +3455,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3448
3455
|
}, _callee37, this);
|
|
3449
3456
|
}));
|
|
3450
3457
|
|
|
3451
|
-
function shadowBan(
|
|
3458
|
+
function shadowBan(_x36, _x37) {
|
|
3452
3459
|
return _shadowBan.apply(this, arguments);
|
|
3453
3460
|
}
|
|
3454
3461
|
|
|
@@ -3488,7 +3495,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3488
3495
|
}, _callee38, this);
|
|
3489
3496
|
}));
|
|
3490
3497
|
|
|
3491
|
-
function removeShadowBan(
|
|
3498
|
+
function removeShadowBan(_x38) {
|
|
3492
3499
|
return _removeShadowBan.apply(this, arguments);
|
|
3493
3500
|
}
|
|
3494
3501
|
|
|
@@ -3523,7 +3530,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3523
3530
|
}, _callee39, this);
|
|
3524
3531
|
}));
|
|
3525
3532
|
|
|
3526
|
-
function createCall(
|
|
3533
|
+
function createCall(_x39) {
|
|
3527
3534
|
return _createCall.apply(this, arguments);
|
|
3528
3535
|
}
|
|
3529
3536
|
|
|
@@ -6015,7 +6022,8 @@ var ErrorFromResponse = /*#__PURE__*/function (_Error) {
|
|
|
6015
6022
|
return ErrorFromResponse;
|
|
6016
6023
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
6017
6024
|
|
|
6018
|
-
var _excluded = ["created_at", "updated_at", "last_active", "online"]
|
|
6025
|
+
var _excluded = ["created_at", "updated_at", "last_active", "online"],
|
|
6026
|
+
_excluded2 = ["params", "headers"];
|
|
6019
6027
|
|
|
6020
6028
|
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; } } }; }
|
|
6021
6029
|
|
|
@@ -10013,7 +10021,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10013
10021
|
}, {
|
|
10014
10022
|
key: "getUserAgent",
|
|
10015
10023
|
value: function getUserAgent() {
|
|
10016
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
10024
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.5.0");
|
|
10017
10025
|
}
|
|
10018
10026
|
}, {
|
|
10019
10027
|
key: "setUserAgent",
|
|
@@ -10053,19 +10061,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10053
10061
|
});
|
|
10054
10062
|
}
|
|
10055
10063
|
|
|
10064
|
+
var _ref9 = this.options.axiosRequestConfig || {},
|
|
10065
|
+
axiosRequestConfigParams = _ref9.params,
|
|
10066
|
+
axiosRequestConfigHeaders = _ref9.headers,
|
|
10067
|
+
axiosRequestConfigRest = _objectWithoutProperties(_ref9, _excluded2);
|
|
10068
|
+
|
|
10056
10069
|
return _objectSpread(_objectSpread(_objectSpread({
|
|
10057
|
-
params: _objectSpread({
|
|
10070
|
+
params: _objectSpread(_objectSpread({
|
|
10058
10071
|
user_id: this.userID,
|
|
10059
10072
|
connection_id: this._getConnectionID(),
|
|
10060
10073
|
api_key: this.key
|
|
10061
|
-
}, options.params),
|
|
10062
|
-
headers: _objectSpread(_objectSpread({}, authorization), {}, {
|
|
10074
|
+
}, options.params), axiosRequestConfigParams || {}),
|
|
10075
|
+
headers: _objectSpread(_objectSpread(_objectSpread({}, authorization), {}, {
|
|
10063
10076
|
'stream-auth-type': this.getAuthType(),
|
|
10064
10077
|
'X-Stream-Client': this.getUserAgent()
|
|
10065
|
-
}, options.headers)
|
|
10078
|
+
}, options.headers), axiosRequestConfigHeaders || {})
|
|
10066
10079
|
}, signal ? {
|
|
10067
10080
|
signal: signal
|
|
10068
|
-
} : {}), options.config),
|
|
10081
|
+
} : {}), options.config), axiosRequestConfigRest || {});
|
|
10069
10082
|
}
|
|
10070
10083
|
}, {
|
|
10071
10084
|
key: "_getToken",
|
|
@@ -11221,13 +11234,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11221
11234
|
}, {
|
|
11222
11235
|
key: "deletePushProvider",
|
|
11223
11236
|
value: function () {
|
|
11224
|
-
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(
|
|
11237
|
+
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(_ref10) {
|
|
11225
11238
|
var type, name;
|
|
11226
11239
|
return _regeneratorRuntime.wrap(function _callee79$(_context79) {
|
|
11227
11240
|
while (1) {
|
|
11228
11241
|
switch (_context79.prev = _context79.next) {
|
|
11229
11242
|
case 0:
|
|
11230
|
-
type =
|
|
11243
|
+
type = _ref10.type, name = _ref10.name;
|
|
11231
11244
|
_context79.next = 3;
|
|
11232
11245
|
return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
|
|
11233
11246
|
|