/** * Domain types for the Compute SDK. */ export interface PortMapping { http?: number | null; } export interface ProjectInfo { id: string; name: string; defaultRegion?: string; } export interface DatabaseInfo { id: string; name: string; region: string; connectionString?: string; } export interface CreateProjectResult extends ProjectInfo { database?: DatabaseInfo; } export interface ServiceInfo { id: string; name: string; region: string; projectId: string; createdAt?: string; } export interface ServiceDetail extends ServiceInfo { latestVersionId?: string | null; serviceEndpointDomain?: string; } export interface VersionInfo { id: string; status: string; createdAt: string; previewDomain?: string | null; } export interface VersionDetail extends VersionInfo { envVars?: Record; foundryVersionId?: string; } export interface RegionInfo { id: string; displayName: string; } export interface ResolvedConfig { projectId: string; serviceId: string; serviceName: string; region: string; portMapping?: PortMapping; } /** Known compute region identifiers, used by the CLI for interactive prompts. */ export const KNOWN_REGION_IDS = [ "us-east-1", "us-west-1", "eu-west-3", "eu-central-1", "ap-northeast-1", "ap-southeast-1", ] as const; export const REGIONS: RegionInfo[] = KNOWN_REGION_IDS.map((id) => ({ id, displayName: id, }));