Skip to content

@ecp.eth/sdk


@ecp.eth/sdk / indexer/webhooks / CommentModerationStatusUpdatedEvent

Type Alias: CommentModerationStatusUpdatedEvent

type CommentModerationStatusUpdatedEvent = {
  data: {
     comment: {
        id: `0x${string}`;
        moderationStatus: "approved" | "pending" | "rejected";
        moderationStatusChangedAt: Date;
     };
  };
  event: "comment:moderation:status:updated";
  uid: string;
  version: 1;
};

Defined in: packages/sdk/src/indexer/webhooks/schemas/comment.ts:278

An event sent to webhook when a comment moderation status is updated.

Type declaration

data

data: {
  comment: {
     id: `0x${string}`;
     moderationStatus: "approved" | "pending" | "rejected";
     moderationStatusChangedAt: Date;
  };
};

Data of the event

data.comment

comment: {
  id: `0x${string}`;
  moderationStatus: "approved" | "pending" | "rejected";
  moderationStatusChangedAt: Date;
};

Updated comment data

data.comment.id

id: `0x${string}` = HexSchema;

ID of the comment

data.comment.moderationStatus

moderationStatus: "approved" | "pending" | "rejected" = CommentModerationStatusSchema;

Moderation status of the comment

data.comment.moderationStatusChangedAt

moderationStatusChangedAt: Date = ISO8601DateSchema;

Moderation status changed at date. On wire it is a ISO 8601 date and time string

event

event: "comment:moderation:status:updated";

Event type

uid

uid: string;

Unique identifier for the event. You can use it to deduplicate events. In case of retry attempts the id is the same.

version

version: 1;

Version of the event