import { BunyanRecord } from "../logger/types.js";
import { GitOperationType } from "../util/git/types.js";
import { BranchCache } from "../util/cache/repository/types.js";
import { PackageFile } from "../modules/manager/types.js";
import { RenovateSplit } from "../config/types.js";
import { Attributes, SpanKind, SpanOptions } from "@opentelemetry/api";

//#region lib/instrumentation/types.d.ts
type RenovateSpanOptions = {
  attributes?: RenovateSpanAttributes;
} & SpanOptions;
type RenovateSpanAttributes = {
  [ATTR_RENOVATE_SPLIT]?: RenovateSplit;
  [ATTR_VCS_GIT_OPERATION_TYPE]?: GitOperationType;
} & Attributes;
/**
 * The instrumentation parameters.
 */
interface SpanParameters {
  /**
   * The name of the span
   */
  name: string;
  /**
   * Attributes which should be added to the span
   */
  attributes?: RenovateSpanAttributes | undefined;
  /**
   * Should this span be added to the root span or to the current active span
   */
  ignoreParentSpan?: boolean;
  /**
   * Type of span this represents. Default: SpanKind.Internal
   */
  kind?: SpanKind;
}
interface Report {
  problems: BunyanRecord[];
  repositories: Record<string, RepoReport>;
}
interface RepoReport {
  problems: BunyanRecord[];
  branches: Partial<BranchCache>[];
  packageFiles: Record<string, PackageFile[]>;
  libYearsWithStatus?: LibYearsWithStatus;
}
interface LibYearsWithStatus {
  libYears: LibYears;
  dependencyStatus: DependencyStatus;
}
interface LibYears {
  total: number;
  managers: Record<string, number>;
}
interface DependencyStatus {
  outdated: number;
  total: number;
}
declare const ATTR_RENOVATE_SPLIT = "renovate.split";
/**
 * the Git Version Control System (VCS)'s Operation Type
 *
 * @see GitOperationType
 * @see https://opentelemetry.io/docs/specs/semconv/registry/attributes/vcs/
 *
 */
declare const ATTR_VCS_GIT_OPERATION_TYPE = "vcs.git.operation.type";
/**
 * the Git Version Control System (VCS)'s subcommand
 *
 * @see https://opentelemetry.io/docs/specs/semconv/registry/attributes/vcs/
 * */
declare const ATTR_VCS_GIT_SUBCOMMAND = "vcs.git.subcommand";
//#endregion
export { ATTR_RENOVATE_SPLIT, ATTR_VCS_GIT_OPERATION_TYPE, ATTR_VCS_GIT_SUBCOMMAND, DependencyStatus, LibYears, LibYearsWithStatus, RenovateSpanAttributes, RenovateSpanOptions, Report, SpanParameters };
//# sourceMappingURL=types.d.ts.map