Project Data Model
This page documents 40 public symbols exported by @revolist/revogrid-enterprise.
AssignmentEntity
Section titled “AssignmentEntity”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;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
id | string | Yes | — | Unique assignment identifier. |
taskId | string | Yes | — | The task this assignment belongs to. |
resourceId | string | Yes | — | The resource assigned to the task. |
allocationUnits | number | Yes | — | Allocation units. Accepts either 100 or 1.0 for 100 % of the resource capacity. |
workHours | number | undefined | No | — | Assignment work, in hours. |
responsibility | string | Yes | — | Description of what the resource is responsible for. |
Related types: AssignmentId, ResourceId, TaskId
AssignmentId
Section titled “AssignmentId”type
Unique identifier for a task–resource assignment.
export type AssignmentId = EntityId;Related types: EntityId
AssignmentStore
Section titled “AssignmentStore”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;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
getAll() | readonly AssignmentEntity[] | Yes | — | Returns all assignments. |
getById(assignmentId: AssignmentId) | AssignmentEntity | undefined | Yes | — | Looks up an assignment by its id. |
getByTaskId(taskId: TaskId) | readonly AssignmentEntity[] | Yes | — | Returns all assignments for a given task. |
getByResourceId(resourceId: ResourceId) | readonly AssignmentEntity[] | Yes | — | Returns all assignments for a given resource. |
replaceAll(assignments: readonly AssignmentEntity[]) | void | Yes | — | Replaces the entire assignment list, rebuilding all indexes. |
replaceTaskAssignments(taskId: TaskId, assignments: readonly AssignmentEntity[]) | void | Yes | — | Replaces only the assignments for a specific task, keeping others intact. |
Related types: AssignmentEntity, AssignmentId, ResourceId, TaskId
BaselineId
Section titled “BaselineId”type
Unique identifier for a baseline snapshot.
export type BaselineId = EntityId;Related types: EntityId
BaselineSnapshot
Section titled “BaselineSnapshot”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[];}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
id | string | Yes | — | Unique baseline identifier. |
name | string | Yes | — | Human-readable baseline name (e.g. "Sprint 1 Plan"). |
capturedAt | ${number}-${number}-${number}T${string} | Yes | — | When this baseline was captured. |
tasks | readonly BaselineTaskSnapshot[] | Yes | — | Per-task snapshots at capture time. |
Related types: BaselineId, BaselineTaskSnapshot
BaselineTaskSnapshot
Section titled “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;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
taskId | string | Yes | — | The task this snapshot refers to. |
startDate | ISODateString | Yes | — | Baseline start date. |
endDate | ISODateString | Yes | — | Baseline end date. |
duration | number | Yes | — | Baseline task duration stored canonically in hours. |
progressPercent | number | Yes | — | Baseline completion percentage. |
Related types: TaskId
cloneProjectSnapshot
Section titled “cloneProjectSnapshot”function
Creates a JSON-safe deep copy of a project snapshot.
export function cloneProjectSnapshot(project: ProjectSnapshot): ProjectSnapshot;| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
project | ProjectSnapshot | Yes | — |
Related types: ProjectSnapshot
createTaskTypeOptions
Section titled “createTaskTypeOptions”function
Builds packaged task-type choices, optionally restricted by project policy.
export function createTaskTypeOptions(allowedTaskTypes?: readonly TaskType[]): TaskTypeOption[];| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
allowedTaskTypes | readonly TaskType[] | undefined | No | — |
Related types: TaskType, TaskTypeOption
DependencyEntity
Section titled “DependencyEntity”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;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
id | string | Yes | — | Unique dependency identifier. |
predecessorTaskId | string | Yes | — | The task that must complete (or start) first. |
successorTaskId | string | Yes | — | The task whose schedule depends on the predecessor. |
type | DependencyType | Yes | — | Relationship type — see {@link DependencyType}. |
lagDays | number | Yes | — | Lead (negative) or lag (positive) applied to the link; calendar basis is controlled by scheduling options. |
Related types: DependencyId, DependencyType, TaskId
DependencyId
Section titled “DependencyId”type
Unique identifier for a dependency link between two tasks.
export type DependencyId = EntityId;Related types: EntityId
DependencyType
Section titled “DependencyType”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';EntityId
Section titled “EntityId”type
Opaque string identifier used across Gantt entities.
export type EntityId = string;exportProjectSnapshot
Section titled “exportProjectSnapshot”function
Serializes a project snapshot into JSON without adding persistence semantics.
export function exportProjectSnapshot(project: ProjectSnapshot, options: ProjectSnapshotJsonOptions = {}): string;| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
project | ProjectSnapshot | Yes | — | |
options | ProjectSnapshotJsonOptions | No | {} |
Related types: ProjectSnapshot, ProjectSnapshotJsonOptions
InMemoryAssignmentStore
Section titled “InMemoryAssignmentStore”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;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
assignments | AssignmentEntity[] | Yes | [] | |
assignmentsById | Map<string, AssignmentEntity> | Yes | new Map<AssignmentId, AssignmentEntity>() | |
assignmentsByTaskId | Map<string, AssignmentEntity[]> | Yes | new Map<TaskId, AssignmentEntity[]>() | |
assignmentsByResourceId | Map<string, AssignmentEntity[]> | Yes | new Map<ResourceId, AssignmentEntity[]>() | |
getAll() | readonly AssignmentEntity[] | Yes | — | |
getById(assignmentId: AssignmentId) | AssignmentEntity | undefined | Yes | — | |
getByTaskId(taskId: TaskId) | readonly AssignmentEntity[] | Yes | — | |
getByResourceId(resourceId: ResourceId) | readonly AssignmentEntity[] | Yes | — | |
replaceAll(assignments: readonly AssignmentEntity[]) | void | Yes | — | |
replaceTaskAssignments(taskId: TaskId, assignments: readonly AssignmentEntity[]) | void | Yes | — | |
rebuildIndexes() | void | Yes | — |
Related types: AssignmentEntity, AssignmentId, ResourceId, TaskId
InMemoryResourceStore
Section titled “InMemoryResourceStore”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;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
resources | ResourceEntity[] | Yes | [] | |
resourcesById | Map<string, ResourceEntity> | Yes | new Map<ResourceId, ResourceEntity>() | |
getAll() | readonly ResourceEntity[] | Yes | — | |
getById(resourceId: ResourceId) | ResourceEntity | undefined | Yes | — | |
replaceAll(resources: readonly ResourceEntity[]) | void | Yes | — |
Related types: ResourceEntity, ResourceId
InMemoryTaskStore
Section titled “InMemoryTaskStore”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;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
allTasks | TaskEntity[] | Yes | [] | |
tasksById | Map<string, TaskEntity> | Yes | new Map<TaskId, TaskEntity>() | |
childrenByParentId | Map<string | null, TaskEntity[]> | Yes | new Map<TaskId | null, TaskEntity[]>() | |
parentById | Map<string, string | null> | Yes | new Map<TaskId, TaskId | null>() | |
depthById | Map<string, number> | Yes | new Map<TaskId, number>() | |
taskRevision | number | Yes | 0 | |
getAll() | readonly TaskEntity[] | Yes | — | |
getTaskRevision() | number | Yes | — | |
getById(taskId: TaskId) | TaskEntity | undefined | Yes | — | |
getOrderedRows() | readonly TaskTreeRow[] | Yes | — | |
getRoots() | readonly TaskEntity[] | Yes | — | |
getChildren(parentId: TaskId) | readonly TaskEntity[] | Yes | — | |
getParent(taskId: TaskId) | TaskEntity | undefined | Yes | — | |
hasChildren(taskId: TaskId) | boolean | Yes | — | |
getIndentLevel(taskId: TaskId) | number | Yes | — | |
updateTask(taskId: TaskId, patch: TaskUpdate) | TaskEntity | Yes | — | |
replaceAll(tasks: readonly TaskEntity[]) | void | Yes | — |
Related types: TaskEntity, TaskId, TaskTreeRow, TaskUpdate
parseProjectSnapshotJson
Section titled “parseProjectSnapshotJson”function
Parses and lightly validates a JSON project snapshot.
export function parseProjectSnapshotJson(json: string): ProjectSnapshotParseResult;| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
json | string | Yes | — |
Related types: ProjectSnapshotParseResult
ProjectSnapshot
Section titled “ProjectSnapshot”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[];}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
id | string | Yes | — | Project identifier. |
name | string | Yes | — | Project name. |
version | string | Yes | — | Semantic version of the project data schema. |
currency | string | Yes | — | Currency code used for cost calculations (e.g. "USD"). |
timeZone | string | Yes | — | Default IANA time zone for the project. |
primaryCalendarId | CalendarId | Yes | — | Calendar used by default for new tasks. |
durationSettings | DurationSettings | undefined | No | — | Project duration display and working-time conversion settings. |
updatedAt | ${number}-${number}-${number}T${string} | Yes | — | Timestamp of the last modification. |
statusDate | ISODateString | undefined | No | — | Reporting date used to calculate Microsoft Project-style task status. Defaults to today. |
tasks | readonly TaskEntity[] | Yes | — | All tasks in the project. |
dependencies | readonly DependencyEntity[] | Yes | — | All dependency links between tasks. |
resources | readonly ResourceEntity[] | Yes | — | All available resources. |
assignments | readonly AssignmentEntity[] | Yes | — | All task–resource assignments. |
calendars | readonly CalendarEntity[] | Yes | — | All working calendars. |
baselines | readonly BaselineSnapshot[] | Yes | — | Historical baseline snapshots. |
Related types: AssignmentEntity, BaselineSnapshot, DependencyEntity, EntityId, ResourceEntity, TaskEntity
ProjectSnapshotJsonOptions
Section titled “ProjectSnapshotJsonOptions”interface
export interface ProjectSnapshotJsonOptions { /** Indentation passed to `JSON.stringify` for readable exports. */ readonly space?: number | string;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
space | string | number | undefined | No | — | Indentation passed to JSON.stringify for readable exports. |
ProjectSnapshotParseFailure
Section titled “ProjectSnapshotParseFailure”interface
export interface ProjectSnapshotParseFailure { readonly ok: false; readonly error: string;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
ok | false | Yes | — | |
error | string | Yes | — |
ProjectSnapshotParseResult
Section titled “ProjectSnapshotParseResult”type
export type ProjectSnapshotParseResult = ProjectSnapshotParseSuccess | ProjectSnapshotParseFailure;Related types: ProjectSnapshotParseFailure, ProjectSnapshotParseSuccess
ProjectSnapshotParseSuccess
Section titled “ProjectSnapshotParseSuccess”interface
export interface ProjectSnapshotParseSuccess { readonly ok: true; readonly project: ProjectSnapshot;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
ok | true | Yes | — | |
project | ProjectSnapshot | Yes | — |
Related types: ProjectSnapshot
resolveTaskTypeAfterDurationEdit
Section titled “resolveTaskTypeAfterDurationEdit”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;| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
currentType | TaskType | Yes | — | |
durationHours | number | Yes | — |
Related types: TaskType
ResourceEntity
Section titled “ResourceEntity”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;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
id | string | Yes | — | Unique resource identifier. |
name | string | Yes | — | Display name of the resource. |
avatarUrl | string | undefined | No | — | Optional profile image URL displayed in resource-oriented views. |
role | string | Yes | — | Role or job title. |
calendarId | CalendarId | Yes | — | Working calendar for this resource. |
allocationCapacity | number | Yes | — | Maximum allocation capacity. Accepts either 100 or 1.0 for 100 %. |
hourlyCost | number | Yes | — | Cost per hour in the project currency. |
Related types: ResourceId
ResourceId
Section titled “ResourceId”type
Unique identifier for a resource (person or equipment).
export type ResourceId = EntityId;Related types: EntityId
ResourceStore
Section titled “ResourceStore”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;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
getAll() | readonly ResourceEntity[] | Yes | — | Returns all resources. |
getById(resourceId: ResourceId) | ResourceEntity | undefined | Yes | — | Looks up a resource by its id. |
replaceAll(resources: readonly ResourceEntity[]) | void | Yes | — | Replaces the entire resource list. |
Related types: ResourceEntity, ResourceId
TASK_TYPE_LABELS
Section titled “TASK_TYPE_LABELS”constant
export const TASK_TYPE_LABELS: Readonly<Record<TaskType, string>>;Related types: TaskType
TASK_TYPE_VALUES
Section titled “TASK_TYPE_VALUES”constant
Canonical task kinds in the order used by packaged editors.
export const TASK_TYPE_VALUES: readonly ["task", "milestone", "summary"];TaskConstraintType
Section titled “TaskConstraintType”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';TaskEffortMode
Section titled “TaskEffortMode”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';TaskEntity
Section titled “TaskEntity”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[];}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
id | string | Yes | — | Unique task identifier. |
projectId | string | Yes | — | Project this task belongs to. |
parentId | string | null | Yes | — | Parent task id, or null for root-level tasks. |
wbsCode | string | Yes | — | Work Breakdown Structure code (e.g. "1.2.3"). |
name | string | Yes | — | Human-readable task name. |
type | TaskType | Yes | — | Determines scheduling behaviour — see {@link TaskType}. |
workflowStatus | TaskWorkflowStatus | undefined | No | — | Optional user-authored workflow state — see {@link TaskWorkflowStatus}. |
startDate | ISODateString | Yes | — | Planned start date (inclusive). |
endDate | ISODateString | Yes | — | Planned end date (inclusive). |
duration | number | Yes | — | Planned task duration stored canonically in hours. |
durationUnit | DurationUnit | undefined | No | — | Unit retained only for authored/display formatting; it does not change storage. |
durationIsElapsed | boolean | undefined | No | — | When true, duration is continuous elapsed time and ignores working calendars. |
effortMode | TaskEffortMode | undefined | No | — | Task type used for work/duration/unit calculations. Defaults to fixed-duration. |
effortDriven | boolean | undefined | No | — | Whether resource changes should preserve total work where the task type allows it. |
workHours | number | undefined | No | — | Planned work for the task, in hours. |
workUnit | DurationUnit | undefined | No | — | Unit retained for Work display and editing; canonical storage remains hours. |
remainingDuration | number | undefined | No | — | Remaining duration stored canonically in hours; used when progress rescheduling is enabled. |
actualStartDate | ISODateString | undefined | No | — | Date work actually started; anchors the schedule only under progress-aware rescheduling. |
actualFinishDate | ISODateString | undefined | No | — | Date work actually finished; always pins completed work to the recorded finish. |
splitRanges | readonly TaskSplitRange[] | undefined | No | — | Non-working gaps inside the task span. |
manuallyScheduled | boolean | undefined | No | — | When true, authored dates are preserved and dependency violations become diagnostics. |
inactive | boolean | undefined | No | — | When true, the task is excluded from scheduling and critical-path analysis. |
priority | number | undefined | No | — | Leveling priority from 0 to 1000. Higher priority tasks are protected first. Defaults to 500. |
canLevel | boolean | undefined | No | — | Whether automatic resource leveling may delay this task. Defaults to true. |
locked | boolean | undefined | No | — | When true, packaged Gantt task mutations are rejected for this task. |
levelingDelayDays | number | undefined | No | — | Existing resource leveling delay in calendar days. Defaults to 0. |
constraintType | TaskConstraintType | undefined | No | — | Optional scheduling constraint type — see {@link TaskConstraintType}. |
constraintDate | ISODateString | undefined | No | — | Date associated with the scheduling constraint. |
deadlineDate | ISODateString | undefined | No | — | Deadline date — tasks finishing after this date are flagged. |
progressPercent | number | Yes | — | Completion percentage (0–100). |
calendarId | CalendarId | Yes | — | Calendar governing working days and holidays for this task. |
isCritical | boolean | Yes | — | Whether this task lies on the critical path. |
notes | string | undefined | No | — | Optional free-text notes attached to the task. |
tags | readonly string[] | Yes | — | Arbitrary tags for categorisation or filtering. |
Related types: EntityId, TaskConstraintType, TaskEffortMode, TaskId, TaskSplitRange, TaskType, TaskWorkflowStatus
TaskId
Section titled “TaskId”type
Unique identifier for a task within a project.
export type TaskId = EntityId;Related types: EntityId
TaskSplitRange
Section titled “TaskSplitRange”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;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
startDate | ISODateString | Yes | — | Split start date (inclusive). |
endDate | ISODateString | Yes | — | Split end date (inclusive). |
TaskStatus
Section titled “TaskStatus”type
Microsoft Project-style calculated schedule health for a task.
export type TaskStatus = 'complete' | 'on-schedule' | 'late' | 'future-task';TaskStore
Section titled “TaskStore”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;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
getAll() | readonly TaskEntity[] | Yes | — | Returns all tasks in insertion order. |
getTaskRevision() | number | Yes | — | Monotonically increasing revision counter bumped on every task data change. |
getOrderedRows() | readonly TaskTreeRow[] | Yes | — | Returns every task as a {@link TaskTreeRow} in canonical authored tree order. |
getById(taskId: TaskId) | TaskEntity | undefined | Yes | — | Looks up a task by its id. |
getRoots() | readonly TaskEntity[] | Yes | — | Returns top-level (root) tasks. |
getChildren(parentId: TaskId) | readonly TaskEntity[] | Yes | — | Returns direct children of the given parent task. |
getParent(taskId: TaskId) | TaskEntity | undefined | Yes | — | Returns the parent task, or undefined for root tasks. |
hasChildren(taskId: TaskId) | boolean | Yes | — | Returns true if the task has at least one child. |
getIndentLevel(taskId: TaskId) | number | Yes | — | Returns the nesting depth of a task in the tree hierarchy. |
updateTask(taskId: TaskId, patch: TaskUpdate) | TaskEntity | Yes | — | Applies a partial update to a task and returns the updated entity. |
replaceAll(tasks: readonly TaskEntity[]) | void | Yes | — | Replaces the entire task list, rebuilding internal indexes. |
Related types: TaskEntity, TaskId, TaskTreeRow, TaskUpdate
TaskTreeRow
Section titled “TaskTreeRow”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;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
task | TaskEntity | Yes | — | The underlying task entity. |
depth | number | Yes | — | Nesting depth (0 for root tasks). |
hasChildren | boolean | Yes | — | Whether the task has child tasks. |
index | number | Yes | — | Zero-based index in the canonical flattened tree. |
Related types: TaskEntity
TaskType
Section titled “TaskType”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';TaskTypeOption
Section titled “TaskTypeOption”interface
export interface TaskTypeOption { readonly label: string; readonly value: TaskType;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
label | string | Yes | — | |
value | TaskType | Yes | — |
Related types: TaskType
TaskUpdate
Section titled “TaskUpdate”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
TaskWorkflowStatus
Section titled “TaskWorkflowStatus”type
User-authored workflow state kept separately from calculated schedule health.
export type TaskWorkflowStatus = 'not-started' | 'in-progress' | 'done' | 'blocked';