stream-chat 8.47.1 → 8.48.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.
@@ -8764,6 +8764,88 @@ var Moderation = /*#__PURE__*/function () {
8764
8764
 
8765
8765
  return check;
8766
8766
  }()
8767
+ /**
8768
+ *
8769
+ * @param {string} entityType string Type of entity to be checked E.g., stream:user, stream:chat:v1:message, or any custom string
8770
+ * @param {string} entityID string ID of the entity to be checked. This is mainly for tracking purposes
8771
+ * @param {string} entityCreatorID string ID of the entity creator
8772
+ * @param {object} moderationPayload object Content to be checked for moderation. E.g., { texts: ['text1', 'text2'], images: ['image1', 'image2']}
8773
+ * @param {Array} moderationPayload.texts array Array of texts to be checked for moderation
8774
+ * @param {Array} moderationPayload.images array Array of images to be checked for moderation
8775
+ * @param {Array} moderationPayload.videos array Array of videos to be checked for moderation
8776
+ * @param {Array<CustomCheckFlag>} flags Array of CustomCheckFlag to be passed to flag the entity
8777
+ * @returns
8778
+ */
8779
+
8780
+ }, {
8781
+ key: "addCustomFlags",
8782
+ value: function () {
8783
+ var _addCustomFlags = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(entityType, entityID, entityCreatorID, moderationPayload, flags) {
8784
+ return _regeneratorRuntime.wrap(function _callee14$(_context14) {
8785
+ while (1) {
8786
+ switch (_context14.prev = _context14.next) {
8787
+ case 0:
8788
+ _context14.next = 2;
8789
+ return this.client.post(this.client.baseURL + "/api/v2/moderation/custom_check", {
8790
+ entity_type: entityType,
8791
+ entity_id: entityID,
8792
+ entity_creator_id: entityCreatorID,
8793
+ moderation_payload: moderationPayload,
8794
+ flags: flags
8795
+ });
8796
+
8797
+ case 2:
8798
+ return _context14.abrupt("return", _context14.sent);
8799
+
8800
+ case 3:
8801
+ case "end":
8802
+ return _context14.stop();
8803
+ }
8804
+ }
8805
+ }, _callee14, this);
8806
+ }));
8807
+
8808
+ function addCustomFlags(_x25, _x26, _x27, _x28, _x29) {
8809
+ return _addCustomFlags.apply(this, arguments);
8810
+ }
8811
+
8812
+ return addCustomFlags;
8813
+ }()
8814
+ /**
8815
+ * Add custom flags to a message
8816
+ * @param {string} messageID Message ID to be flagged
8817
+ * @param {Array<CustomCheckFlag>} flags Array of CustomCheckFlag to be passed to flag the message
8818
+ * @returns
8819
+ */
8820
+
8821
+ }, {
8822
+ key: "addCustomMessageFlags",
8823
+ value: function () {
8824
+ var _addCustomMessageFlags = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(messageID, flags) {
8825
+ return _regeneratorRuntime.wrap(function _callee15$(_context15) {
8826
+ while (1) {
8827
+ switch (_context15.prev = _context15.next) {
8828
+ case 0:
8829
+ _context15.next = 2;
8830
+ return this.addCustomFlags(MODERATION_ENTITY_TYPES.message, messageID, '', {}, flags);
8831
+
8832
+ case 2:
8833
+ return _context15.abrupt("return", _context15.sent);
8834
+
8835
+ case 3:
8836
+ case "end":
8837
+ return _context15.stop();
8838
+ }
8839
+ }
8840
+ }, _callee15, this);
8841
+ }));
8842
+
8843
+ function addCustomMessageFlags(_x30, _x31) {
8844
+ return _addCustomMessageFlags.apply(this, arguments);
8845
+ }
8846
+
8847
+ return addCustomMessageFlags;
8848
+ }()
8767
8849
  }]);
8768
8850
 
8769
8851
  return Moderation;
@@ -14751,7 +14833,7 @@ var StreamChat = /*#__PURE__*/function () {
14751
14833
  }, {
14752
14834
  key: "getUserAgent",
14753
14835
  value: function getUserAgent() {
14754
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.47.1");
14836
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.48.0");
14755
14837
  }
14756
14838
  }, {
14757
14839
  key: "setUserAgent",