import { type InboxSelfHealingItem, type SelfHealingResultUsage, type WorkflowSuggestionGraph, type SelfHealingResultDetail, type SelfHealingResultActionResponse, type WorkflowSuggestionAppliedVersion, type WorkflowSuggestionBaseline, type WorkflowSuggestionProposalDetail } from '@n8n/api-types'; import { RoleService } from '@n8n/backend-services'; import { SharedWorkflowRepository, TransactionRunner, UserRepository, type User } from '@n8n/db'; import type { SelfHealingOutput } from '@n8n/instance-ai'; import type { InboxSourceQuery } from '../../inbox/inbox-source.registry'; import { WorkflowSuggestionActionsService } from '../workflow-suggestions/workflow-suggestion-actions.service'; import { WorkflowSuggestionService } from '../workflow-suggestions/workflow-suggestion.service'; import type { SelfHealingResult } from './database/self-healing-result.entity'; import { SelfHealingConfigurationRepository } from './database/self-healing-configuration.repository'; import { SelfHealingInvestigationRepository } from './database/self-healing-investigation.repository'; import { SelfHealingResultRepository } from './database/self-healing-result.repository'; import { SelfHealingConfigurationService } from './self-healing-configuration.service'; import { SelfHealingExecutionReferenceService } from './self-healing-execution-reference.service'; export type SelfHealingResultInput = { output: SelfHealingOutput; usage: SelfHealingResultUsage; candidate?: { graph: WorkflowSuggestionGraph; }; completedAt: string; }; export declare function getSelfHealingReviewState(result: Pick, suggestion: Pick | null): SelfHealingResultDetail['reviewState']; export declare class SelfHealingResultService { private readonly results; private readonly suggestions; private readonly actions; private readonly ownership; private readonly executionReferences; private readonly txRunner; private readonly investigations; private readonly users; private readonly roles; private readonly configurations; private readonly configurationService; constructor(results: SelfHealingResultRepository, suggestions: WorkflowSuggestionService, actions: WorkflowSuggestionActionsService, ownership: SharedWorkflowRepository, executionReferences: SelfHealingExecutionReferenceService, txRunner: TransactionRunner, investigations: SelfHealingInvestigationRepository, users: UserRepository, roles: RoleService, configurations: SelfHealingConfigurationRepository, configurationService: SelfHealingConfigurationService); private getInboxAccess; listForInbox(user: User, query: InboxSourceQuery): Promise; countForInbox(user: User): Promise; complete({ investigationId, baseline, signal, ...input }: SelfHealingResultInput & { investigationId: string; baseline: WorkflowSuggestionBaseline; signal?: AbortSignal; }): Promise; private prepareResult; getDetail(user: User, projectId: string, workflowId: string, resultId: string): Promise; private toDetail; act(user: User, projectId: string, workflowId: string, resultId: string, action: WorkflowSuggestionAppliedVersion['action'], clientId?: string): Promise; dismiss(user: User, projectId: string, workflowId: string, resultId: string): Promise; private getResultForEditor; private requireCurrentProject; }