import { Config } from './config'; import { ParsedDiff } from './parser'; import { ResourceProperties, TemplateResources } from './template-reader'; /** * Cloud activation of the IaCReview plan: when IACREVIEW_API_KEY is set (and no * self-hosted engine is installed), core uploads the parsed diff plus the * changed synthesized-template resources to the IaCReview API. The engine runs * server-side — cost pricing, security scan, org policies — and returns the * combined markdown, the merge verdict, and a link to the run page. Premium * logic never ships to the customer; this module is plain transport. */ export declare const DEFAULT_API_URL = "https://api.iacreview.com"; export interface EnrichEnvironment { name: string; protected: boolean; diff: ParsedDiff; completedAt: string; } export interface EnrichPayload { repo?: string; prNumber?: number; branch?: string; commit?: string; author?: string; prUrl?: string; environment?: string; environments: EnrichEnvironment[]; changedResources: ResourceProperties[]; region?: string; security?: unknown; blockOn?: unknown; } export interface EnrichResponse { runId: string; runUrl: string; verdict: 'ready' | 'review' | 'blocked'; blockReasons: string[]; markdown: string; } /** * Best-effort CI metadata for the run record ("who opened what") — never * throws: a missing variable just leaves the field blank on the dashboard. * Token-requiring lookups stay in the platform modules. */ export declare function resolveCiMeta(env?: NodeJS.ProcessEnv): Pick; /** * Match diff resources to their synthesized-template resources so the server * can price and scan exactly what changed (uploading whole templates would be * wasteful and can breach the request-size cap). Mirrors the engine's * resolveTemplate matcher: exact id → id/key prefix either way → cdk path. * Deliberately duplicated across the paywall boundary — core must stand alone. */ export declare function collectChangedResources(diffs: ParsedDiff[], templates: TemplateResources): ResourceProperties[]; export declare function buildEnrichPayload(opts: { config: Config; diff: ParsedDiff; templates: TemplateResources; envName?: string; prUrl?: string; env?: NodeJS.ProcessEnv; }): EnrichPayload; /** Upload a run to the IaCReview API and return the enriched result. */ export declare function cloudEnrich(config: Config, payload: EnrichPayload): Promise; //# sourceMappingURL=cloud-enrich.d.ts.map