// @generated — do not edit import { createDomainError } from "@tailor-platform/erp-kit/core"; export const UserNotFoundError = createDomainError( "UserNotFoundError", "USER_MANAGEMENT_USER_NOT_FOUND", (identifier: string) => `Specified user ID does not exist: ${identifier}`, ); export const InvalidStatusTransitionError = createDomainError( "InvalidStatusTransitionError", "USER_MANAGEMENT_INVALID_STATUS_TRANSITION", (identifier: string) => `Requested status transition is not allowed from the current status: ${identifier}`, ); export const RoleNotFoundError = createDomainError( "RoleNotFoundError", "USER_MANAGEMENT_ROLE_NOT_FOUND", (identifier: string) => `Specified role ID does not exist: ${identifier}`, ); export const RoleNotActiveError = createDomainError( "RoleNotActiveError", "USER_MANAGEMENT_ROLE_NOT_ACTIVE", (identifier: string) => `Role is not in ACTIVE status and cannot be used for this operation: ${identifier}`, ); export const UserNotActiveError = createDomainError( "UserNotActiveError", "USER_MANAGEMENT_USER_NOT_ACTIVE", (identifier: string) => `User is in INACTIVE status and cannot receive role assignments: ${identifier}`, ); export const MissingRequiredFieldError = createDomainError( "MissingRequiredFieldError", "USER_MANAGEMENT_MISSING_REQUIRED_FIELD", (identifier: string) => `One or more required fields are missing or empty: ${identifier}`, ); export const RoleAlreadyExistsError = createDomainError( "RoleAlreadyExistsError", "USER_MANAGEMENT_ROLE_ALREADY_EXISTS", (identifier: string) => `A role with the same name already exists: ${identifier}`, ); export const InvalidPermissionError = createDomainError( "InvalidPermissionError", "USER_MANAGEMENT_INVALID_PERMISSION", (identifier: string) => `Permission key has an invalid format: ${identifier}`, ); export const UserAlreadyExistsError = createDomainError( "UserAlreadyExistsError", "USER_MANAGEMENT_USER_ALREADY_EXISTS", (identifier: string) => `Email address is already registered by another user: ${identifier}`, ); export const InvalidEmailError = createDomainError( "InvalidEmailError", "USER_MANAGEMENT_INVALID_EMAIL", (identifier: string) => `Email does not follow valid email format: ${identifier}`, ); export const RoleHasActiveAssignmentsError = createDomainError( "RoleHasActiveAssignmentsError", "USER_MANAGEMENT_ROLE_HAS_ACTIVE_ASSIGNMENTS", (identifier: string) => `Role still has active UserRole assignments — must revoke all assignments first: ${identifier}`, ); export const PermissionNotFoundError = createDomainError( "PermissionNotFoundError", "USER_MANAGEMENT_PERMISSION_NOT_FOUND", (identifier: string) => `Permission key is not in the role's permissions array - return not found error indicating the permission is not assigned to this role: ${identifier}`, ); export const AssignmentNotFoundError = createDomainError( "AssignmentNotFoundError", "USER_MANAGEMENT_ASSIGNMENT_NOT_FOUND", (identifier: string) => `User does not have this role assigned - return not found error indicating the association does not exist: ${identifier}`, ); export const InvalidNameError = createDomainError( "InvalidNameError", "USER_MANAGEMENT_INVALID_NAME", (identifier: string) => `Name is empty or whitespace only: ${identifier}`, ); export const EmptyResultError = createDomainError( "EmptyResultError", "USER_MANAGEMENT_EMPTY_RESULT", (identifier: string) => `No roles match the given criteria — returns empty list: ${identifier}`, );