export type EnrollmentSession = { kind: 'authorization-url'; enrollmentId: string; url: string; expiresAt: string; } | { kind: 'device-code'; enrollmentId: string; verificationUrl: string; userCode: string; pollIntervalMs: number; expiresAt: string; }; export interface EnrollmentState { enrollmentId: string; providerId: 'cloud-code' | 'codex' | 'claude-code'; ownerScope: string; pkceVerifier: string; pkceState: string; redirectUri: string; configVersion: string; createdAt: string; expiresAt: string; consumedAt?: string; cancelledAt?: string; configRef?: string; } export interface StartEnrollmentInput { configRef: string; mode: 'cli' | 'portal'; redirectUri: string; ownerScope: string; } export interface CompleteEnrollmentInput { enrollmentId: string; code: string; } export interface PreparedCredential { accountId: string; accessToken: string; refreshToken?: string; expiresAt: string; authClientConfigVersion: string; accountEmail?: string; } export interface RefreshInput { accountId: string; refreshToken?: string; credentialVersion: string; } export interface ResolvedProviderMetadata { cloudaicompanionProject?: string; cloudCodeUserAgentVersion?: string; [key: string]: unknown; } export interface AccountPublic { accountId: string; accountLabel?: string; providerId: string; status: string; createdAt: string; updatedAt: string; } export interface CredentialEnvelope { accountId: string; accessToken: string; refreshToken?: string; expiresAt: string; authClientConfigVersion: string; } export interface CompletedEnrollment { accountId: string; label: string; ownerScope: string; credential?: PreparedCredential; metadata?: ResolvedProviderMetadata; } export interface EnrollmentProvider { start(input: StartEnrollmentInput): Promise; complete(input: CompleteEnrollmentInput): Promise; resolve(credential: PreparedCredential): Promise; refresh(input: RefreshInput): Promise; waitForCallback?(enrollmentId: string): Promise; pollForCompletion?(enrollmentId: string): Promise; cancel?(enrollmentId: string): Promise; } //# sourceMappingURL=contracts.d.ts.map