import { type AltEditorLiteError } from '../alt-editor-lite-error.js'; import type { AltEditorLiteLanguage } from '../alt-editor-lite-language.js'; import type { AfterSuccessContext, BeforeSubmitContext, ClientSideOperations, EditorErrorHookContext, EditorOperations } from '../alt-editor-lite-options.js'; import type { EditorOperationTarget } from '../editor-operation.js'; import type { BatchEditPresentationAdapter } from './batch-edit-presentation-adapter.js'; import type { BatchEditCommitResult, BatchEditTransaction } from './batch-edit-transaction.js'; import type { OperationOwner, OwnedOperationRequest } from './operation-owner.js'; import type { MaybePromise } from '../../fields/field-value.js'; /** Terminal result returned to the batch dialog presentation. */ export type BatchEditOperationResult = { readonly status: 'success'; readonly result: BatchEditCommitResult; } | { readonly status: 'unchanged'; } | { readonly status: 'validation-failed'; readonly error: AltEditorLiteError; } | { readonly status: 'vetoed'; } | { readonly status: 'aborted'; } | { readonly status: 'failed'; readonly error: AltEditorLiteError; }; /** Presentation and lifecycle callbacks for one batch edit operation. */ export interface BatchEditOperationRunArguments { readonly originals: readonly Readonly[]; readonly recordTargets: readonly TTarget[]; readonly targets: readonly Readonly[]; readonly presentation: BatchEditPresentationAdapter; readonly revalidateTargets: (signal: AbortSignal) => MaybePromise; readonly commit: (rows: readonly TRow[], request: OwnedOperationRequest<'batchEdit'>) => Promise; readonly dispatchSubmit: (transaction: Readonly>) => void; readonly dispatchSuccess: (transaction: Readonly>, result: Readonly>) => void; readonly beforeSubmit?: (transaction: Readonly>, context: Extract, { readonly operation: 'batchEdit'; }>) => Promise; readonly afterSuccess?: (context: AfterSuccessContext) => Promise; readonly reportError: (error: AltEditorLiteError, context: EditorErrorHookContext, publishEvent: boolean) => void; } /** Runs non-optimistic persistence and commit for one batch edit operation. */ export declare class BatchEditOperationRunner { private readonly operationOwner; private readonly language; private readonly operations; private readonly clientSide; constructor(operationOwner: OperationOwner, language: Readonly, operations: Readonly> | undefined, clientSide: Readonly> | undefined); /** Validates, persists, and commits one common change set. */ run(runArguments: BatchEditOperationRunArguments): Promise>; private assertInputs; private updateRows; private assertCanonicalRows; private normalize; }