//-----------------------------------------------------------------------
//
// Copyright (c) aliasvault. All rights reserved.
// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.
//
//-----------------------------------------------------------------------
namespace AliasVault.Shared.Models.Enums;
///
/// Enumeration of error codes returned by the API.
/// These codes are used by clients for localization and proper error handling.
/// Using explicit string keys ensures backward compatibility when adding new error codes.
///
public enum ApiErrorCode
{
///
/// Refresh token is required but was not provided.
///
REFRESH_TOKEN_REQUIRED,
///
/// User account is locked.
///
ACCOUNT_LOCKED,
///
/// User account is blocked.
///
ACCOUNT_BLOCKED,
///
/// The provided refresh token is invalid.
///
INVALID_REFRESH_TOKEN,
///
/// Public registration is disabled on this server.
///
PUBLIC_REGISTRATION_DISABLED,
///
/// User not found.
///
USER_NOT_FOUND,
///
/// Username is required but was not provided.
///
USERNAME_REQUIRED,
///
/// Username is already in use.
///
USERNAME_ALREADY_IN_USE,
///
/// Username is available.
///
USERNAME_AVAILABLE,
///
/// Username does not match.
///
USERNAME_MISMATCH,
///
/// Password does not match.
///
PASSWORD_MISMATCH,
///
/// Account was successfully deleted.
///
ACCOUNT_SUCCESSFULLY_DELETED,
///
/// Username cannot be empty or whitespace.
///
USERNAME_EMPTY_OR_WHITESPACE,
///
/// Username is too short.
///
USERNAME_TOO_SHORT,
///
/// Username is too long.
///
USERNAME_TOO_LONG,
///
/// Username is not a valid email address.
///
USERNAME_INVALID_EMAIL,
///
/// Username contains invalid characters.
///
USERNAME_INVALID_CHARACTERS,
///
/// There are pending database migrations.
///
PENDING_MIGRATIONS,
///
/// Internal server error occurred.
///
INTERNAL_SERVER_ERROR,
///
/// Generic vault error.
///
VAULT_ERROR,
///
/// Unknown error occurred.
///
UNKNOWN_ERROR,
///
/// Invalid authenticator code provided.
///
INVALID_AUTHENTICATOR_CODE,
///
/// Invalid recovery code provided.
///
INVALID_RECOVERY_CODE,
///
/// Vault is not up-to-date and requires synchronization.
///
VAULT_NOT_UP_TO_DATE,
///
/// Mobile login request not found or expired.
///
MOBILE_LOGIN_REQUEST_NOT_FOUND,
///
/// Mobile login request already fulfilled.
///
MOBILE_LOGIN_REQUEST_ALREADY_FULFILLED,
}