Skip to content

Project Data Model

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

interface

Links a {@link ResourceEntity} to a {@link TaskEntity}, representing the resource’s involvement in that task.

export interface AssignmentEntity {
/** Unique assignment identifier. */
readonly id: AssignmentId;
/** The task this assignment belongs to. */
readonly taskId: TaskId;
/** The resource assigned to the task. */
readonly resourceId: ResourceId;
/** Allocation units. Accepts either `100` or `1.0` for 100 % of the resource capacity. */
readonly allocationUnits: number;
/** Assignment work, in hours. */
readonly workHours?: number;
/** Description of what the resource is responsible for. */
readonly responsibility: string;
}
MemberType / returnRequiredDefaultDescription
idstringYesUnique assignment identifier.
taskIdstringYesThe task this assignment belongs to.
resourceIdstringYesThe resource assigned to the task.
allocationUnitsnumberYesAllocation units. Accepts either 100 or 1.0 for 100 % of the resource capacity.
workHoursnumber | undefinedNoAssignment work, in hours.
responsibilitystringYesDescription of what the resource is responsible for.

Related types: AssignmentId, ResourceId, TaskId

type

Unique identifier for a task–resource assignment.

export type AssignmentId = EntityId;

Related types: EntityId

interface

Read/write store for {@link AssignmentEntity} instances. Maintains indexes for fast lookup by task or resource.

export interface AssignmentStore {
/** Returns all assignments. */
getAll(): readonly AssignmentEntity[];
/** Looks up an assignment by its id. */
getById(assignmentId: AssignmentId): AssignmentEntity | undefined;
/** Returns all assignments for a given task. */
getByTaskId(taskId: TaskId): readonly AssignmentEntity[];
/** Returns all assignments for a given resource. */
getByResourceId(resourceId: ResourceId): readonly AssignmentEntity[];
/** Replaces the entire assignment list, rebuilding all indexes. */
replaceAll(assignments: readonly AssignmentEntity[]): void;
/** Replaces only the assignments for a specific task, keeping others intact. */
replaceTaskAssignments(taskId: TaskId, assignments: readonly AssignmentEntity[]): void;
}
MemberType / returnRequiredDefaultDescription
getAll()readonly AssignmentEntity[]YesReturns all assignments.
getById(assignmentId: AssignmentId)AssignmentEntity | undefinedYesLooks up an assignment by its id.
getByTaskId(taskId: TaskId)readonly AssignmentEntity[]YesReturns all assignments for a given task.
getByResourceId(resourceId: ResourceId)readonly AssignmentEntity[]YesReturns all assignments for a given resource.
replaceAll(assignments: readonly AssignmentEntity[])voidYesReplaces the entire assignment list, rebuilding all indexes.
replaceTaskAssignments(taskId: TaskId, assignments: readonly AssignmentEntity[])voidYesReplaces only the assignments for a specific task, keeping others intact.

Related types: AssignmentEntity, AssignmentId, ResourceId, TaskId

type

Unique identifier for a baseline snapshot.

export type BaselineId = EntityId;

Related types: EntityId

interface

A point-in-time snapshot of the entire project schedule. Baselines allow users to track schedule drift over time.

export interface BaselineSnapshot {
/** Unique baseline identifier. */
readonly id: BaselineId;
/** Human-readable baseline name (e.g. `"Sprint 1 Plan"`). */
readonly name: string;
/** When this baseline was captured. */
readonly capturedAt: ISODateTimeString;
/** Per-task snapshots at capture time. */
readonly tasks: readonly BaselineTaskSnapshot[];
}
MemberType / returnRequiredDefaultDescription
idstringYesUnique baseline identifier.
namestringYesHuman-readable baseline name (e.g. "Sprint 1 Plan").
capturedAt${number}-${number}-${number}T${string}YesWhen this baseline was captured.
tasksreadonly BaselineTaskSnapshot[]YesPer-task snapshots at capture time.

Related types: BaselineId, BaselineTaskSnapshot

interface

A snapshot of a single task’s dates at the time a baseline was captured. Used to compare planned vs. actual progress.

export interface BaselineTaskSnapshot {
/** The task this snapshot refers to. */
readonly taskId: TaskId;
/** Baseline start date. */
readonly startDate: ISODateString;
/** Baseline end date. */
readonly endDate: ISODateString;
/** Baseline task duration stored canonically in hours. */
readonly duration: number;
/** Baseline completion percentage. */
readonly progressPercent: number;
}
MemberType / returnRequiredDefaultDescription
taskIdstringYesThe task this snapshot refers to.
startDateISODateStringYesBaseline start date.
endDateISODateStringYesBaseline end date.
durationnumberYesBaseline task duration stored canonically in hours.
progressPercentnumberYesBaseline completion percentage.

Related types: TaskId

function

Creates a JSON-safe deep copy of a project snapshot.

export function cloneProjectSnapshot(project: ProjectSnapshot): ProjectSnapshot;
ParameterTypeRequiredDefaultDescription
projectProjectSnapshotYes

Related types: ProjectSnapshot

function

Builds packaged task-type choices, optionally restricted by project policy.

export function createTaskTypeOptions(allowedTaskTypes?: readonly TaskType[]): TaskTypeOption[];
ParameterTypeRequiredDefaultDescription
allowedTaskTypesreadonly TaskType[] | undefinedNo

Related types: TaskType, TaskTypeOption

interface

A directed link between two tasks that constrains their scheduling order. The scheduler uses dependencies to compute task start/end dates.

export interface DependencyEntity {
/** Unique dependency identifier. */
readonly id: DependencyId;
/** The task that must complete (or start) first. */
readonly predecessorTaskId: TaskId;
/** The task whose schedule depends on the predecessor. */
readonly successorTaskId: TaskId;
/** Relationship type — see {@link DependencyType}. */
readonly type: DependencyType;
/** Lead (negative) or lag (positive) applied to the link; calendar basis is controlled by scheduling options. */
readonly lagDays: number;
}
MemberType / returnRequiredDefaultDescription
idstringYesUnique dependency identifier.
predecessorTaskIdstringYesThe task that must complete (or start) first.
successorTaskIdstringYesThe task whose schedule depends on the predecessor.
typeDependencyTypeYesRelationship type — see {@link DependencyType}.
lagDaysnumberYesLead (negative) or lag (positive) applied to the link; calendar basis is controlled by scheduling options.

Related types: DependencyId, DependencyType, TaskId

type

Unique identifier for a dependency link between two tasks.

export type DependencyId = EntityId;

Related types: EntityId

type

Defines the logical relationship between a predecessor and successor task.

  • 'finish-to-start' (FS) — successor starts after predecessor finishes.
  • 'start-to-start' (SS) — successor starts when predecessor starts.
  • 'finish-to-finish' (FF) — successor finishes when predecessor finishes.
  • 'start-to-finish' (SF) — successor finishes when predecessor starts.
export type DependencyType =
| 'finish-to-start'
| 'start-to-start'
| 'finish-to-finish'
| 'start-to-finish';

type

Opaque string identifier used across Gantt entities.

export type EntityId = string;

function

Serializes a project snapshot into JSON without adding persistence semantics.

export function exportProjectSnapshot(project: ProjectSnapshot, options: ProjectSnapshotJsonOptions = {}): string;
ParameterTypeRequiredDefaultDescription
projectProjectSnapshotYes
optionsProjectSnapshotJsonOptionsNo{}

Related types: ProjectSnapshot, ProjectSnapshotJsonOptions

class

Default in-memory implementation of {@link AssignmentStore}. Maintains by-id, by-task, and by-resource indexes that are rebuilt on every write operation.

export class InMemoryAssignmentStore {
constructor(assignments: readonly AssignmentEntity[] = []);
getAll(): readonly AssignmentEntity[];
getById(assignmentId: AssignmentId): AssignmentEntity | undefined;
getByTaskId(taskId: TaskId): readonly AssignmentEntity[];
getByResourceId(resourceId: ResourceId): readonly AssignmentEntity[];
replaceAll(assignments: readonly AssignmentEntity[]): void;
replaceTaskAssignments(taskId: TaskId, assignments: readonly AssignmentEntity[]): void;
}
MemberType / returnRequiredDefaultDescription
assignmentsAssignmentEntity[]Yes[]
assignmentsByIdMap<string, AssignmentEntity>Yesnew Map<AssignmentId, AssignmentEntity>()
assignmentsByTaskIdMap<string, AssignmentEntity[]>Yesnew Map<TaskId, AssignmentEntity[]>()
assignmentsByResourceIdMap<string, AssignmentEntity[]>Yesnew Map<ResourceId, AssignmentEntity[]>()
getAll()readonly AssignmentEntity[]Yes
getById(assignmentId: AssignmentId)AssignmentEntity | undefinedYes
getByTaskId(taskId: TaskId)readonly AssignmentEntity[]Yes
getByResourceId(resourceId: ResourceId)readonly AssignmentEntity[]Yes
replaceAll(assignments: readonly AssignmentEntity[])voidYes
replaceTaskAssignments(taskId: TaskId, assignments: readonly AssignmentEntity[])voidYes
rebuildIndexes()voidYes

Related types: AssignmentEntity, AssignmentId, ResourceId, TaskId

class

Default in-memory implementation of {@link ResourceStore}.

export class InMemoryResourceStore {
constructor(resources: readonly ResourceEntity[] = []);
getAll(): readonly ResourceEntity[];
getById(resourceId: ResourceId): ResourceEntity | undefined;
replaceAll(resources: readonly ResourceEntity[]): void;
}
MemberType / returnRequiredDefaultDescription
resourcesResourceEntity[]Yes[]
resourcesByIdMap<string, ResourceEntity>Yesnew Map<ResourceId, ResourceEntity>()
getAll()readonly ResourceEntity[]Yes
getById(resourceId: ResourceId)ResourceEntity | undefinedYes
replaceAll(resources: readonly ResourceEntity[])voidYes

Related types: ResourceEntity, ResourceId

class

Default in-memory implementation of {@link TaskStore}. Maintains parent–child indexes and task mutation state.

export class InMemoryTaskStore {
constructor(tasks: readonly TaskEntity[] = []);
getAll(): readonly TaskEntity[];
getTaskRevision(): number;
getById(taskId: TaskId): TaskEntity | undefined;
getOrderedRows(): readonly TaskTreeRow[];
getRoots(): readonly TaskEntity[];
getChildren(parentId: TaskId): readonly TaskEntity[];
getParent(taskId: TaskId): TaskEntity | undefined;
hasChildren(taskId: TaskId): boolean;
getIndentLevel(taskId: TaskId): number;
updateTask(taskId: TaskId, patch: TaskUpdate): TaskEntity;
replaceAll(tasks: readonly TaskEntity[]): void;
}
MemberType / returnRequiredDefaultDescription
allTasksTaskEntity[]Yes[]
tasksByIdMap<string, TaskEntity>Yesnew Map<TaskId, TaskEntity>()
childrenByParentIdMap<string | null, TaskEntity[]>Yesnew Map<TaskId | null, TaskEntity[]>()
parentByIdMap<string, string | null>Yesnew Map<TaskId, TaskId | null>()
depthByIdMap<string, number>Yesnew Map<TaskId, number>()
taskRevisionnumberYes0
getAll()readonly TaskEntity[]Yes
getTaskRevision()numberYes
getById(taskId: TaskId)TaskEntity | undefinedYes
getOrderedRows()readonly TaskTreeRow[]Yes
getRoots()readonly TaskEntity[]Yes
getChildren(parentId: TaskId)readonly TaskEntity[]Yes
getParent(taskId: TaskId)TaskEntity | undefinedYes
hasChildren(taskId: TaskId)booleanYes
getIndentLevel(taskId: TaskId)numberYes
updateTask(taskId: TaskId, patch: TaskUpdate)TaskEntityYes
replaceAll(tasks: readonly TaskEntity[])voidYes

Related types: TaskEntity, TaskId, TaskTreeRow, TaskUpdate

function

Parses and lightly validates a JSON project snapshot.

export function parseProjectSnapshotJson(json: string): ProjectSnapshotParseResult;
ParameterTypeRequiredDefaultDescription
jsonstringYes

Related types: ProjectSnapshotParseResult

interface

Complete state of the Gantt project at a single point in time. This is the primary input to the {@link GanttPlugin} — pass it via the grid’s gantt, ganttDependencies, ganttCalendars, etc. properties.

export interface ProjectSnapshot {
/** Project identifier. */
readonly id: EntityId;
/** Project name. */
readonly name: string;
/** Semantic version of the project data schema. */
readonly version: string;
/** Currency code used for cost calculations (e.g. `"USD"`). */
readonly currency: string;
/** Default IANA time zone for the project. */
readonly timeZone: string;
/** Calendar used by default for new tasks. */
readonly primaryCalendarId: CalendarId;
/** Project duration display and working-time conversion settings. */
readonly durationSettings?: DurationSettings;
/** Timestamp of the last modification. */
readonly updatedAt: ISODateTimeString;
/** Reporting date used to calculate Microsoft Project-style task status. Defaults to today. */
readonly statusDate?: ISODateString;
/** All tasks in the project. */
readonly tasks: readonly TaskEntity[];
/** All dependency links between tasks. */
readonly dependencies: readonly DependencyEntity[];
/** All available resources. */
readonly resources: readonly ResourceEntity[];
/** All task–resource assignments. */
readonly assignments: readonly AssignmentEntity[];
/** All working calendars. */
readonly calendars: readonly CalendarEntity[];
/** Historical baseline snapshots. */
readonly baselines: readonly BaselineSnapshot[];
}
MemberType / returnRequiredDefaultDescription
idstringYesProject identifier.
namestringYesProject name.
versionstringYesSemantic version of the project data schema.
currencystringYesCurrency code used for cost calculations (e.g. "USD").
timeZonestringYesDefault IANA time zone for the project.
primaryCalendarIdCalendarIdYesCalendar used by default for new tasks.
durationSettingsDurationSettings | undefinedNoProject duration display and working-time conversion settings.
updatedAt${number}-${number}-${number}T${string}YesTimestamp of the last modification.
statusDateISODateString | undefinedNoReporting date used to calculate Microsoft Project-style task status. Defaults to today.
tasksreadonly TaskEntity[]YesAll tasks in the project.
dependenciesreadonly DependencyEntity[]YesAll dependency links between tasks.
resourcesreadonly ResourceEntity[]YesAll available resources.
assignmentsreadonly AssignmentEntity[]YesAll task–resource assignments.
calendarsreadonly CalendarEntity[]YesAll working calendars.
baselinesreadonly BaselineSnapshot[]YesHistorical baseline snapshots.

Related types: AssignmentEntity, BaselineSnapshot, DependencyEntity, EntityId, ResourceEntity, TaskEntity

interface

export interface ProjectSnapshotJsonOptions {
/** Indentation passed to `JSON.stringify` for readable exports. */
readonly space?: number | string;
}
MemberType / returnRequiredDefaultDescription
spacestring | number | undefinedNoIndentation passed to JSON.stringify for readable exports.

interface

export interface ProjectSnapshotParseFailure {
readonly ok: false;
readonly error: string;
}
MemberType / returnRequiredDefaultDescription
okfalseYes
errorstringYes

type

export type ProjectSnapshotParseResult = ProjectSnapshotParseSuccess | ProjectSnapshotParseFailure;

Related types: ProjectSnapshotParseFailure, ProjectSnapshotParseSuccess

interface

export interface ProjectSnapshotParseSuccess {
readonly ok: true;
readonly project: ProjectSnapshot;
}
MemberType / returnRequiredDefaultDescription
oktrueYes
projectProjectSnapshotYes

Related types: ProjectSnapshot

function

Keeps the zero-duration milestone transition reversible.

A positive duration cannot remain a milestone, while task and summary types otherwise retain their existing ownership and validation rules.

export function resolveTaskTypeAfterDurationEdit(currentType: TaskType, durationHours: number): TaskType;
ParameterTypeRequiredDefaultDescription
currentTypeTaskTypeYes
durationHoursnumberYes

Related types: TaskType

interface

A person, team, or piece of equipment that can be assigned to tasks.

export interface ResourceEntity {
/** Unique resource identifier. */
readonly id: ResourceId;
/** Display name of the resource. */
readonly name: string;
/** Optional profile image URL displayed in resource-oriented views. */
readonly avatarUrl?: string;
/** Role or job title. */
readonly role: string;
/** Working calendar for this resource. */
readonly calendarId: CalendarId;
/** Maximum allocation capacity. Accepts either `100` or `1.0` for 100 %. */
readonly allocationCapacity: number;
/** Cost per hour in the project currency. */
readonly hourlyCost: number;
}
MemberType / returnRequiredDefaultDescription
idstringYesUnique resource identifier.
namestringYesDisplay name of the resource.
avatarUrlstring | undefinedNoOptional profile image URL displayed in resource-oriented views.
rolestringYesRole or job title.
calendarIdCalendarIdYesWorking calendar for this resource.
allocationCapacitynumberYesMaximum allocation capacity. Accepts either 100 or 1.0 for 100 %.
hourlyCostnumberYesCost per hour in the project currency.

Related types: ResourceId

type

Unique identifier for a resource (person or equipment).

export type ResourceId = EntityId;

Related types: EntityId

interface

Read/write store for {@link ResourceEntity} instances. Provides lookup by id and bulk replacement.

export interface ResourceStore {
/** Returns all resources. */
getAll(): readonly ResourceEntity[];
/** Looks up a resource by its id. */
getById(resourceId: ResourceId): ResourceEntity | undefined;
/** Replaces the entire resource list. */
replaceAll(resources: readonly ResourceEntity[]): void;
}
MemberType / returnRequiredDefaultDescription
getAll()readonly ResourceEntity[]YesReturns all resources.
getById(resourceId: ResourceId)ResourceEntity | undefinedYesLooks up a resource by its id.
replaceAll(resources: readonly ResourceEntity[])voidYesReplaces the entire resource list.

Related types: ResourceEntity, ResourceId

constant

export const TASK_TYPE_LABELS: Readonly<Record<TaskType, string>>;

Related types: TaskType

constant

Canonical task kinds in the order used by packaged editors.

export const TASK_TYPE_VALUES: readonly ["task", "milestone", "summary"];

type

Scheduling constraint applied to a task’s start or finish date. The scheduler engine honours these constraints when computing the schedule.

export type TaskConstraintType =
| 'start-no-earlier-than'
| 'start-no-later-than'
| 'finish-no-earlier-than'
| 'finish-no-later-than'
| 'must-start-on'
| 'must-finish-on';

type

Determines which task variable remains fixed when work, duration, or units change. Mirrors the common Microsoft Project task type model.

RevoGrid applies the model during schedule calculation and task/assignment mutation. The edit matrix is deterministic and formula-based; it intentionally does not mirror every Microsoft Project prompt or per-assignment side-effect.

export type TaskEffortMode = 'fixed-duration' | 'fixed-work' | 'fixed-units';

interface

Represents a single task (work item) in the Gantt project. Tasks form a tree structure via {@link parentId} and are the primary data source for the Gantt timeline.

export interface TaskEntity {
/** Unique task identifier. */
readonly id: TaskId;
/** Project this task belongs to. */
readonly projectId: EntityId;
/** Parent task id, or `null` for root-level tasks. */
readonly parentId: TaskId | null;
/** Work Breakdown Structure code (e.g. `"1.2.3"`). */
readonly wbsCode: string;
/** Human-readable task name. */
readonly name: string;
/** Determines scheduling behaviour — see {@link TaskType}. */
readonly type: TaskType;
/** Optional user-authored workflow state — see {@link TaskWorkflowStatus}. */
readonly workflowStatus?: TaskWorkflowStatus;
/** Planned start date (inclusive). */
readonly startDate: ISODateString;
/** Planned end date (inclusive). */
readonly endDate: ISODateString;
/** Planned task duration stored canonically in hours. */
readonly duration: number;
/** Unit retained only for authored/display formatting; it does not change storage. */
readonly durationUnit?: DurationUnit;
/** When true, duration is continuous elapsed time and ignores working calendars. */
readonly durationIsElapsed?: boolean;
/** Task type used for work/duration/unit calculations. Defaults to `fixed-duration`. */
readonly effortMode?: TaskEffortMode;
/** Whether resource changes should preserve total work where the task type allows it. */
readonly effortDriven?: boolean;
/** Planned work for the task, in hours. */
readonly workHours?: number;
/** Unit retained for Work display and editing; canonical storage remains hours. */
readonly workUnit?: DurationUnit;
/** Remaining duration stored canonically in hours; used when progress rescheduling is enabled. */
readonly remainingDuration?: number;
/** Date work actually started; anchors the schedule only under progress-aware rescheduling. */
readonly actualStartDate?: ISODateString;
/** Date work actually finished; always pins completed work to the recorded finish. */
readonly actualFinishDate?: ISODateString;
/** Non-working gaps inside the task span. */
readonly splitRanges?: readonly TaskSplitRange[];
/** When `true`, authored dates are preserved and dependency violations become diagnostics. */
readonly manuallyScheduled?: boolean;
/** When `true`, the task is excluded from scheduling and critical-path analysis. */
readonly inactive?: boolean;
/** Leveling priority from 0 to 1000. Higher priority tasks are protected first. Defaults to 500. */
readonly priority?: number;
/** Whether automatic resource leveling may delay this task. Defaults to true. */
readonly canLevel?: boolean;
/** When `true`, packaged Gantt task mutations are rejected for this task. */
readonly locked?: boolean;
/** Existing resource leveling delay in calendar days. Defaults to 0. */
readonly levelingDelayDays?: number;
/** Optional scheduling constraint type — see {@link TaskConstraintType}. */
readonly constraintType?: TaskConstraintType;
/** Date associated with the scheduling constraint. */
readonly constraintDate?: ISODateString;
/** Deadline date — tasks finishing after this date are flagged. */
readonly deadlineDate?: ISODateString;
/** Completion percentage (0–100). */
readonly progressPercent: number;
/** Calendar governing working days and holidays for this task. */
readonly calendarId: CalendarId;
/** Whether this task lies on the critical path. */
readonly isCritical: boolean;
/** Optional free-text notes attached to the task. */
readonly notes?: string;
/** Arbitrary tags for categorisation or filtering. */
readonly tags: readonly string[];
}
MemberType / returnRequiredDefaultDescription
idstringYesUnique task identifier.
projectIdstringYesProject this task belongs to.
parentIdstring | nullYesParent task id, or null for root-level tasks.
wbsCodestringYesWork Breakdown Structure code (e.g. "1.2.3").
namestringYesHuman-readable task name.
typeTaskTypeYesDetermines scheduling behaviour — see {@link TaskType}.
workflowStatusTaskWorkflowStatus | undefinedNoOptional user-authored workflow state — see {@link TaskWorkflowStatus}.
startDateISODateStringYesPlanned start date (inclusive).
endDateISODateStringYesPlanned end date (inclusive).
durationnumberYesPlanned task duration stored canonically in hours.
durationUnitDurationUnit | undefinedNoUnit retained only for authored/display formatting; it does not change storage.
durationIsElapsedboolean | undefinedNoWhen true, duration is continuous elapsed time and ignores working calendars.
effortModeTaskEffortMode | undefinedNoTask type used for work/duration/unit calculations. Defaults to fixed-duration.
effortDrivenboolean | undefinedNoWhether resource changes should preserve total work where the task type allows it.
workHoursnumber | undefinedNoPlanned work for the task, in hours.
workUnitDurationUnit | undefinedNoUnit retained for Work display and editing; canonical storage remains hours.
remainingDurationnumber | undefinedNoRemaining duration stored canonically in hours; used when progress rescheduling is enabled.
actualStartDateISODateString | undefinedNoDate work actually started; anchors the schedule only under progress-aware rescheduling.
actualFinishDateISODateString | undefinedNoDate work actually finished; always pins completed work to the recorded finish.
splitRangesreadonly TaskSplitRange[] | undefinedNoNon-working gaps inside the task span.
manuallyScheduledboolean | undefinedNoWhen true, authored dates are preserved and dependency violations become diagnostics.
inactiveboolean | undefinedNoWhen true, the task is excluded from scheduling and critical-path analysis.
prioritynumber | undefinedNoLeveling priority from 0 to 1000. Higher priority tasks are protected first. Defaults to 500.
canLevelboolean | undefinedNoWhether automatic resource leveling may delay this task. Defaults to true.
lockedboolean | undefinedNoWhen true, packaged Gantt task mutations are rejected for this task.
levelingDelayDaysnumber | undefinedNoExisting resource leveling delay in calendar days. Defaults to 0.
constraintTypeTaskConstraintType | undefinedNoOptional scheduling constraint type — see {@link TaskConstraintType}.
constraintDateISODateString | undefinedNoDate associated with the scheduling constraint.
deadlineDateISODateString | undefinedNoDeadline date — tasks finishing after this date are flagged.
progressPercentnumberYesCompletion percentage (0–100).
calendarIdCalendarIdYesCalendar governing working days and holidays for this task.
isCriticalbooleanYesWhether this task lies on the critical path.
notesstring | undefinedNoOptional free-text notes attached to the task.
tagsreadonly string[]YesArbitrary tags for categorisation or filtering.

Related types: EntityId, TaskConstraintType, TaskEffortMode, TaskId, TaskSplitRange, TaskType, TaskWorkflowStatus

type

Unique identifier for a task within a project.

export type TaskId = EntityId;

Related types: EntityId

interface

Date range where work is intentionally split and the task should not consume work. Split ranges extend the computed finish because the same work is spread over more calendar time.

export interface TaskSplitRange {
/** Split start date (inclusive). */
readonly startDate: ISODateString;
/** Split end date (inclusive). */
readonly endDate: ISODateString;
}
MemberType / returnRequiredDefaultDescription
startDateISODateStringYesSplit start date (inclusive).
endDateISODateStringYesSplit end date (inclusive).

type

Microsoft Project-style calculated schedule health for a task.

export type TaskStatus = 'complete' | 'on-schedule' | 'late' | 'future-task';

interface

Read/write store that manages the hierarchical task list. Handles parent–child relationships and incremental task updates.

export interface TaskStore {
/** Returns all tasks in insertion order. */
getAll(): readonly TaskEntity[];
/** Monotonically increasing revision counter bumped on every task data change. */
getTaskRevision(): number;
/** Returns every task as a {@link TaskTreeRow} in canonical authored tree order. */
getOrderedRows(): readonly TaskTreeRow[];
/** Looks up a task by its id. */
getById(taskId: TaskId): TaskEntity | undefined;
/** Returns top-level (root) tasks. */
getRoots(): readonly TaskEntity[];
/** Returns direct children of the given parent task. */
getChildren(parentId: TaskId): readonly TaskEntity[];
/** Returns the parent task, or `undefined` for root tasks. */
getParent(taskId: TaskId): TaskEntity | undefined;
/** Returns `true` if the task has at least one child. */
hasChildren(taskId: TaskId): boolean;
/** Returns the nesting depth of a task in the tree hierarchy. */
getIndentLevel(taskId: TaskId): number;
/** Applies a partial update to a task and returns the updated entity. */
updateTask(taskId: TaskId, patch: TaskUpdate): TaskEntity;
/** Replaces the entire task list, rebuilding internal indexes. */
replaceAll(tasks: readonly TaskEntity[]): void;
}
MemberType / returnRequiredDefaultDescription
getAll()readonly TaskEntity[]YesReturns all tasks in insertion order.
getTaskRevision()numberYesMonotonically increasing revision counter bumped on every task data change.
getOrderedRows()readonly TaskTreeRow[]YesReturns every task as a {@link TaskTreeRow} in canonical authored tree order.
getById(taskId: TaskId)TaskEntity | undefinedYesLooks up a task by its id.
getRoots()readonly TaskEntity[]YesReturns top-level (root) tasks.
getChildren(parentId: TaskId)readonly TaskEntity[]YesReturns direct children of the given parent task.
getParent(taskId: TaskId)TaskEntity | undefinedYesReturns the parent task, or undefined for root tasks.
hasChildren(taskId: TaskId)booleanYesReturns true if the task has at least one child.
getIndentLevel(taskId: TaskId)numberYesReturns the nesting depth of a task in the tree hierarchy.
updateTask(taskId: TaskId, patch: TaskUpdate)TaskEntityYesApplies a partial update to a task and returns the updated entity.
replaceAll(tasks: readonly TaskEntity[])voidYesReplaces the entire task list, rebuilding internal indexes.

Related types: TaskEntity, TaskId, TaskTreeRow, TaskUpdate

interface

A task together with its canonical position in the authored tree. Grid visibility, expansion, sorting, filtering, and selection live in the RevoGrid runtime layer, not in this domain store.

export interface TaskTreeRow {
/** The underlying task entity. */
readonly task: TaskEntity;
/** Nesting depth (0 for root tasks). */
readonly depth: number;
/** Whether the task has child tasks. */
readonly hasChildren: boolean;
/** Zero-based index in the canonical flattened tree. */
readonly index: number;
}
MemberType / returnRequiredDefaultDescription
taskTaskEntityYesThe underlying task entity.
depthnumberYesNesting depth (0 for root tasks).
hasChildrenbooleanYesWhether the task has child tasks.
indexnumberYesZero-based index in the canonical flattened tree.

Related types: TaskEntity

type

Determines how a task is treated by the scheduling engine.

  • 'summary' — a parent task whose dates roll up from its children.
  • 'task' — a regular schedulable work item with its own duration.
  • 'milestone' — a zero-duration marker for a key date or deliverable.
export type TaskType = 'summary' | 'task' | 'milestone';

interface

export interface TaskTypeOption {
readonly label: string;
readonly value: TaskType;
}
MemberType / returnRequiredDefaultDescription
labelstringYes
valueTaskTypeYes

Related types: TaskType

type

Partial update payload for mutable fields of a {@link TaskEntity}. Only the listed properties may be changed via {@link TaskStore.updateTask}.

export type TaskUpdate = Partial<
Pick<
TaskEntity,
| 'name'
| 'workflowStatus'
| 'type'
| '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'
>
>;

Related types: TaskEntity

type

User-authored workflow state kept separately from calculated schedule health.

export type TaskWorkflowStatus = 'not-started' | 'in-progress' | 'done' | 'blocked';