Common types#
Scalar formats, enum values and small object shapes that several payloads share. Field names are given in wire spelling. Id, DateValue, TimeUnit, ConstraintType, Pause, ResourceData, Subtree, AnalyticsOptions and ProfileQuery are named types in the package's TypeScript declarations. The other sections describe value sets that the declarations write inline on the fields that use them.
Id#
An id of a task, link, calendar, resource, assignment, slot or candidate.
;
Ids are compared like JavaScript object keys, so 1 and "1" are the same id. Numeric ids are double-precision floats; send ids beyond Number.MAX_SAFE_INTEGER as strings. Whole-number ids come back as JSON integers.
The first two values name the same object.
Used wherever a payload references an object: id, parent, source, target, task, resource, calendar_id and the id lists in results. See Wire format.
DateValue#
A naive local date-time at minute precision, sent as a string. It has no timezone and no daylight saving.
;
| Direction | Form |
|---|---|
| Input | YYYY-MM-DD, YYYY-MM-DD HH:mm or YYYY-MM-DDTHH:mm, each with optional :ss. A bare date means 00:00. Seconds are dropped. |
| Output | Always YYYY-MM-DD HH:mm. |
These inputs come back as "2026-03-02 00:00", "2026-03-02 08:00" and "2026-03-02 08:00". Any other string fails the call with validation, message invalid date, and no path.
Date is accepted only by the JS glue; the raw exports take strings.
Used by task and constraint dates, config.project_start / project_end, profile and leveling ranges, and every date in a result.
TimeUnit#
The unit of a duration or lag.
;
"week", "month" and "year" are reserved and fail with validation. In the elapsed fields leveling_delay and pauses, an hour is 60 minutes and a day is 24 hours.
Used by SchedulingConfig.duration_unit (default "day"), TaskData.duration_unit and LinkData.lag_unit.
ConstraintType#
A task's scheduling constraint. Matching is case-insensitive.
| Value | Constraint | Needs constraint_date |
|---|---|---|
"asap" |
As soon as possible | no |
"alap" |
As late as possible | no |
"snet" |
Start no earlier than | yes |
"snlt" |
Start no later than | yes |
"fnet" |
Finish no earlier than | yes |
"fnlt" |
Finish no later than | yes |
"mso" |
Must start on | yes |
"mfo" |
Must finish on | yes |
Used by TaskData.constraint_type, TaskUpdate.constraint_type and the constraint-violation conflict. How constraints act is in Links, constraints and summaries.
Gap behavior#
How tasks are placed when links leave room.
| Value | Effect |
|---|---|
"preserve" |
Default. Tasks keep their preferred dates when links allow. |
"compress" |
Every task moves to its earliest position. |
Used by SchedulingConfig.gap_behavior.
Calendar mode#
Which calendars the work of a task runs on.
| Value | Effect |
|---|---|
"resource" |
Default. Each assignment works on its resource's calendar combined with the task's. |
"task" |
Task calendars only. |
"task-inherited" |
Task calendars only; a task without calendar_id uses its nearest ancestor's. |
Used by SchedulingConfig.calendar_mode. The rules are in Working-time calendars.
Load basis#
The bucket size for resource load.
| Value | Bucket |
|---|---|
"hour" |
One hour |
"day" |
One day |
When a basis field is omitted, it's derived from config.duration_unit: "day" for day, "hour" for hour and minute. Used by LevelingOptions.basis, ProfileQuery.basis and LoadProfile.basis.
Link type#
The dependency type of a link.
| Value | Accepted forms | Dependency |
|---|---|---|
| FS | "fs", 0, "0" |
Finish to start (default) |
| SS | "ss", 1, "1" |
Start to start |
| FF | "ff", 2, "2" |
Finish to finish |
| SF | "sf", 3, "3" |
Start to finish |
Strings match in any case, so "FS" is accepted. Other numbers and strings fail with validation. Used by LinkData.type and the link entries of SchedulingChanges.
Task type#
The kind of a task.
| Value | Kind |
|---|---|
"task" |
A leaf task (default) |
"summary" |
A summary task whose span covers its children |
"project" |
Input alias of "summary"; output says "summary" |
"milestone" |
A zero-duration point |
Used by TaskData.type. Result entries report the kind as kind on Mutation.
Validation mode#
How a project treats invalid input.
| Value | Effect |
|---|---|
"strict" |
Default. Invalid input fails the call with validation. |
"repair" |
Coerces invalid data (duplicate ids, missing or inconsistent dates, dated constraints without a date) and reports each fix as a repaired note. |
Used by ProjectOptions.validation in the JsonProject constructor. See Accept messy input.
Pause#
One leveling split of a task.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
at |
number |
yes | - | Start of the pause after the task start. Elapsed time in the task's duration_unit, finite and >= 0 |
length |
number |
yes | - | Length of the pause. Elapsed time in the task's duration_unit, finite and > 0 |
by |
"leveling" | null |
no | absent | Who wrote the pause. "leveling" is the only value; the leveler sets it on every pause it writes |
A pause occupies the whole minutes from round(at) to round(at + length). A pause that rounds to zero length is ignored. Unknown fields are ignored.
Used by TaskData.pauses, TaskUpdate.pauses and Mutation.pauses. How pauses affect dates and load is in Leveling resources.
ResourceData#
A resource that assignments book.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
id |
Id |
yes | - | Resource id |
capacity |
number | null |
no | config.default_resource_capacity (1) |
Units the resource can carry per bucket, in assignment value units (1 = 100 %). Finite and >= 0 |
calendar_id |
Id | null |
no | none | The resource's calendar. With calendar_mode: "resource" it must name a calendar in ProjectData.calendars |
Unknown fields are ignored. An invalid capacity fails with validation at resources[i].capacity; an unknown calendar_id at resources[i].calendar_id.
Used by ProjectData.resources and resources.add in SchedulingChanges. An edit to an existing resource is a ResourceUpdate.
Subtree#
Limits a run to one branch of the task tree.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
task |
Id |
yes | - | Root task of the branch. Must be a known, scheduled task |
inclusive |
boolean | null |
no | true |
true includes the root task itself; false covers only its descendants |
Unknown fields fail with parse. An unknown or unscheduled task fails with validation at subtree.task.
Used by SolveOptions.subtree and PreviewOptions.subtree. See Reschedule a branch.
AnalyticsOptions#
Requests analytics in a result.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
criticalPath |
boolean | null |
no | false |
Adds analytics.criticalPath |
slack |
boolean | null |
no | false |
Adds analytics.slack |
Unknown fields fail with parse. The filled shape is Analytics.
Used by SolveOptions.analytics, PreviewOptions.analytics and AnalyzeOptions.analytics.
ProfileQuery#
The range and resources a load profile covers.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
from |
DateValue |
yes | - | Range start. Buckets whose start lies in [from, to) are reported |
to |
DateValue |
yes | - | Range end, after from |
resources |
Id[] | null |
no | every resource | Resources to report, in this order |
basis |
"hour" | "day" | null |
no | derived from config.duration_unit |
Bucket size |
tasks |
"none" | "overallocated" | "all" | null |
no | "none" |
Task ids per bucket: none (the field is absent), only in buckets where load exceeds capacity, or every booked task |
Unknown fields fail with parse. to not after from, or more than 100 000 buckets per resource, fails with validation at to; an unknown resource id at resources.
Used by PreviewOptions.profile. LoadProfileOptions takes the same fields flat, plus baselineId. The result is a LoadProfile.
Related#
- Wire format - ids, dates and
nullhandling on the wire ProjectData- the snapshot most of these shapes go intoSchedulingChanges- the change set that reuses them