@stablebaseline/sdk 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1394,7 +1394,7 @@ interface paths {
1394
1394
  put?: never;
1395
1395
  /**
1396
1396
  * listImprovements
1397
- * @description List AND grep improvements in a project. `query` searches the title, friendlyId and problem statement, not just the title (substring by default; set isRegex:true for a regular expression, caseSensitive:true for exact case). Supports filtering by status, type, priority. For ranked semantic + text search use searchImprovements.
1397
+ * @description List AND grep improvements in a project. `query` searches the title, friendlyId and problem statement, not just the title (substring by default; set isRegex:true for a regular expression, caseSensitive:true for exact case). Supports filtering by status, type, priority, and by parentItemId for an item's children in the work hierarchy (an epic's stories, say). For ranked semantic + text search use searchImprovements. Every item carries its versionTimestamp, ready for updateImprovement, so one call here supplies the tokens for a whole batch of updates (fields ["id", "friendlyId", "versionTimestamp"] returns just those), and its parentItem: the item it belongs to in the work hierarchy ({ id, friendlyId, title, type, status, isTask }, or null).
1398
1398
  */
1399
1399
  post: operations["listImprovements"];
1400
1400
  delete?: never;
@@ -1414,7 +1414,7 @@ interface paths {
1414
1414
  put?: never;
1415
1415
  /**
1416
1416
  * getImprovement
1417
- * @description Get full details for an improvement item including evidence, activity log, compliance context, and the `checklist` array (each item: id, text, due_date, completed_at, plus server-stamped attribution). Returns versionTimestamp — pass it to updateImprovement for optimistic locking. (For tasks specifically, use getTask + updateTask which are symmetric aliases.)
1417
+ * @description Get full details for an improvement item including evidence, activity log, compliance context, and the `checklist` array (each item: id, text, due_date, completed_at, plus server-stamped attribution). Returns versionTimestamp: pass it to updateImprovement for optimistic locking. (For tasks specifically, use getTask + updateTask which are symmetric aliases.) Also returns the work hierarchy: parentItem (the item this one belongs to, such as its epic or story: { id, friendlyId, title, type, status, isTask }, or null), children (the items that belong to it, in status order then by id, at most 200: each with ownerId, ownerTeamId and percentComplete) and childProgress { total, done, closed } over every child (closed counts done, rejected and deferred). Set a parent with parentItemId on updateImprovement or updateTask.
1418
1418
  */
1419
1419
  post: operations["getImprovement"];
1420
1420
  delete?: never;
@@ -1434,7 +1434,7 @@ interface paths {
1434
1434
  put?: never;
1435
1435
  /**
1436
1436
  * createImprovement
1437
- * @description Create an improvement item in a project. Requires projectId and title. Auto-assigns friendly ID. Accepts every field updateImprovement accepts, so an item can be created complete in one call rather than create-then-update.
1437
+ * @description Create an improvement item in a project. Requires projectId and title. Auto-assigns friendly ID. Accepts every field updateImprovement accepts, so an item can be created complete in one call rather than create-then-update. Pass parentItemId to create it under its epic or story in the work hierarchy. Pass `fields` (for example ["id", "friendlyId", "versionTimestamp"]) for a short answer instead of the whole improvement.
1438
1438
  */
1439
1439
  post: operations["createImprovement"];
1440
1440
  delete?: never;
@@ -1454,7 +1454,7 @@ interface paths {
1454
1454
  put?: never;
1455
1455
  /**
1456
1456
  * updateImprovement
1457
- * @description Update an improvement (or a task — tasks share this row, but prefer the symmetric updateTask alias when working from getTask). Supports the full field set including `checklist` (tick-boxes with due dates + completion attribution) and `acceptance_criteria` (objects with per-row updated_by/at attribution). Requires versionTimestamp from getImprovement for optimistic locking. Statuses are captured / in_progress / blocked / done / rejected / deferred, and FOUR of those are CLOSED: blocked, done, rejected, deferred. Entering one needs its comment (blocked needs blocked_comment, rejected needs rejection_comment, done needs completion_comment); leaving one for an open status needs reopened_comment — including blocked -> in_progress, which surprises people because `blocked` does not sound terminal. `metadata` MERGES into what is stored (null on a key deletes it); pass metadata_replace:true to overwrite the object wholesale. Assignment: pass `owner_id=<uuid>` to assign to a user, `owner_team_id=<uuid>` to assign to a team (mutually exclusive — a DB CHECK constraint enforces this). To unassign, pass `owner_id=null` AND `owner_team_id=null`. To switch from a user owner to a team owner, send `owner_id=null, owner_team_id=<uuid>` in the SAME call (sending only one side leaves the stale value and triggers the XOR check). Use listAssignablePrincipals or listTeams to discover valid IDs.
1457
+ * @description Update an improvement, or many in one call (or a task: tasks share this row, but prefer the symmetric updateTask alias when working from getTask). Supports the full field set including `checklist` (tick-boxes with due dates + completion attribution), `acceptance_criteria` (objects with per-row updated_by/at attribution) and parentItemId (the epic or story it belongs to in the work hierarchy; null removes it). versionTimestamp (optimistic locking) is the item's updated_at in epoch milliseconds, and you rarely need a getImprovement call for it: listImprovements returns it for every improvement in a project (fields ["id", "friendlyId", "versionTimestamp"] keeps that answer short), getPlan (items[].versionTimestamp) for every item in a plan, and every write returns the new one. Pass `fields` (for example ["id", "versionTimestamp"]) for a short answer instead of the whole record. To change many improvements, send `items`: up to 200 entries of { improvementId, versionTimestamp, ...changes } per call (more than 200: split them into several calls of up to 200), each checked and written on its own and answered with one row per entry plus a summary. Statuses are captured / in_progress / blocked / done / rejected / deferred, and FOUR of those are CLOSED: blocked, done, rejected, deferred. Entering one needs its comment (blocked needs blocked_comment, rejected needs rejection_comment, done needs completion_comment); leaving one for an open status needs reopened_comment, including blocked -> in_progress, which surprises people because `blocked` does not sound terminal. `metadata` MERGES into what is stored (null on a key deletes it); pass metadata_replace:true to overwrite the object wholesale. Assignment: pass `owner_id=<uuid>` to assign to a user, `owner_team_id=<uuid>` to assign to a team (mutually exclusive: a DB CHECK constraint enforces this). To unassign, pass `owner_id=null` AND `owner_team_id=null`. To switch from a user owner to a team owner, send `owner_id=null, owner_team_id=<uuid>` in the SAME call (sending only one side leaves the stale value and triggers the XOR check). Use listAssignablePrincipals or listTeams to discover valid IDs.
1458
1458
  */
1459
1459
  post: operations["updateImprovement"];
1460
1460
  delete?: never;
@@ -1718,7 +1718,7 @@ interface paths {
1718
1718
  put?: never;
1719
1719
  /**
1720
1720
  * getPlan
1721
- * @description Get full plan details including phases, items, and activity. Returns versionTimestamp — pass it to updatePlan for optimistic locking. Items include percent_complete for progress tracking.
1721
+ * @description Get full plan details including phases, items, and activity. Every level carries its own optimistic-lock token, so one call supplies them all: the top-level versionTimestamp is the plan's (for updatePlan), phases[].versionTimestamp each phase's (for updatePlanPhase) and items[].versionTimestamp each task's or improvement's (for updateTask / updateImprovement, including their bulk `items` form). Items include percent_complete for progress tracking.
1722
1722
  */
1723
1723
  post: operations["getPlan"];
1724
1724
  delete?: never;
@@ -1738,7 +1738,7 @@ interface paths {
1738
1738
  put?: never;
1739
1739
  /**
1740
1740
  * createPlan
1741
- * @description Create a plan in a project. Requires projectId and title.
1741
+ * @description Create a plan in a project. Requires projectId and title. Pass `fields` (for example ["id", "versionTimestamp"]) for a short answer instead of the whole plan.
1742
1742
  */
1743
1743
  post: operations["createPlan"];
1744
1744
  delete?: never;
@@ -1758,7 +1758,7 @@ interface paths {
1758
1758
  put?: never;
1759
1759
  /**
1760
1760
  * updatePlan
1761
- * @description Update a plan. Requires versionTimestamp from getPlan.
1761
+ * @description Update a plan. versionTimestamp (optimistic locking) is the plan's updated_at in epoch milliseconds: listPlans and getPlan return it, and every write returns the new one. Pass `fields` (for example ["id", "versionTimestamp"]) for a short answer instead of the whole plan.
1762
1762
  */
1763
1763
  post: operations["updatePlan"];
1764
1764
  delete?: never;
@@ -1798,7 +1798,7 @@ interface paths {
1798
1798
  put?: never;
1799
1799
  /**
1800
1800
  * listPlanPhases
1801
- * @description List phases for a plan ordered by position.
1801
+ * @description List phases for a plan ordered by position. Each phase carries its own versionTimestamp, ready for updatePlanPhase.
1802
1802
  */
1803
1803
  post: operations["listPlanPhases"];
1804
1804
  delete?: never;
@@ -1838,7 +1838,7 @@ interface paths {
1838
1838
  put?: never;
1839
1839
  /**
1840
1840
  * createPlanPhase
1841
- * @description Create a phase in a plan. Position and wbs_code are auto-computed.
1841
+ * @description Create a phase in a plan. Position and wbs_code are auto-computed. By default a phase's dates follow its tasks (date_mode 'auto'): once any task in it has dates, the phase runs from the earliest task start to the latest task end and stays in step as tasks change, so there is no need to maintain phase dates by hand. Pass `fields` (for example ["id", "versionTimestamp"]) for a short answer instead of the whole phase.
1842
1842
  */
1843
1843
  post: operations["createPlanPhase"];
1844
1844
  delete?: never;
@@ -1858,7 +1858,7 @@ interface paths {
1858
1858
  put?: never;
1859
1859
  /**
1860
1860
  * updatePlanPhase
1861
- * @description Update a plan phase. Requires versionTimestamp from getPlanPhase (not getPlan).
1861
+ * @description Update a plan phase, or many phases in one call. Each phase has its own versionTimestamp (its updated_at in epoch milliseconds): listPlanPhases and getPlan (phases[].versionTimestamp) return it for every phase in a plan, getPlanPhase for one, and every write returns the new one. Never pass the plan's own top-level versionTimestamp. A phase with date_mode 'auto' (the default) takes its dates from its tasks; set date_mode 'manual' to pin dates by hand, or 'auto' to make them follow the tasks again. Pass `fields` (for example ["id", "versionTimestamp"]) for a short answer; a `note` saying the dates were replaced by the tasks' range always comes back. To change many phases, send `items`: up to 200 entries of { phaseId, versionTimestamp, ...changes } per call (more than 200: split them into several calls of up to 200), each checked and written on its own and answered with one row per entry plus a summary.
1862
1862
  */
1863
1863
  post: operations["updatePlanPhase"];
1864
1864
  delete?: never;
@@ -1978,7 +1978,7 @@ interface paths {
1978
1978
  put?: never;
1979
1979
  /**
1980
1980
  * createTask
1981
- * @description Create a task in a plan. Requires planId and title. Accepts every field updateTask accepts, so a task can be created complete in ONE call — no create-then-update, and no window in which other actors read a half-written record.
1981
+ * @description Create a task in a plan. Requires planId and title. Accepts every field updateTask accepts, so a task can be created complete in ONE call: no create-then-update, and no window in which other actors read a half-written record. Pass parentItemId to create it under its story, requirement or feature in the work hierarchy (which may be in another plan, or in none). Pass `fields` (for example ["id", "friendlyId", "versionTimestamp"]) for a short answer instead of the whole task.
1982
1982
  */
1983
1983
  post: operations["createTask"];
1984
1984
  delete?: never;
@@ -1998,7 +1998,7 @@ interface paths {
1998
1998
  put?: never;
1999
1999
  /**
2000
2000
  * listTasks
2001
- * @description List AND grep tasks in a plan. `query` searches the title, friendlyId and description, not just the title (substring by default; set isRegex:true for a regular expression, caseSensitive:true for exact case). Supports filtering by status, priority and phaseId.
2001
+ * @description List AND grep tasks in a plan. `query` searches the title, friendlyId and description, not just the title (substring by default; set isRegex:true for a regular expression, caseSensitive:true for exact case). Supports filtering by status, priority, phaseId and parentItemId (a story's tasks in the work hierarchy, say). Every task carries its versionTimestamp, ready for updateTask, so one call here supplies the tokens for a whole batch of updates, and its parent_item_id and parentItem (the item it belongs to in the work hierarchy, or null).
2002
2002
  */
2003
2003
  post: operations["listTasks"];
2004
2004
  delete?: never;
@@ -2018,7 +2018,7 @@ interface paths {
2018
2018
  put?: never;
2019
2019
  /**
2020
2020
  * getTask
2021
- * @description Get a task by ID with full details, evidence, activity, and the `checklist` array (each item: id, text, due_date, completed_at, plus server-stamped attribution). Returns versionTimestamp; pass it to updateTask to modify. Includes percent_complete for progress tracking.
2021
+ * @description Get a task by ID with full details, evidence, activity, and the `checklist` array (each item: id, text, due_date, completed_at, plus server-stamped attribution). Returns versionTimestamp; pass it to updateTask to modify. Includes percent_complete for progress tracking. Also returns the work hierarchy: parentItem (the item this one belongs to, such as its epic or story: { id, friendlyId, title, type, status, isTask }, or null), children (the items that belong to it, in status order then by id, at most 200: each with ownerId, ownerTeamId and percentComplete) and childProgress { total, done, closed } over every child (closed counts done, rejected and deferred). Set a parent with parentItemId on updateImprovement or updateTask.
2022
2022
  */
2023
2023
  post: operations["getTask"];
2024
2024
  delete?: never;
@@ -2038,7 +2038,7 @@ interface paths {
2038
2038
  put?: never;
2039
2039
  /**
2040
2040
  * updateTask
2041
- * @description Update a task. Tasks share a row with improvements (`improvement_items` with `is_task=true`), so this is a thin alias over updateImprovement — every field on updateImprovement is supported, including `checklist`, `acceptance_criteria`, dates, owner, percent_complete, etc. Requires versionTimestamp from getTask for optimistic locking. Statuses are captured / in_progress / blocked / done / rejected / deferred, and FOUR of those are CLOSED: blocked, done, rejected, deferred. Entering one needs its comment (blocked_comment / rejection_comment / completion_comment); leaving one for an open status needs reopened_comment — including blocked -> in_progress, which surprises people because `blocked` does not sound terminal. `metadata` MERGES into what is stored (null on a key deletes it); pass metadata_replace:true to overwrite the object wholesale. To edit checklist items: call getTask, modify the `checklist` array (preserving each row's `id` to keep its attribution stamps), and pass the full array back here — array order is the sort order. Assignment: pass `owner_id=<uuid>` to assign to a user, `owner_team_id=<uuid>` to assign to a team (mutually exclusive — the DB enforces with a CHECK constraint). To unassign, pass `owner_id=null` AND `owner_team_id=null`. To switch owner kind, send the new value AND null the old one in the SAME call.
2041
+ * @description Update a task, or many tasks in one call. Tasks share a row with improvements (`improvement_items` with `is_task=true`), so this is a thin alias over updateImprovement: every field on updateImprovement is supported, including `checklist`, `acceptance_criteria`, dates, owner, percent_complete, parentItemId (the story or requirement it belongs to in the work hierarchy), etc. versionTimestamp (optimistic locking) is the task's updated_at in epoch milliseconds, and you rarely need a getTask call for it: listTasks and getPlan (items[].versionTimestamp) return it for every task in a plan at once, and every write returns the task's new one. Pass `fields` (for example ["id", "versionTimestamp"]) for a short answer instead of the whole task. To change many tasks (a plan-wide re-date, say), send `items`: up to 200 entries of { taskId, versionTimestamp, ...changes } per call (more than 200: split them into several calls of up to 200), each checked and written on its own and answered with one row per entry plus a summary. Statuses are captured / in_progress / blocked / done / rejected / deferred, and FOUR of those are CLOSED: blocked, done, rejected, deferred. Entering one needs its comment (blocked_comment / rejection_comment / completion_comment); leaving one for an open status needs reopened_comment, including blocked -> in_progress, which surprises people because `blocked` does not sound terminal. `metadata` MERGES into what is stored (null on a key deletes it); pass metadata_replace:true to overwrite the object wholesale. To edit checklist items: call getTask, modify the `checklist` array (preserving each row's `id` to keep its attribution stamps), and pass the full array back here; array order is the sort order. Assignment: pass `owner_id=<uuid>` to assign to a user, `owner_team_id=<uuid>` to assign to a team (mutually exclusive: the DB enforces it with a CHECK constraint). To unassign, pass `owner_id=null` AND `owner_team_id=null`. To switch owner kind, send the new value AND null the old one in the SAME call.
2042
2042
  */
2043
2043
  post: operations["updateTask"];
2044
2044
  delete?: never;
@@ -2078,7 +2078,7 @@ interface paths {
2078
2078
  put?: never;
2079
2079
  /**
2080
2080
  * setPlanItemParent
2081
- * @description Set or clear the WBS parent-child nesting of a task/improvement (outline hierarchy, no scheduling effect). Same plan and phase required. Max depth: 5.
2081
+ * @description Set or clear the plan outline (WBS) nesting of a task or improvement: the indent inside one plan phase, with no scheduling effect. Parent and child must be in the same plan and the same phase, and the WBS numbers are recalculated. Max depth: 5. This is NOT the work hierarchy: for an epic's stories or a story's tasks or test cases, in any plan or phase, set parentItemId with createImprovement, updateImprovement, createTask or updateTask instead.
2082
2082
  */
2083
2083
  post: operations["setPlanItemParent"];
2084
2084
  delete?: never;
@@ -10536,9 +10536,11 @@ interface operations {
10536
10536
  content: {
10537
10537
  "application/json": {
10538
10538
  projectId: string;
10539
+ /** @description Only the children of this item in the work hierarchy (its UUID or friendly id, such as IMP-12), whatever plan or phase they are in. "none" lists only the items with no parent. The work hierarchy is not the plan outline nesting (setPlanItemParent). */
10540
+ parentItemId?: string;
10539
10541
  /** @description Filter: captured, triaging, shaped, approved, ready_for_agent, in_progress, ready_for_review, in_review, blocked, done, rejected, deferred. */
10540
10542
  status?: string;
10541
- /** @description Filter: feature, bug, tech_debt, architecture_gap, documentation_gap, risk, enhancement, task. Tasks (is_task=true) always have type='task'. */
10543
+ /** @description Filter by type: feature, enhancement, bug, tech_debt, architecture_gap, documentation_gap, risk, epic, user_story, requirement, test_case, spike, task. Tasks (is_task=true) always have type='task'. */
10542
10544
  type?: string;
10543
10545
  /** @description Filter: low, medium, high, critical. */
10544
10546
  priority?: string;
@@ -10568,7 +10570,7 @@ interface operations {
10568
10570
  limit?: number;
10569
10571
  /** @description Pagination offset. */
10570
10572
  offset?: number;
10571
- /** @description Field projection. Valid fields: id, friendly_id, friendlyId, title, type, status, priority, source, category_id, categoryId, created_at, createdAt, updated_at, updatedAt, href. */
10573
+ /** @description Field projection. Valid fields: id, friendly_id, friendlyId, title, type, status, priority, source, category_id, categoryId, parent_item_id, parentItemId, parentItem, created_at, createdAt, updated_at, updatedAt, versionTimestamp, href. */
10572
10574
  fields?: string[];
10573
10575
  };
10574
10576
  };
@@ -10738,8 +10740,65 @@ interface operations {
10738
10740
  "application/json": {
10739
10741
  projectId: string;
10740
10742
  title: string;
10741
- /** @description Type. Default: enhancement. Valid values: feature, bug, tech_debt, architecture_gap, documentation_gap, risk, enhancement, task. Despite the tool's name there is no 'improvement' value — pass it and it is accepted as an alias for 'enhancement', which is also the default. Setting type='task' makes the row a task (TAS- prefix); any other type makes it a non-task improvement (IMP- prefix). */
10743
+ /** @description Type. Default: enhancement. One of: feature (New capability for users); enhancement (An improvement to something that already exists); bug (Something that does not work as it should); tech_debt (Work that makes the system easier and safer to change); architecture_gap (A missing or weak part of the architecture); documentation_gap (Documentation that is missing or out of date); risk (Something that could go wrong, to track and reduce); epic (A large body of work, delivered through several stories, features or tasks); user_story (A need told from a user's view: as a role, I want a goal, so that a benefit); requirement (A condition or capability the solution must meet, stated so it can be verified); test_case (Steps that verify a requirement or story, each with its expected result); spike (Time-boxed research to answer a question before committing to the work); task (A unit of work in a plan). Despite the tool's name there is no 'improvement' value: pass it and it is accepted as an alias for 'enhancement', which is also the default. Setting type='task' makes the row a task; any other type makes it a non-task item. The id's prefix follows the type: epic EPIC-, user_story STY-, requirement REQ-, test_case TC-, spike SPK-, task TAS-; every other type IMP-. The number is shared by every type and never changes: a type change rewrites only the prefix (STY-30 becomes IMP-30), and the old id still resolves. Types with fields of their own (epic, user_story, requirement, test_case, spike) take them in details. */
10742
10744
  type?: string;
10745
+ /** @description The type's own fields. On update they MERGE key by key: keys you leave out are kept and null removes one. epic: success_measures. user_story: as_a, i_want, so_that (read as 'As a <as_a>, I want <i_want>, so that <so_that>') and story_points. requirement: statement ('The system shall...'), requirement_kind, rationale, source, verification_method. test_case: preconditions, test_steps (ordered { action, expected }), test_data, last_result, last_run_on. spike: question, timebox, findings. An item keeps its details when its type changes. */
10746
+ details?: {
10747
+ /** @description Success Measures (How will you know this epic delivered its outcome?) */
10748
+ success_measures?: string | null;
10749
+ /** @description As a (role or persona) */
10750
+ as_a?: string | null;
10751
+ /** @description I want (what they want to do) */
10752
+ i_want?: string | null;
10753
+ /** @description So that (the benefit to them) */
10754
+ so_that?: string | null;
10755
+ /** @description Story Points (e.g. 3) */
10756
+ story_points?: number | null;
10757
+ /** @description Requirement (The system shall...) */
10758
+ statement?: string | null;
10759
+ /**
10760
+ * @description Kind
10761
+ * @enum {string|null}
10762
+ */
10763
+ requirement_kind?: "functional" | "non_functional" | "interface" | "data" | "business_rule" | "constraint" | "compliance" | null;
10764
+ /** @description Rationale (Why it is needed...) */
10765
+ rationale?: string | null;
10766
+ /** @description Source (A stakeholder, regulation or document) */
10767
+ source?: string | null;
10768
+ /**
10769
+ * @description Verified By
10770
+ * @enum {string|null}
10771
+ */
10772
+ verification_method?: "test" | "inspection" | "analysis" | "demonstration" | null;
10773
+ /** @description Preconditions (What must be true before the test starts...) */
10774
+ preconditions?: string | null;
10775
+ /** @description Test Steps, in order. The list you send REPLACES the stored one. */
10776
+ test_steps?: {
10777
+ /** @description Optional; minted if omitted. Echo it back on the steps you keep. */
10778
+ id?: string;
10779
+ /** @description What the tester does. */
10780
+ action?: string;
10781
+ /** @description What should happen. */
10782
+ expected?: string;
10783
+ }[] | null;
10784
+ /** @description Test Data (Inputs, accounts or records the steps use...) */
10785
+ test_data?: string | null;
10786
+ /**
10787
+ * @description Last Result
10788
+ * @enum {string|null}
10789
+ */
10790
+ last_result?: "not_run" | "passed" | "failed" | "blocked" | null;
10791
+ /** @description Last Run, YYYY-MM-DD. */
10792
+ last_run_on?: string | null;
10793
+ /** @description Question (What does this spike need to find out?) */
10794
+ question?: string | null;
10795
+ /** @description Timebox (e.g. 3 days) */
10796
+ timebox?: string | null;
10797
+ /** @description Findings (What was learned, and the recommendation...) */
10798
+ findings?: string | null;
10799
+ };
10800
+ /** @description The work item this one belongs to in the work hierarchy: an epic for a story, a story for its tasks or test cases. Any item in the same project, in any plan or phase. Not the plan outline nesting, which setPlanItemParent sets. Give its UUID or friendly id (such as IMP-12 or TAS-3). Rules: the same project; no loops (an item cannot sit inside its own children); at most 5 levels, counting this item's own children. */
10801
+ parentItemId?: string;
10743
10802
  /** @description Priority. Default: medium. */
10744
10803
  priority?: string;
10745
10804
  /**
@@ -10823,7 +10882,7 @@ interface operations {
10823
10882
  plan_id?: string;
10824
10883
  /** @description Assign to a phase. */
10825
10884
  phase_id?: string;
10826
- /** @description Mark as task. Default: false. Prefer setting type='task' instead — is_task is kept in sync from the type enum by a DB trigger, and rows with type='task' get the TAS- friendly_id prefix while all others get IMP-. */
10885
+ /** @description Mark as task. Default: false. Prefer setting type='task' instead: is_task is kept in sync from the type by a DB trigger, and the friendly id's prefix follows the type too (see type). */
10827
10886
  is_task?: boolean;
10828
10887
  description?: string;
10829
10888
  /** @description Work breakdown structure code. */
@@ -10836,6 +10895,8 @@ interface operations {
10836
10895
  relationships?: Record<string, never>;
10837
10896
  /** @description Free-form JSON stored alongside the item. On updateImprovement this MERGES rather than replaces. */
10838
10897
  metadata?: Record<string, never>;
10898
+ /** @description Optional. Answer with only these fields instead of the whole improvement, for example ["id", "versionTimestamp"]. Any of the improvement's own fields (snake_case or camelCase) or of the keys around it in the full answer (versionTimestamp, href and, where present, url, title, trackingId, message). The id is always returned, and so is any notice that needs your attention (a note, such as a phase's dates following its tasks or an item's id changing with its type, and a date change's cascadePreview). Unknown names are ignored. */
10899
+ fields?: string[];
10839
10900
  };
10840
10901
  };
10841
10902
  };
@@ -10919,11 +10980,72 @@ interface operations {
10919
10980
  "application/json": {
10920
10981
  /** @description Optional. Narrows a friendly-id lookup to one project. Only needed when a friendly id is ambiguous — TAS-/IMP-/PLN- ids are numbered per PROJECT, so the same id can exist in several. Ignored when the id is a UUID. */
10921
10982
  projectId?: string;
10922
- improvementId: string;
10923
- /** @description Version timestamp from getImprovement() for optimistic locking. */
10924
- versionTimestamp: number;
10983
+ /** @description Optional. Narrows a friendly-id lookup (such as IMP-42) to one plan, given as the plan's UUID or friendly id (such as PLN-3): the item must be in that plan. It never moves anything (plan_id does that) and is ignored when the id is a UUID. */
10984
+ planId?: string;
10985
+ /** @description Required unless you send items. The improvement's UUID or friendly id (such as IMP-42). */
10986
+ improvementId?: string;
10987
+ /** @description Required unless you send items. The item's current versionTimestamp (its updated_at in epoch ms), as listImprovements, getPlan, getImprovement or your last write of it returned. */
10988
+ versionTimestamp?: number;
10925
10989
  title?: string;
10990
+ /** @description One of: feature (New capability for users); enhancement (An improvement to something that already exists); bug (Something that does not work as it should); tech_debt (Work that makes the system easier and safer to change); architecture_gap (A missing or weak part of the architecture); documentation_gap (Documentation that is missing or out of date); risk (Something that could go wrong, to track and reduce); epic (A large body of work, delivered through several stories, features or tasks); user_story (A need told from a user's view: as a role, I want a goal, so that a benefit); requirement (A condition or capability the solution must meet, stated so it can be verified); test_case (Steps that verify a requirement or story, each with its expected result); spike (Time-boxed research to answer a question before committing to the work); task (A unit of work in a plan). Changing the type keeps everything written on the item, its parent and children included. The id's prefix follows the type (see createImprovement's type) and its number stays, so the id can change (STY-30 becomes IMP-30 when a story becomes a feature): the answer's note then gives the new id, and the old one still resolves. */
10926
10991
  type?: string;
10992
+ /** @description The type's own fields. On update they MERGE key by key: keys you leave out are kept and null removes one. epic: success_measures. user_story: as_a, i_want, so_that (read as 'As a <as_a>, I want <i_want>, so that <so_that>') and story_points. requirement: statement ('The system shall...'), requirement_kind, rationale, source, verification_method. test_case: preconditions, test_steps (ordered { action, expected }), test_data, last_result, last_run_on. spike: question, timebox, findings. An item keeps its details when its type changes. */
10993
+ details?: {
10994
+ /** @description Success Measures (How will you know this epic delivered its outcome?) */
10995
+ success_measures?: string | null;
10996
+ /** @description As a (role or persona) */
10997
+ as_a?: string | null;
10998
+ /** @description I want (what they want to do) */
10999
+ i_want?: string | null;
11000
+ /** @description So that (the benefit to them) */
11001
+ so_that?: string | null;
11002
+ /** @description Story Points (e.g. 3) */
11003
+ story_points?: number | null;
11004
+ /** @description Requirement (The system shall...) */
11005
+ statement?: string | null;
11006
+ /**
11007
+ * @description Kind
11008
+ * @enum {string|null}
11009
+ */
11010
+ requirement_kind?: "functional" | "non_functional" | "interface" | "data" | "business_rule" | "constraint" | "compliance" | null;
11011
+ /** @description Rationale (Why it is needed...) */
11012
+ rationale?: string | null;
11013
+ /** @description Source (A stakeholder, regulation or document) */
11014
+ source?: string | null;
11015
+ /**
11016
+ * @description Verified By
11017
+ * @enum {string|null}
11018
+ */
11019
+ verification_method?: "test" | "inspection" | "analysis" | "demonstration" | null;
11020
+ /** @description Preconditions (What must be true before the test starts...) */
11021
+ preconditions?: string | null;
11022
+ /** @description Test Steps, in order. The list you send REPLACES the stored one. */
11023
+ test_steps?: {
11024
+ /** @description Optional; minted if omitted. Echo it back on the steps you keep. */
11025
+ id?: string;
11026
+ /** @description What the tester does. */
11027
+ action?: string;
11028
+ /** @description What should happen. */
11029
+ expected?: string;
11030
+ }[] | null;
11031
+ /** @description Test Data (Inputs, accounts or records the steps use...) */
11032
+ test_data?: string | null;
11033
+ /**
11034
+ * @description Last Result
11035
+ * @enum {string|null}
11036
+ */
11037
+ last_result?: "not_run" | "passed" | "failed" | "blocked" | null;
11038
+ /** @description Last Run, YYYY-MM-DD. */
11039
+ last_run_on?: string | null;
11040
+ /** @description Question (What does this spike need to find out?) */
11041
+ question?: string | null;
11042
+ /** @description Timebox (e.g. 3 days) */
11043
+ timebox?: string | null;
11044
+ /** @description Findings (What was learned, and the recommendation...) */
11045
+ findings?: string | null;
11046
+ };
11047
+ /** @description The work item this one belongs to in the work hierarchy: an epic for a story, a story for its tasks or test cases. Any item in the same project, in any plan or phase. Not the plan outline nesting, which setPlanItemParent sets. Give its UUID or friendly id (such as IMP-12 or TAS-3). Rules: the same project; no loops (an item cannot sit inside its own children); at most 5 levels, counting this item's own children. null removes the parent. */
11048
+ parentItemId?: string | null;
10927
11049
  /** @enum {string} */
10928
11050
  status?: "captured" | "triaging" | "shaped" | "approved" | "ready_for_agent" | "in_progress" | "ready_for_review" | "in_review" | "blocked" | "done" | "rejected" | "deferred";
10929
11051
  priority?: string;
@@ -11021,6 +11143,108 @@ interface operations {
11021
11143
  wbs_code?: string;
11022
11144
  /** @description Progress percentage (0-100). Null to clear. */
11023
11145
  percent_complete?: number;
11146
+ /** @description Optional. Answer with only these fields instead of the whole improvement, for example ["id", "versionTimestamp"]. Any of the improvement's own fields (snake_case or camelCase) or of the keys around it in the full answer (versionTimestamp, href and, where present, url, title, trackingId, message). The id is always returned, and so is any notice that needs your attention (a note, such as a phase's dates following its tasks or an item's id changing with its type, and a date change's cascadePreview). Unknown names are ignored. */
11147
+ fields?: string[];
11148
+ /** @description Optional bulk form: update up to 200 improvements in one call, each entry { improvementId, versionTimestamp, ...the fields to change } with the same fields as a single call. Every entry is checked and written on its own (permission, optimistic lock, audit), so one entry's conflict or error never stops the others. The answer has one row per entry, in your order: { index, id, status: "updated", versionTimestamp } or { index, id, status: "conflict" or "failed", error } (a conflict also carries currentVersionTimestamp), plus summary { requested, updated, failed, conflicts }. With items, send nothing else at the top level except projectId, planId and fields; fields then picks extra fields for each updated row (a row's status is its outcome, so the improvement's own status comes back as improvementStatus). */
11149
+ items?: {
11150
+ improvementId: string;
11151
+ versionTimestamp: number;
11152
+ title?: string;
11153
+ type?: string;
11154
+ details?: {
11155
+ success_measures?: string | null;
11156
+ as_a?: string | null;
11157
+ i_want?: string | null;
11158
+ so_that?: string | null;
11159
+ story_points?: number | null;
11160
+ statement?: string | null;
11161
+ /** @enum {string|null} */
11162
+ requirement_kind?: "functional" | "non_functional" | "interface" | "data" | "business_rule" | "constraint" | "compliance" | null;
11163
+ rationale?: string | null;
11164
+ source?: string | null;
11165
+ /** @enum {string|null} */
11166
+ verification_method?: "test" | "inspection" | "analysis" | "demonstration" | null;
11167
+ preconditions?: string | null;
11168
+ test_steps?: {
11169
+ id?: string;
11170
+ action?: string;
11171
+ expected?: string;
11172
+ }[] | null;
11173
+ test_data?: string | null;
11174
+ /** @enum {string|null} */
11175
+ last_result?: "not_run" | "passed" | "failed" | "blocked" | null;
11176
+ last_run_on?: string | null;
11177
+ question?: string | null;
11178
+ timebox?: string | null;
11179
+ findings?: string | null;
11180
+ };
11181
+ parentItemId?: string | null;
11182
+ /** @enum {string} */
11183
+ status?: "captured" | "triaging" | "shaped" | "approved" | "ready_for_agent" | "in_progress" | "ready_for_review" | "in_review" | "blocked" | "done" | "rejected" | "deferred";
11184
+ priority?: string;
11185
+ urgency?: string;
11186
+ owner_id?: string | null;
11187
+ owner_team_id?: string | null;
11188
+ target_date?: string;
11189
+ start_date?: string;
11190
+ end_date?: string;
11191
+ category_id?: string;
11192
+ position?: number;
11193
+ problem_statement?: string;
11194
+ desired_outcome?: string;
11195
+ business_impact?: string;
11196
+ user_impact?: string;
11197
+ why_now?: string;
11198
+ acceptance_criteria?: (string | {
11199
+ id?: string;
11200
+ text: string;
11201
+ updated_at?: string;
11202
+ updated_by?: string;
11203
+ updated_by_credential_name?: string;
11204
+ })[];
11205
+ checklist?: {
11206
+ id?: string;
11207
+ text: string;
11208
+ due_date?: string;
11209
+ completed?: boolean;
11210
+ completed_at?: string;
11211
+ completed_by?: string;
11212
+ completed_by_credential_name?: string;
11213
+ updated_at?: string;
11214
+ updated_by?: string;
11215
+ updated_by_credential_name?: string;
11216
+ }[];
11217
+ constraints?: string[];
11218
+ non_goals?: string[];
11219
+ impacted_documents?: Record<string, never>[];
11220
+ linked_document_ids?: string[];
11221
+ impacted_diagrams?: Record<string, never>[];
11222
+ impacted_components?: string[];
11223
+ impacted_repositories?: string[];
11224
+ agent_ready?: boolean;
11225
+ agent_missing_info?: string[];
11226
+ agent_recommended_action?: string;
11227
+ agent_complexity?: string;
11228
+ agent_confidence?: number;
11229
+ agent_brief?: string;
11230
+ resolution_summary?: string;
11231
+ resolution_pr_url?: string;
11232
+ docs_updated?: boolean;
11233
+ follow_up_needed?: boolean;
11234
+ blocked_comment?: string;
11235
+ rejection_comment?: string;
11236
+ completion_comment?: string;
11237
+ reopened_comment?: string;
11238
+ relationships?: Record<string, never>;
11239
+ metadata?: Record<string, never>;
11240
+ metadata_replace?: boolean;
11241
+ plan_id?: string;
11242
+ phase_id?: string;
11243
+ is_task?: boolean;
11244
+ description?: string;
11245
+ wbs_code?: string;
11246
+ percent_complete?: number;
11247
+ }[];
11024
11248
  };
11025
11249
  };
11026
11250
  };
@@ -12090,7 +12314,7 @@ interface operations {
12090
12314
  limit?: number;
12091
12315
  /** @description Pagination offset. */
12092
12316
  offset?: number;
12093
- /** @description Field projection. Valid fields: id, friendly_id, friendlyId, title, description, status, priority, icon, color, start_date, startDate, end_date, endDate, created_at, createdAt, updated_at, updatedAt, href. */
12317
+ /** @description Field projection. Valid fields: id, friendly_id, friendlyId, title, description, status, priority, icon, color, start_date, startDate, end_date, endDate, created_at, createdAt, updated_at, updatedAt, versionTimestamp, href. */
12094
12318
  fields?: string[];
12095
12319
  };
12096
12320
  };
@@ -12280,6 +12504,8 @@ interface operations {
12280
12504
  linked_documents?: Record<string, never>[];
12281
12505
  /** @description Document IDs to link. */
12282
12506
  linked_document_ids?: string[];
12507
+ /** @description Optional. Answer with only these fields instead of the whole plan, for example ["id", "versionTimestamp"]. Any of the plan's own fields (snake_case or camelCase) or of the keys around it in the full answer (versionTimestamp, href and, where present, url, title, trackingId, message). The id is always returned, and so is any notice that needs your attention (a note, such as a phase's dates following its tasks or an item's id changing with its type, and a date change's cascadePreview). Unknown names are ignored. */
12508
+ fields?: string[];
12283
12509
  };
12284
12510
  };
12285
12511
  };
@@ -12364,7 +12590,7 @@ interface operations {
12364
12590
  /** @description Optional. Narrows a friendly-id lookup to one project. Only needed when a friendly id is ambiguous — TAS-/IMP-/PLN- ids are numbered per PROJECT, so the same id can exist in several. Ignored when the id is a UUID. */
12365
12591
  projectId?: string;
12366
12592
  planId: string;
12367
- /** @description Version timestamp from getPlan() for optimistic locking. */
12593
+ /** @description The plan's current versionTimestamp (its updated_at in epoch ms), as listPlans, getPlan or your last write of it returned. */
12368
12594
  versionTimestamp: number;
12369
12595
  title?: string;
12370
12596
  description?: string;
@@ -12382,6 +12608,8 @@ interface operations {
12382
12608
  /** @description Document IDs to link. */
12383
12609
  linked_document_ids?: string[];
12384
12610
  metadata?: Record<string, never>;
12611
+ /** @description Optional. Answer with only these fields instead of the whole plan, for example ["id", "versionTimestamp"]. Any of the plan's own fields (snake_case or camelCase) or of the keys around it in the full answer (versionTimestamp, href and, where present, url, title, trackingId, message). The id is always returned, and so is any notice that needs your attention (a note, such as a phase's dates following its tasks or an item's id changing with its type, and a date change's cascadePreview). Unknown names are ignored. */
12612
+ fields?: string[];
12385
12613
  };
12386
12614
  };
12387
12615
  };
@@ -12631,6 +12859,8 @@ interface operations {
12631
12859
  "application/json": {
12632
12860
  /** @description Optional. Narrows a friendly-id lookup to one project. Only needed when a friendly id is ambiguous — TAS-/IMP-/PLN- ids are numbered per PROJECT, so the same id can exist in several. Ignored when the id is a UUID. */
12633
12861
  projectId?: string;
12862
+ /** @description Optional. Narrows a friendly-id lookup to one plan, given as the plan's UUID or friendly id (such as PLN-3). Phase ids are numbered per plan, so PHA-2 exists in every plan and planId is what makes one unique. Ignored when phaseId is a UUID. */
12863
+ planId?: string;
12634
12864
  /** @description Accepts either the UUID or the friendly id (e.g. PHA-7); friendly ids are resolved within your organisation. */
12635
12865
  phaseId: string;
12636
12866
  };
@@ -12725,15 +12955,22 @@ interface operations {
12725
12955
  position?: number;
12726
12956
  /** @description WBS code. Auto-computed if omitted. */
12727
12957
  wbs_code?: string;
12728
- /** @description YYYY-MM-DD. */
12958
+ /**
12959
+ * @description auto (default): the phase's dates follow its tasks, from the earliest task start to the latest task end, updated whenever a task is added, moved, re-dated or removed; start_date/end_date only hold while no task in the phase has dates. manual: the dates you set are kept as they are.
12960
+ * @enum {string}
12961
+ */
12962
+ date_mode?: "auto" | "manual";
12963
+ /** @description YYYY-MM-DD. With date_mode 'auto' it is replaced by the tasks' range once a task in the phase has dates. */
12729
12964
  start_date?: string;
12730
- /** @description YYYY-MM-DD. */
12965
+ /** @description YYYY-MM-DD, on or after start_date. With date_mode 'auto' it is replaced by the tasks' range once a task in the phase has dates. */
12731
12966
  end_date?: string;
12732
12967
  /**
12733
12968
  * @description Phase color. Must be one of: #3b82f6 (Blue), #f59e0b (Amber), #8b5cf6 (Purple), #ec4899 (Pink), #06b6d4 (Cyan), #14b8a6 (Teal), #6366f1 (Indigo), #6b7280 (Gray). Red and green are reserved for blocked / done item statuses.
12734
12969
  * @enum {string}
12735
12970
  */
12736
12971
  color?: "#3b82f6" | "#f59e0b" | "#8b5cf6" | "#ec4899" | "#06b6d4" | "#14b8a6" | "#6366f1" | "#6b7280";
12972
+ /** @description Optional. Answer with only these fields instead of the whole phase, for example ["id", "versionTimestamp"]. Any of the phase's own fields (snake_case or camelCase) or of the keys around it in the full answer (versionTimestamp, href and, where present, url, title, trackingId, message). The id is always returned, and so is any notice that needs your attention (a note, such as a phase's dates following its tasks or an item's id changing with its type, and a date change's cascadePreview). Unknown names are ignored. */
12973
+ fields?: string[];
12737
12974
  };
12738
12975
  };
12739
12976
  };
@@ -12817,9 +13054,12 @@ interface operations {
12817
13054
  "application/json": {
12818
13055
  /** @description Optional. Narrows a friendly-id lookup to one project. Only needed when a friendly id is ambiguous — TAS-/IMP-/PLN- ids are numbered per PROJECT, so the same id can exist in several. Ignored when the id is a UUID. */
12819
13056
  projectId?: string;
12820
- phaseId: string;
12821
- /** @description Version timestamp from getPlanPhase() for optimistic locking. */
12822
- versionTimestamp: number;
13057
+ /** @description Optional. Narrows a friendly-id lookup to one plan, given as the plan's UUID or friendly id (such as PLN-3). Phase ids are numbered per plan, so PHA-2 exists in every plan and planId is what makes one unique. Ignored when phaseId is a UUID. */
13058
+ planId?: string;
13059
+ /** @description Required unless you send items. The phase's UUID or friendly id (such as PHA-7); with a friendly id, give planId too, since PHA- ids repeat in every plan. */
13060
+ phaseId?: string;
13061
+ /** @description Required unless you send items. The phase's own current versionTimestamp (its updated_at in epoch ms), as listPlanPhases, getPlan (phases[].versionTimestamp), getPlanPhase or your last write of it returned. Not the plan's. */
13062
+ versionTimestamp?: number;
12823
13063
  name?: string;
12824
13064
  description?: string;
12825
13065
  /** @description Status: not_started, in_progress, completed, on_hold, cancelled. */
@@ -12828,13 +13068,39 @@ interface operations {
12828
13068
  priority?: string;
12829
13069
  position?: number;
12830
13070
  wbs_code?: string;
12831
- start_date?: string;
12832
- end_date?: string;
13071
+ /**
13072
+ * @description auto: the phase's dates follow its tasks (earliest task start to latest task end, kept current). manual: the dates you set are kept. Switching to auto recomputes the dates at once when the phase has dated tasks.
13073
+ * @enum {string}
13074
+ */
13075
+ date_mode?: "auto" | "manual";
13076
+ /** @description YYYY-MM-DD, or null to clear. While date_mode is 'auto' and the phase has dated tasks, the tasks' range wins and the reply carries a note saying so; send date_mode 'manual' with it to set it by hand. */
13077
+ start_date?: string | null;
13078
+ /** @description YYYY-MM-DD on or after start_date, or null to clear. While date_mode is 'auto' and the phase has dated tasks, the tasks' range wins and the reply carries a note saying so; send date_mode 'manual' with it to set it by hand. */
13079
+ end_date?: string | null;
12833
13080
  /**
12834
13081
  * @description Phase color. Must be one of: #3b82f6 (Blue), #f59e0b (Amber), #8b5cf6 (Purple), #ec4899 (Pink), #06b6d4 (Cyan), #14b8a6 (Teal), #6366f1 (Indigo), #6b7280 (Gray). Red and green are reserved for blocked / done item statuses. Pass null to clear.
12835
13082
  * @enum {string|null}
12836
13083
  */
12837
13084
  color?: "#3b82f6" | "#f59e0b" | "#8b5cf6" | "#ec4899" | "#06b6d4" | "#14b8a6" | "#6366f1" | "#6b7280" | null;
13085
+ /** @description Optional. Answer with only these fields instead of the whole phase, for example ["id", "versionTimestamp"]. Any of the phase's own fields (snake_case or camelCase) or of the keys around it in the full answer (versionTimestamp, href and, where present, url, title, trackingId, message). The id is always returned, and so is any notice that needs your attention (a note, such as a phase's dates following its tasks or an item's id changing with its type, and a date change's cascadePreview). Unknown names are ignored. */
13086
+ fields?: string[];
13087
+ /** @description Optional bulk form: update up to 200 phases in one call, each entry { phaseId, versionTimestamp, ...the fields to change } with the same fields as a single call. Every entry is checked and written on its own (permission, optimistic lock, audit), so one entry's conflict or error never stops the others. The answer has one row per entry, in your order: { index, id, status: "updated", versionTimestamp } or { index, id, status: "conflict" or "failed", error } (a conflict also carries currentVersionTimestamp), plus summary { requested, updated, failed, conflicts }. With items, send nothing else at the top level except projectId, planId and fields; fields then picks extra fields for each updated row (a row's status is its outcome, so the phase's own status comes back as phaseStatus). */
13088
+ items?: {
13089
+ phaseId: string;
13090
+ versionTimestamp: number;
13091
+ name?: string;
13092
+ description?: string;
13093
+ status?: string;
13094
+ priority?: string;
13095
+ position?: number;
13096
+ wbs_code?: string;
13097
+ /** @enum {string} */
13098
+ date_mode?: "auto" | "manual";
13099
+ start_date?: string | null;
13100
+ end_date?: string | null;
13101
+ /** @enum {string|null} */
13102
+ color?: "#3b82f6" | "#f59e0b" | "#8b5cf6" | "#ec4899" | "#06b6d4" | "#14b8a6" | "#6366f1" | "#6b7280" | null;
13103
+ }[];
12838
13104
  };
12839
13105
  };
12840
13106
  };
@@ -12918,6 +13184,8 @@ interface operations {
12918
13184
  "application/json": {
12919
13185
  /** @description Optional. Narrows a friendly-id lookup to one project. Only needed when a friendly id is ambiguous — TAS-/IMP-/PLN- ids are numbered per PROJECT, so the same id can exist in several. Ignored when the id is a UUID. */
12920
13186
  projectId?: string;
13187
+ /** @description Optional. Narrows a friendly-id lookup to one plan, given as the plan's UUID or friendly id (such as PLN-3). Phase ids are numbered per plan, so PHA-2 exists in every plan and planId is what makes one unique. Ignored when phaseId is a UUID. */
13188
+ planId?: string;
12921
13189
  phaseId: string;
12922
13190
  };
12923
13191
  };
@@ -13356,8 +13624,10 @@ interface operations {
13356
13624
  title: string;
13357
13625
  /** @description Phase to assign to. */
13358
13626
  phaseId?: string;
13627
+ /** @description The work item this one belongs to in the work hierarchy: an epic for a story, a story for its tasks or test cases. Any item in the same project, in any plan or phase. Not the plan outline nesting, which setPlanItemParent sets. Give its UUID or friendly id (such as IMP-12 or TAS-3). Rules: the same project; no loops (an item cannot sit inside its own children); at most 5 levels, counting this item's own children. */
13628
+ parentItemId?: string;
13359
13629
  description?: string;
13360
- /** @description Type. Default: task. Tasks created in plans are typed 'task' (friendly_id prefix TAS-). Override only if you want the row to appear as a non-task improvement (IMP- prefix). Valid values: feature, bug, tech_debt, architecture_gap, documentation_gap, risk, enhancement, task. */
13630
+ /** @description Type. Default: task, which takes a TAS- id. Override only to put another kind of work item in the plan, for example a user_story (a STY- id) or a test_case (a TC- id); the id's prefix follows the type. Valid values: feature, enhancement, bug, tech_debt, architecture_gap, documentation_gap, risk, epic, user_story, requirement, test_case, spike, task. */
13361
13631
  type?: string;
13362
13632
  /**
13363
13633
  * @description Initial status. Default: captured.
@@ -13448,6 +13718,8 @@ interface operations {
13448
13718
  relationships?: Record<string, never>;
13449
13719
  /** @description Free-form JSON stored alongside the task. On updateTask this MERGES rather than replaces. */
13450
13720
  metadata?: Record<string, never>;
13721
+ /** @description Optional. Answer with only these fields instead of the whole task, for example ["id", "versionTimestamp"]. Any of the task's own fields (snake_case or camelCase) or of the keys around it in the full answer (versionTimestamp, href and, where present, url, title, trackingId, message). The id is always returned, and so is any notice that needs your attention (a note, such as a phase's dates following its tasks or an item's id changing with its type, and a date change's cascadePreview). Unknown names are ignored. */
13722
+ fields?: string[];
13451
13723
  };
13452
13724
  };
13453
13725
  };
@@ -13536,6 +13808,8 @@ interface operations {
13536
13808
  priority?: string;
13537
13809
  /** @description Filter by phase. */
13538
13810
  phaseId?: string;
13811
+ /** @description Only the children of this item in the work hierarchy (its UUID or friendly id, such as IMP-12), whatever plan or phase they are in. "none" lists only the items with no parent. The work hierarchy is not the plan outline nesting (setPlanItemParent). */
13812
+ parentItemId?: string;
13539
13813
  /** @description Grep across title, friendlyId and description. Substring by default; a regular expression when isRegex:true; case-insensitive unless caseSensitive:true. */
13540
13814
  query?: string;
13541
13815
  /** @description Treat query as a regular expression (grep -E), e.g. "ACME-\d+". Default false (literal substring). */
@@ -13718,11 +13992,17 @@ interface operations {
13718
13992
  "application/json": {
13719
13993
  /** @description Optional. Narrows a friendly-id lookup to one project. Only needed when a friendly id is ambiguous — TAS-/IMP-/PLN- ids are numbered per PROJECT, so the same id can exist in several. Ignored when the id is a UUID. */
13720
13994
  projectId?: string;
13721
- taskId: string;
13722
- /** @description Version timestamp from getTask() for optimistic locking. */
13723
- versionTimestamp: number;
13995
+ /** @description Optional. Narrows a friendly-id lookup (such as TAS-55) to one plan, given as the plan's UUID or friendly id (such as PLN-3): the task must be in that plan. It never moves anything (plan_id does that) and is ignored when the id is a UUID. */
13996
+ planId?: string;
13997
+ /** @description Required unless you send items. The task's UUID or friendly id (such as TAS-55). */
13998
+ taskId?: string;
13999
+ /** @description Required unless you send items. The task's current versionTimestamp (its updated_at in epoch ms), as listTasks, getPlan, getTask or your last write of it returned. */
14000
+ versionTimestamp?: number;
13724
14001
  title?: string;
14002
+ /** @description Changing the type converts the task and its id takes the new type's prefix, keeping its number (TAS-12 becomes STY-12 as a user_story): the answer's note then gives the new id, and the old one still resolves. */
13725
14003
  type?: string;
14004
+ /** @description The work item this one belongs to in the work hierarchy: an epic for a story, a story for its tasks or test cases. Any item in the same project, in any plan or phase. Not the plan outline nesting, which setPlanItemParent sets. Give its UUID or friendly id (such as IMP-12 or TAS-3). Rules: the same project; no loops (an item cannot sit inside its own children); at most 5 levels, counting this item's own children. null removes the parent. */
14005
+ parentItemId?: string | null;
13726
14006
  /** @enum {string} */
13727
14007
  status?: "captured" | "triaging" | "shaped" | "approved" | "ready_for_agent" | "in_progress" | "ready_for_review" | "in_review" | "blocked" | "done" | "rejected" | "deferred";
13728
14008
  priority?: string;
@@ -13817,6 +14097,79 @@ interface operations {
13817
14097
  plan_id?: string;
13818
14098
  /** @description Assign to phase. Null to unassign. */
13819
14099
  phase_id?: string;
14100
+ /** @description Optional. Answer with only these fields instead of the whole task, for example ["id", "versionTimestamp"]. Any of the task's own fields (snake_case or camelCase) or of the keys around it in the full answer (versionTimestamp, href and, where present, url, title, trackingId, message). The id is always returned, and so is any notice that needs your attention (a note, such as a phase's dates following its tasks or an item's id changing with its type, and a date change's cascadePreview). Unknown names are ignored. */
14101
+ fields?: string[];
14102
+ /** @description Optional bulk form: update up to 200 tasks in one call, each entry { taskId, versionTimestamp, ...the fields to change } with the same fields as a single call. Every entry is checked and written on its own (permission, optimistic lock, audit), so one entry's conflict or error never stops the others. The answer has one row per entry, in your order: { index, id, status: "updated", versionTimestamp } or { index, id, status: "conflict" or "failed", error } (a conflict also carries currentVersionTimestamp), plus summary { requested, updated, failed, conflicts }. With items, send nothing else at the top level except projectId, planId and fields; fields then picks extra fields for each updated row (a row's status is its outcome, so the task's own status comes back as taskStatus). */
14103
+ items?: {
14104
+ taskId: string;
14105
+ versionTimestamp: number;
14106
+ title?: string;
14107
+ type?: string;
14108
+ parentItemId?: string | null;
14109
+ /** @enum {string} */
14110
+ status?: "captured" | "triaging" | "shaped" | "approved" | "ready_for_agent" | "in_progress" | "ready_for_review" | "in_review" | "blocked" | "done" | "rejected" | "deferred";
14111
+ priority?: string;
14112
+ urgency?: string;
14113
+ owner_id?: string | null;
14114
+ owner_team_id?: string | null;
14115
+ target_date?: string;
14116
+ start_date?: string;
14117
+ end_date?: string;
14118
+ position?: number;
14119
+ description?: string;
14120
+ wbs_code?: string;
14121
+ percent_complete?: number;
14122
+ problem_statement?: string;
14123
+ desired_outcome?: string;
14124
+ business_impact?: string;
14125
+ user_impact?: string;
14126
+ why_now?: string;
14127
+ acceptance_criteria?: (string | {
14128
+ id?: string;
14129
+ text: string;
14130
+ updated_at?: string;
14131
+ updated_by?: string;
14132
+ updated_by_credential_name?: string;
14133
+ })[];
14134
+ checklist?: {
14135
+ id?: string;
14136
+ text: string;
14137
+ due_date?: string;
14138
+ completed?: boolean;
14139
+ completed_at?: string;
14140
+ completed_by?: string;
14141
+ completed_by_credential_name?: string;
14142
+ updated_at?: string;
14143
+ updated_by?: string;
14144
+ updated_by_credential_name?: string;
14145
+ }[];
14146
+ constraints?: string[];
14147
+ non_goals?: string[];
14148
+ impacted_documents?: Record<string, never>[];
14149
+ linked_document_ids?: string[];
14150
+ impacted_diagrams?: Record<string, never>[];
14151
+ impacted_components?: string[];
14152
+ impacted_repositories?: string[];
14153
+ agent_ready?: boolean;
14154
+ agent_missing_info?: string[];
14155
+ agent_recommended_action?: string;
14156
+ agent_complexity?: string;
14157
+ agent_confidence?: number;
14158
+ agent_brief?: string;
14159
+ resolution_summary?: string;
14160
+ resolution_pr_url?: string;
14161
+ docs_updated?: boolean;
14162
+ follow_up_needed?: boolean;
14163
+ blocked_comment?: string;
14164
+ rejection_comment?: string;
14165
+ completion_comment?: string;
14166
+ reopened_comment?: string;
14167
+ relationships?: Record<string, never>;
14168
+ metadata?: Record<string, never>;
14169
+ metadata_replace?: boolean;
14170
+ plan_id?: string;
14171
+ phase_id?: string;
14172
+ }[];
13820
14173
  };
13821
14174
  };
13822
14175
  };
@@ -13983,9 +14336,9 @@ interface operations {
13983
14336
  requestBody?: {
13984
14337
  content: {
13985
14338
  "application/json": {
13986
- /** @description Item ID to re-parent. */
14339
+ /** @description Item ID to indent or un-indent in the plan outline. */
13987
14340
  itemId: string;
13988
- /** @description New parent ID. Null to un-indent. */
14341
+ /** @description The outline parent's ID, in the same plan and phase. Null to un-indent. Not the work hierarchy parent (parentItemId). */
13989
14342
  parentId?: string;
13990
14343
  };
13991
14344
  };