import { Result } from "better-result"; import type { ApiClientError, InternalApiClient } from "./api-client.ts"; import { CancelledError, DeploymentFailedError, TimeoutError } from "./errors.ts"; export type PollOptions = { targetStatus: "running" | "stopped"; timeoutSeconds: number; pollIntervalMs: number; signal?: AbortSignal; onStatusChange?(status: string): void; }; export type PollResult = { previewDomain: string; lastStatus: string; }; export type PollError = CancelledError | TimeoutError | DeploymentFailedError | ApiClientError; /** * Polls a deployment until it reaches the target status, fails, or times out. * * Returns a Result with the preview domain on success or a typed error. */ export declare function pollDeploymentStatus(api: InternalApiClient, deploymentId: string, options: PollOptions): Promise>; //# sourceMappingURL=polling.d.ts.map