Skip to content

Scheduling And Diagnostics

This page documents 38 public symbols exported by @revolist/revogrid-enterprise.

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;
}
MemberType / returnRequiredDefaultDescription
code"auto-dependency-adjustment"Yes
taskIdstringYes
dependencyIdstringYes
dependencyTypeDependencyTypeYes
requiredStartDateISODateStringYes
authoredStartDateISODateStringYes
resolvedStartDateISODateStringYes
messagestringYes

Related types: DependencyEntity, TaskId

function

Calculates Microsoft Project-style reporting status without changing schedule data.

export function calculateTaskStatus(task: ScheduledTask, statusDate: ISODateString, calendar: CalendarEntity | null, excludeHolidaysFromDuration: boolean): TaskStatus;
ParameterTypeRequiredDefaultDescription
taskScheduledTaskYes
statusDateISODateStringYes
calendarCalendarEntity | nullYes
excludeHolidaysFromDurationbooleanYes

Related types: ScheduledTask, TaskStatus

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;
}
MemberType / returnRequiredDefaultDescription
code"constraint-window-conflict"Yes
taskIdstringYes
constraintType"start-no-earlier-than" | "start-no-later-than" | "finish-no-earlier-than" | "finish-no-later-than"Yes
constraintDateISODateStringYes
requiredStartDateISODateStringYes
attemptedStartDateISODateStringYes
resolvedStartDateISODateStringYes
messagestringYes

Related types: TaskConstraintType, TaskId

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;
ParameterTypeRequiredDefaultDescription
taskIdsreadonly string[]Yes- All task ids to include in the graph.
dependenciesreadonly DependencyEntity[]Yes- Dependency links to process.

Returns: A new dependency graph ready for topological sorting.

Related types: DependencyEntity, DependencyGraph, TaskId

function

Creates the scheduler engine facade used by grid state, mutation services, tests, and demos.

export function createSchedulerEngine(): SchedulerEngine;

Related types: SchedulerEngine

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;
}
MemberType / returnRequiredDefaultDescription
code"deadline-missed"Yes
taskIdstringYes
deadlineDateISODateStringYes
resolvedFinishDateISODateStringYes
messagestringYes

Related types: TaskId

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;
}
MemberType / returnRequiredDefaultDescription
code"dependency-constraint-conflict"Yes
taskIdstringYes
dependencyIdstringYes
dependencyTypeDependencyTypeYes
constraintTypeTaskConstraintTypeYes
requiredStartDateISODateStringYes
resolvedStartDateISODateStringYes
messagestringYes

Related types: DependencyEntity, TaskConstraintType, TaskId

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[];
}
MemberType / returnRequiredDefaultDescription
taskIdsreadonly string[]YesTask ids involved in the cycle.
dependencyIdsreadonly string[]YesDependency ids that form the detected cycle path.

Related types: DependencyId, TaskId

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>;
}
MemberType / returnRequiredDefaultDescription
taskIdsreadonly string[]YesAll task ids participating in the graph.
outgoingByTaskIdReadonlyMap<string, readonly DependencyEntity[]>YesOutgoing dependencies keyed by predecessor task id.
incomingCountByTaskIdReadonlyMap<string, number>YesNumber of incoming dependencies for each task.

Related types: DependencyEntity, TaskId

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;
}
MemberType / returnRequiredDefaultDescription
code"finish-constraint-conflict"Yes
taskIdstringYes
constraintType"finish-no-earlier-than" | "finish-no-later-than" | "must-finish-on"Yes
constraintDateISODateStringYes
resolvedStartDateISODateStringYes
resolvedFinishDateISODateStringYes
messagestringYes

Related types: TaskConstraintType, TaskId

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;
}
MemberType / returnRequiredDefaultDescription
code"hard-constraint-conflict"Yes
taskIdstringYes
constraintType"must-start-on" | "must-finish-on"Yes
constraintDateISODateStringYes
resolvedStartDateISODateStringYes
messagestringYes

Related types: TaskConstraintType, TaskId

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[];
}
MemberType / returnRequiredDefaultDescription
code"invalid-task-constraint"Yes
messagestringYes
taskIdsreadonly string[]Yes

Related types: TaskId

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;
}
MemberType / returnRequiredDefaultDescription
code"manual-dependency-violation"Yes
taskIdstringYes
dependencyIdstringYes
dependencyTypeDependencyTypeYes
requiredStartDateISODateStringYes
authoredStartDateISODateStringYes
resolvedStartDateISODateStringYes
messagestringYes

Related types: DependencyEntity, TaskId

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[];
}
MemberType / returnRequiredDefaultDescription
code"missing-dependency-task"Yes
messagestringYes
taskIdsreadonly string[]Yes
dependencyIdsreadonly string[]Yes

Related types: TaskId

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';
}
MemberType / returnRequiredDefaultDescription
excludeHolidaysFromDurationbooleanYes
taskModeDefault"manual" | "auto"Yes
autoDependencyViolationBehavior"clamp" | "warn"Yes
manualDependencyViolationBehavior"warn" | "ignore"Yes
lagCalendar"calendar-days" | "working-days"Yes
scheduleFrom"project-start" | "project-finish"Yes
projectStartDateISODateString | undefinedNo
projectFinishDateISODateString | undefinedNo
resourceLeveling"auto" | "warn" | "off"Yes
resourceLevelingWithinSlackbooleanYes
effortModeDefaultTaskEffortModeYes
progressRescheduling"off" | "remaining-duration"Yes

Related types: TaskEffortMode

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;
ParameterTypeRequiredDefaultDescription
taskTaskEntityYes
scheduledTaskScheduledTaskYes
fieldstringYes
valueunknownYes
optionsTaskEditOptionsNo{}

Related types: ScheduledTask, TaskEditOptions, TaskEditResult, TaskEntity

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;
}
MemberType / returnRequiredDefaultDescription
code"resource-leveling-adjustment"Yes
taskIdstringYes
resourceIdstring | undefinedNo
previousStartDateISODateStringYes
previousEndDateISODateStringYes
resolvedStartDateISODateStringYes
resolvedEndDateISODateStringYes
messagestringYes

Related types: ResourceId, TaskId

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;
}
MemberType / returnRequiredDefaultDescription
code"resource-overallocation"Yes
taskIdstringYes
resourceIdstringYes
dateISODateStringYes
allocatedUnitsnumberYes
capacityUnitsnumberYes
taskIdsreadonly string[]Yes
messagestringYes

Related types: ResourceId, TaskId

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;
}
MemberType / returnRequiredDefaultDescription
typeScheduledTaskKindYesResolved task type.
manuallyScheduledbooleanYesWhether the task was manually scheduled (bypassing auto-scheduling).
inactivebooleanYesWhether the task is excluded from scheduling.
statusTaskStatusYesMicrosoft Project-style calculated task status.
scheduleOriginScheduleOriginYesHow the scheduler determined this task’s dates.
earlyStartDateISODateStringYesEarliest scheduled start after dependencies, constraints, actuals, and leveling are applied.
earlyFinishDateISODateStringYesEarliest scheduled finish after dependencies, constraints, actuals, and leveling are applied.
lateStartDateISODateStringYesLatest start that preserves the computed project finish.
lateFinishDateISODateStringYesLatest finish that preserves the computed project finish.
totalSlackDaysnumberYesTotal slack (float) in calendar days before the task delays the project end.

Related types: ScheduleOrigin, ScheduledTaskKind, TaskEntity, TaskStatus

type

Classification of a scheduled task’s type after engine processing.

export type ScheduledTaskKind = 'task' | 'summary' | 'milestone';

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';

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

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[];
}
MemberType / returnRequiredDefaultDescription
code"dependency-cycle"Yes
messagestringYesHuman-readable description of the cycle.
taskIdsreadonly string[]YesTask ids involved in the cycle.
dependencyIdsreadonly string[]YesDependency ids that form the detected cycle path.

Related types: TaskId

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';

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[];
}
MemberType / returnRequiredDefaultDescription
codeSchedulerDataValidationCodeYes
messagestringYes
taskIdsreadonly string[]Yes
dependencyIdsreadonly string[]Yes
resourceIdsreadonly string[]Yes
assignmentIdsreadonly string[]Yes
calendarIdsreadonly CalendarId[]Yes

Related types: ResourceId, SchedulerDataValidationCode, TaskId

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[];
}
MemberType / returnRequiredDefaultDescription
recalculate(project: ProjectSnapshot, options?: SchedulerOptions)SchedulingResultYesRecalculates the full project schedule.
validate(tasks: readonly TaskEntity[], dependencies: readonly DependencyEntity[], calendars: readonly CalendarEntity[], resources?: readonly ResourceEntity[], assignments?: readonly AssignmentEntity[])readonly SchedulerIssue[]YesValidates task/dependency data without running a full schedule.

Related types: AssignmentEntity, DependencyEntity, ProjectSnapshot, ResourceEntity, SchedulerIssue, SchedulerOptions, SchedulingResult, TaskEntity

type

Union of all issue types the scheduler can report.

export type SchedulerIssue =
| SchedulerCycleIssue
| MissingDependencyTaskIssue
| InvalidTaskConstraintIssue
| SchedulerDataValidationIssue;

Related types: InvalidTaskConstraintIssue, MissingDependencyTaskIssue, SchedulerCycleIssue, SchedulerDataValidationIssue

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';
}
MemberType / returnRequiredDefaultDescription
excludeHolidaysFromDurationboolean | undefinedNoWhen true, duration calculations skip holidays and non-working weekdays.
taskModeDefault"manual" | "auto" | undefinedNoDefault task mode when a source row does not explicitly set taskMode.
autoDependencyViolationBehavior"clamp" | "warn" | undefinedNoPolicy for auto dependency violations. Both modes keep effective dates dependency-valid; warn also emits adjustment conflicts.
manualDependencyViolationBehavior"warn" | "ignore" | undefinedNoWhether manually scheduled dependency violations should be reported.
lagCalendar"calendar-days" | "working-days" | undefinedNoCalendar basis used for dependency lag/lead.
scheduleFrom"project-start" | "project-finish" | undefinedNoDirection of scheduling.
projectStartDateISODateString | undefinedNoOptional project start anchor used by forward scheduling policies.
projectFinishDateISODateString | undefinedNoOptional project finish anchor used by backward scheduling policies.
resourceLeveling"auto" | "warn" | "off" | undefinedNoResource capacity policy. warn reports over-allocation; auto shifts eligible forward-scheduled auto tasks.
resourceLevelingWithinSlackboolean | undefinedNoWhen true, auto-leveling only delays tasks up to their pre-leveling total slack.
effortModeDefaultTaskEffortMode | undefinedNoDefault task type used for effort calculations.
progressRescheduling"off" | "remaining-duration" | undefinedNoProgress-aware scheduling policy for actual start and remaining work. Actual finish is always authoritative.

Related types: TaskEffortMode

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

type

export type TaskConstraintTypeEditValue = '' | TaskConstraintType;

Related types: TaskConstraintType

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;
}
MemberType / returnRequiredDefaultDescription
okfalseYes
code"invalid-field" | "invalid-value" | "readonly-derived-field"YesError classification: invalid field name, invalid value, or readonly derived field.
messagestringYesExplanation of why the edit was rejected.

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>>;
}
MemberType / returnRequiredDefaultDescription
workflowStatusPartial<Record<TaskWorkflowStatus, string>> | undefinedNo
taskModePartial<Record<TaskModeEditValue, string>> | undefinedNo
effortModePartial<Record<TaskEffortMode, string>> | undefinedNo
constraintTypePartial<Record<TaskConstraintTypeEditValue, string>> | undefinedNo

Related types: TaskConstraintTypeEditValue, TaskEffortMode, TaskModeEditValue, TaskWorkflowStatus

interface

export interface TaskEditOptions {
readonly labels?: TaskEditLabelOverrides;
readonly durationSettings?: ResolvedDurationSettings;
readonly allowedTaskTypes?: readonly TaskType[];
}
MemberType / returnRequiredDefaultDescription
labelsTaskEditLabelOverrides | undefinedNo
durationSettingsResolvedDurationSettings | undefinedNo
allowedTaskTypesreadonly TaskType[] | undefinedNo

Related types: TaskEditLabelOverrides, TaskType

type

Check ok to distinguish a validated patch from a rejected edit.

export type TaskEditResult = TaskEditSuccess | TaskEditFailure;

Related types: TaskEditFailure, 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;
}
MemberType / returnRequiredDefaultDescription
oktrueYes
patchPartial<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">>YesValidated partial update ready to be applied to the task.

Related types: TaskUpdate

type

export type TaskModeEditValue = 'auto' | 'manual';

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;
ParameterTypeRequiredDefaultDescription
graphDependencyGraphYes- The dependency graph to sort.

Returns: Sorted task order on success, or cycle information on failure.

Related types: DependencyGraph, 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