import { CrowdinApi, PaginationOptions, PatchRequest, ResponseList, ResponseObject } from '../core'; /** * Advisor runs inspectors against a project and surfaces insights with metrics and recommendations. * * Use the API to run advisor checks, list and manage insights, and report insights from advisor-inspector apps. */ export declare class Advisors extends CrowdinApi { /** * @requiredScope project.advisor:write * @param projectId project identifier * @param request request body * @see https://support.crowdin.com/developer/api/v2/#tag/Advisor/operation/api.projects.advisors.checks.post */ createAdvisorCheck(projectId: number, request?: AdvisorsModel.CreateAdvisorCheckRequest): Promise>; /** * @requiredScope project.advisor:read * @param projectId project identifier * @param checkId advisor check identifier * @see https://support.crowdin.com/developer/api/v2/#tag/Advisor/operation/api.projects.advisors.checks.get */ getAdvisorCheckStatus(projectId: number, checkId: string): Promise>; /** * @requiredScope project.advisor:read * @param projectId project identifier * @param options optional pagination and filter parameters for the request * @see https://support.crowdin.com/developer/api/v2/#tag/Advisor/operation/api.projects.advisors.insights.getMany */ listAdvisorInsights(projectId: number, options?: AdvisorsModel.ListAdvisorInsightsOptions): Promise>; /** * @requiredScope project.advisor:write * @param projectId project identifier * @param insightId insight identifier * @param request request body * @see https://support.crowdin.com/developer/api/v2/#tag/Advisor/operation/api.projects.advisors.insights.patch */ editAdvisorInsight(projectId: number, insightId: number, request: PatchRequest[]): Promise>; /** * @requiredScope project.advisor:write * @param projectId project identifier * @param applicationIdentifier application identifier * @param moduleKey advisor-inspector module key * @param request request body * @see https://support.crowdin.com/developer/api/v2/#tag/Advisor/operation/api.projects.applications.modules.advisors.insights.put */ createOrUpdateApplicationAdvisorInsight(projectId: number, applicationIdentifier: string, moduleKey: string, request: AdvisorsModel.ApplicationAdvisorInsightRequest): Promise; } export declare namespace AdvisorsModel { type InsightOutcome = 'flagged' | 'clear' | 'not_applicable'; type InsightStatus = 'pending' | 'checking' | 'outdated' | 'done'; interface AiRunOptions { mode?: 'auto' | 'all'; promptId?: number; } interface CreateAdvisorCheckRequest { category?: string; inspectors?: { key: string; options?: AiRunOptions | null; }[]; } interface AdvisorCheck { identifier: string; status: string; progress: number; attributes: { category?: string | null; inspectors?: { key: string; }[] | null; }; createdAt: string; updatedAt: string; startedAt: string | null; finishedAt: string | null; } interface ListAdvisorInsightsOptions extends PaginationOptions { isDismissed?: boolean; status?: InsightStatus[]; outcome?: InsightOutcome[]; } interface InsightMetric { key: string; value: number; unit: 'percent' | 'count'; threshold?: number | null; tone?: 'default' | 'success' | 'danger'; source?: 'deterministic' | 'ai' | 'app'; checkedAt?: string | null; } interface InsightRecommendation { id: string; primary?: boolean; params?: Record; } interface AdvisorInsight { id: number; inspectorKey: string; category: string | null; isDismissed: boolean; status: InsightStatus; outcome: InsightOutcome | null; severity: 'high' | 'medium' | 'low' | null; refreshPolicy: 'hourly' | 'daily' | null; metrics: InsightMetric[] | null; recommendations: InsightRecommendation[] | null; checkedAt: string | null; lastAiRun: (AiRunOptions & { at: string; }) | null; payload: Record | null; } interface ApplicationAdvisorInsightRequest { outcome: InsightOutcome; checkedAt?: string; metrics?: InsightMetric[]; recommendations?: InsightRecommendation[]; payload?: Record; } }