@cometchat/chat-sdk-javascript 4.1.0 → 4.1.1

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/CometChat.d.ts CHANGED
@@ -1017,6 +1017,7 @@ export class CometChat {
1017
1017
  };
1018
1018
  static GoalType: typeof GoalType;
1019
1019
  static AttachmentType: typeof AttachmentType;
1020
+ static ModerationStatus: typeof ModerationStatus;
1020
1021
  static CometChatException: typeof CometChatException;
1021
1022
  static TextMessage: typeof TextMessage;
1022
1023
  static MediaMessage: typeof MediaMessage;
@@ -2473,6 +2474,13 @@ export class MediaMessage extends BaseMessage implements Message {
2473
2474
  * Set the tags for the message.
2474
2475
  */
2475
2476
  setTags(tags: Array<String>): void;
2477
+ /**
2478
+ * Gets the moderation status of the message.
2479
+ * @description If the message is not moderated, it returns "unmoderated".
2480
+ * If the message is moderated, it returns the status of the moderation.
2481
+ * @returns {ModerationStatus}
2482
+ */
2483
+ getModerationStatus(): ModerationStatus;
2476
2484
  }
2477
2485
 
2478
2486
  /**
@@ -2864,6 +2872,13 @@ export class TextMessage extends BaseMessage implements Message {
2864
2872
  * Set the tags for the message.
2865
2873
  */
2866
2874
  setTags(tags: Array<String>): void;
2875
+ /**
2876
+ * Gets the moderation status of the message.
2877
+ * @description If the message is not moderated, it returns "unmoderated".
2878
+ * If the message is moderated, it returns the status of the moderation.
2879
+ * @returns {ModerationStatus}
2880
+ */
2881
+ getModerationStatus(): ModerationStatus;
2867
2882
  }
2868
2883
 
2869
2884
  export const constants: {
@@ -3937,6 +3952,12 @@ export enum AttachmentType {
3937
3952
  AUDIO = "audio",
3938
3953
  FILE = "file"
3939
3954
  }
3955
+ export enum ModerationStatus {
3956
+ PENDING = "pending",
3957
+ APPROVED = "approved",
3958
+ DISAPPROVED = "disapproved",
3959
+ UNMODERATED = "unmoderated"
3960
+ }
3940
3961
  export const AI_ASSISTANT_EVENTS: {
3941
3962
  RUN_STARTED: string;
3942
3963
  RUN_FINISHED: string;
@@ -4211,6 +4232,10 @@ export class MessageListener {
4211
4232
  * This event is triggered when a message is read by all members in a group.
4212
4233
  */
4213
4234
  onMessagesReadByAll?: Function;
4235
+ /**
4236
+ * This event is triggered when a message is moderated.
4237
+ */
4238
+ onMessageModerated?: Function;
4214
4239
  /**
4215
4240
  * This event is triggered when an AI tool result is received.
4216
4241
  */