// @generated — do not edit import { createDomainError } from "@tailor-platform/erp-kit/core"; export const ItemNotFoundError = createDomainError( "ItemNotFoundError", "ITEM_MANAGEMENT_ITEM_NOT_FOUND", (identifier: string) => `Specified item ID does not exist: ${identifier}`, ); export const InvalidStateTransitionError = createDomainError( "InvalidStateTransitionError", "ITEM_MANAGEMENT_INVALID_STATE_TRANSITION", (identifier: string) => `Requested state transition is not allowed from the current status: ${identifier}`, ); export const NodeNotFoundError = createDomainError( "NodeNotFoundError", "ITEM_MANAGEMENT_NODE_NOT_FOUND", (identifier: string) => `Specified taxonomy node ID does not exist: ${identifier}`, ); export const DuplicateAssignmentError = createDomainError( "DuplicateAssignmentError", "ITEM_MANAGEMENT_DUPLICATE_ASSIGNMENT", (identifier: string) => `Item is already assigned to this taxonomy node: ${identifier}`, ); export const DuplicateSkuError = createDomainError( "DuplicateSkuError", "ITEM_MANAGEMENT_DUPLICATE_SKU", (identifier: string) => `An item with the same SKU already exists: ${identifier}`, ); export const DuplicateBarcodeError = createDomainError( "DuplicateBarcodeError", "ITEM_MANAGEMENT_DUPLICATE_BARCODE", (identifier: string) => `An item with the same barcode already exists: ${identifier}`, ); export const UnitNotFoundError = createDomainError( "UnitNotFoundError", "ITEM_MANAGEMENT_UNIT_NOT_FOUND", (identifier: string) => `Referenced unit does not exist or is inactive: ${identifier}`, ); export const DuplicateNodeCodeError = createDomainError( "DuplicateNodeCodeError", "ITEM_MANAGEMENT_DUPLICATE_NODE_CODE", (identifier: string) => `A node with the same code already exists: ${identifier}`, ); export const ParentNodeNotFoundError = createDomainError( "ParentNodeNotFoundError", "ITEM_MANAGEMENT_PARENT_NODE_NOT_FOUND", (identifier: string) => `Specified parent node ID does not exist: ${identifier}`, ); export const MaxDepthExceededError = createDomainError( "MaxDepthExceededError", "ITEM_MANAGEMENT_MAX_DEPTH_EXCEEDED", (identifier: string) => `Operation would cause the taxonomy subtree to exceed the maximum depth limit: ${identifier}`, ); export const DeleteNonDraftError = createDomainError( "DeleteNonDraftError", "ITEM_MANAGEMENT_DELETE_NON_DRAFT", (identifier: string) => `Item is in ACTIVE or INACTIVE status — only DRAFT items can be deleted: ${identifier}`, ); export const NodeHasChildrenError = createDomainError( "NodeHasChildrenError", "ITEM_MANAGEMENT_NODE_HAS_CHILDREN", (identifier: string) => `Node has one or more child nodes — children must be moved or deleted first: ${identifier}`, ); export const NodeHasAssignmentsError = createDomainError( "NodeHasAssignmentsError", "ITEM_MANAGEMENT_NODE_HAS_ASSIGNMENTS", (identifier: string) => `Node has one or more item assignments — assignments must be removed first: ${identifier}`, ); export const CircularReferenceError = createDomainError( "CircularReferenceError", "ITEM_MANAGEMENT_CIRCULAR_REFERENCE", (identifier: string) => `New parent is the node itself or one of its descendants: ${identifier}`, ); export const AssignmentNotFoundError = createDomainError( "AssignmentNotFoundError", "ITEM_MANAGEMENT_ASSIGNMENT_NOT_FOUND", (identifier: string) => `No assignment exists for the specified item and taxonomy node combination: ${identifier}`, ); export const UomLockedError = createDomainError( "UomLockedError", "ITEM_MANAGEMENT_UOM_LOCKED", (identifier: string) => `UoM cannot be changed after item has been activated (status is ACTIVE or INACTIVE): ${identifier}`, ); export const NoFieldsToUpdateError = createDomainError( "NoFieldsToUpdateError", "ITEM_MANAGEMENT_NO_FIELDS_TO_UPDATE", (identifier: string) => `No updatable fields were provided in the request: ${identifier}`, ); export const MissingRequiredFieldsError = createDomainError( "MissingRequiredFieldsError", "ITEM_MANAGEMENT_MISSING_REQUIRED_FIELDS", (identifier: string) => `Name not provided or empty: ${identifier}`, ); export const SelfReferenceError = createDomainError( "SelfReferenceError", "ITEM_MANAGEMENT_SELF_REFERENCE", (identifier: string) => `Node is moved to itself as parent — returns isCircular: true: ${identifier}`, ); export const NoAssignmentsError = createDomainError( "NoAssignmentsError", "ITEM_MANAGEMENT_NO_ASSIGNMENTS", (identifier: string) => `No item assignments exist for the given node — caller receives empty array: ${identifier}`, ); export const NoChildrenError = createDomainError( "NoChildrenError", "ITEM_MANAGEMENT_NO_CHILDREN", (identifier: string) => `No child nodes exist for the given parent — caller receives empty array: ${identifier}`, );