/** * Data Models for Full Login Feature * * Defines TypeScript interfaces for the Padua CLI login workflow including: * - Configuration schema (padua.config.json) * - Authentication service results * - Login command outcomes * - CLI command options */ import { McpLocalConfig } from '../../mcp/config/types.js'; /** * PaduaConfig - Main configuration object persisted to padua.config.json */ export interface PaduaConfig { /** Default AWS SSO profile to use if not specified via CLI flag */ defaultProfile?: string; /** Default AWS region for all service operations (default: "us-east-1") */ region?: string; /** CodeArtifact repository configuration for npm authentication */ codeartifact?: CodeArtifactConfig; /** ECR registry configuration for Docker authentication */ ecr?: EcrConfig; /** MCP daemon local settings (port, token store, logging) */ mcp?: McpLocalConfig; } /** * CodeArtifactConfig - Configuration for AWS CodeArtifact npm repository access */ export interface CodeArtifactConfig { /** CodeArtifact domain name (1-127 chars, alphanumeric with hyphens) */ domain: string; /** AWS account ID owning the CodeArtifact domain (12-digit) */ domainOwner: string; /** Repository name within the CodeArtifact domain */ repository: string; } /** * EcrConfig - Configuration for AWS ECR Docker registry access */ export interface EcrConfig { /** AWS account ID containing the ECR registry (12-digit) */ accountId: string; /** AWS region containing the ECR registry */ region: string; } /** * ServiceResult - Outcome of authenticating to a single service */ export interface ServiceResult { /** Whether authentication succeeded */ success: boolean; /** Whether this service was skipped (not attempted) */ skipped: boolean; /** Error message if authentication failed */ error?: string; /** Time in milliseconds for this authentication operation */ duration: number; } /** * LoginResult - Aggregated outcome of the full login operation */ export interface LoginResult { /** AWS SSO authentication result */ sso: ServiceResult; /** S3 MCP provider config download result */ s3Config: ServiceResult; /** CodeArtifact npm repository authentication result */ codeartifact: ServiceResult; /** ECR Docker registry authentication result */ ecr: ServiceResult; /** GitLab authentication result (stub for story-037) */ gitlab: ServiceResult; /** Atlassian authentication result (stub for story-037) */ atlassian: ServiceResult; /** Grafana service-account token authentication result */ grafana: ServiceResult; /** MCP Daemon startup result (stub for story-038) */ mcpDaemon: ServiceResult; } /** * LoginOptions - Command-line options and flags for `padua login` */ export interface LoginOptions { /** AWS SSO profile to authenticate with */ profile?: string; /** Authenticate to SSO only, skip CodeArtifact and ECR */ ssoOnly?: boolean; /** * Commander populates 'color' for the negatable `--no-color` flag (default * true, false when the flag is passed) - there is no `noColor` property. * See src/commands/seed/index.ts for the reference pattern this mirrors. */ color?: boolean; /** * Commander populates 'browser' for the negatable `--no-browser` flag * (default true, false when the flag is passed) - there is no `noBrowser` * property. Mirrors the same Commander mechanic as `color`, above. */ browser?: boolean; /** Suppress all output except errors */ quiet?: boolean; /** Enable verbose output with debugging information */ verbose?: boolean; /** List available AWS SSO profiles and exit */ listProfiles?: boolean; /** Write CodeArtifact config to project .npmrc instead of global ~/.npmrc */ local?: boolean; } /** Check if a value is a valid AWS account ID (12-digit string) */ export declare function isValidAccountId(value: string): boolean; /** Check if a value is a valid AWS region code */ export declare function isValidRegion(value: string): boolean; /** Check if a value is a valid profile name (alphanumeric, hyphens, underscores) */ export declare function isValidProfileName(value: string): boolean; /** Check if a value is a valid domain name (alphanumeric, hyphens) */ export declare function isValidDomainName(value: string): boolean; /** Check if a value is a valid repository name (lowercase alphanumeric, hyphens) */ export declare function isValidRepositoryName(value: string): boolean; /** Check if configuration has CodeArtifact configured */ export declare function hasCodeArtifactConfig(config: PaduaConfig): boolean; /** Check if configuration has ECR configured */ export declare function hasEcrConfig(config: PaduaConfig): boolean; /** Get the effective profile to use (preference order: CLI flag, env vars, config, default) */ export declare function getEffectiveProfile(options: LoginOptions, config?: PaduaConfig): string; /** Get the effective region to use (preference order: config, default) */ export declare function getEffectiveRegion(config?: PaduaConfig): string; //# sourceMappingURL=types.d.ts.map