/** * AI action types for text rewriting operations. * These map to specific rewrite strategies in the GenAI service. */ export type AIAction = 'improve' | 'shorter' | 'professional' | 'friendly'; /** * Parameters for the rewriteText API. */ export interface RewriteTextParams { /** Original text to be rewritten */ originalText: string; /** Action to perform on the text */ rewriteAction: AIAction; /** Optional additional instructions for the AI */ additionalInstructions?: string; /** PConnect context for the data page call */ context: string; } /** * Result from the rewriteText API. */ export type RewriteTextResult = { success: true; rewrittenText: string; } | { success: false; errorMessage: string; };