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