Post
Key | Type | Description | Optional |
---|---|---|---|
id | string | Unique identifier for the post. | |
attachments | Attachment[] | List of attachments associated with the post. | |
commentsCount | number | Number of comments on the post. | |
communityId | number | ID of the community where the post was created. | |
createdAt | number | Timestamp when the post was created. | |
heading | string | Heading or title of the post. | |
isEdited | boolean | Whether the post has been edited. | |
isLiked | boolean | Whether the post is liked by the current user. | |
isPinned | boolean | Whether the post is pinned in the community. | |
isRepost | boolean | Whether the post is a repost of another post. | |
isRepostedByUser | boolean | Whether the post has been reposted by the current user. | |
isSaved | boolean | Whether the post is saved by the user. | |
likesCount | number | Number of likes on the post. | |
menuItems | MenuItem[] | Menu items available for actions on the post. | |
repostCount | number | Number of reposts of the post. | |
tempId | null or string | Temporary ID for the post used during creation (before persisting). | ✔️ |
text | string | Text content of the post. | |
topics | string[] | Topics or tags associated with the post. | |
updatedAt | number | Timestamp when the post was last updated. | |
userId | string | ID of the user who created the post. | |
uuid | string | Universally unique identifier (UUID) for the post. | |
replies | Reply[] | List of replies to the post. | ✔️ |
commentIds | string[] | List of comment IDs associated with the post. | ✔️ |
isAnonymous | boolean | true if the post is anonymous, false otherwise. | ✔ |
isHidden | boolean | true if the post is hidden | ✔ |
Attachment
Key | Type | Description | Optional |
---|---|---|---|
attachmentMeta | AttachmentMeta | Metadata associated with the attachment. | |
attachmentType | number | Type of the attachment (e.g., image, video, etc.). |
Attachment Meta
Key | Type | Description | Optional |
---|---|---|---|
entityId | string | Identifier for the entity related to the attachment. | ✔️ |
format | string | Format of the attachment (e.g., image/jpeg, video/mp4). | ✔️ |
name | string | Name of the attachment. | ✔️ |
ogTags | OgTag | Open Graph tags associated with the attachment. | ✔️ |
size | number | Size of the attachment in bytes. | ✔️ |
url | string | URL to access the attachment. | ✔️ |
duration | number | Duration of the attachment if it’s a video or audio file (in seconds). | ✔️ |
coverImageUrl | string | URL of the cover image for the attachment (if applicable). | ✔️ |
title | string | Title of the attachment (if it contains a document or media with title). | ✔️ |
body | string | Body or content description of the attachment. | ✔️ |
pollQuestion | string | Question text if the attachment is a poll. | ✔️ |
expiryTime | number | Expiry timestamp for the poll. | ✔️ |
options | string[] | List of options available for the poll. | ✔️ |
multipleSelectState | PollMultipleSelectState | Poll multiple select state (if it's a poll with multiple selections). | ✔️ |
pollType | PollType | Type of the poll. | ✔️ |
multipleSelectNumber | number | Number of allowed selections in a multiple-select poll. | ✔️ |
isAnonymous | boolean | Whether the poll is anonymous. | ✔️ |
allowAddOption | boolean | Whether users can add options to the poll. | ✔️ |
thumbnailUrl | string | URL of the thumbnail for the attachment (if available). | ✔️ |
meta | Record<string, any> or null | Any additional metadata related to the attachment. | ✔️ |
pageCount | number | Number of pages (if the attachment is a document). | ✔️ |
PollMultipleSelectState
enum PollMultipleSelectState {
EXACTLY = "exactly",
AT_MAX = "at_max",
AT_LEAST = "at_least",
}
PollType
enum PollType {
INSTANT = "instant",
DEFERRED = "deferred",
}