App Notification Object Documentation
The App Notification object represents an in-app notification sent to users within Replyke. Notifications can be triggered by various actions such as comments, mentions, upvotes, and follows.
Properties
Property | Type | Description |
---|---|---|
id | string | Unique identifier for the notification (UUID). |
userId | string | The recipient’s user ID. |
type | AppNotificationType | The type of notification (e.g., comment, mention, upvote, etc.). |
isRead | boolean | Indicates whether the notification has been read. |
metadata | Record<string, any> | undefined | Additional data specific to the notification type. |
title | string | undefined | Optional title for the notification. |
content | string | undefined | Optional content for the notification. |
createdAt | Date | Timestamp when the notification was created. |
Notification Types
Type | Action | Description |
---|---|---|
entity-comment | open-comment | A user commented on an entity. |
comment-reply | open-comment | A user replied to a comment. |
entity-mention | open-entity | A user was mentioned in an entity. |
comment-mention | open-comment | A user was mentioned in a comment. |
entity-upvote | open-entity | A user upvoted an entity. |
comment-upvote | open-comment | A user upvoted a comment. |
new-follow | open-profile | A user followed another user. |
Metadata Fields by Notification Type
Entity Comment Notification
Field | Type | Description |
---|---|---|
entityId | string | ID of the entity where the comment was posted. |
entityShortId | string | Shortened ID for sharing. |
entityTitle | string | null | Title of the entity. |
entityContent | string | null | Content of the entity. |
commentId | string | ID of the comment. |
commentContent | string | null | Content of the comment. |
initiatorId | string | ID of the user who made the comment. |
initiatorName | string | null | Name of the user who commented. |
initiatorUsername | string | null | Username of the user. |
initiatorAvatar | string | null | Avatar of the user. |
Comment Reply Notification
Field | Type | Description |
---|---|---|
entityId | string | ID of the entity where the reply was posted. |
entityShortId | string | Shortened ID for sharing. |
entityTitle | string | null | Title of the entity. |
entityContent | string | null | Content of the entity. |
commentId | string | ID of the original comment. |
commentContent | string | null | Content of the original comment. |
replyId | string | ID of the reply comment. |
replyContent | string | null | Content of the reply. |
initiatorId | string | ID of the user who replied. |
initiatorName | string | null | Name of the user who replied. |
initiatorUsername | string | null | Username of the user who replied. |
initiatorAvatar | string | null | Avatar of the user who replied. |
Entity Mention Notification
Field | Type | Description |
---|---|---|
entityId | string | ID of the mentioned entity. |
entityShortId | string | Shortened ID for sharing. |
entityTitle | string | null | Title of the entity. |
entityContent | string | null | Content of the entity. |
initiatorId | string | ID of the user who mentioned. |
initiatorName | string | null | Name of the user who mentioned. |
initiatorUsername | string | null | Username of the user who mentioned. |
initiatorAvatar | string | null | Avatar of the user who mentioned. |
Comment Mention Notification
Field | Type | Description |
---|---|---|
entityId | string | ID of the mentioned entity. |
entityShortId | string | Shortened ID for sharing. |
entityTitle | string | null | Title of the entity. |
entityContent | string | null | Content of the entity. |
commentId | string | ID of the mentioned comment. |
commentContent | string | null | Content of the mentioned comment. |
initiatorId | string | ID of the user who mentioned. |
initiatorName | string | null | Name of the user who mentioned. |
initiatorUsername | string | null | Username of the user who mentioned. |
initiatorAvatar | string | null | Avatar of the user who mentioned. |
Entity Upvote Notification
Field | Type | Description |
---|---|---|
entityId | string | ID of the upvoted entity. |
entityShortId | string | Shortened ID for sharing. |
entityTitle | string | null | Title of the entity. |
entityContent | string | null | Content of the entity. |
initiatorId | string | ID of the user who upvoted. |
initiatorName | string | null | Name of the user who upvoted. |
initiatorUsername | string | null | Username of the user who upvoted. |
initiatorAvatar | string | null | Avatar of the user who upvoted. |
Comment Upvote Notification
Field | Type | Description |
---|---|---|
entityId | string | ID of the entity containing the comment. |
entityShortId | string | Shortened ID for sharing. |
entityTitle | string | null | Title of the entity. |
entityContent | string | null | Content of the entity. |
commentId | string | ID of the upvoted comment. |
commentContent | string | null | Content of the upvoted comment. |
initiatorId | string | ID of the user who upvoted. |
initiatorName | string | null | Name of the user who upvoted. |
initiatorUsername | string | null | Username of the user who upvoted. |
initiatorAvatar | string | null | Avatar of the user who upvoted. |
New Follow Notification
Field | Type | Description |
---|---|---|
initiatorId | string | ID of the user who followed. |
initiatorName | string | null | Name of the user who followed. |
initiatorUsername | string | null | Username of the user who followed. |
initiatorAvatar | string | null | Avatar of the user who followed. |
Integration Flexibility
The App Notification object is designed to support real-time and historical notifications, allowing users to track relevant interactions within Replyke.