import { API, User } from "../index.js"; /** @obtainableFrom {@link API.getNewsPosts} */ export interface NewsPost { id: number; author: User["username"]; /** Link to view the file on GitHub */ edit_url: string; /** Link to the first image in the document */ first_image: string | null; published_at: Date; updated_at: Date; /** Filename without the extension, used in URLs */ slug: string; title: string; } export declare namespace NewsPost { /** @obtainableFrom {@link API.getNewsPost} */ interface WithContentNavigation extends NewsPost { /** With HTML */ content: string; navigation: { newer?: NewsPost; older?: NewsPost; }; } /** * Get a NewsPost, its content, and the NewsPosts right before and right after it! * @param post The NewsPost, or its id, or its slug */ function getOne(this: API, post: NewsPost["id"] | NewsPost["slug"] | NewsPost): Promise; /** * Get all the NewsPosts of a specific year! * @param year The year the posts were made (defaults to **current year**) * @privateRemarks Because the only filter is the year, everything but `news_sidebar.news_posts` is actually completely useless! * You could maybe make a case for `years` being useful, but I don't believe it's useful enough to sacrifice the simplicity * @remarks If the specified year is invalid/has no news, it fallbacks to the default year */ function getMultiple(this: API, year?: number): Promise; }