// @generated — do not edit import { createDomainError } from "@tailor-platform/erp-kit/core"; export const BomNotFoundError = createDomainError( "BomNotFoundError", "MANUFACTURING_BOM_NOT_FOUND", (identifier: string) => `Referenced BOM does not exist: ${identifier}`, ); export const BomNotActivatableError = createDomainError( "BomNotActivatableError", "MANUFACTURING_BOM_NOT_ACTIVATABLE", (identifier: string) => `The BOM is not in DRAFT.: ${identifier}`, ); export const ComponentLineRequiredError = createDomainError( "ComponentLineRequiredError", "MANUFACTURING_COMPONENT_LINE_REQUIRED", (identifier: string) => `BOM has no component lines: ${identifier}`, ); export const ComponentItemInactiveError = createDomainError( "ComponentItemInactiveError", "MANUFACTURING_COMPONENT_ITEM_INACTIVE", (identifier: string) => `A referenced component item is not in ACTIVE status: ${identifier}`, ); export const CircularBomReferenceError = createDomainError( "CircularBomReferenceError", "MANUFACTURING_CIRCULAR_BOM_REFERENCE", (identifier: string) => `A direct or indirect manufactured-item loop was detected.: ${identifier}`, ); export const EffectivityConflictError = createDomainError( "EffectivityConflictError", "MANUFACTURING_EFFECTIVITY_CONFLICT", (identifier: string) => `Activation would create conflicting active effectivity windows.: ${identifier}`, ); export const RoutingNotFoundError = createDomainError( "RoutingNotFoundError", "MANUFACTURING_ROUTING_NOT_FOUND", (identifier: string) => `Referenced routing does not exist: ${identifier}`, ); export const RoutingNotActivatableError = createDomainError( "RoutingNotActivatableError", "MANUFACTURING_ROUTING_NOT_ACTIVATABLE", (identifier: string) => `The routing is not in DRAFT.: ${identifier}`, ); export const OperationRequiredError = createDomainError( "OperationRequiredError", "MANUFACTURING_OPERATION_REQUIRED", (identifier: string) => `Routing has no operations: ${identifier}`, ); export const DuplicateOperationSequenceError = createDomainError( "DuplicateOperationSequenceError", "MANUFACTURING_DUPLICATE_OPERATION_SEQUENCE", (identifier: string) => `Two operations use the same sequence number.: ${identifier}`, ); export const WorkCenterNotActiveError = createDomainError( "WorkCenterNotActiveError", "MANUFACTURING_WORK_CENTER_NOT_ACTIVE", (identifier: string) => `A referenced work center is inactive.: ${identifier}`, ); export const CrossCompanyWorkCenterError = createDomainError( "CrossCompanyWorkCenterError", "MANUFACTURING_CROSS_COMPANY_WORK_CENTER", (identifier: string) => `A work center belongs to a different company scope.: ${identifier}`, ); export const WorkCenterNotFoundError = createDomainError( "WorkCenterNotFoundError", "MANUFACTURING_WORK_CENTER_NOT_FOUND", (identifier: string) => `Referenced work center does not exist: ${identifier}`, ); export const WorkCenterNotActivatableError = createDomainError( "WorkCenterNotActivatableError", "MANUFACTURING_WORK_CENTER_NOT_ACTIVATABLE", (identifier: string) => `The current status does not allow activation.: ${identifier}`, ); export const MissingCalendarContextError = createDomainError( "MissingCalendarContextError", "MANUFACTURING_MISSING_CALENDAR_CONTEXT", (identifier: string) => `Required calendar or availability data is missing.: ${identifier}`, ); export const InvalidCapacityError = createDomainError( "InvalidCapacityError", "MANUFACTURING_INVALID_CAPACITY", (identifier: string) => `Capacity is zero or negative.: ${identifier}`, ); export const InvalidRateError = createDomainError( "InvalidRateError", "MANUFACTURING_INVALID_RATE", (identifier: string) => `Labor or machine rate is negative.: ${identifier}`, ); export const OverheadCurrencyRequiredError = createDomainError( "OverheadCurrencyRequiredError", "MANUFACTURING_OVERHEAD_CURRENCY_REQUIRED", (identifier: string) => `Fixed-amount overhead requires a currency.: ${identifier}`, ); export const ProductionOrderNotFoundError = createDomainError( "ProductionOrderNotFoundError", "MANUFACTURING_PRODUCTION_ORDER_NOT_FOUND", (identifier: string) => `Referenced production order does not exist: ${identifier}`, ); export const ProductionOrderNotCancellableError = createDomainError( "ProductionOrderNotCancellableError", "MANUFACTURING_PRODUCTION_ORDER_NOT_CANCELLABLE", (identifier: string) => `The current status does not allow cancellation.: ${identifier}`, ); export const ExecutionAlreadyStartedError = createDomainError( "ExecutionAlreadyStartedError", "MANUFACTURING_EXECUTION_ALREADY_STARTED", (identifier: string) => `Work-order execution evidence already exists for this production order: ${identifier}`, ); export const InventoryHandoffExistsError = createDomainError( "InventoryHandoffExistsError", "MANUFACTURING_INVENTORY_HANDOFF_EXISTS", (identifier: string) => `Inventory issue or receipt evidence already exists for this production order: ${identifier}`, ); export const ProductionOrderNotClosableError = createDomainError( "ProductionOrderNotClosableError", "MANUFACTURING_PRODUCTION_ORDER_NOT_CLOSABLE", (identifier: string) => `The order is not in TECHNICALLY_COMPLETE.: ${identifier}`, ); export const OpenWorkRemainsError = createDomainError( "OpenWorkRemainsError", "MANUFACTURING_OPEN_WORK_REMAINS", (identifier: string) => `Open work orders or execution exceptions still exist.: ${identifier}`, ); export const CostSummaryNotSettledError = createDomainError( "CostSummaryNotSettledError", "MANUFACTURING_COST_SUMMARY_NOT_SETTLED", (identifier: string) => `The linked cost summary is not in SETTLED.: ${identifier}`, ); export const ProductionOrderNotCompletableError = createDomainError( "ProductionOrderNotCompletableError", "MANUFACTURING_PRODUCTION_ORDER_NOT_COMPLETABLE", (identifier: string) => `The order is not in IN_PROGRESS.: ${identifier}`, ); export const OpenWorkOrderRemainsError = createDomainError( "OpenWorkOrderRemainsError", "MANUFACTURING_OPEN_WORK_ORDER_REMAINS", (identifier: string) => `One or more required work orders are still open.: ${identifier}`, ); export const FinalOutputRequiredError = createDomainError( "FinalOutputRequiredError", "MANUFACTURING_FINAL_OUTPUT_REQUIRED", (identifier: string) => `Final output reporting is incomplete.: ${identifier}`, ); export const FinalReceiptRequiredError = createDomainError( "FinalReceiptRequiredError", "MANUFACTURING_FINAL_RECEIPT_REQUIRED", (identifier: string) => `Required receipt handoff evidence is missing.: ${identifier}`, ); export const WorkOrderNotFoundError = createDomainError( "WorkOrderNotFoundError", "MANUFACTURING_WORK_ORDER_NOT_FOUND", (identifier: string) => `Referenced work order does not exist: ${identifier}`, ); export const WorkOrderNotCompletableError = createDomainError( "WorkOrderNotCompletableError", "MANUFACTURING_WORK_ORDER_NOT_COMPLETABLE", (identifier: string) => `Work order is not in IN_PROGRESS.: ${identifier}`, ); export const WorkOrderNotStartedError = createDomainError( "WorkOrderNotStartedError", "MANUFACTURING_WORK_ORDER_NOT_STARTED", (identifier: string) => `No actual start evidence exists.: ${identifier}`, ); export const InvalidCompletionQuantityError = createDomainError( "InvalidCompletionQuantityError", "MANUFACTURING_INVALID_COMPLETION_QUANTITY", (identifier: string) => `Completion quantity is invalid for the transaction.: ${identifier}`, ); export const DuplicateBackflushRiskError = createDomainError( "DuplicateBackflushRiskError", "MANUFACTURING_DUPLICATE_BACKFLUSH_RISK", (identifier: string) => `Requested backflush would duplicate manual issue quantity.: ${identifier}`, ); export const ReceiptHandoffRequiredError = createDomainError( "ReceiptHandoffRequiredError", "MANUFACTURING_RECEIPT_HANDOFF_REQUIRED", (identifier: string) => `Required receipt-handoff data is incomplete.: ${identifier}`, ); export const ParentItemNotFoundError = createDomainError( "ParentItemNotFoundError", "MANUFACTURING_PARENT_ITEM_NOT_FOUND", (identifier: string) => `Referenced parent item does not exist.: ${identifier}`, ); export const ParentItemNotManufacturedError = createDomainError( "ParentItemNotManufacturedError", "MANUFACTURING_PARENT_ITEM_NOT_MANUFACTURED", (identifier: string) => `Parent item is not eligible for manufacturing BOM ownership.: ${identifier}`, ); export const InvalidComponentQuantityError = createDomainError( "InvalidComponentQuantityError", "MANUFACTURING_INVALID_COMPONENT_QUANTITY", (identifier: string) => `A component quantity is zero or negative: ${identifier}`, ); export const BomVersionConflictError = createDomainError( "BomVersionConflictError", "MANUFACTURING_BOM_VERSION_CONFLICT", (identifier: string) => `The proposed version or effectivity identity already exists in the same scope.: ${identifier}`, ); export const ProductionItemNotFoundError = createDomainError( "ProductionItemNotFoundError", "MANUFACTURING_PRODUCTION_ITEM_NOT_FOUND", (identifier: string) => `Produced item does not exist.: ${identifier}`, ); export const ProductionItemNotManufacturableError = createDomainError( "ProductionItemNotManufacturableError", "MANUFACTURING_PRODUCTION_ITEM_NOT_MANUFACTURABLE", (identifier: string) => `Produced item cannot be built through manufacturing.: ${identifier}`, ); export const InvalidPlannedQuantityError = createDomainError( "InvalidPlannedQuantityError", "MANUFACTURING_INVALID_PLANNED_QUANTITY", (identifier: string) => `Planned quantity is zero or negative.: ${identifier}`, ); export const InvalidSiteScopeError = createDomainError( "InvalidSiteScopeError", "MANUFACTURING_INVALID_SITE_SCOPE", (identifier: string) => `Company and site scope are missing or inconsistent.: ${identifier}`, ); export const CrossScopeMasterReferenceError = createDomainError( "CrossScopeMasterReferenceError", "MANUFACTURING_CROSS_SCOPE_MASTER_REFERENCE", (identifier: string) => `BOM or routing reference belongs to another company or site.: ${identifier}`, ); export const RoutingItemNotFoundError = createDomainError( "RoutingItemNotFoundError", "MANUFACTURING_ROUTING_ITEM_NOT_FOUND", (identifier: string) => `Referenced parent item does not exist.: ${identifier}`, ); export const InvalidStandardTimeError = createDomainError( "InvalidStandardTimeError", "MANUFACTURING_INVALID_STANDARD_TIME", (identifier: string) => `Setup or run time is negative.: ${identifier}`, ); export const InvalidScopeError = createDomainError( "InvalidScopeError", "MANUFACTURING_INVALID_SCOPE", (identifier: string) => `Required company or site scope is missing.: ${identifier}`, ); export const DuplicateWorkCenterCodeError = createDomainError( "DuplicateWorkCenterCodeError", "MANUFACTURING_DUPLICATE_WORK_CENTER_CODE", (identifier: string) => `Another work center already uses the same code in scope.: ${identifier}`, ); export const BomNotDeactivatableError = createDomainError( "BomNotDeactivatableError", "MANUFACTURING_BOM_NOT_DEACTIVATABLE", (identifier: string) => `The BOM is not in ACTIVE.: ${identifier}`, ); export const ReplacementRequiredError = createDomainError( "ReplacementRequiredError", "MANUFACTURING_REPLACEMENT_REQUIRED", (identifier: string) => `Policy requires another selectable BOM or routing before deactivation: ${identifier}`, ); export const RoutingNotDeactivatableError = createDomainError( "RoutingNotDeactivatableError", "MANUFACTURING_ROUTING_NOT_DEACTIVATABLE", (identifier: string) => `The routing is not in ACTIVE.: ${identifier}`, ); export const WorkCenterNotDeactivatableError = createDomainError( "WorkCenterNotDeactivatableError", "MANUFACTURING_WORK_CENTER_NOT_DEACTIVATABLE", (identifier: string) => `The work center is not in ACTIVE.: ${identifier}`, ); export const WorkCenterInUseError = createDomainError( "WorkCenterInUseError", "MANUFACTURING_WORK_CENTER_IN_USE", (identifier: string) => `Future routings or open released work still require the work center.: ${identifier}`, ); export const WorkOrderNotPausableError = createDomainError( "WorkOrderNotPausableError", "MANUFACTURING_WORK_ORDER_NOT_PAUSABLE", (identifier: string) => `Work order is not in IN_PROGRESS.: ${identifier}`, ); export const PauseReasonRequiredError = createDomainError( "PauseReasonRequiredError", "MANUFACTURING_PAUSE_REASON_REQUIRED", (identifier: string) => `No pause reason was provided.: ${identifier}`, ); export const CostSummaryNotFoundError = createDomainError( "CostSummaryNotFoundError", "MANUFACTURING_COST_SUMMARY_NOT_FOUND", (identifier: string) => `Referenced cost summary does not exist: ${identifier}`, ); export const CostSummaryNotCollectingError = createDomainError( "CostSummaryNotCollectingError", "MANUFACTURING_COST_SUMMARY_NOT_COLLECTING", (identifier: string) => `Summary is not in COLLECTING.: ${identifier}`, ); export const MissingInventoryIssueReferenceError = createDomainError( "MissingInventoryIssueReferenceError", "MANUFACTURING_MISSING_INVENTORY_ISSUE_REFERENCE", (identifier: string) => `inventoryIssueReference was not provided in the outcome payload.: ${identifier}`, ); export const MissingActualUnitCostError = createDomainError( "MissingActualUnitCostError", "MANUFACTURING_MISSING_ACTUAL_UNIT_COST", (identifier: string) => `actualUnitCost was not provided in the outcome payload.: ${identifier}`, ); export const MissingActualExtendedCostError = createDomainError( "MissingActualExtendedCostError", "MANUFACTURING_MISSING_ACTUAL_EXTENDED_COST", (identifier: string) => `actualExtendedCost was not provided in the outcome payload.: ${identifier}`, ); export const MissingPostingDateError = createDomainError( "MissingPostingDateError", "MANUFACTURING_MISSING_POSTING_DATE", (identifier: string) => `postingDate was not provided in the outcome payload.: ${identifier}`, ); export const IssueOutcomeNotFinalError = createDomainError( "IssueOutcomeNotFinalError", "MANUFACTURING_ISSUE_OUTCOME_NOT_FINAL", (identifier: string) => `Inventory valuation is not yet final.: ${identifier}`, ); export const DuplicateIssueOutcomeError = createDomainError( "DuplicateIssueOutcomeError", "MANUFACTURING_DUPLICATE_ISSUE_OUTCOME", (identifier: string) => `The same inventory issue outcome was already applied.: ${identifier}`, ); export const CostSummaryNotSettlableError = createDomainError( "CostSummaryNotSettlableError", "MANUFACTURING_COST_SUMMARY_NOT_SETTLABLE", (identifier: string) => `Summary is not in VARIANCE_REVIEWED.: ${identifier}`, ); export const AcknowledgmentMismatchError = createDomainError( "AcknowledgmentMismatchError", "MANUFACTURING_ACKNOWLEDGMENT_MISMATCH", (identifier: string) => `Order, summary reference, or currency does not match the reviewed handoff.: ${identifier}`, ); export const AcknowledgmentRejectedOrSupersededError = createDomainError( "AcknowledgmentRejectedOrSupersededError", "MANUFACTURING_ACKNOWLEDGMENT_REJECTED_OR_SUPERSEDED", (identifier: string) => `Downstream accounting rejected, reversed, or superseded the reviewed handoff, so the summary must remain in VARIANCE_REVIEWED.: ${identifier}`, ); export const AcknowledgmentSourceInvalidError = createDomainError( "AcknowledgmentSourceInvalidError", "MANUFACTURING_ACKNOWLEDGMENT_SOURCE_INVALID", (identifier: string) => `Payload was not produced by the downstream settlement process.: ${identifier}`, ); export const ProductionOrderNotReleasableError = createDomainError( "ProductionOrderNotReleasableError", "MANUFACTURING_PRODUCTION_ORDER_NOT_RELEASABLE", (identifier: string) => `The order is not in DRAFT.: ${identifier}`, ); export const BomNotResolvedError = createDomainError( "BomNotResolvedError", "MANUFACTURING_BOM_NOT_RESOLVED", (identifier: string) => `No valid active BOM could be selected for the order scope.: ${identifier}`, ); export const RoutingNotResolvedError = createDomainError( "RoutingNotResolvedError", "MANUFACTURING_ROUTING_NOT_RESOLVED", (identifier: string) => `No valid active routing could be selected for the order scope.: ${identifier}`, ); export const CrossCompanyMasterReferenceError = createDomainError( "CrossCompanyMasterReferenceError", "MANUFACTURING_CROSS_COMPANY_MASTER_REFERENCE", (identifier: string) => `Selected BOM or routing belongs to another company.: ${identifier}`, ); export const CrossSiteMasterReferenceError = createDomainError( "CrossSiteMasterReferenceError", "MANUFACTURING_CROSS_SITE_MASTER_REFERENCE", (identifier: string) => `Selected BOM or routing belongs to another site than the production order, even if the company matches.: ${identifier}`, ); export const PlannedMaterialCostUnavailableError = createDomainError( "PlannedMaterialCostUnavailableError", "MANUFACTURING_PLANNED_MATERIAL_COST_UNAVAILABLE", (identifier: string) => `Inventory could not resolve planned component cost for release.: ${identifier}`, ); export const ProductionOrderNotReopenableError = createDomainError( "ProductionOrderNotReopenableError", "MANUFACTURING_PRODUCTION_ORDER_NOT_REOPENABLE", (identifier: string) => `The order is not in TECHNICALLY_COMPLETE.: ${identifier}`, ); export const ReopenReasonRequiredError = createDomainError( "ReopenReasonRequiredError", "MANUFACTURING_REOPEN_REASON_REQUIRED", (identifier: string) => `No reopen reason was provided.: ${identifier}`, ); export const CostSummaryNotReopenableError = createDomainError( "CostSummaryNotReopenableError", "MANUFACTURING_COST_SUMMARY_NOT_REOPENABLE", (identifier: string) => `The linked cost summary is not in PENDING_VARIANCE_REVIEW or VARIANCE_REVIEWED.: ${identifier}`, ); export const OrderAlreadyClosedError = createDomainError( "OrderAlreadyClosedError", "MANUFACTURING_ORDER_ALREADY_CLOSED", (identifier: string) => `Administratively closed orders cannot be reopened through this workflow.: ${identifier}`, ); export const WorkOrderNotReportableError = createDomainError( "WorkOrderNotReportableError", "MANUFACTURING_WORK_ORDER_NOT_REPORTABLE", (identifier: string) => `Work order is not in IN_PROGRESS.: ${identifier}`, ); export const InvalidReportedQuantityError = createDomainError( "InvalidReportedQuantityError", "MANUFACTURING_INVALID_REPORTED_QUANTITY", (identifier: string) => `Reported completed or scrap quantity is negative.: ${identifier}`, ); export const EmptyProgressTransactionError = createDomainError( "EmptyProgressTransactionError", "MANUFACTURING_EMPTY_PROGRESS_TRANSACTION", (identifier: string) => `No positive quantity or time was reported.: ${identifier}`, ); export const ScrapHandoffRequiredError = createDomainError( "ScrapHandoffRequiredError", "MANUFACTURING_SCRAP_HANDOFF_REQUIRED", (identifier: string) => `Positive scrap was reported but required scrap-handoff data is incomplete.: ${identifier}`, ); export const ProductionOrderNotReschedulableError = createDomainError( "ProductionOrderNotReschedulableError", "MANUFACTURING_PRODUCTION_ORDER_NOT_RESCHEDULABLE", (identifier: string) => `The order is not in RELEASED.: ${identifier}`, ); export const InvalidDateRangeError = createDomainError( "InvalidDateRangeError", "MANUFACTURING_INVALID_DATE_RANGE", (identifier: string) => `Planned dates are missing or chronologically invalid.: ${identifier}`, ); export const WorkOrderNotResumableError = createDomainError( "WorkOrderNotResumableError", "MANUFACTURING_WORK_ORDER_NOT_RESUMABLE", (identifier: string) => `Work order is not in PAUSED.: ${identifier}`, ); export const ParentOrderNotExecutableError = createDomainError( "ParentOrderNotExecutableError", "MANUFACTURING_PARENT_ORDER_NOT_EXECUTABLE", (identifier: string) => `Parent production order does not allow execution.: ${identifier}`, ); export const CostSummaryNotReviewableError = createDomainError( "CostSummaryNotReviewableError", "MANUFACTURING_COST_SUMMARY_NOT_REVIEWABLE", (identifier: string) => `Summary is not in PENDING_VARIANCE_REVIEW.: ${identifier}`, ); export const ParentOrderNotTechnicallyCompleteError = createDomainError( "ParentOrderNotTechnicallyCompleteError", "MANUFACTURING_PARENT_ORDER_NOT_TECHNICALLY_COMPLETE", (identifier: string) => `Parent production order is not ready for review.: ${identifier}`, ); export const IncompleteVarianceBreakdownError = createDomainError( "IncompleteVarianceBreakdownError", "MANUFACTURING_INCOMPLETE_VARIANCE_BREAKDOWN", (identifier: string) => `The review result cannot represent the full named variance taxonomy required by the feature.: ${identifier}`, ); export const ReviewerRequiredError = createDomainError( "ReviewerRequiredError", "MANUFACTURING_REVIEWER_REQUIRED", (identifier: string) => `Reviewer identity was not provided.: ${identifier}`, ); export const VarianceCalculationFailedError = createDomainError( "VarianceCalculationFailedError", "MANUFACTURING_VARIANCE_CALCULATION_FAILED", (identifier: string) => `Final variance could not be recalculated consistently.: ${identifier}`, ); export const WorkOrderNotStartableError = createDomainError( "WorkOrderNotStartableError", "MANUFACTURING_WORK_ORDER_NOT_STARTABLE", (identifier: string) => `Work order is not in PENDING.: ${identifier}`, ); export const OperationSequenceBlockedError = createDomainError( "OperationSequenceBlockedError", "MANUFACTURING_OPERATION_SEQUENCE_BLOCKED", (identifier: string) => `Required predecessor work is not yet complete.: ${identifier}`, ); export const ProductionOrderNotTechnicallyCompletableError = createDomainError( "ProductionOrderNotTechnicallyCompletableError", "MANUFACTURING_PRODUCTION_ORDER_NOT_TECHNICALLY_COMPLETABLE", (identifier: string) => `The order is not in COMPLETED.: ${identifier}`, ); export const ExecutionExceptionRemainsError = createDomainError( "ExecutionExceptionRemainsError", "MANUFACTURING_EXECUTION_EXCEPTION_REMAINS", (identifier: string) => `Unresolved execution exceptions still exist.: ${identifier}`, ); export const PendingMaterialIssueRequestsError = createDomainError( "PendingMaterialIssueRequestsError", "MANUFACTURING_PENDING_MATERIAL_ISSUE_REQUESTS", (identifier: string) => `Material issue requests or backflush intents are still unresolved for the order.: ${identifier}`, ); export const CostSummaryNotReadyError = createDomainError( "CostSummaryNotReadyError", "MANUFACTURING_COST_SUMMARY_NOT_READY", (identifier: string) => `The linked cost summary cannot move to review.: ${identifier}`, ); export const ProductionOrderNotUnreleasableError = createDomainError( "ProductionOrderNotUnreleasableError", "MANUFACTURING_PRODUCTION_ORDER_NOT_UNRELEASABLE", (identifier: string) => `The order is not in RELEASED.: ${identifier}`, ); export const BomNotMutableError = createDomainError( "BomNotMutableError", "MANUFACTURING_BOM_NOT_MUTABLE", (identifier: string) => `The BOM is not in DRAFT.: ${identifier}`, ); export const AmbiguousEffectivityRuleError = createDomainError( "AmbiguousEffectivityRuleError", "MANUFACTURING_AMBIGUOUS_EFFECTIVITY_RULE", (identifier: string) => `Revised effectivity or default flags would create ambiguous selection behavior.: ${identifier}`, ); export const ProductionOrderNotMutableError = createDomainError( "ProductionOrderNotMutableError", "MANUFACTURING_PRODUCTION_ORDER_NOT_MUTABLE", (identifier: string) => `The order is not in DRAFT.: ${identifier}`, ); export const RoutingNotMutableError = createDomainError( "RoutingNotMutableError", "MANUFACTURING_ROUTING_NOT_MUTABLE", (identifier: string) => `The routing is not in DRAFT.: ${identifier}`, ); export const InvalidOverheadMethodError = createDomainError( "InvalidOverheadMethodError", "MANUFACTURING_INVALID_OVERHEAD_METHOD", (identifier: string) => `Overhead method is not supported.: ${identifier}`, ); export const CompanyScopeRequiredError = createDomainError( "CompanyScopeRequiredError", "MANUFACTURING_COMPANY_SCOPE_REQUIRED", (identifier: string) => `Company scope was not provided: ${identifier}`, ); export const ItemReferenceRequiredError = createDomainError( "ItemReferenceRequiredError", "MANUFACTURING_ITEM_REFERENCE_REQUIRED", (identifier: string) => `Parent or child item reference is missing.: ${identifier}`, ); export const BomReferenceRequiredError = createDomainError( "BomReferenceRequiredError", "MANUFACTURING_BOM_REFERENCE_REQUIRED", (identifier: string) => `BOM reference was not provided.: ${identifier}`, ); export const EffectivityDateRequiredError = createDomainError( "EffectivityDateRequiredError", "MANUFACTURING_EFFECTIVITY_DATE_REQUIRED", (identifier: string) => `Effectivity date was not provided.: ${identifier}`, ); export const BomNotEffectiveOnDateError = createDomainError( "BomNotEffectiveOnDateError", "MANUFACTURING_BOM_NOT_EFFECTIVE_ON_DATE", (identifier: string) => `The requested BOM version is not valid on the specified effectivity date.: ${identifier}`, ); export const ChildBomNotResolvedError = createDomainError( "ChildBomNotResolvedError", "MANUFACTURING_CHILD_BOM_NOT_RESOLVED", (identifier: string) => `A manufactured child item required recursive expansion but no active effective child BOM could be resolved.: ${identifier}`, ); export const BomCircularReferenceDetectedError = createDomainError( "BomCircularReferenceDetectedError", "MANUFACTURING_BOM_CIRCULAR_REFERENCE_DETECTED", (identifier: string) => `The explosion encountered a direct or indirect circular BOM reference.: ${identifier}`, ); export const ParentItemRequiredError = createDomainError( "ParentItemRequiredError", "MANUFACTURING_PARENT_ITEM_REQUIRED", (identifier: string) => `Parent item reference was not provided.: ${identifier}`, ); export const StatusFilterRequiredError = createDomainError( "StatusFilterRequiredError", "MANUFACTURING_STATUS_FILTER_REQUIRED", (identifier: string) => `At least one status filter value must be provided: ${identifier}`, ); export const SiteScopeRequiredError = createDomainError( "SiteScopeRequiredError", "MANUFACTURING_SITE_SCOPE_REQUIRED", (identifier: string) => `Company or site reference was not provided.: ${identifier}`, ); export const ProductionOrderReferenceRequiredError = createDomainError( "ProductionOrderReferenceRequiredError", "MANUFACTURING_PRODUCTION_ORDER_REFERENCE_REQUIRED", (identifier: string) => `Production-order reference was not provided.: ${identifier}`, ); export const WorkCenterReferenceRequiredError = createDomainError( "WorkCenterReferenceRequiredError", "MANUFACTURING_WORK_CENTER_REFERENCE_REQUIRED", (identifier: string) => `Work-center reference was not provided.: ${identifier}`, );