import type { LexiconPlugin, ResourceSelector } from "../../lexicon.js"; /** * Import command options */ export interface ImportOptions { /** Path to template file */ templatePath: string; /** Output directory (defaults to ./infra/) */ output?: string; /** Force overwrite existing files */ force?: boolean; } /** * Import command result */ export interface ImportResult { /** Whether import succeeded */ success: boolean; /** Generated files */ generatedFiles: string[]; /** Warning messages */ warnings: string[]; /** Error message if failed */ error?: string; /** Detected lexicon */ lexicon?: string; } /** * Execute the import command */ export declare function importCommand(options: ImportOptions): Promise; /** * Import from an in-memory template string through a KNOWN plugin — no * detection, no JSON assumption (#1548). This is the seam * `chant import --kustomize ` drives with `kustomize build` output * through the k8s plugin's YAML parser; `importCommand` above is the same * pipeline behind file reading + JSON detection. */ export interface ContentImportOptions { /** The raw template content (YAML or JSON — the plugin's parser decides). */ content: string; /** The lexicon whose parser/generator handle it, e.g. "k8s". */ lexicon: string; output?: string; force?: boolean; } export declare function importFromContent(options: ContentImportOptions): Promise; /** * Live import options — read from a running cloud/cluster instead of a file. */ export interface LiveImportOptions { /** Environment to resolve (passed to each lexicon's exportResources). */ environment: string; /** The deployed stack to export from, for a multi-stack project (#932). When * omitted, the single-stack convention applies (the stack named after the * environment). */ stack?: string; /** Restrict to one lexicon by name (e.g. "aws", "k8s"). */ lexicon?: string; /** Output directory (defaults to ./infra/). */ output?: string; /** Force overwrite existing files. */ force?: boolean; /** Selector forwarded to the lexicon. */ selector?: ResourceSelector; /** Restrict to chant-owned resources (inert until ownership marking lands). */ owned?: boolean; /** Keep server-defaulted fields instead of stripping to declared shape. */ verbatim?: boolean; } /** * Import directly from a live environment: ask each lexicon's exportResources * for full-fidelity IR, then generate chant TypeScript from it. * * Unlike file import, the live config may contain secrets — the caller prints a * warning. Reuses the same by-category output organization as file import. */ export declare function importFromLive(options: LiveImportOptions): Promise; /** * Multi-stack live import (#932): for a project that declares `stacks` in * chant.config, import each stack from its own live CloudFormation stack * (`exportResources({ stack })`) into its own source directory (`src`). Plugins * are resolved once from the project root; each stack regenerates independently, * so a reconcile of a multi-stack project touches the right source per stack * instead of one flat import against a single env-named stack. Returns one * result per stack, in declaration order. */ export declare function importFromLiveStacks(options: Omit, stacks: Array<{ name: string; src: string; }>): Promise>; /** * Live-import core: given resolved plugins, export and generate. Split from * plugin resolution so it can be tested with fake exporters (no cloud calls). */ export declare function liveImportFromPlugins(plugins: LexiconPlugin[], options: LiveImportOptions): Promise; /** * Print import result */ export declare function printImportResult(result: ImportResult): void; //# sourceMappingURL=import.d.ts.map