import BaseException from "./base.exception"; import BadRequestException from "./exceptions/bad-request.exception"; import UnprocessableEntityException from "./exceptions/unprocessable-entity.exception"; import InvalidPasswordException from "./exceptions/invalid-password.exception"; import ItemNotFoundException from "./exceptions/item-not-found.exception"; import NoItemsFoundException from "./exceptions/no-items-found.exception"; import NoContentException from "./exceptions/no-content.exception"; import UnauthorizedException from "./exceptions/unauthorized-error.exception"; import ValueAlreadyExistsException from "./exceptions/value-already-exists.exception"; import JsmException from "./exceptions/jsm-exception.exception"; import InternalServerErrorException from "./exceptions/internal-server-error.exception"; import ValidationException from "./exceptions/validation.exception"; import JWTTokenExpiredException from "./exceptions/jwt-token-expired.exception"; import ForbiddenException from "./exceptions/forbidden.exception"; import MethodNotAllowedException from "./exceptions/method-not-allowed.exception"; import RequestTimeoutException from "./exceptions/request-timeout.exception"; import TooManyRequestsException from "./exceptions/too-many-requests.exception"; import NotImplementedException from "./exceptions/not-implemented.exception"; import ServiceUnavailableException from "./exceptions/service-unavailable.exception"; export { default as BaseException } from "./base.exception"; export { default as BadRequestException } from "./exceptions/bad-request.exception"; export { default as UnprocessableEntityException } from "./exceptions/unprocessable-entity.exception"; export { default as InvalidPasswordException } from "./exceptions/invalid-password.exception"; export { default as ItemNotFoundException } from "./exceptions/item-not-found.exception"; export { default as NoItemsFoundException } from "./exceptions/no-items-found.exception"; export { default as NoContentException } from "./exceptions/no-content.exception"; export { default as UnauthorizedException } from "./exceptions/unauthorized-error.exception"; export { default as ValueAlreadyExistsException } from "./exceptions/value-already-exists.exception"; export { default as InternalServerErrorException } from "./exceptions/internal-server-error.exception"; export { default as ValidationException } from "./exceptions/validation.exception"; export { default as JWTTokenExpiredException } from "./exceptions/jwt-token-expired.exception"; export { default as ForbiddenException } from "./exceptions/forbidden.exception"; export { default as MethodNotAllowedException } from "./exceptions/method-not-allowed.exception"; export { default as RequestTimeoutException } from "./exceptions/request-timeout.exception"; export { default as TooManyRequestsException } from "./exceptions/too-many-requests.exception"; export { default as NotImplementedException } from "./exceptions/not-implemented.exception"; export { default as ServiceUnavailableException } from "./exceptions/service-unavailable.exception"; /** * @deprecated Use BaseException instead */ export { default as JsmException } from "./exceptions/jsm-exception.exception"; /** * @deprecated Use InternalServerErrorException instead */ export declare const InternalServerError: typeof InternalServerErrorException; /** * @deprecated Use JWTTokenExpiredException instead */ export declare const JWTTokenExpired: typeof JWTTokenExpiredException; /** * @fileoverview JSM Exceptions Library - Comprehensive HTTP exception handling * @author dr. Salmi * @since 22-07-2025 */ declare const exceptions: { /** * Base exception class that all JSM exceptions extend. * Provides consistent error handling with HTTP status codes, context, and timestamps. */ BaseException: typeof BaseException; /** * HTTP 400 - Bad Request * Thrown when the client sends a malformed or invalid request. */ BadRequestException: typeof BadRequestException; /** * HTTP 401 - Unauthorized * Thrown when authentication is required but not provided or invalid. */ UnauthorizedException: typeof UnauthorizedException; /** * HTTP 401 - Invalid Password * Thrown when password authentication fails. */ InvalidPasswordException: typeof InvalidPasswordException; /** * HTTP 401 - JWT Token Expired * Thrown when a JWT token has expired. */ JWTTokenExpiredException: typeof JWTTokenExpiredException; /** * HTTP 403 - Forbidden * Thrown when the client does not have permission to access a resource. */ ForbiddenException: typeof ForbiddenException; /** * HTTP 404 - Item Not Found * Thrown when a requested item/resource cannot be found. */ ItemNotFoundException: typeof ItemNotFoundException; /** * HTTP 404 - No Items Found * Thrown when a search or list operation returns no results. */ NoItemsFoundException: typeof NoItemsFoundException; /** * Alias for NoItemsFoundException for backward compatibility */ NotFoundException: typeof NoItemsFoundException; /** * HTTP 405 - Method Not Allowed * Thrown when the HTTP method is not allowed for the requested resource. */ MethodNotAllowedException: typeof MethodNotAllowedException; /** * HTTP 408 - Request Timeout * Thrown when a request times out. */ RequestTimeoutException: typeof RequestTimeoutException; /** * HTTP 409 - Conflict * Thrown when attempting to create a resource that already exists. */ ValueAlreadyExistsException: typeof ValueAlreadyExistsException; /** * HTTP 422 - Unprocessable Entity * Thrown when the request is well-formed but contains semantic errors. */ UnprocessableEntityException: typeof UnprocessableEntityException; /** * HTTP 422 - Validation Error * Thrown when input validation fails. Supports Joi validation errors. */ ValidationException: typeof ValidationException; /** * HTTP 429 - Too Many Requests * Thrown when rate limiting is triggered. */ TooManyRequestsException: typeof TooManyRequestsException; /** * HTTP 500 - Internal Server Error * Thrown when an unexpected server error occurs. */ InternalServerErrorException: typeof InternalServerErrorException; /** * HTTP 501 - Not Implemented * Thrown when a feature or functionality is not implemented. */ NotImplementedException: typeof NotImplementedException; /** * HTTP 503 - Service Unavailable * Thrown when a service is temporarily unavailable. */ ServiceUnavailableException: typeof ServiceUnavailableException; /** * HTTP 204 - No Content * Used when the request is valid but the server has nothing to send back. * Used when an event is received and the service has nothing to do with it. */ NoContentException: typeof NoContentException; /** * @deprecated Use BaseException instead * Legacy JSM exception for backward compatibility. */ JsmException: typeof JsmException; /** * @deprecated Use InternalServerErrorException instead * Legacy internal server error exception. */ InternalServerError: typeof InternalServerErrorException; /** * @deprecated Use JWTTokenExpiredException instead * Legacy JWT token expired exception. */ JWTTokenExpired: typeof JWTTokenExpiredException; }; export * from './utils/is-jsm-exception.utils'; export * from './types'; export default exceptions;