import { IBetterLogger } from "@codiac.io/codiac-common";
import { ProjectContextRepo } from "./data/cli-context-repo";
import { VersionBump } from "./LocalOps";
import { ImageExport, ProjectConfig } from "@codiac.io/codiac-relay-contracts";
/** Manages the semantic version number for image exports declared in the workspace (aka: the codiac.json).  */
export declare class WorkspaceVersioner {
    private logger;
    private projCfgRepo;
    constructor(logger: IBetterLogger, projCfgRepo: ProjectContextRepo);
    private versioner;
    /** Increments the version number of the given image export by the given increment.
     *  Retains existing version number if no increment is specified.
     *  Sets to the default init version number if the imageExport doesnt yet have a version declared.
     *  Writes changes to the project config (aka: codiac.json).
     *  Throws if existing version is invalid.
     *
     * @param cfg Project config doc (aka: codiac.json deserialized)
     */
    incrementImageVersion(imageExport: ImageExport, cfg: ProjectConfig, increment: VersionBump): Promise<ImageExport>;
    /** Increments the project code version number by the given increment.
     *  Retains existing version number if no increment is specified.
     *  Writes changes to the project config (aka: codiac.json).
     *  Throws if existing version is invalid.
     *
     * @param cfg Project config doc (aka: codiac.json deserialized)
     */
    incrementCodeVersion(cfg: ProjectConfig, increment: VersionBump): Promise<ProjectConfig>;
}
export declare class SemanticVersioner {
    private logger;
    constructor(logger: IBetterLogger);
    /** Increments the given semantic version nnumber by the given increment.
     *  Returns existing version number if no increment is specified.
     *  Throws if existing version is invalid.
     */
    incrementVersion(existing: string, increment: VersionBump): string;
    /** Prefixes the prerelease version segment
     * with the given prerelease identifier.
     *
     * using format:  `[major].[minor].[patch]-[id].[prereleaseNumber]`
     *
     * eg:  `1.2.3`  remains  `1.2.3`
     * eg:  `1.2.3-4`  becomes  `1.2.3-thisBranch.4`
     * eg:  `1.2.3-toro.4`  becomes  `1.2.3-thisBranch.4`   */
    private addPrereleaseId;
    /** Rewrites the entire semantic version with the given semantic version.
     *
     * @param version (required) Must be a valid semantic version (eg: `1.2.3` or `1.2.3-something` or `1.2.3-something.4`).
     */
    bump(change: VersionBump): string;
    /** Rewrites the entire semantic version with the given semantic version.
     *
     * @param version (required) Must be a valid semantic version (eg: `1.2.3` or `1.2.3-something` or `1.2.3-something.4`).
     */
    set(version: string): string;
    /** Increments the major number of the semantic version for the current image definition.
     *
     * That is: the term `[major]` in the version format:
     * ```
     * [major].[minor].[patch]-[prereleaseName].[prereleaseNumber]
     * ```
     *
     * eg:  `1.2.3` becomes `2.0.0`
     *
     * eg:  `1.2.3-my-branch.3` becomes `2.0.0`
     */
    major(): string;
    /** Increments the minor number of the semantic version for the current image definition.
     *
     * That is: the term `[minor]` in the version format:
     * ```
     * [major].[minor].[patch]-[prereleaseName].[prereleaseNumber]
     * ```
     *
     * eg:  `1.2.3` becomes `1.3.0`
     *
     * eg:  `1.2.3-my-branch.3` becomes `1.3.0`
     */
    minor(newValue?: boolean): string;
    /** Increments the patch number of the semantic version for the current image definition.
     *
     * That is: the term `[patch]` in the version format:
     * ```
     * [major].[minor].[patch]-[prereleaseName].[prereleaseNumber]
     * ```
     *
     * eg:  `1.2.3` becomes `1.2.4`
     *
     * eg:  `1.2.3-my-branch.3` becomes `1.2.3`
     *
     * *(note: NOT 1.2.4 because prereleases lead up to a patch release, thus the term "cut a version")*
     */
    patch(): string;
    /** Increments the prerelease of the semantic version for the current image definition.
     * Passing in an alphanumeric prerelease name
     * will prefix the number and delimit with a period (.).
     *
     * That is: the `[prereleaseName]` and `[prereleaseNumber]` terms in the version format:
     * ```
     * [major].[minor].[patch]-[prereleaseName].[prereleaseNumber]
     * ```
     *
     * eg: without providing a name...
     *
     * `1.2.3` becomes `1.2.4-0`
     *
     * `1.2.3-my-branch.3` becomes `1.2.3-my-branch.4`
     *
     * `1.2.3-my-branch` becomes `1.2.3-my-branch.0`
     *
     * eg: providing "workitem-pdq" as name...
     *
     * `1.2.3` becomes `1.2.4-workitem-pdq.0`
     *
     * `1.2.3-workitem-pdq.0` becomes `1.2.3-workitem-pdq.1`
     *
     * `1.2.3-my-branch.3` becomes `1.2.3-workitem-pdq.0`
     *
     * `1.2.3-my-branch` becomes `1.2.3-workitem-pdq.0`
     */
    prerelease(name?: string | undefined): string;
}
