import { Range } from 'semver'; export type RenovateConfigStage = | 'global' | 'repository' | 'package' | 'branch' | 'pr'; // TODO: Proper typings export interface RenovateSharedConfig { automerge?: boolean; branchName?: string; enabled?: boolean; ignoreDeps?: string[]; labels?: string[]; managers?: string | string[]; platform?: string; productLinks?: Record; rebaseStalePrs?: boolean; recreateClosed?: boolean; requiredStatusChecks?: string[]; schedule?: string | string[]; semanticCommits?: boolean; semanticCommitScope?: string; semanticCommitType?: string; statusCheckVerify?: boolean; timezone?: string; } type UpdateConfig< T extends RenovateSharedConfig = RenovateSharedConfig > = Partial>; export type RenovateRepository = | string | { repository: string; }; // TODO: Proper typings export interface RenovateConfig extends RenovateSharedConfig, UpdateConfig, Record { autodiscover?: boolean; autodiscoverFilter?: string; baseBranch?: string; baseBranches?: string[]; branchList?: string[]; description?: string[]; dryRun?: boolean; errors?: ValidationMessage[]; includeForks?: boolean; isFork?: boolean; onboarding?: boolean; onboardingConfig?: RenovateSharedConfig; packageRules?: PackageRule[]; privateKey?: string | Buffer; repoIsOnboarded?: boolean; repositories?: RenovateRepository[]; requireConfig?: boolean; warnings?: ValidationMessage[]; } export type UpdateType = | 'major' | 'minor' | 'patch' | 'pin' | 'digest' | 'lockFileMaintenance' | 'rollback' | 'bump'; // TODO: Proper typings export interface PackageRule extends RenovateSharedConfig, UpdateConfig, Record { paths?: string[]; languages?: string[]; baseBranchList?: string[]; datasources?: string[]; depTypeList?: string[]; packageNames?: string[]; packagePatterns?: string[]; excludePackageNames?: string[]; excludePackagePatterns?: string[]; matchCurrentVersion?: string | Range; sourceUrlPrefixes?: string[]; updateTypes?: UpdateType[]; } export interface ValidationMessage { depName: string; message: string; }