// @generated — do not edit import { createDomainError } from "@tailor-platform/erp-kit/core"; export const TimecardNotFoundError = createDomainError( "TimecardNotFoundError", "TIME_TRACKING_TIMECARD_NOT_FOUND", (identifier: string) => `no Timecard exists for the given id: ${identifier}`, ); export const InvalidStatusTransitionError = createDomainError( "InvalidStatusTransitionError", "TIME_TRACKING_INVALID_STATUS_TRANSITION", (identifier: string) => `the Timecard's current status does not permit this transition: ${identifier}`, ); export const NotAssigneeError = createDomainError( "NotAssigneeError", "TIME_TRACKING_NOT_ASSIGNEE", (identifier: string) => `the resolver is not an eligible assignee of the approval step: ${identifier}`, ); export const SelfApprovalError = createDomainError( "SelfApprovalError", "TIME_TRACKING_SELF_APPROVAL", (identifier: string) => `the resolver is the requester (renamed from SELF_APPROVAL_BLOCKED): ${identifier}`, ); export const ApprovalStepFailedError = createDomainError( "ApprovalStepFailedError", "TIME_TRACKING_APPROVAL_STEP_FAILED", (identifier: string) => `the bundled approval-module step failed to resolve for any other reason: ${identifier}`, ); export const TargetNotFoundError = createDomainError( "TargetNotFoundError", "TIME_TRACKING_TARGET_NOT_FOUND", (identifier: string) => `the target does not resolve to an existing workforce entity: ${identifier}`, ); export const WorkRuleNotFoundError = createDomainError( "WorkRuleNotFoundError", "TIME_TRACKING_WORK_RULE_NOT_FOUND", (identifier: string) => `no WorkRule exists for the given id, or no WorkRule is effective for the relevant date: ${identifier}`, ); export const NotEligibleError = createDomainError( "NotEligibleError", "TIME_TRACKING_NOT_ELIGIBLE", (identifier: string) => `no in-force EligibilityRule grants the target this WorkRule on the assignment date: ${identifier}`, ); export const AssignmentOverlapError = createDomainError( "AssignmentOverlapError", "TIME_TRACKING_ASSIGNMENT_OVERLAP", (identifier: string) => `the new assignment's effective range overlaps an existing in-force assignment for the worker: ${identifier}`, ); export const AssignmentNotFoundError = createDomainError( "AssignmentNotFoundError", "TIME_TRACKING_ASSIGNMENT_NOT_FOUND", (identifier: string) => `no workforce Assignment is effective for the relevant worker/date: ${identifier}`, ); export const NoReportedBlocksError = createDomainError( "NoReportedBlocksError", "TIME_TRACKING_NO_REPORTED_BLOCKS", (identifier: string) => `There are no current ReportedTimeBlocks for the Assignment and workday to calculate from: ${identifier}`, ); export const StrategyOutputInvalidError = createDomainError( "StrategyOutputInvalidError", "TIME_TRACKING_STRATEGY_OUTPUT_INVALID", (identifier: string) => `the classification strategy produced a span with non-integer/negative minutes, an inverted interval, or a sourceReportedBlockId not among the workday's current reported blocks: ${identifier}`, ); export const NoTimecardsInPeriodError = createDomainError( "NoTimecardsInPeriodError", "TIME_TRACKING_NO_TIMECARDS_IN_PERIOD", (identifier: string) => `no Timecard matches the given period (and optional assignmentIds), so there is nothing to close: ${identifier}`, ); export const BlockNotFoundError = createDomainError( "BlockNotFoundError", "TIME_TRACKING_BLOCK_NOT_FOUND", (identifier: string) => `The target ReportedTimeBlock does not exist: ${identifier}`, ); export const BlockAlreadySupersededError = createDomainError( "BlockAlreadySupersededError", "TIME_TRACKING_BLOCK_ALREADY_SUPERSEDED", (identifier: string) => `The target block has already been superseded by a prior correction and cannot be corrected again directly: ${identifier}`, ); export const TimecardNotOpenError = createDomainError( "TimecardNotOpenError", "TIME_TRACKING_TIMECARD_NOT_OPEN", (identifier: string) => `the Timecard covering the relevant workDate is not OPEN (SUBMITTED/APPROVED/LOCKED require reopenTimecard first): ${identifier}`, ); export const CorrectionReasonRequiredError = createDomainError( "CorrectionReasonRequiredError", "TIME_TRACKING_CORRECTION_REASON_REQUIRED", (identifier: string) => `a correction reason is missing or empty: ${identifier}`, ); export const FutureIntervalError = createDomainError( "FutureIntervalError", "TIME_TRACKING_FUTURE_INTERVAL", (identifier: string) => `startAt or endAt is in the future: ${identifier}`, ); export const InvalidIntervalError = createDomainError( "InvalidIntervalError", "TIME_TRACKING_INVALID_INTERVAL", (identifier: string) => `the interval is empty or inverted — endAt must be after startAt: ${identifier}`, ); export const NonWholeMinuteIntervalError = createDomainError( "NonWholeMinuteIntervalError", "TIME_TRACKING_NON_WHOLE_MINUTE_INTERVAL", (identifier: string) => `the interval boundaries must fall on whole minutes: ${identifier}`, ); export const OverlappingBlockError = createDomainError( "OverlappingBlockError", "TIME_TRACKING_OVERLAPPING_BLOCK", (identifier: string) => `the interval overlaps an existing current WORK block for the same Assignment and workday: ${identifier}`, ); export const BlockContainmentViolationError = createDomainError( "BlockContainmentViolationError", "TIME_TRACKING_BLOCK_CONTAINMENT_VIOLATION", (identifier: string) => `a BREAK/STEP_OUT interval is not fully contained within a covering current WORK block for the same Assignment and workday: ${identifier}`, ); export const DuplicateHolidayDateError = createDomainError( "DuplicateHolidayDateError", "TIME_TRACKING_DUPLICATE_HOLIDAY_DATE", (identifier: string) => `a holiday is already registered for the given holidayDate within the same calendar: ${identifier}`, ); export const InvalidHolidayKindError = createDomainError( "InvalidHolidayKindError", "TIME_TRACKING_INVALID_HOLIDAY_KIND", (identifier: string) => `holidayKind is not one of STATUTORY / PRESCRIBED: ${identifier}`, ); export const InvalidTargetError = createDomainError( "InvalidTargetError", "TIME_TRACKING_INVALID_TARGET", (identifier: string) => `no targetId was supplied for the target: ${identifier}`, ); export const InvalidGrantError = createDomainError( "InvalidGrantError", "TIME_TRACKING_INVALID_GRANT", (identifier: string) => `the grant does not resolve to a valid WorkRule (a workRuleId is required): ${identifier}`, ); export const EffectiveDateOverlapError = createDomainError( "EffectiveDateOverlapError", "TIME_TRACKING_EFFECTIVE_DATE_OVERLAP", (identifier: string) => `the new generation's effective range overlaps an existing generation: ${identifier}`, ); export const DuplicateCalendarKeyError = createDomainError( "DuplicateCalendarKeyError", "TIME_TRACKING_DUPLICATE_CALENDAR_KEY", (identifier: string) => `a calendar is already registered with the given key: ${identifier}`, ); export const DuplicateKeyError = createDomainError( "DuplicateKeyError", "TIME_TRACKING_DUPLICATE_KEY", (identifier: string) => `a TimeEntryCode with the given key already exists: ${identifier}`, ); export const InvalidRoundingDirectionError = createDomainError( "InvalidRoundingDirectionError", "TIME_TRACKING_INVALID_ROUNDING_DIRECTION", (identifier: string) => `a rounding direction is not UP / DOWN / NEAREST: ${identifier}`, ); export const InvalidNightWindowError = createDomainError( "InvalidNightWindowError", "TIME_TRACKING_INVALID_NIGHT_WINDOW", (identifier: string) => `nightWindowStart / nightWindowEnd is outside 0-1439: ${identifier}`, ); export const InvalidTimeEntryCodeReferenceError = createDomainError( "InvalidTimeEntryCodeReferenceError", "TIME_TRACKING_INVALID_TIME_ENTRY_CODE_REFERENCE", (identifier: string) => `a premiumRatePercent entry references a TimeEntryCode that does not resolve: ${identifier}`, ); export const InvalidBlockTypeError = createDomainError( "InvalidBlockTypeError", "TIME_TRACKING_INVALID_BLOCK_TYPE", (identifier: string) => `blockType is not one of WORK, BREAK, STEP_OUT: ${identifier}`, ); export const HolidayNotFoundError = createDomainError( "HolidayNotFoundError", "TIME_TRACKING_HOLIDAY_NOT_FOUND", (identifier: string) => `no CompanyHoliday exists for the given id: ${identifier}`, ); export const EligibilityRuleNotFoundError = createDomainError( "EligibilityRuleNotFoundError", "TIME_TRACKING_ELIGIBILITY_RULE_NOT_FOUND", (identifier: string) => `no EligibilityRule exists for the given id: ${identifier}`, ); export const SoleGrantInUseError = createDomainError( "SoleGrantInUseError", "TIME_TRACKING_SOLE_GRANT_IN_USE", (identifier: string) => `the grant is the only eligibility basis for a current assignment and cannot be removed: ${identifier}`, ); export const HolidayCalendarNotFoundError = createDomainError( "HolidayCalendarNotFoundError", "TIME_TRACKING_HOLIDAY_CALENDAR_NOT_FOUND", (identifier: string) => `no HolidayCalendar exists for the given id: ${identifier}`, ); export const CalendarInUseError = createDomainError( "CalendarInUseError", "TIME_TRACKING_CALENDAR_IN_USE", (identifier: string) => `the calendar is still referenced by a CompanyHoliday or WorkRule and cannot be deleted: ${identifier}`, ); export const TimeEntryCodeNotFoundError = createDomainError( "TimeEntryCodeNotFoundError", "TIME_TRACKING_TIME_ENTRY_CODE_NOT_FOUND", (identifier: string) => `no TimeEntryCode exists for the given id: ${identifier}`, ); export const TimeEntryCodeInUseError = createDomainError( "TimeEntryCodeInUseError", "TIME_TRACKING_TIME_ENTRY_CODE_IN_USE", (identifier: string) => `the code is referenced by a WorkRule premium-category pin and cannot be deleted: ${identifier}`, ); export const WorkRuleInUseError = createDomainError( "WorkRuleInUseError", "TIME_TRACKING_WORK_RULE_IN_USE", (identifier: string) => `a current assignment references this WorkRule and it cannot be deleted: ${identifier}`, ); export const InvalidRowError = createDomainError( "InvalidRowError", "TIME_TRACKING_INVALID_ROW", (identifier: string) => `a row in the batch fails schema/enum validation: ${identifier}`, ); export const ImportSourceInvalidError = createDomainError( "ImportSourceInvalidError", "TIME_TRACKING_IMPORT_SOURCE_INVALID", (identifier: string) => `source is not a valid bulk-import source (IMPORT / IC_CARD): ${identifier}`, ); export const TimecardPeriodOverlapError = createDomainError( "TimecardPeriodOverlapError", "TIME_TRACKING_TIMECARD_PERIOD_OVERLAP", (identifier: string) => `An existing Timecard already covers an overlapping period for the same Assignment: ${identifier}`, ); export const InvalidPeriodError = createDomainError( "InvalidPeriodError", "TIME_TRACKING_INVALID_PERIOD", (identifier: string) => `periodStart is after periodEnd: ${identifier}`, ); export const InvalidRangeError = createDomainError( "InvalidRangeError", "TIME_TRACKING_INVALID_RANGE", (identifier: string) => `The provided date range is empty or end precedes start: ${identifier}`, ); export const InvalidEventTypeError = createDomainError( "InvalidEventTypeError", "TIME_TRACKING_INVALID_EVENT_TYPE", (identifier: string) => `eventType is not one of CLOCK_IN, CLOCK_OUT, BREAK_START, BREAK_END, STEP_OUT, STEP_IN: ${identifier}`, ); export const OccurredAtRequiredError = createDomainError( "OccurredAtRequiredError", "TIME_TRACKING_OCCURRED_AT_REQUIRED", (identifier: string) => `occurredAt is missing: ${identifier}`, ); export const ReopenReasonRequiredError = createDomainError( "ReopenReasonRequiredError", "TIME_TRACKING_REOPEN_REASON_REQUIRED", (identifier: string) => `Reopening from LOCKED without a supplied reason: ${identifier}`, ); export const NoEligibleApproverError = createDomainError( "NoEligibleApproverError", "TIME_TRACKING_NO_ELIGIBLE_APPROVER", (identifier: string) => `after excluding the requester, no eligible approver (timecard-approver role) remains, so the mirroring approval request could not be created: ${identifier}`, ); export const PunchNotFoundError = createDomainError( "PunchNotFoundError", "TIME_TRACKING_PUNCH_NOT_FOUND", (identifier: string) => `no TimeClockEvent exists for the given id: ${identifier}`, ); export const PunchNotVoidedError = createDomainError( "PunchNotVoidedError", "TIME_TRACKING_PUNCH_NOT_VOIDED", (identifier: string) => `the target event is not currently voided (its latest record is not a VOID): ${identifier}`, ); export const KeyImmutableError = createDomainError( "KeyImmutableError", "TIME_TRACKING_KEY_IMMUTABLE", (identifier: string) => `an attempt was made to change key once it has been referenced: ${identifier}`, ); export const PunchAlreadyVoidedError = createDomainError( "PunchAlreadyVoidedError", "TIME_TRACKING_PUNCH_ALREADY_VOIDED", (identifier: string) => `the target event's latest void record is already a VOID: ${identifier}`, ); export const InvalidSearchFilterError = createDomainError( "InvalidSearchFilterError", "TIME_TRACKING_INVALID_SEARCH_FILTER", (identifier: string) => `a supplied filter value is malformed or unrecognized: ${identifier}`, ); export const CalculatedBlockNotFoundError = createDomainError( "CalculatedBlockNotFoundError", "TIME_TRACKING_CALCULATED_BLOCK_NOT_FOUND", (identifier: string) => `no CalculatedTimeBlock exists with the supplied id: ${identifier}`, ); export const CompanyHolidayNotFoundError = createDomainError( "CompanyHolidayNotFoundError", "TIME_TRACKING_COMPANY_HOLIDAY_NOT_FOUND", (identifier: string) => `no CompanyHoliday exists with the specified id: ${identifier}`, ); export const ValidationErrorError = createDomainError( "ValidationErrorError", "TIME_TRACKING_VALIDATION_ERROR", (identifier: string) => `the supplied input is malformed, out of range, or references an unrecognized enum value: ${identifier}`, ); export const CorrectionLogEntryNotFoundError = createDomainError( "CorrectionLogEntryNotFoundError", "TIME_TRACKING_CORRECTION_LOG_ENTRY_NOT_FOUND", (identifier: string) => `no TimeCorrectionLog entry exists with the supplied id: ${identifier}`, ); export const ReportedBlockNotFoundError = createDomainError( "ReportedBlockNotFoundError", "TIME_TRACKING_REPORTED_BLOCK_NOT_FOUND", (identifier: string) => `no ReportedTimeBlock exists with the supplied id: ${identifier}`, ); export const WorkRuleAssignmentNotFoundError = createDomainError( "WorkRuleAssignmentNotFoundError", "TIME_TRACKING_WORK_RULE_ASSIGNMENT_NOT_FOUND", (identifier: string) => `no WorkRuleAssignment exists for the given id, or no assignment is in force for the relevant target/date: ${identifier}`, ); export const InvalidQueryParamsError = createDomainError( "InvalidQueryParamsError", "TIME_TRACKING_INVALID_QUERY_PARAMS", (identifier: string) => `a required query parameter is missing or malformed: ${identifier}`, ); export const InvalidPaginationCursorError = createDomainError( "InvalidPaginationCursorError", "TIME_TRACKING_INVALID_PAGINATION_CURSOR", (identifier: string) => `supplied pagination cursor is not valid for this query: ${identifier}`, );