import BaseException from "../base.exception"; /** * @fileoverview Value Already Exists exception (HTTP 409) * @author dr. Salmi */ /** * Exception thrown when attempting to create a resource that already exists. * Corresponds to HTTP 409 Conflict status code. * * @class ValueAlreadyExistsException * @extends {BaseException} * @example * ```typescript * throw new ValueAlreadyExistsException('Email already exists'); * throw new ValueAlreadyExistsException('Username is taken', { * username: { value: 'john_doe', message: 'This username is already taken' } * }); * ``` */ declare class ValueAlreadyExistsException extends BaseException { /** * Field-specific information about the conflicting values * @type {ErrorFields} */ readonly fields?: ErrorFields; /** * Indicates if this exception was created from a Mongoose validation error * @type {boolean} */ readonly isMongoose: boolean; /** * Creates an instance of ValueAlreadyExistsException. * * @param {string} [message='Value already exists'] - The error message * @param {ErrorFields} [fields] - Field-specific information about conflicting values * @param {Record} [context] - Additional context * @memberof ValueAlreadyExistsException */ constructor(message?: string, fields?: ErrorFields, context?: Record); /** * Returns a JSON representation of the value already exists exception * * @returns {object} JSON representation including field information * @memberof ValueAlreadyExistsException */ toJSON(): object; } export default ValueAlreadyExistsException;