// Core configuration types
export declare interface BuddyBotConfig {
  verbose?: boolean
  repository?: {
    provider: 'github' | 'gitlab' | 'bitbucket'
    owner: string
    name: string
    baseBranch?: string
    token?: string
  }
  schedule?: {
    cron?: string
    timezone?: string
  }
  packages?: {
    strategy: 'major' | 'minor' | 'patch' | 'all'
    ignore?: string[]
    ignorePaths?: string[]
    pin?: Record<string, string>
    groups?: PackageGroup[]
    includePrerelease?: boolean
    excludeMajor?: boolean
    respectLatest?: boolean
    minimumReleaseAge?: number
    minimumReleaseAgeExclude?: string[]
  }
  maxPRsPerRun?: number
  pullRequest?: {
    commitMessageFormat?: string
    titleFormat?: string
    bodyTemplate?: string
    autoMerge?: {
      enabled: boolean
      strategy: 'merge' | 'squash' | 'rebase'
      conditions?: string[]
    }
    reviewers?: string[]
    assignees?: string[]
    labels?: string[]
  }
  releaseNotes?: {
    enabled?: boolean
    sanitizeReferences?: boolean
    maxReleases?: number
    maxBodyLength?: number
    includeCompareLinks?: boolean
  }
  workflows?: {
    enabled?: boolean
    outputDir?: string
    templates?: {
      comprehensive?: boolean
      daily?: boolean
      weekly?: boolean
      monthly?: boolean
      docker?: boolean
      monorepo?: boolean
    }
    custom?: {
      name: string
      schedule: string
      strategy?: 'major' | 'minor' | 'patch' | 'all'
      autoMerge?: boolean
      reviewers?: string[]
      assignees?: string[]
      labels?: string[]
    }[]
  }
  dashboard?: {
    enabled?: boolean
    title?: string
    bodyTemplate?: string
    labels?: string[]
    assignees?: string[]
    includePackageJson?: boolean
    includeDependencyFiles?: boolean
    includeGitHubActions?: boolean
    showOpenPRs?: boolean
    showDetectedDependencies?: boolean
    showDeprecatedDependencies?: boolean
    issueNumber?: number
  }
}
export declare interface PackageGroup {
  name: string
  patterns: string[]
  strategy?: 'major' | 'minor' | 'patch' | 'all'
}
// Package management types
export declare interface PackageFile {
  path: string
  type: 'package.json' | 'bun.lock' | 'bun.lockb' | 'package-lock.json' | 'yarn.lock' | 'pnpm-lock.yaml' | 'deps.yaml' | 'deps.yml' | 'dependencies.yaml' | 'dependencies.yml' | 'pkgx.yaml' | 'pkgx.yml' | '.deps.yaml' | '.deps.yml' | 'composer.json' | 'composer.lock' | 'github-actions' | 'Dockerfile' | 'build.zig.zon'
  content: string
  dependencies: Dependency[]
}
export declare interface Dependency {
  name: string
  currentVersion: string
  type: 'dependencies' | 'devDependencies' | 'peerDependencies' | 'optionalDependencies' | 'require' | 'require-dev' | 'github-actions' | 'docker-image' | 'zig-dependencies'
  file: string
  line?: number
  metadata?: Record<string, string>
}
export declare interface PackageUpdate {
  name: string
  currentVersion: string
  newVersion: string
  updateType: 'major' | 'minor' | 'patch'
  dependencyType: 'dependencies' | 'devDependencies' | 'peerDependencies' | 'optionalDependencies' | 'require' | 'require-dev' | 'github-actions' | 'docker-image' | 'zig-dependencies'
  file: string
  metadata?: PackageMetadata
  releaseNotesUrl?: string
  changelogUrl?: string
  homepage?: string
}
export declare interface PackageMetadata {
  name: string
  description?: string
  repository?: string
  homepage?: string
  license?: string
  author?: string | { name: string, email?: string }
  keywords?: string[]
  latestVersion: string
  versions: string[]
  weeklyDownloads?: number
  dependencies?: Record<string, string>
  devDependencies?: Record<string, string>
  peerDependencies?: Record<string, string>
}
// Git and PR types
export declare interface GitProvider {
  branchExists: (branchName: string) => Promise<boolean>
  createBranch: (branchName: string, baseBranch: string) => Promise<void>
  commitChanges: (branchName: string, message: string, files: FileChange[], baseBranch?: string) => Promise<void>
  createPullRequest: (options: PullRequestOptions) => Promise<PullRequest>
  getPullRequests: (state?: 'open' | 'closed' | 'all') => Promise<PullRequest[]>
  updatePullRequest: (prNumber: number, options: Partial<PullRequestOptions>) => Promise<PullRequest>
  closePullRequest: (prNumber: number) => Promise<void>
  createComment: (prNumber: number, comment: string) => Promise<void>
  mergePullRequest: (prNumber: number, strategy?: 'merge' | 'squash' | 'rebase') => Promise<void>
  deleteBranch: (branchName: string) => Promise<void>
  createIssue: (options: IssueOptions) => Promise<Issue>
  getIssues: (state?: 'open' | 'closed' | 'all') => Promise<Issue[]>
  updateIssue: (issueNumber: number, options: Partial<IssueOptions>) => Promise<Issue>
  closeIssue: (issueNumber: number) => Promise<void>
  unpinIssue: (issueNumber: number) => Promise<void>
}
export declare interface FileChange {
  path: string
  content: string
  type: 'create' | 'update' | 'delete'
}
export declare interface PullRequestOptions {
  title: string
  body: string
  head: string
  base: string
  draft?: boolean
  reviewers?: string[]
  teamReviewers?: string[]
  assignees?: string[]
  labels?: string[]
  milestone?: number
}
export declare interface PullRequest {
  number: number
  title: string
  body: string
  head: string
  base: string
  state: 'open' | 'closed' | 'merged'
  url: string
  createdAt: Date
  updatedAt: Date
  mergedAt?: Date
  author: string
  reviewers: string[]
  assignees: string[]
  labels: string[]
  draft: boolean
}
export declare interface IssueOptions {
  title: string
  body: string
  assignees?: string[]
  labels?: string[]
  milestone?: number
}
export declare interface Issue {
  number: number
  title: string
  body: string
  state: 'open' | 'closed'
  url: string
  createdAt: Date
  updatedAt: Date
  closedAt?: Date
  author: string
  assignees: string[]
  labels: string[]
  pinned?: boolean
}
// Update scanning and processing types
export declare interface UpdateScanResult {
  totalPackages: number
  updates: PackageUpdate[]
  groups: UpdateGroup[]
  scannedAt: Date
  duration: number
}
export declare interface UpdateGroup {
  name: string
  updates: PackageUpdate[]
  updateType: 'major' | 'minor' | 'patch'
  title: string
  body: string
}
export declare interface DashboardData {
  openPRs: PullRequest[]
  detectedDependencies: {
    packageJson: PackageFile[]
    dependencyFiles: PackageFile[]
    githubActions: PackageFile[]
  }
  deprecatedDependencies?: DeprecatedDependency[]
  repository: {
    owner: string
    name: string
    provider: string
  }
  lastUpdated: Date
}
export declare interface DeprecatedDependency {
  name: string
  currentVersion: string
  datasource: string
  file: string
  type: string
  replacementAvailable: boolean
  suggestedReplacement?: string
  deprecationMessage?: string
}
// CLI and command types
export declare interface BuddyCommand {
  name: string
  description: string
  options?: CommandOption[]
  action: (args: any) => Promise<void>
}
export declare interface CommandOption {
  name: string
  description: string
  type: 'string' | 'boolean' | 'number'
  default?: any
  required?: boolean
  alias?: string
}
// Utility types
export declare interface Logger {
  info: (message: string, ...args: any[]) => void
  warn: (message: string, ...args: any[]) => void
  error: (message: string, ...args: any[]) => void
  debug: (message: string, ...args: any[]) => void
  success: (message: string, ...args: any[]) => void
}
export declare interface VersionRange {
  raw: string
  range: string
  isExact: boolean
  satisfies: (version: string) => boolean
  getLatest: (versions: string[]) => string | null
}
export type BuddyBotOptions = Partial<BuddyBotConfig>;
// Error types
export declare class BuddyError extends Error {
  public code?: string;
  public details?: any;
  constructor(message: string, code?: string, details?: any);
}
export declare class PackageRegistryError extends BuddyError {
  public packageName?: string;
  constructor(message: string, packageName?: string);
}
export declare class GitProviderError extends BuddyError {
  public operation?: string;
  constructor(message: string, operation?: string);
}
export declare class ConfigurationError extends BuddyError {
  public configKey?: string;
  constructor(message: string, configKey?: string);
}
