stream-chat 8.42.0 → 8.43.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
@@ -3231,6 +3231,258 @@ var Channel = /*#__PURE__*/function () {
3231
3231
 
3232
3232
  return unmute;
3233
3233
  }()
3234
+ /**
3235
+ * archive - archives the current channel
3236
+ * @param {{ user_id?: string }} opts user_id if called server side
3237
+ * @return {Promise<ChannelMemberResponse<StreamChatGenerics>>} The server response
3238
+ *
3239
+ * example:
3240
+ * await channel.archives();
3241
+ *
3242
+ * example server side:
3243
+ * await channel.archive({user_id: userId});
3244
+ *
3245
+ */
3246
+
3247
+ }, {
3248
+ key: "archive",
3249
+ value: function () {
3250
+ var _archive = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee25() {
3251
+ var opts,
3252
+ cli,
3253
+ uid,
3254
+ resp,
3255
+ _args25 = arguments;
3256
+ return _regeneratorRuntime__default['default'].wrap(function _callee25$(_context25) {
3257
+ while (1) {
3258
+ switch (_context25.prev = _context25.next) {
3259
+ case 0:
3260
+ opts = _args25.length > 0 && _args25[0] !== undefined ? _args25[0] : {};
3261
+ cli = this.getClient();
3262
+ uid = opts.user_id || cli.userID;
3263
+
3264
+ if (uid) {
3265
+ _context25.next = 5;
3266
+ break;
3267
+ }
3268
+
3269
+ throw Error('A user_id is required for archiving a channel');
3270
+
3271
+ case 5:
3272
+ _context25.next = 7;
3273
+ return this.partialUpdateMember(uid, {
3274
+ set: {
3275
+ archived: true
3276
+ }
3277
+ });
3278
+
3279
+ case 7:
3280
+ resp = _context25.sent;
3281
+ return _context25.abrupt("return", resp.channel_member);
3282
+
3283
+ case 9:
3284
+ case "end":
3285
+ return _context25.stop();
3286
+ }
3287
+ }
3288
+ }, _callee25, this);
3289
+ }));
3290
+
3291
+ function archive() {
3292
+ return _archive.apply(this, arguments);
3293
+ }
3294
+
3295
+ return archive;
3296
+ }()
3297
+ /**
3298
+ * unarchive - unarchives the current channel
3299
+ * @param {{ user_id?: string }} opts user_id if called server side
3300
+ * @return {Promise<ChannelMemberResponse<StreamChatGenerics>>} The server response
3301
+ *
3302
+ * example:
3303
+ * await channel.unarchive();
3304
+ *
3305
+ * example server side:
3306
+ * await channel.unarchive({user_id: userId});
3307
+ *
3308
+ */
3309
+
3310
+ }, {
3311
+ key: "unarchive",
3312
+ value: function () {
3313
+ var _unarchive = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee26() {
3314
+ var opts,
3315
+ cli,
3316
+ uid,
3317
+ resp,
3318
+ _args26 = arguments;
3319
+ return _regeneratorRuntime__default['default'].wrap(function _callee26$(_context26) {
3320
+ while (1) {
3321
+ switch (_context26.prev = _context26.next) {
3322
+ case 0:
3323
+ opts = _args26.length > 0 && _args26[0] !== undefined ? _args26[0] : {};
3324
+ cli = this.getClient();
3325
+ uid = opts.user_id || cli.userID;
3326
+
3327
+ if (uid) {
3328
+ _context26.next = 5;
3329
+ break;
3330
+ }
3331
+
3332
+ throw Error('A user_id is required for unarchiving a channel');
3333
+
3334
+ case 5:
3335
+ _context26.next = 7;
3336
+ return this.partialUpdateMember(uid, {
3337
+ set: {
3338
+ archived: false
3339
+ }
3340
+ });
3341
+
3342
+ case 7:
3343
+ resp = _context26.sent;
3344
+ return _context26.abrupt("return", resp.channel_member);
3345
+
3346
+ case 9:
3347
+ case "end":
3348
+ return _context26.stop();
3349
+ }
3350
+ }
3351
+ }, _callee26, this);
3352
+ }));
3353
+
3354
+ function unarchive() {
3355
+ return _unarchive.apply(this, arguments);
3356
+ }
3357
+
3358
+ return unarchive;
3359
+ }()
3360
+ /**
3361
+ * pin - pins the current channel
3362
+ * @param {{ user_id?: string }} opts user_id if called server side
3363
+ * @return {Promise<ChannelMemberResponse<StreamChatGenerics>>} The server response
3364
+ *
3365
+ * example:
3366
+ * await channel.pin();
3367
+ *
3368
+ * example server side:
3369
+ * await channel.pin({user_id: userId});
3370
+ *
3371
+ */
3372
+
3373
+ }, {
3374
+ key: "pin",
3375
+ value: function () {
3376
+ var _pin = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee27() {
3377
+ var opts,
3378
+ cli,
3379
+ uid,
3380
+ resp,
3381
+ _args27 = arguments;
3382
+ return _regeneratorRuntime__default['default'].wrap(function _callee27$(_context27) {
3383
+ while (1) {
3384
+ switch (_context27.prev = _context27.next) {
3385
+ case 0:
3386
+ opts = _args27.length > 0 && _args27[0] !== undefined ? _args27[0] : {};
3387
+ cli = this.getClient();
3388
+ uid = opts.user_id || cli.userID;
3389
+
3390
+ if (uid) {
3391
+ _context27.next = 5;
3392
+ break;
3393
+ }
3394
+
3395
+ throw Error('A user_id is required for pinning a channel');
3396
+
3397
+ case 5:
3398
+ _context27.next = 7;
3399
+ return this.partialUpdateMember(uid, {
3400
+ set: {
3401
+ pinned: true
3402
+ }
3403
+ });
3404
+
3405
+ case 7:
3406
+ resp = _context27.sent;
3407
+ return _context27.abrupt("return", resp.channel_member);
3408
+
3409
+ case 9:
3410
+ case "end":
3411
+ return _context27.stop();
3412
+ }
3413
+ }
3414
+ }, _callee27, this);
3415
+ }));
3416
+
3417
+ function pin() {
3418
+ return _pin.apply(this, arguments);
3419
+ }
3420
+
3421
+ return pin;
3422
+ }()
3423
+ /**
3424
+ * unpin - unpins the current channel
3425
+ * @param {{ user_id?: string }} opts user_id if called server side
3426
+ * @return {Promise<ChannelMemberResponse<StreamChatGenerics>>} The server response
3427
+ *
3428
+ * example:
3429
+ * await channel.unpin();
3430
+ *
3431
+ * example server side:
3432
+ * await channel.unpin({user_id: userId});
3433
+ *
3434
+ */
3435
+
3436
+ }, {
3437
+ key: "unpin",
3438
+ value: function () {
3439
+ var _unpin = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee28() {
3440
+ var opts,
3441
+ cli,
3442
+ uid,
3443
+ resp,
3444
+ _args28 = arguments;
3445
+ return _regeneratorRuntime__default['default'].wrap(function _callee28$(_context28) {
3446
+ while (1) {
3447
+ switch (_context28.prev = _context28.next) {
3448
+ case 0:
3449
+ opts = _args28.length > 0 && _args28[0] !== undefined ? _args28[0] : {};
3450
+ cli = this.getClient();
3451
+ uid = opts.user_id || cli.userID;
3452
+
3453
+ if (uid) {
3454
+ _context28.next = 5;
3455
+ break;
3456
+ }
3457
+
3458
+ throw Error('A user_id is required for unpinning a channel');
3459
+
3460
+ case 5:
3461
+ _context28.next = 7;
3462
+ return this.partialUpdateMember(uid, {
3463
+ set: {
3464
+ pinned: false
3465
+ }
3466
+ });
3467
+
3468
+ case 7:
3469
+ resp = _context28.sent;
3470
+ return _context28.abrupt("return", resp.channel_member);
3471
+
3472
+ case 9:
3473
+ case "end":
3474
+ return _context28.stop();
3475
+ }
3476
+ }
3477
+ }, _callee28, this);
3478
+ }));
3479
+
3480
+ function unpin() {
3481
+ return _unpin.apply(this, arguments);
3482
+ }
3483
+
3484
+ return unpin;
3485
+ }()
3234
3486
  /**
3235
3487
  * muteStatus - returns the mute status for the current channel
3236
3488
  * @return {{ muted: boolean; createdAt: Date | null; expiresAt: Date | null }} { muted: true | false, createdAt: Date | null, expiresAt: Date | null}
@@ -3269,18 +3521,18 @@ var Channel = /*#__PURE__*/function () {
3269
3521
  }, {
3270
3522
  key: "keystroke",
3271
3523
  value: function () {
3272
- var _keystroke = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee25(parent_id, options) {
3524
+ var _keystroke = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee29(parent_id, options) {
3273
3525
  var now, diff;
3274
- return _regeneratorRuntime__default['default'].wrap(function _callee25$(_context25) {
3526
+ return _regeneratorRuntime__default['default'].wrap(function _callee29$(_context29) {
3275
3527
  while (1) {
3276
- switch (_context25.prev = _context25.next) {
3528
+ switch (_context29.prev = _context29.next) {
3277
3529
  case 0:
3278
3530
  if (this._isTypingIndicatorsEnabled()) {
3279
- _context25.next = 2;
3531
+ _context29.next = 2;
3280
3532
  break;
3281
3533
  }
3282
3534
 
3283
- return _context25.abrupt("return");
3535
+ return _context29.abrupt("return");
3284
3536
 
3285
3537
  case 2:
3286
3538
  now = new Date();
@@ -3289,12 +3541,12 @@ var Channel = /*#__PURE__*/function () {
3289
3541
  this.isTyping = true; // send a typing.start every 2 seconds
3290
3542
 
3291
3543
  if (!(diff === null || diff > 2000)) {
3292
- _context25.next = 10;
3544
+ _context29.next = 10;
3293
3545
  break;
3294
3546
  }
3295
3547
 
3296
3548
  this.lastTypingEvent = new Date();
3297
- _context25.next = 10;
3549
+ _context29.next = 10;
3298
3550
  return this.sendEvent(_objectSpread$a({
3299
3551
  type: 'typing.start',
3300
3552
  parent_id: parent_id
@@ -3302,10 +3554,10 @@ var Channel = /*#__PURE__*/function () {
3302
3554
 
3303
3555
  case 10:
3304
3556
  case "end":
3305
- return _context25.stop();
3557
+ return _context29.stop();
3306
3558
  }
3307
3559
  }
3308
- }, _callee25, this);
3560
+ }, _callee29, this);
3309
3561
  }));
3310
3562
 
3311
3563
  function keystroke(_x27, _x28) {
@@ -3323,22 +3575,22 @@ var Channel = /*#__PURE__*/function () {
3323
3575
  }, {
3324
3576
  key: "stopTyping",
3325
3577
  value: function () {
3326
- var _stopTyping = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee26(parent_id, options) {
3327
- return _regeneratorRuntime__default['default'].wrap(function _callee26$(_context26) {
3578
+ var _stopTyping = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee30(parent_id, options) {
3579
+ return _regeneratorRuntime__default['default'].wrap(function _callee30$(_context30) {
3328
3580
  while (1) {
3329
- switch (_context26.prev = _context26.next) {
3581
+ switch (_context30.prev = _context30.next) {
3330
3582
  case 0:
3331
3583
  if (this._isTypingIndicatorsEnabled()) {
3332
- _context26.next = 2;
3584
+ _context30.next = 2;
3333
3585
  break;
3334
3586
  }
3335
3587
 
3336
- return _context26.abrupt("return");
3588
+ return _context30.abrupt("return");
3337
3589
 
3338
3590
  case 2:
3339
3591
  this.lastTypingEvent = null;
3340
3592
  this.isTyping = false;
3341
- _context26.next = 6;
3593
+ _context30.next = 6;
3342
3594
  return this.sendEvent(_objectSpread$a({
3343
3595
  type: 'typing.stop',
3344
3596
  parent_id: parent_id
@@ -3346,10 +3598,10 @@ var Channel = /*#__PURE__*/function () {
3346
3598
 
3347
3599
  case 6:
3348
3600
  case "end":
3349
- return _context26.stop();
3601
+ return _context30.stop();
3350
3602
  }
3351
3603
  }
3352
- }, _callee26, this);
3604
+ }, _callee30, this);
3353
3605
  }));
3354
3606
 
3355
3607
  function stopTyping(_x29, _x30) {
@@ -3404,39 +3656,39 @@ var Channel = /*#__PURE__*/function () {
3404
3656
  }, {
3405
3657
  key: "markRead",
3406
3658
  value: function () {
3407
- var _markRead = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee27() {
3659
+ var _markRead = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee31() {
3408
3660
  var _this$getConfig2;
3409
3661
 
3410
3662
  var data,
3411
- _args27 = arguments;
3412
- return _regeneratorRuntime__default['default'].wrap(function _callee27$(_context27) {
3663
+ _args31 = arguments;
3664
+ return _regeneratorRuntime__default['default'].wrap(function _callee31$(_context31) {
3413
3665
  while (1) {
3414
- switch (_context27.prev = _context27.next) {
3666
+ switch (_context31.prev = _context31.next) {
3415
3667
  case 0:
3416
- data = _args27.length > 0 && _args27[0] !== undefined ? _args27[0] : {};
3668
+ data = _args31.length > 0 && _args31[0] !== undefined ? _args31[0] : {};
3417
3669
 
3418
3670
  this._checkInitialized();
3419
3671
 
3420
3672
  if (!(!((_this$getConfig2 = this.getConfig()) !== null && _this$getConfig2 !== void 0 && _this$getConfig2.read_events) && !this.getClient()._isUsingServerAuth())) {
3421
- _context27.next = 4;
3673
+ _context31.next = 4;
3422
3674
  break;
3423
3675
  }
3424
3676
 
3425
- return _context27.abrupt("return", Promise.resolve(null));
3677
+ return _context31.abrupt("return", Promise.resolve(null));
3426
3678
 
3427
3679
  case 4:
3428
- _context27.next = 6;
3680
+ _context31.next = 6;
3429
3681
  return this.getClient().post(this._channelURL() + '/read', _objectSpread$a({}, data));
3430
3682
 
3431
3683
  case 6:
3432
- return _context27.abrupt("return", _context27.sent);
3684
+ return _context31.abrupt("return", _context31.sent);
3433
3685
 
3434
3686
  case 7:
3435
3687
  case "end":
3436
- return _context27.stop();
3688
+ return _context31.stop();
3437
3689
  }
3438
3690
  }
3439
- }, _callee27, this);
3691
+ }, _callee31, this);
3440
3692
  }));
3441
3693
 
3442
3694
  function markRead() {
@@ -3455,35 +3707,35 @@ var Channel = /*#__PURE__*/function () {
3455
3707
  }, {
3456
3708
  key: "markUnread",
3457
3709
  value: function () {
3458
- var _markUnread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee28(data) {
3710
+ var _markUnread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee32(data) {
3459
3711
  var _this$getConfig3;
3460
3712
 
3461
- return _regeneratorRuntime__default['default'].wrap(function _callee28$(_context28) {
3713
+ return _regeneratorRuntime__default['default'].wrap(function _callee32$(_context32) {
3462
3714
  while (1) {
3463
- switch (_context28.prev = _context28.next) {
3715
+ switch (_context32.prev = _context32.next) {
3464
3716
  case 0:
3465
3717
  this._checkInitialized();
3466
3718
 
3467
3719
  if (!(!((_this$getConfig3 = this.getConfig()) !== null && _this$getConfig3 !== void 0 && _this$getConfig3.read_events) && !this.getClient()._isUsingServerAuth())) {
3468
- _context28.next = 3;
3720
+ _context32.next = 3;
3469
3721
  break;
3470
3722
  }
3471
3723
 
3472
- return _context28.abrupt("return", Promise.resolve(null));
3724
+ return _context32.abrupt("return", Promise.resolve(null));
3473
3725
 
3474
3726
  case 3:
3475
- _context28.next = 5;
3727
+ _context32.next = 5;
3476
3728
  return this.getClient().post(this._channelURL() + '/unread', _objectSpread$a({}, data));
3477
3729
 
3478
3730
  case 5:
3479
- return _context28.abrupt("return", _context28.sent);
3731
+ return _context32.abrupt("return", _context32.sent);
3480
3732
 
3481
3733
  case 6:
3482
3734
  case "end":
3483
- return _context28.stop();
3735
+ return _context32.stop();
3484
3736
  }
3485
3737
  }
3486
- }, _callee28, this);
3738
+ }, _callee32, this);
3487
3739
  }));
3488
3740
 
3489
3741
  function markUnread(_x31) {
@@ -3521,11 +3773,11 @@ var Channel = /*#__PURE__*/function () {
3521
3773
  }, {
3522
3774
  key: "watch",
3523
3775
  value: function () {
3524
- var _watch = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee29(options) {
3776
+ var _watch = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee33(options) {
3525
3777
  var defaultOptions, combined, state;
3526
- return _regeneratorRuntime__default['default'].wrap(function _callee29$(_context29) {
3778
+ return _regeneratorRuntime__default['default'].wrap(function _callee33$(_context33) {
3527
3779
  while (1) {
3528
- switch (_context29.prev = _context29.next) {
3780
+ switch (_context33.prev = _context33.next) {
3529
3781
  case 0:
3530
3782
  defaultOptions = {
3531
3783
  state: true,
@@ -3533,7 +3785,7 @@ var Channel = /*#__PURE__*/function () {
3533
3785
  presence: false
3534
3786
  }; // Make sure we wait for the connect promise if there is a pending one
3535
3787
 
3536
- _context29.next = 3;
3788
+ _context33.next = 3;
3537
3789
  return this.getClient().wsPromise;
3538
3790
 
3539
3791
  case 3:
@@ -3542,11 +3794,11 @@ var Channel = /*#__PURE__*/function () {
3542
3794
  }
3543
3795
 
3544
3796
  combined = _objectSpread$a(_objectSpread$a({}, defaultOptions), options);
3545
- _context29.next = 7;
3797
+ _context33.next = 7;
3546
3798
  return this.query(combined, 'latest');
3547
3799
 
3548
3800
  case 7:
3549
- state = _context29.sent;
3801
+ state = _context33.sent;
3550
3802
  this.initialized = true;
3551
3803
  this.data = state.channel;
3552
3804
 
@@ -3555,14 +3807,14 @@ var Channel = /*#__PURE__*/function () {
3555
3807
  channel: this
3556
3808
  });
3557
3809
 
3558
- return _context29.abrupt("return", state);
3810
+ return _context33.abrupt("return", state);
3559
3811
 
3560
3812
  case 12:
3561
3813
  case "end":
3562
- return _context29.stop();
3814
+ return _context33.stop();
3563
3815
  }
3564
3816
  }
3565
- }, _callee29, this);
3817
+ }, _callee33, this);
3566
3818
  }));
3567
3819
 
3568
3820
  function watch(_x32) {
@@ -3580,31 +3832,31 @@ var Channel = /*#__PURE__*/function () {
3580
3832
  }, {
3581
3833
  key: "stopWatching",
3582
3834
  value: function () {
3583
- var _stopWatching = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee30() {
3835
+ var _stopWatching = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee34() {
3584
3836
  var response;
3585
- return _regeneratorRuntime__default['default'].wrap(function _callee30$(_context30) {
3837
+ return _regeneratorRuntime__default['default'].wrap(function _callee34$(_context34) {
3586
3838
  while (1) {
3587
- switch (_context30.prev = _context30.next) {
3839
+ switch (_context34.prev = _context34.next) {
3588
3840
  case 0:
3589
- _context30.next = 2;
3841
+ _context34.next = 2;
3590
3842
  return this.getClient().post(this._channelURL() + '/stop-watching', {});
3591
3843
 
3592
3844
  case 2:
3593
- response = _context30.sent;
3845
+ response = _context34.sent;
3594
3846
 
3595
3847
  this._client.logger('info', "channel:watch() - stopped watching channel ".concat(this.cid), {
3596
3848
  tags: ['channel'],
3597
3849
  channel: this
3598
3850
  });
3599
3851
 
3600
- return _context30.abrupt("return", response);
3852
+ return _context34.abrupt("return", response);
3601
3853
 
3602
3854
  case 5:
3603
3855
  case "end":
3604
- return _context30.stop();
3856
+ return _context34.stop();
3605
3857
  }
3606
3858
  }
3607
- }, _callee30, this);
3859
+ }, _callee34, this);
3608
3860
  }));
3609
3861
 
3610
3862
  function stopWatching() {
@@ -3627,34 +3879,34 @@ var Channel = /*#__PURE__*/function () {
3627
3879
  }, {
3628
3880
  key: "getReplies",
3629
3881
  value: function () {
3630
- var _getReplies = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee31(parent_id, options, sort) {
3882
+ var _getReplies = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee35(parent_id, options, sort) {
3631
3883
  var normalizedSort, data;
3632
- return _regeneratorRuntime__default['default'].wrap(function _callee31$(_context31) {
3884
+ return _regeneratorRuntime__default['default'].wrap(function _callee35$(_context35) {
3633
3885
  while (1) {
3634
- switch (_context31.prev = _context31.next) {
3886
+ switch (_context35.prev = _context35.next) {
3635
3887
  case 0:
3636
3888
  normalizedSort = sort ? normalizeQuerySort(sort) : undefined;
3637
- _context31.next = 3;
3889
+ _context35.next = 3;
3638
3890
  return this.getClient().get(this.getClient().baseURL + "/messages/".concat(encodeURIComponent(parent_id), "/replies"), _objectSpread$a({
3639
3891
  sort: normalizedSort
3640
3892
  }, options));
3641
3893
 
3642
3894
  case 3:
3643
- data = _context31.sent;
3895
+ data = _context35.sent;
3644
3896
 
3645
3897
  // add any messages to our thread state
3646
3898
  if (data.messages) {
3647
3899
  this.state.addMessagesSorted(data.messages);
3648
3900
  }
3649
3901
 
3650
- return _context31.abrupt("return", data);
3902
+ return _context35.abrupt("return", data);
3651
3903
 
3652
3904
  case 6:
3653
3905
  case "end":
3654
- return _context31.stop();
3906
+ return _context35.stop();
3655
3907
  }
3656
3908
  }
3657
- }, _callee31, this);
3909
+ }, _callee35, this);
3658
3910
  }));
3659
3911
 
3660
3912
  function getReplies(_x33, _x34, _x35) {
@@ -3675,15 +3927,15 @@ var Channel = /*#__PURE__*/function () {
3675
3927
  }, {
3676
3928
  key: "getPinnedMessages",
3677
3929
  value: function () {
3678
- var _getPinnedMessages = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee32(options) {
3930
+ var _getPinnedMessages = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee36(options) {
3679
3931
  var sort,
3680
- _args32 = arguments;
3681
- return _regeneratorRuntime__default['default'].wrap(function _callee32$(_context32) {
3932
+ _args36 = arguments;
3933
+ return _regeneratorRuntime__default['default'].wrap(function _callee36$(_context36) {
3682
3934
  while (1) {
3683
- switch (_context32.prev = _context32.next) {
3935
+ switch (_context36.prev = _context36.next) {
3684
3936
  case 0:
3685
- sort = _args32.length > 1 && _args32[1] !== undefined ? _args32[1] : [];
3686
- _context32.next = 3;
3937
+ sort = _args36.length > 1 && _args36[1] !== undefined ? _args36[1] : [];
3938
+ _context36.next = 3;
3687
3939
  return this.getClient().get(this._channelURL() + '/pinned_messages', {
3688
3940
  payload: _objectSpread$a(_objectSpread$a({}, options), {}, {
3689
3941
  sort: normalizeQuerySort(sort)
@@ -3691,14 +3943,14 @@ var Channel = /*#__PURE__*/function () {
3691
3943
  });
3692
3944
 
3693
3945
  case 3:
3694
- return _context32.abrupt("return", _context32.sent);
3946
+ return _context36.abrupt("return", _context36.sent);
3695
3947
 
3696
3948
  case 4:
3697
3949
  case "end":
3698
- return _context32.stop();
3950
+ return _context36.stop();
3699
3951
  }
3700
3952
  }
3701
- }, _callee32, this);
3953
+ }, _callee36, this);
3702
3954
  }));
3703
3955
 
3704
3956
  function getPinnedMessages(_x36) {
@@ -3837,7 +4089,7 @@ var Channel = /*#__PURE__*/function () {
3837
4089
  * @return {Promise<QueryChannelAPIResponse<StreamChatGenerics>>} Returns a query response
3838
4090
  */
3839
4091
  function () {
3840
- var _query = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee33(options) {
4092
+ var _query = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee37(options) {
3841
4093
  var _options$messages$lim, _options$messages, _this$data6, _this$data7;
3842
4094
 
3843
4095
  var messageSetToAddToIfDoesNotExist,
@@ -3848,14 +4100,14 @@ var Channel = /*#__PURE__*/function () {
3848
4100
  _this$_initializeStat,
3849
4101
  messageSet,
3850
4102
  areCapabilitiesChanged,
3851
- _args33 = arguments;
4103
+ _args37 = arguments;
3852
4104
 
3853
- return _regeneratorRuntime__default['default'].wrap(function _callee33$(_context33) {
4105
+ return _regeneratorRuntime__default['default'].wrap(function _callee37$(_context37) {
3854
4106
  while (1) {
3855
- switch (_context33.prev = _context33.next) {
4107
+ switch (_context37.prev = _context37.next) {
3856
4108
  case 0:
3857
- messageSetToAddToIfDoesNotExist = _args33.length > 1 && _args33[1] !== undefined ? _args33[1] : 'current';
3858
- _context33.next = 3;
4109
+ messageSetToAddToIfDoesNotExist = _args37.length > 1 && _args37[1] !== undefined ? _args37[1] : 'current';
4110
+ _context37.next = 3;
3859
4111
  return this.getClient().wsPromise;
3860
4112
 
3861
4113
  case 3:
@@ -3865,14 +4117,14 @@ var Channel = /*#__PURE__*/function () {
3865
4117
  queryURL += "/".concat(encodeURIComponent(this.id));
3866
4118
  }
3867
4119
 
3868
- _context33.next = 7;
4120
+ _context37.next = 7;
3869
4121
  return this.getClient().post(queryURL + '/query', _objectSpread$a({
3870
4122
  data: this._data,
3871
4123
  state: true
3872
4124
  }, options));
3873
4125
 
3874
4126
  case 7:
3875
- state = _context33.sent;
4127
+ state = _context37.sent;
3876
4128
 
3877
4129
  // update the channel id if it was missing
3878
4130
  if (!this.id) {
@@ -3928,14 +4180,14 @@ var Channel = /*#__PURE__*/function () {
3928
4180
  isLatestMessageSet: messageSet.isLatest
3929
4181
  }
3930
4182
  });
3931
- return _context33.abrupt("return", state);
4183
+ return _context37.abrupt("return", state);
3932
4184
 
3933
4185
  case 19:
3934
4186
  case "end":
3935
- return _context33.stop();
4187
+ return _context37.stop();
3936
4188
  }
3937
4189
  }
3938
- }, _callee33, this);
4190
+ }, _callee37, this);
3939
4191
  }));
3940
4192
 
3941
4193
  function query(_x37) {
@@ -3955,28 +4207,28 @@ var Channel = /*#__PURE__*/function () {
3955
4207
  }, {
3956
4208
  key: "banUser",
3957
4209
  value: function () {
3958
- var _banUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee34(targetUserID, options) {
3959
- return _regeneratorRuntime__default['default'].wrap(function _callee34$(_context34) {
4210
+ var _banUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee38(targetUserID, options) {
4211
+ return _regeneratorRuntime__default['default'].wrap(function _callee38$(_context38) {
3960
4212
  while (1) {
3961
- switch (_context34.prev = _context34.next) {
4213
+ switch (_context38.prev = _context38.next) {
3962
4214
  case 0:
3963
4215
  this._checkInitialized();
3964
4216
 
3965
- _context34.next = 3;
4217
+ _context38.next = 3;
3966
4218
  return this.getClient().banUser(targetUserID, _objectSpread$a(_objectSpread$a({}, options), {}, {
3967
4219
  type: this.type,
3968
4220
  id: this.id
3969
4221
  }));
3970
4222
 
3971
4223
  case 3:
3972
- return _context34.abrupt("return", _context34.sent);
4224
+ return _context38.abrupt("return", _context38.sent);
3973
4225
 
3974
4226
  case 4:
3975
4227
  case "end":
3976
- return _context34.stop();
4228
+ return _context38.stop();
3977
4229
  }
3978
4230
  }
3979
- }, _callee34, this);
4231
+ }, _callee38, this);
3980
4232
  }));
3981
4233
 
3982
4234
  function banUser(_x38, _x39) {
@@ -3997,34 +4249,34 @@ var Channel = /*#__PURE__*/function () {
3997
4249
  }, {
3998
4250
  key: "hide",
3999
4251
  value: function () {
4000
- var _hide = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee35() {
4252
+ var _hide = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee39() {
4001
4253
  var userId,
4002
4254
  clearHistory,
4003
- _args35 = arguments;
4004
- return _regeneratorRuntime__default['default'].wrap(function _callee35$(_context35) {
4255
+ _args39 = arguments;
4256
+ return _regeneratorRuntime__default['default'].wrap(function _callee39$(_context39) {
4005
4257
  while (1) {
4006
- switch (_context35.prev = _context35.next) {
4258
+ switch (_context39.prev = _context39.next) {
4007
4259
  case 0:
4008
- userId = _args35.length > 0 && _args35[0] !== undefined ? _args35[0] : null;
4009
- clearHistory = _args35.length > 1 && _args35[1] !== undefined ? _args35[1] : false;
4260
+ userId = _args39.length > 0 && _args39[0] !== undefined ? _args39[0] : null;
4261
+ clearHistory = _args39.length > 1 && _args39[1] !== undefined ? _args39[1] : false;
4010
4262
 
4011
4263
  this._checkInitialized();
4012
4264
 
4013
- _context35.next = 5;
4265
+ _context39.next = 5;
4014
4266
  return this.getClient().post("".concat(this._channelURL(), "/hide"), {
4015
4267
  user_id: userId,
4016
4268
  clear_history: clearHistory
4017
4269
  });
4018
4270
 
4019
4271
  case 5:
4020
- return _context35.abrupt("return", _context35.sent);
4272
+ return _context39.abrupt("return", _context39.sent);
4021
4273
 
4022
4274
  case 6:
4023
4275
  case "end":
4024
- return _context35.stop();
4276
+ return _context39.stop();
4025
4277
  }
4026
4278
  }
4027
- }, _callee35, this);
4279
+ }, _callee39, this);
4028
4280
  }));
4029
4281
 
4030
4282
  function hide() {
@@ -4043,31 +4295,31 @@ var Channel = /*#__PURE__*/function () {
4043
4295
  }, {
4044
4296
  key: "show",
4045
4297
  value: function () {
4046
- var _show = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee36() {
4298
+ var _show = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee40() {
4047
4299
  var userId,
4048
- _args36 = arguments;
4049
- return _regeneratorRuntime__default['default'].wrap(function _callee36$(_context36) {
4300
+ _args40 = arguments;
4301
+ return _regeneratorRuntime__default['default'].wrap(function _callee40$(_context40) {
4050
4302
  while (1) {
4051
- switch (_context36.prev = _context36.next) {
4303
+ switch (_context40.prev = _context40.next) {
4052
4304
  case 0:
4053
- userId = _args36.length > 0 && _args36[0] !== undefined ? _args36[0] : null;
4305
+ userId = _args40.length > 0 && _args40[0] !== undefined ? _args40[0] : null;
4054
4306
 
4055
4307
  this._checkInitialized();
4056
4308
 
4057
- _context36.next = 4;
4309
+ _context40.next = 4;
4058
4310
  return this.getClient().post("".concat(this._channelURL(), "/show"), {
4059
4311
  user_id: userId
4060
4312
  });
4061
4313
 
4062
4314
  case 4:
4063
- return _context36.abrupt("return", _context36.sent);
4315
+ return _context40.abrupt("return", _context40.sent);
4064
4316
 
4065
4317
  case 5:
4066
4318
  case "end":
4067
- return _context36.stop();
4319
+ return _context40.stop();
4068
4320
  }
4069
4321
  }
4070
- }, _callee36, this);
4322
+ }, _callee40, this);
4071
4323
  }));
4072
4324
 
4073
4325
  function show() {
@@ -4086,28 +4338,28 @@ var Channel = /*#__PURE__*/function () {
4086
4338
  }, {
4087
4339
  key: "unbanUser",
4088
4340
  value: function () {
4089
- var _unbanUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee37(targetUserID) {
4090
- return _regeneratorRuntime__default['default'].wrap(function _callee37$(_context37) {
4341
+ var _unbanUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee41(targetUserID) {
4342
+ return _regeneratorRuntime__default['default'].wrap(function _callee41$(_context41) {
4091
4343
  while (1) {
4092
- switch (_context37.prev = _context37.next) {
4344
+ switch (_context41.prev = _context41.next) {
4093
4345
  case 0:
4094
4346
  this._checkInitialized();
4095
4347
 
4096
- _context37.next = 3;
4348
+ _context41.next = 3;
4097
4349
  return this.getClient().unbanUser(targetUserID, {
4098
4350
  type: this.type,
4099
4351
  id: this.id
4100
4352
  });
4101
4353
 
4102
4354
  case 3:
4103
- return _context37.abrupt("return", _context37.sent);
4355
+ return _context41.abrupt("return", _context41.sent);
4104
4356
 
4105
4357
  case 4:
4106
4358
  case "end":
4107
- return _context37.stop();
4359
+ return _context41.stop();
4108
4360
  }
4109
4361
  }
4110
- }, _callee37, this);
4362
+ }, _callee41, this);
4111
4363
  }));
4112
4364
 
4113
4365
  function unbanUser(_x40) {
@@ -4127,28 +4379,28 @@ var Channel = /*#__PURE__*/function () {
4127
4379
  }, {
4128
4380
  key: "shadowBan",
4129
4381
  value: function () {
4130
- var _shadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee38(targetUserID, options) {
4131
- return _regeneratorRuntime__default['default'].wrap(function _callee38$(_context38) {
4382
+ var _shadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee42(targetUserID, options) {
4383
+ return _regeneratorRuntime__default['default'].wrap(function _callee42$(_context42) {
4132
4384
  while (1) {
4133
- switch (_context38.prev = _context38.next) {
4385
+ switch (_context42.prev = _context42.next) {
4134
4386
  case 0:
4135
4387
  this._checkInitialized();
4136
4388
 
4137
- _context38.next = 3;
4389
+ _context42.next = 3;
4138
4390
  return this.getClient().shadowBan(targetUserID, _objectSpread$a(_objectSpread$a({}, options), {}, {
4139
4391
  type: this.type,
4140
4392
  id: this.id
4141
4393
  }));
4142
4394
 
4143
4395
  case 3:
4144
- return _context38.abrupt("return", _context38.sent);
4396
+ return _context42.abrupt("return", _context42.sent);
4145
4397
 
4146
4398
  case 4:
4147
4399
  case "end":
4148
- return _context38.stop();
4400
+ return _context42.stop();
4149
4401
  }
4150
4402
  }
4151
- }, _callee38, this);
4403
+ }, _callee42, this);
4152
4404
  }));
4153
4405
 
4154
4406
  function shadowBan(_x41, _x42) {
@@ -4167,28 +4419,28 @@ var Channel = /*#__PURE__*/function () {
4167
4419
  }, {
4168
4420
  key: "removeShadowBan",
4169
4421
  value: function () {
4170
- var _removeShadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee39(targetUserID) {
4171
- return _regeneratorRuntime__default['default'].wrap(function _callee39$(_context39) {
4422
+ var _removeShadowBan = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee43(targetUserID) {
4423
+ return _regeneratorRuntime__default['default'].wrap(function _callee43$(_context43) {
4172
4424
  while (1) {
4173
- switch (_context39.prev = _context39.next) {
4425
+ switch (_context43.prev = _context43.next) {
4174
4426
  case 0:
4175
4427
  this._checkInitialized();
4176
4428
 
4177
- _context39.next = 3;
4429
+ _context43.next = 3;
4178
4430
  return this.getClient().removeShadowBan(targetUserID, {
4179
4431
  type: this.type,
4180
4432
  id: this.id
4181
4433
  });
4182
4434
 
4183
4435
  case 3:
4184
- return _context39.abrupt("return", _context39.sent);
4436
+ return _context43.abrupt("return", _context43.sent);
4185
4437
 
4186
4438
  case 4:
4187
4439
  case "end":
4188
- return _context39.stop();
4440
+ return _context43.stop();
4189
4441
  }
4190
4442
  }
4191
- }, _callee39, this);
4443
+ }, _callee43, this);
4192
4444
  }));
4193
4445
 
4194
4446
  function removeShadowBan(_x43) {
@@ -4207,23 +4459,23 @@ var Channel = /*#__PURE__*/function () {
4207
4459
  }, {
4208
4460
  key: "createCall",
4209
4461
  value: function () {
4210
- var _createCall = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee40(options) {
4211
- return _regeneratorRuntime__default['default'].wrap(function _callee40$(_context40) {
4462
+ var _createCall = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee44(options) {
4463
+ return _regeneratorRuntime__default['default'].wrap(function _callee44$(_context44) {
4212
4464
  while (1) {
4213
- switch (_context40.prev = _context40.next) {
4465
+ switch (_context44.prev = _context44.next) {
4214
4466
  case 0:
4215
- _context40.next = 2;
4467
+ _context44.next = 2;
4216
4468
  return this.getClient().post(this._channelURL() + '/call', options);
4217
4469
 
4218
4470
  case 2:
4219
- return _context40.abrupt("return", _context40.sent);
4471
+ return _context44.abrupt("return", _context44.sent);
4220
4472
 
4221
4473
  case 3:
4222
4474
  case "end":
4223
- return _context40.stop();
4475
+ return _context44.stop();
4224
4476
  }
4225
4477
  }
4226
- }, _callee40, this);
4478
+ }, _callee44, this);
4227
4479
  }));
4228
4480
 
4229
4481
  function createCall(_x44) {
@@ -4242,23 +4494,23 @@ var Channel = /*#__PURE__*/function () {
4242
4494
  }, {
4243
4495
  key: "vote",
4244
4496
  value: function () {
4245
- var _vote2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee41(messageId, pollId, _vote) {
4246
- return _regeneratorRuntime__default['default'].wrap(function _callee41$(_context41) {
4497
+ var _vote2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee45(messageId, pollId, _vote) {
4498
+ return _regeneratorRuntime__default['default'].wrap(function _callee45$(_context45) {
4247
4499
  while (1) {
4248
- switch (_context41.prev = _context41.next) {
4500
+ switch (_context45.prev = _context45.next) {
4249
4501
  case 0:
4250
- _context41.next = 2;
4502
+ _context45.next = 2;
4251
4503
  return this.getClient().castPollVote(messageId, pollId, _vote);
4252
4504
 
4253
4505
  case 2:
4254
- return _context41.abrupt("return", _context41.sent);
4506
+ return _context45.abrupt("return", _context45.sent);
4255
4507
 
4256
4508
  case 3:
4257
4509
  case "end":
4258
- return _context41.stop();
4510
+ return _context45.stop();
4259
4511
  }
4260
4512
  }
4261
- }, _callee41, this);
4513
+ }, _callee45, this);
4262
4514
  }));
4263
4515
 
4264
4516
  function vote(_x45, _x46, _x47) {
@@ -4270,23 +4522,23 @@ var Channel = /*#__PURE__*/function () {
4270
4522
  }, {
4271
4523
  key: "removeVote",
4272
4524
  value: function () {
4273
- var _removeVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee42(messageId, pollId, voteId) {
4274
- return _regeneratorRuntime__default['default'].wrap(function _callee42$(_context42) {
4525
+ var _removeVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee46(messageId, pollId, voteId) {
4526
+ return _regeneratorRuntime__default['default'].wrap(function _callee46$(_context46) {
4275
4527
  while (1) {
4276
- switch (_context42.prev = _context42.next) {
4528
+ switch (_context46.prev = _context46.next) {
4277
4529
  case 0:
4278
- _context42.next = 2;
4530
+ _context46.next = 2;
4279
4531
  return this.getClient().removePollVote(messageId, pollId, voteId);
4280
4532
 
4281
4533
  case 2:
4282
- return _context42.abrupt("return", _context42.sent);
4534
+ return _context46.abrupt("return", _context46.sent);
4283
4535
 
4284
4536
  case 3:
4285
4537
  case "end":
4286
- return _context42.stop();
4538
+ return _context46.stop();
4287
4539
  }
4288
4540
  }
4289
- }, _callee42, this);
4541
+ }, _callee46, this);
4290
4542
  }));
4291
4543
 
4292
4544
  function removeVote(_x48, _x49, _x50) {
@@ -8252,39 +8504,157 @@ var Moderation = /*#__PURE__*/function () {
8252
8504
  return getConfig;
8253
8505
  }()
8254
8506
  }, {
8255
- key: "submitAction",
8507
+ key: "deleteConfig",
8256
8508
  value: function () {
8257
- var _submitAction = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee10(actionType, itemID) {
8258
- var options,
8259
- _args10 = arguments;
8509
+ var _deleteConfig = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee10(key) {
8260
8510
  return _regeneratorRuntime__default['default'].wrap(function _callee10$(_context10) {
8261
8511
  while (1) {
8262
8512
  switch (_context10.prev = _context10.next) {
8263
8513
  case 0:
8264
- options = _args10.length > 2 && _args10[2] !== undefined ? _args10[2] : {};
8265
- _context10.next = 3;
8514
+ _context10.next = 2;
8515
+ return this.client.delete(this.client.baseURL + '/api/v2/moderation/config/' + key);
8516
+
8517
+ case 2:
8518
+ return _context10.abrupt("return", _context10.sent);
8519
+
8520
+ case 3:
8521
+ case "end":
8522
+ return _context10.stop();
8523
+ }
8524
+ }
8525
+ }, _callee10, this);
8526
+ }));
8527
+
8528
+ function deleteConfig(_x14) {
8529
+ return _deleteConfig.apply(this, arguments);
8530
+ }
8531
+
8532
+ return deleteConfig;
8533
+ }()
8534
+ /**
8535
+ * Query moderation configs
8536
+ * @param {Object} filterConditions Filter conditions for querying moderation configs
8537
+ * @param {Object} sort Sort conditions for querying moderation configs
8538
+ * @param {Object} options Additional options for querying moderation configs
8539
+ */
8540
+
8541
+ }, {
8542
+ key: "queryConfigs",
8543
+ value: function () {
8544
+ var _queryConfigs = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee11(filterConditions, sort) {
8545
+ var options,
8546
+ _args11 = arguments;
8547
+ return _regeneratorRuntime__default['default'].wrap(function _callee11$(_context11) {
8548
+ while (1) {
8549
+ switch (_context11.prev = _context11.next) {
8550
+ case 0:
8551
+ options = _args11.length > 2 && _args11[2] !== undefined ? _args11[2] : {};
8552
+ _context11.next = 3;
8553
+ return this.client.post(this.client.baseURL + '/api/v2/moderation/configs', _objectSpread$3({
8554
+ filter: filterConditions,
8555
+ sort: sort
8556
+ }, options));
8557
+
8558
+ case 3:
8559
+ return _context11.abrupt("return", _context11.sent);
8560
+
8561
+ case 4:
8562
+ case "end":
8563
+ return _context11.stop();
8564
+ }
8565
+ }
8566
+ }, _callee11, this);
8567
+ }));
8568
+
8569
+ function queryConfigs(_x15, _x16) {
8570
+ return _queryConfigs.apply(this, arguments);
8571
+ }
8572
+
8573
+ return queryConfigs;
8574
+ }()
8575
+ }, {
8576
+ key: "submitAction",
8577
+ value: function () {
8578
+ var _submitAction = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee12(actionType, itemID) {
8579
+ var options,
8580
+ _args12 = arguments;
8581
+ return _regeneratorRuntime__default['default'].wrap(function _callee12$(_context12) {
8582
+ while (1) {
8583
+ switch (_context12.prev = _context12.next) {
8584
+ case 0:
8585
+ options = _args12.length > 2 && _args12[2] !== undefined ? _args12[2] : {};
8586
+ _context12.next = 3;
8266
8587
  return this.client.post(this.client.baseURL + '/api/v2/moderation/submit_action', _objectSpread$3({
8267
8588
  action_type: actionType,
8268
8589
  item_id: itemID
8269
8590
  }, options));
8270
8591
 
8271
8592
  case 3:
8272
- return _context10.abrupt("return", _context10.sent);
8593
+ return _context12.abrupt("return", _context12.sent);
8273
8594
 
8274
8595
  case 4:
8275
8596
  case "end":
8276
- return _context10.stop();
8597
+ return _context12.stop();
8277
8598
  }
8278
8599
  }
8279
- }, _callee10, this);
8600
+ }, _callee12, this);
8280
8601
  }));
8281
8602
 
8282
- function submitAction(_x14, _x15) {
8603
+ function submitAction(_x17, _x18) {
8283
8604
  return _submitAction.apply(this, arguments);
8284
8605
  }
8285
8606
 
8286
8607
  return submitAction;
8287
8608
  }()
8609
+ /**
8610
+ *
8611
+ * @param {string} entityType string Type of entity to be checked E.g., stream:user, stream:chat:v1:message, or any custom string
8612
+ * @param {string} entityID string ID of the entity to be checked. This is mainly for tracking purposes
8613
+ * @param {string} entityCreatorID string ID of the entity creator
8614
+ * @param {object} moderationPayload object Content to be checked for moderation. E.g., { texts: ['text1', 'text2'], images: ['image1', 'image2']}
8615
+ * @param {Array} moderationPayload.texts array Array of texts to be checked for moderation
8616
+ * @param {Array} moderationPayload.images array Array of images to be checked for moderation
8617
+ * @param {Array} moderationPayload.videos array Array of videos to be checked for moderation
8618
+ * @param configKey
8619
+ * @param options
8620
+ * @returns
8621
+ */
8622
+
8623
+ }, {
8624
+ key: "check",
8625
+ value: function () {
8626
+ var _check = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee13(entityType, entityID, entityCreatorID, moderationPayload, configKey, options) {
8627
+ return _regeneratorRuntime__default['default'].wrap(function _callee13$(_context13) {
8628
+ while (1) {
8629
+ switch (_context13.prev = _context13.next) {
8630
+ case 0:
8631
+ _context13.next = 2;
8632
+ return this.client.post(this.client.baseURL + "/api/v2/moderation/check", {
8633
+ entity_type: entityType,
8634
+ entity_id: entityID,
8635
+ entity_creator_id: entityCreatorID,
8636
+ moderation_payload: moderationPayload,
8637
+ config_key: configKey,
8638
+ options: options
8639
+ });
8640
+
8641
+ case 2:
8642
+ return _context13.abrupt("return", _context13.sent);
8643
+
8644
+ case 3:
8645
+ case "end":
8646
+ return _context13.stop();
8647
+ }
8648
+ }
8649
+ }, _callee13, this);
8650
+ }));
8651
+
8652
+ function check(_x19, _x20, _x21, _x22, _x23, _x24) {
8653
+ return _check.apply(this, arguments);
8654
+ }
8655
+
8656
+ return check;
8657
+ }()
8288
8658
  }]);
8289
8659
 
8290
8660
  return Moderation;
@@ -14245,7 +14615,7 @@ var StreamChat = /*#__PURE__*/function () {
14245
14615
  }, {
14246
14616
  key: "getUserAgent",
14247
14617
  value: function getUserAgent() {
14248
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.42.0");
14618
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.43.0");
14249
14619
  }
14250
14620
  }, {
14251
14621
  key: "setUserAgent",