import { type Result, type SiteId } from '../../../../core/src/index';
import { type SiteCommandOf } from '../../../../site-commands/src/index';
import type { ManagementClient } from '../../client/management/types';
import type { LocalContent } from '../content/reader';
import type { EnvTarget } from '../helpers';
import type { ContentDiff } from '../sync/diff';
import type { SyncResult } from '../sync';
import { type CliFormSlug } from './commandKeys';
import { type CliCommandCompileBatchSuccessWithReports, type CliCommandExecutionError, type CliCommandExecutionReport, type CliCommandExecutionResult, type CliCommandValidationCompileError } from './commandRuntime';
export type CliFormCommandBatchSource = 'push_forms';
export type CliFormCommandCompileError = Readonly<{
    code: 'missing_local_form';
    slug: CliFormSlug;
    message: string;
}> | CliCommandValidationCompileError;
export type CliFormCommandCompileInput = Readonly<{
    source: CliFormCommandBatchSource;
    siteId: SiteId;
    targetEnv: EnvTarget;
    diff: Pick<ContentDiff, 'forms'>;
    local: Pick<LocalContent, 'forms'>;
}>;
export type CliFormCommandCompileSuccess = CliCommandCompileBatchSuccessWithReports<FormSiteCommandType, FormCommandReportSubject>;
export type FormSiteCommandType = 'upsertForm';
export type FormSiteCommand = SiteCommandOf<FormSiteCommandType>;
export type FormSiteCommandPlan = CliFormCommandCompileSuccess['plan'];
export type CliFormCommandExecutionError = CliCommandExecutionError<FormSiteCommandType>;
export type CliFormCommandExecutionResult = CliCommandExecutionResult<FormSiteCommandType>;
export declare const formSiteCommandTypes: readonly ["upsertForm"];
export type FormCommandSyncCounter = 'created' | 'updated';
export type FormCommandReportSubject = Readonly<{
    slug: CliFormSlug;
    counter: FormCommandSyncCounter;
}>;
export type FormCommandExecutionReport = CliCommandExecutionReport<FormCommandReportSubject>;
type FormCommandCompiledPlan = Pick<CliFormCommandCompileSuccess, 'plan' | 'reportedCommands'>;
export declare function compileFormPushCommands(input: CliFormCommandCompileInput): Result<CliFormCommandCompileSuccess, CliFormCommandCompileError>;
export declare function executeFormCommandPlan(input: Readonly<{
    client: Pick<ManagementClient, 'forms'>;
    plan: Pick<FormSiteCommandPlan, 'commands'>;
}>): Promise<CliFormCommandExecutionResult>;
export declare function executeFormCommandPlanAsReport(input: Readonly<{
    client: Pick<ManagementClient, 'forms'>;
    compiledPlan: FormCommandCompiledPlan;
    onBeforeExecute?: (commandCount: number) => void;
}>): Promise<FormCommandExecutionReport>;
export declare function formCommandCompileErrorToReport(error: CliFormCommandCompileError): FormCommandExecutionReport;
export declare function formCommandExecutionToReport(input: Readonly<{
    execution: CliFormCommandExecutionResult;
    compiledPlan: FormCommandCompiledPlan;
}>): FormCommandExecutionReport;
export declare function formCommandReportToSyncResult(report: FormCommandExecutionReport): SyncResult;
export {};
