import { StatusCodeType as StatusCodeType2 } from "@ooneex/http-status"; import { StatusCodeType } from "@ooneex/http-status"; type ExceptionStackFrameType = { functionName?: string; fileName?: string; lineNumber?: number; columnNumber?: number; source: string; }; interface IException { readonly key: string | null; readonly date: Date; readonly status: StatusCodeType; readonly data: Readonly>; readonly native?: Error; readonly message: string; readonly name: string; readonly stack?: string; stackToJson: () => ExceptionStackFrameType[] | null; } declare class Exception extends Error implements IException { readonly key: string | null; readonly date: Date; readonly status: StatusCodeType2; readonly data: Record; readonly native?: Error; constructor(message: string | Error, options?: { key?: string | null; status?: StatusCodeType2; data?: Record; }); /** * Converts the stack trace into a structured JSON object * @returns Array of stack frames or null if no stack trace is available */ stackToJson(): ExceptionStackFrameType[] | null; } declare class BadRequestException extends Exception { constructor(message: string, key: string, data?: Record); } declare class MethodNotAllowedException extends Exception { constructor(message: string, key: string, data?: Record); } declare class NotFoundException extends Exception { constructor(message: string, key: string, data?: Record); } declare class UnauthorizedException extends Exception { constructor(message: string, key: string, data?: Record); } export { UnauthorizedException, NotFoundException, MethodNotAllowedException, IException, ExceptionStackFrameType, Exception, BadRequestException };