import { type Result } from "@fjall/generator"; import type { ProviderAccount } from "@fjall/util/config"; import type { DeployParams } from "../../types/params.js"; import type { OrganisationOperation } from "../../types/operations.js"; import type { DeployServices } from "../serviceFactory.js"; export interface OrgDetailsForSynth { orgId: string; /** * Absent when the deploy credentials cannot list roots — a member-account * single-component deploy. Only the Organisation stack consumes it. */ rootId?: string; managementAccountId: string; /** * Development OU id, resolved only for organisation-tier synths (the dev * isolation SCP is synthesised by the Organisation stack alone). Absent = * the org has no development OU, or the deploy path never synthesises the * org stack. */ devOuId?: string; } export declare function buildOrgContext(params: DeployParams, services: DeployServices, operation: OrganisationOperation, deployType: "organisation" | "platform" | "account", orgDetails: OrgDetailsForSynth | undefined, accountName?: string, trailLifecycle?: ProviderAccount["trailLifecycle"], targetIsOrganisationTier?: boolean): import("../../types/deployment/DeploymentTypes.js").DeploymentContext; export declare function resolveOrgDetails(services: DeployServices, abortSignal?: AbortSignal): Promise>; /** * Resolve org details for a single-component (account/platform) deploy in an * org-managed estate. Read-only and member-safe: DescribeOrganization is * callable from any account in the organisation, while ListRoots is * management-account-only — the cascade path resolves full details under * management credentials, but a standalone `deploy account` runs under the * target account's own credentials and must not require (or create) * organisation-level access. The Account and Platform stacks consume only * orgId (the exported OrganisationId output), so a best-effort rootId is * sufficient here. Resolves undefined when no organisation exists yet — the * component synthesises standalone, exactly like the solo path. */ export declare function resolveOrgDetailsForMemberComponent(services: DeployServices, abortSignal?: AbortSignal): Promise>; /** * Resolve org details for a SOLO-estate single-component deploy. Read-only — a * standalone account deploy must NEVER create an organisation (the mutating * resolveOrgDetails would CreateOrganization for an account not in an org, or * fail on AccessDenied for a standalone role that cannot DescribeOrganization). * Both outcomes resolve to `undefined`: the Account stack synthesises standalone * without org details. Returns details only when the account genuinely has a * describable, root-listable organisation. */ export declare function resolveOrgDetailsForSolo(services: DeployServices, abortSignal?: AbortSignal): Promise;