import type { VpnConnection } from '@heroku/types/3.sdk'; import type { ResourceCtx } from '../../../core/extend-resource.js'; import type { Poller } from '../../../utils/poller.js'; import type { VpnConnectionOptions } from './index.js'; export declare class VpnConnectionFailedError extends Error { readonly id = "vpn_connection_failed"; constructor(vpnConnection: VpnConnection); } export declare class VpnConnectionNotReadyError extends Error { readonly timeoutMs: number; readonly id = "vpn_connection_not_ready"; constructor(vpnConnection: VpnConnection, timeoutMs: number); } export type WaitForActiveOptions = VpnConnectionOptions & { /** * Delay between polls in milliseconds. * Defaults to 10000 (10s) */ intervalMs?: number; /** * Fires `poller.onStart` immediately before polling begins * and `poller.onStop` once the connection becomes active. */ poller?: Poller; /** * Wall-clock budget in milliseconds before {@link VpnConnectionNotReadyError} * is thrown. Defaults to 1200000 (20 minutes) */ timeoutMs?: number; }; /** * Poll `vpnConnection.info` until the connection's `status` is `active`, * then return it. * * If `status` becomes `failed`, throws {@link VpnConnectionFailedError}. * On exceeding `timeoutMs` without reaching `active` or `failed`, throws * {@link VpnConnectionNotReadyError}. */ export declare function waitForActive(ctx: Pick, spaceIdentity: string, vpnConnectionIdentity: string, options?: WaitForActiveOptions): Promise;