/** * Vercel API Utilities * * API-first integration with Vercel for deployments. * Uses Vercel REST API exclusively (no CLI required). * * Vercel API Docs: https://vercel.com/docs/rest-api */ import type { FactiiiConfig, DeployResult } from '../../../../types/index.js'; interface VercelDeployment { id: string; url: string; state: 'BUILDING' | 'READY' | 'ERROR' | 'CANCELED'; readyState: 'READY' | 'ERROR' | 'BUILDING' | 'QUEUED' | 'CANCELED'; target: 'production' | 'staging' | 'preview'; } interface DeployOptions { production?: boolean; branch?: string; commit?: string; } /** * Get VERCEL_TOKEN from vault or environment */ export declare function getVercelToken(config: FactiiiConfig, rootDir: string): Promise; /** * Get user's Vercel teams (to resolve 403 errors) */ export declare function getVercelTeams(token: string): Promise<{ id: string; name: string; slug: string; }[]>; /** * List all Vercel projects for the authenticated user/team. * If no teamId is provided and we get 403, auto-discovers teams and retries. */ export declare function listVercelProjects(token: string, teamId?: string): Promise<{ id: string; name: string; orgId?: string; }[]>; /** * Find a Vercel project by name (case-insensitive match) */ export declare function findVercelProject(token: string, projectName: string, teamId?: string): Promise<{ id: string; name: string; orgId?: string; } | null>; /** * Create a new Vercel project via API */ export declare function createVercelProject(token: string, name: string, options?: { teamId?: string; gitRepo?: string; framework?: string; }): Promise<{ id: string; name: string; orgId?: string; }>; /** * Deploy to Vercel via Create Deployment API. * * Uses POST /v13/deployments to trigger a git-based deployment. * Polls for completion and returns the result. */ export declare function deployToVercel(config: FactiiiConfig, options?: DeployOptions): Promise; /** * Get deployment status from Vercel API */ export declare function getDeploymentStatus(config: FactiiiConfig, deploymentId: string): Promise; /** * List custom domains on a Vercel project */ export declare function listProjectDomains(token: string, projectId: string, teamId?: string): Promise<{ name: string; verified: boolean; }[]>; /** * Add a custom domain to a Vercel project */ export declare function addProjectDomain(token: string, projectId: string, domain: string, teamId?: string): Promise; export {}; //# sourceMappingURL=vercel-api.d.ts.map