vaultmd / UpdateOp
Type Alias: UpdateOp
UpdateOp = {
editByMatch: {new:string;old:string; }; } | {append:string; }
Defined in: src/notes/models/update-op.ts:5
Describes a mutation to apply to a note's body via NotesApi.updateNote. Exactly one variant must be set per call.
Union Members
Type Literal
{ editByMatch: { new: string; old: string; }; }
editByMatch
editByMatch:
object
Find-and-replace a unique substring in the note body. The frontmatter block is excluded from the search and left untouched (use NotesApi.editFrontmatter for that). The old text must match exactly once within the body — zero matches throw NO_MATCH, multiple matches throw AMBIGUOUS_MATCH.
editByMatch.new
new:
string
Replacement text for the matched substring.
editByMatch.old
old:
string
Exact substring to locate in the note body.
Type Literal
{ append: string; }
append
append:
string
Text to append verbatim to the end of the note body.