import { Resource } from "../resource"; import { SavedStoreUser, APIUserRequest, APIUserResponse } from "./interfaces"; import { Response } from "src/server"; export declare class User extends Resource { /** * The user's email. */ email?: string; /** * The user's password. */ password?: string; /** * The user's new password. */ newPassword?: string; constructor(email?: string, password?: string, newPassword?: string); /** * The name of the User resource on the API server. */ static get resourceName(): string; /** * The name of the service containing the user resource. */ static get serviceName(): string; /** * Convert the user into a JSON serializable object for the API server. */ serializeAPI(): APIUserRequest; /** * Deserialize the data from the API server. * * @param data The user data from the API server. */ deserializeAPI(data: APIUserResponse): void; /** * Serialize the user into a format for storing in the Redux store. */ serializeRedux(): SavedStoreUser; /** * Handle any http errors. * * @param response The response. * * @returns `null`. */ protected static handleError(response: Response): null; /** * Create a user from the API server data. * * @param data Data from the api server. * * @returns The user object. */ static apiFactory(data: APIUserResponse): User; /** * Create a user from the Redux store data. * * @param data Data from the api server. * * @returns The user object. */ static reduxFactory(data: SavedStoreUser): User; }