import { Bread } from "./Bread" ; import { Request } from "express" ; import { ApiKeyRequest } from "./ApiKeyRequest" ; export { IAccountDocument } from "./db/IAccountDocument" ; export { ISkinDocument } from "./db/ISkinDocument" ; export { ITrafficDocument } from "./db/ITrafficDocument" ; export { IStatDocument } from "./db/IStatDocument" ; export class MineSkinError extends Error { constructor ( public code , public msg ? , public httpCode ? ) { super ( msg ? `[${ code }] ${ msg }` : code ) ; Object . setPrototypeOf ( this , MineSkinError . prototype ) ; } get name ( ) : string { return 'MineSkinError' ; } } export type MineSkinRequest = Request & ApiKeyRequest ; export type BreadRequest = MineSkinRequest & Bread ; export type GenerateRequest = BreadRequest ; export function isBreadRequest ( request ) { return ( < BreadRequest > request ) . breadcrumb !== undefined ; }