API reference / Common / Engine types / PageCommand
Type Alias: PageCommand
ts
type PageCommand =
| {
insertPage: {
index: number;
};
}
| {
deletePages: {
ids: PageId[];
};
}
| {
reorderPages: {
ids: PageId[];
to: number;
};
}
| {
duplicatePages: {
ids: PageId[];
to: number;
};
}
| {
rotatePages: {
ids: PageId[];
clockwise: boolean;
};
}
| {
resizePage: {
id: PageId;
size: Size;
};
};An edit intent on the document's pages — the EditPage wrapping it. Pages are addressed by id; ids not in the document are skipped. Where a page lands is an index into the page order. Each command commits once, so the whole command is one undo step.