Skip to content

API reference / Common / UDocOutcome

Type Alias: UDocOutcome ​

ts
type UDocOutcome = 
  | {
  image: ImageOutcome;
}
  | {
  portable: PortableOutcome;
}
  | {
  presentation: PresentationOutcome;
}
  | {
  spreadsheet: SpreadsheetOutcome;
}
  | {
  wordprocessing: WordprocessingOutcome;
};

Top-level outcome of an executed command — a format-agnostic enum over the per-doc-type outcomes, mirroring [UDocCommand]: what the command did, as UDocSession::execute reports it — what it inserted, deleted, reordered and changed, the ids it minted, where text landed — never a selection.

Serialize makes it the host-facing wire form, externally tagged by doc type like [UDocCommand] — a slide created reads {"presentation":{"slideEdited":{"outcome":{"slidesInserted":{"ids":["…"]}}}}}. A host reads it and never sends it back, so it has no Deserialize.