Skip to content

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.

amendedBy: string[];

The ids of the plugins that replaced the change by another one before it was applied.


change: object;

The change that was applied.

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.

id: string;

The id of the device or of the friend.

kind: "device" | "friend";

device for a device of the group, or friend for a friend.

name?: string;

The name of the device or of the friend, when it is known.

cause?: string;

The id of the change that caused this one, when this one is a follow-up or an undo.

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?: 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.

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.

editedRange: object;

The part of the new text that the edits cover.

end: number;

The position at which the covered part ends.

start: number;

The position at which the covered part begins.

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:
| "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: 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?: object[];

For an undo or a redo, the items that were left untouched.

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.

id: string;

The id of that thing.

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: "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.