/** * Common types for service abstractions */ import type { GitStatus } from "../types/index.ts"; // ============================================================================ // Git Service Types // ============================================================================ export interface GitCommandResult { success: boolean; output?: string; error?: string; } export interface GitStatusResult extends GitStatus {} export interface SubmoduleEntry { path: string; commit: string; status: "-" | "+" | " " | "U"; } // ============================================================================ // GitHub Service Types // ============================================================================ export interface GitHubUser { login: string; name: string | null; type: "User" | "Organization"; } export interface GitHubOrg { login: string; description: string | null; } export interface GetReposOptions { type?: "all" | "owner" | "member"; sort?: "created" | "updated" | "pushed" | "full_name"; direction?: "asc" | "desc"; includeArchived?: boolean; includeForks?: boolean; includeOrgs?: boolean; } export interface CreateRepoOptions { name: string; description?: string; isPrivate?: boolean; localPath?: string; } export interface CloneOptions { useSSH?: boolean; targetDir: string; } // ============================================================================ // Progress Callback // ============================================================================ export type ProgressCallback = (completed: number, total: number) => void;