Collections
Interfaces
Interfaces
SubtransactionSummary
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
transaction_id | string | Yes | |
amount | number | Yes | |
memo | string | null | undefined | No | |
payee_id | string | null | undefined | No | |
payee_name | string | null | undefined | No | |
category_id | string | null | undefined | No | |
category_name | string | null | undefined | No | |
transfer_account_id | string | null | undefined | No | |
transfer_transaction_id | string | null | undefined | No | |
deleted | boolean | Yes |
YnabDebtTransactionType
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
original_balance | number | null | Yes | |
interest_rates | Record<string, number> | Yes | |
minimum_payments | Record<string, number> | Yes | |
escrow_amounts | Record<string, number> | Yes |
BaseDocument
Shared base types and interfaces for all RxDB collections Provides consistent patterns across the db-collections package
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier for the document |
orgId | string | Yes | ID of the organization this document belongs to |
userId | string | Yes | ID of the user who created this document |
createdAt | string | Yes | UTC timestamp when the document was created |
updatedAt | string | Yes | UTC 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:
| Property | Type | Required | Description |
|---|---|---|---|
isDeleted | boolean | Yes | Whether this document is soft deleted |
deletedAt | string | undefined | No | UTC timestamp when the document was soft deleted |
EditTracking
Edit tracking pattern - use for collections that need edit history
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
isEdited | boolean | Yes | Whether this document has been edited after creation |
editedAt | string | undefined | No | UTC timestamp when the document was last edited |
Threadable
Threading pattern - use for collections that support nested comments/replies
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
parentId | string | undefined | No | ID of the parent document for nested replies |
threadDepth | number | Yes | Depth level in the thread tree (0 for root) |
PolymorphicEntity
Polymorphic relationship pattern - use for collections that reference multiple entity types
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
entityType | string | Yes | Type of the entity this references |
entityId | string | Yes | ID 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:
| Property | Type | Required | Description |
|---|---|---|---|
turnNumber | number | Yes | Turn number in conversation (1-indexed) |
role | "user" | "assistant" | "system" | Yes | Role: user, assistant, or system |
content | string | Yes | Message content |
timestamp | string | Yes | ISO timestamp |
metadata | TurnMetadata | undefined | No | Optional metadata about this turn |
TurnMetadata
Metadata for a conversation turn
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
toolsUsed | string[] | undefined | No | Tools used during this turn (summary) |
filesModified | string[] | undefined | No | Files modified during this turn |
commandsExecuted | string[] | undefined | No | Commands executed (summary) |
tokens | { input: number; output: number; } | undefined | No | Token usage for this turn |
costUsd | number | undefined | No | Cost for this turn (USD) |
blockedForInput | boolean | undefined | No | Whether this turn blocked waiting for input |
agentId | string | undefined | No | Agent ID that processed this turn |
sessionId | string | undefined | No | Claude session ID for conversation resumption |
ConversationState
Conversation state with compression support
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
turns | ConversationTurn[] | Yes | All conversation turns (recent, uncompressed) |
compressedHistory | CompressedHistory | undefined | No | Compressed summary of older turns (if compression applied) |
totalTurns | number | Yes | Total number of turns (including compressed) |
config | ConversationConfig | undefined | No | Configuration used for this conversation |
CompressedHistory
Compressed history segment
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
turnRange | { start: number; end: number; } | Yes | Turn numbers that were compressed (e.g., 1-10) |
summary | string | Yes | Summary of compressed turns |
compressedAt | string | Yes | When compression was performed |
keyPoints | string[] | undefined | No | Key facts/decisions from compressed turns |
tokensSaved | number | undefined | No | Estimated tokens saved by compression |
ConversationConfig
Configuration for conversation management
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
recentTurnsToKeep | number | Yes | Number of recent turns to keep verbatim |
compressionThreshold | number | Yes | Trigger compression when total turns exceeds this |
includeToolDetails | boolean | Yes | Whether to include tool details in summaries |
compressionEnabled | boolean | Yes | Whether compression is enabled |
DiscussionMention
Mention extracted from discussion content Represents an
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
type | "user" | "agent" | "team" | Yes | Type of entity mentioned |
identifier | string | Yes | The |
teamMemberId | string | undefined | No | Resolved TeamMember ID if applicable |
userId | string | undefined | No | Resolved User ID for human users |
position | number | Yes | Character position in content where mention starts |
DiscussionModel
Main discussion model interface Follows existing collection patterns with UTC date strings
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
createdAt | string | Yes | |
updatedAt | string | Yes | |
entityType | string | Yes | |
entityId | string | Yes | |
content | string | Yes | |
contentHtml | string | undefined | No | |
parentId | string | undefined | No | |
threadDepth | number | Yes | |
isEdited | boolean | Yes | |
editedAt | string | undefined | No | |
isDeleted | boolean | Yes | |
deletedAt | string | undefined | No | |
attachments | AttachmentModel[] | undefined | No | |
userName | string | Yes | |
userAvatar | string | undefined | No | |
mentions | DiscussionMention[] | undefined | No | Parsed |
metadata | Record<string, any> | undefined | No | |
extended | Record<string, any> | undefined | No | Extensible object for future schema additions |
AttachmentModel
File attachment model interface Stores metadata for files attached to discussions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | Yes | |
size | number | Yes | |
type | string | Yes | |
url | string | Yes | |
uploadedAt | string | Yes | |
status | AttachmentStatus | Yes | |
thumbnailUrl | string | undefined | No | |
checksum | string | undefined | No |
ActivityChanges
Represents a change to a specific field.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
field | string | Yes | Field that was changed |
oldValue | unknown | Yes | Previous value |
newValue | unknown | Yes | New value |
ActivityModel
Activity Model
Records activities and changes for audit trail and activity feeds.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier (format: acti_XXXXXXXXXX) |
entityType | ActivityEntityType | Yes | Type of entity this activity relates to |
entityId | string | Yes | ID of the entity this activity relates to |
entityName | string | Yes | Human-readable name of the entity |
action | ActivityAction | Yes | Action that was performed |
changes | ActivityChanges | undefined | No | Optional changes detail |
userId | string | Yes | User ID who performed the action |
userName | string | Yes | User name for display |
productId | string | undefined | No | Product ID if activity is related to a product |
orgId | string | Yes | Organization ID for multi-tenant isolation |
workspaceId | string | Yes | Workspace ID for workspace-level isolation |
createdAt | string | Yes | ISO 8601 timestamp when activity occurred |
extended | Record<string, unknown> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique approval identifier |
projectId | string | Yes | Project ID this approval belongs to |
milestoneId | string | undefined | No | Optional milestone ID for phase-specific approvals |
taskId | string | undefined | No | Optional task ID for task-specific approvals |
documentId | string | undefined | No | Optional document ID for document-specific approvals |
title | string | Yes | Human-readable title describing what needs approval |
type | "action" | "document" | Yes | Type of approval: 'document' for file approvals, 'action' for operation approvals |
category | "spec" | "steering" | Yes | Category: 'spec' for specifications, 'steering' for steering documents |
categoryName | string | Yes | Name of the spec or steering document (kebab-case) |
status | "pending" | "approved" | "rejected" | "needs-revision" | Yes | Current approval status tracking workflow progression |
documentType | string | undefined | No | Optional document type (e.g., 'requirements.md', 'design.md', 'tasks.md') |
documentContent | string | undefined | No | Optional snapshot of document content at time of approval request |
response | string | undefined | No | Approver's response message (populated when status changes from pending) |
annotations | string | undefined | No | JSON string of annotations/highlights from approver |
comments | { [key: string]: any; text?: string; selection?: string; position?: { line: number; column: number; }; }[] | undefined | No | Array of inline comments from approver with selection context |
createdAt | string | Yes | ISO 8601 timestamp when approval was created |
updatedAt | string | Yes | ISO 8601 timestamp when approval was last updated |
respondedAt | string | undefined | No | ISO 8601 timestamp when approval was responded to |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | Workspace ID for workspace-level isolation |
userId | string | Yes | User ID who requested the approval |
approverId | string | undefined | No | User ID who approved/rejected (populated when status changes) |
extended | Record<string, any> | undefined | No | Extensible object for future schema additions |
AttributeModel
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | Yes | |
title | string | Yes | |
description | string | undefined | No | |
color | string | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | undefined | No | |
entityType | string | Yes | |
type | string | Yes | |
sortOrder | number | undefined | No | |
popularity | number | undefined | No | |
metadata | Record<string, any> | undefined | No | |
createdAt | string | Yes | |
updatedAt | string | Yes | |
archived | boolean | Yes | |
extended | Record<string, any> | undefined | No | Extensible object for future schema additions |
BusinessPlanModel
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
title | string | Yes | |
description | string | Yes | |
status | "draft" | "active" | "archived" | Yes | |
planType | "startup" | "growth" | "pivot" | "annual" | Yes | |
missionStatement | string | Yes | |
visionStatement | string | Yes | |
targetMarket | string | Yes | |
problemStatement | string | Yes | |
solutionSummary | string | Yes | |
revenueModel | string | Yes | |
competitiveAdvantage | string | Yes | |
timeframeMonths | number | Yes | |
startDate | string | Yes | |
endDate | string | Yes | |
version | number | Yes | |
extended | Record<string, any> | undefined | No | |
createdAt | string | Yes | |
updatedAt | string | Yes | |
archived | boolean | Yes |
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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique client identifier |
name | string | Yes | Client contact name |
company | string | Yes | Company or organization name |
email | string | Yes | Primary email address for client communication |
phone | string | Yes | Primary phone number for client contact |
address | string | Yes | Physical or mailing address |
primaryContactId | string | undefined | No | Optional reference to primary contact person (userId) |
createdAt | string | Yes | ISO 8601 timestamp when client was created |
updatedAt | string | Yes | ISO 8601 timestamp when client was last updated |
archived | boolean | Yes | Soft delete flag - true if client has been archived |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | Workspace ID for workspace-level data isolation |
userId | string | Yes | User ID of client record creator |
extended | Record<string, any> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique codebase identifier (format: codebase_<name>_<workspaceId>) |
workspaceId | string | Yes | Parent workspace ID |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
userId | string | Yes | User ID of codebase creator |
name | string | Yes | Codebase name (kebab-case, unique within workspace) |
title | string | Yes | Human-readable codebase title for display |
description | string | Yes | Codebase purpose and description |
repository | { url: string; defaultBranch: string; provider: "github" | "gitlab" | "bitbucket" | "other"; organization?: string; repositoryName?: string; privateRepo: boolean; accessToken?: string; sshKey?: string; } | Yes | Git repository configuration |
environment | { nodeVersion?: string; packageManager: "npm" | "yarn" | "pnpm" | "bun"; workingDirectory?: string; setupCommands: string[]; testCommands?: string[]; buildCommands?: string[]; environmentVariables?: Record<string, string>; } | Yes | Development 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; }; } | undefined | No | Deployment 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[]; } | undefined | No | Agent workflow configuration for automated task execution |
tags | string[] | undefined | No | Tags for organization and filtering |
status | "active" | "archived" | "paused" | Yes | Codebase status |
createdAt | string | Yes | ISO 8601 timestamp when codebase was created |
updatedAt | string | Yes | ISO 8601 timestamp when codebase was last updated |
archivedAt | string | undefined | No | ISO 8601 timestamp when codebase was archived |
archived | boolean | Yes | Flag for soft delete |
extended | Record<string, any> | undefined | No | Extensible object for future schema additions |
metadata | { [key: string]: any; monorepo: boolean; languages?: string[]; frameworks?: string[]; testFramework?: string; codeStyle?: string; docsUrl?: string; } | undefined | No | Optional extensible metadata |
CompetitorModel
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
businessPlanId | string | Yes | |
name | string | Yes | |
website | string | Yes | |
description | string | Yes | |
strengths | string[] | undefined | No | |
weaknesses | string[] | undefined | No | |
pricing | string | Yes | |
marketShare | string | Yes | |
differentiators | string[] | undefined | No | |
threatLevel | "low" | "medium" | "high" | Yes | |
extended | Record<string, any> | undefined | No | |
createdAt | string | Yes | |
updatedAt | string | Yes | |
archived | boolean | Yes |
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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique contact identifier |
name | string | Yes | Full contact name (typically firstName + lastName) |
firstName | string | Yes | Contact's first name |
lastName | string | Yes | Contact's last name |
email | string | Yes | Contact's email address |
phone | string | Yes | Contact's phone number |
company | string | Yes | Company or organization the contact works for |
title | string | Yes | Contact's job title or position |
address | string | Yes | Physical or mailing address |
archived | boolean | Yes | Soft delete flag - true if contact has been archived |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | Workspace ID for workspace-level data isolation |
userId | string | Yes | User ID of contact record creator |
createdAt | string | Yes | ISO 8601 timestamp when contact was created |
updatedAt | string | Yes | ISO 8601 timestamp when contact was last updated |
extended | Record<string, any> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier for the conversation |
title | string | Yes | Display title for the conversation |
createdAt | string | Yes | UTC timestamp when the conversation was created |
updatedAt | string | Yes | UTC timestamp when the conversation was last updated |
userId | string | Yes | ID of the user who owns this conversation |
orgId | string | Yes | ID of the organization this conversation belongs to |
workspaceId | string | Yes | ID of the workspace this conversation belongs to |
provider | "anthropic" | "openai" | "lmstudio" | Yes | LLM provider identifier |
model | string | Yes | Model identifier (e.g., 'claude-3-5-sonnet-20241022') |
settings | ConversationSettings | Yes | Conversation settings for LLM interaction |
metadata | ConversationMetadata | Yes | Metadata tracking conversation statistics |
extended | Record<string, any> | undefined | No | Extensible object for future schema additions |
ConversationSettings
Settings that control the LLM behavior for this conversation
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
systemPrompt | string | undefined | No | Optional system prompt to set context |
temperature | number | Yes | Temperature parameter for response randomness (0.0 - 2.0) |
maxTokens | number | Yes | Maximum tokens to generate in responses |
ConversationMetadata
Metadata tracking conversation usage and activity
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
messageCount | number | Yes | Total number of messages in the conversation |
lastMessageAt | string | Yes | UTC 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:
| Property | Type | Required | Description |
|---|---|---|---|
s3Key | string | Yes | S3 object key for the document content |
s3Bucket | string | Yes | S3 bucket name where the document is stored |
contentHash | string | Yes | SHA-256 hash of the document content for change detection |
fileSize | number | Yes | Size of the document in bytes |
mimeType | string | Yes | MIME type of the document |
documentStoreId | string | undefined | No | Document-store service's internal document ID |
ragJobId | string | undefined | No | RAG 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique steering document identifier (format: steering_<type><orgId>[<workspaceId>][_<projectId>]) |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | undefined | No | Optional workspace ID for workspace-level scope |
projectId | string | undefined | No | Optional project ID for project-level scope (omit for org/workspace-level documents) |
milestoneId | string | undefined | No | Optional milestone ID for milestone-level scope |
taskId | string | undefined | No | Optional task ID for task-level scope |
codebaseId | string | undefined | No | Optional codebase ID for linking documents to a codebase (used by markdown sync) |
documentType | "product" | "steering" | "tech" | "structure" | "markdown" | "filetree" | "note" | Yes | Type of document determining its purpose and usage context |
title | string | Yes | Human-readable document title for display |
content | string | undefined | No | Markdown content of the document. |
| For storage-backed documents (with storage field), this may be empty | |||
| as actual content lives in S3. | |||
storage | DocumentStorageInfo | undefined | No | Storage 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). | |||
documentVersion | number | Yes | Numeric document revision number for tracking evolution (1, 2, 3...) |
approved | boolean | Yes | Flag indicating whether this document version is approved for use |
approvedAt | string | undefined | No | ISO 8601 timestamp when document was approved (only when approved=true) |
approvedBy | string | undefined | No | User ID who approved the document (only when approved=true) |
createdAt | string | Yes | ISO 8601 timestamp when document was created |
updatedAt | string | Yes | ISO 8601 timestamp when document was last updated |
userId | string | Yes | User ID of document creator |
metadata | { [key: string]: any; templateVersion?: string; scope?: "organization" | "workspace" | "project" | "milestone" | "task"; } | undefined | No | Optional extensible metadata for document customization |
extended | Record<string, any> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | Workspace ID for workspace-level data isolation |
userId | string | Yes | User ID who owns or manages this account |
createdAt | string | Yes | ISO 8601 timestamp when account was created |
updatedAt | string | Yes | ISO 8601 timestamp when account was last updated |
budget_id | string | Yes | Budget ID this account belongs to |
is_deleted | boolean | undefined | No | Soft delete flag - true if account has been deleted |
extended | Record<string, any> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique budget identifier |
createdAt | string | Yes | ISO 8601 timestamp when budget was created in our system |
updatedAt | string | Yes | ISO 8601 timestamp when budget was last updated in our system |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | Workspace ID for workspace-level data isolation |
userId | string | Yes | User ID who owns or manages this budget |
name | string | Yes | Budget name from YNAB |
last_modified_on | string | Yes | ISO 8601 timestamp of last modification in YNAB |
first_month | string | Yes | First month of budget data (YYYY-MM-DD format) |
last_month | string | Yes | Last month of budget data (YYYY-MM-DD format) |
trashed | boolean | Yes | Soft delete flag - true if budget has been trashed |
date_format | { format: string; } | Yes | Date format configuration for budget display |
currency_format | { iso_code: string; example_format: string; decimal_digits: number; decimal_separator: string; symbol_first: boolean; } | Yes | Currency format configuration for budget display |
accounts | { id: string; name: string; type: string; balance: number; }[] | Yes | Simplified account summaries for quick reference |
extended | Record<string, any> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | Workspace ID for workspace-level data isolation |
userId | string | Yes | User ID who owns or manages this category |
createdAt | string | Yes | ISO 8601 timestamp when category was created in our system |
updatedAt | string | Yes | ISO 8601 timestamp when category was last updated in our system |
is_deleted | boolean | undefined | No | Soft delete flag - true if category has been deleted |
isDefault | boolean | undefined | No | Whether this is a default category template |
extended | Record<string, any> | undefined | No | Extensible object for future schema additions |
LinkedStatementRef
Linked Statement Reference Represents a reference to another income statement from a different workspace
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
statementId | string | Yes | ID of the linked income statement |
workspaceId | string | Yes | Workspace ID where the linked statement resides |
displayName | string | Yes | Display name for the linked statement |
displayAs | "income" | "expense" | "asset" | "liability" | Yes | How to display in the quadrant (income, expense, asset, liability) |
StatementPeriod
Period configuration for income statement reporting
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
type | "monthly" | "annual" | "custom" | "quarterly" | Yes | Period type: monthly, quarterly, annual, or custom |
startDate | string | undefined | No | Start date for custom period (ISO 8601) |
endDate | string | undefined | No | End date for custom period (ISO 8601) |
offset | number | undefined | No | For 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier (format: fini_{nanoid}) |
name | string | Yes | Human-readable name for this income statement |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | Workspace ID for workspace-level data isolation |
userId | string | Yes | User ID who created this income statement |
description | string | undefined | No | Optional description |
budgetId | string | Yes | Budget ID this statement is linked to (from FinBudget) |
period | StatementPeriod | Yes | Period configuration for reporting |
linkedStatements | LinkedStatementRef[] | Yes | References to other income statements to include as line items |
incomeCategories | string[] | Yes | Category IDs to include in Income quadrant (from FinCategory) |
expenseCategories | string[] | Yes | Category IDs to include in Expenses quadrant |
assetAccounts | string[] | Yes | Account IDs to include in Assets quadrant (from FinAccount) |
liabilityAccounts | string[] | Yes | Account IDs to include in Liabilities quadrant |
isDefault | boolean | undefined | No | Whether this statement is the default for the workspace |
isArchived | boolean | undefined | No | Whether this statement is archived |
status | "draft" | "active" | "archived" | Yes | Wizard status: draft = incomplete, active = ready to use |
wizardStep | number | undefined | No | Current wizard step (1-6) for resuming setup |
wizardCompletedSteps | number[] | undefined | No | Array of completed wizard step numbers |
ynabBudgetId | string | undefined | No | YNAB budget ID if imported from YNAB |
createdAt | string | Yes | ISO 8601 timestamp when statement was created |
updatedAt | string | Yes | ISO 8601 timestamp when statement was last updated |
extended | Record<string, any> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | Workspace ID for workspace-level data isolation |
userId | string | Yes | User ID who owns or manages this scheduled transaction |
createdAt | string | Yes | ISO 8601 timestamp when scheduled transaction was created in our system |
updatedAt | string | Yes | ISO 8601 timestamp when scheduled transaction was last updated in our system |
is_deleted | boolean | undefined | No | Soft delete flag - true if scheduled transaction has been deleted |
account_name | string | Yes | Account name for display (denormalized from account) |
payee_name | string | null | undefined | No | Payee name for display (denormalized from payee, nullable) |
category_name | string | null | undefined | No | Category name for display (denormalized from category, nullable) |
subtransactions | SubtransactionSummary[] | Yes | Split transaction components for multi-category expenses |
extended | Record<string, any> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | Workspace ID for workspace-level data isolation |
userId | string | Yes | User ID who owns or manages this transaction |
createdAt | string | Yes | ISO 8601 timestamp when transaction was created in our system |
updatedAt | string | Yes | ISO 8601 timestamp when transaction was last updated in our system |
is_deleted | boolean | undefined | No | Soft delete flag - true if transaction has been deleted |
account_name | string | Yes | Account name for display (denormalized from account) |
payee_name | string | null | undefined | No | Payee name for display (denormalized from payee, nullable) |
category_name | string | null | undefined | No | Category name for display (denormalized from category, nullable) |
subtransactions | SubtransactionSummary[] | Yes | Split transaction components for multi-category expenses |
extended | Record<string, any> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique flow identifier |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | Workspace ID for workspace-level isolation |
userId | string | Yes | User ID of flow creator |
createdAt | string | Yes | ISO 8601 timestamp when flow was created |
updatedAt | string | Yes | ISO 8601 timestamp when flow was last updated |
name | string | Yes | Human-readable flow name for display |
description | string | Yes | Detailed description of flow purpose and contents |
flowType | "custom" | "database-schema" | "process-flow" | "agent-flow" | Yes | Type of flow determining its purpose and rendering context |
nodes | any[] | Yes | React Flow nodes (serialized JSON array of node objects) |
edges | any[] | Yes | React Flow edges (serialized JSON array of edge/connection objects) |
viewport | { x: number; y: number; zoom: number; } | Yes | Viewport state for preserving pan/zoom position |
metadata | { tags?: string[]; projectId?: string; version?: string; } | Yes | Optional metadata for categorization and association |
extended | Record<string, any> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique metric identifier |
name | string | Yes | Human-readable metric name |
type | GoalMetricType | Yes | Type of measurement for this metric |
targetValue | number | Yes | Target value to achieve |
currentValue | number | Yes | Current measured value |
unit | string | undefined | No | Optional unit of measurement (e.g., 'USD', '%', 'users') |
startValue | number | undefined | No | Optional starting value for progress calculation |
trend | GoalMetricTrend | undefined | No | Optional 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique goal identifier |
name | string | Yes | Internal system name (kebab-case identifier) |
title | string | Yes | Human-readable goal title for display |
description | string | Yes | Detailed description of goal purpose and success criteria |
priority | "1" | "2" | "3" | "4" | "5" | Yes | Priority level from 1 (highest) to 5 (lowest) |
dueDate | string | Yes | ISO 8601 timestamp for goal deadline/target date |
completed | boolean | Yes | Completion status flag |
createdAt | string | Yes | ISO 8601 timestamp when goal was created |
updatedAt | string | Yes | ISO 8601 timestamp when goal was last updated |
archived | boolean | Yes | Soft delete flag - true if goal has been archived |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
userId | string | Yes | User ID of goal creator |
extended | Record<string, unknown> | undefined | No | Extensible object for future schema additions |
metrics | GoalMetric[] | undefined | No | Array of KPI metrics for tracking goal progress |
targetDate | string | undefined | No | ISO 8601 timestamp for target completion date (separate from dueDate) |
progressMode | GoalProgressMode | Yes | Mode for calculating goal progress |
currentProgress | number | undefined | No | Current progress percentage (0-100), used when progressMode is manual |
status | GoalStatus | Yes | Current status of the goal |
parentGoalId | string | undefined | No | Parent goal ID for hierarchical goal structures |
category | GoalCategory | undefined | No | Category for goal classification |
workspaceId | string | undefined | No | Workspace ID for workspace-based organization |
InitiativeModel
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
roadmapId | string | Yes | |
name | string | Yes | |
description | string | undefined | No | |
quarter | string | Yes | |
status | "In Progress" | "Backlog" | "Planned" | "Done" | Yes | |
priority | "High" | "Medium" | "Low" | undefined | No | |
color | string | undefined | No | |
projectIds | string[] | Yes | |
order | number | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
createdAt | string | Yes | |
updatedAt | string | Yes | |
metadata | Record<string, unknown> | undefined | No | |
extended | Record<string, unknown> | undefined | No |
MarketSize
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
tam | number | Yes | |
sam | number | Yes | |
som | number | Yes | |
currency | string | Yes | |
year | number | Yes |
TargetSegment
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
size | number | Yes | |
characteristics | string | Yes | |
painPoints | string[] | Yes |
SwotAnalysis
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
strengths | string[] | Yes | |
weaknesses | string[] | Yes | |
opportunities | string[] | Yes | |
threats | string[] | Yes |
MarketAnalysisModel
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
businessPlanId | string | Yes | |
title | string | Yes | |
description | string | Yes | |
marketSize | MarketSize | undefined | No | |
growthRate | number | undefined | No | |
trends | string[] | undefined | No | |
targetSegments | TargetSegment[] | undefined | No | |
swot | SwotAnalysis | undefined | No | |
extended | Record<string, any> | undefined | No | |
createdAt | string | Yes | |
updatedAt | string | Yes | |
archived | boolean | Yes |
ToolCall
ToolCall represents a single tool/function call made during message processing
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | undefined | No | Optional unique identifier for the tool call |
toolName | string | Yes | Name of the tool being called |
arguments | any | Yes | Arguments passed to the tool |
result | any | No | Result returned from the tool execution |
status | "pending" | "success" | "error" | Yes | Status of the tool call execution |
MessageModel
MessageModel represents a single message within a conversation. Messages can be from user, assistant, or system roles.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier for the message |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | ID of the workspace this message belongs to |
conversationId | string | Yes | ID of the conversation this message belongs to |
role | "user" | "assistant" | "system" | Yes | Role of the message sender |
content | string | Yes | Content/text of the message |
toolCalls | ToolCall[] | undefined | No | Optional tool calls made during message processing |
createdAt | string | Yes | UTC timestamp when the message was created |
metadata | MessageMetadata | undefined | No | Optional metadata tracking tokens, cost, and latency |
extended | Record<string, any> | undefined | No | Extensible object for future schema additions |
MessageMetadata
Metadata tracking message usage statistics and costs
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
tokens | { input: number; output: number; total: number; } | undefined | No | Token usage breakdown |
cost | { total: number; } | undefined | No | Cost information |
latency | number | undefined | No | Response latency in milliseconds |
model | string | undefined | No | Model 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique milestone identifier |
name | string | Yes | Internal system name (kebab-case identifier) |
title | string | Yes | Human-readable milestone title for display |
description | string | Yes | Detailed description of milestone goals and deliverables |
completed | boolean | Yes | Completion status flag |
projectId | string | Yes | Parent project ID this milestone belongs to |
goalId | string | Yes | Parent goal ID (inherited from project) |
createdAt | string | Yes | ISO 8601 timestamp when milestone was created |
updatedAt | string | Yes | ISO 8601 timestamp when milestone was last updated |
startAt | string | undefined | No | Optional planned start date for milestone (ISO 8601) |
startedAt | string | undefined | No | Optional actual start date when milestone work began (ISO 8601) |
dueAt | string | undefined | No | Optional due date for milestone completion (ISO 8601) |
completedAt | string | undefined | No | Optional actual completion date when milestone was finished (ISO 8601) |
archived | boolean | Yes | Soft delete flag - true if milestone has been archived |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
userId | string | Yes | User ID of milestone creator |
workspaceId | string | Yes | Workspace ID for workspace-based organization |
timeBudgetHours | number | undefined | No | Optional time budget in hours for milestone estimation |
categoryId | string | undefined | No | Optional category ID for milestone classification |
tagIds | string[] | undefined | No | Optional array of tag IDs for flexible categorization |
metadata | MilestoneMetadata | undefined | No | Optional phase tracking and spec metadata |
extended | Record<string, any> | undefined | No | Extensible object for future schema additions |
MilestoneMetadata
Metadata structure for MCP-managed milestones
Supports phase-based workflow management and document content approval tracking.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
phaseType | "requirements" | "design" | "tasks" | "implementation" | undefined | No | Type of development phase this milestone represents |
documentPath | string | undefined | No | Path to external markdown document if stored outside milestone |
approvalStatus | "pending" | "approved" | "rejected" | undefined | No | Approval status for milestone completion |
approvedBy | string | undefined | No | User ID of approver |
approvedAt | string | undefined | No | ISO 8601 timestamp when milestone was approved |
createdByMCP | boolean | undefined | No | Flag indicating if milestone was created by MCP agent |
workflowData | { documentContent?: string; approved: boolean; approvedAt?: string; approvedBy?: string; lastUpdated?: string; templateVersion?: string; } | undefined | No | Workflow 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique opportunity identifier |
name | string | Yes | Internal system name (kebab-case identifier) |
title | string | Yes | Human-readable opportunity title for display |
description | string | Yes | Detailed description of opportunity scope and potential |
completed | boolean | Yes | Completion status - true when opportunity is won/lost/closed |
clientId | string | Yes | Client ID this opportunity is associated with |
archived | boolean | Yes | Soft delete flag - true if opportunity has been archived |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | Workspace ID for workspace-level data isolation |
userId | string | Yes | User ID of opportunity creator/owner |
createdAt | string | Yes | ISO 8601 timestamp when opportunity was created |
updatedAt | string | Yes | ISO 8601 timestamp when opportunity was last updated |
extended | Record<string, any> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
colorSchemeIndex | number | undefined | No | Color 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique organization identifier |
orgId | string | Yes | Organization ID (self-referential for consistency with other models) |
createdAt | string | Yes | ISO 8601 timestamp when organization was created |
updatedAt | string | Yes | ISO 8601 timestamp when organization was last updated |
name | string | Yes | Organization name for display and identification |
description | string | Yes | Detailed description of organization purpose and scope |
archived | boolean | Yes | Soft delete flag - true if organization has been archived |
userId | string | Yes | User ID of organization creator/owner |
metadata | OrgMetadata | undefined | No | Organization customization settings |
extended | Record<string, any> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique theme identifier (format: othr_{nanoid}) |
orgId | string | Yes | Organization ID this theme belongs to |
name | string | Yes | Human-readable theme name for display |
config | string | Yes | JSON-stringified Theme configuration object |
isDefault | boolean | Yes | Whether this is the default theme for the organization |
createdAt | string | Yes | ISO 8601 timestamp when theme was created |
updatedAt | string | Yes | ISO 8601 timestamp when theme was last updated |
createdBy | string | Yes | User ID who created the theme |
updatedBy | string | Yes | User ID who last updated the theme |
extended | Record<string, unknown> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
propertyPath | string | Yes | Property path to evaluate (dot notation supported, e.g., 'status', 'metadata.phase') |
operator | TriggerConditionOperator | Yes | Comparison operator |
value | unknown | No | Value to compare against (supports ${variable} interpolation) |
valueRef | string | undefined | No | Reference to another property or context variable for comparison |
TriggerDebounceConfig
Debounce configuration for triggers
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
waitMs | number | Yes | Wait time in milliseconds before firing |
strategy | "leading" | "trailing" | undefined | No | Strategy: 'leading' fires first then ignores, 'trailing' waits for quiet period |
FlowStateEntityTrigger
FlowState entity change trigger configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
entityType | TriggerEntityType | Yes | FlowState entity type to watch |
selector | Record<string, unknown> | undefined | No | RxDB selector to filter which entities to watch |
conditions | FlowStateTriggerCondition[] | Yes | Property conditions - ALL must match (AND logic) |
debounce | TriggerDebounceConfig | undefined | No | Debounce configuration to prevent rapid firing |
ProcessTrigger
Process trigger configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
type | ProcessTriggerType | Yes | Type of trigger that initiates this process |
schedule | string | undefined | No | Cron expression for scheduled triggers (e.g., '0 9 * * 1' for Monday 9am) |
eventName | string | undefined | No | Event name that triggers the process (for generic 'event' type) |
entityTrigger | FlowStateEntityTrigger | undefined | No | FlowState entity trigger configuration (for 'entity' type) |
webhook | { method: "GET" | "POST" | "PUT"; auth?: "none" | "api-key" | "bearer" | "basic"; } | undefined | No | Webhook endpoint configuration |
conditions | Record<string, unknown> | undefined | No | Additional trigger conditions (JSON Logic format) |
ProcessSchema
JSON Schema definition for process inputs/outputs
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
type | "string" | "number" | "boolean" | "object" | "array" | Yes | JSON Schema type |
properties | Record<string, { type: string; description?: string; required?: boolean; default?: unknown; enum?: unknown[]; }> | undefined | No | Schema properties for object types |
required | string[] | undefined | No | Required field names |
description | string | undefined | No | Schema description |
ProcessExecutionConfig
Process execution configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
maxConcurrentExecutions | number | undefined | No | Maximum concurrent executions of this process |
queueBehavior | QueueBehavior | undefined | No | What to do when max concurrent executions reached |
timeoutMinutes | number | undefined | No | Default timeout for entire process in minutes |
singleton | boolean | undefined | No | Singleton mode - only one active execution at a time |
priority | number | undefined | No | Priority level for execution queue (higher = more priority) |
ProcessStatistics
Process statistics configuration for linking to FlowState entities
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
projectId | string | undefined | No | Link to project for metrics tracking |
milestoneId | string | undefined | No | Link to milestone for phase tracking |
metrics | { name: string; type: "counter" | "gauge" | "histogram"; description?: string; }[] | undefined | No | Custom 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique process identifier (format: proc_<nanoid>) |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | Workspace ID for workspace-level isolation |
userId | string | Yes | User ID of process creator |
createdAt | string | Yes | ISO 8601 timestamp when process was created |
updatedAt | string | Yes | ISO 8601 timestamp when process was last updated |
name | string | Yes | Internal system name (kebab-case identifier) |
title | string | Yes | Human-readable process title for display |
description | string | Yes | Detailed description of process purpose and behavior |
version | string | Yes | Process semantic version (e.g., '1.0.0', '2.1.3') |
status | ProcessStatus | Yes | Current process status |
category | ProcessCategory | Yes | Process category for organization |
stepIds | string[] | Yes | Array of process step IDs in execution order |
startStepId | string | undefined | No | ID of the starting step (entry point) |
inputSchema | ProcessSchema | undefined | No | Input schema defining required process inputs |
outputSchema | ProcessSchema | undefined | No | Output schema defining process outputs |
trigger | ProcessTrigger | undefined | No | Trigger configuration for process initiation |
statistics | ProcessStatistics | undefined | No | Statistics and metrics configuration |
archived | boolean | Yes | Soft delete flag - true if process has been archived |
tagIds | string[] | undefined | No | Optional array of tag IDs for flexible categorization |
documentId | string | undefined | No | Optional document ID linking to process documentation |
flowId | string | undefined | No | Optional flow ID for visual representation |
maxSubprocessDepth | number | undefined | No | Maximum subprocess nesting depth (default: 10) |
executorAgentId | string | undefined | No | Agent ID that executes this process (for event-triggered processes) |
executionConfig | ProcessExecutionConfig | undefined | No | Execution configuration (concurrency, timeouts, etc.) |
metadata | ProcessMetadata | undefined | No | Process metadata |
extended | Record<string, unknown> | undefined | No | Extensible object for future schema additions |
ProcessMetadata
Process metadata structure
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
author | string | undefined | No | Author information |
lastEditedBy | string | undefined | No | Last editor user ID |
publishedAt | string | undefined | No | Publish date when process became active |
publishedBy | string | undefined | No | Published by user ID |
deprecatedAt | string | undefined | No | Deprecation date |
deprecationReason | string | undefined | No | Reason for deprecation |
replacedBy | string | undefined | No | Replacement process ID |
estimatedDurationMinutes | number | undefined | No | Estimated execution time in minutes |
sla | { warningMinutes?: number; criticalMinutes?: number; } | undefined | No | SLA configuration |
executionCount | number | undefined | No | Total execution count |
successRate | number | undefined | No | Success rate (0-100) |
avgExecutionTimeSeconds | number | undefined | No | Average execution time in seconds |
StepExecutionRecord
Individual step execution record
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
stepId | string | Yes | Step ID that was executed |
stepName | string | Yes | Step name for reference |
stepType | string | Yes | Step type |
status | "pending" | "failed" | "running" | "completed" | "skipped" | Yes | Execution status of this step |
startedAt | string | undefined | No | ISO 8601 timestamp when step execution started |
completedAt | string | undefined | No | ISO 8601 timestamp when step execution completed |
durationMs | number | undefined | No | Duration in milliseconds |
inputs | Record<string, unknown> | undefined | No | Input data provided to the step |
outputs | Record<string, unknown> | undefined | No | Output data produced by the step |
error | { message: string; code?: string; stack?: string; details?: Record<string, unknown>; } | undefined | No | Error information if step failed |
retryCount | number | undefined | No | Number of retry attempts |
executedBy | string | undefined | No | User ID who executed/approved this step (for human tasks) |
notes | string | undefined | No | Comments or notes from manual execution |
TriggerSourceEntity
Source entity information for entity-triggered executions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
entityType | string | Yes | FlowState entity type that triggered this execution |
entityId | string | Yes | Entity ID that triggered this execution |
collection | string | Yes | Collection name in RxDB |
changedProperties | string[] | Yes | Properties that changed and triggered the execution |
previousValues | Record<string, unknown> | undefined | No | Previous values of changed properties |
newValues | Record<string, unknown> | undefined | No | New values of changed properties |
entitySnapshot | Record<string, unknown> | undefined | No | Full entity snapshot at time of trigger (optional, for debugging) |
ExecutionContext
Execution context tracking
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
triggerType | "subprocess" | "manual" | "scheduled" | "event" | "entity" | "webhook" | "api" | Yes | Trigger type that initiated this execution |
parentExecutionId | string | undefined | No | ID of parent execution if this is a subprocess |
parentStepId | string | undefined | No | Step ID in parent that spawned this subprocess |
depth | number | undefined | No | Current subprocess nesting depth (checked against maxSubprocessDepth) |
sourceEntity | TriggerSourceEntity | undefined | No | Source entity information for entity-triggered executions |
triggerEvent | Record<string, unknown> | undefined | No | Event data that triggered the execution (for generic 'event' type) |
webhookData | { method: string; headers?: Record<string, string>; body?: unknown; query?: Record<string, string>; } | undefined | No | Webhook request data |
triggeredBy | string | undefined | No | User ID who manually triggered the execution |
sourceIp | string | undefined | No | IP address of trigger source |
userAgent | string | undefined | No | User agent of trigger source |
environment | "development" | "staging" | "production" | undefined | No | Execution environment |
agentRunnerId | string | undefined | No | Agent runner ID that executed this process |
triggeredAt | string | undefined | No | Timestamp 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique execution identifier (format: exec_<nanoid>) |
processId | string | Yes | Process ID being executed |
processVersion | string | Yes | Process version at time of execution |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | Workspace ID for workspace-level isolation |
userId | string | Yes | User ID who owns this execution |
createdAt | string | Yes | ISO 8601 timestamp when execution was created |
updatedAt | string | Yes | ISO 8601 timestamp when execution was last updated |
status | ProcessExecutionStatus | Yes | Current execution status |
startedAt | string | undefined | No | ISO 8601 timestamp when execution started |
completedAt | string | undefined | No | ISO 8601 timestamp when execution completed |
durationMs | number | undefined | No | Total duration in milliseconds |
inputs | Record<string, unknown> | Yes | Input data provided to the process |
outputs | Record<string, unknown> | undefined | No | Output data produced by the process |
currentStepId | string | undefined | No | Current step ID being executed (for running executions) |
stepHistory | StepExecutionRecord[] | Yes | Array of step execution records |
variables | Record<string, unknown> | Yes | Process variables state (accumulated during execution) |
context | ExecutionContext | Yes | Execution context information |
error | { message: string; code?: string; stepId?: string; stack?: string; details?: Record<string, unknown>; } | undefined | No | Error information if execution failed |
retryCount | number | Yes | Number of retry attempts at process level |
maxRetries | number | Yes | Maximum retries allowed |
progress | number | Yes | Progress percentage (0-100) |
correlationId | string | undefined | No | Optional correlation ID for tracking related executions |
externalId | string | undefined | No | Optional external reference ID |
resumeAt | string | undefined | No | Scheduled resume time for paused executions |
parentExecutionId | string | undefined | No | Parent execution ID for subprocess tracking (denormalized from context for indexing) |
depth | number | undefined | No | Subprocess nesting depth (denormalized from context for querying) |
archived | boolean | Yes | Soft delete flag |
metadata | ProcessExecutionMetadata | undefined | No | Execution metadata |
extended | Record<string, unknown> | undefined | No | Extensible object for future schema additions |
ProcessExecutionMetadata
ProcessExecution metadata structure
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
priority | number | undefined | No | Priority level (1-10, higher = more urgent) |
queue | string | undefined | No | Queue name for execution scheduling |
tags | string[] | undefined | No | Tags for categorization |
resources | { cpuTimeMs?: number; memoryPeakBytes?: number; networkBytesIn?: number; networkBytesOut?: number; } | undefined | No | Resource usage tracking |
billing | { computeUnits?: number; apiCalls?: number; storageBytes?: number; } | undefined | No | Billing/metering information |
audit | { action: string; userId?: string; timestamp: string; details?: Record<string, unknown>; }[] | undefined | No | Audit trail |
SubprocessConfig
Subprocess configuration for nested process execution
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
processId | string | undefined | No | Process ID to execute |
processName | string | undefined | No | Alternative: lookup process by name |
processVersion | string | undefined | No | Specific version to use (optional, defaults to latest active) |
inputMapping | Record<string, string> | undefined | No | Map parent variables to subprocess inputs (supports ${variable} interpolation) |
outputMapping | Record<string, string> | undefined | No | Map subprocess outputs back to parent variables |
waitForCompletion | boolean | undefined | No | Wait for subprocess completion or fire-and-forget |
timeoutSeconds | number | undefined | No | Timeout for subprocess execution in seconds |
onFailure | SubprocessFailureStrategy | undefined | No | What to do if subprocess fails |
AgentTaskConfig
Agent task configuration for AI agent execution
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
agentId | string | undefined | No | Agent identifier |
prompt | string | undefined | No | Prompt template (supports ${variable} interpolation) |
systemPrompt | string | undefined | No | System prompt for the agent |
model | string | undefined | No | Model to use |
temperature | number | undefined | No | Temperature setting (0-1) |
maxTokens | number | undefined | No | Maximum tokens for response |
tools | string[] | undefined | No | MCP tools the agent can use |
outputSchema | Record<string, unknown> | undefined | No | Structured output schema (JSON Schema) |
contextVariables | string[] | undefined | No | Variables to include in agent context |
CommandConfig
CLI command configuration for shell execution
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
executable | string | Yes | Executable or shell command |
args | string[] | undefined | No | Command arguments (supports ${variable} interpolation) |
workingDirectory | string | undefined | No | Working directory |
env | Record<string, string> | undefined | No | Environment variables |
shell | boolean | undefined | No | Run in shell (allows pipes, redirects, etc.) |
captureOutput | boolean | undefined | No | Capture stdout as output variable |
outputVariable | string | undefined | No | Variable name to store captured output |
captureStderr | boolean | undefined | No | Capture stderr separately |
stderrVariable | string | undefined | No | Variable name to store stderr |
ContainerVolumeMount
Container volume mount configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
hostPath | string | Yes | Host path or volume name |
containerPath | string | Yes | Path inside container |
readOnly | boolean | undefined | No | Mount as read-only |
ContainerResources
Container resource limits
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
cpuLimit | string | undefined | No | CPU limit (e.g., "1.0", "0.5") |
memoryLimit | string | undefined | No | Memory limit (e.g., "512Mi", "1Gi") |
cpuRequest | string | undefined | No | CPU request for scheduling |
memoryRequest | string | undefined | No | Memory request for scheduling |
ContainerConfig
Container execution configuration for isolated step execution
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
image | string | Yes | Docker image |
tag | string | undefined | No | Image tag (defaults to 'latest') |
command | string[] | undefined | No | Override container command |
entrypoint | string[] | undefined | No | Override entrypoint |
env | Record<string, string> | undefined | No | Environment variables |
volumes | ContainerVolumeMount[] | undefined | No | Volume mounts |
resources | ContainerResources | undefined | No | Resource limits |
network | string | undefined | No | Network mode |
pullPolicy | "never" | "always" | "if-not-present" | undefined | No | Pull policy: always, never, if-not-present |
workingDir | string | undefined | No | Working directory inside container |
user | string | undefined | No | User to run as |
StepAction
Action configuration for executable steps
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
type | "agent" | "subprocess" | "approval" | "http" | "script" | "mcp-tool" | "notification" | "command" | "container" | Yes | Type of action to perform |
endpoint | string | undefined | No | HTTP endpoint for API calls |
method | "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | undefined | No | HTTP method |
headers | Record<string, string> | undefined | No | Request headers |
bodyTemplate | string | undefined | No | Request body template (supports ${variable} interpolation) |
script | string | undefined | No | Script content for script actions |
scriptLanguage | "javascript" | "python" | "shell" | undefined | No | Script language |
mcpTool | string | undefined | No | MCP tool name for mcp-tool actions |
mcpParams | Record<string, unknown> | undefined | No | MCP tool parameters |
subprocessId | string | undefined | No | |
subprocess | SubprocessConfig | undefined | No | Subprocess configuration (for type: 'subprocess') |
agent | AgentTaskConfig | undefined | No | Agent task configuration (for type: 'agent') |
command | CommandConfig | undefined | No | CLI command configuration (for type: 'command') |
container | ContainerConfig | undefined | No | Container execution configuration (for type: 'container') |
notification | { channel: "email" | "slack" | "webhook" | "in-app"; template?: string; recipients?: string[]; } | undefined | No | Notification configuration |
approval | { approverUserIds?: string[]; approverRoleIds?: string[]; requiredApprovals?: number; timeoutMinutes?: number; escalationUserIds?: string[]; } | undefined | No | Approval configuration |
retry | { maxAttempts: number; delaySeconds: number; backoffMultiplier?: number; } | undefined | No | Retry configuration |
timeoutSeconds | number | undefined | No | Timeout in seconds |
StepCondition
Condition for decision steps
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique condition identifier |
expression | string | Record<string, unknown> | Yes | Condition expression (JSON Logic format or simple comparison) |
targetStepId | string | Yes | Target step ID when condition is true |
label | string | undefined | No | Human-readable label for the branch |
order | number | Yes | Order for evaluation (lower = first) |
StepOutput
Output mapping for step results
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Variable name to store the output |
path | string | undefined | No | JSON path to extract from response |
type | "string" | "number" | "boolean" | "object" | "array" | Yes | Data type of the output |
defaultValue | unknown | No | Default value if extraction fails |
StepPosition
Visual position for flowchart rendering
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
x | number | Yes | X coordinate in pixels |
y | number | Yes | Y 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique step identifier (format: step_<nanoid>) |
processId | string | Yes | Parent process ID this step belongs to |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | Workspace ID for workspace-level isolation |
userId | string | Yes | User ID of step creator |
createdAt | string | Yes | ISO 8601 timestamp when step was created |
updatedAt | string | Yes | ISO 8601 timestamp when step was last updated |
name | string | Yes | Internal system name (kebab-case identifier) |
title | string | Yes | Human-readable step title for display |
description | string | Yes | Detailed description of what this step does |
stepType | ProcessStepType | Yes | Type of step determining its behavior |
order | number | Yes | Execution order within the process (0-based) |
action | StepAction | undefined | No | Action configuration for executable steps |
conditions | StepCondition[] | undefined | No | Conditions for decision/gateway steps |
nextStepId | string | undefined | No | Default next step ID (for non-conditional transitions) |
outputs | StepOutput[] | undefined | No | Output mappings for step results |
inputs | Record<string, unknown> | undefined | No | Input variable mappings (maps process variables to step inputs) |
position | StepPosition | undefined | No | Visual position for flowchart rendering |
style | { backgroundColor?: string; borderColor?: string; textColor?: string; width?: number; height?: number; } | undefined | No | Custom node style for visual representation |
icon | string | undefined | No | Icon identifier for visual representation |
optional | boolean | Yes | Whether this step is optional (can be skipped) |
enabled | boolean | Yes | Whether this step is enabled |
archived | boolean | Yes | Soft delete flag |
estimatedDurationMinutes | number | undefined | No | Estimated duration in minutes for this step |
metadata | ProcessStepMetadata | undefined | No | Step metadata |
extended | Record<string, unknown> | undefined | No | Extensible object for future schema additions |
ProcessStepMetadata
ProcessStep metadata structure
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
documentationUrl | string | undefined | No | Documentation URL |
helpText | string | undefined | No | Help text for users |
validation | { inputRequired?: boolean; outputRequired?: boolean; customRules?: Record<string, unknown>[]; } | undefined | No | Validation rules |
logging | { level?: "debug" | "info" | "warn" | "error"; includeInputs?: boolean; includeOutputs?: boolean; } | undefined | No | Logging configuration |
errorHandling | { onError?: "fail" | "skip" | "retry" | "goto"; gotoStepId?: string; errorMessage?: string; } | undefined | No | Error handling configuration |
ProductKpi
Key Performance Indicator
Tracks measurable metrics for product success evaluation.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier for the KPI |
name | string | Yes | Human-readable name of the KPI |
target | number | Yes | Target value to achieve |
current | number | Yes | Current measured value |
unit | string | Yes | Unit of measurement (e.g., '%', 'users', 'seconds') |
trend | KpiTrend | Yes | Direction of recent change |
PhaseHistoryEntry
Phase History Entry
Records a product's transition through lifecycle phases.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
phase | ProductPhase | Yes | The lifecycle phase |
enteredAt | string | Yes | ISO 8601 timestamp when the product entered this phase |
exitedAt | string | undefined | No | ISO 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:
| Property | Type | Required | Description |
|---|---|---|---|
completenessScore | number | undefined | No | Calculated completeness score (0-100) based on filled fields |
version | string | undefined | No | Product version string |
platforms | string[] | undefined | No | Target platforms (e.g., ['web', 'ios', 'android']) |
techStack | string[] | undefined | No | Technology stack used in the product |
releaseNotes | string | undefined | No | Latest 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique product identifier (format: prod_XXXXXXXXXX) |
name | string | Yes | Internal system name (kebab-case identifier) |
slug | string | undefined | No | URL-friendly slug derived from name |
type | ProductType | Yes | Product category type |
description | string | undefined | No | Detailed product description (optional - can be added after initial creation) |
icon | string | undefined | No | Icon identifier for UI display |
color | string | undefined | No | Brand color in hex format (e.g., '#6366f1') |
problemStatement | string | undefined | No | Problem the product solves for its target market |
valueProposition | string | undefined | No | Unique value proposition describing why customers should choose this product |
targetMarket | string[] | undefined | No | Array of target market segments |
competitiveLandscape | string | undefined | No | Analysis of competitive landscape |
customerPersona | string | undefined | No | Customer Persona |
kpis | ProductKpi[] | undefined | No | Array of key performance indicators |
currentPhase | ProductPhase | Yes | Current lifecycle phase |
phaseHistory | PhaseHistoryEntry[] | undefined | No | History of phase transitions |
createdAt | string | Yes | ISO 8601 timestamp when product was created |
updatedAt | string | Yes | ISO 8601 timestamp when product was last updated |
archived | boolean | Yes | Soft delete flag - true if product has been archived |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
userId | string | Yes | User ID of product creator/owner |
workspaceId | string | Yes | Workspace ID for workspace-level isolation |
sourceTemplateId | string | undefined | No | Optional template ID if product was created from a template |
metadata | ProductMetadata | undefined | No | Optional additional metadata |
extended | Record<string, unknown> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier (format: pgoal_timestamp_random) |
productId | string | Yes | Product ID reference |
goalId | string | Yes | Goal ID reference |
order | number | Yes | Display order for sorting goals within a product |
isPrimary | boolean | undefined | No | Indicates if this is the primary goal for the product |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | Workspace ID for workspace-level isolation |
userId | string | Yes | User ID of the creator |
createdAt | string | Yes | ISO 8601 timestamp when the link was created |
updatedAt | string | Yes | ISO 8601 timestamp when the link was last updated |
extended | Record<string, unknown> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier (format: ppro_XXXXXXXXXX) |
productId | string | Yes | Product ID being linked |
projectId | string | Yes | Project ID being linked |
role | ProductProjectRole | Yes | Role of this project for the product |
linkedAt | string | Yes | ISO 8601 timestamp when link was created |
linkedBy | string | Yes | User ID who created the link |
orgId | string | Yes | Organization ID for multi-tenant isolation |
workspaceId | string | Yes | Workspace ID for workspace-level isolation |
createdAt | string | Yes | ISO 8601 timestamp when record was created |
updatedAt | string | Yes | ISO 8601 timestamp when record was last updated |
extended | Record<string, unknown> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier (format: ptmb_XXXXXXXXXX) |
productId | string | Yes | Product ID being linked |
teamMemberId | string | Yes | TeamMember ID being linked |
role | ProductTeamMemberRole | Yes | Role of this team member for the product |
isPrimary | boolean | Yes | Whether this is the primary product for this team member |
linkedAt | string | Yes | ISO 8601 timestamp when link was created |
linkedBy | string | Yes | User ID who created the link |
orgId | string | Yes | Organization ID for multi-tenant isolation |
workspaceId | string | Yes | Workspace ID for workspace-level isolation |
createdAt | string | Yes | ISO 8601 timestamp when record was created |
updatedAt | string | Yes | ISO 8601 timestamp when record was last updated |
extended | Record<string, unknown> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique project identifier |
name | string | Yes | Internal system name (kebab-case identifier) |
title | string | Yes | Human-readable project title for display |
description | string | Yes | Detailed description of project scope and deliverables |
completed | boolean | Yes | Completion status flag |
goalId | string | Yes | Parent goal ID this project belongs to |
createdAt | string | Yes | ISO 8601 timestamp when project was created |
updatedAt | string | Yes | ISO 8601 timestamp when project was last updated |
startAt | string | undefined | No | Optional planned start date for project (ISO 8601) |
startedAt | string | undefined | No | Optional actual start date when project work began (ISO 8601) |
dueAt | string | undefined | No | Optional due date for project completion (ISO 8601) |
completedAt | string | undefined | No | Optional actual completion date when project was finished (ISO 8601) |
archived | boolean | Yes | Soft delete flag - true if project has been archived |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
userId | string | Yes | User ID of project creator/owner |
workspaceId | string | undefined | No | Optional parent workspace ID for workspace-scoped projects |
codebaseId | string | undefined | No | Optional parent codebase ID for code-related projects |
sourceTemplateId | string | undefined | No | Optional template ID if project was created from a template |
timeBudgetHours | number | undefined | No | Optional time budget in hours for project estimation |
categoryId | string | undefined | No | Optional category ID for project classification |
tagIds | string[] | undefined | No | Optional array of tag IDs for flexible categorization |
metadata | ProjectMetadata | undefined | No | Optional MCP and spec tracking metadata |
extended | Record<string, any> | undefined | No | Extensible object for future schema additions |
ProjectMetadata
Metadata structure for MCP-managed projects and specs
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
specType | "feature" | "bugfix" | "refactor" | undefined | No | Type of spec/project: feature, bugfix, or refactor |
phase | "requirements" | "design" | "tasks" | "implementation" | undefined | No | Current development phase |
createdByMCP | boolean | undefined | No | Flag indicating if project was created by MCP agent |
mcpVersion | string | undefined | No | MCP version that created/managed this project |
RoadmapModel
Roadmap Model Interface
Represents a product-level roadmap with optional start/end quarters.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique roadmap identifier |
productId | string | Yes | Product this roadmap belongs to |
startQuarter | string | undefined | No | Optional start quarter label (e.g., "Q1 2026") |
endQuarter | string | undefined | No | Optional end quarter label (e.g., "Q4 2026") |
orgId | string | Yes | Organization ID for multi-tenant isolation |
workspaceId | string | Yes | Workspace ID for workspace-level isolation |
userId | string | Yes | User ID of roadmap creator/owner |
createdAt | string | Yes | ISO 8601 timestamp when roadmap was created |
updatedAt | string | Yes | ISO 8601 timestamp when roadmap was last updated |
metadata | Record<string, unknown> | undefined | No | Optional additional metadata |
extended | Record<string, unknown> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique session identifier |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
userId | string | Yes | User ID associated with this session |
codebaseId | string | Yes | Codebase ID for the repository being worked on |
workspaceId | string | Yes | Workspace ID for workspace-level context |
projectId | string | undefined | No | Optional project ID if session is project-scoped |
milestoneId | string | undefined | No | Optional milestone ID if session is milestone-scoped |
taskId | string | undefined | No | Optional task ID if session is task-scoped |
sessionType | "agent" | "custom" | "debug" | "terminal" | undefined | No | Session type identifier |
createdAt | string | Yes | ISO 8601 timestamp when session was created |
updatedAt | string | Yes | ISO 8601 timestamp when session was last updated |
expiresAt | string | undefined | No | Optional ISO 8601 timestamp when session expires |
archived | boolean | Yes | Soft delete flag - true if session has been archived |
context | SessionContext | Yes | Flexible context object for storing session state |
metadata | Record<string, any> | undefined | No | Additional metadata for extensibility |
extended | Record<string, any> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
activeTaskId | string | undefined | No | Current task ID being worked on |
currentPhase | string | undefined | No | Current development phase or stage |
lastActivity | string | undefined | No | ISO 8601 timestamp of last activity |
workingDirectory | string | undefined | No | Working directory path within repository |
gitBranch | string | undefined | No | Current git branch name |
notes | string | undefined | No | Free-form notes for session context |
shellSessionId | string | undefined | No | ID from shell-server for terminal sessions |
processId | number | undefined | No | Process ID of the shell process |
connectionStatus | TerminalConnectionStatus | undefined | No | Current connection status for terminal sessions |
shellType | ShellType | undefined | No | Type of shell being used |
displayName | string | undefined | No | User-editable display name for the session |
autoGeneratedName | string | undefined | No | System-generated name based on context |
scopedEntityType | SessionScopeEntityType | undefined | No | Entity type this session is scoped to |
scopedEntityId | string | undefined | No | ID of the scoped entity |
lastOutput | string | undefined | No | Last N lines of terminal output for context preservation |
environmentSnapshot | Record<string, string> | undefined | No | Environment variables snapshot for session restoration |
terminalCols | number | undefined | No | Terminal dimensions (columns) |
terminalRows | number | undefined | No | Terminal dimensions (rows) |
lastConnectedAt | string | undefined | No | ISO 8601 timestamp when session was last connected |
disconnectedAt | string | undefined | No | ISO 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:
| Property | Type | Required | Description |
|---|---|---|---|
flowstateField | string | Yes | Field name in FlowState entity |
externalField | string | Yes | Field name in external provider entity |
transform | "custom" | "direct" | Yes | Transform type: 'direct' for 1:1 mapping, 'custom' for custom transformer |
transformerName | string | undefined | No | Name of custom transformer function (required when transform is 'custom') |
defaultValue | unknown | No | Default 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique sync configuration identifier |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | Workspace ID this sync configuration belongs to |
userId | string | Yes | User ID who created/owns this configuration |
providerId | string | Yes | Provider type identifier (e.g., 'github', 'jira', 'asana') |
name | string | Yes | User-friendly name for this sync configuration |
description | string | undefined | No | Optional detailed description of the sync configuration |
targetProjectId | string | undefined | No | Target project ID for synced items (optional) |
targetMilestoneId | string | undefined | No | Target milestone ID for synced items (optional) |
direction | "pull" | "push" | "bidirectional" | Yes | Direction of synchronization: 'pull', 'push', or 'bidirectional' |
pollingIntervalMs | number | Yes | Polling interval in milliseconds (minimum 60000ms = 1 minute) |
enabled | boolean | Yes | Whether this sync configuration is enabled |
credentials | string | Yes | Provider-specific credentials (tokens, API keys, etc.) - stored as JSON string |
providerConfig | string | Yes | Provider-specific configuration options - stored as JSON string |
fieldMappings | string | Yes | Field mappings between FlowState and external provider - stored as JSON string |
lastSyncAt | string | undefined | No | Timestamp of last successful sync (ISO 8601 string) |
lastSyncError | string | undefined | No | Error message from last sync attempt, if any |
lastSyncItemCount | number | undefined | No | Number of items synced in the last sync operation |
createdAt | string | Yes | ISO 8601 timestamp when configuration was created |
updatedAt | string | Yes | ISO 8601 timestamp when configuration was last updated |
archived | boolean | Yes | Soft delete flag - true if configuration has been archived |
extended | Record<string, any> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique task identifier |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
userId | string | Yes | User ID who created or owns this task |
createdAt | string | Yes | ISO 8601 timestamp when task was created |
updatedAt | string | Yes | ISO 8601 timestamp when task was last updated |
name | string | Yes | Internal system name (kebab-case identifier) |
title | string | Yes | Human-readable task title for display |
description | string | Yes | Detailed task description and requirements |
startAt | string | undefined | No | Optional planned start date for task (ISO 8601) |
startedAt | string | undefined | No | Optional actual start date when task work began (ISO 8601) |
dueAt | string | undefined | No | Optional due date for task completion (ISO 8601) |
completedAt | string | undefined | No | Optional actual completion date when task was finished (ISO 8601) |
status | "In Progress" | "Complete" | "To Do" | "On Hold" | "Blocked" | Yes | Current task status for workflow tracking |
type | "habit" | "todo" | Yes | Task type: 'habit' for recurring habits, 'todo' for standard tasks |
completed | boolean | Yes | Completion flag (true when status is 'Complete') |
workspaceId | string | Yes | Parent workspace ID this task belongs to - required for all tasks |
projectId | string | undefined | No | Optional parent project ID - tasks can exist at workspace level without a project |
milestoneId | string | undefined | No | Optional parent milestone ID - tasks can exist at project level without a milestone |
parentTaskId | string | undefined | No | Optional parent task ID for nested subtasks |
archived | boolean | Yes | Soft delete flag - true if task has been archived |
timeBudgetHours | number | undefined | No | Optional time budget in hours for task estimation |
isRecurring | boolean | undefined | No | Flag indicating if this is a recurring task |
recurrenceRule | string | undefined | No | iCal RRULE string defining recurrence pattern (e.g., 'FREQ=WEEKLY;BYDAY=MO,WE,FR') |
parentRecurrenceId | string | undefined | No | ID linking to parent recurring task series |
recurrenceInstanceDate | string | undefined | No | Specific instance date for individual recurring task occurrences |
categoryId | string | undefined | No | Optional category ID for task classification |
tagIds | string[] | undefined | No | Optional array of tag IDs for flexible categorization |
metadata | TaskMetadata | undefined | No | Optional MCP execution tracking and conversation management metadata |
extended | Record<string, any> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
executionType | "local" | "remote" | undefined | No | Execution type: 'local' for local agent, 'remote' for cloud agent |
prompt | string | undefined | No | AI prompt describing task requirements for agent execution |
leverage | string | string[] | undefined | No | Files to reuse/reference (string for spec workflow, array for legacy) |
requirements | string | string[] | undefined | No | Requirement IDs to satisfy (string for spec workflow, array for legacy) |
assignedAgent | string | undefined | No | Worker ID of agent currently assigned to this task |
executionAttempts | number | undefined | No | Number of execution attempts made |
lastExecutionError | string | undefined | No | Last error message if task execution failed |
conversationState | ConversationState | undefined | No | Multi-turn conversation state with compression support for long conversations |
conversationHistory | { role: string; content: string; timestamp: string; }[] | undefined | No | Legacy conversation history (being migrated to conversationState) |
timeEntryIds | string[] | undefined | No | Array of TimeEntry document IDs tracking time spent on this task |
totalTimeSeconds | number | undefined | No | Cumulative time spent on task in seconds |
logIds | string[] | undefined | No | Array of Log document IDs for task execution logs |
createdByMCP | boolean | undefined | No | Flag indicating if task was created by MCP agent |
taskNumber | string | undefined | No | Hierarchical task number from spec workflow (e.g., '1.1.1', '2.3.1') |
parentTaskNumber | string | undefined | No | Parent task number for hierarchical structure (e.g., '1.1' for task '1.1.1') |
markdownStatus | "[ ]" | "[-]" | "[x]" | undefined | No | Checkbox state from tasks.md markdown file |
promptSections | { key: string; value: string; }[] | undefined | No | Structured prompt sections for AI task execution |
RaciAssignment
RACI assignment for a specific area.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
area | string | Yes | Area of responsibility (e.g., 'strategy', 'development', 'design') |
type | RaciType | Yes | RACI 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier (format: team_XXXXXXXXXX) |
productId | string | undefined | No | Product ID this team member belongs to. |
userId | string | Yes | User ID of the team member |
userName | string | Yes | Display name of the user |
userEmail | string | undefined | No | Email address of the user |
userAvatar | string | undefined | No | Avatar URL of the user |
role | TeamMemberRole | Yes | Role within the product team |
raciAssignments | RaciAssignment[] | Yes | RACI assignments for different areas |
isAgent | boolean | Yes | Whether this team member is an AI agent |
joinedAt | string | Yes | ISO 8601 timestamp when member joined the product team |
orgId | string | Yes | Organization ID for multi-tenant isolation |
workspaceId | string | undefined | No | Workspace ID for workspace-level isolation. |
createdAt | string | Yes | ISO 8601 timestamp when record was created |
updatedAt | string | Yes | ISO 8601 timestamp when record was last updated |
extended | Record<string, unknown> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique template identifier (format: template_<type>_<orgId>) |
templateType | "project" | "milestone" | "task" | "product" | "tech" | "structure" | "requirements" | "design" | "tasks" | Yes | Type of template determining its usage context |
name | string | Yes | Human-readable template name for display |
content | string | Yes | Markdown template content with optional placeholder variables |
version | string | Yes | Semantic version string (e.g., 'v1.0.0', 'v2.1.0') for tracking changes |
isDefault | boolean | Yes | Flag indicating if this is a system default template (orgId: 'system') |
orgId | string | Yes | Organization ID for multi-tenant isolation ('system' for defaults) |
workspaceId | string | Yes | Workspace ID for workspace-level data isolation |
userId | string | undefined | No | Optional user ID of template creator (omitted for system templates) |
createdAt | string | Yes | ISO 8601 timestamp when template was created |
updatedAt | string | Yes | ISO 8601 timestamp when template was last updated |
metadata | { [key: string]: any; description?: string; language?: string; category?: "spec" | "steering" | TemplateCategory; } | undefined | No | Optional extensible metadata for template customization |
data | ProjectTemplateData | undefined | No | Optional project template data (used when templateType === 'project') |
extended | Record<string, any> | undefined | No | Extensible object for future schema additions |
TemplateItem
Template item in a project template hierarchy
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
templateId | string | Yes | Unique ID within template for cross-referencing |
title | string | Yes | Display title |
description | string | undefined | No | Optional description |
startOffsetDays | number | Yes | Days offset from parent's start date |
durationDays | number | Yes | Duration in days |
MilestoneTemplateItem
Milestone template extending base template item
TaskTemplateItem
Task template with parent milestone reference
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
milestoneTemplateId | string | Yes | References parent milestone's templateId |
SubtaskTemplateItem
Subtask template with parent task reference
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
taskTemplateId | string | Yes | References parent task's templateId |
ProjectTemplateData
Complete project template data structure Stored in Template.data when templateType === 'project'
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
project | { title: string; description?: string; } | Yes | Project-level template data |
milestones | MilestoneTemplateItem[] | Yes | Array of milestone templates |
tasks | TaskTemplateItem[] | Yes | Array of task templates |
subtasks | SubtaskTemplateItem[] | Yes | Array 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique time entry identifier |
name | string | Yes | Descriptive name/label for this time entry |
start | string | Yes | ISO 8601 timestamp when time tracking started |
end | string | undefined | No | ISO 8601 timestamp when time tracking ended (undefined = timer still running) |
duration | number | undefined | No | Calculated duration in seconds (end - start), undefined while timer running |
taskId | string | Yes | Entity 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. | |||
archived | boolean | Yes | Soft delete flag - true if time entry has been archived |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
workspaceId | string | Yes | Workspace ID for multi-tenant filtering |
userId | string | Yes | User ID who performed the work |
createdAt | string | Yes | ISO 8601 timestamp when time entry was created |
updatedAt | string | Yes | ISO 8601 timestamp when time entry was last updated |
extended | Record<string, any> | undefined | No | Extensible object for future schema additions |
categoryId | string | undefined | No | Optional category ID (inherited from task or manually set) |
tagIds | string[] | undefined | No | Optional 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique user identifier |
createdAt | string | Yes | ISO 8601 timestamp when user account was created |
updatedAt | string | Yes | ISO 8601 timestamp when user account was last updated |
name | string | Yes | User's display name |
email | string | Yes | User's email address for authentication and communication |
authUserId | string | undefined | No | Optional external authentication user ID (e.g., from Auth0, Firebase) |
timezone | string | undefined | No | Optional user timezone preference (e.g., 'America/Los_Angeles', 'UTC') |
archived | boolean | Yes | Soft delete flag - true if user account has been archived |
orgId | string | Yes | Organization ID this user belongs to |
onboarded | boolean | Yes | Onboarding completion status flag |
extended | Record<string, any> | undefined | No | Extensible 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique variable document identifier (format: var_<codebaseId><context><timestamp>) |
codebaseId | string | Yes | Parent codebase ID |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
context | string | Yes | Context 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique workspace identifier (format: workspace_<name>_<orgId>) |
orgId | string | Yes | Organization ID for multi-tenant data isolation |
userId | string | Yes | User ID of workspace creator |
name | string | Yes | Workspace name (kebab-case, unique within org) |
title | string | Yes | Human-readable workspace title for display |
description | string | Yes | Workspace purpose and description |
tags | string[] | undefined | No | Tags for organization and filtering |
status | "active" | "archived" | "paused" | Yes | Workspace status |
createdAt | string | Yes | ISO 8601 timestamp when workspace was created |
updatedAt | string | Yes | ISO 8601 timestamp when workspace was last updated |
archivedAt | string | undefined | No | ISO 8601 timestamp when workspace was archived (only when status='archived') |
archived | boolean | Yes | Flag for soft delete |
extended | Record<string, any> | undefined | No | Extensible 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"; } | undefined | No | Optional extensible metadata |
ParsedMention
Mention Parser Utility
Extracts
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
identifier | string | Yes | The handle without the @ symbol |
position | number | Yes | Character position where the @ starts |
AgentLookupEntry
Lookup entry for agent/user resolution
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
teamMemberId | string | Yes | |
isAgent | boolean | Yes |
ApprovalFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
projectId | string | undefined | No | |
milestoneId | string | undefined | No | |
status | "pending" | "approved" | "rejected" | "needs-revision" | undefined | No | |
type | "action" | "document" | undefined | No | |
category | "spec" | "steering" | undefined | No | |
userId | string | undefined | No |
CreateApprovalInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
milestoneId | string | undefined | No | |
title | string | Yes | |
type | "action" | "document" | Yes | |
category | "spec" | "steering" | Yes | |
categoryName | string | Yes | |
documentType | string | undefined | No | |
documentContent | string | undefined | No | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes |
UpdateApprovalInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<ApprovalModel> | Yes |
AttributeFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
entityType | string | undefined | No | |
type | string | undefined | No | |
userId | string | undefined | No | |
archived | boolean | undefined | No |
CreateAttributeInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
title | string | Yes | |
description | string | undefined | No | |
color | string | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | undefined | No | |
entityType | string | Yes | |
type | string | Yes | |
sortOrder | number | undefined | No | |
popularity | number | undefined | No | |
metadata | Record<string, any> | undefined | No |
UpdateAttributeInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<AttributeModel> | Yes |
BusinessPlanFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
status | "draft" | "active" | "archived" | undefined | No | |
planType | "startup" | "growth" | "pivot" | "annual" | undefined | No | |
archived | boolean | undefined | No |
CreateBusinessPlanInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
title | string | Yes | |
description | string | undefined | No | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
status | "draft" | "active" | "archived" | undefined | No | |
planType | "startup" | "growth" | "pivot" | "annual" | Yes | |
missionStatement | string | undefined | No | |
visionStatement | string | undefined | No | |
targetMarket | string | undefined | No | |
problemStatement | string | undefined | No | |
solutionSummary | string | undefined | No | |
revenueModel | string | undefined | No | |
competitiveAdvantage | string | undefined | No | |
timeframeMonths | number | undefined | No | |
startDate | string | undefined | No | |
endDate | string | undefined | No |
UpdateBusinessPlanInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<BusinessPlanModel> | Yes |
ClientFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
archived | boolean | undefined | No |
CreateClientInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
company | string | Yes | |
email | string | Yes | |
phone | string | Yes | |
address | string | Yes | |
primaryContactId | string | undefined | No | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes |
UpdateClientInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<ClientModel> | Yes |
CodebaseFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
status | "active" | "archived" | "paused" | undefined | No | |
archived | boolean | undefined | No |
CreateCodebaseInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | |
orgId | string | Yes | |
userId | string | Yes | |
name | string | Yes | |
title | string | Yes | |
description | string | Yes | |
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; }; } | undefined | No | |
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[]; } | undefined | No | |
tags | string[] | undefined | No | |
metadata | { [key: string]: any; monorepo: boolean; languages?: string[]; frameworks?: string[]; testFramework?: string; codeStyle?: string; docsUrl?: string; } | undefined | No |
UpdateCodebaseInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<CodebaseModel> | Yes |
CompetitorFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
businessPlanId | string | undefined | No | |
threatLevel | "low" | "medium" | "high" | undefined | No | |
archived | boolean | undefined | No |
CreateCompetitorInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
description | string | undefined | No | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
businessPlanId | string | Yes | |
website | string | undefined | No | |
pricing | string | undefined | No | |
marketShare | string | undefined | No | |
threatLevel | "low" | "medium" | "high" | Yes |
UpdateCompetitorInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<CompetitorModel> | Yes |
ContactFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
archived | boolean | undefined | No | |
company | string | undefined | No |
CreateContactInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
firstName | string | Yes | |
lastName | string | Yes | |
email | string | Yes | |
phone | string | Yes | |
company | string | Yes | |
title | string | Yes | |
address | string | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes |
UpdateContactInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<ContactModel> | Yes |
ConversationFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
provider | "anthropic" | "openai" | "lmstudio" | undefined | No |
CreateConversationInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
title | string | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
provider | "anthropic" | "openai" | "lmstudio" | Yes | |
model | string | Yes | |
settings | import("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/index").ConversationSettings | Yes |
UpdateConversationInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<ConversationModel> | Yes |
DiscussionFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
entityType | string | undefined | No | |
entityId | string | undefined | No | |
parentId | string | undefined | No | |
isDeleted | boolean | undefined | No |
CreateDiscussionInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
content | string | Yes | |
entityType | string | Yes | |
entityId | string | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
userName | string | Yes | |
userAvatar | string | undefined | No | |
parentId | string | undefined | No | |
contentHtml | string | undefined | No | |
metadata | Record<string, any> | undefined | No |
UpdateDiscussionInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<DiscussionModel> | Yes |
DocumentFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
projectId | string | undefined | No | |
milestoneId | string | undefined | No | |
taskId | string | undefined | No | |
documentType | "product" | "steering" | "tech" | "structure" | "markdown" | "filetree" | "note" | undefined | No | |
approved | boolean | undefined | No |
CreateDocumentInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
title | string | Yes | |
content | string | Yes | |
orgId | string | Yes | |
userId | string | Yes | |
documentType | "product" | "steering" | "tech" | "structure" | "markdown" | "filetree" | "note" | Yes | |
workspaceId | string | undefined | No | |
projectId | string | undefined | No | |
milestoneId | string | undefined | No | |
taskId | string | undefined | No | |
metadata | { [key: string]: any; templateVersion?: string; scope?: "organization" | "workspace" | "project" | "milestone" | "task"; } | undefined | No |
UpdateDocumentInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<DocumentModel> | Yes |
FinAccountFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
budgetId | string | undefined | No | |
is_deleted | boolean | undefined | No | |
type | string | undefined | No | |
on_budget | boolean | undefined | No | |
closed | boolean | undefined | No |
CreateFinAccountInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
type | AccountType | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
budget_id | string | Yes | |
on_budget | boolean | Yes | |
closed | boolean | Yes | |
balance | number | Yes | |
cleared_balance | number | Yes | |
uncleared_balance | number | Yes | |
direct_import_linked | boolean | undefined | No | |
direct_import_in_error | boolean | undefined | No | |
note | string | null | undefined | No | |
transfer_payee_id | string | undefined | No | |
debt_original_balance | number | null | undefined | No |
UpdateFinAccountInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<FinAccountModel> | Yes |
FinBudgetFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
trashed | boolean | undefined | No |
CreateFinBudgetInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
first_month | string | Yes | |
last_month | string | Yes | |
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; }[] | undefined | No |
UpdateFinBudgetInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<BudgetModel> | Yes |
FinCategoryFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
category_group_id | string | undefined | No | |
is_deleted | boolean | undefined | No | |
hidden | boolean | undefined | No | |
goal_type | string | null | undefined | No |
CreateFinCategoryInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
category_group_id | string | Yes | |
category_group_name | string | undefined | No | |
hidden | boolean | Yes | |
budgeted | number | Yes | |
activity | number | Yes | |
balance | number | Yes | |
note | string | null | undefined | No | |
goal_type | "TB" | "TBD" | "MF" | "NEED" | "DEBT" | null | undefined | No |
UpdateFinCategoryInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<FinCategoryModel> | Yes |
FinIncomeStatementFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
budgetId | string | undefined | No | |
isArchived | boolean | undefined | No | |
isDefault | boolean | undefined | No |
CreateFinIncomeStatementInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
budgetId | string | Yes | |
period | StatementPeriod | Yes | |
description | string | undefined | No | |
linkedStatements | LinkedStatementRef[] | undefined | No | |
incomeCategories | string[] | undefined | No | |
expenseCategories | string[] | undefined | No | |
assetAccounts | string[] | undefined | No | |
liabilityAccounts | string[] | undefined | No | |
isDefault | boolean | undefined | No | |
status | "draft" | "active" | "archived" | undefined | No | Wizard status: draft = incomplete, active = ready to use |
wizardStep | number | undefined | No | Current wizard step (1-6) for resuming setup |
wizardCompletedSteps | number[] | undefined | No | Array of completed wizard step numbers |
ynabBudgetId | string | undefined | No | YNAB budget ID if imported from YNAB |
UpdateFinIncomeStatementInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<FinIncomeStatementModel> | Yes |
FinScheduledTransactionFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
account_id | string | undefined | No | |
category_id | string | undefined | No | |
is_deleted | boolean | undefined | No | |
frequency | import("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/types").ScheduledTransactionFrequency | undefined | No |
CreateFinScheduledTransactionInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
account_id | string | Yes | |
account_name | string | Yes | |
date_first | string | Yes | |
date_next | string | Yes | |
frequency | import("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/types").ScheduledTransactionFrequency | Yes | |
amount | number | Yes | |
memo | string | null | undefined | No | |
flag_color | TransactionFlagColor | undefined | No | |
payee_id | string | null | undefined | No | |
payee_name | string | null | undefined | No | |
category_id | string | null | undefined | No | |
category_name | string | null | undefined | No |
UpdateFinScheduledTransactionInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<FinScheduledTransactionModel> | Yes |
FinTransactionFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
account_id | string | undefined | No | |
category_id | string | undefined | No | |
is_deleted | boolean | undefined | No | |
approved | boolean | undefined | No | |
cleared | "cleared" | "uncleared" | "reconciled" | undefined | No |
CreateFinTransactionInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
account_id | string | Yes | |
account_name | string | Yes | |
date | string | Yes | |
amount | number | Yes | |
memo | string | null | undefined | No | |
cleared | "cleared" | "uncleared" | "reconciled" | undefined | No | |
approved | boolean | undefined | No | |
payee_id | string | null | undefined | No | |
payee_name | string | null | undefined | No | |
category_id | string | null | undefined | No | |
category_name | string | null | undefined | No |
UpdateFinTransactionInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<FinTransactionModel> | Yes |
FlowFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
flowType | "custom" | "database-schema" | "process-flow" | "agent-flow" | undefined | No | |
projectId | string | undefined | No |
CreateFlowInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
description | string | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
flowType | "custom" | "database-schema" | "process-flow" | "agent-flow" | Yes | |
nodes | any[] | undefined | No | |
edges | any[] | undefined | No | |
viewport | { x: number; y: number; zoom: number; } | undefined | No | |
metadata | { tags?: string[]; projectId?: string; version?: string; } | undefined | No |
UpdateFlowInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<FlowModel> | Yes |
GoalFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
userId | string | undefined | No | |
completed | boolean | undefined | No | |
archived | boolean | undefined | No | |
priority | "1" | "2" | "3" | "4" | "5" | undefined | No |
CreateGoalInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
title | string | Yes | |
description | string | Yes | |
orgId | string | Yes | |
userId | string | Yes | |
priority | "1" | "2" | "3" | "4" | "5" | Yes | |
dueDate | string | Yes | |
progressMode | import("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/index").GoalProgressMode | undefined | No | Optional progress mode, defaults to 'manual' |
status | import("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/index").GoalStatus | undefined | No | Optional status, defaults to 'Not Started' |
metrics | import("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/index").GoalMetric[] | undefined | No | Optional metrics array |
targetDate | string | undefined | No | Optional target date |
currentProgress | number | undefined | No | Optional current progress (0-100) |
parentGoalId | string | undefined | No | Optional parent goal ID for hierarchical goals |
category | import("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/index").GoalCategory | undefined | No | Optional category |
workspaceId | string | undefined | No | Optional workspace ID |
UpdateGoalInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<GoalModel> | Yes |
InitiativeFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | undefined | No | |
workspaceId | string | undefined | No | |
roadmapId | string | undefined | No | |
status | "In Progress" | "Backlog" | "Planned" | "Done" | undefined | No |
CreateInitiativeInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
roadmapId | string | Yes | |
name | string | Yes | |
quarter | string | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
description | string | undefined | No | |
status | "In Progress" | "Backlog" | "Planned" | "Done" | undefined | No | |
priority | string | undefined | No | |
color | string | undefined | No | |
projectIds | string[] | undefined | No | |
order | number | undefined | No |
UpdateInitiativeInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<InitiativeModel> | Yes |
MarketAnalysisFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
businessPlanId | string | undefined | No | |
archived | boolean | undefined | No |
CreateMarketAnalysisInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
title | string | Yes | |
description | string | undefined | No | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
businessPlanId | string | Yes |
UpdateMarketAnalysisInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<MarketAnalysisModel> | Yes |
MessageFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
conversationId | string | Yes | |
role | "user" | "assistant" | "system" | undefined | No |
CreateMessageInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
conversationId | string | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
role | "user" | "assistant" | "system" | Yes | |
content | string | Yes | |
toolCalls | ToolCall[] | undefined | No | |
metadata | import("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/index").MessageMetadata | undefined | No |
UpdateMessageInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<MessageModel> | Yes |
MilestoneFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | undefined | No | Organization ID (optional - omit for cross-org queries in "View All" mode) |
workspaceId | string | undefined | No | Filter by workspace ID |
userId | string | undefined | No | Filter by user ID |
projectId | string | undefined | No | Filter by project ID |
goalId | string | undefined | No | Filter by goal ID |
completed | boolean | undefined | No | Filter by completion state |
archived | boolean | undefined | No | Filter by archived state (default: false) |
CreateMilestoneInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Milestone name (kebab-case) |
title | string | Yes | Milestone title |
description | string | Yes | Milestone description |
orgId | string | Yes | Organization ID |
userId | string | Yes | User ID of milestone creator |
workspaceId | string | Yes | Workspace ID |
projectId | string | Yes | Parent project ID |
goalId | string | Yes | Parent goal ID |
startAt | string | undefined | No | Optional planned start date (ISO 8601) |
startedAt | string | undefined | No | Optional actual start date (ISO 8601) |
dueAt | string | undefined | No | Optional due date (ISO 8601) |
completedAt | string | undefined | No | Optional completion date (ISO 8601) |
timeBudgetHours | number | undefined | No | Optional time budget in hours |
categoryId | string | undefined | No | Optional category ID |
tagIds | string[] | undefined | No | Optional tag IDs |
UpdateMilestoneInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Milestone ID to update |
updates | Partial<MilestoneModel> | Yes | Partial milestone data to update |
OpportunityFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
clientId | string | undefined | No | |
completed | boolean | undefined | No | |
archived | boolean | undefined | No |
CreateOpportunityInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
title | string | Yes | |
description | string | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
clientId | string | Yes |
UpdateOpportunityInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<OpportunityModel> | Yes |
OrgFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
userId | string | undefined | No | Filter by user ID (owner) |
archived | boolean | undefined | No | Filter by archived state (default: false) |
CreateOrgInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Organization name |
description | string | Yes | Organization description |
userId | string | Yes | User ID of organization creator/owner |
UpdateOrgInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Org ID to update |
updates | Partial<OrgModel> | Yes | Partial org data to update |
ProcessExecutionFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | undefined | No | Organization ID (optional - omit for cross-org queries in "View All" mode) |
workspaceId | string | undefined | No | Filter by workspace ID |
userId | string | undefined | No | Filter by user ID |
processId | string | undefined | No | Filter by process ID |
status | ProcessExecutionStatus | undefined | No | Filter by execution status |
archived | boolean | undefined | No | Filter by archived state (default: false) |
correlationId | string | undefined | No | Filter by correlation ID |
externalId | string | undefined | No | Filter by external ID |
CreateProcessExecutionInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
processId | string | Yes | Process ID to execute |
processVersion | string | Yes | Process version at time of execution |
orgId | string | Yes | Organization ID |
userId | string | Yes | User ID who owns this execution |
workspaceId | string | Yes | Workspace ID |
inputs | Record<string, unknown> | Yes | Input data for the process |
context | ExecutionContext | Yes | Execution context |
maxRetries | number | undefined | No | Maximum retries (defaults to 3) |
correlationId | string | undefined | No | Correlation ID for tracking |
externalId | string | undefined | No | External ID |
metadata | ProcessExecutionMetadata | undefined | No | Metadata |
UpdateProcessExecutionInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Execution ID to update |
updates | Partial<ProcessExecutionModel> | Yes | Partial execution data to update |
RecordStepExecutionInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
executionId | string | Yes | Execution ID |
stepRecord | StepExecutionRecord | Yes | Step execution record |
ProcessFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | undefined | No | Organization ID (optional - omit for cross-org queries in "View All" mode) |
workspaceId | string | undefined | No | Filter by workspace ID |
userId | string | undefined | No | Filter by user ID |
status | ProcessStatus | undefined | No | Filter by status |
category | ProcessCategory | undefined | No | Filter by category |
archived | boolean | undefined | No | Filter by archived state (default: false) |
documentId | string | undefined | No | Filter by document ID |
name | string | undefined | No | Filter by name (exact match) |
CreateProcessInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Process name (kebab-case) |
title | string | Yes | Process title |
description | string | Yes | Process description |
orgId | string | Yes | Organization ID |
userId | string | Yes | User ID of process creator |
workspaceId | string | Yes | Workspace ID |
category | ProcessCategory | Yes | Process category |
version | string | undefined | No | Initial version (defaults to '1.0.0') |
status | ProcessStatus | undefined | No | Initial status (defaults to 'draft') |
inputSchema | ProcessSchema | undefined | No | Input schema |
outputSchema | ProcessSchema | undefined | No | Output schema |
trigger | ProcessTrigger | undefined | No | Trigger configuration |
statistics | ProcessStatistics | undefined | No | Statistics configuration |
tagIds | string[] | undefined | No | Tag IDs |
documentId | string | undefined | No | Document ID |
flowId | string | undefined | No | Flow ID |
metadata | ProcessMetadata | undefined | No | Metadata |
UpdateProcessInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Process ID to update |
updates | Partial<ProcessModel> | Yes | Partial process data to update |
ProcessStepFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | undefined | No | Organization ID (optional - omit for cross-org queries in "View All" mode) |
workspaceId | string | undefined | No | Filter by workspace ID |
userId | string | undefined | No | Filter by user ID |
processId | string | undefined | No | Filter by process ID |
stepType | ProcessStepType | undefined | No | Filter by step type |
enabled | boolean | undefined | No | Filter by enabled state |
archived | boolean | undefined | No | Filter by archived state (default: false) |
CreateProcessStepInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Step name (kebab-case) |
title | string | Yes | Step title |
description | string | Yes | Step description |
orgId | string | Yes | Organization ID |
userId | string | Yes | User ID of step creator |
workspaceId | string | Yes | Workspace ID |
processId | string | Yes | Parent process ID |
stepType | ProcessStepType | Yes | Step type |
order | number | Yes | Execution order |
action | StepAction | undefined | No | Action configuration |
conditions | StepCondition[] | undefined | No | Conditions for decision steps |
nextStepId | string | undefined | No | Default next step ID |
outputs | StepOutput[] | undefined | No | Output mappings |
inputs | Record<string, unknown> | undefined | No | Input mappings |
position | StepPosition | undefined | No | Visual position |
style | { backgroundColor?: string; borderColor?: string; textColor?: string; width?: number; height?: number; } | undefined | No | Custom style |
icon | string | undefined | No | Icon identifier |
optional | boolean | undefined | No | Whether step is optional |
estimatedDurationMinutes | number | undefined | No | Estimated duration in minutes |
metadata | ProcessStepMetadata | undefined | No | Metadata |
UpdateProcessStepInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Step ID to update |
updates | Partial<ProcessStepModel> | Yes | Partial step data to update |
ProductFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | undefined | No | Organization scope |
workspaceId | string | undefined | No | Workspace scope |
userId | string | undefined | No | Owner user |
type | ProductType | undefined | No | Product type filter |
phases | ProductPhase[] | undefined | No | Lifecycle phases to include |
archived | boolean | undefined | No | Include archived products when true |
CreateProductInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
type | ProductType | Yes | |
orgId | string | Yes | |
userId | string | Yes | |
workspaceId | string | Yes | |
slug | string | undefined | No | |
description | string | undefined | No | |
icon | string | undefined | No | |
color | string | undefined | No | |
problemStatement | string | undefined | No | |
valueProposition | string | undefined | No | |
targetMarket | string[] | undefined | No | |
customerPersona | string | undefined | No | |
competitiveLandscape | string | undefined | No | |
kpis | unknown[] | undefined | No | |
metadata | Record<string, unknown> | undefined | No |
UpdateProductInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<ProductModel> | Yes |
ProjectFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | undefined | No | Organization ID (optional - omit for cross-org queries in "View All" mode) |
userId | string | undefined | No | Filter by user ID |
goalId | string | undefined | No | Filter by goal ID |
workspaceId | string | undefined | No | Filter by workspace ID |
codebaseId | string | undefined | No | Filter by codebase ID |
categoryId | string | undefined | No | Filter by category ID |
completed | boolean | undefined | No | Filter by completion state |
archived | boolean | undefined | No | Filter by archived state (default: false) |
CreateProjectInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Project name (kebab-case) |
title | string | Yes | Project title |
description | string | Yes | Project description |
orgId | string | Yes | Organization ID |
userId | string | Yes | User ID of project creator |
goalId | string | Yes | Parent goal ID |
workspaceId | string | undefined | No | Optional workspace ID |
codebaseId | string | undefined | No | Optional codebase ID |
categoryId | string | undefined | No | Optional category ID |
tagIds | string[] | undefined | No | Optional tag IDs |
startAt | string | undefined | No | Optional planned start date (ISO 8601) |
startedAt | string | undefined | No | Optional actual start date (ISO 8601) |
dueAt | string | undefined | No | Optional due date (ISO 8601) |
completedAt | string | undefined | No | Optional completion date (ISO 8601) |
timeBudgetHours | number | undefined | No | Optional time budget in hours |
metadata | any | No | Optional MCP and spec tracking metadata |
UpdateProjectInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Project ID to update |
updates | Partial<ProjectModel> | Yes | Partial project data to update |
RoadmapFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | undefined | No | Organization ID (optional to allow cross-org queries when omitted) |
workspaceId | string | undefined | No | Workspace scope |
productId | string | undefined | No | Product the roadmap belongs to |
userId | string | undefined | No | Owner user ID |
CreateRoadmapInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
productId | string | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
startQuarter | string | undefined | No | |
endQuarter | string | undefined | No |
UpdateRoadmapInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<RoadmapModel> | Yes |
SessionFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
codebaseId | string | undefined | No | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
archived | boolean | undefined | No |
CreateSessionInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
userId | string | Yes | |
codebaseId | string | Yes | |
workspaceId | string | Yes | |
projectId | string | undefined | No | |
context | SessionContext | Yes | |
expiresAt | string | undefined | No |
UpdateSessionInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<SessionModel> | Yes |
TaskFilters
Task query filters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | undefined | No | Organization ID (required for multi-tenancy) |
userId | string | undefined | No | Filter by user ID |
workspaceId | string | undefined | No | Filter by workspace ID |
projectId | string | undefined | No | Filter by project ID |
milestoneId | string | undefined | No | Filter by milestone ID |
parentTaskId | string | undefined | No | Filter by parent task ID for subtasks |
excludeSubtasks | boolean | undefined | No | Exclude subtasks (tasks with parentTaskId) - set to true to only show top-level tasks |
status | "In Progress" | "Complete" | "To Do" | "On Hold" | "Blocked" | undefined | No | Filter by task status |
completed | boolean | undefined | No | Filter by completion state |
archived | boolean | undefined | No | Filter by archived state (default: false) |
CreateTaskInput
Task creation input
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Task title |
description | string | Yes | Task description |
orgId | string | Yes | Organization ID |
userId | string | Yes | User ID who created the task |
workspaceId | string | Yes | Parent workspace ID (required - all tasks belong to a workspace) |
projectId | string | undefined | No | Optional parent project ID (tasks can exist at workspace level) |
milestoneId | string | undefined | No | Optional parent milestone ID (tasks can exist at project level) |
parentTaskId | string | undefined | No | Optional parent task ID for creating subtasks |
status | "In Progress" | "Complete" | "To Do" | "On Hold" | "Blocked" | undefined | No | Optional task status (default: 'To Do') |
startAt | string | undefined | No | Optional scheduled start date |
dueAt | string | undefined | No | Optional due date |
type | "habit" | "todo" | undefined | No | Optional task type (default: 'todo') |
categoryId | string | undefined | No | Optional category ID |
tagIds | string[] | undefined | No | Optional tag IDs |
timeBudgetHours | number | undefined | No | Optional time budget in hours |
startedAt | string | undefined | No | Optional start date |
completedAt | string | undefined | No | Optional completion date |
isRecurring | boolean | undefined | No | Optional recurrence flag |
recurrenceRule | string | undefined | No | Optional recurrence rule |
parentRecurrenceId | string | undefined | No | Optional parent recurrence ID |
recurrenceInstanceDate | string | undefined | No | Optional recurrence instance date |
UpdateTaskInput
Task update input
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Task ID to update |
updates | Partial<TaskModel> | Yes | Partial task data to update |
TemplateFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | undefined | No | |
templateType | "project" | "milestone" | "task" | "product" | "tech" | "structure" | "requirements" | "design" | "tasks" | undefined | No | |
isDefault | boolean | undefined | No | |
category | "spec" | "steering" | undefined | No |
CreateTemplateInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
templateType | "project" | "milestone" | "task" | "product" | "tech" | "structure" | "requirements" | "design" | "tasks" | Yes | |
name | string | Yes | |
content | string | Yes | |
version | string | Yes | |
isDefault | boolean | Yes | |
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | undefined | No | |
metadata | { [key: string]: any; description?: string; language?: string; category?: "spec" | "steering" | import("/Users/sthornock/code/epic/epic-flowstate/packages/db-collections/src/index").TemplateCategory; } | undefined | No |
UpdateTemplateInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<TemplateModel> | Yes |
TimeEntryFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | Organization ID (required for multi-tenancy) |
workspaceId | string | undefined | No | Workspace ID for multi-tenant filtering |
userId | string | undefined | No | Filter by user ID |
taskId | string | undefined | No | Filter 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. | |||
categoryId | string | undefined | No | Filter by category ID |
archived | boolean | undefined | No | Filter by archived state (default: false) |
CreateTimeEntryInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Time entry name/label |
start | string | Yes | ISO 8601 start timestamp |
end | string | Yes | ISO 8601 end timestamp |
orgId | string | Yes | Organization ID |
workspaceId | string | Yes | Workspace ID for multi-tenant filtering |
userId | string | Yes | User ID who performed the work |
taskId | string | Yes | Entity 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. | |||
categoryId | string | undefined | No | Optional category ID |
tagIds | string[] | undefined | No | Optional tag IDs |
UpdateTimeEntryInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | TimeEntry ID to update |
updates | Partial<TimeEntryModel> | Yes | Partial time entry data to update |
UserFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
email | string | undefined | No | |
onboarded | boolean | undefined | No | |
archived | boolean | undefined | No |
CreateUserInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
email | string | Yes | |
orgId | string | Yes | |
onboarded | boolean | undefined | No | |
authUserId | string | undefined | No |
UpdateUserInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<UserModel> | Yes |
VariablesFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
codebaseId | string | undefined | No | |
context | string | undefined | No | |
archived | boolean | undefined | No |
CreateVariablesInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
codebaseId | string | Yes | |
orgId | string | Yes | |
context | string | Yes | |
variables | Record<string, string> | Yes | |
metadata | { [key: string]: any; label?: string; description?: string; source?: string; importedAt?: string; lastModifiedBy?: string; } | undefined | No |
UpdateVariablesInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
updates | Partial<VariablesModel> | Yes |
WorkspaceFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | undefined | No | Organization ID (optional - omit for cross-org queries in "View All" mode) |
userId | string | undefined | No | Filter by user ID |
status | "active" | "archived" | "paused" | undefined | No | Filter by workspace status |
archived | boolean | undefined | No | Filter by archived state (default: false) |
CreateWorkspaceInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Workspace name (kebab-case) |
title | string | Yes | Workspace title |
description | string | Yes | Workspace description |
orgId | string | Yes | Organization ID |
userId | string | Yes | User ID of workspace creator |
status | "active" | "archived" | "paused" | undefined | No | Optional workspace status (default: 'active') |
tags | string[] | undefined | No | Optional tags |
UpdateWorkspaceInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Workspace ID to update |
updates | Partial<WorkspaceModel> | Yes | Partial workspace data to update |
MutationState
Mutation state tracking
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
data | T | null | Yes | Result data from successful mutation |
isLoading | boolean | Yes | True while mutation is executing |
error | Error | null | Yes | Error object if mutation failed, null otherwise |
MutationOptions
Mutation operator configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
mutationFn | (collection: RxCollection, variables: TVariables) => Promise<TData> | Yes | Function that performs the mutation on the collection |
onSuccess | ((data: TData, variables: TVariables) => void | Promise<void>) | undefined | No | Optional callback invoked on successful mutation |
onError | ((error: Error, variables: TVariables) => void | Promise<void>) | undefined | No | Optional callback invoked on mutation error |
QueryOptions
Options for configuring a query operation
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
selector | import("/Users/sthornock/code/epic/epic-flowstate/node_modules/rxdb/dist/types/index").MangoQuerySelector<T> | undefined | Yes | MangoQuery selector for filtering documents |
sort | import("/Users/sthornock/code/epic/epic-flowstate/node_modules/rxdb/dist/types/index").MangoQuerySortPart<T>[] | undefined | No | Sort order for results |
limit | number | undefined | No | Maximum number of documents to return |
skip | number | undefined | No | Number 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:
| Property | Type | Required | Description |
|---|---|---|---|
data | T[] | Yes | Array of documents matching the query |
| Documents are automatically converted to JSON (not RxDB documents) | |||
isLoading | boolean | Yes | Whether the query is currently loading |
error | Error | null | Yes | Error 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:
| Property | Type | Required | Description |
|---|---|---|---|
data | T | null | Yes | Data returned by the mutation |
| Null if mutation hasn't completed or failed | |||
isLoading | boolean | Yes | Whether the mutation is currently executing |
error | Error | null | Yes | Error 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:
| Property | Type | Required | Description |
|---|---|---|---|
mutationFn | (collection: RxCollection, variables: TVariables) => Promise<TData> | Yes | Function that performs the mutation operation |
onSuccess | ((data: TData, variables: TVariables) => void | Promise<void>) | undefined | No | Callback invoked when the mutation succeeds |
onError | ((error: Error, variables: TVariables) => void | Promise<void>) | undefined | No | Callback 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:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | Organization ID for multi-tenant isolation (required) |
userId | string | undefined | No | User ID filter (optional - for user-scoped queries) |
trashed | boolean | undefined | No | Soft 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:
| Property | Type | Required | Description |
|---|---|---|---|
workspaceId | string | undefined | No | Workspace ID filter (highest hierarchy level) |
projectId | string | undefined | No | Project ID filter (second hierarchy level) |
milestoneId | string | undefined | No | Milestone ID filter (third hierarchy level) |
StatusFilters
Status-based filters for workflow state
Common across Tasks, Projects, Milestones, and other workflow entities.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
status | string | string[] | undefined | No | Task/item status filter |
completed | boolean | undefined | No | Completion flag filter |
archived | boolean | undefined | No | Archive/soft-delete flag filter |
TimeFilters
Time-based filters for date range queries
All timestamps should be ISO 8601 strings for consistency with RxDB.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
createdAfter | string | undefined | No | Filter for items created after this timestamp |
createdBefore | string | undefined | No | Filter for items created before this timestamp |
updatedAfter | string | undefined | No | Filter for items updated after this timestamp |
updatedBefore | string | undefined | No | Filter for items updated before this timestamp |
dueAfter | string | undefined | No | Filter for items due after this timestamp |
dueBefore | string | undefined | No | Filter 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:
| Property | Type | Required | Description |
|---|---|---|---|
field | string | Yes | Field to sort by |
direction | "asc" | "desc" | Yes | Sort direction |
PaginationOptions
Pagination options for query results
Use for implementing infinite scroll or page-based navigation.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
limit | number | undefined | No | Maximum number of results to return |
skip | number | undefined | No | Number 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:
| Property | Type | Required | Description |
|---|---|---|---|
base | BaseFilters | Yes | Base filters (orgId, userId, trashed) |
hierarchy | HierarchyFilters | undefined | No | Hierarchy filters (workspaceId, projectId, milestoneId) |
status | StatusFilters | undefined | No | Status filters (status, completed, archived) |
time | TimeFilters | undefined | No | Time-based filters (createdAfter, dueAt, etc.) |
custom | Record<string, any> | undefined | No | Custom field filters (key-value pairs) |
sort | SortOptions | SortOptions[] | undefined | No | Sort configuration |
pagination | PaginationOptions | undefined | No | Pagination configuration |
IndexSelection
Index selection result
Indicates which composite index should be used for optimal query performance.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
indexField | string | Yes | The field that will be used as the index prefix |
level | "project" | "milestone" | "workspace" | "org" | Yes | The hierarchy level being queried |
confidence | number | Yes | Confidence 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:
| Property | Type | Required | Description |
|---|---|---|---|
isOptimal | boolean | Yes | Whether the query is using an optimal index |
indexUsed | string | Yes | The index being used |
suggestions | string[] | undefined | No | Suggestions for improving query performance |
performanceImpact | "low" | "medium" | "high" | undefined | No | Estimated performance impact (low, medium, high) |
UseApprovalsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseApprovalsResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
approvals | ApprovalModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseApprovalResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
approval | ApprovalModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseAttributesOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseAttributesResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
attributes | AttributeModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseAttributeResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
attribute | AttributeModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseBusinessPlansOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseBusinessPlansResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
businessPlans | BusinessPlanModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseBusinessPlanResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
businessPlan | BusinessPlanModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseClientsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseClientsResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
clients | ClientModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseClientResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
client | ClientModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseCodebasesOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseCodebasesResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
codebases | CodebaseModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseCodebaseResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
codebase | CodebaseModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseCompetitorsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseCompetitorsResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
competitors | CompetitorModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseCompetitorResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
competitor | CompetitorModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseContactsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseContactsResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
contacts | ContactModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseContactResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
contact | ContactModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseConversationsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseConversationsResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
conversations | ConversationModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseConversationResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
conversation | ConversationModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseDiscussionsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseDiscussionsResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
discussions | DiscussionModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseDiscussionResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
discussion | DiscussionModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseDocumentsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseDocumentsResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
documents | DocumentModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseDocumentResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
document | DocumentModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseFinAccountsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseFinAccountsResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
accounts | FinAccountModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseFinAccountResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
account | FinAccountModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseFinBudgetsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseFinBudgetsResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
budgets | BudgetModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseFinBudgetResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
budget | BudgetModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseFinCategoriesOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseFinCategoriesResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
categories | FinCategoryModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseFinCategoryResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
category | FinCategoryModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseFinIncomeStatementsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseFinIncomeStatementsResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
incomeStatements | FinIncomeStatementModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseFinIncomeStatementResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
incomeStatement | FinIncomeStatementModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseFinScheduledTransactionsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseFinScheduledTransactionsResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
scheduledTransactions | FinScheduledTransactionModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseFinScheduledTransactionResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
transaction | FinScheduledTransactionModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseFinTransactionsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseFinTransactionsResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
transactions | FinTransactionModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseFinTransactionResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
transaction | FinTransactionModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseFlowsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseFlowsResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
flows | FlowModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseFlowResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
flow | FlowModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseGoalsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseGoalsResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
goals | GoalModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseGoalResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
goal | GoalModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseInitiativesOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseInitiativesResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
initiatives | InitiativeModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseMarketAnalysesOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseMarketAnalysesResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
marketAnalyses | MarketAnalysisModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseMarketAnalysisResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
marketAnalysis | MarketAnalysisModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseMessagesOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseMessagesResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
messages | MessageModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseMessageResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
message | MessageModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseMilestonesOptions
Query options for useMilestones hook
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | Sort field name (default: 'createdAt') |
limit | number | undefined | No | Maximum number of milestones to return |
skip | number | undefined | No | Number of milestones to skip |
UseMilestonesResult
Return type for useMilestones hook
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
milestones | MilestoneModel[] | Yes | Array of milestone documents |
isLoading | boolean | Yes | True while loading initial data |
error | Error | null | Yes | Error object if query failed |
UseMilestoneResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
milestone | MilestoneModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseMutationResult
Return type for useMutation hook
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
mutate | (variables: TVariables) => void | Yes | Execute mutation with variables |
mutateAsync | (variables: TVariables) => Promise<TData> | Yes | Execute mutation with variables and return Promise |
isLoading | boolean | Yes | True while mutation is executing |
error | Error | null | Yes | Error object if mutation failed |
data | TData | null | Yes | Result data from successful mutation |
reset | () => void | Yes | Reset mutation state to initial values |
UseOpportunitiesOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseOpportunitiesResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
opportunities | OpportunityModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseOpportunityResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
opportunity | OpportunityModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseOrgsOptions
Query options for useOrgs hook
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | Sort field name (default: 'createdAt') |
limit | number | undefined | No | Maximum number of orgs to return |
skip | number | undefined | No | Number of orgs to skip |
UseOrgsResult
Return type for useOrgs hook
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgs | OrgModel[] | Yes | Array of org documents |
isLoading | boolean | Yes | True while loading initial data |
error | Error | null | Yes | Error object if query failed |
UseOrgResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
org | OrgModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseProductsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | Sort field (default: createdAt) |
limit | number | undefined | No | Max items |
skip | number | undefined | No | Skip count |
UseProductsResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
products | ProductModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseProjectsOptions
Query options for useProjects hook
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | Sort field name (default: 'createdAt') |
limit | number | undefined | No | Maximum number of projects to return |
skip | number | undefined | No | Number of projects to skip |
UseProjectsResult
Return type for useProjects hook
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
projects | ProjectModel[] | Yes | Array of project documents |
isLoading | boolean | Yes | True while loading initial data |
error | Error | null | Yes | Error object if query failed |
UseProjectResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
project | ProjectModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseRoadmapsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseRoadmapsResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
roadmaps | RoadmapModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseRoadmapResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
roadmap | RoadmapModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseSessionsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseSessionsResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sessions | SessionModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseSessionResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
session | SessionModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseTasksOptions
Query options for useTasks hook
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | Sort field name (default: 'createdAt') |
limit | number | undefined | No | Maximum number of tasks to return |
skip | number | undefined | No | Number of tasks to skip |
UseTasksResult
Return type for useTasks hook
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
tasks | TaskModel[] | Yes | Array of task documents |
isLoading | boolean | Yes | True while loading initial data |
error | Error | null | Yes | Error object if query failed |
UseTaskResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
task | TaskModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseTemplatesOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseTemplatesResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
templates | TemplateModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseTemplateResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
template | TemplateModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseTimeEntriesOptions
Query options for useTimeEntries hook
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | Sort field name (default: 'start') |
limit | number | undefined | No | Maximum number of time entries to return |
skip | number | undefined | No | Number of time entries to skip |
UseTimeEntriesResult
Return type for useTimeEntries hook
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
timeEntries | TimeEntryModel[] | Yes | Array of time entry documents |
isLoading | boolean | Yes | True while loading initial data |
error | Error | null | Yes | Error object if query failed |
UseTimeEntryResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
entry | TimeEntryModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseUsersOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseUsersResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
users | UserModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseUserResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
user | UserModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseVariablesOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
UseVariablesResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
variables | VariablesModel[] | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseVariableResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
variable | VariablesModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |
UseWorkspacesOptions
Query options for useWorkspaces hook
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sort | string | undefined | No | Sort field name (default: 'createdAt') |
limit | number | undefined | No | Maximum number of workspaces to return |
skip | number | undefined | No | Number of workspaces to skip |
UseWorkspacesResult
Return type for useWorkspaces hook
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
workspaces | WorkspaceModel[] | Yes | Array of workspace documents |
isLoading | boolean | Yes | True while loading initial data |
error | Error | null | Yes | Error object if query failed |
UseWorkspaceResult
Return type for useWorkspace hook
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
workspace | WorkspaceModel | null | Yes | |
isLoading | boolean | Yes | |
error | Error | null | Yes |