import type { Space, SpaceNat } from '@heroku/types/3.sdk'; import type { ResourceCtx } from '../../../core/extend-resource.js'; import type { WaitForAllocatedOptions } from './types.js'; export type SpaceWithNat = Space & { /** * The space's NAT info, attached when `options.includeNat` is set and * the fetch succeeds. Left `undefined` if `includeNat` was not * requested, or if the NAT fetch failed (soft-failure). */ nat?: SpaceNat; }; /** * Poll `space.info` until the space's `state` is no longer `allocating`, * then return it. * * If the terminal state is not `allocated` (e.g. `deleting`), throws * `SpaceNotAllocatedError`. On exceeding `timeoutMs` without reaching a * terminal state, throws `SpaceNotReadyError`. * * Each poll uses the SDK default `Accept: version=3.sdk` with * `Accept-Expansion: region` to match the existing CLI behaviour. * * When `options.includeNat` is true and the space becomes allocated, * also fetches `spaceNat.info` and attaches it as `nat` on the result. * That fetch is soft-failure: if it rejects, `nat` is left `undefined` * rather than failing the wait. A caller abort during the fetch is the * exception — it is re-thrown rather than swallowed. */ export declare function waitForAllocated(ctx: Pick, name: string, options?: WaitForAllocatedOptions): Promise;