CommittedOutcome
The change was applied. This outcome holds the change itself, the number of the revision that it produced, and the ids of the plugins that replaced it before it was applied.
Properties
Section titled “Properties”amendedBy
Section titled “amendedBy”amendedBy: string[];The ids of the plugins that replaced the change by another one before it was applied.
change
Section titled “change”change: object;The change that was applied.
author?
Section titled “author?”author?: object;Who made the change, when it was not the person who uses this device: a device of the same group, or a friend.
author.id
Section titled “author.id”id: string;The id of the device or of the friend.
author.kind
Section titled “author.kind”kind: "device" | "friend";device for a device of the group, or friend for a friend.
author.name?
Section titled “author.name?”name?: string;The name of the device or of the friend, when it is known.
cause?
Section titled “cause?”cause?: string;The id of the change that caused this one, when this one is a follow-up or an undo.
deltas
Section titled “deltas”deltas: ( | { kind: "created"; ref: { id: string; kind: | "area" | "share" | "outline" | "group" | "me" | "local" | "device" | "library" | "row" | "search" | "friend"; }; value: unknown;} | { after: Record<string, unknown>; before: Record<string, unknown>; fields: string[]; kind: "updated"; ref: { id: string; kind: | "area" | "share" | "outline" | "group" | "me" | "local" | "device" | "library" | "row" | "search" | "friend"; };} | { from: { outline: string; parent: string | null; position: string; }; kind: "moved"; row: string; to: { outline: string; parent: string | null; position: string; };} | { kind: "deleted"; ref: { id: string; kind: | "area" | "share" | "outline" | "group" | "me" | "local" | "device" | "library" | "row" | "search" | "friend"; }; value: unknown;})[];The modifications that make up the change, in the order in which they were applied.
discardable?
Section titled “discardable?”discardable?: boolean;true when the change is not a step of undo by itself, as is the case when a row is collapsed. Such a change is dropped from an undo step that contains nothing else.
edit?: object;Present when the change is the result of typing. It describes which text field was edited and how.
edit.changeInLength
Section titled “edit.changeInLength”changeInLength: number;The difference between the length of the new text and the length of the old one. It is negative when the text became shorter.
edit.editedRange
Section titled “edit.editedRange”editedRange: object;The part of the new text that the edits cover.
edit.editedRange.end
Section titled “edit.editedRange.end”end: number;The position at which the covered part ends.
edit.editedRange.start
Section titled “edit.editedRange.start”start: number;The position at which the covered part begins.
edit.field
Section titled “edit.field”field: string;The text field that was edited.
name?: string;The name of the undo step in the Undo menu, for example Delete 3 Rows. The command that started the step provides it.
origin
Section titled “origin”origin: | "User" | "Plugin" | "Automation" | "Import" | "Undo" | "Redo" | "Remote" | "OtherTab" | "Migration" | "System";Who made the change: the person, a plugin, or one of the other origins that the guide describes.
rev: number;The number of the revision of the library that this change produced.
tx: string;The id of the change.
undoGroup
Section titled “undoGroup”undoGroup: string;The id of the undo step to which the change belongs. Several changes can belong to the same step.
rev: number;The number of the revision of the library that the change produced.
skipped?
Section titled “skipped?”skipped?: object[];For an undo or a redo, the items that were left untouched.
field?
Section titled “field?”field?: string;The field that was left untouched, when only a field of the thing was skipped.
ref: object;The thing that an undo or a redo left untouched.
ref.id
Section titled “ref.id”id: string;The id of that thing.
ref.kind
Section titled “ref.kind”kind: | "area" | "share" | "outline" | "group" | "me" | "local" | "device" | "library" | "row" | "search" | "friend";The kind of thing that the reference designates: a row, an outline, an area, a search, or the library, or one of the things that concern devices and sharing (me, group, device, friend, share).
status
Section titled “status”status: "committed";Always 'committed'.
token: string;A token that identifies this change. Pass it to history.since(token) to obtain what happened after it.
tx: string;The id of the change.
