import type { CommunityId } from "./CommunityId"; import type { ListingType } from "./ListingType"; import type { PaginationCursor } from "./PaginationCursor"; import type { PersonId } from "./PersonId"; import type { SearchType } from "./SearchType"; /** * Searches the site, given a search term, and some optional filters. */ export type Search = { /** * The search query. Can be a plain text, or an object ID which will be resolved * (eg `https://lemmy.world/comment/1` or `!fediverse@lemmy.ml`). */ search_term: string; community_id?: CommunityId; community_name?: string; creator_id?: PersonId; creator_username?: string; type_?: SearchType; /** * Filter to within a given time range, in seconds. * IE 60 would give results for the past minute. */ time_range_seconds?: number; listing_type?: ListingType; title_only?: boolean; post_url_only?: boolean; /** * If true, then show the nsfw posts (even if your user setting is to hide them) */ show_nsfw?: boolean; page_cursor?: PaginationCursor; limit?: number; };