import { VersionPolicy, type BumpType } from './VersionPolicy';
import type { RushConfigurationProject } from './RushConfigurationProject';
/**
 * This interface represents the raw version policy JSON object which allows repo
 * maintainers to define how different groups of projects will be published by Rush,
 * and how their version numbers will be determined.
 * @public
 */
export interface IVersionPolicyJson {
    policyName: string;
    definitionName: string;
    dependencies?: IVersionPolicyDependencyJson;
    exemptFromRushChange?: boolean;
    includeEmailInChangeFile?: boolean;
}
/**
 * This interface represents the raw lock-step version policy JSON object which extends the base version policy
 * with additional fields specific to lock-step versioning.
 * @public
 */
export interface ILockStepVersionJson extends IVersionPolicyJson {
    version: string;
    nextBump?: string;
    mainProject?: string;
}
/**
 * This interface represents the raw individual version policy JSON object which extends the base version policy
 * with additional fields specific to individual versioning.
 * @public
 */
export interface IIndividualVersionJson extends IVersionPolicyJson {
    lockedMajor?: number;
}
/**
 * @public
 */
export type VersionFormatForPublish = 'original' | 'exact';
/**
 * @public
 */
export type VersionFormatForCommit = 'wildcard' | 'original';
/**
 * This interface represents the `dependencies` field in a version policy JSON object,
 * allowing repo maintainers to specify how dependencies' versions should be handled
 * during publishing and committing.
 * @public
 */
export interface IVersionPolicyDependencyJson {
    versionFormatForPublish?: VersionFormatForPublish;
    versionFormatForCommit?: VersionFormatForCommit;
}
/**
 * Use this class to load and save the "common/config/rush/version-policies.json" config file.
 * This config file configures how different groups of projects will be published by Rush,
 * and how their version numbers will be determined.
 * @public
 */
export declare class VersionPolicyConfiguration {
    private static _jsonSchema;
    private _jsonFileName;
    /**
     * Gets all the version policies
     */
    readonly versionPolicies: Map<string, VersionPolicy>;
    /**
     * @internal
     */
    constructor(jsonFileName: string);
    /**
     * Validate the version policy configuration against the rush config
     */
    validate(projectsByName: ReadonlyMap<string, RushConfigurationProject>): void;
    /**
     * Gets the version policy by its name.
     * Throws error if the version policy is not found.
     * @param policyName - Name of the version policy
     */
    getVersionPolicy(policyName: string): VersionPolicy;
    /**
     * Bumps up versions for the specified version policy or all version policies
     *
     * @param versionPolicyName - version policy name
     * @param bumpType - bump type to override what policy has defined.
     * @param identifier - prerelease identifier to override what policy has defined.
     * @param shouldCommit - should save to disk
     */
    bump(versionPolicyName?: string, bumpType?: BumpType, identifier?: string, shouldCommit?: boolean): void;
    /**
     * Updates the version directly for the specified version policy
     * @param versionPolicyName - version policy name
     * @param newVersion - new version
     */
    update(versionPolicyName: string, newVersion: string, shouldCommit?: boolean): void;
    private _loadFile;
    private _saveFile;
}
//# sourceMappingURL=VersionPolicyConfiguration.d.ts.map