Collections

Interfaces

Interfaces

SubtransactionSummary

Properties:

PropertyTypeRequiredDescription
idstringYes
transaction_idstringYes
amountnumberYes
memostring | null | undefinedNo
payee_idstring | null | undefinedNo
payee_namestring | null | undefinedNo
category_idstring | null | undefinedNo
category_namestring | null | undefinedNo
transfer_account_idstring | null | undefinedNo
transfer_transaction_idstring | null | undefinedNo
deletedbooleanYes

YnabDebtTransactionType

Properties:

PropertyTypeRequiredDescription
original_balancenumber | nullYes
interest_ratesRecord<string, number>Yes
minimum_paymentsRecord<string, number>Yes
escrow_amountsRecord<string, number>Yes

BaseDocument

Shared base types and interfaces for all RxDB collections Provides consistent patterns across the db-collections package

Properties:

PropertyTypeRequiredDescription
idstringYesUnique identifier for the document
orgIdstringYesID of the organization this document belongs to
userIdstringYesID of the user who created this document
createdAtstringYesUTC timestamp when the document was created
updatedAtstringYesUTC timestamp when the document was last updated

BaseMetadata

Common metadata patterns for tracking document statistics

SoftDeletable

Soft delete pattern - use for collections that need soft delete

Properties:

PropertyTypeRequiredDescription
isDeletedbooleanYesWhether this document is soft deleted
deletedAtstring | undefinedNoUTC timestamp when the document was soft deleted

EditTracking

Edit tracking pattern - use for collections that need edit history

Properties:

PropertyTypeRequiredDescription
isEditedbooleanYesWhether this document has been edited after creation
editedAtstring | undefinedNoUTC timestamp when the document was last edited

Threadable

Threading pattern - use for collections that support nested comments/replies

Properties:

PropertyTypeRequiredDescription
parentIdstring | undefinedNoID of the parent document for nested replies
threadDepthnumberYesDepth level in the thread tree (0 for root)

PolymorphicEntity

Polymorphic relationship pattern - use for collections that reference multiple entity types

Properties:

PropertyTypeRequiredDescription
entityTypestringYesType of the entity this references
entityIdstringYesID of the entity this references

ConversationTurn

Conversation Management Types

Defines data structures for managing multi-turn conversations in agent tasks, including support for conversation history compression and context optimization.

Properties:

PropertyTypeRequiredDescription
turnNumbernumberYesTurn number in conversation (1-indexed)
role"user" | "assistant" | "system"YesRole: user, assistant, or system
contentstringYesMessage content
timestampstringYesISO timestamp
metadataTurnMetadata | undefinedNoOptional metadata about this turn

TurnMetadata

Metadata for a conversation turn

Properties:

PropertyTypeRequiredDescription
toolsUsedstring[] | undefinedNoTools used during this turn (summary)
filesModifiedstring[] | undefinedNoFiles modified during this turn
commandsExecutedstring[] | undefinedNoCommands executed (summary)
tokens{ input: number; output: number; } | undefinedNoToken usage for this turn
costUsdnumber | undefinedNoCost for this turn (USD)
blockedForInputboolean | undefinedNoWhether this turn blocked waiting for input
agentIdstring | undefinedNoAgent ID that processed this turn
sessionIdstring | undefinedNoClaude session ID for conversation resumption

ConversationState

Conversation state with compression support

Properties:

PropertyTypeRequiredDescription
turnsConversationTurn[]YesAll conversation turns (recent, uncompressed)
compressedHistoryCompressedHistory | undefinedNoCompressed summary of older turns (if compression applied)
totalTurnsnumberYesTotal number of turns (including compressed)
configConversationConfig | undefinedNoConfiguration used for this conversation

CompressedHistory

Compressed history segment

Properties:

PropertyTypeRequiredDescription
turnRange{ start: number; end: number; }YesTurn numbers that were compressed (e.g., 1-10)
summarystringYesSummary of compressed turns
compressedAtstringYesWhen compression was performed
keyPointsstring[] | undefinedNoKey facts/decisions from compressed turns
tokensSavednumber | undefinedNoEstimated tokens saved by compression

ConversationConfig

Configuration for conversation management

Properties:

PropertyTypeRequiredDescription
recentTurnsToKeepnumberYesNumber of recent turns to keep verbatim
compressionThresholdnumberYesTrigger compression when total turns exceeds this
includeToolDetailsbooleanYesWhether to include tool details in summaries
compressionEnabledbooleanYesWhether compression is enabled

DiscussionMention

Mention extracted from discussion content Represents an

Properties:

PropertyTypeRequiredDescription
type"user" | "agent" | "team"YesType of entity mentioned
identifierstringYesThe
teamMemberIdstring | undefinedNoResolved TeamMember ID if applicable
userIdstring | undefinedNoResolved User ID for human users
positionnumberYesCharacter position in content where mention starts

DiscussionModel

Main discussion model interface Follows existing collection patterns with UTC date strings

Properties:

PropertyTypeRequiredDescription
idstringYes
orgIdstringYes
workspaceIdstringYes
userIdstringYes
createdAtstringYes
updatedAtstringYes
entityTypestringYes
entityIdstringYes
contentstringYes
contentHtmlstring | undefinedNo
parentIdstring | undefinedNo
threadDepthnumberYes
isEditedbooleanYes
editedAtstring | undefinedNo
isDeletedbooleanYes
deletedAtstring | undefinedNo
attachmentsAttachmentModel[] | undefinedNo
userNamestringYes
userAvatarstring | undefinedNo
mentionsDiscussionMention[] | undefinedNoParsed
metadataRecord<string, any> | undefinedNo
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

AttachmentModel

File attachment model interface Stores metadata for files attached to discussions

Properties:

PropertyTypeRequiredDescription
idstringYes
namestringYes
sizenumberYes
typestringYes
urlstringYes
uploadedAtstringYes
statusAttachmentStatusYes
thumbnailUrlstring | undefinedNo
checksumstring | undefinedNo

ActivityChanges

Represents a change to a specific field.

Properties:

PropertyTypeRequiredDescription
fieldstringYesField that was changed
oldValueunknownYesPrevious value
newValueunknownYesNew value

ActivityModel

Activity Model

Records activities and changes for audit trail and activity feeds.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique identifier (format: acti_XXXXXXXXXX)
entityTypeActivityEntityTypeYesType of entity this activity relates to
entityIdstringYesID of the entity this activity relates to
entityNamestringYesHuman-readable name of the entity
actionActivityActionYesAction that was performed
changesActivityChanges | undefinedNoOptional changes detail
userIdstringYesUser ID who performed the action
userNamestringYesUser name for display
productIdstring | undefinedNoProduct ID if activity is related to a product
orgIdstringYesOrganization ID for multi-tenant isolation
workspaceIdstringYesWorkspace ID for workspace-level isolation
createdAtstringYesISO 8601 timestamp when activity occurred
extendedRecord<string, unknown> | undefinedNoExtensible object for custom data

ApprovalModel

Approval Model Interface

Represents an approval request for spec or steering documents with full lifecycle tracking. Supports hierarchical scoping: project → milestone → task → document

Properties:

PropertyTypeRequiredDescription
idstringYesUnique approval identifier
projectIdstringYesProject ID this approval belongs to
milestoneIdstring | undefinedNoOptional milestone ID for phase-specific approvals
taskIdstring | undefinedNoOptional task ID for task-specific approvals
documentIdstring | undefinedNoOptional document ID for document-specific approvals
titlestringYesHuman-readable title describing what needs approval
type"action" | "document"YesType of approval: 'document' for file approvals, 'action' for operation approvals
category"spec" | "steering"YesCategory: 'spec' for specifications, 'steering' for steering documents
categoryNamestringYesName of the spec or steering document (kebab-case)
status"pending" | "approved" | "rejected" | "needs-revision"YesCurrent approval status tracking workflow progression
documentTypestring | undefinedNoOptional document type (e.g., 'requirements.md', 'design.md', 'tasks.md')
documentContentstring | undefinedNoOptional snapshot of document content at time of approval request
responsestring | undefinedNoApprover's response message (populated when status changes from pending)
annotationsstring | undefinedNoJSON string of annotations/highlights from approver
comments{ [key: string]: any; text?: string; selection?: string; position?: { line: number; column: number; }; }[] | undefinedNoArray of inline comments from approver with selection context
createdAtstringYesISO 8601 timestamp when approval was created
updatedAtstringYesISO 8601 timestamp when approval was last updated
respondedAtstring | undefinedNoISO 8601 timestamp when approval was responded to
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesWorkspace ID for workspace-level isolation
userIdstringYesUser ID who requested the approval
approverIdstring | undefinedNoUser ID who approved/rejected (populated when status changes)
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

AttributeModel

Properties:

PropertyTypeRequiredDescription
idstringYes
namestringYes
titlestringYes
descriptionstring | undefinedNo
colorstringYes
orgIdstringYes
workspaceIdstringYes
userIdstring | undefinedNo
entityTypestringYes
typestringYes
sortOrdernumber | undefinedNo
popularitynumber | undefinedNo
metadataRecord<string, any> | undefinedNo
createdAtstringYes
updatedAtstringYes
archivedbooleanYes
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

BusinessPlanModel

Properties:

PropertyTypeRequiredDescription
idstringYes
orgIdstringYes
workspaceIdstringYes
userIdstringYes
titlestringYes
descriptionstringYes
status"draft" | "active" | "archived"Yes
planType"startup" | "growth" | "pivot" | "annual"Yes
missionStatementstringYes
visionStatementstringYes
targetMarketstringYes
problemStatementstringYes
solutionSummarystringYes
revenueModelstringYes
competitiveAdvantagestringYes
timeframeMonthsnumberYes
startDatestringYes
endDatestringYes
versionnumberYes
extendedRecord<string, any> | undefinedNo
createdAtstringYes
updatedAtstringYes
archivedbooleanYes

ClientModel

Client Model Interface

Represents a business client or customer within the organization. Clients can be associated with opportunities, projects, and time entries for tracking business relationships and engagements.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique client identifier
namestringYesClient contact name
companystringYesCompany or organization name
emailstringYesPrimary email address for client communication
phonestringYesPrimary phone number for client contact
addressstringYesPhysical or mailing address
primaryContactIdstring | undefinedNoOptional reference to primary contact person (userId)
createdAtstringYesISO 8601 timestamp when client was created
updatedAtstringYesISO 8601 timestamp when client was last updated
archivedbooleanYesSoft delete flag - true if client has been archived
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesWorkspace ID for workspace-level data isolation
userIdstringYesUser ID of client record creator
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

CodebaseModel

Codebase Model Interface

Represents a single Git repository (1:1 relationship) that contains projects/specs. Provides all configuration needed for agents to clone, work, commit, and deploy.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique codebase identifier (format: codebase_<name>_<workspaceId>)
workspaceIdstringYesParent workspace ID
orgIdstringYesOrganization ID for multi-tenant data isolation
userIdstringYesUser ID of codebase creator
namestringYesCodebase name (kebab-case, unique within workspace)
titlestringYesHuman-readable codebase title for display
descriptionstringYesCodebase purpose and description
repository{ url: string; defaultBranch: string; provider: "github" | "gitlab" | "bitbucket" | "other"; organization?: string; repositoryName?: string; privateRepo: boolean; accessToken?: string; sshKey?: string; }YesGit repository configuration
environment{ nodeVersion?: string; packageManager: "npm" | "yarn" | "pnpm" | "bun"; workingDirectory?: string; setupCommands: string[]; testCommands?: string[]; buildCommands?: string[]; environmentVariables?: Record<string, string>; }YesDevelopment environment configuration
deployment{ platform: "cloudflare" | "digitalocean" | "vercel" | "railway" | "aws" | "custom"; productionUrl?: string; stagingUrl?: string; previewUrlPattern?: string; deployCommand?: string; deployBranch?: string; cicdProvider?: "github-actions" | "gitlab-ci" | "cloudflare-pages" | "custom"; cicdConfigPath?: string; platformConfig?: { cloudflareProjectName?: string; cloudflareAccountId?: string; digitaloceanAppId?: string; digitaloceanDropletId?: string; [key: string]: any; }; } | undefinedNoDeployment configuration
agentWorkflow{ branchStrategy: "feature-per-spec" | "feature-per-task" | "shared-branch"; branchPrefix: string; commitConvention: "conventional" | "simple" | "custom"; commitTemplate?: string; requireTests: boolean; requireLint: boolean; createPR: boolean; prTitleTemplate?: string; prDescriptionTemplate?: string; prReviewers?: string[]; prLabels?: string[]; } | undefinedNoAgent workflow configuration for automated task execution
tagsstring[] | undefinedNoTags for organization and filtering
status"active" | "archived" | "paused"YesCodebase status
createdAtstringYesISO 8601 timestamp when codebase was created
updatedAtstringYesISO 8601 timestamp when codebase was last updated
archivedAtstring | undefinedNoISO 8601 timestamp when codebase was archived
archivedbooleanYesFlag for soft delete
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions
metadata{ [key: string]: any; monorepo: boolean; languages?: string[]; frameworks?: string[]; testFramework?: string; codeStyle?: string; docsUrl?: string; } | undefinedNoOptional extensible metadata

CompetitorModel

Properties:

PropertyTypeRequiredDescription
idstringYes
orgIdstringYes
workspaceIdstringYes
userIdstringYes
businessPlanIdstringYes
namestringYes
websitestringYes
descriptionstringYes
strengthsstring[] | undefinedNo
weaknessesstring[] | undefinedNo
pricingstringYes
marketSharestringYes
differentiatorsstring[] | undefinedNo
threatLevel"low" | "medium" | "high"Yes
extendedRecord<string, any> | undefinedNo
createdAtstringYes
updatedAtstringYes
archivedbooleanYes

ContactModel

Contact Model Interface

Represents an individual contact person within the organization. Contacts can be associated with clients for relationship management and tracking. Stores detailed contact information including name, email, phone, and business details.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique contact identifier
namestringYesFull contact name (typically firstName + lastName)
firstNamestringYesContact's first name
lastNamestringYesContact's last name
emailstringYesContact's email address
phonestringYesContact's phone number
companystringYesCompany or organization the contact works for
titlestringYesContact's job title or position
addressstringYesPhysical or mailing address
archivedbooleanYesSoft delete flag - true if contact has been archived
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesWorkspace ID for workspace-level data isolation
userIdstringYesUser ID of contact record creator
createdAtstringYesISO 8601 timestamp when contact was created
updatedAtstringYesISO 8601 timestamp when contact was last updated
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

ConversationModel

ConversationModel represents a chat conversation between a user and an AI assistant. Each conversation contains messages and maintains settings/metadata for the LLM provider.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique identifier for the conversation
titlestringYesDisplay title for the conversation
createdAtstringYesUTC timestamp when the conversation was created
updatedAtstringYesUTC timestamp when the conversation was last updated
userIdstringYesID of the user who owns this conversation
orgIdstringYesID of the organization this conversation belongs to
workspaceIdstringYesID of the workspace this conversation belongs to
provider"anthropic" | "openai" | "lmstudio"YesLLM provider identifier
modelstringYesModel identifier (e.g., 'claude-3-5-sonnet-20241022')
settingsConversationSettingsYesConversation settings for LLM interaction
metadataConversationMetadataYesMetadata tracking conversation statistics
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

ConversationSettings

Settings that control the LLM behavior for this conversation

Properties:

PropertyTypeRequiredDescription
systemPromptstring | undefinedNoOptional system prompt to set context
temperaturenumberYesTemperature parameter for response randomness (0.0 - 2.0)
maxTokensnumberYesMaximum tokens to generate in responses

ConversationMetadata

Metadata tracking conversation usage and activity

Properties:

PropertyTypeRequiredDescription
messageCountnumberYesTotal number of messages in the conversation
lastMessageAtstringYesUTC timestamp of the last message

DocumentStorageInfo

Storage information for documents backed by document-store service. These documents have their content stored in S3/MinIO and vectors in SurrealDB, rather than content directly in the RxDB document.

Properties:

PropertyTypeRequiredDescription
s3KeystringYesS3 object key for the document content
s3BucketstringYesS3 bucket name where the document is stored
contentHashstringYesSHA-256 hash of the document content for change detection
fileSizenumberYesSize of the document in bytes
mimeTypestringYesMIME type of the document
documentStoreIdstring | undefinedNoDocument-store service's internal document ID
ragJobIdstring | undefinedNoRAG processing job ID for tracking embedding status

DocumentModel

Document Model Interface

Represents a steering document (product.md, tech.md, structure.md, markdown notes, filetrees) that provides organizational, workspace, or project-level guidance. Supports hierarchical scoping:

  • Org-level: Accessible to all workspaces and projects in the organization
  • Workspace-level: Accessible to all projects in the workspace
  • Project-level: Scoped to a specific project
  • Milestone-level: Scoped to a specific milestone
  • Task-level: Scoped to a specific task

Resolution priority: task → milestone → project → workspace → org → null

Document types:

  • steering: Steering documents (TECHNICAL.md, PRODUCT.md, etc.)
  • product: Product requirements and specifications
  • tech: Technical architecture and design decisions
  • structure: Project structure and organization guidelines
  • markdown: General markdown documentation
  • filetree: File system structure documentation
  • note: General-purpose notes

Storage modes:

  • Inline: content field contains the full document (legacy behavior)
  • Storage-backed: content is empty, storage field contains S3 pointer and RAG metadata

Properties:

PropertyTypeRequiredDescription
idstringYesUnique steering document identifier (format: steering_<type><orgId>[<workspaceId>][_<projectId>])
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstring | undefinedNoOptional workspace ID for workspace-level scope
projectIdstring | undefinedNoOptional project ID for project-level scope (omit for org/workspace-level documents)
milestoneIdstring | undefinedNoOptional milestone ID for milestone-level scope
taskIdstring | undefinedNoOptional task ID for task-level scope
codebaseIdstring | undefinedNoOptional codebase ID for linking documents to a codebase (used by markdown sync)
documentType"product" | "steering" | "tech" | "structure" | "markdown" | "filetree" | "note"YesType of document determining its purpose and usage context
titlestringYesHuman-readable document title for display
contentstring | undefinedNoMarkdown content of the document.
For storage-backed documents (with storage field), this may be empty
as actual content lives in S3.
storageDocumentStorageInfo | undefinedNoStorage information for document-store backed documents.
When present, content is stored in S3 with RAG vectors in SurrealDB.
When absent, content field contains the full document (inline mode).
documentVersionnumberYesNumeric document revision number for tracking evolution (1, 2, 3...)
approvedbooleanYesFlag indicating whether this document version is approved for use
approvedAtstring | undefinedNoISO 8601 timestamp when document was approved (only when approved=true)
approvedBystring | undefinedNoUser ID who approved the document (only when approved=true)
createdAtstringYesISO 8601 timestamp when document was created
updatedAtstringYesISO 8601 timestamp when document was last updated
userIdstringYesUser ID of document creator
metadata{ [key: string]: any; templateVersion?: string; scope?: "organization" | "workspace" | "project" | "milestone" | "task"; } | undefinedNoOptional extensible metadata for document customization
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

FinAccountModel

Financial Account Model Interface

Represents a financial account from YNAB (You Need A Budget) integration. Accounts track bank accounts, credit cards, investment accounts, and other financial entities. Extends YNAB Account type with organization and audit fields.

Properties:

PropertyTypeRequiredDescription
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesWorkspace ID for workspace-level data isolation
userIdstringYesUser ID who owns or manages this account
createdAtstringYesISO 8601 timestamp when account was created
updatedAtstringYesISO 8601 timestamp when account was last updated
budget_idstringYesBudget ID this account belongs to
is_deletedboolean | undefinedNoSoft delete flag - true if account has been deleted
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

BudgetModel

Financial Budget Model Interface

Represents a complete budget from YNAB (You Need A Budget) integration. Budgets serve as the top-level container for financial accounts, categories, and transactions. Each budget has its own settings for currency, date format, and account structure.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique budget identifier
createdAtstringYesISO 8601 timestamp when budget was created in our system
updatedAtstringYesISO 8601 timestamp when budget was last updated in our system
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesWorkspace ID for workspace-level data isolation
userIdstringYesUser ID who owns or manages this budget
namestringYesBudget name from YNAB
last_modified_onstringYesISO 8601 timestamp of last modification in YNAB
first_monthstringYesFirst month of budget data (YYYY-MM-DD format)
last_monthstringYesLast month of budget data (YYYY-MM-DD format)
trashedbooleanYesSoft delete flag - true if budget has been trashed
date_format{ format: string; }YesDate format configuration for budget display
currency_format{ iso_code: string; example_format: string; decimal_digits: number; decimal_separator: string; symbol_first: boolean; }YesCurrency format configuration for budget display
accounts{ id: string; name: string; type: string; balance: number; }[]YesSimplified account summaries for quick reference
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

FinCategoryModel

Financial Category Model Interface

Represents a budget category from YNAB (You Need A Budget) integration. Categories organize budget allocations and track spending against targets. Supports goal-based budgeting with various goal types (target balance, monthly funding, etc.) and tracks activity, balance, and goal progress for financial planning.

Properties:

PropertyTypeRequiredDescription
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesWorkspace ID for workspace-level data isolation
userIdstringYesUser ID who owns or manages this category
createdAtstringYesISO 8601 timestamp when category was created in our system
updatedAtstringYesISO 8601 timestamp when category was last updated in our system
is_deletedboolean | undefinedNoSoft delete flag - true if category has been deleted
isDefaultboolean | undefinedNoWhether this is a default category template
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

LinkedStatementRef

Linked Statement Reference Represents a reference to another income statement from a different workspace

Properties:

PropertyTypeRequiredDescription
statementIdstringYesID of the linked income statement
workspaceIdstringYesWorkspace ID where the linked statement resides
displayNamestringYesDisplay name for the linked statement
displayAs"income" | "expense" | "asset" | "liability"YesHow to display in the quadrant (income, expense, asset, liability)

StatementPeriod

Period configuration for income statement reporting

Properties:

PropertyTypeRequiredDescription
type"monthly" | "annual" | "custom" | "quarterly"YesPeriod type: monthly, quarterly, annual, or custom
startDatestring | undefinedNoStart date for custom period (ISO 8601)
endDatestring | undefinedNoEnd date for custom period (ISO 8601)
offsetnumber | undefinedNoFor monthly/quarterly: current period offset (0 = current, -1 = previous, etc.)

FinIncomeStatementModel

Financial Income Statement Model Interface

Represents an income statement dashboard configuration that links to a YNAB budget and can include references to other statements from different workspaces. Provides a 4-quadrant view: Income, Expenses, Assets, and Liabilities.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique identifier (format: fini_{nanoid})
namestringYesHuman-readable name for this income statement
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesWorkspace ID for workspace-level data isolation
userIdstringYesUser ID who created this income statement
descriptionstring | undefinedNoOptional description
budgetIdstringYesBudget ID this statement is linked to (from FinBudget)
periodStatementPeriodYesPeriod configuration for reporting
linkedStatementsLinkedStatementRef[]YesReferences to other income statements to include as line items
incomeCategoriesstring[]YesCategory IDs to include in Income quadrant (from FinCategory)
expenseCategoriesstring[]YesCategory IDs to include in Expenses quadrant
assetAccountsstring[]YesAccount IDs to include in Assets quadrant (from FinAccount)
liabilityAccountsstring[]YesAccount IDs to include in Liabilities quadrant
isDefaultboolean | undefinedNoWhether this statement is the default for the workspace
isArchivedboolean | undefinedNoWhether this statement is archived
status"draft" | "active" | "archived"YesWizard status: draft = incomplete, active = ready to use
wizardStepnumber | undefinedNoCurrent wizard step (1-6) for resuming setup
wizardCompletedStepsnumber[] | undefinedNoArray of completed wizard step numbers
ynabBudgetIdstring | undefinedNoYNAB budget ID if imported from YNAB
createdAtstringYesISO 8601 timestamp when statement was created
updatedAtstringYesISO 8601 timestamp when statement was last updated
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

FinScheduledTransactionModel

Financial Scheduled Transaction Model Interface

Represents a recurring transaction from YNAB (You Need A Budget) integration. Scheduled transactions automate recurring expenses and income like rent, salary, subscriptions, and bill payments. Supports various recurrence frequencies and can include split transactions via subtransactions.

Properties:

PropertyTypeRequiredDescription
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesWorkspace ID for workspace-level data isolation
userIdstringYesUser ID who owns or manages this scheduled transaction
createdAtstringYesISO 8601 timestamp when scheduled transaction was created in our system
updatedAtstringYesISO 8601 timestamp when scheduled transaction was last updated in our system
is_deletedboolean | undefinedNoSoft delete flag - true if scheduled transaction has been deleted
account_namestringYesAccount name for display (denormalized from account)
payee_namestring | null | undefinedNoPayee name for display (denormalized from payee, nullable)
category_namestring | null | undefinedNoCategory name for display (denormalized from category, nullable)
subtransactionsSubtransactionSummary[]YesSplit transaction components for multi-category expenses
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

FinTransactionModel

Financial Transaction Model Interface

Represents a financial transaction from YNAB (You Need A Budget) integration. Transactions record all money movements including expenses, income, transfers, and debt payments. Each transaction can be split into multiple subtransactions for detailed categorization and tracking.

Properties:

PropertyTypeRequiredDescription
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesWorkspace ID for workspace-level data isolation
userIdstringYesUser ID who owns or manages this transaction
createdAtstringYesISO 8601 timestamp when transaction was created in our system
updatedAtstringYesISO 8601 timestamp when transaction was last updated in our system
is_deletedboolean | undefinedNoSoft delete flag - true if transaction has been deleted
account_namestringYesAccount name for display (denormalized from account)
payee_namestring | null | undefinedNoPayee name for display (denormalized from payee, nullable)
category_namestring | null | undefinedNoCategory name for display (denormalized from category, nullable)
subtransactionsSubtransactionSummary[]YesSplit transaction components for multi-category expenses
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

FlowModel

Flow Model Interface

Represents a visual flowchart or diagram created using React Flow. Flows can represent database schemas, process workflows, agent orchestration, or custom visualizations. Supports serialization of nodes, edges, and viewport state.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique flow identifier
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesWorkspace ID for workspace-level isolation
userIdstringYesUser ID of flow creator
createdAtstringYesISO 8601 timestamp when flow was created
updatedAtstringYesISO 8601 timestamp when flow was last updated
namestringYesHuman-readable flow name for display
descriptionstringYesDetailed description of flow purpose and contents
flowType"custom" | "database-schema" | "process-flow" | "agent-flow"YesType of flow determining its purpose and rendering context
nodesany[]YesReact Flow nodes (serialized JSON array of node objects)
edgesany[]YesReact Flow edges (serialized JSON array of edge/connection objects)
viewport{ x: number; y: number; zoom: number; }YesViewport state for preserving pan/zoom position
metadata{ tags?: string[]; projectId?: string; version?: string; }YesOptional metadata for categorization and association
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

GoalMetric

Goal Metric Interface

Represents a measurable KPI or metric associated with a goal. Metrics track progress toward specific targets with support for different measurement types and trend analysis.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique metric identifier
namestringYesHuman-readable metric name
typeGoalMetricTypeYesType of measurement for this metric
targetValuenumberYesTarget value to achieve
currentValuenumberYesCurrent measured value
unitstring | undefinedNoOptional unit of measurement (e.g., 'USD', '%', 'users')
startValuenumber | undefinedNoOptional starting value for progress calculation
trendGoalMetricTrend | undefinedNoOptional trend direction indicator

GoalModel

Goal Model Interface

Represents a high-level goal or objective within the organization. Goals serve as containers for projects and milestones, providing strategic direction and prioritization. Each goal tracks completion status, metrics, and supports hierarchical goal structures.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique goal identifier
namestringYesInternal system name (kebab-case identifier)
titlestringYesHuman-readable goal title for display
descriptionstringYesDetailed description of goal purpose and success criteria
priority"1" | "2" | "3" | "4" | "5"YesPriority level from 1 (highest) to 5 (lowest)
dueDatestringYesISO 8601 timestamp for goal deadline/target date
completedbooleanYesCompletion status flag
createdAtstringYesISO 8601 timestamp when goal was created
updatedAtstringYesISO 8601 timestamp when goal was last updated
archivedbooleanYesSoft delete flag - true if goal has been archived
orgIdstringYesOrganization ID for multi-tenant data isolation
userIdstringYesUser ID of goal creator
extendedRecord<string, unknown> | undefinedNoExtensible object for future schema additions
metricsGoalMetric[] | undefinedNoArray of KPI metrics for tracking goal progress
targetDatestring | undefinedNoISO 8601 timestamp for target completion date (separate from dueDate)
progressModeGoalProgressModeYesMode for calculating goal progress
currentProgressnumber | undefinedNoCurrent progress percentage (0-100), used when progressMode is manual
statusGoalStatusYesCurrent status of the goal
parentGoalIdstring | undefinedNoParent goal ID for hierarchical goal structures
categoryGoalCategory | undefinedNoCategory for goal classification
workspaceIdstring | undefinedNoWorkspace ID for workspace-based organization

InitiativeModel

Properties:

PropertyTypeRequiredDescription
idstringYes
roadmapIdstringYes
namestringYes
descriptionstring | undefinedNo
quarterstringYes
status"In Progress" | "Backlog" | "Planned" | "Done"Yes
priority"High" | "Medium" | "Low" | undefinedNo
colorstring | undefinedNo
projectIdsstring[]Yes
ordernumberYes
orgIdstringYes
workspaceIdstringYes
userIdstringYes
createdAtstringYes
updatedAtstringYes
metadataRecord<string, unknown> | undefinedNo
extendedRecord<string, unknown> | undefinedNo

MarketSize

Properties:

PropertyTypeRequiredDescription
tamnumberYes
samnumberYes
somnumberYes
currencystringYes
yearnumberYes

TargetSegment

Properties:

PropertyTypeRequiredDescription
namestringYes
sizenumberYes
characteristicsstringYes
painPointsstring[]Yes

SwotAnalysis

Properties:

PropertyTypeRequiredDescription
strengthsstring[]Yes
weaknessesstring[]Yes
opportunitiesstring[]Yes
threatsstring[]Yes

MarketAnalysisModel

Properties:

PropertyTypeRequiredDescription
idstringYes
orgIdstringYes
workspaceIdstringYes
userIdstringYes
businessPlanIdstringYes
titlestringYes
descriptionstringYes
marketSizeMarketSize | undefinedNo
growthRatenumber | undefinedNo
trendsstring[] | undefinedNo
targetSegmentsTargetSegment[] | undefinedNo
swotSwotAnalysis | undefinedNo
extendedRecord<string, any> | undefinedNo
createdAtstringYes
updatedAtstringYes
archivedbooleanYes

ToolCall

ToolCall represents a single tool/function call made during message processing

Properties:

PropertyTypeRequiredDescription
idstring | undefinedNoOptional unique identifier for the tool call
toolNamestringYesName of the tool being called
argumentsanyYesArguments passed to the tool
resultanyNoResult returned from the tool execution
status"pending" | "success" | "error"YesStatus of the tool call execution

MessageModel

MessageModel represents a single message within a conversation. Messages can be from user, assistant, or system roles.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique identifier for the message
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesID of the workspace this message belongs to
conversationIdstringYesID of the conversation this message belongs to
role"user" | "assistant" | "system"YesRole of the message sender
contentstringYesContent/text of the message
toolCallsToolCall[] | undefinedNoOptional tool calls made during message processing
createdAtstringYesUTC timestamp when the message was created
metadataMessageMetadata | undefinedNoOptional metadata tracking tokens, cost, and latency
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

MessageMetadata

Metadata tracking message usage statistics and costs

Properties:

PropertyTypeRequiredDescription
tokens{ input: number; output: number; total: number; } | undefinedNoToken usage breakdown
cost{ total: number; } | undefinedNoCost information
latencynumber | undefinedNoResponse latency in milliseconds
modelstring | undefinedNoModel identifier used for this message

MilestoneModel

Milestone Model Interface

Represents a significant checkpoint or deliverable within a project. Milestones provide mid-level organization between projects and individual tasks, often representing phases like requirements, design, and implementation. Supports MCP-managed workflows with phase tracking and document content management.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique milestone identifier
namestringYesInternal system name (kebab-case identifier)
titlestringYesHuman-readable milestone title for display
descriptionstringYesDetailed description of milestone goals and deliverables
completedbooleanYesCompletion status flag
projectIdstringYesParent project ID this milestone belongs to
goalIdstringYesParent goal ID (inherited from project)
createdAtstringYesISO 8601 timestamp when milestone was created
updatedAtstringYesISO 8601 timestamp when milestone was last updated
startAtstring | undefinedNoOptional planned start date for milestone (ISO 8601)
startedAtstring | undefinedNoOptional actual start date when milestone work began (ISO 8601)
dueAtstring | undefinedNoOptional due date for milestone completion (ISO 8601)
completedAtstring | undefinedNoOptional actual completion date when milestone was finished (ISO 8601)
archivedbooleanYesSoft delete flag - true if milestone has been archived
orgIdstringYesOrganization ID for multi-tenant data isolation
userIdstringYesUser ID of milestone creator
workspaceIdstringYesWorkspace ID for workspace-based organization
timeBudgetHoursnumber | undefinedNoOptional time budget in hours for milestone estimation
categoryIdstring | undefinedNoOptional category ID for milestone classification
tagIdsstring[] | undefinedNoOptional array of tag IDs for flexible categorization
metadataMilestoneMetadata | undefinedNoOptional phase tracking and spec metadata
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

MilestoneMetadata

Metadata structure for MCP-managed milestones

Supports phase-based workflow management and document content approval tracking.

Properties:

PropertyTypeRequiredDescription
phaseType"requirements" | "design" | "tasks" | "implementation" | undefinedNoType of development phase this milestone represents
documentPathstring | undefinedNoPath to external markdown document if stored outside milestone
approvalStatus"pending" | "approved" | "rejected" | undefinedNoApproval status for milestone completion
approvedBystring | undefinedNoUser ID of approver
approvedAtstring | undefinedNoISO 8601 timestamp when milestone was approved
createdByMCPboolean | undefinedNoFlag indicating if milestone was created by MCP agent
workflowData{ documentContent?: string; approved: boolean; approvedAt?: string; approvedBy?: string; lastUpdated?: string; templateVersion?: string; } | undefinedNoWorkflow data for phase document content management

OpportunityModel

Opportunity Model Interface

Represents a business opportunity or potential engagement with a client. Opportunities track potential projects, sales leads, or business development initiatives. Each opportunity is associated with a specific client and tracks completion status.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique opportunity identifier
namestringYesInternal system name (kebab-case identifier)
titlestringYesHuman-readable opportunity title for display
descriptionstringYesDetailed description of opportunity scope and potential
completedbooleanYesCompletion status - true when opportunity is won/lost/closed
clientIdstringYesClient ID this opportunity is associated with
archivedbooleanYesSoft delete flag - true if opportunity has been archived
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesWorkspace ID for workspace-level data isolation
userIdstringYesUser ID of opportunity creator/owner
createdAtstringYesISO 8601 timestamp when opportunity was created
updatedAtstringYesISO 8601 timestamp when opportunity was last updated
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

OrgMetadata

Organization metadata for customization settings. This is an extensible object - new properties can be added without schema migration.

Properties:

PropertyTypeRequiredDescription
colorSchemeIndexnumber | undefinedNoColor scheme index (0-7) for org-based badge coloring

OrgModel

Organization Model Interface

Represents a top-level organization or tenant in the multi-tenant system. Organizations serve as the highest level of data isolation and contain all users, workspaces, projects, and other entities. Each organization has its own namespace for data segregation and access control.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique organization identifier
orgIdstringYesOrganization ID (self-referential for consistency with other models)
createdAtstringYesISO 8601 timestamp when organization was created
updatedAtstringYesISO 8601 timestamp when organization was last updated
namestringYesOrganization name for display and identification
descriptionstringYesDetailed description of organization purpose and scope
archivedbooleanYesSoft delete flag - true if organization has been archived
userIdstringYesUser ID of organization creator/owner
metadataOrgMetadata | undefinedNoOrganization customization settings
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

OrgThemeModel

Organization Theme Model Interface

Represents a theme configuration for an organization. Each organization can have multiple themes with one marked as the default. The config field stores a JSON- stringified Theme object containing color schemes, typography, and other visual settings for the organization's branding.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique theme identifier (format: othr_{nanoid})
orgIdstringYesOrganization ID this theme belongs to
namestringYesHuman-readable theme name for display
configstringYesJSON-stringified Theme configuration object
isDefaultbooleanYesWhether this is the default theme for the organization
createdAtstringYesISO 8601 timestamp when theme was created
updatedAtstringYesISO 8601 timestamp when theme was last updated
createdBystringYesUser ID who created the theme
updatedBystringYesUser ID who last updated the theme
extendedRecord<string, unknown> | undefinedNoExtensible object for future schema additions

Examples:

const orgTheme: OrgThemeModel = {
  id: 'othr_abc123def456',
  orgId: 'org_xyz789abc123',
  name: 'Corporate Brand',
  config: JSON.stringify({
    primaryColor: '#0066CC',
    secondaryColor: '#FF6600',
    // ... other theme properties
  }),
  isDefault: true,
  createdAt: '2026-01-22T00:00:00.000Z',
  updatedAt: '2026-01-22T00:00:00.000Z',
  createdBy: 'use_admin123456',
  updatedBy: 'use_admin123456',
};

FlowStateTriggerCondition

Individual condition for FlowState entity triggers

Properties:

PropertyTypeRequiredDescription
propertyPathstringYesProperty path to evaluate (dot notation supported, e.g., 'status', 'metadata.phase')
operatorTriggerConditionOperatorYesComparison operator
valueunknownNoValue to compare against (supports ${variable} interpolation)
valueRefstring | undefinedNoReference to another property or context variable for comparison

TriggerDebounceConfig

Debounce configuration for triggers

Properties:

PropertyTypeRequiredDescription
waitMsnumberYesWait time in milliseconds before firing
strategy"leading" | "trailing" | undefinedNoStrategy: 'leading' fires first then ignores, 'trailing' waits for quiet period

FlowStateEntityTrigger

FlowState entity change trigger configuration

Properties:

PropertyTypeRequiredDescription
entityTypeTriggerEntityTypeYesFlowState entity type to watch
selectorRecord<string, unknown> | undefinedNoRxDB selector to filter which entities to watch
conditionsFlowStateTriggerCondition[]YesProperty conditions - ALL must match (AND logic)
debounceTriggerDebounceConfig | undefinedNoDebounce configuration to prevent rapid firing

ProcessTrigger

Process trigger configuration

Properties:

PropertyTypeRequiredDescription
typeProcessTriggerTypeYesType of trigger that initiates this process
schedulestring | undefinedNoCron expression for scheduled triggers (e.g., '0 9 * * 1' for Monday 9am)
eventNamestring | undefinedNoEvent name that triggers the process (for generic 'event' type)
entityTriggerFlowStateEntityTrigger | undefinedNoFlowState entity trigger configuration (for 'entity' type)
webhook{ method: "GET" | "POST" | "PUT"; auth?: "none" | "api-key" | "bearer" | "basic"; } | undefinedNoWebhook endpoint configuration
conditionsRecord<string, unknown> | undefinedNoAdditional trigger conditions (JSON Logic format)

ProcessSchema

JSON Schema definition for process inputs/outputs

Properties:

PropertyTypeRequiredDescription
type"string" | "number" | "boolean" | "object" | "array"YesJSON Schema type
propertiesRecord<string, { type: string; description?: string; required?: boolean; default?: unknown; enum?: unknown[]; }> | undefinedNoSchema properties for object types
requiredstring[] | undefinedNoRequired field names
descriptionstring | undefinedNoSchema description

ProcessExecutionConfig

Process execution configuration

Properties:

PropertyTypeRequiredDescription
maxConcurrentExecutionsnumber | undefinedNoMaximum concurrent executions of this process
queueBehaviorQueueBehavior | undefinedNoWhat to do when max concurrent executions reached
timeoutMinutesnumber | undefinedNoDefault timeout for entire process in minutes
singletonboolean | undefinedNoSingleton mode - only one active execution at a time
prioritynumber | undefinedNoPriority level for execution queue (higher = more priority)

ProcessStatistics

Process statistics configuration for linking to FlowState entities

Properties:

PropertyTypeRequiredDescription
projectIdstring | undefinedNoLink to project for metrics tracking
milestoneIdstring | undefinedNoLink to milestone for phase tracking
metrics{ name: string; type: "counter" | "gauge" | "histogram"; description?: string; }[] | undefinedNoCustom metrics definitions

ProcessModel

Process Model Interface

Represents a workflow or business process definition that can be executed. Processes contain a sequence of steps, inputs/outputs, and execution rules. Supports visual flowchart representation via

Properties:

PropertyTypeRequiredDescription
idstringYesUnique process identifier (format: proc_<nanoid>)
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesWorkspace ID for workspace-level isolation
userIdstringYesUser ID of process creator
createdAtstringYesISO 8601 timestamp when process was created
updatedAtstringYesISO 8601 timestamp when process was last updated
namestringYesInternal system name (kebab-case identifier)
titlestringYesHuman-readable process title for display
descriptionstringYesDetailed description of process purpose and behavior
versionstringYesProcess semantic version (e.g., '1.0.0', '2.1.3')
statusProcessStatusYesCurrent process status
categoryProcessCategoryYesProcess category for organization
stepIdsstring[]YesArray of process step IDs in execution order
startStepIdstring | undefinedNoID of the starting step (entry point)
inputSchemaProcessSchema | undefinedNoInput schema defining required process inputs
outputSchemaProcessSchema | undefinedNoOutput schema defining process outputs
triggerProcessTrigger | undefinedNoTrigger configuration for process initiation
statisticsProcessStatistics | undefinedNoStatistics and metrics configuration
archivedbooleanYesSoft delete flag - true if process has been archived
tagIdsstring[] | undefinedNoOptional array of tag IDs for flexible categorization
documentIdstring | undefinedNoOptional document ID linking to process documentation
flowIdstring | undefinedNoOptional flow ID for visual representation
maxSubprocessDepthnumber | undefinedNoMaximum subprocess nesting depth (default: 10)
executorAgentIdstring | undefinedNoAgent ID that executes this process (for event-triggered processes)
executionConfigProcessExecutionConfig | undefinedNoExecution configuration (concurrency, timeouts, etc.)
metadataProcessMetadata | undefinedNoProcess metadata
extendedRecord<string, unknown> | undefinedNoExtensible object for future schema additions

ProcessMetadata

Process metadata structure

Properties:

PropertyTypeRequiredDescription
authorstring | undefinedNoAuthor information
lastEditedBystring | undefinedNoLast editor user ID
publishedAtstring | undefinedNoPublish date when process became active
publishedBystring | undefinedNoPublished by user ID
deprecatedAtstring | undefinedNoDeprecation date
deprecationReasonstring | undefinedNoReason for deprecation
replacedBystring | undefinedNoReplacement process ID
estimatedDurationMinutesnumber | undefinedNoEstimated execution time in minutes
sla{ warningMinutes?: number; criticalMinutes?: number; } | undefinedNoSLA configuration
executionCountnumber | undefinedNoTotal execution count
successRatenumber | undefinedNoSuccess rate (0-100)
avgExecutionTimeSecondsnumber | undefinedNoAverage execution time in seconds

StepExecutionRecord

Individual step execution record

Properties:

PropertyTypeRequiredDescription
stepIdstringYesStep ID that was executed
stepNamestringYesStep name for reference
stepTypestringYesStep type
status"pending" | "failed" | "running" | "completed" | "skipped"YesExecution status of this step
startedAtstring | undefinedNoISO 8601 timestamp when step execution started
completedAtstring | undefinedNoISO 8601 timestamp when step execution completed
durationMsnumber | undefinedNoDuration in milliseconds
inputsRecord<string, unknown> | undefinedNoInput data provided to the step
outputsRecord<string, unknown> | undefinedNoOutput data produced by the step
error{ message: string; code?: string; stack?: string; details?: Record<string, unknown>; } | undefinedNoError information if step failed
retryCountnumber | undefinedNoNumber of retry attempts
executedBystring | undefinedNoUser ID who executed/approved this step (for human tasks)
notesstring | undefinedNoComments or notes from manual execution

TriggerSourceEntity

Source entity information for entity-triggered executions

Properties:

PropertyTypeRequiredDescription
entityTypestringYesFlowState entity type that triggered this execution
entityIdstringYesEntity ID that triggered this execution
collectionstringYesCollection name in RxDB
changedPropertiesstring[]YesProperties that changed and triggered the execution
previousValuesRecord<string, unknown> | undefinedNoPrevious values of changed properties
newValuesRecord<string, unknown> | undefinedNoNew values of changed properties
entitySnapshotRecord<string, unknown> | undefinedNoFull entity snapshot at time of trigger (optional, for debugging)

ExecutionContext

Execution context tracking

Properties:

PropertyTypeRequiredDescription
triggerType"subprocess" | "manual" | "scheduled" | "event" | "entity" | "webhook" | "api"YesTrigger type that initiated this execution
parentExecutionIdstring | undefinedNoID of parent execution if this is a subprocess
parentStepIdstring | undefinedNoStep ID in parent that spawned this subprocess
depthnumber | undefinedNoCurrent subprocess nesting depth (checked against maxSubprocessDepth)
sourceEntityTriggerSourceEntity | undefinedNoSource entity information for entity-triggered executions
triggerEventRecord<string, unknown> | undefinedNoEvent data that triggered the execution (for generic 'event' type)
webhookData{ method: string; headers?: Record<string, string>; body?: unknown; query?: Record<string, string>; } | undefinedNoWebhook request data
triggeredBystring | undefinedNoUser ID who manually triggered the execution
sourceIpstring | undefinedNoIP address of trigger source
userAgentstring | undefinedNoUser agent of trigger source
environment"development" | "staging" | "production" | undefinedNoExecution environment
agentRunnerIdstring | undefinedNoAgent runner ID that executed this process
triggeredAtstring | undefinedNoTimestamp when execution was triggered

ProcessExecutionModel

ProcessExecution Model Interface

Represents a single execution instance of a process. Tracks the complete execution history including step results, timing, and any errors encountered during execution.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique execution identifier (format: exec_<nanoid>)
processIdstringYesProcess ID being executed
processVersionstringYesProcess version at time of execution
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesWorkspace ID for workspace-level isolation
userIdstringYesUser ID who owns this execution
createdAtstringYesISO 8601 timestamp when execution was created
updatedAtstringYesISO 8601 timestamp when execution was last updated
statusProcessExecutionStatusYesCurrent execution status
startedAtstring | undefinedNoISO 8601 timestamp when execution started
completedAtstring | undefinedNoISO 8601 timestamp when execution completed
durationMsnumber | undefinedNoTotal duration in milliseconds
inputsRecord<string, unknown>YesInput data provided to the process
outputsRecord<string, unknown> | undefinedNoOutput data produced by the process
currentStepIdstring | undefinedNoCurrent step ID being executed (for running executions)
stepHistoryStepExecutionRecord[]YesArray of step execution records
variablesRecord<string, unknown>YesProcess variables state (accumulated during execution)
contextExecutionContextYesExecution context information
error{ message: string; code?: string; stepId?: string; stack?: string; details?: Record<string, unknown>; } | undefinedNoError information if execution failed
retryCountnumberYesNumber of retry attempts at process level
maxRetriesnumberYesMaximum retries allowed
progressnumberYesProgress percentage (0-100)
correlationIdstring | undefinedNoOptional correlation ID for tracking related executions
externalIdstring | undefinedNoOptional external reference ID
resumeAtstring | undefinedNoScheduled resume time for paused executions
parentExecutionIdstring | undefinedNoParent execution ID for subprocess tracking (denormalized from context for indexing)
depthnumber | undefinedNoSubprocess nesting depth (denormalized from context for querying)
archivedbooleanYesSoft delete flag
metadataProcessExecutionMetadata | undefinedNoExecution metadata
extendedRecord<string, unknown> | undefinedNoExtensible object for future schema additions

ProcessExecutionMetadata

ProcessExecution metadata structure

Properties:

PropertyTypeRequiredDescription
prioritynumber | undefinedNoPriority level (1-10, higher = more urgent)
queuestring | undefinedNoQueue name for execution scheduling
tagsstring[] | undefinedNoTags for categorization
resources{ cpuTimeMs?: number; memoryPeakBytes?: number; networkBytesIn?: number; networkBytesOut?: number; } | undefinedNoResource usage tracking
billing{ computeUnits?: number; apiCalls?: number; storageBytes?: number; } | undefinedNoBilling/metering information
audit{ action: string; userId?: string; timestamp: string; details?: Record<string, unknown>; }[] | undefinedNoAudit trail

SubprocessConfig

Subprocess configuration for nested process execution

Properties:

PropertyTypeRequiredDescription
processIdstring | undefinedNoProcess ID to execute
processNamestring | undefinedNoAlternative: lookup process by name
processVersionstring | undefinedNoSpecific version to use (optional, defaults to latest active)
inputMappingRecord<string, string> | undefinedNoMap parent variables to subprocess inputs (supports ${variable} interpolation)
outputMappingRecord<string, string> | undefinedNoMap subprocess outputs back to parent variables
waitForCompletionboolean | undefinedNoWait for subprocess completion or fire-and-forget
timeoutSecondsnumber | undefinedNoTimeout for subprocess execution in seconds
onFailureSubprocessFailureStrategy | undefinedNoWhat to do if subprocess fails

AgentTaskConfig

Agent task configuration for AI agent execution

Properties:

PropertyTypeRequiredDescription
agentIdstring | undefinedNoAgent identifier
promptstring | undefinedNoPrompt template (supports ${variable} interpolation)
systemPromptstring | undefinedNoSystem prompt for the agent
modelstring | undefinedNoModel to use
temperaturenumber | undefinedNoTemperature setting (0-1)
maxTokensnumber | undefinedNoMaximum tokens for response
toolsstring[] | undefinedNoMCP tools the agent can use
outputSchemaRecord<string, unknown> | undefinedNoStructured output schema (JSON Schema)
contextVariablesstring[] | undefinedNoVariables to include in agent context

CommandConfig

CLI command configuration for shell execution

Properties:

PropertyTypeRequiredDescription
executablestringYesExecutable or shell command
argsstring[] | undefinedNoCommand arguments (supports ${variable} interpolation)
workingDirectorystring | undefinedNoWorking directory
envRecord<string, string> | undefinedNoEnvironment variables
shellboolean | undefinedNoRun in shell (allows pipes, redirects, etc.)
captureOutputboolean | undefinedNoCapture stdout as output variable
outputVariablestring | undefinedNoVariable name to store captured output
captureStderrboolean | undefinedNoCapture stderr separately
stderrVariablestring | undefinedNoVariable name to store stderr

ContainerVolumeMount

Container volume mount configuration

Properties:

PropertyTypeRequiredDescription
hostPathstringYesHost path or volume name
containerPathstringYesPath inside container
readOnlyboolean | undefinedNoMount as read-only

ContainerResources

Container resource limits

Properties:

PropertyTypeRequiredDescription
cpuLimitstring | undefinedNoCPU limit (e.g., "1.0", "0.5")
memoryLimitstring | undefinedNoMemory limit (e.g., "512Mi", "1Gi")
cpuRequeststring | undefinedNoCPU request for scheduling
memoryRequeststring | undefinedNoMemory request for scheduling

ContainerConfig

Container execution configuration for isolated step execution

Properties:

PropertyTypeRequiredDescription
imagestringYesDocker image
tagstring | undefinedNoImage tag (defaults to 'latest')
commandstring[] | undefinedNoOverride container command
entrypointstring[] | undefinedNoOverride entrypoint
envRecord<string, string> | undefinedNoEnvironment variables
volumesContainerVolumeMount[] | undefinedNoVolume mounts
resourcesContainerResources | undefinedNoResource limits
networkstring | undefinedNoNetwork mode
pullPolicy"never" | "always" | "if-not-present" | undefinedNoPull policy: always, never, if-not-present
workingDirstring | undefinedNoWorking directory inside container
userstring | undefinedNoUser to run as

StepAction

Action configuration for executable steps

Properties:

PropertyTypeRequiredDescription
type"agent" | "subprocess" | "approval" | "http" | "script" | "mcp-tool" | "notification" | "command" | "container"YesType of action to perform
endpointstring | undefinedNoHTTP endpoint for API calls
method"GET" | "POST" | "PUT" | "PATCH" | "DELETE" | undefinedNoHTTP method
headersRecord<string, string> | undefinedNoRequest headers
bodyTemplatestring | undefinedNoRequest body template (supports ${variable} interpolation)
scriptstring | undefinedNoScript content for script actions
scriptLanguage"javascript" | "python" | "shell" | undefinedNoScript language
mcpToolstring | undefinedNoMCP tool name for mcp-tool actions
mcpParamsRecord<string, unknown> | undefinedNoMCP tool parameters
subprocessIdstring | undefinedNo
subprocessSubprocessConfig | undefinedNoSubprocess configuration (for type: 'subprocess')
agentAgentTaskConfig | undefinedNoAgent task configuration (for type: 'agent')
commandCommandConfig | undefinedNoCLI command configuration (for type: 'command')
containerContainerConfig | undefinedNoContainer execution configuration (for type: 'container')
notification{ channel: "email" | "slack" | "webhook" | "in-app"; template?: string; recipients?: string[]; } | undefinedNoNotification configuration
approval{ approverUserIds?: string[]; approverRoleIds?: string[]; requiredApprovals?: number; timeoutMinutes?: number; escalationUserIds?: string[]; } | undefinedNoApproval configuration
retry{ maxAttempts: number; delaySeconds: number; backoffMultiplier?: number; } | undefinedNoRetry configuration
timeoutSecondsnumber | undefinedNoTimeout in seconds

StepCondition

Condition for decision steps

Properties:

PropertyTypeRequiredDescription
idstringYesUnique condition identifier
expressionstring | Record<string, unknown>YesCondition expression (JSON Logic format or simple comparison)
targetStepIdstringYesTarget step ID when condition is true
labelstring | undefinedNoHuman-readable label for the branch
ordernumberYesOrder for evaluation (lower = first)

StepOutput

Output mapping for step results

Properties:

PropertyTypeRequiredDescription
namestringYesVariable name to store the output
pathstring | undefinedNoJSON path to extract from response
type"string" | "number" | "boolean" | "object" | "array"YesData type of the output
defaultValueunknownNoDefault value if extraction fails

StepPosition

Visual position for flowchart rendering

Properties:

PropertyTypeRequiredDescription
xnumberYesX coordinate in pixels
ynumberYesY coordinate in pixels

ProcessStepModel

ProcessStep Model Interface

Represents an individual step within a process workflow. Steps define actions, conditions, and transitions that make up the process flow. Supports visual representation in flowchart diagrams.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique step identifier (format: step_<nanoid>)
processIdstringYesParent process ID this step belongs to
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesWorkspace ID for workspace-level isolation
userIdstringYesUser ID of step creator
createdAtstringYesISO 8601 timestamp when step was created
updatedAtstringYesISO 8601 timestamp when step was last updated
namestringYesInternal system name (kebab-case identifier)
titlestringYesHuman-readable step title for display
descriptionstringYesDetailed description of what this step does
stepTypeProcessStepTypeYesType of step determining its behavior
ordernumberYesExecution order within the process (0-based)
actionStepAction | undefinedNoAction configuration for executable steps
conditionsStepCondition[] | undefinedNoConditions for decision/gateway steps
nextStepIdstring | undefinedNoDefault next step ID (for non-conditional transitions)
outputsStepOutput[] | undefinedNoOutput mappings for step results
inputsRecord<string, unknown> | undefinedNoInput variable mappings (maps process variables to step inputs)
positionStepPosition | undefinedNoVisual position for flowchart rendering
style{ backgroundColor?: string; borderColor?: string; textColor?: string; width?: number; height?: number; } | undefinedNoCustom node style for visual representation
iconstring | undefinedNoIcon identifier for visual representation
optionalbooleanYesWhether this step is optional (can be skipped)
enabledbooleanYesWhether this step is enabled
archivedbooleanYesSoft delete flag
estimatedDurationMinutesnumber | undefinedNoEstimated duration in minutes for this step
metadataProcessStepMetadata | undefinedNoStep metadata
extendedRecord<string, unknown> | undefinedNoExtensible object for future schema additions

ProcessStepMetadata

ProcessStep metadata structure

Properties:

PropertyTypeRequiredDescription
documentationUrlstring | undefinedNoDocumentation URL
helpTextstring | undefinedNoHelp text for users
validation{ inputRequired?: boolean; outputRequired?: boolean; customRules?: Record<string, unknown>[]; } | undefinedNoValidation rules
logging{ level?: "debug" | "info" | "warn" | "error"; includeInputs?: boolean; includeOutputs?: boolean; } | undefinedNoLogging configuration
errorHandling{ onError?: "fail" | "skip" | "retry" | "goto"; gotoStepId?: string; errorMessage?: string; } | undefinedNoError handling configuration

ProductKpi

Key Performance Indicator

Tracks measurable metrics for product success evaluation.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique identifier for the KPI
namestringYesHuman-readable name of the KPI
targetnumberYesTarget value to achieve
currentnumberYesCurrent measured value
unitstringYesUnit of measurement (e.g., '%', 'users', 'seconds')
trendKpiTrendYesDirection of recent change

PhaseHistoryEntry

Phase History Entry

Records a product's transition through lifecycle phases.

Properties:

PropertyTypeRequiredDescription
phaseProductPhaseYesThe lifecycle phase
enteredAtstringYesISO 8601 timestamp when the product entered this phase
exitedAtstring | undefinedNoISO 8601 timestamp when the product exited this phase (undefined if current)

ProductMetadata

Product Metadata

Stores additional product-specific information that doesn't fit the core schema.

Properties:

PropertyTypeRequiredDescription
completenessScorenumber | undefinedNoCalculated completeness score (0-100) based on filled fields
versionstring | undefinedNoProduct version string
platformsstring[] | undefinedNoTarget platforms (e.g., ['web', 'ios', 'android'])
techStackstring[] | undefinedNoTechnology stack used in the product
releaseNotesstring | undefinedNoLatest release notes

ProductModel

Product Model Interface

Represents a product entity in the Product Management app. Products are the top-level entities that contain all product-related information including strategy, lifecycle tracking, and performance metrics.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique product identifier (format: prod_XXXXXXXXXX)
namestringYesInternal system name (kebab-case identifier)
slugstring | undefinedNoURL-friendly slug derived from name
typeProductTypeYesProduct category type
descriptionstring | undefinedNoDetailed product description (optional - can be added after initial creation)
iconstring | undefinedNoIcon identifier for UI display
colorstring | undefinedNoBrand color in hex format (e.g., '#6366f1')
problemStatementstring | undefinedNoProblem the product solves for its target market
valuePropositionstring | undefinedNoUnique value proposition describing why customers should choose this product
targetMarketstring[] | undefinedNoArray of target market segments
competitiveLandscapestring | undefinedNoAnalysis of competitive landscape
customerPersonastring | undefinedNoCustomer Persona
kpisProductKpi[] | undefinedNoArray of key performance indicators
currentPhaseProductPhaseYesCurrent lifecycle phase
phaseHistoryPhaseHistoryEntry[] | undefinedNoHistory of phase transitions
createdAtstringYesISO 8601 timestamp when product was created
updatedAtstringYesISO 8601 timestamp when product was last updated
archivedbooleanYesSoft delete flag - true if product has been archived
orgIdstringYesOrganization ID for multi-tenant data isolation
userIdstringYesUser ID of product creator/owner
workspaceIdstringYesWorkspace ID for workspace-level isolation
sourceTemplateIdstring | undefinedNoOptional template ID if product was created from a template
metadataProductMetadata | undefinedNoOptional additional metadata
extendedRecord<string, unknown> | undefinedNoExtensible object for future schema additions

ProductGoalModel

ProductGoal Model Interface

Represents a junction table linking products to their associated goals. This enables a many-to-many relationship between products and goals, allowing multiple goals to be tracked for each product with ordering and primary goal designation.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique identifier (format: pgoal_timestamp_random)
productIdstringYesProduct ID reference
goalIdstringYesGoal ID reference
ordernumberYesDisplay order for sorting goals within a product
isPrimaryboolean | undefinedNoIndicates if this is the primary goal for the product
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesWorkspace ID for workspace-level isolation
userIdstringYesUser ID of the creator
createdAtstringYesISO 8601 timestamp when the link was created
updatedAtstringYesISO 8601 timestamp when the link was last updated
extendedRecord<string, unknown> | undefinedNoExtensible object for custom data

ProductProjectModel

ProductProject Junction Model

Links products to projects in a many-to-many relationship. Supports bidirectional navigation and role classification.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique identifier (format: ppro_XXXXXXXXXX)
productIdstringYesProduct ID being linked
projectIdstringYesProject ID being linked
roleProductProjectRoleYesRole of this project for the product
linkedAtstringYesISO 8601 timestamp when link was created
linkedBystringYesUser ID who created the link
orgIdstringYesOrganization ID for multi-tenant isolation
workspaceIdstringYesWorkspace ID for workspace-level isolation
createdAtstringYesISO 8601 timestamp when record was created
updatedAtstringYesISO 8601 timestamp when record was last updated
extendedRecord<string, unknown> | undefinedNoExtensible object for custom data

ProductTeamMemberModel

ProductTeamMember Junction Model

Links products to team members in a many-to-many relationship. Allows team members (including agents) to be assigned to multiple products.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique identifier (format: ptmb_XXXXXXXXXX)
productIdstringYesProduct ID being linked
teamMemberIdstringYesTeamMember ID being linked
roleProductTeamMemberRoleYesRole of this team member for the product
isPrimarybooleanYesWhether this is the primary product for this team member
linkedAtstringYesISO 8601 timestamp when link was created
linkedBystringYesUser ID who created the link
orgIdstringYesOrganization ID for multi-tenant isolation
workspaceIdstringYesWorkspace ID for workspace-level isolation
createdAtstringYesISO 8601 timestamp when record was created
updatedAtstringYesISO 8601 timestamp when record was last updated
extendedRecord<string, unknown> | undefinedNoExtensible object for custom data

ProjectModel

Project Model Interface

Represents a project within a goal, serving as a container for milestones and tasks. Projects provide mid-level organization between high-level goals and tactical tasks. Supports association with workspaces and codebases for development project tracking.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique project identifier
namestringYesInternal system name (kebab-case identifier)
titlestringYesHuman-readable project title for display
descriptionstringYesDetailed description of project scope and deliverables
completedbooleanYesCompletion status flag
goalIdstringYesParent goal ID this project belongs to
createdAtstringYesISO 8601 timestamp when project was created
updatedAtstringYesISO 8601 timestamp when project was last updated
startAtstring | undefinedNoOptional planned start date for project (ISO 8601)
startedAtstring | undefinedNoOptional actual start date when project work began (ISO 8601)
dueAtstring | undefinedNoOptional due date for project completion (ISO 8601)
completedAtstring | undefinedNoOptional actual completion date when project was finished (ISO 8601)
archivedbooleanYesSoft delete flag - true if project has been archived
orgIdstringYesOrganization ID for multi-tenant data isolation
userIdstringYesUser ID of project creator/owner
workspaceIdstring | undefinedNoOptional parent workspace ID for workspace-scoped projects
codebaseIdstring | undefinedNoOptional parent codebase ID for code-related projects
sourceTemplateIdstring | undefinedNoOptional template ID if project was created from a template
timeBudgetHoursnumber | undefinedNoOptional time budget in hours for project estimation
categoryIdstring | undefinedNoOptional category ID for project classification
tagIdsstring[] | undefinedNoOptional array of tag IDs for flexible categorization
metadataProjectMetadata | undefinedNoOptional MCP and spec tracking metadata
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

ProjectMetadata

Metadata structure for MCP-managed projects and specs

Properties:

PropertyTypeRequiredDescription
specType"feature" | "bugfix" | "refactor" | undefinedNoType of spec/project: feature, bugfix, or refactor
phase"requirements" | "design" | "tasks" | "implementation" | undefinedNoCurrent development phase
createdByMCPboolean | undefinedNoFlag indicating if project was created by MCP agent
mcpVersionstring | undefinedNoMCP version that created/managed this project

RoadmapModel

Roadmap Model Interface

Represents a product-level roadmap with optional start/end quarters.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique roadmap identifier
productIdstringYesProduct this roadmap belongs to
startQuarterstring | undefinedNoOptional start quarter label (e.g., "Q1 2026")
endQuarterstring | undefinedNoOptional end quarter label (e.g., "Q4 2026")
orgIdstringYesOrganization ID for multi-tenant isolation
workspaceIdstringYesWorkspace ID for workspace-level isolation
userIdstringYesUser ID of roadmap creator/owner
createdAtstringYesISO 8601 timestamp when roadmap was created
updatedAtstringYesISO 8601 timestamp when roadmap was last updated
metadataRecord<string, unknown> | undefinedNoOptional additional metadata
extendedRecord<string, unknown> | undefinedNoExtensible object for future schema additions

SessionModel

Session Model Interface

Represents an agent work session for context tracking and recovery. Sessions maintain state for ongoing work, allowing agents to pause and resume development tasks with full context preservation. Essential for long-running agent workflows and collaborative development scenarios.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique session identifier
orgIdstringYesOrganization ID for multi-tenant data isolation
userIdstringYesUser ID associated with this session
codebaseIdstringYesCodebase ID for the repository being worked on
workspaceIdstringYesWorkspace ID for workspace-level context
projectIdstring | undefinedNoOptional project ID if session is project-scoped
milestoneIdstring | undefinedNoOptional milestone ID if session is milestone-scoped
taskIdstring | undefinedNoOptional task ID if session is task-scoped
sessionType"agent" | "custom" | "debug" | "terminal" | undefinedNoSession type identifier
createdAtstringYesISO 8601 timestamp when session was created
updatedAtstringYesISO 8601 timestamp when session was last updated
expiresAtstring | undefinedNoOptional ISO 8601 timestamp when session expires
archivedbooleanYesSoft delete flag - true if session has been archived
contextSessionContextYesFlexible context object for storing session state
metadataRecord<string, any> | undefinedNoAdditional metadata for extensibility
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

SessionContext

Session Context Interface

Stores flexible state information for agent session recovery. Allows arbitrary fields for future extensibility while providing common fields for typical development workflows.

Properties:

PropertyTypeRequiredDescription
activeTaskIdstring | undefinedNoCurrent task ID being worked on
currentPhasestring | undefinedNoCurrent development phase or stage
lastActivitystring | undefinedNoISO 8601 timestamp of last activity
workingDirectorystring | undefinedNoWorking directory path within repository
gitBranchstring | undefinedNoCurrent git branch name
notesstring | undefinedNoFree-form notes for session context
shellSessionIdstring | undefinedNoID from shell-server for terminal sessions
processIdnumber | undefinedNoProcess ID of the shell process
connectionStatusTerminalConnectionStatus | undefinedNoCurrent connection status for terminal sessions
shellTypeShellType | undefinedNoType of shell being used
displayNamestring | undefinedNoUser-editable display name for the session
autoGeneratedNamestring | undefinedNoSystem-generated name based on context
scopedEntityTypeSessionScopeEntityType | undefinedNoEntity type this session is scoped to
scopedEntityIdstring | undefinedNoID of the scoped entity
lastOutputstring | undefinedNoLast N lines of terminal output for context preservation
environmentSnapshotRecord<string, string> | undefinedNoEnvironment variables snapshot for session restoration
terminalColsnumber | undefinedNoTerminal dimensions (columns)
terminalRowsnumber | undefinedNoTerminal dimensions (rows)
lastConnectedAtstring | undefinedNoISO 8601 timestamp when session was last connected
disconnectedAtstring | undefinedNoISO 8601 timestamp when session was disconnected

SyncFieldMapping

Sync Field Mapping Interface

Defines how a field should be mapped between FlowState and an external provider.

Properties:

PropertyTypeRequiredDescription
flowstateFieldstringYesField name in FlowState entity
externalFieldstringYesField name in external provider entity
transform"custom" | "direct"YesTransform type: 'direct' for 1:1 mapping, 'custom' for custom transformer
transformerNamestring | undefinedNoName of custom transformer function (required when transform is 'custom')
defaultValueunknownNoDefault value to use when source field is missing or null

SyncConfigModel

Sync Config Model Interface

Represents a synchronization configuration between FlowState and an external provider. Stores credentials, field mappings, sync direction, and status information. Supports syncing tasks, projects, and milestones with external services like GitHub, Jira, etc.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique sync configuration identifier
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesWorkspace ID this sync configuration belongs to
userIdstringYesUser ID who created/owns this configuration
providerIdstringYesProvider type identifier (e.g., 'github', 'jira', 'asana')
namestringYesUser-friendly name for this sync configuration
descriptionstring | undefinedNoOptional detailed description of the sync configuration
targetProjectIdstring | undefinedNoTarget project ID for synced items (optional)
targetMilestoneIdstring | undefinedNoTarget milestone ID for synced items (optional)
direction"pull" | "push" | "bidirectional"YesDirection of synchronization: 'pull', 'push', or 'bidirectional'
pollingIntervalMsnumberYesPolling interval in milliseconds (minimum 60000ms = 1 minute)
enabledbooleanYesWhether this sync configuration is enabled
credentialsstringYesProvider-specific credentials (tokens, API keys, etc.) - stored as JSON string
providerConfigstringYesProvider-specific configuration options - stored as JSON string
fieldMappingsstringYesField mappings between FlowState and external provider - stored as JSON string
lastSyncAtstring | undefinedNoTimestamp of last successful sync (ISO 8601 string)
lastSyncErrorstring | undefinedNoError message from last sync attempt, if any
lastSyncItemCountnumber | undefinedNoNumber of items synced in the last sync operation
createdAtstringYesISO 8601 timestamp when configuration was created
updatedAtstringYesISO 8601 timestamp when configuration was last updated
archivedbooleanYesSoft delete flag - true if configuration has been archived
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

TaskModel

Task Model Interface

Represents an actionable task within a milestone. Tasks are the atomic units of work in the project hierarchy (Goal > Project > Milestone > Task). Supports MCP agent execution, conversation management, time tracking, recurrence patterns, and flexible categorization via tags and categories.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique task identifier
orgIdstringYesOrganization ID for multi-tenant data isolation
userIdstringYesUser ID who created or owns this task
createdAtstringYesISO 8601 timestamp when task was created
updatedAtstringYesISO 8601 timestamp when task was last updated
namestringYesInternal system name (kebab-case identifier)
titlestringYesHuman-readable task title for display
descriptionstringYesDetailed task description and requirements
startAtstring | undefinedNoOptional planned start date for task (ISO 8601)
startedAtstring | undefinedNoOptional actual start date when task work began (ISO 8601)
dueAtstring | undefinedNoOptional due date for task completion (ISO 8601)
completedAtstring | undefinedNoOptional actual completion date when task was finished (ISO 8601)
status"In Progress" | "Complete" | "To Do" | "On Hold" | "Blocked"YesCurrent task status for workflow tracking
type"habit" | "todo"YesTask type: 'habit' for recurring habits, 'todo' for standard tasks
completedbooleanYesCompletion flag (true when status is 'Complete')
workspaceIdstringYesParent workspace ID this task belongs to - required for all tasks
projectIdstring | undefinedNoOptional parent project ID - tasks can exist at workspace level without a project
milestoneIdstring | undefinedNoOptional parent milestone ID - tasks can exist at project level without a milestone
parentTaskIdstring | undefinedNoOptional parent task ID for nested subtasks
archivedbooleanYesSoft delete flag - true if task has been archived
timeBudgetHoursnumber | undefinedNoOptional time budget in hours for task estimation
isRecurringboolean | undefinedNoFlag indicating if this is a recurring task
recurrenceRulestring | undefinedNoiCal RRULE string defining recurrence pattern (e.g., 'FREQ=WEEKLY;BYDAY=MO,WE,FR')
parentRecurrenceIdstring | undefinedNoID linking to parent recurring task series
recurrenceInstanceDatestring | undefinedNoSpecific instance date for individual recurring task occurrences
categoryIdstring | undefinedNoOptional category ID for task classification
tagIdsstring[] | undefinedNoOptional array of tag IDs for flexible categorization
metadataTaskMetadata | undefinedNoOptional MCP execution tracking and conversation management metadata
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

TaskMetadata

Task Metadata Interface

Stores MCP agent execution context, conversation history, time tracking references, and spec workflow data for AI-driven task automation.

Properties:

PropertyTypeRequiredDescription
executionType"local" | "remote" | undefinedNoExecution type: 'local' for local agent, 'remote' for cloud agent
promptstring | undefinedNoAI prompt describing task requirements for agent execution
leveragestring | string[] | undefinedNoFiles to reuse/reference (string for spec workflow, array for legacy)
requirementsstring | string[] | undefinedNoRequirement IDs to satisfy (string for spec workflow, array for legacy)
assignedAgentstring | undefinedNoWorker ID of agent currently assigned to this task
executionAttemptsnumber | undefinedNoNumber of execution attempts made
lastExecutionErrorstring | undefinedNoLast error message if task execution failed
conversationStateConversationState | undefinedNoMulti-turn conversation state with compression support for long conversations
conversationHistory{ role: string; content: string; timestamp: string; }[] | undefinedNoLegacy conversation history (being migrated to conversationState)
timeEntryIdsstring[] | undefinedNoArray of TimeEntry document IDs tracking time spent on this task
totalTimeSecondsnumber | undefinedNoCumulative time spent on task in seconds
logIdsstring[] | undefinedNoArray of Log document IDs for task execution logs
createdByMCPboolean | undefinedNoFlag indicating if task was created by MCP agent
taskNumberstring | undefinedNoHierarchical task number from spec workflow (e.g., '1.1.1', '2.3.1')
parentTaskNumberstring | undefinedNoParent task number for hierarchical structure (e.g., '1.1' for task '1.1.1')
markdownStatus"[ ]" | "[-]" | "[x]" | undefinedNoCheckbox state from tasks.md markdown file
promptSections{ key: string; value: string; }[] | undefinedNoStructured prompt sections for AI task execution

RaciAssignment

RACI assignment for a specific area.

Properties:

PropertyTypeRequiredDescription
areastringYesArea of responsibility (e.g., 'strategy', 'development', 'design')
typeRaciTypeYesRACI type for this area

TeamMemberModel

TeamMember Model

Represents a team member (human or AI agent) scoped to an organization. Team members can be assigned to products in multiple workspaces via the ProductTeamMember junction table for many-to-many relationships.

Key design decisions:

  • Team members are ORG-scoped, not workspace-scoped
  • workspaceId is optional (legacy field for backward compatibility)
  • Use ProductTeamMember to link team members to products across workspaces

Properties:

PropertyTypeRequiredDescription
idstringYesUnique identifier (format: team_XXXXXXXXXX)
productIdstring | undefinedNoProduct ID this team member belongs to.
userIdstringYesUser ID of the team member
userNamestringYesDisplay name of the user
userEmailstring | undefinedNoEmail address of the user
userAvatarstring | undefinedNoAvatar URL of the user
roleTeamMemberRoleYesRole within the product team
raciAssignmentsRaciAssignment[]YesRACI assignments for different areas
isAgentbooleanYesWhether this team member is an AI agent
joinedAtstringYesISO 8601 timestamp when member joined the product team
orgIdstringYesOrganization ID for multi-tenant isolation
workspaceIdstring | undefinedNoWorkspace ID for workspace-level isolation.
createdAtstringYesISO 8601 timestamp when record was created
updatedAtstringYesISO 8601 timestamp when record was last updated
extendedRecord<string, unknown> | undefinedNoExtensible object for custom data (e.g., agent references, metadata)

TemplateModel

Template Model Interface

Represents a template document for spec or steering document generation. Supports version management and org-specific customization with system defaults.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique template identifier (format: template_<type>_<orgId>)
templateType"project" | "milestone" | "task" | "product" | "tech" | "structure" | "requirements" | "design" | "tasks"YesType of template determining its usage context
namestringYesHuman-readable template name for display
contentstringYesMarkdown template content with optional placeholder variables
versionstringYesSemantic version string (e.g., 'v1.0.0', 'v2.1.0') for tracking changes
isDefaultbooleanYesFlag indicating if this is a system default template (orgId: 'system')
orgIdstringYesOrganization ID for multi-tenant isolation ('system' for defaults)
workspaceIdstringYesWorkspace ID for workspace-level data isolation
userIdstring | undefinedNoOptional user ID of template creator (omitted for system templates)
createdAtstringYesISO 8601 timestamp when template was created
updatedAtstringYesISO 8601 timestamp when template was last updated
metadata{ [key: string]: any; description?: string; language?: string; category?: "spec" | "steering" | TemplateCategory; } | undefinedNoOptional extensible metadata for template customization
dataProjectTemplateData | undefinedNoOptional project template data (used when templateType === 'project')
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

TemplateItem

Template item in a project template hierarchy

Properties:

PropertyTypeRequiredDescription
templateIdstringYesUnique ID within template for cross-referencing
titlestringYesDisplay title
descriptionstring | undefinedNoOptional description
startOffsetDaysnumberYesDays offset from parent's start date
durationDaysnumberYesDuration in days

MilestoneTemplateItem

Milestone template extending base template item

TaskTemplateItem

Task template with parent milestone reference

Properties:

PropertyTypeRequiredDescription
milestoneTemplateIdstringYesReferences parent milestone's templateId

SubtaskTemplateItem

Subtask template with parent task reference

Properties:

PropertyTypeRequiredDescription
taskTemplateIdstringYesReferences parent task's templateId

ProjectTemplateData

Complete project template data structure Stored in Template.data when templateType === 'project'

Properties:

PropertyTypeRequiredDescription
project{ title: string; description?: string; }YesProject-level template data
milestonesMilestoneTemplateItem[]YesArray of milestone templates
tasksTaskTemplateItem[]YesArray of task templates
subtasksSubtaskTemplateItem[]YesArray of subtask templates

TimeEntryModel

Time Entry Model Interface

Represents a tracked time interval for work performed on any entity. Time entries provide detailed time tracking for billing, productivity analysis, and project management. Each entry records start/end times and calculates duration. Categories and tags can be inherited from the associated entity or manually set.

Note: The taskId field is named for backwards compatibility but can store any entity ID (task, project, milestone, goal, etc.). Use getEntityTypeFromId() from '@epicdm/flowstate-collections' to determine the entity type from the ID prefix.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique time entry identifier
namestringYesDescriptive name/label for this time entry
startstringYesISO 8601 timestamp when time tracking started
endstring | undefinedNoISO 8601 timestamp when time tracking ended (undefined = timer still running)
durationnumber | undefinedNoCalculated duration in seconds (end - start), undefined while timer running
taskIdstringYesEntity ID this time entry is associated with (named taskId for backwards compatibility).
Can be any entity type: task, project, milestone, goal, etc.
Use getEntityTypeFromId() to determine the entity type from the ID prefix.
archivedbooleanYesSoft delete flag - true if time entry has been archived
orgIdstringYesOrganization ID for multi-tenant data isolation
workspaceIdstringYesWorkspace ID for multi-tenant filtering
userIdstringYesUser ID who performed the work
createdAtstringYesISO 8601 timestamp when time entry was created
updatedAtstringYesISO 8601 timestamp when time entry was last updated
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions
categoryIdstring | undefinedNoOptional category ID (inherited from task or manually set)
tagIdsstring[] | undefinedNoOptional tag IDs (inherited from task or manually set)

UserModel

User Model Interface

Represents a user account within the system. Users belong to an organization and can access resources based on their permissions. Tracks authentication integration, onboarding status, and user preferences like timezone.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique user identifier
createdAtstringYesISO 8601 timestamp when user account was created
updatedAtstringYesISO 8601 timestamp when user account was last updated
namestringYesUser's display name
emailstringYesUser's email address for authentication and communication
authUserIdstring | undefinedNoOptional external authentication user ID (e.g., from Auth0, Firebase)
timezonestring | undefinedNoOptional user timezone preference (e.g., 'America/Los_Angeles', 'UTC')
archivedbooleanYesSoft delete flag - true if user account has been archived
orgIdstringYesOrganization ID this user belongs to
onboardedbooleanYesOnboarding completion status flag
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions

VariablesModel

Variables Model Interface

Flexible variable storage supporting environment-specific overrides, feature flags, secrets, and arbitrary contexts for future use cases.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique variable document identifier (format: var_<codebaseId><context><timestamp>)
codebaseIdstringYesParent codebase ID
orgIdstringYesOrganization ID for multi-tenant data isolation
contextstringYesContext scope where these variables apply:
  • 'env:base' - Base environment variables (shared across all environments)
  • 'env:development' - Development environment overrides
  • 'env:production' - Production environment overrides
  • 'env:<custom>' - Custom environment overrides
  • 'global' - Codebase-wide variables (not env-specific)
  • 'feature-flags' - Feature toggles
  • 'secrets' - Sensitive values (future: encrypted)
  • Custom contexts for future use cases | | variables | Record<string, string> | Yes | Key-value pairs for this context | | metadata | { [key: string]: any; label?: string; description?: string; source?: string; importedAt?: string; lastModifiedBy?: string; } | Yes | Context metadata | | createdAt | string | Yes | ISO 8601 timestamp when created | | updatedAt | string | Yes | ISO 8601 timestamp when last updated | | archived | boolean | Yes | Flag for soft delete | | extended | Record<string, any> \| undefined | No | Extensible object for future schema additions |

WorkspaceModel

Workspace Model Interface

Represents a high-level organizational workspace that contains multiple codebases. A workspace provides organizational context, steering documents, and high-level configuration for all codebases and projects within it.

Properties:

PropertyTypeRequiredDescription
idstringYesUnique workspace identifier (format: workspace_<name>_<orgId>)
orgIdstringYesOrganization ID for multi-tenant data isolation
userIdstringYesUser ID of workspace creator
namestringYesWorkspace name (kebab-case, unique within org)
titlestringYesHuman-readable workspace title for display
descriptionstringYesWorkspace purpose and description
tagsstring[] | undefinedNoTags for organization and filtering
status"active" | "archived" | "paused"YesWorkspace status
createdAtstringYesISO 8601 timestamp when workspace was created
updatedAtstringYesISO 8601 timestamp when workspace was last updated
archivedAtstring | undefinedNoISO 8601 timestamp when workspace was archived (only when status='archived')
archivedbooleanYesFlag for soft delete
extendedRecord<string, any> | undefinedNoExtensible object for future schema additions
metadata{ [key: string]: any; teamMembers?: string[]; primaryLanguage?: "typescript" | "javascript" | "python" | "go" | "rust" | "other"; frameworks?: string[]; methodology?: "agile" | "scrum" | "kanban" | "waterfall"; } | undefinedNoOptional extensible metadata

ParsedMention

Mention Parser Utility

Extracts

Properties:

PropertyTypeRequiredDescription
identifierstringYesThe handle without the @ symbol
positionnumberYesCharacter position where the @ starts

AgentLookupEntry

Lookup entry for agent/user resolution

Properties:

PropertyTypeRequiredDescription
teamMemberIdstringYes
isAgentbooleanYes

ApprovalFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
projectIdstring | undefinedNo
milestoneIdstring | undefinedNo
status"pending" | "approved" | "rejected" | "needs-revision" | undefinedNo
type"action" | "document" | undefinedNo
category"spec" | "steering" | undefinedNo
userIdstring | undefinedNo

CreateApprovalInput

Properties:

PropertyTypeRequiredDescription
projectIdstringYes
milestoneIdstring | undefinedNo
titlestringYes
type"action" | "document"Yes
category"spec" | "steering"Yes
categoryNamestringYes
documentTypestring | undefinedNo
documentContentstring | undefinedNo
orgIdstringYes
workspaceIdstringYes
userIdstringYes

UpdateApprovalInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<ApprovalModel>Yes

AttributeFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
entityTypestring | undefinedNo
typestring | undefinedNo
userIdstring | undefinedNo
archivedboolean | undefinedNo

CreateAttributeInput

Properties:

PropertyTypeRequiredDescription
namestringYes
titlestringYes
descriptionstring | undefinedNo
colorstringYes
orgIdstringYes
workspaceIdstringYes
userIdstring | undefinedNo
entityTypestringYes
typestringYes
sortOrdernumber | undefinedNo
popularitynumber | undefinedNo
metadataRecord<string, any> | undefinedNo

UpdateAttributeInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<AttributeModel>Yes

BusinessPlanFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
userIdstring | undefinedNo
status"draft" | "active" | "archived" | undefinedNo
planType"startup" | "growth" | "pivot" | "annual" | undefinedNo
archivedboolean | undefinedNo

CreateBusinessPlanInput

Properties:

PropertyTypeRequiredDescription
titlestringYes
descriptionstring | undefinedNo
orgIdstringYes
workspaceIdstringYes
userIdstringYes
status"draft" | "active" | "archived" | undefinedNo
planType"startup" | "growth" | "pivot" | "annual"Yes
missionStatementstring | undefinedNo
visionStatementstring | undefinedNo
targetMarketstring | undefinedNo
problemStatementstring | undefinedNo
solutionSummarystring | undefinedNo
revenueModelstring | undefinedNo
competitiveAdvantagestring | undefinedNo
timeframeMonthsnumber | undefinedNo
startDatestring | undefinedNo
endDatestring | undefinedNo

UpdateBusinessPlanInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<BusinessPlanModel>Yes

ClientFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
userIdstring | undefinedNo
archivedboolean | undefinedNo

CreateClientInput

Properties:

PropertyTypeRequiredDescription
namestringYes
companystringYes
emailstringYes
phonestringYes
addressstringYes
primaryContactIdstring | undefinedNo
orgIdstringYes
workspaceIdstringYes
userIdstringYes

UpdateClientInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<ClientModel>Yes

CodebaseFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
status"active" | "archived" | "paused" | undefinedNo
archivedboolean | undefinedNo

CreateCodebaseInput

Properties:

PropertyTypeRequiredDescription
workspaceIdstringYes
orgIdstringYes
userIdstringYes
namestringYes
titlestringYes
descriptionstringYes
repository{ url: string; defaultBranch: string; provider: "github" | "gitlab" | "bitbucket" | "other"; organization?: string; repositoryName?: string; privateRepo: boolean; accessToken?: string; sshKey?: string; }Yes
environment{ nodeVersion?: string; packageManager: "npm" | "yarn" | "pnpm" | "bun"; workingDirectory?: string; setupCommands: string[]; testCommands?: string[]; buildCommands?: string[]; environmentVariables?: Record<string, string>; }Yes
deployment{ platform: "cloudflare" | "digitalocean" | "vercel" | "railway" | "aws" | "custom"; productionUrl?: string; stagingUrl?: string; previewUrlPattern?: string; deployCommand?: string; deployBranch?: string; cicdProvider?: "github-actions" | "gitlab-ci" | "cloudflare-pages" | "custom"; cicdConfigPath?: string; platformConfig?: { cloudflareProjectName?: string; cloudflareAccountId?: string; digitaloceanAppId?: string; digitaloceanDropletId?: string; [key: string]: any; }; } | undefinedNo
agentWorkflow{ branchStrategy: "feature-per-spec" | "feature-per-task" | "shared-branch"; branchPrefix: string; commitConvention: "conventional" | "simple" | "custom"; commitTemplate?: string; requireTests: boolean; requireLint: boolean; createPR: boolean; prTitleTemplate?: string; prDescriptionTemplate?: string; prReviewers?: string[]; prLabels?: string[]; } | undefinedNo
tagsstring[] | undefinedNo
metadata{ [key: string]: any; monorepo: boolean; languages?: string[]; frameworks?: string[]; testFramework?: string; codeStyle?: string; docsUrl?: string; } | undefinedNo

UpdateCodebaseInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<CodebaseModel>Yes

CompetitorFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
userIdstring | undefinedNo
businessPlanIdstring | undefinedNo
threatLevel"low" | "medium" | "high" | undefinedNo
archivedboolean | undefinedNo

CreateCompetitorInput

Properties:

PropertyTypeRequiredDescription
namestringYes
descriptionstring | undefinedNo
orgIdstringYes
workspaceIdstringYes
userIdstringYes
businessPlanIdstringYes
websitestring | undefinedNo
pricingstring | undefinedNo
marketSharestring | undefinedNo
threatLevel"low" | "medium" | "high"Yes

UpdateCompetitorInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<CompetitorModel>Yes

ContactFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
userIdstring | undefinedNo
archivedboolean | undefinedNo
companystring | undefinedNo

CreateContactInput

Properties:

PropertyTypeRequiredDescription
firstNamestringYes
lastNamestringYes
emailstringYes
phonestringYes
companystringYes
titlestringYes
addressstringYes
orgIdstringYes
workspaceIdstringYes
userIdstringYes

UpdateContactInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<ContactModel>Yes

ConversationFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
userIdstring | undefinedNo
provider"anthropic" | "openai" | "lmstudio" | undefinedNo

CreateConversationInput

Properties:

PropertyTypeRequiredDescription
titlestringYes
orgIdstringYes
workspaceIdstringYes
userIdstringYes
provider"anthropic" | "openai" | "lmstudio"Yes
modelstringYes
settingsimport("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/index").ConversationSettingsYes

UpdateConversationInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<ConversationModel>Yes

DiscussionFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
userIdstring | undefinedNo
entityTypestring | undefinedNo
entityIdstring | undefinedNo
parentIdstring | undefinedNo
isDeletedboolean | undefinedNo

CreateDiscussionInput

Properties:

PropertyTypeRequiredDescription
contentstringYes
entityTypestringYes
entityIdstringYes
orgIdstringYes
workspaceIdstringYes
userIdstringYes
userNamestringYes
userAvatarstring | undefinedNo
parentIdstring | undefinedNo
contentHtmlstring | undefinedNo
metadataRecord<string, any> | undefinedNo

UpdateDiscussionInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<DiscussionModel>Yes

DocumentFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
projectIdstring | undefinedNo
milestoneIdstring | undefinedNo
taskIdstring | undefinedNo
documentType"product" | "steering" | "tech" | "structure" | "markdown" | "filetree" | "note" | undefinedNo
approvedboolean | undefinedNo

CreateDocumentInput

Properties:

PropertyTypeRequiredDescription
titlestringYes
contentstringYes
orgIdstringYes
userIdstringYes
documentType"product" | "steering" | "tech" | "structure" | "markdown" | "filetree" | "note"Yes
workspaceIdstring | undefinedNo
projectIdstring | undefinedNo
milestoneIdstring | undefinedNo
taskIdstring | undefinedNo
metadata{ [key: string]: any; templateVersion?: string; scope?: "organization" | "workspace" | "project" | "milestone" | "task"; } | undefinedNo

UpdateDocumentInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<DocumentModel>Yes

FinAccountFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
userIdstring | undefinedNo
budgetIdstring | undefinedNo
is_deletedboolean | undefinedNo
typestring | undefinedNo
on_budgetboolean | undefinedNo
closedboolean | undefinedNo

CreateFinAccountInput

Properties:

PropertyTypeRequiredDescription
namestringYes
typeAccountTypeYes
orgIdstringYes
workspaceIdstringYes
userIdstringYes
budget_idstringYes
on_budgetbooleanYes
closedbooleanYes
balancenumberYes
cleared_balancenumberYes
uncleared_balancenumberYes
direct_import_linkedboolean | undefinedNo
direct_import_in_errorboolean | undefinedNo
notestring | null | undefinedNo
transfer_payee_idstring | undefinedNo
debt_original_balancenumber | null | undefinedNo

UpdateFinAccountInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<FinAccountModel>Yes

FinBudgetFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
userIdstring | undefinedNo
trashedboolean | undefinedNo

CreateFinBudgetInput

Properties:

PropertyTypeRequiredDescription
namestringYes
orgIdstringYes
workspaceIdstringYes
userIdstringYes
first_monthstringYes
last_monthstringYes
date_format{ format: string; }Yes
currency_format{ iso_code: string; example_format: string; decimal_digits: number; decimal_separator: string; symbol_first: boolean; }Yes
accounts{ id: string; name: string; type: string; balance: number; }[] | undefinedNo

UpdateFinBudgetInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<BudgetModel>Yes

FinCategoryFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
userIdstring | undefinedNo
category_group_idstring | undefinedNo
is_deletedboolean | undefinedNo
hiddenboolean | undefinedNo
goal_typestring | null | undefinedNo

CreateFinCategoryInput

Properties:

PropertyTypeRequiredDescription
namestringYes
orgIdstringYes
workspaceIdstringYes
userIdstringYes
category_group_idstringYes
category_group_namestring | undefinedNo
hiddenbooleanYes
budgetednumberYes
activitynumberYes
balancenumberYes
notestring | null | undefinedNo
goal_type"TB" | "TBD" | "MF" | "NEED" | "DEBT" | null | undefinedNo

UpdateFinCategoryInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<FinCategoryModel>Yes

FinIncomeStatementFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
userIdstring | undefinedNo
budgetIdstring | undefinedNo
isArchivedboolean | undefinedNo
isDefaultboolean | undefinedNo

CreateFinIncomeStatementInput

Properties:

PropertyTypeRequiredDescription
namestringYes
orgIdstringYes
workspaceIdstringYes
userIdstringYes
budgetIdstringYes
periodStatementPeriodYes
descriptionstring | undefinedNo
linkedStatementsLinkedStatementRef[] | undefinedNo
incomeCategoriesstring[] | undefinedNo
expenseCategoriesstring[] | undefinedNo
assetAccountsstring[] | undefinedNo
liabilityAccountsstring[] | undefinedNo
isDefaultboolean | undefinedNo
status"draft" | "active" | "archived" | undefinedNoWizard status: draft = incomplete, active = ready to use
wizardStepnumber | undefinedNoCurrent wizard step (1-6) for resuming setup
wizardCompletedStepsnumber[] | undefinedNoArray of completed wizard step numbers
ynabBudgetIdstring | undefinedNoYNAB budget ID if imported from YNAB

UpdateFinIncomeStatementInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<FinIncomeStatementModel>Yes

FinScheduledTransactionFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
userIdstring | undefinedNo
account_idstring | undefinedNo
category_idstring | undefinedNo
is_deletedboolean | undefinedNo
frequencyimport("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/types").ScheduledTransactionFrequency | undefinedNo

CreateFinScheduledTransactionInput

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstringYes
userIdstringYes
account_idstringYes
account_namestringYes
date_firststringYes
date_nextstringYes
frequencyimport("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/types").ScheduledTransactionFrequencyYes
amountnumberYes
memostring | null | undefinedNo
flag_colorTransactionFlagColor | undefinedNo
payee_idstring | null | undefinedNo
payee_namestring | null | undefinedNo
category_idstring | null | undefinedNo
category_namestring | null | undefinedNo

UpdateFinScheduledTransactionInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<FinScheduledTransactionModel>Yes

FinTransactionFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
userIdstring | undefinedNo
account_idstring | undefinedNo
category_idstring | undefinedNo
is_deletedboolean | undefinedNo
approvedboolean | undefinedNo
cleared"cleared" | "uncleared" | "reconciled" | undefinedNo

CreateFinTransactionInput

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstringYes
userIdstringYes
account_idstringYes
account_namestringYes
datestringYes
amountnumberYes
memostring | null | undefinedNo
cleared"cleared" | "uncleared" | "reconciled" | undefinedNo
approvedboolean | undefinedNo
payee_idstring | null | undefinedNo
payee_namestring | null | undefinedNo
category_idstring | null | undefinedNo
category_namestring | null | undefinedNo

UpdateFinTransactionInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<FinTransactionModel>Yes

FlowFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
userIdstring | undefinedNo
flowType"custom" | "database-schema" | "process-flow" | "agent-flow" | undefinedNo
projectIdstring | undefinedNo

CreateFlowInput

Properties:

PropertyTypeRequiredDescription
namestringYes
descriptionstringYes
orgIdstringYes
workspaceIdstringYes
userIdstringYes
flowType"custom" | "database-schema" | "process-flow" | "agent-flow"Yes
nodesany[] | undefinedNo
edgesany[] | undefinedNo
viewport{ x: number; y: number; zoom: number; } | undefinedNo
metadata{ tags?: string[]; projectId?: string; version?: string; } | undefinedNo

UpdateFlowInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<FlowModel>Yes

GoalFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
userIdstring | undefinedNo
completedboolean | undefinedNo
archivedboolean | undefinedNo
priority"1" | "2" | "3" | "4" | "5" | undefinedNo

CreateGoalInput

Properties:

PropertyTypeRequiredDescription
titlestringYes
descriptionstringYes
orgIdstringYes
userIdstringYes
priority"1" | "2" | "3" | "4" | "5"Yes
dueDatestringYes
progressModeimport("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/index").GoalProgressMode | undefinedNoOptional progress mode, defaults to 'manual'
statusimport("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/index").GoalStatus | undefinedNoOptional status, defaults to 'Not Started'
metricsimport("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/index").GoalMetric[] | undefinedNoOptional metrics array
targetDatestring | undefinedNoOptional target date
currentProgressnumber | undefinedNoOptional current progress (0-100)
parentGoalIdstring | undefinedNoOptional parent goal ID for hierarchical goals
categoryimport("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/index").GoalCategory | undefinedNoOptional category
workspaceIdstring | undefinedNoOptional workspace ID

UpdateGoalInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<GoalModel>Yes

InitiativeFilters

Properties:

PropertyTypeRequiredDescription
orgIdstring | undefinedNo
workspaceIdstring | undefinedNo
roadmapIdstring | undefinedNo
status"In Progress" | "Backlog" | "Planned" | "Done" | undefinedNo

CreateInitiativeInput

Properties:

PropertyTypeRequiredDescription
roadmapIdstringYes
namestringYes
quarterstringYes
orgIdstringYes
workspaceIdstringYes
userIdstringYes
descriptionstring | undefinedNo
status"In Progress" | "Backlog" | "Planned" | "Done" | undefinedNo
prioritystring | undefinedNo
colorstring | undefinedNo
projectIdsstring[] | undefinedNo
ordernumber | undefinedNo

UpdateInitiativeInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<InitiativeModel>Yes

MarketAnalysisFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
userIdstring | undefinedNo
businessPlanIdstring | undefinedNo
archivedboolean | undefinedNo

CreateMarketAnalysisInput

Properties:

PropertyTypeRequiredDescription
titlestringYes
descriptionstring | undefinedNo
orgIdstringYes
workspaceIdstringYes
userIdstringYes
businessPlanIdstringYes

UpdateMarketAnalysisInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<MarketAnalysisModel>Yes

MessageFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
conversationIdstringYes
role"user" | "assistant" | "system" | undefinedNo

CreateMessageInput

Properties:

PropertyTypeRequiredDescription
conversationIdstringYes
orgIdstringYes
workspaceIdstringYes
role"user" | "assistant" | "system"Yes
contentstringYes
toolCallsToolCall[] | undefinedNo
metadataimport("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/index").MessageMetadata | undefinedNo

UpdateMessageInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<MessageModel>Yes

MilestoneFilters

Properties:

PropertyTypeRequiredDescription
orgIdstring | undefinedNoOrganization ID (optional - omit for cross-org queries in "View All" mode)
workspaceIdstring | undefinedNoFilter by workspace ID
userIdstring | undefinedNoFilter by user ID
projectIdstring | undefinedNoFilter by project ID
goalIdstring | undefinedNoFilter by goal ID
completedboolean | undefinedNoFilter by completion state
archivedboolean | undefinedNoFilter by archived state (default: false)

CreateMilestoneInput

Properties:

PropertyTypeRequiredDescription
namestringYesMilestone name (kebab-case)
titlestringYesMilestone title
descriptionstringYesMilestone description
orgIdstringYesOrganization ID
userIdstringYesUser ID of milestone creator
workspaceIdstringYesWorkspace ID
projectIdstringYesParent project ID
goalIdstringYesParent goal ID
startAtstring | undefinedNoOptional planned start date (ISO 8601)
startedAtstring | undefinedNoOptional actual start date (ISO 8601)
dueAtstring | undefinedNoOptional due date (ISO 8601)
completedAtstring | undefinedNoOptional completion date (ISO 8601)
timeBudgetHoursnumber | undefinedNoOptional time budget in hours
categoryIdstring | undefinedNoOptional category ID
tagIdsstring[] | undefinedNoOptional tag IDs

UpdateMilestoneInput

Properties:

PropertyTypeRequiredDescription
idstringYesMilestone ID to update
updatesPartial<MilestoneModel>YesPartial milestone data to update

OpportunityFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
userIdstring | undefinedNo
clientIdstring | undefinedNo
completedboolean | undefinedNo
archivedboolean | undefinedNo

CreateOpportunityInput

Properties:

PropertyTypeRequiredDescription
titlestringYes
descriptionstringYes
orgIdstringYes
workspaceIdstringYes
userIdstringYes
clientIdstringYes

UpdateOpportunityInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<OpportunityModel>Yes

OrgFilters

Properties:

PropertyTypeRequiredDescription
userIdstring | undefinedNoFilter by user ID (owner)
archivedboolean | undefinedNoFilter by archived state (default: false)

CreateOrgInput

Properties:

PropertyTypeRequiredDescription
namestringYesOrganization name
descriptionstringYesOrganization description
userIdstringYesUser ID of organization creator/owner

UpdateOrgInput

Properties:

PropertyTypeRequiredDescription
idstringYesOrg ID to update
updatesPartial<OrgModel>YesPartial org data to update

ProcessExecutionFilters

Properties:

PropertyTypeRequiredDescription
orgIdstring | undefinedNoOrganization ID (optional - omit for cross-org queries in "View All" mode)
workspaceIdstring | undefinedNoFilter by workspace ID
userIdstring | undefinedNoFilter by user ID
processIdstring | undefinedNoFilter by process ID
statusProcessExecutionStatus | undefinedNoFilter by execution status
archivedboolean | undefinedNoFilter by archived state (default: false)
correlationIdstring | undefinedNoFilter by correlation ID
externalIdstring | undefinedNoFilter by external ID

CreateProcessExecutionInput

Properties:

PropertyTypeRequiredDescription
processIdstringYesProcess ID to execute
processVersionstringYesProcess version at time of execution
orgIdstringYesOrganization ID
userIdstringYesUser ID who owns this execution
workspaceIdstringYesWorkspace ID
inputsRecord<string, unknown>YesInput data for the process
contextExecutionContextYesExecution context
maxRetriesnumber | undefinedNoMaximum retries (defaults to 3)
correlationIdstring | undefinedNoCorrelation ID for tracking
externalIdstring | undefinedNoExternal ID
metadataProcessExecutionMetadata | undefinedNoMetadata

UpdateProcessExecutionInput

Properties:

PropertyTypeRequiredDescription
idstringYesExecution ID to update
updatesPartial<ProcessExecutionModel>YesPartial execution data to update

RecordStepExecutionInput

Properties:

PropertyTypeRequiredDescription
executionIdstringYesExecution ID
stepRecordStepExecutionRecordYesStep execution record

ProcessFilters

Properties:

PropertyTypeRequiredDescription
orgIdstring | undefinedNoOrganization ID (optional - omit for cross-org queries in "View All" mode)
workspaceIdstring | undefinedNoFilter by workspace ID
userIdstring | undefinedNoFilter by user ID
statusProcessStatus | undefinedNoFilter by status
categoryProcessCategory | undefinedNoFilter by category
archivedboolean | undefinedNoFilter by archived state (default: false)
documentIdstring | undefinedNoFilter by document ID
namestring | undefinedNoFilter by name (exact match)

CreateProcessInput

Properties:

PropertyTypeRequiredDescription
namestringYesProcess name (kebab-case)
titlestringYesProcess title
descriptionstringYesProcess description
orgIdstringYesOrganization ID
userIdstringYesUser ID of process creator
workspaceIdstringYesWorkspace ID
categoryProcessCategoryYesProcess category
versionstring | undefinedNoInitial version (defaults to '1.0.0')
statusProcessStatus | undefinedNoInitial status (defaults to 'draft')
inputSchemaProcessSchema | undefinedNoInput schema
outputSchemaProcessSchema | undefinedNoOutput schema
triggerProcessTrigger | undefinedNoTrigger configuration
statisticsProcessStatistics | undefinedNoStatistics configuration
tagIdsstring[] | undefinedNoTag IDs
documentIdstring | undefinedNoDocument ID
flowIdstring | undefinedNoFlow ID
metadataProcessMetadata | undefinedNoMetadata

UpdateProcessInput

Properties:

PropertyTypeRequiredDescription
idstringYesProcess ID to update
updatesPartial<ProcessModel>YesPartial process data to update

ProcessStepFilters

Properties:

PropertyTypeRequiredDescription
orgIdstring | undefinedNoOrganization ID (optional - omit for cross-org queries in "View All" mode)
workspaceIdstring | undefinedNoFilter by workspace ID
userIdstring | undefinedNoFilter by user ID
processIdstring | undefinedNoFilter by process ID
stepTypeProcessStepType | undefinedNoFilter by step type
enabledboolean | undefinedNoFilter by enabled state
archivedboolean | undefinedNoFilter by archived state (default: false)

CreateProcessStepInput

Properties:

PropertyTypeRequiredDescription
namestringYesStep name (kebab-case)
titlestringYesStep title
descriptionstringYesStep description
orgIdstringYesOrganization ID
userIdstringYesUser ID of step creator
workspaceIdstringYesWorkspace ID
processIdstringYesParent process ID
stepTypeProcessStepTypeYesStep type
ordernumberYesExecution order
actionStepAction | undefinedNoAction configuration
conditionsStepCondition[] | undefinedNoConditions for decision steps
nextStepIdstring | undefinedNoDefault next step ID
outputsStepOutput[] | undefinedNoOutput mappings
inputsRecord<string, unknown> | undefinedNoInput mappings
positionStepPosition | undefinedNoVisual position
style{ backgroundColor?: string; borderColor?: string; textColor?: string; width?: number; height?: number; } | undefinedNoCustom style
iconstring | undefinedNoIcon identifier
optionalboolean | undefinedNoWhether step is optional
estimatedDurationMinutesnumber | undefinedNoEstimated duration in minutes
metadataProcessStepMetadata | undefinedNoMetadata

UpdateProcessStepInput

Properties:

PropertyTypeRequiredDescription
idstringYesStep ID to update
updatesPartial<ProcessStepModel>YesPartial step data to update

ProductFilters

Properties:

PropertyTypeRequiredDescription
orgIdstring | undefinedNoOrganization scope
workspaceIdstring | undefinedNoWorkspace scope
userIdstring | undefinedNoOwner user
typeProductType | undefinedNoProduct type filter
phasesProductPhase[] | undefinedNoLifecycle phases to include
archivedboolean | undefinedNoInclude archived products when true

CreateProductInput

Properties:

PropertyTypeRequiredDescription
namestringYes
typeProductTypeYes
orgIdstringYes
userIdstringYes
workspaceIdstringYes
slugstring | undefinedNo
descriptionstring | undefinedNo
iconstring | undefinedNo
colorstring | undefinedNo
problemStatementstring | undefinedNo
valuePropositionstring | undefinedNo
targetMarketstring[] | undefinedNo
customerPersonastring | undefinedNo
competitiveLandscapestring | undefinedNo
kpisunknown[] | undefinedNo
metadataRecord<string, unknown> | undefinedNo

UpdateProductInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<ProductModel>Yes

ProjectFilters

Properties:

PropertyTypeRequiredDescription
orgIdstring | undefinedNoOrganization ID (optional - omit for cross-org queries in "View All" mode)
userIdstring | undefinedNoFilter by user ID
goalIdstring | undefinedNoFilter by goal ID
workspaceIdstring | undefinedNoFilter by workspace ID
codebaseIdstring | undefinedNoFilter by codebase ID
categoryIdstring | undefinedNoFilter by category ID
completedboolean | undefinedNoFilter by completion state
archivedboolean | undefinedNoFilter by archived state (default: false)

CreateProjectInput

Properties:

PropertyTypeRequiredDescription
namestringYesProject name (kebab-case)
titlestringYesProject title
descriptionstringYesProject description
orgIdstringYesOrganization ID
userIdstringYesUser ID of project creator
goalIdstringYesParent goal ID
workspaceIdstring | undefinedNoOptional workspace ID
codebaseIdstring | undefinedNoOptional codebase ID
categoryIdstring | undefinedNoOptional category ID
tagIdsstring[] | undefinedNoOptional tag IDs
startAtstring | undefinedNoOptional planned start date (ISO 8601)
startedAtstring | undefinedNoOptional actual start date (ISO 8601)
dueAtstring | undefinedNoOptional due date (ISO 8601)
completedAtstring | undefinedNoOptional completion date (ISO 8601)
timeBudgetHoursnumber | undefinedNoOptional time budget in hours
metadataanyNoOptional MCP and spec tracking metadata

UpdateProjectInput

Properties:

PropertyTypeRequiredDescription
idstringYesProject ID to update
updatesPartial<ProjectModel>YesPartial project data to update

RoadmapFilters

Properties:

PropertyTypeRequiredDescription
orgIdstring | undefinedNoOrganization ID (optional to allow cross-org queries when omitted)
workspaceIdstring | undefinedNoWorkspace scope
productIdstring | undefinedNoProduct the roadmap belongs to
userIdstring | undefinedNoOwner user ID

CreateRoadmapInput

Properties:

PropertyTypeRequiredDescription
productIdstringYes
orgIdstringYes
workspaceIdstringYes
userIdstringYes
startQuarterstring | undefinedNo
endQuarterstring | undefinedNo

UpdateRoadmapInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<RoadmapModel>Yes

SessionFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
codebaseIdstring | undefinedNo
workspaceIdstring | undefinedNo
userIdstring | undefinedNo
archivedboolean | undefinedNo

CreateSessionInput

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
userIdstringYes
codebaseIdstringYes
workspaceIdstringYes
projectIdstring | undefinedNo
contextSessionContextYes
expiresAtstring | undefinedNo

UpdateSessionInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<SessionModel>Yes

TaskFilters

Task query filters

Properties:

PropertyTypeRequiredDescription
orgIdstring | undefinedNoOrganization ID (required for multi-tenancy)
userIdstring | undefinedNoFilter by user ID
workspaceIdstring | undefinedNoFilter by workspace ID
projectIdstring | undefinedNoFilter by project ID
milestoneIdstring | undefinedNoFilter by milestone ID
parentTaskIdstring | undefinedNoFilter by parent task ID for subtasks
excludeSubtasksboolean | undefinedNoExclude subtasks (tasks with parentTaskId) - set to true to only show top-level tasks
status"In Progress" | "Complete" | "To Do" | "On Hold" | "Blocked" | undefinedNoFilter by task status
completedboolean | undefinedNoFilter by completion state
archivedboolean | undefinedNoFilter by archived state (default: false)

CreateTaskInput

Task creation input

Properties:

PropertyTypeRequiredDescription
titlestringYesTask title
descriptionstringYesTask description
orgIdstringYesOrganization ID
userIdstringYesUser ID who created the task
workspaceIdstringYesParent workspace ID (required - all tasks belong to a workspace)
projectIdstring | undefinedNoOptional parent project ID (tasks can exist at workspace level)
milestoneIdstring | undefinedNoOptional parent milestone ID (tasks can exist at project level)
parentTaskIdstring | undefinedNoOptional parent task ID for creating subtasks
status"In Progress" | "Complete" | "To Do" | "On Hold" | "Blocked" | undefinedNoOptional task status (default: 'To Do')
startAtstring | undefinedNoOptional scheduled start date
dueAtstring | undefinedNoOptional due date
type"habit" | "todo" | undefinedNoOptional task type (default: 'todo')
categoryIdstring | undefinedNoOptional category ID
tagIdsstring[] | undefinedNoOptional tag IDs
timeBudgetHoursnumber | undefinedNoOptional time budget in hours
startedAtstring | undefinedNoOptional start date
completedAtstring | undefinedNoOptional completion date
isRecurringboolean | undefinedNoOptional recurrence flag
recurrenceRulestring | undefinedNoOptional recurrence rule
parentRecurrenceIdstring | undefinedNoOptional parent recurrence ID
recurrenceInstanceDatestring | undefinedNoOptional recurrence instance date

UpdateTaskInput

Task update input

Properties:

PropertyTypeRequiredDescription
idstringYesTask ID to update
updatesPartial<TaskModel>YesPartial task data to update

TemplateFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
workspaceIdstring | undefinedNo
templateType"project" | "milestone" | "task" | "product" | "tech" | "structure" | "requirements" | "design" | "tasks" | undefinedNo
isDefaultboolean | undefinedNo
category"spec" | "steering" | undefinedNo

CreateTemplateInput

Properties:

PropertyTypeRequiredDescription
templateType"project" | "milestone" | "task" | "product" | "tech" | "structure" | "requirements" | "design" | "tasks"Yes
namestringYes
contentstringYes
versionstringYes
isDefaultbooleanYes
orgIdstringYes
workspaceIdstringYes
userIdstring | undefinedNo
metadata{ [key: string]: any; description?: string; language?: string; category?: "spec" | "steering" | import("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/index").TemplateCategory; } | undefinedNo

UpdateTemplateInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<TemplateModel>Yes

TimeEntryFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYesOrganization ID (required for multi-tenancy)
workspaceIdstring | undefinedNoWorkspace ID for multi-tenant filtering
userIdstring | undefinedNoFilter by user ID
taskIdstring | undefinedNoFilter by entity ID (stored in taskId field for backwards compatibility).
Can be any entity type: task, project, milestone, goal, etc.
Use getEntityTypeFromId() to determine the entity type from the ID prefix.
categoryIdstring | undefinedNoFilter by category ID
archivedboolean | undefinedNoFilter by archived state (default: false)

CreateTimeEntryInput

Properties:

PropertyTypeRequiredDescription
namestringYesTime entry name/label
startstringYesISO 8601 start timestamp
endstringYesISO 8601 end timestamp
orgIdstringYesOrganization ID
workspaceIdstringYesWorkspace ID for multi-tenant filtering
userIdstringYesUser ID who performed the work
taskIdstringYesEntity ID this time entry is associated with (stored as taskId for backwards compatibility).
Can be any entity type: task, project, milestone, goal, etc.
Use getEntityTypeFromId() to determine the entity type from the ID prefix.
categoryIdstring | undefinedNoOptional category ID
tagIdsstring[] | undefinedNoOptional tag IDs

UpdateTimeEntryInput

Properties:

PropertyTypeRequiredDescription
idstringYesTimeEntry ID to update
updatesPartial<TimeEntryModel>YesPartial time entry data to update

UserFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
emailstring | undefinedNo
onboardedboolean | undefinedNo
archivedboolean | undefinedNo

CreateUserInput

Properties:

PropertyTypeRequiredDescription
namestringYes
emailstringYes
orgIdstringYes
onboardedboolean | undefinedNo
authUserIdstring | undefinedNo

UpdateUserInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<UserModel>Yes

VariablesFilters

Properties:

PropertyTypeRequiredDescription
orgIdstringYes
codebaseIdstring | undefinedNo
contextstring | undefinedNo
archivedboolean | undefinedNo

CreateVariablesInput

Properties:

PropertyTypeRequiredDescription
codebaseIdstringYes
orgIdstringYes
contextstringYes
variablesRecord<string, string>Yes
metadata{ [key: string]: any; label?: string; description?: string; source?: string; importedAt?: string; lastModifiedBy?: string; } | undefinedNo

UpdateVariablesInput

Properties:

PropertyTypeRequiredDescription
idstringYes
updatesPartial<VariablesModel>Yes

WorkspaceFilters

Properties:

PropertyTypeRequiredDescription
orgIdstring | undefinedNoOrganization ID (optional - omit for cross-org queries in "View All" mode)
userIdstring | undefinedNoFilter by user ID
status"active" | "archived" | "paused" | undefinedNoFilter by workspace status
archivedboolean | undefinedNoFilter by archived state (default: false)

CreateWorkspaceInput

Properties:

PropertyTypeRequiredDescription
namestringYesWorkspace name (kebab-case)
titlestringYesWorkspace title
descriptionstringYesWorkspace description
orgIdstringYesOrganization ID
userIdstringYesUser ID of workspace creator
status"active" | "archived" | "paused" | undefinedNoOptional workspace status (default: 'active')
tagsstring[] | undefinedNoOptional tags

UpdateWorkspaceInput

Properties:

PropertyTypeRequiredDescription
idstringYesWorkspace ID to update
updatesPartial<WorkspaceModel>YesPartial workspace data to update

MutationState

Mutation state tracking

Properties:

PropertyTypeRequiredDescription
dataT | nullYesResult data from successful mutation
isLoadingbooleanYesTrue while mutation is executing
errorError | nullYesError object if mutation failed, null otherwise

MutationOptions

Mutation operator configuration

Properties:

PropertyTypeRequiredDescription
mutationFn(collection: RxCollection, variables: TVariables) => Promise<TData>YesFunction that performs the mutation on the collection
onSuccess((data: TData, variables: TVariables) => void | Promise<void>) | undefinedNoOptional callback invoked on successful mutation
onError((error: Error, variables: TVariables) => void | Promise<void>) | undefinedNoOptional callback invoked on mutation error

QueryOptions

Options for configuring a query operation

Properties:

PropertyTypeRequiredDescription
selectorimport("/Users/sthornock/code/epic/epic-flowstate/node_modules/rxdb/dist/types/index").MangoQuerySelector<T> | undefinedYesMangoQuery selector for filtering documents
sortimport("/Users/sthornock/code/epic/epic-flowstate/node_modules/rxdb/dist/types/index").MangoQuerySortPart<T>[] | undefinedNoSort order for results
limitnumber | undefinedNoMaximum number of documents to return
skipnumber | undefinedNoNumber of documents to skip (for pagination)

Examples:

const options: QueryOptions<TaskModel> = {
  selector: { orgId: { $eq: 'org_123' } },
  sort: [{ createdAt: 'desc' }],
  limit: 50,
  skip: 0
};

QueryResult

Result returned by a query operation

Properties:

PropertyTypeRequiredDescription
dataT[]YesArray of documents matching the query
Documents are automatically converted to JSON (not RxDB documents)
isLoadingbooleanYesWhether the query is currently loading
errorError | nullYesError object if the query failed, null otherwise

Examples:

const result: QueryResult<TaskModel> = {
  data: [{ id: 'task_1', title: 'My Task', ... }],
  isLoading: false,
  error: null
};

MutationState

State of a mutation operation

Properties:

PropertyTypeRequiredDescription
dataT | nullYesData returned by the mutation
Null if mutation hasn't completed or failed
isLoadingbooleanYesWhether the mutation is currently executing
errorError | nullYesError object if the mutation failed, null otherwise

Examples:

const state: MutationState<TaskModel> = {
  data: { id: 'task_1', title: 'My Task', ... },
  isLoading: false,
  error: null
};

MutationOptions

Options for configuring a mutation operation

Properties:

PropertyTypeRequiredDescription
mutationFn(collection: RxCollection, variables: TVariables) => Promise<TData>YesFunction that performs the mutation operation
onSuccess((data: TData, variables: TVariables) => void | Promise<void>) | undefinedNoCallback invoked when the mutation succeeds
onError((error: Error, variables: TVariables) => void | Promise<void>) | undefinedNoCallback invoked when the mutation fails

Examples:

const options: MutationOptions<TaskModel, CreateTaskInput> = {
  mutationFn: async (collection, input) => {
    const task = { ...input, id: createId('task') };
    await collection.insert(task);
    return task;
  },
  onSuccess: (data, variables) => {
    console.log('Task created:', data.id);
  },
  onError: (error, variables) => {
    console.error('Failed to create task:', error);
  }
};

BaseFilters

Query-Related Types

Provides TypeScript interfaces for building optimized RxDB queries with proper composite index utilization and hierarchy-aware filtering.

Properties:

PropertyTypeRequiredDescription
orgIdstringYesOrganization ID for multi-tenant isolation (required)
userIdstring | undefinedNoUser ID filter (optional - for user-scoped queries)
trashedboolean | undefinedNoSoft delete filter (defaults to false to exclude trashed items)

HierarchyFilters

Hierarchy filters for navigating the organizational structure

Hierarchy: Workspace > Project > Milestone > Task

When querying, use the most specific filter available to leverage the appropriate composite index:

  • milestoneId uses [milestoneId, createdAt] index
  • projectId uses [projectId, createdAt] index
  • workspaceId uses [workspaceId, createdAt] index (if available)
  • fallback to [orgId, createdAt] index

Properties:

PropertyTypeRequiredDescription
workspaceIdstring | undefinedNoWorkspace ID filter (highest hierarchy level)
projectIdstring | undefinedNoProject ID filter (second hierarchy level)
milestoneIdstring | undefinedNoMilestone ID filter (third hierarchy level)

StatusFilters

Status-based filters for workflow state

Common across Tasks, Projects, Milestones, and other workflow entities.

Properties:

PropertyTypeRequiredDescription
statusstring | string[] | undefinedNoTask/item status filter
completedboolean | undefinedNoCompletion flag filter
archivedboolean | undefinedNoArchive/soft-delete flag filter

TimeFilters

Time-based filters for date range queries

All timestamps should be ISO 8601 strings for consistency with RxDB.

Properties:

PropertyTypeRequiredDescription
createdAfterstring | undefinedNoFilter for items created after this timestamp
createdBeforestring | undefinedNoFilter for items created before this timestamp
updatedAfterstring | undefinedNoFilter for items updated after this timestamp
updatedBeforestring | undefinedNoFilter for items updated before this timestamp
dueAfterstring | undefinedNoFilter for items due after this timestamp
dueBeforestring | undefinedNoFilter for items due before this timestamp

SortOptions

Sort options for query results

Supports single field sorting with direction. For multi-field sorting, use MangoQuery sort directly.

Properties:

PropertyTypeRequiredDescription
fieldstringYesField to sort by
direction"asc" | "desc"YesSort direction

PaginationOptions

Pagination options for query results

Use for implementing infinite scroll or page-based navigation.

Properties:

PropertyTypeRequiredDescription
limitnumber | undefinedNoMaximum number of results to return
skipnumber | undefinedNoNumber of results to skip (for pagination)

QueryBuilderOptions

Complete query builder options

Combines all filter types with sorting and pagination options to construct optimized RxDB MangoQuery objects.

Properties:

PropertyTypeRequiredDescription
baseBaseFiltersYesBase filters (orgId, userId, trashed)
hierarchyHierarchyFilters | undefinedNoHierarchy filters (workspaceId, projectId, milestoneId)
statusStatusFilters | undefinedNoStatus filters (status, completed, archived)
timeTimeFilters | undefinedNoTime-based filters (createdAfter, dueAt, etc.)
customRecord<string, any> | undefinedNoCustom field filters (key-value pairs)
sortSortOptions | SortOptions[] | undefinedNoSort configuration
paginationPaginationOptions | undefinedNoPagination configuration

IndexSelection

Index selection result

Indicates which composite index should be used for optimal query performance.

Properties:

PropertyTypeRequiredDescription
indexFieldstringYesThe field that will be used as the index prefix
level"project" | "milestone" | "workspace" | "org"YesThe hierarchy level being queried
confidencenumberYesConfidence that this is the optimal index (0-1)

QueryOptimizationHint

Query optimization hints

Provides guidance on how to improve query performance based on available indexes and filter combinations.

Properties:

PropertyTypeRequiredDescription
isOptimalbooleanYesWhether the query is using an optimal index
indexUsedstringYesThe index being used
suggestionsstring[] | undefinedNoSuggestions for improving query performance
performanceImpact"low" | "medium" | "high" | undefinedNoEstimated performance impact (low, medium, high)

UseApprovalsOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseApprovalsResult

Properties:

PropertyTypeRequiredDescription
approvalsApprovalModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseApprovalResult

Properties:

PropertyTypeRequiredDescription
approvalApprovalModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseAttributesOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseAttributesResult

Properties:

PropertyTypeRequiredDescription
attributesAttributeModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseAttributeResult

Properties:

PropertyTypeRequiredDescription
attributeAttributeModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseBusinessPlansOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseBusinessPlansResult

Properties:

PropertyTypeRequiredDescription
businessPlansBusinessPlanModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseBusinessPlanResult

Properties:

PropertyTypeRequiredDescription
businessPlanBusinessPlanModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseClientsOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseClientsResult

Properties:

PropertyTypeRequiredDescription
clientsClientModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseClientResult

Properties:

PropertyTypeRequiredDescription
clientClientModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseCodebasesOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseCodebasesResult

Properties:

PropertyTypeRequiredDescription
codebasesCodebaseModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseCodebaseResult

Properties:

PropertyTypeRequiredDescription
codebaseCodebaseModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseCompetitorsOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseCompetitorsResult

Properties:

PropertyTypeRequiredDescription
competitorsCompetitorModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseCompetitorResult

Properties:

PropertyTypeRequiredDescription
competitorCompetitorModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseContactsOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseContactsResult

Properties:

PropertyTypeRequiredDescription
contactsContactModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseContactResult

Properties:

PropertyTypeRequiredDescription
contactContactModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseConversationsOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseConversationsResult

Properties:

PropertyTypeRequiredDescription
conversationsConversationModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseConversationResult

Properties:

PropertyTypeRequiredDescription
conversationConversationModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseDiscussionsOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseDiscussionsResult

Properties:

PropertyTypeRequiredDescription
discussionsDiscussionModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseDiscussionResult

Properties:

PropertyTypeRequiredDescription
discussionDiscussionModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseDocumentsOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseDocumentsResult

Properties:

PropertyTypeRequiredDescription
documentsDocumentModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseDocumentResult

Properties:

PropertyTypeRequiredDescription
documentDocumentModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseFinAccountsOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseFinAccountsResult

Properties:

PropertyTypeRequiredDescription
accountsFinAccountModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseFinAccountResult

Properties:

PropertyTypeRequiredDescription
accountFinAccountModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseFinBudgetsOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseFinBudgetsResult

Properties:

PropertyTypeRequiredDescription
budgetsBudgetModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseFinBudgetResult

Properties:

PropertyTypeRequiredDescription
budgetBudgetModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseFinCategoriesOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseFinCategoriesResult

Properties:

PropertyTypeRequiredDescription
categoriesFinCategoryModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseFinCategoryResult

Properties:

PropertyTypeRequiredDescription
categoryFinCategoryModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseFinIncomeStatementsOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseFinIncomeStatementsResult

Properties:

PropertyTypeRequiredDescription
incomeStatementsFinIncomeStatementModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseFinIncomeStatementResult

Properties:

PropertyTypeRequiredDescription
incomeStatementFinIncomeStatementModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseFinScheduledTransactionsOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseFinScheduledTransactionsResult

Properties:

PropertyTypeRequiredDescription
scheduledTransactionsFinScheduledTransactionModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseFinScheduledTransactionResult

Properties:

PropertyTypeRequiredDescription
transactionFinScheduledTransactionModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseFinTransactionsOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseFinTransactionsResult

Properties:

PropertyTypeRequiredDescription
transactionsFinTransactionModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseFinTransactionResult

Properties:

PropertyTypeRequiredDescription
transactionFinTransactionModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseFlowsOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseFlowsResult

Properties:

PropertyTypeRequiredDescription
flowsFlowModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseFlowResult

Properties:

PropertyTypeRequiredDescription
flowFlowModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseGoalsOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseGoalsResult

Properties:

PropertyTypeRequiredDescription
goalsGoalModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseGoalResult

Properties:

PropertyTypeRequiredDescription
goalGoalModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseInitiativesOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseInitiativesResult

Properties:

PropertyTypeRequiredDescription
initiativesInitiativeModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseMarketAnalysesOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseMarketAnalysesResult

Properties:

PropertyTypeRequiredDescription
marketAnalysesMarketAnalysisModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseMarketAnalysisResult

Properties:

PropertyTypeRequiredDescription
marketAnalysisMarketAnalysisModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseMessagesOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseMessagesResult

Properties:

PropertyTypeRequiredDescription
messagesMessageModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseMessageResult

Properties:

PropertyTypeRequiredDescription
messageMessageModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseMilestonesOptions

Query options for useMilestones hook

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNoSort field name (default: 'createdAt')
limitnumber | undefinedNoMaximum number of milestones to return
skipnumber | undefinedNoNumber of milestones to skip

UseMilestonesResult

Return type for useMilestones hook

Properties:

PropertyTypeRequiredDescription
milestonesMilestoneModel[]YesArray of milestone documents
isLoadingbooleanYesTrue while loading initial data
errorError | nullYesError object if query failed

UseMilestoneResult

Properties:

PropertyTypeRequiredDescription
milestoneMilestoneModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseMutationResult

Return type for useMutation hook

Properties:

PropertyTypeRequiredDescription
mutate(variables: TVariables) => voidYesExecute mutation with variables
mutateAsync(variables: TVariables) => Promise<TData>YesExecute mutation with variables and return Promise
isLoadingbooleanYesTrue while mutation is executing
errorError | nullYesError object if mutation failed
dataTData | nullYesResult data from successful mutation
reset() => voidYesReset mutation state to initial values

UseOpportunitiesOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseOpportunitiesResult

Properties:

PropertyTypeRequiredDescription
opportunitiesOpportunityModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseOpportunityResult

Properties:

PropertyTypeRequiredDescription
opportunityOpportunityModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseOrgsOptions

Query options for useOrgs hook

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNoSort field name (default: 'createdAt')
limitnumber | undefinedNoMaximum number of orgs to return
skipnumber | undefinedNoNumber of orgs to skip

UseOrgsResult

Return type for useOrgs hook

Properties:

PropertyTypeRequiredDescription
orgsOrgModel[]YesArray of org documents
isLoadingbooleanYesTrue while loading initial data
errorError | nullYesError object if query failed

UseOrgResult

Properties:

PropertyTypeRequiredDescription
orgOrgModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseProductsOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNoSort field (default: createdAt)
limitnumber | undefinedNoMax items
skipnumber | undefinedNoSkip count

UseProductsResult

Properties:

PropertyTypeRequiredDescription
productsProductModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseProjectsOptions

Query options for useProjects hook

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNoSort field name (default: 'createdAt')
limitnumber | undefinedNoMaximum number of projects to return
skipnumber | undefinedNoNumber of projects to skip

UseProjectsResult

Return type for useProjects hook

Properties:

PropertyTypeRequiredDescription
projectsProjectModel[]YesArray of project documents
isLoadingbooleanYesTrue while loading initial data
errorError | nullYesError object if query failed

UseProjectResult

Properties:

PropertyTypeRequiredDescription
projectProjectModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseRoadmapsOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseRoadmapsResult

Properties:

PropertyTypeRequiredDescription
roadmapsRoadmapModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseRoadmapResult

Properties:

PropertyTypeRequiredDescription
roadmapRoadmapModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseSessionsOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseSessionsResult

Properties:

PropertyTypeRequiredDescription
sessionsSessionModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseSessionResult

Properties:

PropertyTypeRequiredDescription
sessionSessionModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseTasksOptions

Query options for useTasks hook

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNoSort field name (default: 'createdAt')
limitnumber | undefinedNoMaximum number of tasks to return
skipnumber | undefinedNoNumber of tasks to skip

UseTasksResult

Return type for useTasks hook

Properties:

PropertyTypeRequiredDescription
tasksTaskModel[]YesArray of task documents
isLoadingbooleanYesTrue while loading initial data
errorError | nullYesError object if query failed

UseTaskResult

Properties:

PropertyTypeRequiredDescription
taskTaskModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseTemplatesOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseTemplatesResult

Properties:

PropertyTypeRequiredDescription
templatesTemplateModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseTemplateResult

Properties:

PropertyTypeRequiredDescription
templateTemplateModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseTimeEntriesOptions

Query options for useTimeEntries hook

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNoSort field name (default: 'start')
limitnumber | undefinedNoMaximum number of time entries to return
skipnumber | undefinedNoNumber of time entries to skip

UseTimeEntriesResult

Return type for useTimeEntries hook

Properties:

PropertyTypeRequiredDescription
timeEntriesTimeEntryModel[]YesArray of time entry documents
isLoadingbooleanYesTrue while loading initial data
errorError | nullYesError object if query failed

UseTimeEntryResult

Properties:

PropertyTypeRequiredDescription
entryTimeEntryModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseUsersOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseUsersResult

Properties:

PropertyTypeRequiredDescription
usersUserModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseUserResult

Properties:

PropertyTypeRequiredDescription
userUserModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseVariablesOptions

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNo
limitnumber | undefinedNo
skipnumber | undefinedNo

UseVariablesResult

Properties:

PropertyTypeRequiredDescription
variablesVariablesModel[]Yes
isLoadingbooleanYes
errorError | nullYes

UseVariableResult

Properties:

PropertyTypeRequiredDescription
variableVariablesModel | nullYes
isLoadingbooleanYes
errorError | nullYes

UseWorkspacesOptions

Query options for useWorkspaces hook

Properties:

PropertyTypeRequiredDescription
sortstring | undefinedNoSort field name (default: 'createdAt')
limitnumber | undefinedNoMaximum number of workspaces to return
skipnumber | undefinedNoNumber of workspaces to skip

UseWorkspacesResult

Return type for useWorkspaces hook

Properties:

PropertyTypeRequiredDescription
workspacesWorkspaceModel[]YesArray of workspace documents
isLoadingbooleanYesTrue while loading initial data
errorError | nullYesError object if query failed

UseWorkspaceResult

Return type for useWorkspace hook

Properties:

PropertyTypeRequiredDescription
workspaceWorkspaceModel | nullYes
isLoadingbooleanYes
errorError | nullYes
Previous
API Reference
Next
Types