Skip to content

Type Alias: SearchItem

ts
type SearchItem = 
  | {
  banned_from_community: boolean;
  comment: {
     ap_id: string;
     child_count: number;
     content: string;
     creator_id: number;
     deleted: boolean;
     distinguished: boolean;
     downvotes: number;
     id: number;
     language_id: number;
     local: boolean;
     path: string;
     post_id: number;
     published_at: string;
     removed: boolean;
     score: number;
     updated_at?: string;
     upvotes: number;
  };
  community: {
     ap_id: string;
     banner?: string;
     comments: number;
     deleted: boolean;
     icon?: string;
     id: number;
     local: boolean;
     name: string;
     nsfw: boolean;
     posting_restricted_to_mods: boolean;
     posts: number;
     published_at: string;
     removed: boolean;
     sidebar?: string;
     subscribers: number;
     subscribers_local: number;
     summary?: string;
     title: string;
     updated_at?: string;
     users_active_day: number;
     users_active_half_year: number;
     users_active_month: number;
     users_active_week: number;
     visibility:   | "public"
        | "unlisted"
        | "local_only_public"
        | "local_only_private"
        | "private";
  };
  creator: {
     ap_id: string;
     avatar?: string;
     banner?: string;
     bio?: string;
     bot_account: boolean;
     comment_count: number;
     deleted: boolean;
     display_name?: string;
     id: number;
     local: boolean;
     name: string;
     post_count: number;
     published_at: string;
  };
  creator_banned_from_community: boolean;
  creator_is_admin: boolean;
  creator_is_moderator: boolean;
  my_vote?: number;
  post: {
     alt_text?: string;
     ap_id: string;
     body?: string;
     comments: number;
     community_id: number;
     creator_id: number;
     deleted: boolean;
     downvotes: number;
     embed_description?: string;
     embed_title?: string;
     featured_community: boolean;
     featured_local: boolean;
     id: number;
     language_id: number;
     local: boolean;
     locked: boolean;
     name: string;
     newest_comment_time_at?: string;
     nsfw: boolean;
     published_at: string;
     removed: boolean;
     score: number;
     thumbnail_url?: string;
     updated_at?: string;
     upvotes: number;
     url?: string;
     url_content_type?: string;
  };
  saved: boolean;
  subscribed: "Subscribed" | "NotSubscribed" | "Pending" | "ApprovalRequired";
}
  | {
  banned_from_community: boolean;
  community: {
     ap_id: string;
     banner?: string;
     comments: number;
     deleted: boolean;
     icon?: string;
     id: number;
     local: boolean;
     name: string;
     nsfw: boolean;
     posting_restricted_to_mods: boolean;
     posts: number;
     published_at: string;
     removed: boolean;
     sidebar?: string;
     subscribers: number;
     subscribers_local: number;
     summary?: string;
     title: string;
     updated_at?: string;
     users_active_day: number;
     users_active_half_year: number;
     users_active_month: number;
     users_active_week: number;
     visibility:   | "public"
        | "unlisted"
        | "local_only_public"
        | "local_only_private"
        | "private";
  };
  creator: {
     ap_id: string;
     avatar?: string;
     banner?: string;
     bio?: string;
     bot_account: boolean;
     comment_count: number;
     deleted: boolean;
     display_name?: string;
     id: number;
     local: boolean;
     name: string;
     post_count: number;
     published_at: string;
  };
  creator_banned_from_community: boolean;
  creator_blocked: boolean;
  creator_is_admin: boolean;
  creator_is_moderator: boolean;
  hidden: boolean;
  my_vote?: number;
  notifications: "replies_and_mentions" | "mute" | "all_comments";
  post: {
     alt_text?: string;
     ap_id: string;
     body?: string;
     comments: number;
     community_id: number;
     creator_id: number;
     deleted: boolean;
     downvotes: number;
     embed_description?: string;
     embed_title?: string;
     featured_community: boolean;
     featured_local: boolean;
     id: number;
     language_id: number;
     local: boolean;
     locked: boolean;
     name: string;
     newest_comment_time_at?: string;
     nsfw: boolean;
     published_at: string;
     removed: boolean;
     score: number;
     thumbnail_url?: string;
     updated_at?: string;
     upvotes: number;
     url?: string;
     url_content_type?: string;
  };
  read: boolean;
  read_comments_at?: string;
  saved: boolean;
  subscribed: "Subscribed" | "NotSubscribed" | "Pending" | "ApprovalRequired";
  tags: object[];
  unread_comments: number;
}
  | {
  is_admin: boolean;
  person: {
     ap_id: string;
     avatar?: string;
     banner?: string;
     bio?: string;
     bot_account: boolean;
     comment_count: number;
     deleted: boolean;
     display_name?: string;
     id: number;
     local: boolean;
     name: string;
     post_count: number;
     published_at: string;
  };
}
  | {
  blocked: boolean;
  community: {
     ap_id: string;
     banner?: string;
     comments: number;
     deleted: boolean;
     icon?: string;
     id: number;
     local: boolean;
     name: string;
     nsfw: boolean;
     posting_restricted_to_mods: boolean;
     posts: number;
     published_at: string;
     removed: boolean;
     sidebar?: string;
     subscribers: number;
     subscribers_local: number;
     summary?: string;
     title: string;
     updated_at?: string;
     users_active_day: number;
     users_active_half_year: number;
     users_active_month: number;
     users_active_week: number;
     visibility:   | "public"
        | "unlisted"
        | "local_only_public"
        | "local_only_private"
        | "private";
  };
  notifications:   | "all_posts_and_comments"
     | "all_posts"
     | "replies_and_mentions"
     | "mute";
  subscribed: "Subscribed" | "NotSubscribed" | "Pending" | "ApprovalRequired";
};

Defined in: src/types/index.ts:126

Union Members

Type Literal

ts
{
  banned_from_community: boolean;
  comment: {
     ap_id: string;
     child_count: number;
     content: string;
     creator_id: number;
     deleted: boolean;
     distinguished: boolean;
     downvotes: number;
     id: number;
     language_id: number;
     local: boolean;
     path: string;
     post_id: number;
     published_at: string;
     removed: boolean;
     score: number;
     updated_at?: string;
     upvotes: number;
  };
  community: {
     ap_id: string;
     banner?: string;
     comments: number;
     deleted: boolean;
     icon?: string;
     id: number;
     local: boolean;
     name: string;
     nsfw: boolean;
     posting_restricted_to_mods: boolean;
     posts: number;
     published_at: string;
     removed: boolean;
     sidebar?: string;
     subscribers: number;
     subscribers_local: number;
     summary?: string;
     title: string;
     updated_at?: string;
     users_active_day: number;
     users_active_half_year: number;
     users_active_month: number;
     users_active_week: number;
     visibility:   | "public"
        | "unlisted"
        | "local_only_public"
        | "local_only_private"
        | "private";
  };
  creator: {
     ap_id: string;
     avatar?: string;
     banner?: string;
     bio?: string;
     bot_account: boolean;
     comment_count: number;
     deleted: boolean;
     display_name?: string;
     id: number;
     local: boolean;
     name: string;
     post_count: number;
     published_at: string;
  };
  creator_banned_from_community: boolean;
  creator_is_admin: boolean;
  creator_is_moderator: boolean;
  my_vote?: number;
  post: {
     alt_text?: string;
     ap_id: string;
     body?: string;
     comments: number;
     community_id: number;
     creator_id: number;
     deleted: boolean;
     downvotes: number;
     embed_description?: string;
     embed_title?: string;
     featured_community: boolean;
     featured_local: boolean;
     id: number;
     language_id: number;
     local: boolean;
     locked: boolean;
     name: string;
     newest_comment_time_at?: string;
     nsfw: boolean;
     published_at: string;
     removed: boolean;
     score: number;
     thumbnail_url?: string;
     updated_at?: string;
     upvotes: number;
     url?: string;
     url_content_type?: string;
  };
  saved: boolean;
  subscribed: "Subscribed" | "NotSubscribed" | "Pending" | "ApprovalRequired";
}

Type Literal

ts
{
  banned_from_community: boolean;
  community: {
     ap_id: string;
     banner?: string;
     comments: number;
     deleted: boolean;
     icon?: string;
     id: number;
     local: boolean;
     name: string;
     nsfw: boolean;
     posting_restricted_to_mods: boolean;
     posts: number;
     published_at: string;
     removed: boolean;
     sidebar?: string;
     subscribers: number;
     subscribers_local: number;
     summary?: string;
     title: string;
     updated_at?: string;
     users_active_day: number;
     users_active_half_year: number;
     users_active_month: number;
     users_active_week: number;
     visibility:   | "public"
        | "unlisted"
        | "local_only_public"
        | "local_only_private"
        | "private";
  };
  creator: {
     ap_id: string;
     avatar?: string;
     banner?: string;
     bio?: string;
     bot_account: boolean;
     comment_count: number;
     deleted: boolean;
     display_name?: string;
     id: number;
     local: boolean;
     name: string;
     post_count: number;
     published_at: string;
  };
  creator_banned_from_community: boolean;
  creator_blocked: boolean;
  creator_is_admin: boolean;
  creator_is_moderator: boolean;
  hidden: boolean;
  my_vote?: number;
  notifications: "replies_and_mentions" | "mute" | "all_comments";
  post: {
     alt_text?: string;
     ap_id: string;
     body?: string;
     comments: number;
     community_id: number;
     creator_id: number;
     deleted: boolean;
     downvotes: number;
     embed_description?: string;
     embed_title?: string;
     featured_community: boolean;
     featured_local: boolean;
     id: number;
     language_id: number;
     local: boolean;
     locked: boolean;
     name: string;
     newest_comment_time_at?: string;
     nsfw: boolean;
     published_at: string;
     removed: boolean;
     score: number;
     thumbnail_url?: string;
     updated_at?: string;
     upvotes: number;
     url?: string;
     url_content_type?: string;
  };
  read: boolean;
  read_comments_at?: string;
  saved: boolean;
  subscribed: "Subscribed" | "NotSubscribed" | "Pending" | "ApprovalRequired";
  tags: object[];
  unread_comments: number;
}
NameTypeDefault valueDescriptionDefined in
banned_from_communityboolean--src/schemas/PostView.ts:12
communityobjectCommunity-src/schemas/PostView.ts:13
community.ap_idstring-The federated activity id / ap_id.src/schemas/Community.ts:9
community.banner?string--src/schemas/Community.ts:10
community.commentsnumber--src/schemas/Community.ts:11
community.deletedboolean--src/schemas/Community.ts:12
community.icon?string--src/schemas/Community.ts:13
community.idnumber--src/schemas/Community.ts:14
community.localboolean--src/schemas/Community.ts:15
community.namestring--src/schemas/Community.ts:16
community.nsfwboolean--src/schemas/Community.ts:17
community.posting_restricted_to_modsboolean--src/schemas/Community.ts:18
community.postsnumber--src/schemas/Community.ts:19
community.published_atstring--src/schemas/Community.ts:20
community.removedboolean--src/schemas/Community.ts:21
community.sidebar?string-Long-form sidebar markdown (replaced v0's description).src/schemas/Community.ts:25
community.subscribersnumber--src/schemas/Community.ts:26
community.subscribers_localnumber--src/schemas/Community.ts:27
community.summary?string-Short one-line summary.src/schemas/Community.ts:31
community.titlestring--src/schemas/Community.ts:32
community.updated_at?string--src/schemas/Community.ts:33
community.users_active_daynumber--src/schemas/Community.ts:34
community.users_active_half_yearnumber--src/schemas/Community.ts:35
community.users_active_monthnumber--src/schemas/Community.ts:36
community.users_active_weeknumber--src/schemas/Community.ts:37
community.visibility| "public" | "unlisted" | "local_only_public" | "local_only_private" | "private"CommunityVisibility-src/schemas/Community.ts:38
creatorobjectPerson-src/schemas/PostView.ts:14
creator.ap_idstring-The federated activity id / ap_id.src/schemas/Person.ts:7
creator.avatar?string--src/schemas/Person.ts:8
creator.banner?string--src/schemas/Person.ts:9
creator.bio?string--src/schemas/Person.ts:10
creator.bot_accountboolean--src/schemas/Person.ts:11
creator.comment_countnumber--src/schemas/Person.ts:12
creator.deletedboolean--src/schemas/Person.ts:13
creator.display_name?string--src/schemas/Person.ts:14
creator.idnumber--src/schemas/Person.ts:15
creator.localboolean--src/schemas/Person.ts:16
creator.namestring--src/schemas/Person.ts:17
creator.post_countnumber--src/schemas/Person.ts:18
creator.published_atstring--src/schemas/Person.ts:19
creator_banned_from_communityboolean--src/schemas/PostView.ts:15
creator_blockedboolean--src/schemas/PostView.ts:16
creator_is_adminboolean--src/schemas/PostView.ts:17
creator_is_moderatorboolean--src/schemas/PostView.ts:18
hiddenboolean--src/schemas/PostView.ts:19
my_vote?number--src/schemas/PostView.ts:20
notifications"replies_and_mentions" | "mute" | "all_comments"PostNotificationsMode-src/schemas/PostView.ts:21
postobjectPost-src/schemas/PostView.ts:22
post.alt_text?string-An optional alt_text, usable for image posts.src/schemas/Post.ts:7
post.ap_idstring-The federated activity id / ap_id.src/schemas/Post.ts:11
post.body?string-An optional post body, in markdown.src/schemas/Post.ts:15
post.commentsnumber--src/schemas/Post.ts:16
post.community_idnumber--src/schemas/Post.ts:17
post.creator_idnumber--src/schemas/Post.ts:18
post.deletedboolean-Whether the post is deleted.src/schemas/Post.ts:22
post.downvotesnumber--src/schemas/Post.ts:23
post.embed_description?string-A description for the link.src/schemas/Post.ts:27
post.embed_title?string-A title for the link.src/schemas/Post.ts:31
post.featured_communityboolean-Whether the post is featured to its community.src/schemas/Post.ts:35
post.featured_localboolean-Whether the post is featured to its site.src/schemas/Post.ts:39
post.idnumber--src/schemas/Post.ts:40
post.language_idnumber--src/schemas/Post.ts:41
post.localboolean-Whether the post is local.src/schemas/Post.ts:45
post.lockedboolean-Whether the post is locked.src/schemas/Post.ts:49
post.namestring--src/schemas/Post.ts:50
post.newest_comment_time_at?string-The time of the newest comment in the post.src/schemas/Post.ts:54
post.nsfwboolean-Whether the post is NSFW.src/schemas/Post.ts:58
post.published_atstring--src/schemas/Post.ts:59
post.removedboolean-Whether the post is removed.src/schemas/Post.ts:63
post.scorenumber--src/schemas/Post.ts:64
post.thumbnail_url?string-A thumbnail picture url.src/schemas/Post.ts:68
post.updated_at?string--src/schemas/Post.ts:69
post.upvotesnumber--src/schemas/Post.ts:70
post.url?string-An optional link / url for the post.src/schemas/Post.ts:74
post.url_content_type?string--src/schemas/Post.ts:75
readboolean--src/schemas/PostView.ts:23
read_comments_at?string-When the current user last read the comments on this post (ISO 8601). Comments published after this can be treated as unread. Only provided by providers that track it (Lemmy v1); undefined otherwise.src/schemas/PostView.ts:29
savedboolean--src/schemas/PostView.ts:30
subscribed"Subscribed" | "NotSubscribed" | "Pending" | "ApprovalRequired"SubscribedType-src/schemas/PostView.ts:31
tagsobject[]--src/schemas/PostView.ts:32
unread_commentsnumber--src/schemas/PostView.ts:33

Type Literal

ts
{
  is_admin: boolean;
  person: {
     ap_id: string;
     avatar?: string;
     banner?: string;
     bio?: string;
     bot_account: boolean;
     comment_count: number;
     deleted: boolean;
     display_name?: string;
     id: number;
     local: boolean;
     name: string;
     post_count: number;
     published_at: string;
  };
}

Type Literal

ts
{
  blocked: boolean;
  community: {
     ap_id: string;
     banner?: string;
     comments: number;
     deleted: boolean;
     icon?: string;
     id: number;
     local: boolean;
     name: string;
     nsfw: boolean;
     posting_restricted_to_mods: boolean;
     posts: number;
     published_at: string;
     removed: boolean;
     sidebar?: string;
     subscribers: number;
     subscribers_local: number;
     summary?: string;
     title: string;
     updated_at?: string;
     users_active_day: number;
     users_active_half_year: number;
     users_active_month: number;
     users_active_week: number;
     visibility:   | "public"
        | "unlisted"
        | "local_only_public"
        | "local_only_private"
        | "private";
  };
  notifications:   | "all_posts_and_comments"
     | "all_posts"
     | "replies_and_mentions"
     | "mute";
  subscribed: "Subscribed" | "NotSubscribed" | "Pending" | "ApprovalRequired";
}