import { Context } from "../../bundler/context.js";
import { DeploymentType } from "./api.js";
export declare const CONVEX_DEPLOYMENT_VAR_NAME = "CONVEX_DEPLOYMENT";
export declare function getTargetDeploymentName(): string | null;
export declare function getConfiguredDeploymentFromEnvVar(): {
    type: "dev" | "prod" | "preview" | null;
    name: string | null;
};
export declare function stripDeploymentTypePrefix(deployment: string): string;
export declare function writeDeploymentEnvVar(ctx: Context, deploymentType: DeploymentType, deployment: {
    team: string;
    project: string;
    deploymentName: string;
}): Promise<{
    wroteToGitIgnore: boolean;
    changedDeploymentEnvVar: boolean;
}>;
export declare function eraseDeploymentEnvVar(ctx: Context): Promise<boolean>;
export declare function changesToEnvVarFile(existingFile: string | null, deploymentType: DeploymentType, { team, project, deploymentName, }: {
    team: string;
    project: string;
    deploymentName: string;
}): string | null;
export declare function changesToGitIgnore(existingFile: string | null): string | null;
export declare function getDeploymentNameFromAdminKey(): string | null;
export declare function deploymentNameFromAdminKeyOrCrash(ctx: Context, adminKey: string): Promise<string>;
export declare function isPreviewDeployKey(adminKey: string): boolean;
export declare function deploymentTypeFromAdminKey(adminKey: string): string;
export declare function getTeamAndProjectFromPreviewAdminKey(ctx: Context, adminKey: string): Promise<{
    teamSlug: string;
    projectSlug: string;
}>;
export type OnDeploymentActivityFunc = (isOffline: boolean, wasOffline: boolean) => Promise<void>;
export type CleanupDeploymentFunc = () => Promise<void>;
export type DeploymentDetails = {
    deploymentName: string;
    deploymentUrl: string;
    adminKey: string;
    onActivity: OnDeploymentActivityFunc | null;
};
//# sourceMappingURL=deployment.d.ts.map