import type { ManagementApiClient } from "@prisma/management-api-sdk"; import { Result } from "better-result"; import type { BuildStrategy } from "./build-strategy.ts"; import type { DeployInteraction, DeployProgress, DestroyAppProgress, DestroyDeploymentInteraction, DestroyDeploymentProgress, PromoteProgress, UpdateEnvProgress } from "./callbacks.ts"; import { type ApiRequestError, type DeployError, type DestroyAppError, type DestroyDeploymentError, type PromoteError, type UpdateEnvError } from "./errors.ts"; import type { AppDetail, AppInfo, CreateProjectResult, DeploymentDetail, DeploymentInfo, PortMapping, ProjectInfo, ResolvedConfig } from "./types.ts"; export interface DeployOptions { strategy: BuildStrategy; projectId?: string; appId?: string; appName?: string; region?: string; envVars?: Record; portMapping?: PortMapping; timeoutSeconds?: number; pollIntervalMs?: number; signal?: AbortSignal; interaction?: DeployInteraction; progress?: DeployProgress; skipPromote?: boolean; destroyOldDeployment?: boolean; } export interface UpdateEnvOptions { projectId?: string; appId?: string; envVars?: Record; portMapping?: PortMapping; timeoutSeconds?: number; pollIntervalMs?: number; signal?: AbortSignal; interaction?: DeployInteraction; progress?: UpdateEnvProgress; } export interface DestroyDeploymentOptions { deploymentId?: string; appId?: string; projectId?: string; timeoutSeconds?: number; pollIntervalMs?: number; signal?: AbortSignal; interaction?: DestroyDeploymentInteraction; progress?: DestroyDeploymentProgress; } export interface DestroyAppOptions { appId: string; keepApp?: boolean; timeoutSeconds?: number; pollIntervalMs?: number; signal?: AbortSignal; progress?: DestroyAppProgress; } export interface ListAppsOptions { projectId: string; signal?: AbortSignal; } export interface CreateAppOptions { projectId: string; appName: string; region: string; signal?: AbortSignal; } export interface ShowAppOptions { appId: string; signal?: AbortSignal; } export interface DeleteAppOptions { appId: string; signal?: AbortSignal; } export interface CreateProjectOptions { name: string; createDatabase?: boolean; region?: string; signal?: AbortSignal; } export interface ListProjectsOptions { signal?: AbortSignal; } export interface ListDeploymentsOptions { appId: string; signal?: AbortSignal; } export interface ShowDeploymentOptions { deploymentId: string; signal?: AbortSignal; } export interface StartDeploymentOptions { deploymentId: string; signal?: AbortSignal; } export interface StopDeploymentOptions { deploymentId: string; signal?: AbortSignal; } export interface DeleteDeploymentOptions { deploymentId: string; signal?: AbortSignal; } export interface PromoteOptions { appId: string; deploymentId?: string; timeoutSeconds?: number; pollIntervalMs?: number; signal?: AbortSignal; interaction?: DestroyDeploymentInteraction; progress?: PromoteProgress; } export interface DeployResult { projectId: string; appId: string; appName: string; region: string; deploymentId: string; deploymentEndpointDomain: string; appEndpointDomain: string | null; promoted: boolean; previousDeploymentId: string | null; previousDeploymentAction: "stopped" | "destroyed" | "still-active" | null; resolvedConfig: ResolvedConfig; } export interface PromoteResult { appId: string; deploymentId: string; appEndpointDomain: string; deploymentStarted: boolean; } export interface UpdateEnvResult { projectId: string; appId: string; deploymentId: string; deploymentUrl: string; resolvedConfig: ResolvedConfig; } export interface DestroyDeploymentResult { deploymentId: string; previousStatus: string; stopped: boolean; deleted: boolean; } export interface DestroyAppResult { appId: string; deletedDeploymentIds: string[]; appDeleted: boolean; } export declare class ComputeClient { #private; constructor(managementApiClient: ManagementApiClient); deploy(options: DeployOptions): Promise>; updateEnv(options: UpdateEnvOptions): Promise>; destroyDeployment(options: DestroyDeploymentOptions): Promise>; destroyApp(options: DestroyAppOptions): Promise>; createProject(options: CreateProjectOptions): Promise>; listProjects(options?: ListProjectsOptions): Promise>; listApps(options: ListAppsOptions): Promise>; createApp(options: CreateAppOptions): Promise>; showApp(options: ShowAppOptions): Promise>; deleteApp(options: DeleteAppOptions): Promise>; listDeployments(options: ListDeploymentsOptions): Promise>; showDeployment(options: ShowDeploymentOptions): Promise>; startDeployment(options: StartDeploymentOptions): Promise>; stopDeployment(options: StopDeploymentOptions): Promise>; deleteDeployment(options: DeleteDeploymentOptions): Promise>; promote(options: PromoteOptions): Promise>; } //# sourceMappingURL=compute-client.d.ts.map