/**
* Content Plan Builder - Type Definitions
*
* Types for the generic content-to-Asana project plan builder.
*/
/**
* Creativity level for AI generation
*/
export type CreativityLevel = 'conservative' | 'balanced' | 'expansive';
/**
* Output format options
*/
export type OutputFormat = 'detailed' | 'compact' | 'both';
/**
* Input type classification
*/
export type InputType = 'text' | 'file' | 'transcript' | 'meeting_notes';
/**
* A single input to the plan generator
*/
export interface ContentPlanInput {
/** Type of input content */
type: InputType;
/** Raw text content, or file path for file inputs */
content: string;
/** Original filename (for file inputs) */
fileName?: string;
/** MIME type (for file inputs) */
mimeType?: string;
}
/**
* Options for plan generation
*/
export interface ContentPlanOptions {
/** Array of inputs to process */
inputs: ContentPlanInput[];
/** Additional context to include in generation */
knowledgeBaseContext?: string;
/** Name for the generated project */
projectName?: string;
/** Creativity level for AI generation */
creativity?: CreativityLevel;
/** Output format preference */
outputFormat?: OutputFormat;
/** Whether to create the project in Asana */
createInAsana?: boolean;
/** Asana personal access token */
asanaAccessToken?: string;
/** Asana team GID for new project */
asanaTeamGid?: string;
/** Add tasks to existing project instead of creating new */
targetProjectGid?: string;
}
/**
* A subtask within a top-level task
*/
export interface ContentPlanSubtask {
/** Subtask name */
name: string;
/** Detailed description (3+ sentences) */
description: string;
/** Generic role assignment */
assignedTo: string;
/** Time estimate (e.g., "2 weeks", "3 days") */
estimate: string;
/** Dependency reference (task name or "N/A") */
blockedBy: string;
}
/**
* A top-level task with subtasks
*/
export interface ContentPlanTask {
/** Task name */
name: string;
/** Task description */
description: string;
/** Generic role assignment */
assignedTo: string;
/** Time estimate */
estimate: string;
/** Dependency reference (task name or "N/A") */
blockedBy: string;
/** Subtasks (5-10 per top-level task) */
subtasks: ContentPlanSubtask[];
}
/**
* Complete generated project plan
*/
export interface ContentProjectPlan {
/** Project goal (3-5 sentences) */
projectGoal: string;
/** Top-level tasks (exactly 5) */
topLevelTasks: ContentPlanTask[];
/** Key data points and metrics */
keyDataPoints: string[];
/** Keywords and phrases capturing main themes */
keywordsAndPhrases: string[];
/** Thought-provoking questions for the team */
questionsAndExercises: string[];
/** SMART goals (exactly 5) */
smartGoals: string[];
/** Additional reference materials needed */
additionalMaterials: string[];
/** Optional notes */
notes?: string;
}
/**
* Compact output format for easy import
*/
export interface CompactTaskOutput {
/** Sequential index */
index: number;
/** Parent task name */
'Parent-task': string;
/** Subtask name */
'Sub-Task': string;
/** Task description */
'Task Description': string;
/** Assigned role */
Assignee: string;
/** Time estimate */
'Estimated Time': string;
/** Related data point */
'Statistical-Data': string;
/** Related keywords */
'Keywords-Phrases': string;
/** Related question */
'Questions-Exercises': string;
/** Related goal */
Goals: string;
/** Role assignment */
Role: string;
/** Dependencies */
Dependencies: string;
}
/**
* Result of plan generation
*/
export interface PlanGenerationResult {
/** Status of generation */
status: 'success' | 'error';
/** Error message if failed */
error?: string;
/** Generated project plan */
plan?: ContentProjectPlan;
/** Detailed output format */
detailed?: ContentProjectPlan;
/** Compact output format */
compact?: CompactTaskOutput[];
/** Summary statistics */
summary?: {
totalTopLevelTasks: number;
totalSubtasks: number;
totalSmartGoals: number;
totalKeyDataPoints: number;
};
/** Asana creation result */
asanaResult?: AsanaCreationResult;
}
/**
* Result of Asana project creation
*/
export interface AsanaCreationResult {
/** Creation status */
status: 'success' | 'error';
/** Error message if failed */
error?: string;
/** Created project GID */
projectGid?: string;
/** Project URL in Asana */
projectUrl?: string;
/** Number of tasks created */
totalTasksCreated?: number;
/** Mapping of task names to GIDs */
taskMapping?: Record<string, string>;
}
/**
* Parsed document content
*/
export interface ParsedDocument {
/** Extracted text content */
text: string;
/** Original filename */
fileName: string;
/** Document type */
type: 'pdf' | 'docx' | 'txt' | 'md' | 'html' | 'csv' | 'json';
/** Number of pages (for PDF) */
pageCount?: number;
/** Any extraction warnings */
warnings?: string[];
}