import { getAuth as sdkGetAuth, OAuth as sdkOAuth, pollForToken as sdkPollForToken } from '@vercel/sandbox/dist/auth/index.js'; import type { DeviceAuthorizationRequest } from '@vercel/sandbox/dist/auth/index.js'; export interface VercelScope { teamId: string; projectId: string; } export interface ScopeConfirmationBoundary { render(scope: VercelScope): string; confirm(message: string, scope: VercelScope): boolean | Promise; } export declare function renderVercelScope(scope: VercelScope): string; export declare function confirmVercelScope(scope: VercelScope, boundary: ScopeConfirmationBoundary): Promise; export interface VercelCredentials { token: string; teamId: string; projectId: string; } export type DeviceAuthResult = string | VercelCredentials; export interface DeviceAuthContext { signal: AbortSignal; deadline?: number; } export interface DeviceAuthPrimitives { OAuth: typeof sdkOAuth; pollForToken: typeof sdkPollForToken; getAuth: typeof sdkGetAuth; } export interface CredentialResolutionOptions { repoRoot: string; env?: Record; scope?: VercelScope; deviceAuth?: (scope: VercelScope, context: DeviceAuthContext) => Promise; deviceAuthPrimitives?: Partial; onDeviceAuthorization?: (request: DeviceAuthorizationRequest) => void | Promise; signal?: AbortSignal; timeoutMs?: number; /** Absolute epoch-millisecond deadline for authentication. */ deadline?: number; } export interface StoredScopeCredentialResolutionOptions extends CredentialResolutionOptions { scope: VercelScope; } /** Resolve Vercel credentials without relying on SDK lazy authentication. */ export declare function resolveVercelCredentials(options: CredentialResolutionOptions): Promise; /** Resolve credentials for an existing record without requiring GitHub credentials. */ export declare function resolveVercelCredentialsForScope(options: StoredScopeCredentialResolutionOptions): Promise;