import type FavaLibMediator from '../../FavaLibMediator.mjs'; import Command from '../BaseCommand.mjs'; import type { DeviceId } from '../../interfaces/BrandedTypes.mjs'; import type Entry from '../../interfaces/Entry.mjs'; import { EntryId } from '../../interfaces/Entry.mjs'; export interface UpdateEntryData { entryId: EntryId; oldEntry: Entry; updatedEntry: Entry; } /** * Represents a command that when executed updates an entry in the vault. */ declare class UpdateEntryCommand extends Command { private originalEntry?; /** * Creates a new UpdateEntryCommand instance. * @inheritdoc * @param data - The data containing the entry to be updated. */ constructor(data: UpdateEntryData, id?: string, timestamp?: number, version?: string, fromRemote?: boolean, fromDeviceId?: DeviceId); /** * Executes the command to update the entry in the vault. * @inheritdoc * @throws {InvalidCommandError} If the command data is invalid. */ execute(mediator: FavaLibMediator): Promise; /** * @inheritdoc * @throws {InvalidCommandError} If the original entry is not available. */ createUndoCommand(): Command; /** * Checks the command data. * * See `AddEntryCommand` for why remote commands get the weaker tier. * @returns The reason the command is invalid, or null when it is valid. */ private invalidReason; /** * Validates the command data. * @returns True if the command data is valid, false otherwise. */ validate(): boolean; } export default UpdateEntryCommand;