stream-chat 8.2.1 → 8.4.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/index.js CHANGED
@@ -1535,6 +1535,7 @@ var Channel = /*#__PURE__*/function () {
1535
1535
  * @param {boolean} [options.skip_push] Skip sending push notifications
1536
1536
  * @param {boolean} [options.is_pending_message] Make this message pending
1537
1537
  * @param {Record<string,string>} [options.pending_message_metadata] Metadata for the pending message
1538
+ * @param {boolean} [options.force_moderation] Apply force moderation for server-side requests
1538
1539
  *
1539
1540
  * @return {Promise<SendMessageAPIResponse<StreamChatGenerics>>} The Server Response
1540
1541
  */
@@ -2796,6 +2797,53 @@ var Channel = /*#__PURE__*/function () {
2796
2797
 
2797
2798
  return markRead;
2798
2799
  }()
2800
+ /**
2801
+ * markUnread - Mark the channel as unread from messageID, only works if the `read_events` setting is enabled
2802
+ *
2803
+ * @param {MarkUnreadOptions<StreamChatGenerics>} data
2804
+ * @return {APIResponse} An API response
2805
+ */
2806
+
2807
+ }, {
2808
+ key: "markUnread",
2809
+ value: function () {
2810
+ var _markUnread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee27(data) {
2811
+ var _this$getConfig4;
2812
+
2813
+ return _regeneratorRuntime__default['default'].wrap(function _callee27$(_context27) {
2814
+ while (1) {
2815
+ switch (_context27.prev = _context27.next) {
2816
+ case 0:
2817
+ this._checkInitialized();
2818
+
2819
+ if ((_this$getConfig4 = this.getConfig()) !== null && _this$getConfig4 !== void 0 && _this$getConfig4.read_events) {
2820
+ _context27.next = 3;
2821
+ break;
2822
+ }
2823
+
2824
+ return _context27.abrupt("return", Promise.resolve(null));
2825
+
2826
+ case 3:
2827
+ _context27.next = 5;
2828
+ return this.getClient().post(this._channelURL() + '/unread', _objectSpread$5({}, data));
2829
+
2830
+ case 5:
2831
+ return _context27.abrupt("return", _context27.sent);
2832
+
2833
+ case 6:
2834
+ case "end":
2835
+ return _context27.stop();
2836
+ }
2837
+ }
2838
+ }, _callee27, this);
2839
+ }));
2840
+
2841
+ function markUnread(_x26) {
2842
+ return _markUnread.apply(this, arguments);
2843
+ }
2844
+
2845
+ return markUnread;
2846
+ }()
2799
2847
  /**
2800
2848
  * clean - Cleans the channel state and fires stop typing if needed
2801
2849
  */
@@ -2825,11 +2873,11 @@ var Channel = /*#__PURE__*/function () {
2825
2873
  }, {
2826
2874
  key: "watch",
2827
2875
  value: function () {
2828
- var _watch = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee27(options) {
2876
+ var _watch = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee28(options) {
2829
2877
  var defaultOptions, combined, state;
2830
- return _regeneratorRuntime__default['default'].wrap(function _callee27$(_context27) {
2878
+ return _regeneratorRuntime__default['default'].wrap(function _callee28$(_context28) {
2831
2879
  while (1) {
2832
- switch (_context27.prev = _context27.next) {
2880
+ switch (_context28.prev = _context28.next) {
2833
2881
  case 0:
2834
2882
  defaultOptions = {
2835
2883
  state: true,
@@ -2837,7 +2885,7 @@ var Channel = /*#__PURE__*/function () {
2837
2885
  presence: false
2838
2886
  }; // Make sure we wait for the connect promise if there is a pending one
2839
2887
 
2840
- _context27.next = 3;
2888
+ _context28.next = 3;
2841
2889
  return this.getClient().wsPromise;
2842
2890
 
2843
2891
  case 3:
@@ -2846,11 +2894,11 @@ var Channel = /*#__PURE__*/function () {
2846
2894
  }
2847
2895
 
2848
2896
  combined = _objectSpread$5(_objectSpread$5({}, defaultOptions), options);
2849
- _context27.next = 7;
2897
+ _context28.next = 7;
2850
2898
  return this.query(combined, 'latest');
2851
2899
 
2852
2900
  case 7:
2853
- state = _context27.sent;
2901
+ state = _context28.sent;
2854
2902
  this.initialized = true;
2855
2903
  this.data = state.channel;
2856
2904
 
@@ -2859,17 +2907,17 @@ var Channel = /*#__PURE__*/function () {
2859
2907
  channel: this
2860
2908
  });
2861
2909
 
2862
- return _context27.abrupt("return", state);
2910
+ return _context28.abrupt("return", state);
2863
2911
 
2864
2912
  case 12:
2865
2913
  case "end":
2866
- return _context27.stop();
2914
+ return _context28.stop();
2867
2915
  }
2868
2916
  }
2869
- }, _callee27, this);
2917
+ }, _callee28, this);
2870
2918
  }));
2871
2919
 
2872
- function watch(_x26) {
2920
+ function watch(_x27) {
2873
2921
  return _watch.apply(this, arguments);
2874
2922
  }
2875
2923
 
@@ -2884,31 +2932,31 @@ var Channel = /*#__PURE__*/function () {
2884
2932
  }, {
2885
2933
  key: "stopWatching",
2886
2934
  value: function () {
2887
- var _stopWatching = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee28() {
2935
+ var _stopWatching = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee29() {
2888
2936
  var response;
2889
- return _regeneratorRuntime__default['default'].wrap(function _callee28$(_context28) {
2937
+ return _regeneratorRuntime__default['default'].wrap(function _callee29$(_context29) {
2890
2938
  while (1) {
2891
- switch (_context28.prev = _context28.next) {
2939
+ switch (_context29.prev = _context29.next) {
2892
2940
  case 0:
2893
- _context28.next = 2;
2941
+ _context29.next = 2;
2894
2942
  return this.getClient().post(this._channelURL() + '/stop-watching', {});
2895
2943
 
2896
2944
  case 2:
2897
- response = _context28.sent;
2945
+ response = _context29.sent;
2898
2946
 
2899
2947
  this._client.logger('info', "channel:watch() - stopped watching channel ".concat(this.cid), {
2900
2948
  tags: ['channel'],
2901
2949
  channel: this
2902
2950
  });
2903
2951
 
2904
- return _context28.abrupt("return", response);
2952
+ return _context29.abrupt("return", response);
2905
2953
 
2906
2954
  case 5:
2907
2955
  case "end":
2908
- return _context28.stop();
2956
+ return _context29.stop();
2909
2957
  }
2910
2958
  }
2911
- }, _callee28, this);
2959
+ }, _callee29, this);
2912
2960
  }));
2913
2961
 
2914
2962
  function stopWatching() {
@@ -2929,34 +2977,34 @@ var Channel = /*#__PURE__*/function () {
2929
2977
  }, {
2930
2978
  key: "getReplies",
2931
2979
  value: function () {
2932
- var _getReplies = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee29(parent_id, options) {
2980
+ var _getReplies = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee30(parent_id, options) {
2933
2981
  var data;
2934
- return _regeneratorRuntime__default['default'].wrap(function _callee29$(_context29) {
2982
+ return _regeneratorRuntime__default['default'].wrap(function _callee30$(_context30) {
2935
2983
  while (1) {
2936
- switch (_context29.prev = _context29.next) {
2984
+ switch (_context30.prev = _context30.next) {
2937
2985
  case 0:
2938
- _context29.next = 2;
2986
+ _context30.next = 2;
2939
2987
  return this.getClient().get(this.getClient().baseURL + "/messages/".concat(parent_id, "/replies"), _objectSpread$5({}, options));
2940
2988
 
2941
2989
  case 2:
2942
- data = _context29.sent;
2990
+ data = _context30.sent;
2943
2991
 
2944
2992
  // add any messages to our thread state
2945
2993
  if (data.messages) {
2946
2994
  this.state.addMessagesSorted(data.messages);
2947
2995
  }
2948
2996
 
2949
- return _context29.abrupt("return", data);
2997
+ return _context30.abrupt("return", data);
2950
2998
 
2951
2999
  case 5:
2952
3000
  case "end":
2953
- return _context29.stop();
3001
+ return _context30.stop();
2954
3002
  }
2955
3003
  }
2956
- }, _callee29, this);
3004
+ }, _callee30, this);
2957
3005
  }));
2958
3006
 
2959
- function getReplies(_x27, _x28) {
3007
+ function getReplies(_x28, _x29) {
2960
3008
  return _getReplies.apply(this, arguments);
2961
3009
  }
2962
3010
 
@@ -2974,15 +3022,15 @@ var Channel = /*#__PURE__*/function () {
2974
3022
  }, {
2975
3023
  key: "getPinnedMessages",
2976
3024
  value: function () {
2977
- var _getPinnedMessages = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee30(options) {
3025
+ var _getPinnedMessages = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee31(options) {
2978
3026
  var sort,
2979
- _args30 = arguments;
2980
- return _regeneratorRuntime__default['default'].wrap(function _callee30$(_context30) {
3027
+ _args31 = arguments;
3028
+ return _regeneratorRuntime__default['default'].wrap(function _callee31$(_context31) {
2981
3029
  while (1) {
2982
- switch (_context30.prev = _context30.next) {
3030
+ switch (_context31.prev = _context31.next) {
2983
3031
  case 0:
2984
- sort = _args30.length > 1 && _args30[1] !== undefined ? _args30[1] : [];
2985
- _context30.next = 3;
3032
+ sort = _args31.length > 1 && _args31[1] !== undefined ? _args31[1] : [];
3033
+ _context31.next = 3;
2986
3034
  return this.getClient().get(this.getClient().baseURL + "/channels/".concat(this.type, "/").concat(this.id, "/pinned_messages"), {
2987
3035
  payload: _objectSpread$5(_objectSpread$5({}, options), {}, {
2988
3036
  sort: normalizeQuerySort(sort)
@@ -2990,17 +3038,17 @@ var Channel = /*#__PURE__*/function () {
2990
3038
  });
2991
3039
 
2992
3040
  case 3:
2993
- return _context30.abrupt("return", _context30.sent);
3041
+ return _context31.abrupt("return", _context31.sent);
2994
3042
 
2995
3043
  case 4:
2996
3044
  case "end":
2997
- return _context30.stop();
3045
+ return _context31.stop();
2998
3046
  }
2999
3047
  }
3000
- }, _callee30, this);
3048
+ }, _callee31, this);
3001
3049
  }));
3002
3050
 
3003
- function getPinnedMessages(_x29) {
3051
+ function getPinnedMessages(_x30) {
3004
3052
  return _getPinnedMessages.apply(this, arguments);
3005
3053
  }
3006
3054
 
@@ -3137,7 +3185,7 @@ var Channel = /*#__PURE__*/function () {
3137
3185
  * @return {Promise<QueryChannelAPIResponse<StreamChatGenerics>>} Returns a query response
3138
3186
  */
3139
3187
  function () {
3140
- var _query = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee31(options) {
3188
+ var _query = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee32(options) {
3141
3189
  var messageSetToAddToIfDoesNotExist,
3142
3190
  queryURL,
3143
3191
  state,
@@ -3145,14 +3193,14 @@ var Channel = /*#__PURE__*/function () {
3145
3193
  tempChannelCid,
3146
3194
  _this$_initializeStat,
3147
3195
  messageSet,
3148
- _args31 = arguments;
3196
+ _args32 = arguments;
3149
3197
 
3150
- return _regeneratorRuntime__default['default'].wrap(function _callee31$(_context31) {
3198
+ return _regeneratorRuntime__default['default'].wrap(function _callee32$(_context32) {
3151
3199
  while (1) {
3152
- switch (_context31.prev = _context31.next) {
3200
+ switch (_context32.prev = _context32.next) {
3153
3201
  case 0:
3154
- messageSetToAddToIfDoesNotExist = _args31.length > 1 && _args31[1] !== undefined ? _args31[1] : 'current';
3155
- _context31.next = 3;
3202
+ messageSetToAddToIfDoesNotExist = _args32.length > 1 && _args32[1] !== undefined ? _args32[1] : 'current';
3203
+ _context32.next = 3;
3156
3204
  return this.getClient().wsPromise;
3157
3205
 
3158
3206
  case 3:
@@ -3162,14 +3210,14 @@ var Channel = /*#__PURE__*/function () {
3162
3210
  queryURL += "/".concat(this.id);
3163
3211
  }
3164
3212
 
3165
- _context31.next = 7;
3213
+ _context32.next = 7;
3166
3214
  return this.getClient().post(queryURL + '/query', _objectSpread$5({
3167
3215
  data: this._data,
3168
3216
  state: true
3169
3217
  }, options));
3170
3218
 
3171
3219
  case 7:
3172
- state = _context31.sent;
3220
+ state = _context32.sent;
3173
3221
 
3174
3222
  // update the channel id if it was missing
3175
3223
  if (!this.id) {
@@ -3206,17 +3254,17 @@ var Channel = /*#__PURE__*/function () {
3206
3254
  isLatestMessageSet: messageSet.isLatest
3207
3255
  }
3208
3256
  });
3209
- return _context31.abrupt("return", state);
3257
+ return _context32.abrupt("return", state);
3210
3258
 
3211
3259
  case 14:
3212
3260
  case "end":
3213
- return _context31.stop();
3261
+ return _context32.stop();
3214
3262
  }
3215
3263
  }
3216
- }, _callee31, this);
3264
+ }, _callee32, this);
3217
3265
  }));
3218
3266
 
3219
- function query(_x30) {
3267
+ function query(_x31) {
3220
3268
  return _query.apply(this, arguments);
3221
3269
  }
3222
3270
 
@@ -3233,31 +3281,31 @@ var Channel = /*#__PURE__*/function () {
3233
3281
  }, {
3234
3282
  key: "banUser",
3235
3283
  value: function () {
3236
- var _banUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee32(targetUserID, options) {
3237
- return _regeneratorRuntime__default['default'].wrap(function _callee32$(_context32) {
3284
+ var _banUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee33(targetUserID, options) {
3285
+ return _regeneratorRuntime__default['default'].wrap(function _callee33$(_context33) {
3238
3286
  while (1) {
3239
- switch (_context32.prev = _context32.next) {
3287
+ switch (_context33.prev = _context33.next) {
3240
3288
  case 0:
3241
3289
  this._checkInitialized();
3242
3290
 
3243
- _context32.next = 3;
3291
+ _context33.next = 3;
3244
3292
  return this.getClient().banUser(targetUserID, _objectSpread$5(_objectSpread$5({}, options), {}, {
3245
3293
  type: this.type,
3246
3294
  id: this.id
3247
3295
  }));
3248
3296
 
3249
3297
  case 3:
3250
- return _context32.abrupt("return", _context32.sent);
3298
+ return _context33.abrupt("return", _context33.sent);
3251
3299
 
3252
3300
  case 4:
3253
3301
  case "end":
3254
- return _context32.stop();
3302
+ return _context33.stop();
3255
3303
  }
3256
3304
  }
3257
- }, _callee32, this);
3305
+ }, _callee33, this);
3258
3306
  }));
3259
3307
 
3260
- function banUser(_x31, _x32) {
3308
+ function banUser(_x32, _x33) {
3261
3309
  return _banUser.apply(this, arguments);
3262
3310
  }
3263
3311
 
@@ -3275,34 +3323,34 @@ var Channel = /*#__PURE__*/function () {
3275
3323
  }, {
3276
3324
  key: "hide",
3277
3325
  value: function () {
3278
- var _hide = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee33() {
3326
+ var _hide = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee34() {
3279
3327
  var userId,
3280
3328
  clearHistory,
3281
- _args33 = arguments;
3282
- return _regeneratorRuntime__default['default'].wrap(function _callee33$(_context33) {
3329
+ _args34 = arguments;
3330
+ return _regeneratorRuntime__default['default'].wrap(function _callee34$(_context34) {
3283
3331
  while (1) {
3284
- switch (_context33.prev = _context33.next) {
3332
+ switch (_context34.prev = _context34.next) {
3285
3333
  case 0:
3286
- userId = _args33.length > 0 && _args33[0] !== undefined ? _args33[0] : null;
3287
- clearHistory = _args33.length > 1 && _args33[1] !== undefined ? _args33[1] : false;
3334
+ userId = _args34.length > 0 && _args34[0] !== undefined ? _args34[0] : null;
3335
+ clearHistory = _args34.length > 1 && _args34[1] !== undefined ? _args34[1] : false;
3288
3336
 
3289
3337
  this._checkInitialized();
3290
3338
 
3291
- _context33.next = 5;
3339
+ _context34.next = 5;
3292
3340
  return this.getClient().post("".concat(this._channelURL(), "/hide"), {
3293
3341
  user_id: userId,
3294
3342
  clear_history: clearHistory
3295
3343
  });
3296
3344
 
3297
3345
  case 5:
3298
- return _context33.abrupt("return", _context33.sent);
3346
+ return _context34.abrupt("return", _context34.sent);
3299
3347
 
3300
3348
  case 6:
3301
3349
  case "end":
3302
- return _context33.stop();
3350
+ return _context34.stop();
3303
3351
  }
3304
3352
  }
3305
- }, _callee33, this);
3353
+ }, _callee34, this);
3306
3354
  }));
3307
3355
 
3308
3356
  function hide() {
@@ -3321,31 +3369,31 @@ var Channel = /*#__PURE__*/function () {
3321
3369
  }, {
3322
3370
  key: "show",
3323
3371
  value: function () {
3324
- var _show = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee34() {
3372
+ var _show = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee35() {
3325
3373
  var userId,
3326
- _args34 = arguments;
3327
- return _regeneratorRuntime__default['default'].wrap(function _callee34$(_context34) {
3374
+ _args35 = arguments;
3375
+ return _regeneratorRuntime__default['default'].wrap(function _callee35$(_context35) {
3328
3376
  while (1) {
3329
- switch (_context34.prev = _context34.next) {
3377
+ switch (_context35.prev = _context35.next) {
3330
3378
  case 0:
3331
- userId = _args34.length > 0 && _args34[0] !== undefined ? _args34[0] : null;
3379
+ userId = _args35.length > 0 && _args35[0] !== undefined ? _args35[0] : null;
3332
3380
 
3333
3381
  this._checkInitialized();
3334
3382
 
3335
- _context34.next = 4;
3383
+ _context35.next = 4;
3336
3384
  return this.getClient().post("".concat(this._channelURL(), "/show"), {
3337
3385
  user_id: userId
3338
3386
  });
3339
3387
 
3340
3388
  case 4:
3341
- return _context34.abrupt("return", _context34.sent);
3389
+ return _context35.abrupt("return", _context35.sent);
3342
3390
 
3343
3391
  case 5:
3344
3392
  case "end":
3345
- return _context34.stop();
3393
+ return _context35.stop();
3346
3394
  }
3347
3395
  }
3348
- }, _callee34, this);
3396
+ }, _callee35, this);
3349
3397
  }));
3350
3398
 
3351
3399
  function show() {
@@ -3364,31 +3412,31 @@ var Channel = /*#__PURE__*/function () {
3364
3412
  }, {
3365
3413
  key: "unbanUser",
3366
3414
  value: function () {
3367
- var _unbanUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee35(targetUserID) {
3368
- return _regeneratorRuntime__default['default'].wrap(function _callee35$(_context35) {
3415
+ var _unbanUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee36(targetUserID) {
3416
+ return _regeneratorRuntime__default['default'].wrap(function _callee36$(_context36) {
3369
3417
  while (1) {
3370
- switch (_context35.prev = _context35.next) {
3418
+ switch (_context36.prev = _context36.next) {
3371
3419
  case 0:
3372
3420
  this._checkInitialized();
3373
3421
 
3374
- _context35.next = 3;
3422
+ _context36.next = 3;
3375
3423
  return this.getClient().unbanUser(targetUserID, {
3376
3424
  type: this.type,
3377
3425
  id: this.id
3378
3426
  });
3379
3427
 
3380
3428
  case 3:
3381
- return _context35.abrupt("return", _context35.sent);
3429
+ return _context36.abrupt("return", _context36.sent);
3382
3430
 
3383
3431
  case 4:
3384
3432
  case "end":
3385
- return _context35.stop();
3433
+ return _context36.stop();
3386
3434
  }
3387
3435
  }
3388
- }, _callee35, this);
3436
+ }, _callee36, this);
3389
3437
  }));
3390
3438
 
3391
- function unbanUser(_x33) {
3439
+ function unbanUser(_x34) {
3392
3440
  return _unbanUser.apply(this, arguments);
3393
3441
  }
3394
3442
 
@@ -3405,31 +3453,31 @@ var Channel = /*#__PURE__*/function () {
3405
3453
  }, {
3406
3454
  key: "shadowBan",
3407
3455
  value: function () {
3408
- var _shadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee36(targetUserID, options) {
3409
- return _regeneratorRuntime__default['default'].wrap(function _callee36$(_context36) {
3456
+ var _shadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee37(targetUserID, options) {
3457
+ return _regeneratorRuntime__default['default'].wrap(function _callee37$(_context37) {
3410
3458
  while (1) {
3411
- switch (_context36.prev = _context36.next) {
3459
+ switch (_context37.prev = _context37.next) {
3412
3460
  case 0:
3413
3461
  this._checkInitialized();
3414
3462
 
3415
- _context36.next = 3;
3463
+ _context37.next = 3;
3416
3464
  return this.getClient().shadowBan(targetUserID, _objectSpread$5(_objectSpread$5({}, options), {}, {
3417
3465
  type: this.type,
3418
3466
  id: this.id
3419
3467
  }));
3420
3468
 
3421
3469
  case 3:
3422
- return _context36.abrupt("return", _context36.sent);
3470
+ return _context37.abrupt("return", _context37.sent);
3423
3471
 
3424
3472
  case 4:
3425
3473
  case "end":
3426
- return _context36.stop();
3474
+ return _context37.stop();
3427
3475
  }
3428
3476
  }
3429
- }, _callee36, this);
3477
+ }, _callee37, this);
3430
3478
  }));
3431
3479
 
3432
- function shadowBan(_x34, _x35) {
3480
+ function shadowBan(_x35, _x36) {
3433
3481
  return _shadowBan.apply(this, arguments);
3434
3482
  }
3435
3483
 
@@ -3445,31 +3493,31 @@ var Channel = /*#__PURE__*/function () {
3445
3493
  }, {
3446
3494
  key: "removeShadowBan",
3447
3495
  value: function () {
3448
- var _removeShadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee37(targetUserID) {
3449
- return _regeneratorRuntime__default['default'].wrap(function _callee37$(_context37) {
3496
+ var _removeShadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee38(targetUserID) {
3497
+ return _regeneratorRuntime__default['default'].wrap(function _callee38$(_context38) {
3450
3498
  while (1) {
3451
- switch (_context37.prev = _context37.next) {
3499
+ switch (_context38.prev = _context38.next) {
3452
3500
  case 0:
3453
3501
  this._checkInitialized();
3454
3502
 
3455
- _context37.next = 3;
3503
+ _context38.next = 3;
3456
3504
  return this.getClient().removeShadowBan(targetUserID, {
3457
3505
  type: this.type,
3458
3506
  id: this.id
3459
3507
  });
3460
3508
 
3461
3509
  case 3:
3462
- return _context37.abrupt("return", _context37.sent);
3510
+ return _context38.abrupt("return", _context38.sent);
3463
3511
 
3464
3512
  case 4:
3465
3513
  case "end":
3466
- return _context37.stop();
3514
+ return _context38.stop();
3467
3515
  }
3468
3516
  }
3469
- }, _callee37, this);
3517
+ }, _callee38, this);
3470
3518
  }));
3471
3519
 
3472
- function removeShadowBan(_x36) {
3520
+ function removeShadowBan(_x37) {
3473
3521
  return _removeShadowBan.apply(this, arguments);
3474
3522
  }
3475
3523
 
@@ -3485,26 +3533,26 @@ var Channel = /*#__PURE__*/function () {
3485
3533
  }, {
3486
3534
  key: "createCall",
3487
3535
  value: function () {
3488
- var _createCall = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee38(options) {
3489
- return _regeneratorRuntime__default['default'].wrap(function _callee38$(_context38) {
3536
+ var _createCall = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee39(options) {
3537
+ return _regeneratorRuntime__default['default'].wrap(function _callee39$(_context39) {
3490
3538
  while (1) {
3491
- switch (_context38.prev = _context38.next) {
3539
+ switch (_context39.prev = _context39.next) {
3492
3540
  case 0:
3493
- _context38.next = 2;
3541
+ _context39.next = 2;
3494
3542
  return this.getClient().post(this._channelURL() + '/call', options);
3495
3543
 
3496
3544
  case 2:
3497
- return _context38.abrupt("return", _context38.sent);
3545
+ return _context39.abrupt("return", _context39.sent);
3498
3546
 
3499
3547
  case 3:
3500
3548
  case "end":
3501
- return _context38.stop();
3549
+ return _context39.stop();
3502
3550
  }
3503
3551
  }
3504
- }, _callee38, this);
3552
+ }, _callee39, this);
3505
3553
  }));
3506
3554
 
3507
- function createCall(_x37) {
3555
+ function createCall(_x38) {
3508
3556
  return _createCall.apply(this, arguments);
3509
3557
  }
3510
3558
 
@@ -9996,7 +10044,7 @@ var StreamChat = /*#__PURE__*/function () {
9996
10044
  }, {
9997
10045
  key: "getUserAgent",
9998
10046
  value: function getUserAgent() {
9999
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.2.1");
10047
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.4.0");
10000
10048
  }
10001
10049
  }, {
10002
10050
  key: "setUserAgent",
@@ -10036,7 +10084,7 @@ var StreamChat = /*#__PURE__*/function () {
10036
10084
  });
10037
10085
  }
10038
10086
 
10039
- return _objectSpread(_objectSpread({
10087
+ return _objectSpread(_objectSpread(_objectSpread({
10040
10088
  params: _objectSpread({
10041
10089
  user_id: this.userID,
10042
10090
  connection_id: this._getConnectionID(),
@@ -10048,7 +10096,7 @@ var StreamChat = /*#__PURE__*/function () {
10048
10096
  }, options.headers)
10049
10097
  }, signal ? {
10050
10098
  signal: signal
10051
- } : {}), options.config);
10099
+ } : {}), options.config), this.options.axiosRequestConfig);
10052
10100
  }
10053
10101
  }, {
10054
10102
  key: "_getToken",