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