import { type ReportRow } from './sales.js'; interface JsonApiRow { id: string; attributes?: T; } interface AnalyticsReportAttributes { name?: string; category?: 'APP_USAGE' | 'APP_STORE_ENGAGEMENT' | 'COMMERCE' | 'FRAMEWORK_USAGE' | 'PERFORMANCE'; } export declare function selectWeeklyAnalyticsReports(reports: Array>): { engagement: JsonApiRow | undefined; downloads: JsonApiRow | undefined; purchases: JsonApiRow | undefined; }; interface WeeklyMetrics { date: string; impressions: number; productPageViews: number; downloads: number; proceeds: number; available: { engagement: boolean; downloads: boolean; purchases: boolean; }; } export declare function selectLatestInstanceRows(batches: Array<{ processingDate: string; rows: ReportRow[]; }>): ReportRow[]; export declare function buildWeeklyInsight(input: { engagement: ReportRow[]; downloads: ReportRow[]; purchases: ReportRow[]; }): { status: string; weeks: WeeklyMetrics[]; recommendation: string; current?: undefined; previous?: undefined; changes?: undefined; insight?: undefined; } | { status: string; current: WeeklyMetrics; previous: WeeklyMetrics; changes: { impressions: number | null; productPageViews: number | null; downloads: number | null; proceeds: number | null; productPageRate: number | null; downloadRate: number | null; revenuePerDownload: number | null; }; insight: { area: string; changePercent: number | null; trend: string; recommendation: string; } | { area: string; changePercent: null; recommendation: string; trend?: undefined; }; weeks?: undefined; recommendation?: undefined; }; export declare function getWeeklyInsight(input: { appId: string; createIfMissing?: boolean; confirmCreate?: boolean; }): Promise<{ status: string; message: string; nextAction: string; requestId?: undefined; } | { status: string; message: string; nextAction?: undefined; requestId?: undefined; } | { status: string; requestId: string; message: string; nextAction?: undefined; } | { status: string; weeks: WeeklyMetrics[]; recommendation: string; current?: undefined; previous?: undefined; changes?: undefined; insight?: undefined; requestId: string; reports: { engagement: string | null; downloads: string | null; purchases: string | null; }; message?: undefined; nextAction?: undefined; } | { status: string; current: WeeklyMetrics; previous: WeeklyMetrics; changes: { impressions: number | null; productPageViews: number | null; downloads: number | null; proceeds: number | null; productPageRate: number | null; downloadRate: number | null; revenuePerDownload: number | null; }; insight: { area: string; changePercent: number | null; trend: string; recommendation: string; } | { area: string; changePercent: null; recommendation: string; trend?: undefined; }; weeks?: undefined; recommendation?: undefined; requestId: string; reports: { engagement: string | null; downloads: string | null; purchases: string | null; }; message?: undefined; nextAction?: undefined; }>; export {};