import { Resource } from "../resource"; import { StoreArticle, APIArticle, Category, Author, Tag, Permissions } from "./interfaces"; import { Response } from "src/server"; export declare class Article extends Resource { /** * The category this article belongs to. */ category: Category; /** * the slug we use to direct to the article page */ slug: string; /** * The title of the article. */ title: string; /** * The metaDescription of the article. */ metaDescription: string; /** * The summary of the article. */ summary: string; /** * The overallScoreText of the article. */ overallScoreText: string; /** * The image of the article. */ image: string; /** * The author of the article. */ author: Author; /** * The publishDate of the article. */ publishDate: Array; /** * The avgRating of the article. */ avgRating: number; /** * The tags of the article. */ tags: Array; /** * The permissions of the article. */ permissions: Permissions; /** * The result of the article. */ result: string; /** * The snpRelevance of the article. */ snpRelevance: number; /** * The myRating of the article. */ myRating: number; constructor(category: Category, slug: string, title: string, metaDescription: string, summary: string, overallScoreText: string, image: string, author: Author, publishDate: Array, avgRating: number, tags: Array, permissions: Permissions, result: string, snpRelevance: number, myRating: number); /** * The name of the Article resource on the API server. */ static get resourceName(): string; /** * The name of the service containing the Article resource. */ static get serviceName(): string; /** * Convert the Article into a JSON serializable object for the API server. */ serializeAPI(): APIArticle; /** * Deserialize the data from the API server. * * @param data The Article data from the API server. */ deserializeAPI(data: APIArticle): void; /** * Serialize the Article into a format for storing in the Redux store. */ serializeRedux(): StoreArticle; /** * Handle any http errors. * * @param response The response. * * @returns `null`. */ protected static handleError(response: Response): null; /** * Create an Article from the API server data. * * @param data Data from the api server. * * @returns The Article object. */ static apiFactory(data: APIArticle): Article; /** * Create an Article from the Redux store data. * * @param data Data from the api server. * * @returns The Article object. */ static reduxFactory(data: StoreArticle): Article; }