/**
 * OAuth Authentication Types
 *
 * Type definitions for OAuth flows with AI providers.
 */
/**
 * Built-in provider configurations (without secrets)
 */
export const OAUTH_PROVIDERS = {
    anthropic: {
        id: 'anthropic',
        name: 'Anthropic (Claude)',
        authorizationUrl: 'https://console.anthropic.com/oauth/authorize',
        tokenUrl: 'https://console.anthropic.com/oauth/token',
        userInfoUrl: 'https://api.anthropic.com/v1/me',
        scopes: ['api:read', 'api:write'],
        pkceRequired: true,
        refreshSupported: true,
    },
    openai: {
        id: 'openai',
        name: 'OpenAI (ChatGPT)',
        authorizationUrl: 'https://auth.openai.com/authorize',
        tokenUrl: 'https://auth.openai.com/oauth/token',
        userInfoUrl: 'https://api.openai.com/v1/me',
        scopes: ['openid', 'profile', 'email', 'model.read', 'model.request'],
        pkceRequired: true,
        refreshSupported: true,
    },
    google: {
        id: 'google',
        name: 'Google (Gemini)',
        authorizationUrl: 'https://accounts.google.com/o/oauth2/v2/auth',
        tokenUrl: 'https://oauth2.googleapis.com/token',
        userInfoUrl: 'https://openidconnect.googleapis.com/v1/userinfo',
        scopes: ['openid', 'email', 'profile', 'https://www.googleapis.com/auth/generative-language'],
        pkceRequired: false,
        refreshSupported: true,
    },
    github: {
        id: 'github',
        name: 'GitHub',
        authorizationUrl: 'https://github.com/login/oauth/authorize',
        tokenUrl: 'https://github.com/login/oauth/access_token',
        userInfoUrl: 'https://api.github.com/user',
        scopes: ['read:user', 'user:email'],
        pkceRequired: false,
        refreshSupported: false,
    },
};
/**
 * Default OAuth configuration
 */
export const DEFAULT_OAUTH_CONFIG = {
    storagePath: '~/.codebuddy/auth',
    encryptTokens: true,
    autoRefresh: true,
    refreshThresholdMs: 5 * 60 * 1000, // 5 minutes
    stateExpiryMs: 10 * 60 * 1000, // 10 minutes
    localServerPort: 9876,
};
//# sourceMappingURL=types.js.map