import { listPosts } from './domain.ts'
import type { ProductHuntListPostsOptions } from './types.ts'
/**
* List Product Hunt posts with featured, date, topic, and order filters.
* @param params.featured - When true, only featured hunts.
* @param params.order - `RANKING` (default), `FEATURED_AT`, `VOTES`, or `NEWEST`.
* @example
* import listPosts from 'kody:@kentcdodds/producthunt/list-posts'
* const page = await listPosts({ featured: true, first: 5 })
* // => { nodes: [{ name: '...', slug: '...', votesCount: 120 }], pageInfo: { hasNextPage: true } }
*/
export default async function listPostsEntrypoint(params: ProductHuntListPostsOptions = {}) {
return await listPosts(params)
}