Scheduling And Diagnostics
This page documents 38 public symbols exported by @revolist/revogrid-enterprise.
AutoDependencyAdjustment
Section titled “AutoDependencyAdjustment”interface
An auto-scheduled task was moved by dependencies while warning mode is enabled.
export interface AutoDependencyAdjustment { readonly code: 'auto-dependency-adjustment'; readonly taskId: TaskId; readonly dependencyId: string; readonly dependencyType: DependencyEntity['type']; readonly requiredStartDate: ISODateString; readonly authoredStartDate: ISODateString; readonly resolvedStartDate: ISODateString; readonly message: string;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
code | "auto-dependency-adjustment" | Yes | — | |
taskId | string | Yes | — | |
dependencyId | string | Yes | — | |
dependencyType | DependencyType | Yes | — | |
requiredStartDate | ISODateString | Yes | — | |
authoredStartDate | ISODateString | Yes | — | |
resolvedStartDate | ISODateString | Yes | — | |
message | string | Yes | — |
Related types: DependencyEntity, TaskId
calculateTaskStatus
Section titled “calculateTaskStatus”function
Calculates Microsoft Project-style reporting status without changing schedule data.
export function calculateTaskStatus(task: ScheduledTask, statusDate: ISODateString, calendar: CalendarEntity | null, excludeHolidaysFromDuration: boolean): TaskStatus;| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
task | ScheduledTask | Yes | — | |
statusDate | ISODateString | Yes | — | |
calendar | CalendarEntity | null | Yes | — | |
excludeHolidaysFromDuration | boolean | Yes | — |
Related types: ScheduledTask, TaskStatus
ConstraintWindowConflict
Section titled “ConstraintWindowConflict”interface
A soft constraint (window-based) conflicted with a dependency requirement.
export interface ConstraintWindowConflict { readonly code: 'constraint-window-conflict'; readonly taskId: TaskId; readonly constraintType: Exclude< TaskConstraintType, 'must-start-on' | 'must-finish-on' >; readonly constraintDate: ISODateString; readonly requiredStartDate: ISODateString; readonly attemptedStartDate: ISODateString; readonly resolvedStartDate: ISODateString; readonly message: string;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
code | "constraint-window-conflict" | Yes | — | |
taskId | string | Yes | — | |
constraintType | "start-no-earlier-than" | "start-no-later-than" | "finish-no-earlier-than" | "finish-no-later-than" | Yes | — | |
constraintDate | ISODateString | Yes | — | |
requiredStartDate | ISODateString | Yes | — | |
attemptedStartDate | ISODateString | Yes | — | |
resolvedStartDate | ISODateString | Yes | — | |
message | string | Yes | — |
Related types: TaskConstraintType, TaskId
createDependencyGraph
Section titled “createDependencyGraph”function
Builds a {@link DependencyGraph} from the given tasks and dependencies.
Dependencies that reference tasks not in taskIds are silently ignored.
export function createDependencyGraph(taskIds: readonly TaskId[], dependencies: readonly DependencyEntity[]): DependencyGraph;| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
taskIds | readonly string[] | Yes | — | - All task ids to include in the graph. |
dependencies | readonly DependencyEntity[] | Yes | — | - Dependency links to process. |
Returns: A new dependency graph ready for topological sorting.
Related types: DependencyEntity, DependencyGraph, TaskId
createSchedulerEngine
Section titled “createSchedulerEngine”function
Creates the scheduler engine facade used by grid state, mutation services, tests, and demos.
export function createSchedulerEngine(): SchedulerEngine;Related types: SchedulerEngine
DeadlineMissedConflict
Section titled “DeadlineMissedConflict”interface
A task finishes after its deadline date.
export interface DeadlineMissedConflict { readonly code: 'deadline-missed'; readonly taskId: TaskId; readonly deadlineDate: ISODateString; readonly resolvedFinishDate: ISODateString; readonly message: string;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
code | "deadline-missed" | Yes | — | |
taskId | string | Yes | — | |
deadlineDate | ISODateString | Yes | — | |
resolvedFinishDate | ISODateString | Yes | — | |
message | string | Yes | — |
Related types: TaskId
DependencyConstraintConflict
Section titled “DependencyConstraintConflict”interface
A dependency requirement conflicted with an explicit constraint on the same task.
export interface DependencyConstraintConflict { readonly code: 'dependency-constraint-conflict'; readonly taskId: TaskId; readonly dependencyId: string; readonly dependencyType: DependencyEntity['type']; readonly constraintType: TaskConstraintType; readonly requiredStartDate: ISODateString; readonly resolvedStartDate: ISODateString; readonly message: string;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
code | "dependency-constraint-conflict" | Yes | — | |
taskId | string | Yes | — | |
dependencyId | string | Yes | — | |
dependencyType | DependencyType | Yes | — | |
constraintType | TaskConstraintType | Yes | — | |
requiredStartDate | ISODateString | Yes | — | |
resolvedStartDate | ISODateString | Yes | — | |
message | string | Yes | — |
Related types: DependencyEntity, TaskConstraintType, TaskId
DependencyCycle
Section titled “DependencyCycle”interface
Represents a cycle detected in the dependency graph. Contains the task ids that form the cycle.
export interface DependencyCycle { /** Task ids involved in the cycle. */ readonly taskIds: readonly TaskId[]; /** Dependency ids that form the detected cycle path. */ readonly dependencyIds: readonly DependencyId[];}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
taskIds | readonly string[] | Yes | — | Task ids involved in the cycle. |
dependencyIds | readonly string[] | Yes | — | Dependency ids that form the detected cycle path. |
Related types: DependencyId, TaskId
DependencyGraph
Section titled “DependencyGraph”interface
A directed acyclic graph of task dependencies. Maps each task to its outgoing dependencies and tracks in-degree counts for topological sorting.
export interface DependencyGraph { /** All task ids participating in the graph. */ readonly taskIds: readonly TaskId[]; /** Outgoing dependencies keyed by predecessor task id. */ readonly outgoingByTaskId: ReadonlyMap<TaskId, readonly DependencyEntity[]>; /** Number of incoming dependencies for each task. */ readonly incomingCountByTaskId: ReadonlyMap<TaskId, number>;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
taskIds | readonly string[] | Yes | — | All task ids participating in the graph. |
outgoingByTaskId | ReadonlyMap<string, readonly DependencyEntity[]> | Yes | — | Outgoing dependencies keyed by predecessor task id. |
incomingCountByTaskId | ReadonlyMap<string, number> | Yes | — | Number of incoming dependencies for each task. |
Related types: DependencyEntity, TaskId
FinishConstraintConflict
Section titled “FinishConstraintConflict”interface
Final resolved finish violates a finish-based constraint (commonly due to splits).
export interface FinishConstraintConflict { readonly code: 'finish-constraint-conflict'; readonly taskId: TaskId; readonly constraintType: Extract<TaskConstraintType, 'must-finish-on' | 'finish-no-earlier-than' | 'finish-no-later-than'>; readonly constraintDate: ISODateString; readonly resolvedStartDate: ISODateString; readonly resolvedFinishDate: ISODateString; readonly message: string;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
code | "finish-constraint-conflict" | Yes | — | |
taskId | string | Yes | — | |
constraintType | "finish-no-earlier-than" | "finish-no-later-than" | "must-finish-on" | Yes | — | |
constraintDate | ISODateString | Yes | — | |
resolvedStartDate | ISODateString | Yes | — | |
resolvedFinishDate | ISODateString | Yes | — | |
message | string | Yes | — |
Related types: TaskConstraintType, TaskId
HardConstraintConflict
Section titled “HardConstraintConflict”interface
A hard constraint (must-start-on / must-finish-on) could not be honoured.
export interface HardConstraintConflict { readonly code: 'hard-constraint-conflict'; readonly taskId: TaskId; readonly constraintType: Extract<TaskConstraintType, 'must-start-on' | 'must-finish-on'>; readonly constraintDate: ISODateString; readonly resolvedStartDate: ISODateString; readonly message: string;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
code | "hard-constraint-conflict" | Yes | — | |
taskId | string | Yes | — | |
constraintType | "must-start-on" | "must-finish-on" | Yes | — | |
constraintDate | ISODateString | Yes | — | |
resolvedStartDate | ISODateString | Yes | — | |
message | string | Yes | — |
Related types: TaskConstraintType, TaskId
InvalidTaskConstraintIssue
Section titled “InvalidTaskConstraintIssue”interface
A task constraint could not be satisfied as specified.
export interface InvalidTaskConstraintIssue { readonly code: 'invalid-task-constraint'; readonly message: string; readonly taskIds: readonly TaskId[];}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
code | "invalid-task-constraint" | Yes | — | |
message | string | Yes | — | |
taskIds | readonly string[] | Yes | — |
Related types: TaskId
ManualDependencyViolation
Section titled “ManualDependencyViolation”interface
A manually scheduled task violates an active dependency requirement.
export interface ManualDependencyViolation { readonly code: 'manual-dependency-violation'; readonly taskId: TaskId; readonly dependencyId: string; readonly dependencyType: DependencyEntity['type']; readonly requiredStartDate: ISODateString; readonly authoredStartDate: ISODateString; readonly resolvedStartDate: ISODateString; readonly message: string;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
code | "manual-dependency-violation" | Yes | — | |
taskId | string | Yes | — | |
dependencyId | string | Yes | — | |
dependencyType | DependencyType | Yes | — | |
requiredStartDate | ISODateString | Yes | — | |
authoredStartDate | ISODateString | Yes | — | |
resolvedStartDate | ISODateString | Yes | — | |
message | string | Yes | — |
Related types: DependencyEntity, TaskId
MissingDependencyTaskIssue
Section titled “MissingDependencyTaskIssue”interface
A dependency references a task that does not exist in the project.
export interface MissingDependencyTaskIssue { readonly code: 'missing-dependency-task'; readonly message: string; readonly taskIds: readonly TaskId[]; readonly dependencyIds: readonly string[];}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
code | "missing-dependency-task" | Yes | — | |
message | string | Yes | — | |
taskIds | readonly string[] | Yes | — | |
dependencyIds | readonly string[] | Yes | — |
Related types: TaskId
ResolvedSchedulerOptions
Section titled “ResolvedSchedulerOptions”interface
export interface ResolvedSchedulerOptions { readonly excludeHolidaysFromDuration: boolean; readonly taskModeDefault: 'auto' | 'manual'; readonly autoDependencyViolationBehavior: 'clamp' | 'warn'; readonly manualDependencyViolationBehavior: 'warn' | 'ignore'; readonly lagCalendar: 'calendar-days' | 'working-days'; readonly scheduleFrom: 'project-start' | 'project-finish'; readonly projectStartDate?: ISODateString; readonly projectFinishDate?: ISODateString; readonly resourceLeveling: 'off' | 'warn' | 'auto'; readonly resourceLevelingWithinSlack: boolean; readonly effortModeDefault: TaskEffortMode; readonly progressRescheduling: 'off' | 'remaining-duration';}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
excludeHolidaysFromDuration | boolean | Yes | — | |
taskModeDefault | "manual" | "auto" | Yes | — | |
autoDependencyViolationBehavior | "clamp" | "warn" | Yes | — | |
manualDependencyViolationBehavior | "warn" | "ignore" | Yes | — | |
lagCalendar | "calendar-days" | "working-days" | Yes | — | |
scheduleFrom | "project-start" | "project-finish" | Yes | — | |
projectStartDate | ISODateString | undefined | No | — | |
projectFinishDate | ISODateString | undefined | No | — | |
resourceLeveling | "auto" | "warn" | "off" | Yes | — | |
resourceLevelingWithinSlack | boolean | Yes | — | |
effortModeDefault | TaskEffortMode | Yes | — | |
progressRescheduling | "off" | "remaining-duration" | Yes | — |
Related types: TaskEffortMode
resolveTaskEdit
Section titled “resolveTaskEdit”function
Validates and resolves a user-initiated inline edit on a task field. Handles parsing, schedule-aware validation, and derived-field protection.
export function resolveTaskEdit(task: TaskEntity, scheduledTask: ScheduledTask, field: string, value: unknown, options: TaskEditOptions = {}): TaskEditResult;| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
task | TaskEntity | Yes | — | |
scheduledTask | ScheduledTask | Yes | — | |
field | string | Yes | — | |
value | unknown | Yes | — | |
options | TaskEditOptions | No | {} |
Related types: ScheduledTask, TaskEditOptions, TaskEditResult, TaskEntity
ResourceLevelingAdjustmentConflict
Section titled “ResourceLevelingAdjustmentConflict”interface
Optional resource leveling shifted a task from its dependency/constraint date.
export interface ResourceLevelingAdjustmentConflict { readonly code: 'resource-leveling-adjustment'; readonly taskId: TaskId; readonly resourceId?: ResourceId; readonly previousStartDate: ISODateString; readonly previousEndDate: ISODateString; readonly resolvedStartDate: ISODateString; readonly resolvedEndDate: ISODateString; readonly message: string;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
code | "resource-leveling-adjustment" | Yes | — | |
taskId | string | Yes | — | |
resourceId | string | undefined | No | — | |
previousStartDate | ISODateString | Yes | — | |
previousEndDate | ISODateString | Yes | — | |
resolvedStartDate | ISODateString | Yes | — | |
resolvedEndDate | ISODateString | Yes | — | |
message | string | Yes | — |
Related types: ResourceId, TaskId
ResourceOverallocationConflict
Section titled “ResourceOverallocationConflict”interface
One resource is assigned above capacity on a scheduled date.
export interface ResourceOverallocationConflict { readonly code: 'resource-overallocation'; readonly taskId: TaskId; readonly resourceId: ResourceId; readonly date: ISODateString; readonly allocatedUnits: number; readonly capacityUnits: number; readonly taskIds: readonly TaskId[]; readonly message: string;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
code | "resource-overallocation" | Yes | — | |
taskId | string | Yes | — | |
resourceId | string | Yes | — | |
date | ISODateString | Yes | — | |
allocatedUnits | number | Yes | — | |
capacityUnits | number | Yes | — | |
taskIds | readonly string[] | Yes | — | |
message | string | Yes | — |
Related types: ResourceId, TaskId
ScheduledTask
Section titled “ScheduledTask”interface
A task after being processed by the scheduling engine. Extends the raw {@link TaskEntity} with computed scheduling metadata.
export interface ScheduledTask extends Omit<TaskEntity, 'type' | 'manuallyScheduled' | 'inactive'> { /** Resolved task type. */ readonly type: ScheduledTaskKind; /** Whether the task was manually scheduled (bypassing auto-scheduling). */ readonly manuallyScheduled: boolean; /** Whether the task is excluded from scheduling. */ readonly inactive: boolean; /** Microsoft Project-style calculated task status. */ readonly status: TaskStatus; /** How the scheduler determined this task's dates. */ readonly scheduleOrigin: ScheduleOrigin; /** Earliest scheduled start after dependencies, constraints, actuals, and leveling are applied. */ readonly earlyStartDate: ISODateString; /** Earliest scheduled finish after dependencies, constraints, actuals, and leveling are applied. */ readonly earlyFinishDate: ISODateString; /** Latest start that preserves the computed project finish. */ readonly lateStartDate: ISODateString; /** Latest finish that preserves the computed project finish. */ readonly lateFinishDate: ISODateString; /** Total slack (float) in calendar days before the task delays the project end. */ readonly totalSlackDays: number;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
type | ScheduledTaskKind | Yes | — | Resolved task type. |
manuallyScheduled | boolean | Yes | — | Whether the task was manually scheduled (bypassing auto-scheduling). |
inactive | boolean | Yes | — | Whether the task is excluded from scheduling. |
status | TaskStatus | Yes | — | Microsoft Project-style calculated task status. |
scheduleOrigin | ScheduleOrigin | Yes | — | How the scheduler determined this task’s dates. |
earlyStartDate | ISODateString | Yes | — | Earliest scheduled start after dependencies, constraints, actuals, and leveling are applied. |
earlyFinishDate | ISODateString | Yes | — | Earliest scheduled finish after dependencies, constraints, actuals, and leveling are applied. |
lateStartDate | ISODateString | Yes | — | Latest start that preserves the computed project finish. |
lateFinishDate | ISODateString | Yes | — | Latest finish that preserves the computed project finish. |
totalSlackDays | number | Yes | — | Total slack (float) in calendar days before the task delays the project end. |
Related types: ScheduleOrigin, ScheduledTaskKind, TaskEntity, TaskStatus
ScheduledTaskKind
Section titled “ScheduledTaskKind”type
Classification of a scheduled task’s type after engine processing.
export type ScheduledTaskKind = 'task' | 'summary' | 'milestone';ScheduleOrigin
Section titled “ScheduleOrigin”type
Indicates how the scheduler determined a task’s dates. This is intentionally user-facing: row/tooling code can explain whether a task moved because of dependencies, a hard constraint, manual scheduling, entered actuals, or optional resource leveling.
export type ScheduleOrigin = 'normalized' | 'dependency' | 'constraint' | 'manual' | 'rollup' | 'actual' | 'leveling';SchedulerConflict
Section titled “SchedulerConflict”type
Union of all conflict types the scheduler can report.
export type SchedulerConflict = | ConstraintWindowConflict | DependencyConstraintConflict | HardConstraintConflict | FinishConstraintConflict | ManualDependencyViolation | AutoDependencyAdjustment | DeadlineMissedConflict | ResourceOverallocationConflict | ResourceLevelingAdjustmentConflict;Related types: AutoDependencyAdjustment, ConstraintWindowConflict, DeadlineMissedConflict, DependencyConstraintConflict, FinishConstraintConflict, HardConstraintConflict, ManualDependencyViolation, ResourceLevelingAdjustmentConflict, ResourceOverallocationConflict
SchedulerCycleIssue
Section titled “SchedulerCycleIssue”interface
A dependency cycle was detected during scheduling.
export interface SchedulerCycleIssue { readonly code: 'dependency-cycle'; /** Human-readable description of the cycle. */ readonly message: string; /** Task ids involved in the cycle. */ readonly taskIds: readonly TaskId[]; /** Dependency ids that form the detected cycle path. */ readonly dependencyIds: readonly string[];}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
code | "dependency-cycle" | Yes | — | |
message | string | Yes | — | Human-readable description of the cycle. |
taskIds | readonly string[] | Yes | — | Task ids involved in the cycle. |
dependencyIds | readonly string[] | Yes | — | Dependency ids that form the detected cycle path. |
Related types: TaskId
SchedulerDataValidationCode
Section titled “SchedulerDataValidationCode”type
export type SchedulerDataValidationCode = | 'duplicate-task-id' | 'duplicate-dependency-id' | 'duplicate-resource-id' | 'duplicate-assignment-id' | 'missing-task-calendar' | 'missing-resource-calendar' | 'missing-assignment-task' | 'missing-assignment-resource' | 'invalid-working-calendar' | 'invalid-task-date-range' | 'invalid-task-progress' | 'invalid-task-work' | 'invalid-task-units' | 'invalid-assignment-work' | 'invalid-assignment-units' | 'invalid-resource-units' | 'invalid-resource-cost';SchedulerDataValidationIssue
Section titled “SchedulerDataValidationIssue”interface
Data is structurally invalid but can usually still be rendered for correction.
export interface SchedulerDataValidationIssue { readonly code: SchedulerDataValidationCode; readonly message: string; readonly taskIds: readonly TaskId[]; readonly dependencyIds: readonly string[]; readonly resourceIds: readonly ResourceId[]; readonly assignmentIds: readonly string[]; readonly calendarIds: readonly CalendarId[];}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
code | SchedulerDataValidationCode | Yes | — | |
message | string | Yes | — | |
taskIds | readonly string[] | Yes | — | |
dependencyIds | readonly string[] | Yes | — | |
resourceIds | readonly string[] | Yes | — | |
assignmentIds | readonly string[] | Yes | — | |
calendarIds | readonly CalendarId[] | Yes | — |
Related types: ResourceId, SchedulerDataValidationCode, TaskId
SchedulerEngine
Section titled “SchedulerEngine”interface
The scheduling engine recalculates task dates based on dependencies, constraints, and calendar rules. It also performs validation and computes the critical path.
export interface SchedulerEngine { /** * Recalculates the full project schedule. * @param project - Complete project snapshot. * @param options - Optional scheduling parameters. * @returns Computed schedule with issues and conflicts. */ recalculate(project: ProjectSnapshot, options?: SchedulerOptions): SchedulingResult; /** * Validates task/dependency data without running a full schedule. * @returns Any structural issues found. */ validate( tasks: readonly TaskEntity[], dependencies: readonly DependencyEntity[], calendars: readonly CalendarEntity[], resources?: readonly ResourceEntity[], assignments?: readonly AssignmentEntity[], ): readonly SchedulerIssue[];}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
recalculate(project: ProjectSnapshot, options?: SchedulerOptions) | SchedulingResult | Yes | — | Recalculates the full project schedule. |
validate(tasks: readonly TaskEntity[], dependencies: readonly DependencyEntity[], calendars: readonly CalendarEntity[], resources?: readonly ResourceEntity[], assignments?: readonly AssignmentEntity[]) | readonly SchedulerIssue[] | Yes | — | Validates task/dependency data without running a full schedule. |
Related types: AssignmentEntity, DependencyEntity, ProjectSnapshot, ResourceEntity, SchedulerIssue, SchedulerOptions, SchedulingResult, TaskEntity
SchedulerIssue
Section titled “SchedulerIssue”type
Union of all issue types the scheduler can report.
export type SchedulerIssue = | SchedulerCycleIssue | MissingDependencyTaskIssue | InvalidTaskConstraintIssue | SchedulerDataValidationIssue;Related types: InvalidTaskConstraintIssue, MissingDependencyTaskIssue, SchedulerCycleIssue, SchedulerDataValidationIssue
SchedulerOptions
Section titled “SchedulerOptions”interface
Options passed to {@link SchedulerEngine.recalculate}.
export interface SchedulerOptions { /** When true, duration calculations skip holidays and non-working weekdays. */ readonly excludeHolidaysFromDuration?: boolean; /** Default task mode when a source row does not explicitly set `taskMode`. */ readonly taskModeDefault?: 'auto' | 'manual'; /** Policy for auto dependency violations. Both modes keep effective dates dependency-valid; `warn` also emits adjustment conflicts. */ readonly autoDependencyViolationBehavior?: 'clamp' | 'warn'; /** Whether manually scheduled dependency violations should be reported. */ readonly manualDependencyViolationBehavior?: 'warn' | 'ignore'; /** Calendar basis used for dependency lag/lead. */ readonly lagCalendar?: 'calendar-days' | 'working-days'; /** Direction of scheduling. */ readonly scheduleFrom?: 'project-start' | 'project-finish'; /** Optional project start anchor used by forward scheduling policies. */ readonly projectStartDate?: ISODateString; /** Optional project finish anchor used by backward scheduling policies. */ readonly projectFinishDate?: ISODateString; /** Resource capacity policy. `warn` reports over-allocation; `auto` shifts eligible forward-scheduled auto tasks. */ readonly resourceLeveling?: 'off' | 'warn' | 'auto'; /** When true, auto-leveling only delays tasks up to their pre-leveling total slack. */ readonly resourceLevelingWithinSlack?: boolean; /** Default task type used for effort calculations. */ readonly effortModeDefault?: TaskEffortMode; /** Progress-aware scheduling policy for actual start and remaining work. Actual finish is always authoritative. */ readonly progressRescheduling?: 'off' | 'remaining-duration';}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
excludeHolidaysFromDuration | boolean | undefined | No | — | When true, duration calculations skip holidays and non-working weekdays. |
taskModeDefault | "manual" | "auto" | undefined | No | — | Default task mode when a source row does not explicitly set taskMode. |
autoDependencyViolationBehavior | "clamp" | "warn" | undefined | No | — | Policy for auto dependency violations. Both modes keep effective dates dependency-valid; warn also emits adjustment conflicts. |
manualDependencyViolationBehavior | "warn" | "ignore" | undefined | No | — | Whether manually scheduled dependency violations should be reported. |
lagCalendar | "calendar-days" | "working-days" | undefined | No | — | Calendar basis used for dependency lag/lead. |
scheduleFrom | "project-start" | "project-finish" | undefined | No | — | Direction of scheduling. |
projectStartDate | ISODateString | undefined | No | — | Optional project start anchor used by forward scheduling policies. |
projectFinishDate | ISODateString | undefined | No | — | Optional project finish anchor used by backward scheduling policies. |
resourceLeveling | "auto" | "warn" | "off" | undefined | No | — | Resource capacity policy. warn reports over-allocation; auto shifts eligible forward-scheduled auto tasks. |
resourceLevelingWithinSlack | boolean | undefined | No | — | When true, auto-leveling only delays tasks up to their pre-leveling total slack. |
effortModeDefault | TaskEffortMode | undefined | No | — | Default task type used for effort calculations. |
progressRescheduling | "off" | "remaining-duration" | undefined | No | — | Progress-aware scheduling policy for actual start and remaining work. Actual finish is always authoritative. |
Related types: TaskEffortMode
SchedulingResult
Section titled “SchedulingResult”type
Result of running the scheduler on a project. Contains the computed task list, detected issues, conflicts, and the set of dependency ids on the critical path.
export type SchedulingResult = | { readonly ok: true; readonly tasks: readonly ScheduledTask[]; readonly tasksById: ReadonlyMap<TaskId, ScheduledTask>; readonly issues: readonly SchedulerIssue[]; readonly conflicts: readonly SchedulerConflict[]; readonly criticalDependencyIds: ReadonlySet<string>; } | { readonly ok: false; readonly tasks: readonly ScheduledTask[]; readonly tasksById: ReadonlyMap<TaskId, ScheduledTask>; readonly issues: readonly SchedulerIssue[]; readonly conflicts: readonly SchedulerConflict[]; readonly criticalDependencyIds: ReadonlySet<string>; };Related types: ScheduledTask, SchedulerConflict, SchedulerIssue, TaskId
TaskConstraintTypeEditValue
Section titled “TaskConstraintTypeEditValue”type
export type TaskConstraintTypeEditValue = '' | TaskConstraintType;Related types: TaskConstraintType
TaskEditFailure
Section titled “TaskEditFailure”interface
Failed task edit — contains the error code and a human-readable message.
export interface TaskEditFailure { readonly ok: false; /** Error classification: invalid field name, invalid value, or readonly derived field. */ readonly code: 'invalid-field' | 'invalid-value' | 'readonly-derived-field'; /** Explanation of why the edit was rejected. */ readonly message: string;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
ok | false | Yes | — | |
code | "invalid-field" | "invalid-value" | "readonly-derived-field" | Yes | — | Error classification: invalid field name, invalid value, or readonly derived field. |
message | string | Yes | — | Explanation of why the edit was rejected. |
TaskEditLabelOverrides
Section titled “TaskEditLabelOverrides”interface
export interface TaskEditLabelOverrides { readonly workflowStatus?: Partial<Record<TaskWorkflowStatus, string>>; readonly taskMode?: Partial<Record<TaskModeEditValue, string>>; readonly effortMode?: Partial<Record<TaskEffortMode, string>>; readonly constraintType?: Partial<Record<TaskConstraintTypeEditValue, string>>;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
workflowStatus | Partial<Record<TaskWorkflowStatus, string>> | undefined | No | — | |
taskMode | Partial<Record<TaskModeEditValue, string>> | undefined | No | — | |
effortMode | Partial<Record<TaskEffortMode, string>> | undefined | No | — | |
constraintType | Partial<Record<TaskConstraintTypeEditValue, string>> | undefined | No | — |
Related types: TaskConstraintTypeEditValue, TaskEffortMode, TaskModeEditValue, TaskWorkflowStatus
TaskEditOptions
Section titled “TaskEditOptions”interface
export interface TaskEditOptions { readonly labels?: TaskEditLabelOverrides; readonly durationSettings?: ResolvedDurationSettings; readonly allowedTaskTypes?: readonly TaskType[];}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
labels | TaskEditLabelOverrides | undefined | No | — | |
durationSettings | ResolvedDurationSettings | undefined | No | — | |
allowedTaskTypes | readonly TaskType[] | undefined | No | — |
Related types: TaskEditLabelOverrides, TaskType
TaskEditResult
Section titled “TaskEditResult”type
Check ok to distinguish a validated patch from a rejected edit.
export type TaskEditResult = TaskEditSuccess | TaskEditFailure;Related types: TaskEditFailure, TaskEditSuccess
TaskEditSuccess
Section titled “TaskEditSuccess”interface
Successful task edit — contains the validated patch to apply.
export interface TaskEditSuccess { readonly ok: true; /** Validated partial update ready to be applied to the task. */ readonly patch: TaskUpdate;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
ok | true | Yes | — | |
patch | Partial<Pick<TaskEntity, "type" | "name" | "workflowStatus" | "startDate" | "endDate" | "duration" | "durationUnit" | "durationIsElapsed" | "workHours" | "workUnit" | "remainingDuration" | "actualStartDate" | "actualFinishDate" | "splitRanges" | "effortMode" | "effortDriven" | "progressPercent" | "manuallyScheduled" | "inactive" | "priority" | "canLevel" | "levelingDelayDays" | "constraintType" | "constraintDate" | "deadlineDate" | "notes" | "calendarId" | "tags">> | Yes | — | Validated partial update ready to be applied to the task. |
Related types: TaskUpdate
TaskModeEditValue
Section titled “TaskModeEditValue”type
export type TaskModeEditValue = 'auto' | 'manual';topologicallySortDependencyGraph
Section titled “topologicallySortDependencyGraph”function
Performs a topological sort on the dependency graph using Kahn’s algorithm.
If a cycle is detected, returns ok: false with the involved task ids.
export function topologicallySortDependencyGraph(graph: DependencyGraph): TopologicalSortResult;| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
graph | DependencyGraph | Yes | — | - The dependency graph to sort. |
Returns: Sorted task order on success, or cycle information on failure.
Related types: DependencyGraph, TopologicalSortResult
TopologicalSortResult
Section titled “TopologicalSortResult”type
Result of a topological sort on a {@link DependencyGraph}.
When ok is true, order contains all tasks in dependency order.
When ok is false, cycle identifies the offending tasks.
export type TopologicalSortResult = | { readonly ok: true; readonly order: readonly TaskId[]; readonly cycle: null; } | { readonly ok: false; readonly order: readonly TaskId[]; readonly cycle: DependencyCycle; };Related types: DependencyCycle, TaskId