import { type Result } from "@fjall/generator"; import type { ProviderAccount } from "@fjall/util/config"; import type { OrgConfig } from "../../types/config/orgConfig.js"; import type { DeployServices } from "../serviceFactory.js"; export interface ReconcileResult { providerAccounts: ProviderAccount[]; /** Account names declared in ACCOUNTS but not yet present in AWS Organizations. */ missingAccountNames: string[]; } /** * When the orgConfig providerAccounts list is empty or root-only (first-deploy * or stale sync), reconstruct the deployable account set by intersecting the * live AWS Organizations account list with the ACCOUNTS configuration file. * The ACCOUNTS file owns the accountName→environment mapping; AWS Organizations * owns account IDs. * * `workingDirectory` is the prepared repository root (a populated clone in the * worker). It MUST be passed through — `parseAccountsConfiguration` `tsImport`s * `/fjall/organisation/infrastructure.ts`, which can only * resolve `@fjall/components-infrastructure` after the clone's node_modules is * installed. */ export declare function reconcileProviderAccounts(services: DeployServices, workingDirectory: string): Promise>; /** * Merge a reconciled providerAccounts list into an existing orgConfig. * Additive by account id — the reconciler supplies entries the config is * missing, never replacing pre-existing ones. */ export declare function mergeReconciledProviderAccounts(existing: OrgConfig | undefined, reconciled: ProviderAccount[]): OrgConfig;