fix: ForkInfo placement, required fork_info field, add JSDoc

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-02-25 00:10:03 -05:00
parent 023a4ab211
commit 01603c570a

View File

@@ -139,6 +139,10 @@ export interface ProceduralTreeStructure {
steps: ProceduralStep[] steps: ProceduralStep[]
} }
// API response types
export type TreeStatus = 'draft' | 'published'
/** Fork lineage metadata. Only present (non-null) on trees that are forks (fork_depth > 0). */
export interface ForkInfo { export interface ForkInfo {
parent_tree_id: string | null parent_tree_id: string | null
root_tree_id: string | null root_tree_id: string | null
@@ -148,9 +152,6 @@ export interface ForkInfo {
has_parent_updates: boolean has_parent_updates: boolean
} }
// API response types
export type TreeStatus = 'draft' | 'published'
export interface Tree { export interface Tree {
id: string id: string
name: string name: string
@@ -173,7 +174,7 @@ export interface Tree {
created_at: string created_at: string
updated_at: string updated_at: string
usage_count: number usage_count: number
fork_info?: ForkInfo | null fork_info: ForkInfo | null
} }
export interface TreeListItem { export interface TreeListItem {