import { type Result, type SiteId } from '../../../../core/src/index';
import { type AllowedRuntime, 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 CliContentTypeKey, type CliEntryIdentifier } from './commandKeys';
import { type CliCommandCompileBatchSuccessWithReports, type CliCommandValidationCompileError, type CliCommandExecutionError, type CliCommandExecutionReport, type CliCommandExecutionResult } from './commandRuntime';
export type CliEntryCommandBatchSource = 'push_entries' | 'merge_remote_entries';
export type CliCommandCompileError = Readonly<{
    code: 'missing_local_entry';
    contentType: CliContentTypeKey;
    identifier: CliEntryIdentifier;
    message: string;
}> | CliCommandValidationCompileError;
export type CliEntryCommandCompileInput = Readonly<{
    source: CliEntryCommandBatchSource;
    siteId: SiteId;
    targetEnv: EnvTarget;
    diff: Pick<ContentDiff, 'entries'>;
    local: Pick<LocalContent, 'entries'>;
}>;
export type CliEntryCommandCompileSuccess = CliCommandCompileBatchSuccessWithReports<EntrySiteCommandType, EntryCommandReportSubject>;
export type CliEntryCommandExecutionError = CliCommandExecutionError<EntrySiteCommandType>;
export type CliEntryCommandExecutionResult = CliCommandExecutionResult<EntrySiteCommandType>;
export type CliEntryCommandSyncInput = Readonly<{
    client: Pick<ManagementClient, 'entries'>;
    compiledPlan: EntryCommandCompiledPlan;
    onBeforeExecute?: (commandCount: number) => void;
}>;
export type EntrySiteCommandType = 'upsertContentEntry' | 'publishContentEntry' | 'unpublishContentEntry' | 'deleteContentEntry';
export type EntrySiteCommand = SiteCommandOf<EntrySiteCommandType>;
export type EntrySiteCommandPlan = CliEntryCommandCompileSuccess['plan'];
export declare const entrySiteCommandTypes: readonly ["upsertContentEntry", "publishContentEntry", "unpublishContentEntry", "deleteContentEntry"];
export type EntryCommandSyncCounter = 'created' | 'updated' | 'deleted' | 'published' | 'unpublished';
export type EntryCommandReportSubject = Readonly<{
    contentType: CliContentTypeKey;
    identifier: CliEntryIdentifier;
    counter: EntryCommandSyncCounter;
}>;
export type EntryCommandExecutionReport = CliCommandExecutionReport<EntryCommandReportSubject>;
type EntryCommandCompiledPlan = Pick<CliEntryCommandCompileSuccess, 'plan' | 'reportedCommands'>;
export declare function compileEntryPushCommands(input: CliEntryCommandCompileInput): Result<CliEntryCommandCompileSuccess, CliCommandCompileError>;
/** SDK push only distinguishes local development and remote production targets today. */
export declare function runtimeForCliTarget(targetEnv: EnvTarget): AllowedRuntime;
export declare function executeEntryCommandPlan(input: Readonly<{
    client: Pick<ManagementClient, 'entries'>;
    plan: Pick<EntrySiteCommandPlan, 'commands'>;
}>): Promise<CliEntryCommandExecutionResult>;
export declare function executeEntryCommandPlanAsSyncResult(input: CliEntryCommandSyncInput): Promise<SyncResult>;
export declare function executeEntryCommandPlanAsReport(input: CliEntryCommandSyncInput): Promise<EntryCommandExecutionReport>;
export declare function syncResultForEntryCommandCompileError(error: CliCommandCompileError): SyncResult;
export declare function entryCommandCompileErrorToReport(error: CliCommandCompileError): EntryCommandExecutionReport;
export declare function entryCommandExecutionToSyncResult(input: Readonly<{
    execution: CliEntryCommandExecutionResult;
    compiledPlan: EntryCommandCompiledPlan;
}>): SyncResult;
export declare function entryCommandExecutionToReport(input: Readonly<{
    execution: CliEntryCommandExecutionResult;
    compiledPlan: EntryCommandCompiledPlan;
}>): EntryCommandExecutionReport;
export declare function entryCommandReportToSyncResult(report: EntryCommandExecutionReport): SyncResult;
export declare function titleFromEntryData(data: Record<string, unknown>): string | undefined;
export {};
