/** * Connected-account name generation and validation. * * A connected AWS account's display name flows into deployment target names * (`generateTargetName`) AND into CFN / profile identifiers, so the name must be * a clean slug and must NOT already carry a region short-code suffix — otherwise * the region is appended twice (`acme-widgets-prod-use2` → target `…-use2-use2`). * * Single source of truth for the default-name shape and the region-suffix guard, * shared by the webapp connect / quick-create ingress and the CLI connect screen. */ /** * Default name for a newly-connected account: `-` as a clean slug. * `stage` must be the DECODED workload stage (e.g. "production"), never a raw * wire `environment` value. An empty stage yields the org slug alone. * e.g. ("Acme.example", "production") → "acme-example-production". */ export declare function defaultConnectedAccountName(orgName: string, stage: string): string; /** * Append a short disambiguating suffix to a base account name when the base * collides with an existing account (the `-` default is taken). * e.g. ("acme-example-production", "a3f9") → "acme-example-production-a3f9". */ export declare function suffixedAccountName(base: string, shortId: string): string; /** * Every region short code an account name could be mistakenly suffixed with: * the codes `abbreviateRegion` emits today (the same derivation * `generateTargetName` appends), plus the retired ones it used to emit. * * The retired half matters because this set only ever answers "would appending * a region to this name read as a doubled region?" — and it would, for a name a * customer picked while an older Fjall was emitting the old codes. Deriving the * set from the live codes alone would quietly start accepting `acme-aps1` as an * account name the day the abbreviations changed. */ export declare const REGION_SHORT_CODES: ReadonlySet; /** * Detect a trailing region short-code segment on an account name — the shape * that doubles the region when `generateTargetName` appends its own. Returns the * offending code (e.g. "use2") or undefined. Region-agnostic: any trailing * known short code is flagged, not only the currently-selected region's, so a * `foo-usw2` name picked into us-east-1 is still caught. A region code that * appears anywhere but the final segment (`use2-team`) is intentionally allowed. */ export declare function findTrailingRegionShortCode(name: string): string | undefined; /** * User-facing rejection copy for a region-suffixed account name. Shared by the * webapp and CLI ingress so the wording cannot drift. */ export declare function regionSuffixRejectionMessage(shortCode: string): string;