This is the full developer documentation for SumOffice # > Document and spreadsheet editors inside your product, under your name. Word and Excel files stay with you: no third-party cloud, no third-party interface. Business documents still live in Word and Excel files, and some of them are not just text but working tools with formulas, macros, and data queries. Office suites are sold per seat: you cannot embed them in your product. **SumOffice is an independent office platform that embeds into your product**, under its name and inside its perimeter. SumDoc works with Word documents, SumSheet with Excel spreadsheets. The platform is not tied to Microsoft; [how to move away from it without losing files](/platform/replace-office/). ## How this is proven [Section titled “How this is proven”](#how-this-is-proven) These are not plans. Every number is taken from installed builds and checked twice: on our side against the products’ source code, and when the site is published against lists taken from the delivery itself. If even one diverges, the site is not published. **41**document session commands — all accepted by the release core **208**spreadsheet contract operations, 206 of them accepted by the core of the latest release **13**spreadsheet formats, including XLSX, XLSB, XLSM, ODS and CSV **1 000 000**rows open in the browser — scroll and see the cost of a frame **1–3 s**a two-page memo on screen in the browser; a 24-page draft with tracked changes—3–4 s. Measured on September 5, 2026 on a production node, clean profile—[open it and time it](/sumdoc/demo/) **33 MB**29 pages, 37 photos—a real government agency report opened by the same core; alongside it three more real DOCX files, up to 42 photos—[files and live sandboxes](https://sumoffice.com/#files) The document is owned by the platform’s own core: it reads the file, computes layout and formulas, keeps the edit history, and writes the result. It is not a wrapper around someone else’s editor—[what that means next to Excel](/sumsheet/atlas/). ## Try it right here [Section titled “Try it right here”](#try-it-right-here) Both editors open right on the site, with no installation: this is not a screen recording but a working program. Only you see your edits. If the demo environment is down at that moment, a screenshot and a caption saying so will appear in place of the frame. A document in SumDoc A two-page contract: headings, lists, a table with deadlines and an amount. Edit a paragraph and see what it looks like inside a third-party application. [Open the live editor →](/sumdoc/demo/) An estimate in SumSheet A spreadsheet with formulas. Change a quantity or a price—the sums, shares, and both totals recalculate on their own. [Open the live spreadsheet →](/sumsheet/demo/) ## Two engines, one embedding model [Section titled “Two engines, one embedding model”](#two-engines-one-embedding-model) The third engine—for presentations—is in development: a public beta is planned for December 2026; it cannot be downloaded yet, and PPTX compatibility, platforms, and speed are not promised. SumDoc — Word documents The document editor: opens a Word file, shows the pages, lets you edit, saves and reopens—all inside your window. Your application drives it through 41 commands, and there is no other path to the document. [SumDoc overview](/sumdoc/overview/) · [Quick start](/sumdoc/quickstart/) · [Reference](/reference/sumdoc/overview/) SumSheet — Excel spreadsheets The spreadsheet editor: formulas, edit history, reading and saving workbooks. Only what is needed right now is loaded into memory, so large workbooks open. The set of operations is the same on the desktop, in the browser, and on the server: 208 operations are described, 206 of them accepted by the core of the latest release. [SumSheet overview](/sumsheet/overview/) · [Quick start](/sumsheet/quickstart/) · [Reference](/reference/sumsheet/overview/) ## What this changes for your product [Section titled “What this changes for your product”](#what-this-changes-for-your-product) Your product, not someone else's window The user opens a document from the familiar record card. The editor appears in the same window and under the same brand; the new version goes back into your existing storage and audit perimeter. One source of truth about the document Content, formulas, history, and file writing live in the core. There is no second engine—so the document looks and calculates the same on the desktop, in the browser, and on the server. Refusal instead of silent corruption If an edit cannot be applied—the file was changed elsewhere, the sheet is protected, the operation is unsupported—a refusal with a reason arrives **before** the file changes. There is no such thing as a half-changed document. An agent works as a single transaction An AI agent takes the same path as a person: it looks, makes a plan, shows the changes, waits for approval, applies, saves, and writes to the audit log. Not clicks on someone else’s interface and not editing the file behind the editor’s back. ## Where to start: choose what you are embedding into [Section titled “Where to start: choose what you are embedding into”](#where-to-start-choose-what-you-are-embedding-into) Three paths, and they differ from the first step. Open yours—everything is step by step there, from “what to take from the delivery” to “which screen the user will see”. And if you don’t want to figure it out—[hand the task to Claude](/start/kit/), and the AI assistant will wire up the editor for you. Into a web application Your product lives in the browser. The editor opens right on your page, and the file stays within your perimeter. [Four steps →](/start/web/) Into a desktop application An accounting system, an industry platform, an add-on over 1C. The editor runs alongside your program, and the program knows about every change. [Three steps →](/start/desktop/) Into a mobile application Phone and tablet: ready-made apps in the stores, a free viewer kit for Android and iOS, and a path for editing from a phone. [The working path →](/start/mobile/) Builds are available for macOS, Windows, and Linux. On Windows, both architectures, x64 and arm64; on Linux only x86-64 so far. For macOS, SumSheet has builds for both Apple Silicon and Intel, while SumDoc is currently published only for Apple Silicon. The product is under active development, so we hand out builds on request and name the limitations of the current version along with them. What to do after receiving them—[installing SumDoc](/sumdoc/install/) and [installing SumSheet](/sumsheet/install/). ## Code examples [Section titled “Code examples”](#code-examples) Twenty-four projects are shown in full, file by file: you can see how much code each task takes. In these sheets a stand-in takes the place of the core, so look at the amount of code rather than at the numbers in the cells — the real recalculation lives in the [live spreadsheet](/sumsheet/demo/) above. * [![](/examples/sumoffice/a4-demo.png)Live SumDoc example: the editor in the browsera working document editor right on the page, and the whole project that connects it](/sumdoc/demo/) * [![](/examples/sumsheet/en/minimal.png)Minimal sheethow many lines it takes to get a working sheet](/sumsheet/examples/minimal/) * [![](/examples/sumsheet/en/ribbon.png)Sheet with the ribbonhow to add our ribbon if you need it](/sumsheet/examples/ribbon/) * [![](/examples/sumsheet/en/embedded.png)Embedding into a third-party pagewhat happens to the host page around the sheet: its font, background and scrolling](/sumsheet/examples/embedded/) * [![](/examples/sumsheet/en/stress.png)A million rowsthe cost of three gestures on a workbook at the limit — scrolling, fill-dragging and zooming: p50 and p95 frame times and calls to the core as numbers, not promises](/sumsheet/examples/stress/) * [![](/examples/sumsheet/en/crosshair.png)Crosshairhighlighting the row and column of the active cell: off by default, enabled with a property](/sumsheet/examples/crosshair/) * [![](/examples/sumsheet/en/read-only.png)Read-onlythe workbook is visible but cannot be edited: commands are grayed out with a reason rather than hidden, and editing never starts at all](/sumsheet/examples/read-only/) * [![](/examples/sumsheet/en/custom-headers.png)Custom headersthe integrator sets the row and column labels, and the header strip width is computed from that text](/sumsheet/examples/custom-headers/) * [![](/examples/sumsheet/en/no-headings.png)Sheet without header stripsthe strips are hidden with a single property, and the sheet itself takes the freed space](/sumsheet/examples/no-headings/) * [![](/examples/sumsheet/en/custom-menu.png)Custom menu itema third-party item in our menu: below the divider, under its owner’s name and with its own command — it cannot pass itself off as ours](/sumsheet/examples/custom-menu/) * [![](/examples/sumsheet/en/custom-shortcut.png)Custom keyboard shortcutthe third-party shortcut fires, while the ones taken by the sheet (Ctrl+D, Ctrl+R, F2, Shift+Space) stay with the sheet — the refusal is visible in words](/sumsheet/examples/custom-shortcut/) * [![](/examples/sumsheet/en/custom-locale.png)Custom languagea language that is not among our three is brought by the page owner: labels are translated, and anything untranslated falls back along a chain instead of disappearing](/sumsheet/examples/custom-locale/) * [![](/examples/sumsheet/en/open-bytes.png)Drop a workbook herea third-party document is opened from bytes: the shell carries the file, parsing stays behind the contract seam, and a refusal comes in the words of whoever opened it — on the showcase this is a stub that takes csv, tsv and txt and honestly refuses xlsx](/sumsheet/examples/open-bytes/) * [![](/examples/sumsheet/en/presence.png)Two people in one documenttwo frames side by side: move the selection in one and the other shows the remote cursor with a name; the screen says plainly that only windows of this browser are visible](/sumsheet/examples/presence/) * [![](/examples/sumsheet/en/driver.png)Assistants drive the sheetup to ten external participants, each in its own process: walking its own column, selecting a region and writing in a total — as intents through the same channel; a refusal of anything beyond that is visible both to it and to the person; if they were not started, the page says so](/sumsheet/examples/driver/) * [![](/examples/sumsheet/en/custom-event.png)Custom eventtwo outward extension points: onCommand delivers any intent of the surface (ours and third-party), onGesture the cost of a finished gesture as numbers](/sumsheet/examples/custom-event/) * [![](/examples/sumsheet/en/hyperlink.png)Hyperlinka link is a cell property: one core operation sets it together with the text, removes it leaving the text, and lists the links of the sheet itself](/sumsheet/examples/hyperlink/) * [![](/examples/sumsheet/en/find-replace.png)Find and replacesearch is one request, replace is two, and the first does not change the workbook: the core computes a plan of edits, and the same path as typing writes them](/sumsheet/examples/find-replace/) * [![](/examples/sumsheet/en/annotations.png)Notessix items of “Review” — one contract operation and an intent field; the text, number and normalized address are named by the core](/sumsheet/examples/annotations/) * [![](/examples/sumsheet/en/outline.png)Sheet outlineeight actions — one operation: the shell names the range, axis and action, and the core computes the levels and what to hide](/sumsheet/examples/outline/) * [![](/examples/sumsheet/en/page-breaks.png)Page layoutwhere a page break falls — the only SDK method that asks and changes nothing; printing itself is done by the host, and that is a boundary, not a gap](/sumsheet/examples/page-breaks/) * [![](/examples/sumsheet/en/protected-ranges.png)Allow editing rangessix intents of a single operation: the password goes behind the seam and never comes back — only the protection method returns](/sumsheet/examples/protected-ranges/) * [![](/examples/sumsheet/en/workbook-links.png)Workbook linksa formula computes from another workbook: the list of links, their state and the source address come from the core, and the window owner opens the workbook](/sumsheet/examples/workbook-links/) * [![](/examples/sumsheet/en/headless.png)Headlessa workbook is opened, edited and read from Node — without a single call to the DOM](/sumsheet/examples/headless/) All examples by product: [SumDoc](/sumdoc/examples/) and [SumSheet](/sumsheet/examples/). ## Where to go next [Section titled “Where to go next”](#where-to-go-next) [What you get](/platform/story/)The product formula: what you bring, what the platform does, what comes out. [Feature parity](/platform/parity/)What parity with Word and Excel means and how it is proven. [Pilot and acceptance](/platform/pilot/)A two-week plan: what is checked at each layer and what the go/no-go decision is based on. [AI tools and MCP](/start/ai/)Connect the documentation to Claude, Cursor or ChatGPT as an MCP server. [Contact us](/start/contact/)Request a pilot, join the beta, or ask a question about embedding. # Page not found > There is no such address on this site. Below are the entry points to the SumOffice documentation: products, references and how to get in touch. There is no such address here. The page may have been renamed, or the link came from an old conversation. The search at the top covers the whole documentation; the entry points are below. ## Start over [Section titled “Start over”](#start-over) * [What SumOffice is](/start/intro/) — the platform in five minutes. * [How to read this documentation](/start/how-to-read/) — reading paths for different tasks. * [Glossary](/start/glossary/) — when a term is unclear. ## Products [Section titled “Products”](#products) * [SumDoc — the DOCX document editor](/sumdoc/overview/): [installation](/sumdoc/install/), [quick start](/sumdoc/quickstart/), [reference](/reference/sumdoc/overview/). * [SumSheet — the XLSX spreadsheet processor](/sumsheet/overview/): [installation](/sumsheet/install/), [quick start](/sumsheet/quickstart/), [reference](/reference/sumsheet/overview/). ## If you are evaluating the platform [Section titled “If you are evaluating the platform”](#if-you-are-evaluating-the-platform) * [Your own office suite instead of Microsoft Office](/platform/replace-office/) — why it is needed and what it gives. * [Risks and honest boundaries](/platform/risks/) — what is not covered yet. * [Pilot and acceptance](/platform/pilot/) — how to test on your own documents. ## Did not find what you need [Section titled “Did not find what you need”](#did-not-find-what-you-need) Write to and we will point you to where it is described. If a link on this site brought you here, tell us which one: [email with a ready subject](mailto:hello@sumoffice.com?subject=documentation). # What embedding gives you that Office doesn't > Eight measurable axes where an embeddable platform gives you more than a ready-made editor, and the areas where superiority can't be claimed without testing. An advantage only matters where it can be measured. Below are eight axes where an embeddable platform gives you more than a ready-made editor, and how each claim is verified on your documents before the contract is signed. | Axis | What it gives you | How to verify it | | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Embedding as the foundation | What you get is your product, not an editor inside someone else’s environment. | Take the [evaluation kit](/start/glossary/) and embed a real document in your application within the allotted time. | | One owner of meaning | One core parses, calculates, and writes the file; there is no second formula engine or history in the interface, and the result is the same in the desktop app and in the browser. | Run the same operation in the desktop app and in the browser, and compare the content, formulas, history, and the written file. Pagination is not part of the comparison: text width is measured by the system where the core runs, and the desktop app on macOS may not match the server core on Linux. | | Refusal before mutation | An unsupported operation doesn’t corrupt the file. | Check four cases — a stale revision, sheet or document protection, read-only mode, a corrupted file — and confirm that not a single byte changed. | | Preservation as a commitment | Power Query, macros, unfamiliar markup, charts, and relationships between parts of the file survive a save. | Compare the file’s content before and after, and reopen it in a new process. | | A contract ready for agents | An agent’s work becomes manageable and verifiable. | Walk through the “preview → confirm → apply → roll back” scenario and confirm that every step is recorded. | | One layer for desktop and web | Offline work and the browser are served by one core. The path to the browser differs between the products: spreadsheets calculate right in the browser, documents use the core on the server, one process per user. | Compare the meaning of the same operations in your chosen pair of environments — [SumSheet runtimes](/sumsheet/environments/), [the SumDoc editor in the browser](/sumdoc/webhost/). | | Lifecycle and shutdown | The embedded editor runs for a long time, without leaks or hung processes. | Open and close the editor repeatedly, and confirm that no listeners, background threads, or processes are left behind. | | A capability matrix as part of the contract | Less risk of false promises and of disputes after the rollout. | An agreed matrix: formats × runtime × operations × limits. | ## Where you shouldn’t promise superiority without testing [Section titled “Where you shouldn’t promise superiority without testing”](#where-you-shouldnt-promise-superiority-without-testing) * The total number of interface features compared with mature office suites. * Full compatibility with Word and Excel in every rare edge case. * Speed superiority over other suites without an identical set of documents and an identical measurement method. * Full support for VBA and the M language without a separate compatibility matrix. * Simultaneous editing of objects and formatting by several people: co-editing is proven for text and cells (measured with five participants and 119 scenarios); objects and formatting under concurrent input are still being measured. * A ready-made server service for production load — queues, quotas, monitoring — if it isn’t part of the capability profile. How to verify this yourself Any claim in the table above can be verified on your own documents before signing a contract — the right-hand column describes exactly how. A claim that can’t be verified shouldn’t go into the contract — yours or ours. ## Next [Section titled “Next”](#next) * What exactly the product does with the file — the [SumDoc capability map](/sumdoc/capabilities/) and the [map next to Excel](/sumsheet/atlas/). * How verification on your documents works — [Pilot and acceptance](/platform/pilot/). * What’s not there yet, and how that gap is covered — [Risks and honest boundaries](/platform/risks/). # VBA, Power Query, and agents > Automation without losing control: a supported subset instead of blanket promises, a Power Query ladder, and agent work as a transaction. The most common question when moving away from Excel is “will my macros and queries come along?”. The honest answer: some will, some won’t, and the main thing is to find out before the rollout, not after. The platform is built so that what’s unsupported doesn’t break the file silently but is named explicitly, and a change can be seen before it’s applied. ## VBA [Section titled “VBA”](#vba) Full VBA compatibility isn’t promised. The supported subset runs; everything else is rejected with a clear reason — before the document changes. For documents the rule is stricter: running macros isn’t promised at all, and reading their contents is separated from running them. | Where | What’s promised | What isn’t promised | | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | | Spreadsheets (SumSheet) | VBA compatibility as a separate capability on top of the operations contract; unsupported language constructs, application calls, and attempts to cross security boundaries are rejected with a stated reason. | Full compatibility with Excel VBA — without an agreed set of workbooks, security requirements, and a matrix of supported calls. | | Documents (SumDoc) | Detecting macros and their printable strings without running them; business-logic events through the public event set and policy enforcement points. | Parsing macros into source code, running them, and an Office.js-compatible environment — without a separate agreement. | | Enterprise automation | The “inspect → propose → confirm → apply” order, role-based restrictions, protection against repeated execution, an action log. | An agent that clicks through the interface or edits the file directly. | ## Power Query and data workbooks [Section titled “Power Query and data workbooks”](#power-query-and-data-workbooks) Power Query is a strength for enterprise rollouts, but it needs to be discussed in steps, not with the single word “supported”. It’s not a full match with Excel: the declared subset works, the rest is rejected with a stated reason. * **Recognize.** Find the queries, connections, data model, and anything unsupported in the workbook. * **Preserve.** Don’t delete, on write, anything the operation doesn’t manage. * **Show.** Reveal the query structure without exposing credentials or handing over the whole workbook. * **Refresh.** Run agreed sources and transformations — within the bounds of the declared capabilities and set rules. * **Create.** Add and change queries and connections within the confirmed subset. There are contract operations for every step — 61 of them, spread across seven sections of the reference. ## Agents [Section titled “Agents”](#agents) The agent works not by clicking and not by editing the file, but through the same contract as the interface. It has stable object identifiers, a revision check before a change, policy enforcement points, a preview of the result, and the ability to confirm or roll back. A strong formula SumOffice turns automation from “a script did something to the file” into the order “intent → check → preview → confirmation → apply as one indivisible action → save and reopen → write to the log”. For enterprise rollout, this is fundamentally better than a hidden macro run that nobody knows about. ## For developers [Section titled “For developers”](#for-developers) * Macros and VBA in SumSheet — [the reference section](/reference/sumsheet/vba/). Checking SumDoc macros without running them — the `inspect-vba` command: [what else the processor does](/sumdoc/overview/#what-else-the-processor-does-besides-editing). * Power Query, 61 operations, spread across seven sections of the reference: [queries and steps](/reference/sumsheet/pq-queries/) — 13, [connectors](/reference/sumsheet/pq-connectors/) — 13, [M expressions](/reference/sumsheet/pq-expressions/) — 9, [execution and progress](/reference/sumsheet/pq-execution/) — 9, [tables from queries](/reference/sumsheet/pq-tables/) — 8, [trust and privacy](/reference/sumsheet/pq-trust/) — 6, [external mashups](/reference/sumsheet/pq-mashup/) — 3; the list with the numbers is in the [reference overview](/reference/sumsheet/overview/). * The agent’s route for documents today is the same session commands a person uses, all 41 of them: [session commands](/reference/sumdoc/session-protocol/). There’s no separate interface for the agent; it’s [only proposed](/sumdoc/host-api/). A repeated call with the same identifier isn’t executed twice. # Commercial packaging > The commercial model: units of delivery, the licensing model and prices, the key and the modes without one, partnership levels. You buy the right to embed the engine and managed compatibility, not the source code. That means a supported runtime with commitments on compatibility and updates, not a fork you would then have to maintain yourself. | Deal component | What it is | Why it matters | | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | The right to embed | The right to embed and distribute SumOffice under your brand. | The legal basis for delivering it under your own name. | | Access to the developer kit | Built packages, types, the public interface, examples, and documentation. For documents, the public contract works today; for spreadsheets, the set is still being separated from the internal contract, and its current contents are a matter of the agreement, not a default. | Integration goes through a stable contract, not internal details. | | Capability profile | A named set of features, platforms, formats, embedding methods, and limits. | This, not general phrases, is what defines the commercial promise. | | Integration package | Joint development of an adapter for your application, storage handling, and an acceptance scenario. | Reduces the risk of a failed pilot. | | Automation modules | An interface for agents, VBA compatibility, Power Query, and data connections — each with its own profile. | The base editor delivery isn’t mixed with what needs separate verification. | | Version support and commitments | The support period, security fixes, the update cadence, the compatibility period. | Enterprise rollout depends on how predictable these timelines are. | | Security package | The delivery’s component inventory, vulnerability response times, the disclosure process, file signatures, release notes. What’s already signed in the current release and what isn’t yet is listed in [Risks](/platform/risks/). | Covers the requirements of the security and procurement teams. | | Quality program | A set of documents for regression testing, sample files, speed and memory thresholds, an escalation process. | Reduces the risk of disputes after rollout. | ## Product tiers [Section titled “Product tiers”](#product-tiers) | Tier | What’s included | Who it’s for | | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | | [Evaluation kit](/start/glossary/) | The runtime, a sample application, a few sample documents, the quick start, and a list of known limitations. | For a CTO or architect running a first check. | | Limited pilot | One platform, one real working scenario, a narrowed capability profile. | Check whether the product fits and whether compatibility is good enough. | | Embedding kit | The public interface, types, a shell under your brand, adapters, and documentation. For documents, this is a contract and surface that work today; for spreadsheets, the public set is still taking shape, and its contents are fixed by the agreement — [what’s in it today](/sumsheet/embedding-api/). | A working integration into your product. | | Enterprise profile | The security package, version support and commitments, an update channel, acceptance before production use. | For enterprise customers and anyone deploying the product inside their own perimeter. | | Extended automation | Agents, the supported subset of VBA, Power Query and data connections, policy enforcement points. “Agents” means different things here: for documents, an agent uses the same commands as a person (there are 41), there is no separate interface for it, and it [only proposes](/sumdoc/host-api/); for spreadsheets, the “inspect, propose, apply” flow relies on the release’s operations, while the agent’s permissions, the audit contents, and the approval process are fixed by the pilot. | Complex data migrations, document-management, accounting, and resource-planning systems, analytical processes. | The contract’s principle Commitments aren’t defined by words like “editor”, “Excel”, or “compatibility”, but by agreed documents: the capability profile, the platform matrix, the set of acceptance documents, and the support terms. ## Licensing model [Section titled “Licensing model”](#licensing-model) The engine is licensed to the application that embeds it: not per seat, not per document, not per operation. | Stage | Terms | | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Evaluation | Free: the full engine, real files. Working in the editor is not time-limited; automated processing without a key switches to quiet mode after 60 days — [key and operating modes](#key-and-operating-modes). | | Pilot | Two weeks on your corpus with written acceptance criteria; the report stays with you either way — [Pilot and acceptance](/platform/pilot/). | | Production use | An annual license for one embedding application. Updates and engineering support with a named response time are included in the price; deployment inside your perimeter, under your brand; users aren’t counted. | | Editors as a server | Server images of SumDoc and SumSheet inside your system: evaluation is free, production use is the same annual license for the embedding application. | | A \[\[var:node.product]] node with the editors inside | 90 days at full speed, then a key: \[\[var:pricing.node-50]] per month for up to 50 people, \[\[var:pricing.node-200]] for up to 200. Without a key, the node keeps working and keeps its data; only the automated paths slow down — export, conversion, transcription. | What the license covers: distributing the engine inside your application — in your perimeter or in your cloud, all engine updates during the term, engineering support with a named response time. The price depends on one thing: which application embeds the engine and how it is delivered. A written proposal — within one business day. ## Changes for your process [Section titled “Changes for your process”](#changes-for-your-process) You don’t pay for the right to open a file. You pay for adapting the tool to your process — with a deadline and a named owner. Our defects aren’t an order: a file that opens incorrectly, a lost edit, a crash — these are fixed for free, and the service level only sets the speed. | Class | Price | Deadline | Examples | | ----------------------------- | ------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | A — behavior settings | \[\[var:pricing.change-a]] | 1 business day | The default export format, page settings and fonts, the template set, features turned on and off, your logo and name on the editor surface, the interface language. | | B — connection to your system | \[\[var:pricing.change-b]] | 2–3 business days | Two endpoints of your system (“who am I”, “file by ID”), pass-through single sign-on, a save notification (webhook), a file naming rule, reverse proxy setup, a reversible rollback. | | C — engine behavior | \[\[var:pricing.change-c]] | up to 5 business days | Porting one macro or one Power Query source of a typical form, support for one DOCX or XLSX construct from your corpus, an export variant, automation of one operation. | | By estimate | from \[\[var:pricing.change-c]] | agreed in advance | Everything beyond class C: a set of macros, integration with a document management system without WOPI, a new data source, on-site work, a corpus audit before migration. | On-call — \[\[var:pricing.on-call-org]] per month per organization: a response within a business day, a file fix in the engine within five days, builds with fixes as they are ready. For one person — \[\[var:pricing.on-call-person]] per month. The price and deadline are named before work starts; if the deadline is missed, you don’t pay. A change arrives as a build or a setting, verified on our test bench with your file, with a note on what changed and how to roll it back; your originals and your system are not touched. ## Key and operating modes [Section titled “Key and operating modes”](#key-and-operating-modes) A person working in the editor — the editor window, the mobile app, the web sandbox — is never limited by a key. A key is needed only for automated processing: the command line, the developer kit, the API, and server-side export. | Mode | When | Limits | | ---------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | Full | Working in the editor — always; automated processing with a valid key that covers the product. | No limits. | | Evaluation | Automated processing without a key, the first 60 days after the first launch on this machine. | No more than two operations in parallel, up to 1,000 documents per day, the “\[\[var:license.pdf-footer-mark]]” mark in the PDF footer. | | Quiet | Automated processing without a key after 60 days. | One document at a time, a 3-second delay per operation, 100 documents per day, the same mark in the PDF. | There is no refusal in quiet mode: parallel requests wait their turn, and an exhausted daily quota waits for the next day. A key covers the products named in it and remains valid for another 30 days after it expires. ## For developers [Section titled “For developers”](#for-developers) Environment variables for automated processing: | Variable | What it does | | ------------------------------------ | -------------------------------------------------------------------------------------------------------- | | `SUMOFFICE_LICENSE` | The key as a string; `SUMOFFICE_LICENSE_FILE` — the path to the key file. | | `SUMOFFICE_SESSION_KIND=interactive` | Declares an interactive session — for the desktop shell that starts the processor on behalf of a person. | | `SUMOFFICE_LICENSE_QUOTA_WAIT=fail` | Instead of waiting for the quota, return exit code 75 — for a service with its own queue. | Concurrency in quiet mode is held by locks: the second request waits rather than being refused. ## What’s next [Section titled “What’s next”](#whats-next) * How verification works before the contract — [Pilot and acceptance](/platform/pilot/). * What’s in the delivery — [What the delivery includes](/platform/delivery/). * To request a written proposal or a pilot — [contact us](/start/contact/). # What the delivery includes > Exactly what you get: engines, a ready-made interface, server images, mobile kits, the capability matrix, the evaluation kit, and the operations package. You do not get “the editor’s source code” but a developer kit together with a runtime: the contract, examples, the capability matrix, and acceptance scenarios. This means the integration rests on fixed commitments, not on reading someone else’s code. | What’s included | What it is | What this gives you | | ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | Document editor inside an application | Surface Host — a local SumDoc service in Rust with a built-in interface; it runs in your program’s window and listens only on a local address. | A DOCX editor inside your own desktop program, with no dependency on Electron. | | Document editor in the browser | The SumDoc server image: each user gets their own core process with their own document. Published separately from the desktop installer — an image on Docker Hub and an archive in the release directory. | A DOCX editor in the browser inside your web product — [how it works and where to get it](/sumdoc/webhost/). | | Spreadsheet processor in the browser | The same kind of server image for SumSheet: a process per user with its own copy of the workbook, sign-in through your system, file export and delivery. Published separately from the engine packages. | An XLSX editor in the browser when the core computes on the server — [the server path](/sumsheet/server/). | | Mobile apps and the viewer kit | Ready-made apps for iPhone, iPad, Android, and the Mac App Store. A free viewer kit for Android and iOS — viewing only, for DOCX, DOCM, XLSX, and XLSM — ships under the same version number as the store build, with a checksum. Editing inside your app is the editing kit, licensed per app. | A document or spreadsheet on the phone without your own server and your own screens — [phone and tablet](/start/mobile/). | | Spreadsheet engine packages | SumSheet builds for the desktop app and for the browser, the operation contract adapter, workbook and session state. The [embedding examples](/sumsheet/examples/) are assembled from these packages; they are not published to the public npm registry. | Formulas, history, import and save for spreadsheets — and the choice of where the core runs. | | A surface under your brand | A ready-made interface: the document canvas or the spreadsheet grid, dialogs, commands, theme, and language. | A working editor inside your product without building an interface. | | A public interface | Stable methods for opening, executing, subscribing to events, saving, and closing; types, errors, and declared capabilities. | An integration that does not depend on internal names in the code. | | Application adapters | Examples for a window inside a desktop program, for the browser, for local exchange, and for working with storage. | A short path from the first try to a pilot. | | Capability matrix | Format × runtime × operation × read, edit, save, and markup preservation × limitations. Part of it is open already: [13 spreadsheet formats](/reference/sumsheet/formats/) and [what you can do with each file in documents](/sumdoc/overview/#which-files-it-works-with). | “We support the format” becomes a verifiable commitment. | | Evaluation kit | Examples, sample documents, an end-to-end path on a real file, the expected result of each step, notes on logging and security. | Your engineer opens their own document in 30–60 minutes, or builds a technical prototype. | | Architecture specification | A document for architects: protocol, session lifecycle, security, versioning, deployment, and acceptance. Issued together with the evaluation kit. | The integration can be designed before the first call — [where to start a pilot](/sumdoc/handoff/). | | Operations package | Signatures of delivery files, component inventory, the vulnerability handling process and response times, migration notes between versions, release and update rules. Which signatures exist in the current release and which do not yet is listed under [risks](/platform/risks/). | A runtime that a corporate operations team will accept. | What isn’t part of the delivery Source code and unlimited access to all internal commands: the set of capabilities is defined by the chosen profile. Instead — a named public developer kit with a fixed lifecycle, support period, long-term version support, security requirements, and acceptance scenarios. For documents this kit works today — it is the session contract and the surface. For spreadsheets it is still being separated from the internal contract, and its contents are fixed by agreement, not implied: [what is in it today](/sumsheet/embedding-api/). ## For developers [Section titled “For developers”](#for-developers) * Server images: `docker pull hissih/sumdoc-webhost:latest` for documents and `docker pull hissih/sumsheet-webhost:latest` for spreadsheets. The image archive is in the `webhost/` folder of the release directory — `https://dl.layers.md/sumoffice/sumdoc/release/latest/webhost/` and `https://dl.layers.md/sumoffice/sumsheet/release/latest/webhost/` — together with `INSTALL.md` and `SHA256SUMS`. * Spreadsheet engine packages — `@sumsheet/*`; the viewer kit for the phone ships with a sha256 checksum. * Where to start checking: [installing SumDoc](/sumdoc/install/) and the [quick start](/sumdoc/quickstart/), [installing SumSheet](/sumsheet/install/) and the [quick start](/sumsheet/quickstart/). # Embedding modes > Eight ways to connect the platform—from a ready-made surface to a server inside your perimeter and a preview without an editor: when to choose each one and what is mandatory in all of them. You don’t have to adopt the whole platform at once. You can start with a ready-made surface inside your product and then deepen the integration—to headless operation, to a separate process or to the core right in the browser. The meaning of a command doesn’t change along the way: it’s defined by the contract, not by the way data is transported. Two things matter for the decision: where your product lives and where the data must stay. The mode is chosen by these two questions. | Mode | When to choose it | Readiness and boundaries | | ----------------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | SumDoc inside a desktop application | You need a full DOCX editor inside your Windows or macOS program. | Verified on macOS; acceptance on Windows must be run separately. The reason is not a formality: on macOS text width is measured by the system font engine, on Windows and Linux by a portable one, so identical pagination across systems is not promised. That is exactly what to check at acceptance—on your own documents and your own fonts. | | SumDoc in the browser | Your product lives on the web, and the user doesn’t need to install anything. | Works. The document is computed by the core on your server, one process per user. Several people edit one document at the same time: others’ input is visible immediately, the one who opened it first writes to the file, the rest are co-editors or observers as chosen at sign-in—[the editor in the browser](/sumdoc/webhost/). | | SumDoc headless | Batch processing, services, and agents that don’t need a screen. | Works as the session protocol; which part of it becomes public is agreed separately. | | SumSheet in the browser | Embedding in a web product when data must not leave the browser. | Works. The core computes in the page’s memory and itself picks the fastest build the browser allows; if it didn’t take a faster one, it names the reason. The fastest, multithreaded build requires configuration on your site and a separate delivery—[the core in the browser](/sumsheet/wasm/). | | SumSheet as a separate process | Offline operation, local files, full speed. | Works. The process must be monitored, shipped with updates and shut down correctly—[a separate core process](/sumsheet/native/). | | Hybrid mode | A web interface, but with access to the file system and OS rules. | You need a secure channel between the interface and the core and a well-thought-out window lifecycle. | | A server inside your own perimeter | Centralized processing, agents, pipelines. | A separate production architecture: access checks, isolated sessions, quotas and operations tooling—[the processor on a server](/sumsheet/server/). | | Preview without an editor | You need thumbnails, read-only pages or PDF from DOCX and XLSX, but no editor. | Works. One container with the SumDoc and SumSheet cores; the file is erased after the response, and no network is needed once the image is downloaded. PDF from a workbook is not produced yet, presentations and ODS are not accepted—[preview without an editor](/platform/preview/). | ## What’s required in every mode [Section titled “What’s required in every mode”](#whats-required-in-every-mode) * One open document per process — the simplest and safest isolation for a pilot. * The application learns the contract version before it shows the interface or sends the first command. * Tokens, addresses, credentials, document text, and its source markup don’t go into logs by default. * Closing releases everything: listeners, connections, background threads, files and child processes. * An unknown command or capability is never executed silently: work stops, or a refusal with a reason comes back. ## For developers [Section titled “For developers”](#for-developers) * How each mode works: SumDoc—[platforms and deployment](/sumdoc/deployment/); SumSheet—[the core in the browser](/sumsheet/wasm/), [a separate core process](/sumsheet/native/), [the processor on a server](/sumsheet/server/), [phone and tablet](/sumsheet/mobile/). * SumDoc desktop mode: your application plus a local service per document; HTTP and WebSocket on the local interface only; a WebView2 or WKWebView window. Headless mode: JSON lines over standard input/output, or WebSocket with a token. * The multithreaded SumSheet build in the browser is enabled only when two conditions hold at once: the COOP and COEP isolation headers on your site and SIMD support in the browser; without either of them the core takes a simpler build and names the reason—[the core in the browser](/sumsheet/wasm/). * For the processor, the contract version is reported by the greeting line—it is read first; in the browser there is none, and the version is requested from the session with a `contract_version()` call—[SumSheet runtimes](/sumsheet/environments/). * The success flag in the response envelope is not the whole story: for a document edit, the outcome is named in a separate field—[how to read a response](/sumdoc/envelope/). # What's promised, and what isn't > Behind general phrases like “full compatibility” and “white-label delivery”: what's promised and verifiable, and what's fixed separately. Plus the questions worth answering before you start integrating. Office engines are usually described in general words: “an Office replacement”, “full compatibility”. Such words can neither be verified nor fixed in a contract. Below is what stands behind each of them in the case of SumOffice: on the left the familiar wording, on the right what is actually promised and verifiable on your files. | General phrasing | What’s actually promised | | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | A replacement for Word and Excel. | An embeddable office processor for your product: editing DOCX and XLSX files, saving with a reopen check, automation, and an interface under your brand. | | Full compatibility with Microsoft Office. | Matching behavior on an agreed set of your documents, for the listed capabilities, and within the bounds of the declared matrix. | | We support XLSX and DOCX. | For every format and every operation, it’s recorded separately: whether it’s read, edited, saved, and whether unsupported markup is preserved. This is already public: [13 spreadsheet formats](/reference/sumsheet/formats/) and [what you can do with each file type in documents](/sumdoc/overview/#which-files-it-works-with). | | We have VBA. | Its own runtime for an agreed subset: inspect the project, see the plan and the changed cells before running, run with a limit, apply or roll back. What is not supported—COM, external libraries, certain statements—is rejected with a message rather than faked; the contents of the subset are fixed in the matrix. | | We have Power Query. | Queries are read, saved without loss, and refreshed by its own M language engine: sources, steps, preview, load, refresh. An unsupported source gets an explicit refusal with a migration path rather than a silent failure; the list of supported sources is fixed in the matrix. | | We’re the fastest. | Instead of a slogan, measurements on your own documents: typical and worst-case time, memory, the amount of data loaded, saving and reopening. | | White-label delivery. | You own the shell, the brand, sign-in, storage, and processes; SumOffice is responsible for the meaning of the document and the spreadsheet. | | An agent edits the document. | An agent works through the same operations contract and history as a human: inspect, plan, preview the result, get confirmation, apply or roll back. | ## The platform in brief [Section titled “The platform in brief”](#the-platform-in-brief) Note SumOffice is an embeddable office platform for anyone who needs their own editor, on par with Word and Excel, inside their product. You keep your brand, users, storage, security, and workflows. We deliver SumDoc for DOCX, SumSheet for XLSX, the Rust core, a ready-made editor surface, a developer kit — already working for documents, still taking shape for spreadsheets — automation, and a capability matrix. It all starts with a limited pilot on your real documents and ends with an enterprise profile that includes acceptance, availability commitments, and a version-support period. ## Questions before you start [Section titled “Questions before you start”](#questions-before-you-start) * Which operating systems, which technology is your application built on, and which embedding method do you need at the first stage? * Which three to five of your real documents will decide whether the product fits? * Which ten user actions need to work without Microsoft Office? * Which of these are critical: comments, tracked changes, tables, fields, headers and footers, formulas, charts, pivot tables, Power Query, VBA? * Where are documents stored: on the computer, inside your perimeter, in the browser, in a document-management or accounting system, in the cloud? * What are the security requirements: where the data physically resides, leak control, logging, the delivery inventory, signatures, audit? * Do you need agents, and which operations are they allowed to read, propose, and apply? ## Next [Section titled “Next”](#next) * Verify what’s promised on your own files — [Pilot and acceptance](/platform/pilot/). * What’s locked in by the contract — [Commercial packaging](/platform/commercial/). * What isn’t covered yet — [Risks and honest boundaries](/platform/risks/). * Start small — [early access request](/start/beta/). # Feature parity with Word and Excel > How to state parity correctly: seven levels — from everyday scenarios to operations — and how to prove each one. Nobody has full parity with Word and Excel except Microsoft Office itself. A promise of “feature parity” without qualification means nothing and can’t be verified. That’s why parity is broken down into tiers—and at every tier there’s a way to check on your own files. | Tier | What it means | How it’s proved | | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | By scenario | The user performs their everyday actions without switching to Microsoft Office. | An agreed acceptance scenario inside your application. | | Format openability | DOCX, XLSX, XLSB, ODS and CSV open in the chosen runtime. Opening isn’t the same as editing and saving: these are separated by row—[spreadsheet formats](/reference/sumsheet/formats/), [what you can do with each file in documents](/sumdoc/overview/#which-files-it-works-with). | Open the entire agreed set of documents and review every warning and refusal. | | The editing corridor | The agreed capabilities work correctly: text, tables, formulas, formatting, comments, sheets, charts. | Compare the document’s meaning before and after editing, for every capability on the list. | | Save | A saved file reopens without losing its meaning or structure. | Reopen it in a new process, ideally twice, and separately verify the “saved here, opened in Word or Excel” round trip. | | Preservation of the unsupported | What the editor doesn’t understand is preserved unchanged, or explicitly flagged. | Compare the file’s contents before and after, including the relationships between parts. | | Automation | Macros, queries, and agents work within the supported subset; everything else is recognized and explained. | A capability matrix, explicit refusals instead of silent errors, an action log. | | Operations | Offline operation, on-premises installation, security, updates, and the lifecycle meet enterprise deployment requirements. | A security checklist, full resource release on shutdown, the delivery inventory and signatures — what’s already there today is listed in [Risks](/platform/risks/). | What’s promised SumOffice provides an embeddable platform on par with Word and Excel, with parity over an agreed set of documents and a capability profile. In specific respects — embedding into someone else’s product, manageability, explicit refusals, preserving unsupported markup, readiness to work with agents — the platform can be stronger than familiar office suites, even without replicating every Microsoft Office feature. ## Why this is stronger than the usual “we support XLSX/DOCX” [Section titled “Why this is stronger than the usual “we support XLSX/DOCX””](#why-this-is-stronger-than-the-usual-we-support-xlsxdocx) * What matters to the customer isn’t a list of file extensions, but that nothing was lost after saving. * What decides a migration are the specifics: data queries, macros, links to other workbooks, charts, pivot tables, styles, comments, tracked changes, headers and footers, and fields. * Whoever embeds the editor in their product cares about more than looks: the lifecycle, memory consumption, full resource release on shutdown, update compatibility and observability. * The capability matrix turns an argument into a verifiable agreement: what is read, what is edited, what is saved, what is preserved as-is without parsing, and what is rejected. The matrix doesn’t use free-form language. The spreadsheet delivery contains a closed list of eight states, and every cell gets one of them: | State | What it means | | ------------------------- | ---------------------------------------------------------------------------------------------------------- | | Absent | This part wasn’t present in the workbook under test. | | Not documented | This part is on the list, but the product can’t recognize it yet — and doesn’t pretend that it can. | | Detected, not interpreted | Its presence is detected, but the product doesn’t assign it meaning and doesn’t promise to preserve it. | | Preserved only | The part passes through open and save as opaque data: it won’t be lost, but it won’t be understood either. | | Cached value only | What’s shown is whatever Excel wrote; the product doesn’t promise a live recalculation. | | Partial | There’s live behavior, but coverage is narrow, and that’s stated outright. | | Blocked by policy | The part is recognized, but running it is deliberately blocked — by a product rule or a security policy. | | Fully live | Its meaning is modeled and kept live, without relying on cached values. | The difference between “preserved only” and “cached value only” is the boundary people usually argue about: in the first case the part of the workbook comes back unchanged, in the second you’ll see a number, but it wasn’t recalculated by us. A state is assigned not to the workbook as a whole but to its parts. The list of parts is closed too—ten families: | Workbook part | What it includes | | ----------------------------- | ------------------------------------------------------------------------------------------------------ | | Macros | Automation built into the workbook: VBA and the like. | | Add-ins | Functions and commands that come from add-ins. | | External data | Connections and refreshable queries. | | External references | References to other files and workbooks. | | Names and hidden dependencies | Named ranges, hidden areas—everything that affects the workbook’s meaning without appearing on screen. | | Tables | Structured tables, their styling and behavior. | | Pivots and the data model | Pivot tables, their caches, slicers and the data model. | | Protection and trust | Protection flags and parts restricted by trust rules. | | The import/export round trip | Parts where what matters isn’t behavior but import accuracy and preservation on export. | | Provenance and diagnostics | Parts that explain why content was preserved as-is, blocked, or shown from a cache. | The matrix is the intersection of the two lists: every workbook part has its own state. The question “do you support macros” turns into “what state do macros have in my workbooks”, and that one has a verifiable answer. ## What to measure with [Section titled “What to measure with”](#what-to-measure-with) * 41 commands of the SumDoc document session—for developers: [Session Protocol reference](/reference/sumdoc/session-protocol/). * 208 operations in the SumSheet contract; which of them the core of the latest release accepts is stated in the [Compute Contract reference](/reference/sumsheet/overview/). Take the release as the yardstick for acceptance: what is described but not yet in the build can’t be verified on your workbooks. * What’s available today, and what’s part of the pilot — [SumDoc readiness and boundaries](/sumdoc/status/) and [SumSheet strengths and trade-offs](/sumsheet/tradeoffs/). # Pilot and acceptance > How to prove the promise: what is verified, the two-week pilot plan, and what the go or no-go decision is based on. A pilot proves real embedding, not a presentation: your document opens inside your application, is edited, saved, and reopened without loss. The go or no-go decision is made against written criteria, and the report stays with you either way. ## What is verified [Section titled “What is verified”](#what-is-verified) | What we verify | What counts as passed | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Opening | A real document or workbook opens inside your application; no separate editor window appears. The declared capabilities are visible. | | Editing | The user performs the agreed edits; each edit creates one history entry, and the application learns about unsaved changes. | | Saving | The file is returned to your application; the right to save is declared explicitly. | | Reopening | The saved file reopens from a cold start without loss of meaning or integrity — for documents and for spreadsheets. | | Events | The application receives the open (`ready`), change (`dirty`), save (`saved`), error (`error`), and close (`unmounted`) events; events of a white-label delivery are by agreement. For spreadsheets, the event contract is fixed and versioned, but the part that implements it isn’t in the release yet: you can write code against the names today, but you can’t run it, and this row can’t be verified for spreadsheets during the pilot ([what the kit includes](/sumsheet/embedding-api/)). | | Security | The token and credentials don’t leak, the service listens only on the local address, document content doesn’t end up in logs; the policy is checked before opening, saving, and any network call. | | Resource release | After closing, no processes, connections, or background tasks remain. | | Performance | Startup, opening, editing, recalculation, saving, and memory on the agreed classes of documents and workbooks. | ## Pilot plan: two weeks [Section titled “Pilot plan: two weeks”](#pilot-plan-two-weeks) A pilot is a structured two-week verification on your document corpus with written acceptance criteria: what opens, what survives the “open — save — open” round trip, and what performance you see. | Stage | Duration | Result | | -------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Assessment | 1–2 business days | Choice of platform and server side, key scenarios, document corpus, acceptance criteria, security requirements, and the business owner on your side. | | Prototype and measurements | by the end of the second week | Opening, editing, saving, and reopening real DOCX and XLSX files from your corpus inside your container; performance measurements against the acceptance criteria. | | Decision: go or no-go | 1 meeting at the end of the second week | A report against the acceptance criteria, the final list of capabilities, the list of work before production use, a commercial estimate, and the expected commitments on availability and version support period. | | Work for your process | after the decision, by estimate | Styling under your brand, a storage adapter, single sign-on and audit, events, selected product routes. These are not part of the pilot: they are changes for your process, with a price and a deadline named in advance — [commercial packaging](/platform/commercial/). | When a pilot counts as successful A pilot is successful only if the chosen capability profile works in your real application, saves documents, survives a cold-start reopen, leaves no hidden processes or handlers behind, and never puts secrets into logs. ## For developers [Section titled “For developers”](#for-developers) * What to give your engineers and in what order to read it — [How to start a pilot](/sumdoc/handoff/). * The list of checks before a pilot — the [SumSheet checklist](/sumsheet/checklist/) and the [SumDoc checklist](/sumdoc/diagnostics/). * Event names: for documents — [SumDoc embedding](/sumdoc/embedding/), for spreadsheets — [the embedding kit](/sumsheet/embedding-api/). The evaluation kit is described in the [glossary](/start/glossary/). # Preview without the editor > One container with the SumDoc and SumSheet cores: a thumbnail, pages for reading, and PDF from DOCX and XLSX—what it gives you, the limits, and the requests for a developer. Not every place in a product needs an editor. A file list needs a thumbnail, a card needs pages for reading, a “download” button needs a PDF. For that there is a separate preview container: it turns DOCX and XLSX into an image, pages, or PDF and stores nothing. For the business this means: you can show a document in your product without the editor and without sending files outside. ## What it does [Section titled “What it does”](#what-it-does) * A thumbnail of the first page of a document or the first sheet of a workbook. * All pages of a document or all sheets of a workbook in a form ready for reading in the browser. * A PDF of the document. PDF from a workbook is not produced yet: the spreadsheet core does not print to PDF, and such a request gets a refusal with a reason. Inside are the SumDoc and SumSheet cores and fonts with Office metrics, so pages break the same way as in the editor. The response reports whether everything was rendered: how many pages out of how many, whether there are scripts missing from the built-in font, and how many formulas are shown empty because the workbook holds no values for them. ## Limits [Section titled “Limits”](#limits) * Presentations are not accepted—until the third editor appears; ODS is not supported yet. An unknown format gets a refusal with a clear message. * The service does not accept files larger than 50 MB; the limit can be changed. * The request directory is wiped right after the response; the service makes no outbound calls, and no network is needed after the image is downloaded. * Viewing is free; production use is under the license for the embedding application—[commercial packaging](/platform/commercial/). ## For developers [Section titled “For developers”](#for-developers) Start: ```sh docker run -d -p 8099:8099 hissih/sumoffice-preview ``` One container, about 224 MB. Allow roughly 250 MB of RAM for each document processed concurrently. The file size limit is set by the `PREVIEW_MAX_MB` environment variable. | Request | What it returns | | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `POST /thumb?w=320` | A PNG of the first page of a document or the first sheet of a workbook as a grid of values. The width `w` is from 64 to 2000 pixels; a value outside the range is clamped to the nearest bound. | | `POST /pages` | Self-contained HTML: all pages of a document or all sheets of a workbook as tables. | | `POST /pdf` | A PDF of the document. For a workbook—a 415 refusal with a reason. | | `GET /health` | A check that the service is alive. | The file is passed as the `file` field of a `multipart` form or as the raw request body—then the file name is given by the `?name=report.docx` parameter or the `X-File-Name` header. An unknown format gets a 415 refusal. ```sh curl -F file=@report.docx http://localhost:8099/thumb?w=320 > thumb.png curl -F file=@report.docx http://localhost:8099/pages > report.html curl -F file=@report.docx http://localhost:8099/pdf > report.pdf curl -F file=@book.xlsx http://localhost:8099/pages > book.html ``` Response headers—they are used to decide whether to show the result as complete: | Header | What it means | | ----------------------------------------- | --------------------------------------------------------------------------------------- | | `X-Preview-Pages` | How many pages the document has according to the PDF. | | `X-Preview-Coverage`, `X-Preview-Partial` | How many pages were rendered out of how many; `Partial: true` if fewer than in the PDF. | | `X-Preview-Scripts-Outside-Font` | Scripts missing from the built-in font—they may have rendered incorrectly. | | `X-Preview-Sheets`, `X-Preview-Cells` | How many sheets and cells the workbook has. | | `X-Preview-Uncomputed-Formulas` | How many formula cells are shown empty: the workbook holds no values for them. | ## Next [Section titled “Next”](#next) * The other embedding modes—[Embedding modes](/platform/deployment/). * The same container path, but with the editor—[the SumDoc editor in the browser](/sumdoc/webhost/) and [the SumSheet processor on the server](/sumsheet/server/). # Your own office instead of Microsoft Office > DOCX and XLSX editors inside your product and your perimeter, under your brand: what this gives a company, what already works, and how to verify it in an hour. Business documents still live in DOCX and XLSX: contracts, estimates, deliverables, and reports. Some of them are not documents but applications: formulas, macros, Power Query, form controls. A workbook that calculates is a program, and leaving Microsoft means keeping it running. The choice is usually between bad options: shipping documents to someone else’s cloud, or moving people to an editor that cannot be embedded in your own processes. **SumOffice is an independent office platform whose engines embed in your product.** Not another office suite next to yours, but a document and spreadsheet editor inside it: under your name, inside your perimeter, with your access rights and your storage. The platform has no ties to Microsoft. ## What you get instead of someone else’s office [Section titled “What you get instead of someone else’s office”](#what-you-get-instead-of-someone-elses-office) | Today, with someone else’s office | With SumOffice | | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | | The document opens in an external application or someone else’s cloud | The document opens inside your product; files never leave your perimeter | | The editor carries someone else’s name and interface | The editor carries your name, your colors, and your navigation | | Permissions and audit live separately from the document | Your system checks permissions; every action goes through the contract | | “Supports DOCX” is a promise in words | A capability matrix: what’s read, what’s edited, what’s preserved without loss | | Automation is macros nobody knows about | The agent works through the same contract as a person: preview, confirmation, rollback, log | | A vendor update can break your integration | A versioned contract and a compatibility period, locked in by the agreement | ## Leaving Microsoft: four steps [Section titled “Leaving Microsoft: four steps”](#leaving-microsoft-four-steps) Not a feature list, but a check your team will run. Each step is a real file on a real server, and the result says outright what is not there yet. 1. **Upload a workbook** — [on the check page](https://view.sumoffice.com/check/) or send it to the [check bot](https://sumoffice.com/bots) in Slack or Telegram. Nothing in it is executed; the file is deleted after 24 hours. 2. **Read the report**: every macro with its route, functions known and unknown to the engine, data sources — as “N of M”. 3. **Open the same workbook in the browser** on our server: formulas recalculate, macros follow their routes, nothing is installed. 4. **Save and open in Excel**: the VBA project byte for byte, values in place. A macro or a Power Query source the engine does not carry yet is a change for your process: \[\[var:pricing.change-c]] per item, the whole corpus by estimate, price and timeline stated before work starts — [Commercial packaging](/platform/commercial/#changes-for-your-process). ## You can try this right now [Section titled “You can try this right now”](#you-can-try-this-right-now) Not a presentation and not a screen recording, but a working program: both editors open right on the site, in the browser, with nothing to install. If the demo environment is down at that moment, a snapshot takes the place of the frame — and the page says so outright. The SumDoc document editor A two-page contract: headings, lists, a table with dates and an amount. Open it, edit a paragraph — the document lives in your own sandbox. [Open the live example →](/sumdoc/demo/) The SumSheet spreadsheet processor An office-equipment budget with formulas. Change a quantity or a price — the core recalculates the totals, the shares, and both sums, not the page layout. [Open the live example →](/sumsheet/demo/) For developers, there are worked embedding projects with full code next to it: [twenty-three examples for spreadsheets](/sumsheet/examples/) — from a minimal sheet to a million-row workbook, collaboration, and links between workbooks — and [a project for documents](/sumdoc/examples/). ## Why this isn’t a wrapper around someone else’s editor [Section titled “Why this isn’t a wrapper around someone else’s editor”](#why-this-isnt-a-wrapper-around-someone-elses-editor) The meaning of the document belongs to its own core: it parses the file, computes layout and formulas, keeps the history, and writes the result back. The interface only shows and asks — it has no copy of the document of its own. For you this means the result is the same in the desktop app and in the browser, and that one side is responsible for it. * **A verifiable boundary.** 41 document session commands and 208 spreadsheet contract operations are exposed, each described in the reference, and the reference is checked against the code on every documentation change. Which operations the core of the latest release accepts, and which are described but not yet in the build, is stated separately. For developers — the [SumDoc reference](/reference/sumdoc/overview/) and the [SumSheet reference](/reference/sumsheet/overview/). * **Formats are named one by one.** 13 spreadsheet formats, including XLSX, XLSB, XLSM, ODS, and CSV — with a [matrix](/reference/sumsheet/formats/) that says for each what can be opened, what can be edited, and where it can be saved. The document side handles DOCX and exchanges **eight more formats**: PDF, ODT, flat ODT, RTF, HTML, plain text, EPUB, and FB2 — all in both directions except PDF, which is print only. [Which files it works with](/sumdoc/overview/#which-files-it-works-with). * **Refusal instead of silent corruption.** An unsupported operation gets an explicit refusal with a reason **before** the file changes. There is no such thing as a half-written document: the file is published in one atomic action, and the editor refuses to overwrite an edit made by someone else. * **Preserving what’s not understood.** Parts of the file the editor doesn’t parse carry over into the new file as-is, instead of disappearing on save. * **Speed you can see, not just a promise.** A [million-row sheet](/sumsheet/examples/stress/) is open right on the site: scroll it, and it shows you the frame cost itself — typical, worst-case, and whether it stayed within budget. The measurement runs on your machine, not in our presentation. * **Works without a network and without a cloud.** A desktop app, a window inside your program, the browser, a server inside your perimeter, a phone — the same contract in every environment. The core never calls out; the only outbound channel is in the ready-made apps — the support assistant with error reports, and it is described under [security](/platform/security/). The SumDoc and SumSheet mobile apps are released for iPhone, iPad, and Android, and for macOS. For embedding in your own app there is a free viewer kit for Android and iOS — the same engine as in the store builds, under the same version number; editing inside your app is the editing kit, licensed per app ([phone and tablet](/start/mobile/)). ## What we compare ourselves to [Section titled “What we compare ourselves to”](#what-we-compare-ourselves-to) With Word and Excel — there’s nothing else to compare against. They’re what’s already on your people’s desks, your contracts and estimates are written in them, and they’re exactly what the result will be measured against. But the comparison isn’t about the number of buttons. Office is a finished product for a workstation; you buy it so a person can open a file. You buy SumOffice so that **an office appears inside your product**: not an application alongside it, but an engine inside it, under your own name. Exactly what the product does with the file is broken down by task: the [SumDoc capability map](/sumdoc/capabilities/) for documents and the [map next to Excel](/sumsheet/atlas/) for spreadsheets. What parity means and how it’s confirmed — [Feature parity](/platform/parity/). ## How this is verified at your end [Section titled “How this is verified at your end”](#how-this-is-verified-at-your-end) We don’t ask you to take our word for it. Verification happens on your own files and inside your own perimeter, in steps known in advance: 15 minutes The core responds, your DOCX is open, a paragraph is changed and saved as a separate file. Step by step, for a developer — in the [quick start](/sumdoc/quickstart/). 30 minutes The same document, but now inside your application: the editor in your window, editing, saving, events. The steps are in [How to start a pilot](/sumdoc/handoff/). 2 weeks The full pilot: a check on your document corpus with written acceptance criteria, measurements, and a “take it or not” decision; the report stays with you either way. Stages and timelines — in [Pilot and acceptance](/platform/pilot/). What the contract locks in — the capability profile, the platform matrix, acceptance scenarios, support terms, and security commitments — is gathered in [Commercial packaging](/platform/commercial/). ## What’s next [Section titled “What’s next”](#whats-next) [Submit an early access request](/start/beta/)Three fields. We will send the builds and tell you outright what already works and what is still rough. [What you get: in short](/platform/story/)The product formula in three parts: what you bring, what the platform does, what comes out. [Risks and honest boundaries](/platform/risks/)What isn't covered yet, and what covers it. No rollout conversation is complete without this page. [What embedding gives you that Office doesn't](/platform/advantages/)Not “we're better”, but a list of the places where embedding gives you something a ready-made office suite can't. [What's promised, and what isn't](/platform/messaging/)The claims we're ready to defend during a pilot, and the ones we deliberately avoid. [VBA, Power Query, and agents](/platform/automation/)Automation without losing control: a supported subset, a Power Query ladder, and agent work as a single transaction. [What's coming next](/platform/roadmap/)Where the platform is heading, and what will arrive before the rest. # Risks and honest boundaries > What can't be promised without a separate agreement, and which limits need to be spelled out in advance. Promising “full Office” without criteria is easier, but such a promise can’t be verified. So this page names what’s still open and what closes it. Without this page, a conversation about rollout is incomplete. | Risk or open question | Why it matters | What covers it | | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | What will be in the public interface | There are more internal capabilities than can be declared public and then supported for years. | A locked public interface, types, and versioning rules. | | Fidelity of round-tripping | A file opening doesn’t yet mean it will come back from the editor without loss. | A matrix of critical documents and capabilities, before-and-after file comparison, a reopen check. | | Archival PDF/A | For archives and legal or government records management, this is a condition of admissibility, and plain PDF isn’t enough there. | Plain PDF export works, including with embedded fonts; PDF/A-1b readiness is checked with a separate command, and export to that format itself is still closed and runs through your own verification program — [what you can do with each file type](/sumdoc/overview/#which-files-it-works-with). | | VBA | Security requirements and incomplete compatibility clash with expectations that it “just works”. | A matrix of supported calls, a list of refusal kinds, security rules, and a ban on changing the document silently. | | Power Query | Rollout most often runs into exactly this: queries, connections, and the data model. | Recognition and preservation first; refreshing and editing queries as a separate stage; acceptance by comparing files. | | Speed claims | The market is already oversaturated with slogans like “ten times faster”, and arguing with slogans is pointless. | A reproducible benchmark on your own documents, fixed hardware, thresholds for typical and worst-case time. | | Confirmation on every system | Verification on one system doesn’t automatically carry over to the others. | Separate acceptance on every declared system and in every embedding method. For documents, look at pagination first: text width is measured by the engine of the system where the core runs — the system engine on macOS, a portable one on Windows and Linux. Spreadsheets don’t have this cause: SumSheet doesn’t use system font engines; widths are taken as declared in the workbook itself. | | A server with many clients at once | Working in a desktop application doesn’t carry over to a cloud service. | A separate architecture: quotas, access checks, a task queue, isolating clients from each other, observability. | | Packaging and signing | An unsigned file won’t pass enterprise deployment. | Not everything is signed yet, and it differs by product — the list is below. Wherever there’s no signature, checksum verification remains; how to check is shown on the installation pages for [SumDoc](/sumdoc/install/) and [SumSheet](/sumsheet/install/). | | Version support | You depend on how long the version your product is built on stays supported. | A support period, deprecation rules, migration guides, an escalation process. | ## What is signed today [Section titled “What is signed today”](#what-is-signed-today) * **SumDoc.** The macOS app is signed with a Developer ID certificate and notarized by Apple; the Windows installers carry no signature. * **SumSheet.** The app in the `.zip` archive is signed and notarized — verified on a downloaded build: the system answers `accepted` and `source=Notarized Developer ID`; the `.dmg` image from the same folder carries no notarization. The Windows installers are signed with a **test certificate**, “SumOffice Test Signing (DEVELOPMENT ONLY)” — the system will warn about an unknown publisher; this signature isn’t confirmed by the release evidence, so check it on the downloaded file yourself. * **Both products on Linux.** The `deb` and `AppImage` packages have a detached `.asc` signature next to them; `rpm` doesn’t. ## Decisions to make before you start [Section titled “Decisions to make before you start”](#decisions-to-make-before-you-start) * Your target operating systems, your application’s technology, the embedding method, and the deployment boundary. * A dozen critical user actions and three to five real documents. * Requirements for comments, tracked changes, tables, drawings, fields, sections, and headers and footers. * Requirements for formulas, charts, pivot tables, external references, Power Query, macros, and data connections. * What agents are supposed to do, what permissions they’re given, what goes into the audit trail, and who approves their actions. * Where files come from and where they’re saved, how backups and recovery work, how leaks are caught, what gets written to logs, and where performance metrics go. * What availability commitments are needed, how many years a version must be supported, how often updates ship, who’s responsible for rollout, and how vulnerability handling works. An honest way to put it The foundation is already there: a processor inside someone else’s product, and a shell you can replace with your own. Turning this into a deliverable developer kit doesn’t mean rewriting the product — it means formalizing the boundary: a stable public interface, packaged delivery files, documentation, acceptance, security, support, and a capability matrix locked in by contract. ## Next [Section titled “Next”](#next) * How these boundaries are verified on your documents — [Pilot and acceptance](/platform/pilot/). * What the contract covers — [Commercial packaging](/platform/commercial/). * In what order the rest gets covered — [What’s coming next](/platform/roadmap/). * Start small — [early access request](/start/beta/). # What's coming next > What's not yet in the platform, in what order it will appear, and what each piece of work gives you. Plus a short formula for the offer. Part of the platform hasn’t been brought to delivery yet, and it’s more honest to say so directly. Below is the order of work and what each piece will give you. You can plan a rollout by this list: it says what will appear before the rest. | Order | What’s being built | What this gives you | | ----- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 1 | A single capability matrix | One list for both products: what opens, what can be edited, what’s preserved without loss, and where the boundaries are. You can check it before the pilot, not after. | | 2 | Evaluation kit | Both surfaces, a sample application, a quick start, and a correct result known in advance — to compare with what you got. | | 3 | A set of documents for comparison | Twenty to fifty real files, run through us and through other office suites. The difference shows up in the documents, not in promises. | | 4 | What happens with macros | Which calls are supported, which are deliberately rejected, under what security rules, and what to do with the ones that aren’t supported. | | 5 | What happens with data queries | On real workbooks: what’s recognized, what’s preserved on write, what you can view, what you can refresh, and what you can create from scratch. | | 6 | Stable names and versions | Package and type names will stop changing between releases, and versioning rules will tell you in advance whether an update will break your build. | | 7 | A kit for the security team | The delivery inventory, signatures, the update and rollback process, vulnerability-fix timelines, and telemetry rules. | ## Where the conversation starts [Section titled “Where the conversation starts”](#where-the-conversation-starts) The platform’s formula fits in one sentence: your product plus SumOffice’s engines equals your own office platform. The detailed account exists as a foundation, so the short materials don’t promise more than they should. Where to start verifying Take one real Word document and one real Excel workbook — ones that actually circulate in your organization, not sample files. Decide where you’re embedding and where this will run. Next comes an hour and a half of architecture review, then two weeks of a trial build through one full cycle: open, edit, get an event, save, close, and reopen, then compare against the original file. That comparison is what decides whether to move forward. ## The final formula of the offer [Section titled “The final formula of the offer”](#the-final-formula-of-the-offer) Summary SumOffice isn’t another office suite. It’s an embeddable office platform: documents and spreadsheets live under your brand, in your sign-in and storage, inside your processes. The Word and Excel formats, layout, formulas, edit history, lossless saving, automation, agents, security, and compatibility — all on our side. | What you get | What the end user gets | What the security team gets | | ------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Libraries and cores for documents and spreadsheets | Editing documents and spreadsheets inside the product they already use | A versioned call contract, a delivery inventory, and signatures — to the extent they exist in the current release (the seventh row of the queue above covers what’s still missing from this kit) | | A ready-made interface — keep it as is, or replace it with your own | The work never leaves the application they already use | Document content never goes into logs — this is a condition of delivery; policies, leak control, audit | | Adapters and scaffolding for your stack | Real documents open and save on day one | The lifecycle under control, acceptance that verifies no leaks | | A capability matrix and a set of acceptance documents | Fewer unexpected losses during migration | Promises you can verify on your own files | | A path for automation and agents | Scenarios run without manual clicking | Preview, approval, audit, and rollback | ### The platform in brief [Section titled “The platform in brief”](#the-platform-in-brief) SumOffice gives your product its own embedded office engine: Word-grade documents and Excel-grade spreadsheets under your brand, in your storage, inside your security perimeter and your processes. The delivery includes the document and spreadsheet cores in Rust, an interface under your brand, a developer kit — working for documents, being finalized for spreadsheets — automation, and measurable compatibility through capability profiles and acceptance checks. ## What already works [Section titled “What already works”](#what-already-works) Plans are easier to read next to what already works today: [what SumDoc can do with a document](/sumdoc/capabilities/), [SumSheet’s capability map](/sumsheet/atlas/), and [the boundaries we state outright](/platform/risks/). # Security, privacy, and operations > Trust boundaries, secrets, storage, roles, logs, the supply chain, and lifecycle: what SumOffice provides, and what stays on your side. In an embeddable product, security is not a section at the end of the contract but part of the contract itself: the boundaries run right along the calls. For a security team this means it is known in advance where the trust boundaries are, what goes into the logs, which credentials never leave, how the runtime is updated, and how resources are released. The main rule: the core and the processor never call out. Documents stay inside your perimeter, and document content never goes into the logs. | Area | What SumOffice is responsible for | What stays on your side | | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Network boundary | For documents, the editor service listens only on a local address: it cannot be reached from outside, even from your own network. For spreadsheets in the browser there is no separate service at all — the core computes in the page’s memory, and the workbook never leaves. Data providers do not go to the network without explicit permission in either case. | Set the allowed source addresses, root directories, and network rules. | | Secrets | The SumDoc editor service is protected by a pass, new on every start and valid while the service runs; secrets are cut out of the output, and credentials are passed as opaque identifiers. | Do not log passes, addresses, or credentials; choose where the performance metrics go. If you set your own pass, its strength and rotation on every start are your responsibility: the core only checks that the string is not empty. | | Storage | The save contract, transfer as bytes or a stream, address-based access only with a declared capability, replacing the file in one atomic action. | Paths, access rights, backups, retention periods, leak control. | | Read-only mode and roles | The restriction is checked when a command runs, not just by graying out buttons in the interface. | The roles themselves and permission decisions. | | Logs | Counters, durations, codes, and checksums — without the document’s content. | Agree on what gets redacted, what goes into the audit trail, and how long it’s kept. | | Supply chain | Signatures, component inventories, checksums, and update compatibility rules. Not everything is signed yet, and it differs by system — exactly what is verified today is summarized under [risks](/platform/risks/). | The rollout and rollback process, approvals, the support channel. | | Lifecycle | Closing twice is safe; acceptance requires that no resource stays held after shutdown. | Monitoring the process, timeout rules, deciding what happens to an unsaved document. | | Ready-made apps | The only outbound channel is the support assistant in the ready-made SumDoc and SumSheet apps. It sends to the support service only messages, problem reports, and automatic error reports: on desktop systems — a snapshot of the document window, a recording of the last minute of interface actions, and the app logs; on mobile — only the tail of the log. The same error is sent once, no more than five automatic reports per hour; there is no off switch. The support service is hosted by a partner ([privacy policy](https://sumoffice.com/app-privacy)). | Decide whether such a channel is allowed inside your perimeter; if it is not, do not deploy the ready-made apps — embed the core instead. | ## What can be collected without content [Section titled “What can be collected without content”](#what-can-be-collected-without-content) * the runtime version, the contract version, the capability profile identifier; * the operation identifier, the command family, duration in milliseconds, the outcome class; * document size to within a range and the number of structural elements — without the text itself; * the reason the process ended, peak memory use, timeout and retry counters; * versions of the system, WebView, browser, and runtime, and the update channel. Don’t log Tokens, full addresses, document text, comments, author names, source markup, workbook bytes, credentials, and absolute paths — unless a redaction rule is defined for them. ## What’s left of a redacted value [Section titled “What’s left of a redacted value”](#whats-left-of-a-redacted-value) Cutting out does not drop the value silently: a separate, deliberately sparse projection is built for the log. Whoever decides where such a log goes needs to know what it contains. What remains of a value is its length in bytes, a `sha256` hash, and, for binary data, up to the **first sixteen bytes**. The bytes themselves, base64, and field contents are never carried over; for records with fields, only their count and a “cut out” mark remain. Credentials, addresses, and local paths are masked **before** the value gets into the projection. But sixteen bytes of binary data remain, and the hash of a short value can be brute-forced — for a log that goes outside, this is worth considering separately. ## For developers [Section titled “For developers”](#for-developers) For documents everything is collected on one page; for spreadsheets it is split by topic. * The SumDoc service pass: 256 bits from the system’s source of randomness, new on every start; your own pass — [about `--token`](/reference/sumdoc/transport/). The minimal security model, the local address, and forbidden workarounds — [Responsibility and security](/sumdoc/responsibility/). * SumSheet, where the data stays: in the browser the workbook lives in the tab’s memory — [the core in the browser](/sumsheet/wasm/); on the server, client isolation, quotas, and the log remain yours — [the processor on the server](/sumsheet/server/). * SumSheet, boundaries for outside input: allowed directories and file types, a ban on passing a destination address from an external client — [integration into an application](/sumsheet/integration/). * SumSheet, what never leaves: credentials and the source text of Power Query queries and macros don’t go into events — [runtimes](/sumsheet/environments/); source privacy levels — [trust and privacy](/reference/sumsheet/pq-trust/). * What comes back in a refusal, and why a refusal is safer than silent corruption — [How the session API works](/sumsheet/session/). # What you get: in short > What you bring, what the platform does, and what comes out — the product formula in three parts. SumOffice gives your product its own document and spreadsheet editor: under your name, inside your system, with your access rights and your storage. You bring the product and the perimeter, we bring the document and spreadsheet engines. Below is what comes out. What is delivered is not a source archive and not someone else’s office suite with someone else’s interface, but an office processor inside your product—with a contract and commitments. | What you bring | What you get | | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Brand, name, domain, the interface shell, help, and training | The editor looks like part of your product, not an external service: your colors, your language, your set of commands. | | Sign-in through your system, users, roles, licenses, audit | Documents stay inside your perimeter. Roles and rights are checked by your system, and every action leaves a trace in the audit log. | | Storage: files, document management and accounting systems | Files are saved where you say, with no hidden cloud on the vendor’s side. Document management systems connect over WOPI, the standard file exchange protocol; verified on Nextcloud, while SharePoint and ownCloud have not been verified. If the file was changed from outside, the editor refuses to save and names the reason. | | Your own real documents, a dozen key scenarios, critical features | Fidelity with Word and Excel is proven on your files rather than promised in general: a capability profile, an acceptance document set, and speed thresholds. | | The list of platforms: browser, Windows, macOS, Linux, phones, your own perimeter | One product gets desktop, browser, server, and mobile variants. The document and spreadsheet apps are published in the App Store and Google Play, the desktop ones in the Mac App Store. For your own mobile app there is a viewer kit for Android and iOS—under the same version number as the store build: [phone and tablet](/start/mobile/). | | Automation tasks: VBA, Power Query, agents, pipelines | Automation becomes controlled and verifiable: first show what will change, then confirm and apply. Anything unsupported is rejected with a reason rather than corrupting the file—[VBA, Power Query, and agents](/platform/automation/). | | Working together on one document | Several people edit one DOCX or XLSX at the same time inside your perimeter. Proven for text and cells (measured with five participants and 119 scenarios); objects and formatting under concurrent input are still being measured. How it works on the server—[the editor in the browser](/sumdoc/webhost/). | The formula in one line Your product and sales channels + SumOffice’s document and spreadsheet engines + a surface under your brand, ready-made or replaced with your own = your own office platform, on par with Word and Excel, inside your perimeter. * For you, this isn’t buying an editor — it’s an office processor as a component of your own industry platform. * For your user, this isn’t a separate account and someone else’s window — it’s a familiar document or spreadsheet inside their current process. * For security and operations, this isn’t a black box: the declared capabilities, error codes, collected metrics, lifecycle, update rules, and acceptance criteria are all fixed in advance. Today the platform has two engines—documents and spreadsheets. The third, for presentations, is in development: a public beta is planned for December 2026, it cannot be downloaded yet, and PPTX compatibility, platforms, and speed are not promised. Platform terms — capability profile, explicit refusal, preservation of the unsupported, white-label delivery — are explained in the [glossary](/start/glossary/). ## Next [Section titled “Next”](#next) * What exactly is delivered—[What is delivered](/platform/delivery/). * What it looks like under your brand—[White-label setup](/platform/white-label/). * How to verify on your own files—[Pilot and acceptance](/platform/pilot/). # Customizing for your brand > What you can change, and what stays in the core: brand, styling, navigation, commands, storage, users, events, and localization. White-label delivery isn’t a cosmetic wrapper over someone else’s product; it’s a division of responsibility. The outward-facing product and the user journey belong to you. The meaning of the document and the spreadsheet — how the file is parsed, calculated, and written — stays in the core and doesn’t fork. For the business this means one thing: the editor carries your name and lives in your process, but you don’t end up with your own version of the engine that you’d have to maintain, update, and audit for security. | Area | What you can change | What you can’t do | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | Brand | The product name, logo, tab icon, links to legal documents, shell colors. | Change document content bypassing the core. | | Styling | Documents have five theme variables and a choice of light or dark theme. Spreadsheets don’t have such a list yet: the public embedding kit is still being finalized — [what’s in it today](/sumsheet/embedding-api/). | Changing the canvas geometry with styles: page layout is calculated in the core, and the screen will diverge from the file. | | Navigation | Your application’s routes, where open and save live, your own side panel, tooltips, and onboarding. | Relying on the internal structure of the interface: it changes without notice. | | Commands | Showing commands based on declared capabilities, enabling and disabling them by your own rules, adding your own panels. For spreadsheets, the list of commands ships in the delivery as a registry: 472 commands on 28 interface surfaces, each recording where it lives and which checks cover it. You can plan from the registry; you can’t plan from screenshots. | Show commands that aren’t in the declared profile: the user will click and get a refusal. | | Storage | Your own open and save adapters — or the ready-made WOPI client, if your document management system speaks it; version history, autosave rules, auditing. | Bypass the save contract or write to the document file directly. | | Users | The account from your sign-in system, workspace context, roles. | Pass credentials into document data or into logs. | | Events | Analytics and audit through the public set of events. | Treating internal interface events as a public contract. | | Localization | Language packs, your own terminology in labels. | Split the meaning of the same command across different brands. | ## How deep you can go [Section titled “How deep you can go”](#how-deep-you-can-go) * **The ready-made shell.** The ribbon, grid, dialogs, and File menu entirely from us, inside your window. For documents, the server option provides such a shell: the whole editor opens in an embed on your site. The standalone SumDoc surface for your own window isn’t it: today it’s a limited set that proves the embedding boundary, not a ribbon with dialogs ([what’s in it](/sumdoc/embedding/)). * **The mixed option.** The document or spreadsheet canvas from us, while the interface frame, panels, and industry-specific commands are yours. The only one of the four that starts with a conversation rather than a download: for documents, the set of your own panels and menu items [is fixed in the pilot](/sumdoc/status/); for spreadsheets, the public embedding kit is still being finalized. * **Core only.** Your interface calls the public operations and renders what it gets back itself. * **Automation only.** A headless process: batch processing, agents, checks, and document creation. ## For developers [Section titled “For developers”](#for-developers) * Theme variables of the SumDoc surface: `--fastdoc-accent`, `--fastdoc-background`, `--fastdoc-foreground`, `--fastdoc-muted`, `--fastdoc-paper`. * The SumSheet interface is driven by a registry of 472 commands — each records which of the 28 surfaces it lives on — besides the File menu and the Data, Insert, View, Layout, and Review ribbons, these are the canvas, the formula bar, dialogs, and the contextual ribbons for tables, pivots, and charts — and at which stage it becomes available; five commands are marked as not exposed outward — your own shell has nothing to show them with. * Allowed and forbidden customization points of SumDoc — [Responsibility and security](/sumdoc/responsibility/); the boundary between the surface and the SumSheet core — [the embedding kit](/sumsheet/embedding-api/). # Missing APIs and compatibility > What's explicitly not in the current contract, and how that affects integration planning. What follows is about the embedding contract — what’s available to your application from the outside: session commands and the browser surface. Inside the desktop SumDoc application itself, its shell can do more, but that’s its internal exchange, and you can’t rely on it for integration. | What’s missing | What to use instead | | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Click and double-click | Not in the public surface contract. Inside the product, text, tables, borders, and autofit width are handled — [what of this will make it into the contract](/sumdoc/status/) | | Right-click and custom menu items | Not in the contract. Inside the product, the text and table menus work over their own internal channel, but a way to plug in your own hasn’t been settled yet — [Readiness and boundaries](/sumdoc/status/) | | A public “what’s under this point” call | Not in the session or the surface; available as a separate processor command: [`hit-test-docx`](/sumdoc/hit-test/) | | Editing an arbitrary node | There’s no single universal command | | Stable version numbering | No: the contract is marked `1.0.0-draft` | | WebSocket from outside, without a token | Not allowed: only a local interface, with a token | | Binary WebSocket frames | Requests travel only as UTF-8 text frames. A binary frame gets the refusal “session WebSocket requests must be UTF-8 text frames”, and the connection stays open | | Your own copy of the document in the editor window | Not allowed: the model, history, and file writing belong to the core | While the contract is marked `1.0.0-draft`, pin the checksum and version of the executable together with the type declarations, and on startup check the schema of the greeting message and the `supported_commands` list — both arrive in the very first line of the session. # SumDoc session and conventions > What matters before your first call: request correlation, command order, required edit fields, the unsaved-changes flag, ending the session, and the absence of timeouts. **How names are written.** SumDoc has three different conventions, and you shouldn’t mix them up. Command names use a hyphen or a single word: `save-checkpoint`, `print-window`, `model`, `mutate`; there isn’t a single underscore in a command name. Field names, by contrast, use an underscore: `document_id`, `paragraph_index`, `operation_kind`, `expected_revision`. And field values chosen from a list go back to a hyphen: `insert-text`, `delete-line-break`, `merge-with-next`. A spelling mistake returns a refusal that reads as “command not supported”, even though it’s a single character. And here’s an exception worth knowing in advance. The hyphen rule holds for `operation_kind` on the `mutate` command. For the typed `apply-text-transaction` transaction, the kind of action lives in a different field — `command.type` — and its values are written **with an underscore**: `insert_text`, `delete_range`, `merge_paragraphs`, `paste_plain_text`. So the same action is written differently in the two commands: `insert-text` for `mutate` and `insert_text` for the transaction. The word “list” is a loose term here: the contract doesn’t declare a single list of edit kinds — they’re documented at the places where they apply. An unknown kind doesn’t break the document and doesn’t come back as an envelope failure: the response is `ok: true`, `result.mutation.result_kind` is `invalid-request`, and the workbook stays unchanged. So the working set of edit kinds comes from what [gets settled before integration begins](/sumdoc/status/): it’s agreed on together with the confirmation payload and the list of errors. For comparison: in SumSheet, fields are written in camelCase — `subsetId`, `sheetKey` — with no underscores. If you embed both products, don’t look for a name from one in the other. **Two more differences that matter when embedding both.** Here, a refusal comes as an `error` field — a reason in words; SumDoc has no separate code to branch handling on, and this [gets settled before integration begins](/sumdoc/status/). SumSheet has such a field, called `code`, and the habit of branching on it doesn’t carry over here — see [how to read a response](/sumdoc/envelope/). And the exchange: here it’s strictly alternating — a request line, a response line. The SumDoc processor never asks questions of its own and never reaches out over the network. SumSheet is different: there, the core can send a line of its own and wait for your answer, so you can’t write one shared stream-reading routine for both products — see [how the conversation with SumSheet works](/sumsheet/session/). **What sizes are measured in.** There are two units, and the field name tells you which. Fields ending in `_twips` are in twips: a Word markup unit, one 1,440th of an inch. An inch is 1440 twips, a centimeter is about 567, and the standard 2.54 cm page margin is exactly 1440. Fields ending in `_milli_px` are in thousandths of a pixel: 96000 means 96 px, not ninety-six thousand. The first comes from the document format, the second from the screen, and you shouldn’t mix them. **Correlation.** The `id` field is optional and accepts any JSON value — a string or a number. The core returns it unchanged, so it’s what you use to match a response to a request; the field is always present in the response and is `null` if the request didn’t carry one. **Order.** The session keeps state between commands. A command that needs an open document refuses, before `open`, with the text `no document is open in this session`. **Editing.** For `mutate`, `operation_kind` and `paragraph_index` are required — the other fields have default values. Paragraphs are numbered from zero. Edit kinds are listed in [Request and response objects](/sumdoc/envelope/). **Unsaved changes.** The `dirty` flag means the current model differs from the last saved state, not that the document is corrupted. **Ending the session.** The response to `shutdown` contains `shutdown: true` and contains none of `cmd`, `elapsed_ms`, or `result`. **Response time.** There’s no timeout in the session: the response arrives when the command has been processed. Any time limit is set by the client. The only timeout on the SumDoc side is five seconds for reading an HTTP request in Surface Host. **Saving.** The file is published atomically: the write goes to a temporary file next to the target, the content is flushed to disk, and only then does it replace the target. An interrupted write never leaves a half-written DOCX file — see [Document lifecycle](/sumdoc/lifecycle/). The `save-checkpoint` command additionally checks the file against the state passed in `expected_hash`, and refuses if it was changed from outside. The message format and refusal codes are in [Transport](/reference/sumdoc/transport/); the list of commands is in [Session Protocol](/reference/sumdoc/session-protocol/). # DTO · api-document.ts > 44 interfaces and 1 type alias of the shell contract — working with the document: opening and resolving paths, media export, report snapshots, support markers, and package relationships. 44 interfaces and 1 type alias — working with the document: opening and resolving paths, media export, report snapshots, support markers, and package relationships. Internal contract These types describe the exchange inside the desktop SumDoc window. For embedding in your product, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). Some types include internal tags such as `backlog_id: "D38"` or `sharedSceneOwner: "D5"` — these are the task numbers the feature was filed under inside the team. They appear in the response, but embedding doesn’t need them: there’s no reason to parse or store them. Contract module: `api-document.ts`. Types on this page — 45 * [`OpenExternalHyperlinkResult`](#openexternalhyperlinkresult) * [`ShellShareClipboardResult`](#shellshareclipboardresult) * [`ShellRevealPathResult`](#shellrevealpathresult) * [`ShellSupportMarker`](#shellsupportmarker) * [`ShellDetectedFeature`](#shelldetectedfeature) * [`ShellRelationshipSnapshot`](#shellrelationshipsnapshot) * [`ShellMediaAsset`](#shellmediaasset) * [`ShellMediaAssetOwner`](#shellmediaassetowner) * [`ShellLoadedDocument`](#shellloadeddocument) * [`ShellDocumentPageWindowTelemetry`](#shelldocumentpagewindowtelemetry) * [`ShellDocumentPageWindowResult`](#shelldocumentpagewindowresult) * [`ShellFileSessionRecoveryCandidate`](#shellfilesessionrecoverycandidate) * [`ShellFileSessionRecoveryState`](#shellfilesessionrecoverystate) * [`ShellAutosaveRecoverySettings`](#shellautosaverecoverysettings) * [`ShellAutosaveRecoveryCandidate`](#shellautosaverecoverycandidate) * [`ShellVersionHistoryEntry`](#shellversionhistoryentry) * [`ShellVersionHistoryResult`](#shellversionhistoryresult) * [`ShellDocxCompatibilityIssue`](#shelldocxcompatibilityissue) * [`ShellDocxCompatibilityReport`](#shelldocxcompatibilityreport) * [`ShellDocxCompatibilityCommandResult`](#shelldocxcompatibilitycommandresult) * [`ShellDocxCompatibilityOperationResult`](#shelldocxcompatibilityoperationresult) * [`ShellExternalChangePromptState`](#shellexternalchangepromptstate) * [`ShellBridgeState`](#shellbridgestate) * [`ShellExportCurrentDocumentImagesRequest`](#shellexportcurrentdocumentimagesrequest) * [`ShellSaveRenderedCanvasImagesRequest`](#shellsaverenderedcanvasimagesrequest) * [`ShellSaveRenderedCanvasImagesResult`](#shellsaverenderedcanvasimagesresult) * [`ShellExportCurrentImageWorkflowImagesRequest`](#shellexportcurrentimageworkflowimagesrequest) * [`ShellCurrentImageWorkflowExportPlanRequest`](#shellcurrentimageworkflowexportplanrequest) * [`ShellCurrentImageWorkflowExportPlan`](#shellcurrentimageworkflowexportplan) * [`ShellExportCurrentDocumentImagesResult`](#shellexportcurrentdocumentimagesresult) * [`ShellCopyCurrentImageWorkflowImageResult`](#shellcopycurrentimageworkflowimageresult) * [`ShellCompressCurrentImageWorkflowImageRequest`](#shellcompresscurrentimageworkflowimagerequest) * [`ShellCompressCurrentImageWorkflowImageResult`](#shellcompresscurrentimageworkflowimageresult) * [`ShellReplaceCurrentImageWorkflowImageRequest`](#shellreplacecurrentimageworkflowimagerequest) * [`ShellReplaceCurrentImageWorkflowImageResult`](#shellreplacecurrentimageworkflowimageresult) * [`ShellDocumentWindowDescriptor`](#shelldocumentwindowdescriptor) * [`ShellDocumentWindowSession`](#shelldocumentwindowsession) * [`ShellDocumentSessionSelection`](#shelldocumentsessionselection) * [`ShellDocumentSessionSnapshot`](#shelldocumentsessionsnapshot) * [`ShellExactPageCountStatus`](#shellexactpagecountstatus) * [`ShellCanonicalSceneRefreshed`](#shellcanonicalscenerefreshed) * [`ShellRendererCapabilities`](#shellrenderercapabilities) * [`ShellDocumentPatchState`](#shelldocumentpatchstate) * [`ShellDocumentPatch`](#shelldocumentpatch) * [`ShellDocumentPatchOutcome`](#shelldocumentpatchoutcome) ### OpenExternalHyperlinkResult [Section titled “OpenExternalHyperlinkResult”](#openexternalhyperlinkresult) `InterfaceDeclaration` · `api-document.ts` ```ts interface OpenExternalHyperlinkResult { requested: boolean; opened: boolean; smokeBlocked: boolean; target: string | null; normalizedTarget: string | null; protocol: string | null; reason: string | null; } ``` ### ShellShareClipboardResult [Section titled “ShellShareClipboardResult”](#shellshareclipboardresult) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellShareClipboardResult { copied: boolean; length: number; text: string; } ``` ### ShellRevealPathResult [Section titled “ShellRevealPathResult”](#shellrevealpathresult) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellRevealPathResult { revealed: boolean; smokeBlocked: boolean; path: string | null; reason: string | null; } ``` ### ShellSupportMarker [Section titled “ShellSupportMarker”](#shellsupportmarker) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellSupportMarker { kind: string; location: string; detail: string; } ``` ### ShellDetectedFeature [Section titled “ShellDetectedFeature”](#shelldetectedfeature) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellDetectedFeature { kind?: string; location?: string; detail?: string; } ``` ### ShellRelationshipSnapshot [Section titled “ShellRelationshipSnapshot”](#shellrelationshipsnapshot) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellRelationshipSnapshot { relationship_part_name?: string; owner_part_name?: string; relationship_id?: string; relationship_type?: string; target?: string; target_mode?: string; resolved_target?: string; target_status?: string; } ``` ### ShellMediaAsset [Section titled “ShellMediaAsset”](#shellmediaasset) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellMediaAsset { source_part_name: string; content_kind: string; data_url: string; byte_len: number; fingerprint: string; owner_count?: number; supported_owner_count?: number; ownership_status?: string; owners?: ShellMediaAssetOwner[]; } ``` ### ShellMediaAssetOwner [Section titled “ShellMediaAssetOwner”](#shellmediaassetowner) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellMediaAssetOwner { object_kind: string; location: string; ownerLocation?: string; relationship_id: string; relationshipId?: string; target_part_name: string; sourcePartName?: string; relationship_part_name: string | null; relationship_target_status: string | null; drawing_fill_mode: string | null; drawing_tile_present: boolean | null; supported_ownership: boolean; } ``` ### ShellLoadedDocument [Section titled “ShellLoadedDocument”](#shellloadeddocument) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellLoadedDocument { path: string; displayName: string; openedAt: string; command_output_route?: CommandOutputRouteKind; document_auto_hyphenation_enabled?: boolean; report: ShellReportSnapshot; review: ShellReviewSnapshot; model: CanonicalCommentModelLike & Record; style: unknown; pageSetup: { current_page_setup?: { gutter_twips?: number; gutter_position?: string; gutter_at_top_enabled?: boolean; page_width_twips?: number; page_height_twips?: number; paper_size?: string; paper_source_first?: number | null; paper_source_other?: number | null; multiple_pages?: string; vertical_alignment?: string; suppress_endnotes?: boolean; section_start?: string; title_page_enabled?: boolean; even_and_odd_headers_enabled?: boolean; header_distance_twips?: number; footer_distance_twips?: number; line_numbering_restart_mode?: string | null; line_numbering_count_by?: number | null; line_numbering_start?: number | null; line_numbering_distance_twips?: number | null; }; }; compose: ShellParagraphCompositionSnapshot; paginate: ShellPaginateSnapshot; print: ShellPrintSnapshot; media_assets?: ShellMediaAsset[]; source_format?: "docx" | "docm" | "odt"; read_only?: boolean; odt_editable_copy?: { status: "editable" | "source-missing" | "source-changed" | "copy-changed" | "preflight-blocked"; original_source_path: string; original_source_fingerprint: string; copy_fingerprint: string; detail: string | null; }; support_summary?: unknown; load_state?: "first-usable" | "complete"; canonical_edit_projections_complete?: true; open_stage_timings_ms?: Record; trust?: { state: "normal" | "protected-view" | "blocked-malformed" | "blocked-encrypted"; reasons: string[]; externalRelationships?: number; macrosPresent?: boolean; embeddedObjectsPresent?: boolean; signaturePresent: boolean; malformed?: boolean; encryptedPackageUnsupported?: boolean; sourceExecutionAllowed: false; }; } ``` ### ShellDocumentPageWindowTelemetry [Section titled “ShellDocumentPageWindowTelemetry”](#shelldocumentpagewindowtelemetry) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellDocumentPageWindowTelemetry { requestId: number; requestedPageIndex: number; payloadBytes: number; durationMs: number; sceneCacheCount: number; sceneCachePeak: number; sceneCacheLimit: number; droppedRequestCount: number; } ``` ### ShellDocumentPageWindowResult [Section titled “ShellDocumentPageWindowResult”](#shelldocumentpagewindowresult) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellDocumentPageWindowResult { materialized: boolean; canceled?: boolean; sourceDocumentFingerprint?: string; pageIndexes: number[]; pages?: ShellPrintSnapshot["pages"]; modelBlocks?: Array>; evictedPageIndexes?: number[]; mediaAssets?: ShellMediaAsset[]; telemetry?: ShellDocumentPageWindowTelemetry; } ``` ### ShellFileSessionRecoveryCandidate [Section titled “ShellFileSessionRecoveryCandidate”](#shellfilesessionrecoverycandidate) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellFileSessionRecoveryCandidate { recoveryId: string; documentPath: string | null; displayName: string; capturedAtLabel: string; reasonLabel: string; } ``` ### ShellFileSessionRecoveryState [Section titled “ShellFileSessionRecoveryState”](#shellfilesessionrecoverystate) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellFileSessionRecoveryState { status: "none" | "available" | "recovering" | "recovered" | "error"; candidate: ShellFileSessionRecoveryCandidate | null; errorMessage: string | null; } ``` ### ShellAutosaveRecoverySettings [Section titled “ShellAutosaveRecoverySettings”](#shellautosaverecoverysettings) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellAutosaveRecoverySettings { schema: "fastdoc.autosave-recovery.settings.v1"; enabled: boolean; intervalSeconds: number; retention: { maxSnapshotsPerDocument: number; maxAgeDays: number; maxTotalBytes: number; }; } ``` ### ShellAutosaveRecoveryCandidate [Section titled “ShellAutosaveRecoveryCandidate”](#shellautosaverecoverycandidate) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellAutosaveRecoveryCandidate { recoveryId: string; documentId: string; displayName: string; capturedAt: string; sourcePath: string | null; movedSourcePath: string | null; sourceStatus: "available" | "untitled" | "missing" | "moved" | "externally-replaced" | "read-only"; snapshotPath: string; snapshotHealth: "ready" | "missing" | "corrupt"; sessionId: string; retentionExhausted: boolean; } ``` ### ShellVersionHistoryEntry [Section titled “ShellVersionHistoryEntry”](#shellversionhistoryentry) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellVersionHistoryEntry { id: string; documentId: string; snapshotPath: string; createdAt: string; reason: "manual-save" | "autosave" | "recovery" | "restore" | "save-as"; fileName: string; sizeBytes: number; sha256: string; name: string | null; pinned: boolean; recoverySessionId: string | null; sourcePath: string; health: "ready" | "missing" | "corrupt"; } ``` ### ShellVersionHistoryResult [Section titled “ShellVersionHistoryResult”](#shellversionhistoryresult) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellVersionHistoryResult { documentPath: string; versions: ShellVersionHistoryEntry[]; } ``` ### ShellDocxCompatibilityIssue [Section titled “ShellDocxCompatibilityIssue”](#shelldocxcompatibilityissue) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellDocxCompatibilityIssue { code: string; severity: "info" | "warning" | "error" | "blocker"; part: string; relationship_id: string | null; impact: string; allowed_action: string; repairable: boolean; detail: string; } ``` ### ShellDocxCompatibilityReport [Section titled “ShellDocxCompatibilityReport”](#shelldocxcompatibilityreport) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellDocxCompatibilityReport { schema: "fastdoc.docx-compatibility-report.v1"; package_kind: "docx" | "docm"; producer_hint: string; trusted_open_allowed: boolean; repair_copy_allowed: boolean; repair_required: boolean; macro_payload_present: boolean; macro_execution_allowed: false; external_relationships_resolved: false; source_part_count: number; relationship_count: number; preserved_opaque_part_count: number; issues: ShellDocxCompatibilityIssue[]; } ``` ### ShellDocxCompatibilityCommandResult [Section titled “ShellDocxCompatibilityCommandResult”](#shelldocxcompatibilitycommandresult) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellDocxCompatibilityCommandResult { schema: "fastdoc.docx-compatibility-command.v1"; action: "check-compatibility" | "inspect-package" | "repair-copy"; source_path: string; output_path: string | null; source_sha256_before: string; source_sha256_after: string; source_size_bytes: number; source_unchanged: boolean; output_sha256: string | null; saves_completed: number; reopens_completed: number; temp_files_cleaned: boolean; macro_execution_allowed: false; applied_rules: string[]; report: ShellDocxCompatibilityReport; report_after: ShellDocxCompatibilityReport | null; } ``` ### ShellDocxCompatibilityOperationResult [Section titled “ShellDocxCompatibilityOperationResult”](#shelldocxcompatibilityoperationresult) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellDocxCompatibilityOperationResult { canceled: boolean; opened: boolean; outputPath: string | null; result: ShellDocxCompatibilityCommandResult | null; } ``` ### ShellExternalChangePromptState [Section titled “ShellExternalChangePromptState”](#shellexternalchangepromptstate) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellExternalChangePromptState { status: "none" | "prompt"; kind: "modified" | "deleted" | "moved" | "read-only" | "corrupt" | null; documentPath: string; diskPath: string | null; diskHash: string | null; dirty: boolean; revision: number; message: string | null; choices: Array<"keep-current" | "keep-mine" | "reload-disk" | "save-mine-copy" | "compare" | "cancel">; reloadAllowed: boolean; } ``` ### ShellBridgeState [Section titled “ShellBridgeState”](#shellbridgestate) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellBridgeState { document: ShellLoadedDocument | null; canonicalHistory?: { owner: "rust-session"; historyOwner: "rust-session" | "canonical_rust_session_m9"; available: boolean; sessionId: string | null; documentId: string | null; transactionOrder: number; acceptedRevision: number; selectionRevision: number; publishedRevision: number; dirty: boolean; modelHash: string | null; undoDepth: number; redoDepth: number; typingAttributes: CharacterProperties; undoTransactions: Array<{ transitionKind: string; packageStructural?: boolean; transactionOrder: number; beforeModelHash: string; afterModelHash: string; paragraphIndex?: number; beforeCaretSlotIndex?: number; afterCaretSlotIndex?: number; }>; redoTransactions: Array<{ transitionKind: string; packageStructural?: boolean; transactionOrder: number; beforeModelHash: string; afterModelHash: string; paragraphIndex?: number; beforeCaretSlotIndex?: number; afterCaretSlotIndex?: number; }>; }; easyEditCapability?: EasyEditBodyTextCapability; recentDocuments?: Array<{ path: string; name: string; parentLabel: string; lastOpenedLabel: string; pinned: boolean; availability: "available" | "missing"; }>; restoreLastDocument: boolean; liveTextEditEligible: boolean; trackRevisionsEnabled: boolean; saveInPlaceEligible: boolean; hasUnpublishedChainHead: boolean; acceptedChainModelHash?: string | null; publicationDirty?: boolean; persistentProjectionQuarantine?: string | null; publishTargetPath: string | null; documentIsChainContinuation?: boolean; canonicalHistoryNavigation?: boolean; liveTextChainInputPath: string | null; compareDocument: ShellLoadedDocument | null; errorMessage: string | null; fileSessionRecovery: ShellFileSessionRecoveryState; availableFixtures: ShellFixtureOption[]; smokeMode: SmokeMode; smokeFieldCommandCenterActionId: string | null; smokeArtifactRoot?: string | null; wordSurfaceCaptureText: string | null; wordSurfaceCaptureOutputSuffix: string | null; wordSurfaceVisibleReplayDelayMs: number; wordSurfaceShowFormattingMarks: boolean; launchConfig: { hideLeftPanel: boolean; hideRightPanel: boolean; canvasOnly: boolean; surfaceMode: "default" | "word-surface-control-sheet"; d5GlyphEdgeCoverageShapeMaterial: boolean; editableLauncher: boolean; saveInPlace: boolean; editorV0RibbonInsertImageSmokeOutputPath: string | null; editorV0RibbonInsertImageSmokeImagePath: string | null; editorV0RibbonInsertImageSmokeMenuScreenshotPath: string | null; smokeSeedViewPreferencesActiveRibbonTabView: boolean; }; runtimeFontFaceCss: string; availableFontFamilyNames: string[]; cloudDownloadableFontFamilyNames: string[]; windowChrome: { customTitlebar: boolean; trafficLightsInset: boolean; platform: string; }; } ``` ### ShellExportCurrentDocumentImagesRequest [Section titled “ShellExportCurrentDocumentImagesRequest”](#shellexportcurrentdocumentimagesrequest) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellExportCurrentDocumentImagesRequest { renderedCanvas?: ShellSaveRenderedCanvasImagesRequest; outputDir?: string | null; sourcePartName?: string | null; sourcePartNames?: string[] | string | null; relationshipId?: string | null; relationshipIds?: string[] | string | null; ownerLocation?: string | null; ownerLocations?: string[] | string | null; ownerRef?: string | Record | null; ownerRefs?: Array> | string | null; ownerReferences?: Array> | string | null; owner_ref?: string | Record | null; owner_refs?: Array> | string | null; owner_references?: Array> | string | null; drawingSupportStatus?: string | null; drawingSupportStatuses?: string[] | string | null; drawing_support_status?: string | null; drawing_support_statuses?: string[] | string | null; } ``` ### ShellSaveRenderedCanvasImagesRequest [Section titled “ShellSaveRenderedCanvasImagesRequest”](#shellsaverenderedcanvasimagesrequest) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellSaveRenderedCanvasImagesRequest { scope: "selected-object" | "document-pages"; format: "png" | "jpeg"; images: Array<{ name: string; dataUrl: string; pageIndex?: number | null; }>; outputDir?: string | null; outputPath?: string | null; } ``` ### ShellSaveRenderedCanvasImagesResult [Section titled “ShellSaveRenderedCanvasImagesResult”](#shellsaverenderedcanvasimagesresult) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellSaveRenderedCanvasImagesResult { schema: "fastdoc.shell.text-087-094-rendered-canvas-images.v1"; backlogIds: [ "TEXT-087", "TEXT-094" ]; saved: boolean; canceled: boolean; scope: "selected-object" | "document-pages"; format: "png" | "jpeg"; outputFiles: string[]; outputDir?: string | null; sourceDocxMutated: false; } ``` ### ShellExportCurrentImageWorkflowImagesRequest [Section titled “ShellExportCurrentImageWorkflowImagesRequest”](#shellexportcurrentimageworkflowimagesrequest) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellExportCurrentImageWorkflowImagesRequest { outputDir?: string | null; ownerRef?: string | Record | null; ownerRefs?: Array> | string | null; ownerReferences?: Array> | string | null; owner_ref?: string | Record | null; owner_refs?: Array> | string | null; owner_references?: Array> | string | null; drawingSupportStatus?: string | null; drawingSupportStatuses?: string[] | string | null; drawing_support_status?: string | null; drawing_support_statuses?: string[] | string | null; } ``` ### ShellCurrentImageWorkflowExportPlanRequest [Section titled “ShellCurrentImageWorkflowExportPlanRequest”](#shellcurrentimageworkflowexportplanrequest) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellCurrentImageWorkflowExportPlanRequest { outputDir?: string | null; ownerRef?: string | Record | null; ownerRefs?: Array> | string | null; ownerReferences?: Array> | string | null; owner_ref?: string | Record | null; owner_refs?: Array> | string | null; owner_references?: Array> | string | null; } ``` ### ShellCurrentImageWorkflowExportPlan [Section titled “ShellCurrentImageWorkflowExportPlan”](#shellcurrentimageworkflowexportplan) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellCurrentImageWorkflowExportPlan { schema: "fastdoc.shell.d38-current-image-workflow-export-plan.v1"; backlog_id: "TEXT-271"; document_path?: string | null; documentPath?: string | null; computed: boolean; export_available: boolean; exportAvailable: boolean; reason: string; exportable_owner_ref_count: number; exportableOwnerRefCount: number; source_part_names: string[]; sourcePartNames: string[]; relationship_ids: string[]; relationshipIds: string[]; owner_locations: string[]; ownerLocations: string[]; owner_refs: Array>; ownerRefs: Array>; planned_items: Array>; plannedItems: Array>; claims: Record; support_markers: string[]; supportMarkers: string[]; } ``` ### ShellExportCurrentDocumentImagesResult [Section titled “ShellExportCurrentDocumentImagesResult”](#shellexportcurrentdocumentimagesresult) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellExportCurrentDocumentImagesResult { schema: "fastdoc.shell.text-271-export-current-images.v1"; backlog_id: "TEXT-271"; document_path?: string | null; output_dir?: string | null; exported: boolean; reason: string | null; image_count: number; filter_applied: boolean; filter: Record; requested_filters: Record; supported_media_part_count: number; deferred_media_part_count: number; source_docx_mutated: boolean; claims: Record; images: Array>; current_media_assets: Array>; current_deferred_image_objects: Array>; current_image_workflow: Record; currentImageWorkflow: Record; workflow_export?: Record; workflowExport?: Record; manifest_written?: boolean; manifestWritten?: boolean; manifest_path?: string | null; manifestPath?: string | null; index_written?: boolean; indexWritten?: boolean; index_path?: string | null; indexPath?: string | null; index_row_count?: number; indexRowCount?: number; html_index_written?: boolean; htmlIndexWritten?: boolean; html_index_path?: string | null; htmlIndexPath?: string | null; html_index_row_count?: number; htmlIndexRowCount?: number; summary_written?: boolean; summaryWritten?: boolean; summary_path?: string | null; summaryPath?: string | null; workflow_export_summary?: Record; workflowExportSummary?: Record; workflow_export_manifest?: Record; workflowExportManifest?: Record; support_markers: string[]; } ``` ### ShellCopyCurrentImageWorkflowImageResult [Section titled “ShellCopyCurrentImageWorkflowImageResult”](#shellcopycurrentimageworkflowimageresult) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellCopyCurrentImageWorkflowImageResult { schema: "fastdoc.shell.d38-selected-image-clipboard-copy.v1"; copied: boolean; reason: string | null; document_path?: string | null; output_dir?: string | null; owner_refs: Array>; image_count: number; source_part_name?: string | null; output_path?: string | null; clipboard_image_size?: { width: number; height: number; } | null; clipboardImageSize?: { width: number; height: number; } | null; export_result?: Record; claims: Record; support_markers: string[]; } ``` ### ShellCompressCurrentImageWorkflowImageRequest [Section titled “ShellCompressCurrentImageWorkflowImageRequest”](#shellcompresscurrentimageworkflowimagerequest) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellCompressCurrentImageWorkflowImageRequest { ownerRef?: string | Record | null; ownerRefs?: Array> | string | null; outputDocxPath?: string | null; writebackOut?: string | null; maxPixelWidth?: number | null; maxPixelHeight?: number | null; jpegQuality?: number | null; reopenAfterWrite?: boolean | null; } ``` ### ShellCompressCurrentImageWorkflowImageResult [Section titled “ShellCompressCurrentImageWorkflowImageResult”](#shellcompresscurrentimageworkflowimageresult) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellCompressCurrentImageWorkflowImageResult { schema: "fastdoc.shell.d38-picture-format-compress-pictures-action.v1"; backlog_id: "D38"; document_path?: string | null; output_docx_path?: string | null; owner_refs: Array>; max_pixel_width?: number; maxPixelWidth?: number; max_pixel_height?: number; maxPixelHeight?: number; jpeg_quality?: number; jpegQuality?: number; compressed: boolean; replaced: boolean; output_written?: boolean; outputWritten?: boolean; reason: string | null; source_part_name?: string | null; sourcePartName?: string | null; output_path?: string | null; outputPath?: string | null; replacement_image_path?: string | null; replacementImagePath?: string | null; original_byte_len?: number | null; originalByteLen?: number | null; compressed_byte_len?: number | null; compressedByteLen?: number | null; original_pixel_size?: { width: number; height: number; } | null; originalPixelSize?: { width: number; height: number; } | null; compressed_pixel_size?: { width: number; height: number; } | null; compressedPixelSize?: { width: number; height: number; } | null; byte_reduction?: number | null; byteReduction?: number | null; export_result?: Record; replace_result?: Record; replaceResult?: Record; claims: Record; support_markers: string[]; } ``` ### ShellReplaceCurrentImageWorkflowImageRequest [Section titled “ShellReplaceCurrentImageWorkflowImageRequest”](#shellreplacecurrentimageworkflowimagerequest) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellReplaceCurrentImageWorkflowImageRequest { ownerRef?: string | Record | null; ownerRefs?: Array> | string | null; replacementImagePath?: string | null; outputDocxPath?: string | null; writebackOut?: string | null; widthEmu?: number | null; heightEmu?: number | null; altTitle?: string | null; altDescription?: string | null; preserveAspectRatio?: boolean | null; resetToOriginalEmbeddedExtent?: boolean | null; resetExtent?: boolean | null; cropMode?: "fit" | "fill" | "fill-center" | "fill-left" | "fill-right" | "reset" | "custom" | null; cropL?: number | null; cropT?: number | null; cropR?: number | null; cropB?: number | null; wrapMode?: "inline" | "square" | "tight" | "through" | "top-bottom" | "behind-text" | "in-front-of-text" | null; wrapSide?: "bothSides" | "left" | "right" | "largest" | null; wrapPointsPreset?: "inset-rectangle" | null; wrapDistanceTopEmu?: number | null; wrapDistanceBottomEmu?: number | null; wrapDistanceLeftEmu?: number | null; wrapDistanceRightEmu?: number | null; arrangeMode?: "bring-forward" | "send-backward" | "bring-front" | "send-back" | "behind-text" | "in-front-of-text" | null; alignMode?: "left" | "center" | "right" | null; verticalAlignMode?: "top" | "center" | "bottom" | null; alignRelativeFrom?: "page" | "margin" | null; rotateDegrees?: number | null; flipMode?: "horizontal" | "vertical" | "none" | null; removeBackgroundMode?: "corner-color" | "edge-color" | "white" | "auto" | null; compressPictureMode?: "email-96ppi" | "web-150ppi" | "print-220ppi" | null; reopenAfterWrite?: boolean | null; } ``` ### ShellReplaceCurrentImageWorkflowImageResult [Section titled “ShellReplaceCurrentImageWorkflowImageResult”](#shellreplacecurrentimageworkflowimageresult) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellReplaceCurrentImageWorkflowImageResult { schema: "fastdoc.shell.d38-selected-image-replace-media-copy.v1"; backlog_id: "D38"; document_path?: string | null; output_docx_path?: string | null; outputDocxPath?: string | null; replacement_image_path?: string | null; owner_refs: Array>; replaced: boolean; resized?: boolean; reset_to_original_embedded_extent_performed?: boolean; resetToOriginalEmbeddedExtentPerformed?: boolean; reason: string | null; cli_result?: Record | null; cliResult?: Record | null; output_written?: boolean; outputWritten?: boolean; source_unchanged?: boolean; sourceUnchanged?: boolean; reopen_after_write?: boolean; reopenAfterWrite?: boolean; reopened_document_path?: string | null; reopenedDocumentPath?: string | null; source_part_name?: string | null; sourcePartName?: string | null; replacement_byte_len?: number | null; replacementByteLen?: number | null; remove_background_mode?: string | null; removeBackgroundMode?: string | null; remove_background_performed?: boolean | null; removeBackgroundPerformed?: boolean | null; remove_background_transparent_pixel_count?: number | null; removeBackgroundTransparentPixelCount?: number | null; compress_picture_mode?: string | null; compressPictureMode?: string | null; picture_compression_performed?: boolean | null; pictureCompressionPerformed?: boolean | null; picture_compression_original_pixel_width?: number | null; pictureCompressionOriginalPixelWidth?: number | null; picture_compression_original_pixel_height?: number | null; pictureCompressionOriginalPixelHeight?: number | null; picture_compression_pixel_width?: number | null; pictureCompressionPixelWidth?: number | null; picture_compression_pixel_height?: number | null; pictureCompressionPixelHeight?: number | null; affected_owner_count?: number | null; affectedOwnerCount?: number | null; before_extent_emu?: Record | null; beforeExtentEmu?: Record | null; requested_extent_emu?: Record | null; requestedExtentEmu?: Record | null; original_embedded_extent_emu?: Record | null; originalEmbeddedExtentEmu?: Record | null; after_extent_emu?: Record | null; afterExtentEmu?: Record | null; extent_changed?: boolean | null; extentChanged?: boolean | null; crop_changed?: boolean | null; cropChanged?: boolean | null; wrap_changed?: boolean | null; wrapChanged?: boolean | null; wrap_side_changed?: boolean | null; wrapSideChanged?: boolean | null; wrap_points_changed?: boolean | null; wrapPointsChanged?: boolean | null; wrap_distance_changed?: boolean | null; wrapDistanceChanged?: boolean | null; display_name_changed?: boolean | null; displayNameChanged?: boolean | null; hidden_changed?: boolean | null; hiddenChanged?: boolean | null; arrange_changed?: boolean | null; arrangeChanged?: boolean | null; position_behavior_changed?: boolean | null; positionBehaviorChanged?: boolean | null; image_effect_changed?: boolean | null; imageEffectChanged?: boolean | null; picture_style_changed?: boolean | null; pictureStyleChanged?: boolean | null; picture_shape_changed?: boolean | null; pictureShapeChanged?: boolean | null; alt_title_before?: string | null; altTitleBefore?: string | null; alt_title_after?: string | null; altTitleAfter?: string | null; alt_description_before?: string | null; altDescriptionBefore?: string | null; alt_description_after?: string | null; altDescriptionAfter?: string | null; alt_text_changed?: boolean | null; altTextChanged?: boolean | null; claims: Record; support_markers: string[]; } ``` ### ShellDocumentWindowDescriptor [Section titled “ShellDocumentWindowDescriptor”](#shelldocumentwindowdescriptor) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellDocumentWindowDescriptor { windowId: number; webContentsId: number; title: string; documentPath: string | null; documentIdentity: string | null; active: boolean; ready: boolean; dirty: boolean; } ``` ### ShellDocumentWindowSession [Section titled “ShellDocumentWindowSession”](#shelldocumentwindowsession) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellDocumentWindowSession { windowId: number | null; sessionRevision: number; windows: ShellDocumentWindowDescriptor[]; snapshot: ShellDocumentSessionSnapshot | null; } ``` ### ShellDocumentSessionSelection [Section titled “ShellDocumentSessionSelection”](#shelldocumentsessionselection) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellDocumentSessionSelection { documentPath: string | null; pageIndex: number; lineLocation: string | null; caretSlotIndex: number | null; selectionStartSlotIndex: number | null; selectionEndSlotIndex: number | null; multiSelectionStartLineLocation: string | null; multiSelectionStartSlotIndex: number | null; multiSelectionEndLineLocation: string | null; multiSelectionEndSlotIndex: number | null; preferredCaretXPx?: number | null; } ``` ### ShellDocumentSessionSnapshot [Section titled “ShellDocumentSessionSnapshot”](#shelldocumentsessionsnapshot) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellDocumentSessionSnapshot { documentPath: string; revision?: number; originWindowId?: number; dirty: boolean; liveEditDraft: Record | null; liveEditUndoStack: Array>; liveEditRedoStack: Array>; selection: ShellDocumentSessionSelection | null; } ``` ### ShellExactPageCountStatus [Section titled “ShellExactPageCountStatus”](#shellexactpagecountstatus) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellExactPageCountStatus { running: boolean; counted: boolean; pageCount: number | null; pageCountSource: string | null; reason: string | null; } ``` ### ShellCanonicalSceneRefreshed [Section titled “ShellCanonicalSceneRefreshed”](#shellcanonicalscenerefreshed) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellCanonicalSceneRefreshed { documentPath: string | null; revision: number; origin: | "neighbour" | "neighbour-advance" | "own-deferred-review" | "own-deferred-scene"; documentRevisionDelta?: number; selectionRevisionDelta?: number; } ``` ### ShellRendererCapabilities [Section titled “ShellRendererCapabilities”](#shellrenderercapabilities) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellRendererCapabilities { documentPatch?: boolean; } ``` ### ShellDocumentPatchState [Section titled “ShellDocumentPatchState”](#shelldocumentpatchstate) `TypeAliasDeclaration` · `api-document.ts` ```ts type ShellDocumentPatchState = Omit< ShellBridgeState, | "document" | "compareDocument" | "runtimeFontFaceCss" | "availableFixtures" | "availableFontFamilyNames" | "cloudDownloadableFontFamilyNames" | "launchConfig" | "windowChrome" | "smokeMode" | "smokeArtifactRoot" | "smokeFieldCommandCenterActionId" | "wordSurfaceCaptureText" | "wordSurfaceCaptureOutputSuffix" | "wordSurfaceVisibleReplayDelayMs" | "wordSurfaceShowFormattingMarks" >; ``` ### ShellDocumentPatch [Section titled “ShellDocumentPatch”](#shelldocumentpatch) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellDocumentPatch { schema: "fastdoc.shell.document-patch.v1"; documentPath: string; revision: number; request_id: string; before_hash: string; after_hash: string; verify: boolean; model_is_windowed?: boolean; windowed_model_hash?: string; foreign?: boolean; model: { patch: unknown; full?: undefined } | { full: unknown; patch?: undefined }; compose: { head: Record; paragraph_count: number; before_paragraph_count: number; changed: Array<{ paragraph_index: number; paragraph: unknown }>; } | null; print: { head: Record; page_count: number; before_document_fingerprint: string | null; changed_pages: unknown[]; unchanged_page_indexes: number[]; } | null; paginate?: unknown; review?: unknown; style?: unknown; document_head: Record; state: ShellDocumentPatchState; } ``` ### ShellDocumentPatchOutcome [Section titled “ShellDocumentPatchOutcome”](#shelldocumentpatchoutcome) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellDocumentPatchOutcome { documentPath: string; revision: number; applied: boolean; reason: string | null; ms: number; model: "patch" | "full"; pages_changed: number; paragraphs_changed: number; verified: boolean; } ``` # DTO · api-market.ts > 8 shell-contract interfaces and 2 type aliases — requests and results for the scripted release-readiness routes, plus header and footer commands; not used in embedding. 8 interfaces and 2 type aliases — requests and results for the scripted release-readiness routes, plus header and footer commands; not used in embedding. Internal contract These types describe the exchange inside the desktop SumDoc window. For embedding in your product, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). Some types include internal tags such as `backlog_id: "D38"` or `sharedSceneOwner: "D5"` — these are the task numbers the feature was filed under inside the team. They appear in the response, but embedding doesn’t need them: there’s no reason to parse or store them. Contract module: `api-market.ts`. **Types on this page — 10** * [`EditorV0Doc006015MarketRouteRequest`](#editorv0doc006015marketrouterequest) * [`EditorV0Doc001005MarketRouteRequest`](#editorv0doc001005marketrouterequest) * [`EditorV0Doc016025MarketRouteRequest`](#editorv0doc016025marketrouterequest) * [`EditorV0Doc006015MarketRouteResult`](#editorv0doc006015marketrouteresult) * [`EditorV0Doc001005MarketRouteResult`](#editorv0doc001005marketrouteresult) * [`EditorV0Doc016025MarketRouteResult`](#editorv0doc016025marketrouteresult) * [`D36HeaderFooterMarketCommand`](#d36headerfootermarketcommand) * [`D36HeaderFooterStoryVariant`](#d36headerfooterstoryvariant) * [`D36HeaderFooterMarketRequest`](#d36headerfootermarketrequest) * [`D36HeaderFooterMarketResult`](#d36headerfootermarketresult) ### EditorV0Doc006015MarketRouteRequest [Section titled “EditorV0Doc006015MarketRouteRequest”](#editorv0doc006015marketrouterequest) `InterfaceDeclaration` · `api-market.ts` ```ts interface EditorV0Doc006015MarketRouteRequest { writebackDir?: string | null; insertText?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0Doc001005MarketRouteRequest [Section titled “EditorV0Doc001005MarketRouteRequest”](#editorv0doc001005marketrouterequest) `InterfaceDeclaration` · `api-market.ts` ```ts interface EditorV0Doc001005MarketRouteRequest { writebackDir?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0Doc016025MarketRouteRequest [Section titled “EditorV0Doc016025MarketRouteRequest”](#editorv0doc016025marketrouterequest) `InterfaceDeclaration` · `api-market.ts` ```ts interface EditorV0Doc016025MarketRouteRequest { writebackDir?: string | null; objectDocumentPath?: string | null; linkedDocumentPath?: string | null; updatedLinkedDocumentPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0Doc006015MarketRouteResult [Section titled “EditorV0Doc006015MarketRouteResult”](#editorv0doc006015marketrouteresult) `InterfaceDeclaration` · `api-market.ts` ```ts interface EditorV0Doc006015MarketRouteResult { schema: "fastdoc.shell.editor-v0-doc-006-015-market-route-action.v1"; operationKind: "doc-006-015-market-route"; applied: boolean; documentPath: string | null; writebackDir: string; insertTextFilePath: string; finalOutputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; tasks: string[]; finalVisibleText: string | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0Doc001005MarketRouteResult [Section titled “EditorV0Doc001005MarketRouteResult”](#editorv0doc001005marketrouteresult) `InterfaceDeclaration` · `api-market.ts` ```ts interface EditorV0Doc001005MarketRouteResult { schema: "fastdoc.shell.editor-v0-doc-001-005-market-route-action.v1"; operationKind: "doc-001-005-market-route"; applied: boolean; documentPath: string | null; writebackDir: string; finalOutputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; tasks: string[]; finalVisibleText: string | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0Doc016025MarketRouteResult [Section titled “EditorV0Doc016025MarketRouteResult”](#editorv0doc016025marketrouteresult) `InterfaceDeclaration` · `api-market.ts` ```ts interface EditorV0Doc016025MarketRouteResult { schema: "fastdoc.shell.editor-v0-doc-016-025-market-route-action.v1"; operationKind: "doc-016-025-market-route"; applied: boolean; documentPath: string | null; writebackDir: string; objectDocumentPath: string; linkedDocumentPath: string; updatedLinkedDocumentPath: string; finalOutputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; tasks: string[]; headingMap: string[]; finalVisibleText: string | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### D36HeaderFooterMarketCommand [Section titled “D36HeaderFooterMarketCommand”](#d36headerfootermarketcommand) `TypeAliasDeclaration` · `api-market.ts` ```ts type D36HeaderFooterMarketCommand = | "header-default" | "footer-default" | "page-number-header" | "page-number-footer" | "page-number-first" | "page-number-even" | "page-number-start" | "page-number-continue" | "page-number-remove" | "link-default-header" | "link-default-footer" | "unlink-default-header" | "unlink-default-footer" | "different-first-page" | "different-odd-even" | "header-footer-distances"; ``` ### D36HeaderFooterStoryVariant [Section titled “D36HeaderFooterStoryVariant”](#d36headerfooterstoryvariant) `TypeAliasDeclaration` · `api-market.ts` ```ts type D36HeaderFooterStoryVariant = "default" | "first" | "even"; ``` ### D36HeaderFooterMarketRequest [Section titled “D36HeaderFooterMarketRequest”](#d36headerfootermarketrequest) `InterfaceDeclaration` · `api-market.ts` ```ts interface D36HeaderFooterMarketRequest { command: D36HeaderFooterMarketCommand; paragraphIndex: number; outputPath?: string | null; reopenAfterWrite?: boolean; pageNumberAlignment?: "left" | "center" | "right" | "inside" | "outside"; pageNumberFirstPage?: boolean; pageNumberStart?: number; pageNumberStyle?: "bottom-right-built-in" | null; pageNumberEntryLayout?: "paragraph-before-number" | null; enabled?: boolean; storyVariant?: D36HeaderFooterStoryVariant; headerDistanceTwips?: number | null; footerDistanceTwips?: number | null; } ``` ### D36HeaderFooterMarketResult [Section titled “D36HeaderFooterMarketResult”](#d36headerfootermarketresult) `InterfaceDeclaration` · `api-market.ts` ```ts interface D36HeaderFooterMarketResult { schema: "fastdoc.shell.d36-header-footer-market-workflow.v1"; applied: boolean; noOp: boolean; outputPath: string; command: D36HeaderFooterMarketCommand; label: string; paragraphIndex: number; currentByCommand: Record; beforeHeaderFooterState: Record | null; afterHeaderFooterState: Record | null; beforePagination: Record | null; afterPagination: Record | null; writebackResult: Record | null; beforeTexts: string[]; afterTexts: string[]; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` # DTO · api-quick-parts.ts > 6 shell-contract interfaces and 5 type aliases — quick parts: galleries, insertion modes, selection, and building-block storage. 6 interfaces and 5 type aliases — quick parts: galleries, insertion modes, selection, and building-block storage. Internal contract These types describe the exchange inside the desktop SumDoc window. For embedding in your product, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). Some types include internal tags such as `backlog_id: "D38"` or `sharedSceneOwner: "D5"` — these are the task numbers the feature was filed under inside the team. They appear in the response, but embedding doesn’t need them: there’s no reason to parse or store them. Contract module: `api-quick-parts.ts`. **Types on this page — 11** * [`ShellQuickPartGallery`](#shellquickpartgallery) * [`ShellQuickPartInsertionMode`](#shellquickpartinsertionmode) * [`ShellQuickPartStoryKind`](#shellquickpartstorykind) * [`ShellQuickPartsFieldScope`](#shellquickpartsfieldscope) * [`ShellQuickPartSelection`](#shellquickpartselection) * [`ShellQuickPartTarget`](#shellquickparttarget) * [`ShellQuickPartBuildingBlock`](#shellquickpartbuildingblock) * [`ShellQuickPartsStoreSnapshot`](#shellquickpartsstoresnapshot) * [`ShellQuickPartsDocumentOperation`](#shellquickpartsdocumentoperation) * [`ShellQuickPartsDocumentResult`](#shellquickpartsdocumentresult) * [`FastDocQuickPartsApi`](#fastdocquickpartsapi) ### ShellQuickPartGallery [Section titled “ShellQuickPartGallery”](#shellquickpartgallery) `TypeAliasDeclaration` · `api-quick-parts.ts` ```ts type ShellQuickPartGallery = "quick-parts" | "autotext"; ``` ### ShellQuickPartInsertionMode [Section titled “ShellQuickPartInsertionMode”](#shellquickpartinsertionmode) `TypeAliasDeclaration` · `api-quick-parts.ts` ```ts type ShellQuickPartInsertionMode = "content" | "paragraph" | "page"; ``` ### ShellQuickPartStoryKind [Section titled “ShellQuickPartStoryKind”](#shellquickpartstorykind) `TypeAliasDeclaration` · `api-quick-parts.ts` ```ts type ShellQuickPartStoryKind = "body" | "table-cell" | "header" | "footer" | "footnote" | "endnote" | "text-box"; ``` ### ShellQuickPartsFieldScope [Section titled “ShellQuickPartsFieldScope”](#shellquickpartsfieldscope) `TypeAliasDeclaration` · `api-quick-parts.ts` ```ts type ShellQuickPartsFieldScope = "current" | "selection" | "all"; ``` ### ShellQuickPartSelection [Section titled “ShellQuickPartSelection”](#shellquickpartselection) `InterfaceDeclaration` · `api-quick-parts.ts` ```ts interface ShellQuickPartSelection { storyKind: ShellQuickPartStoryKind; storyIndex: number; tableCellIndex: number | null; blockStart: number; blockEnd: number; } ``` ### ShellQuickPartTarget [Section titled “ShellQuickPartTarget”](#shellquickparttarget) `InterfaceDeclaration` · `api-quick-parts.ts` ```ts interface ShellQuickPartTarget { storyKind: ShellQuickPartStoryKind; storyIndex: number; tableCellIndex: number | null; blockIndex: number | null; insertionMode: ShellQuickPartInsertionMode; } ``` ### ShellQuickPartBuildingBlock [Section titled “ShellQuickPartBuildingBlock”](#shellquickpartbuildingblock) `InterfaceDeclaration` · `api-quick-parts.ts` ```ts interface ShellQuickPartBuildingBlock { id: string; name: string; gallery: ShellQuickPartGallery; category: string; description: string; insertionMode: ShellQuickPartInsertionMode; fragmentFile: string; fragmentSha256: string; sourceSelection: ShellQuickPartSelection; createdAt: string; updatedAt: string; } ``` ### ShellQuickPartsStoreSnapshot [Section titled “ShellQuickPartsStoreSnapshot”](#shellquickpartsstoresnapshot) `InterfaceDeclaration` · `api-quick-parts.ts` ```ts interface ShellQuickPartsStoreSnapshot { schema: "fastdoc.quick-parts-store.v1"; version: 1; revision: number; updatedAt: string; blocks: ShellQuickPartBuildingBlock[]; storePath: string; recoveredFrom: "primary" | "backup" | "empty"; recoveryReason: string | null; } ``` ### ShellQuickPartsDocumentOperation [Section titled “ShellQuickPartsDocumentOperation”](#shellquickpartsdocumentoperation) `TypeAliasDeclaration` · `api-quick-parts.ts` ```ts type ShellQuickPartsDocumentOperation = { operationKind: "insert-building-block"; blockId: string; target: ShellQuickPartTarget; } | { operationKind: "update-document-properties"; properties: { title?: string; author?: string; subject?: string; company?: string; keywords?: string; comments?: string; custom?: Record; }; } | { operationKind: "insert-field"; field: { instruction: string; result?: string | null; locked?: boolean; target: ShellQuickPartTarget; }; } | { operationKind: "replace-field"; field: { instruction: string; result?: string | null; locked?: boolean; }; selection: ShellQuickPartSelection; } | { operationKind: "set-field-lock"; locked: boolean; scope?: ShellQuickPartsFieldScope; selection?: ShellQuickPartSelection | null; updateAll?: boolean; } | { operationKind: "update-fields"; scope?: ShellQuickPartsFieldScope; selection?: ShellQuickPartSelection | null; updateAll?: boolean; } | { operationKind: "toggle-field-display"; showCodes: boolean; }; ``` ### ShellQuickPartsDocumentResult [Section titled “ShellQuickPartsDocumentResult”](#shellquickpartsdocumentresult) `InterfaceDeclaration` · `api-quick-parts.ts` ```ts interface ShellQuickPartsDocumentResult extends Record { applied: true; outputPath: string; operationKind: string; reopened: boolean; } ``` ### FastDocQuickPartsApi [Section titled “FastDocQuickPartsApi”](#fastdocquickpartsapi) `InterfaceDeclaration` · `api-quick-parts.ts` ```ts interface FastDocQuickPartsApi { listQuickPartsBuildingBlocks(): Promise; createQuickPartsBuildingBlock(request: { name: string; gallery: ShellQuickPartGallery; category: string; description?: string; insertionMode: ShellQuickPartInsertionMode; sourcePath?: string | null; sourceSelection: ShellQuickPartSelection; }): Promise; updateQuickPartsBuildingBlock(request: { id: string; expectedRevision?: number | null; name?: string; gallery?: ShellQuickPartGallery; category?: string; description?: string; insertionMode?: ShellQuickPartInsertionMode; }): Promise; deleteQuickPartsBuildingBlock(request: { id: string; expectedRevision?: number | null; }): Promise; applyQuickPartsDocumentOperation(request: ShellQuickPartsDocumentOperation & { sourcePath?: string | null; reopenAfterWrite?: boolean; }): Promise; } ``` # DTO · api-review.ts > 48 interfaces and 6 type aliases of shell-contract—review: comments, tracked changes, review snapshots and spelling. 48 interfaces and 6 type aliases—review: comments, tracked changes, review snapshots and spelling. Internal contract These types describe the exchange inside the desktop SumDoc window. For embedding in your product, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). Some types include internal tags such as `backlog_id: "D38"` or `sharedSceneOwner: "D5"` — these are the task numbers the feature was filed under inside the team. They appear in the response, but embedding doesn’t need them: there’s no reason to parse or store them. Contract module: `api-review.ts`. Types on this page — 54 * [`ShellCommentAnchorResolution`](#shellcommentanchorresolution) * [`ShellReviewComment`](#shellreviewcomment) * [`ShellReviewTrackedChange`](#shellreviewtrackedchange) * [`ShellReviewSnapshot`](#shellreviewsnapshot) * [`ShellProofingProviderState`](#shellproofingproviderstate) * [`ShellProofingWordCheckRequest`](#shellproofingwordcheckrequest) * [`ShellProofingWordCheckResult`](#shellproofingwordcheckresult) * [`ShellProofingDocumentPolicy`](#shellproofingdocumentpolicy) * [`ShellProofingDictionaryResult`](#shellproofingdictionaryresult) * [`ShellReviewActionPreviewOperation`](#shellreviewactionpreviewoperation) * [`ShellReviewActionPreviewRequest`](#shellreviewactionpreviewrequest) * [`ShellReviewActionPreviewResult`](#shellreviewactionpreviewresult) * [`ShellReviewInsertCommentCopyRequest`](#shellreviewinsertcommentcopyrequest) * [`ShellReviewInsertCommentCopyResult`](#shellreviewinsertcommentcopyresult) * [`ShellReviewDeleteCommentCopyRequest`](#shellreviewdeletecommentcopyrequest) * [`ShellReviewReplyCommentCopyRequest`](#shellreviewreplycommentcopyrequest) * [`ShellReviewResolveCommentCopyRequest`](#shellreviewresolvecommentcopyrequest) * [`ShellReviewSetCommentResolvedCopyRequest`](#shellreviewsetcommentresolvedcopyrequest) * [`ShellReviewResolveAllCommentsCopyRequest`](#shellreviewresolveallcommentscopyrequest) * [`ShellReviewResolveCommentsAuthorCopyRequest`](#shellreviewresolvecommentsauthorcopyrequest) * [`ShellReviewResolveMyCommentsCopyRequest`](#shellreviewresolvemycommentscopyrequest) * [`ShellReviewAcceptChangeCopyRequest`](#shellreviewacceptchangecopyrequest) * [`ShellReviewRejectChangeCopyRequest`](#shellreviewrejectchangecopyrequest) * [`ShellReviewModeCopyRequest`](#shellreviewmodecopyrequest) * [`ShellReviewNewDocumentCopyRequest`](#shellreviewnewdocumentcopyrequest) * [`ShellTrackedChangeMarkupModeRequest`](#shelltrackedchangemarkupmoderequest) * [`ShellTrackedChangeMarkupModeResult`](#shelltrackedchangemarkupmoderesult) * [`ShellReviewToolsActionId`](#shellreviewtoolsactionid) * [`ShellFieldToolsActionId`](#shellfieldtoolsactionid) * [`ShellDesignToolsActionId`](#shelldesigntoolsactionid) * [`ShellInsertExtendedActionId`](#shellinsertextendedactionid) * [`ShellFileInterchangeActionId`](#shellfileinterchangeactionid) * [`ShellReviewToolsWritebackRequest`](#shellreviewtoolswritebackrequest) * [`ShellFieldToolsWritebackRequest`](#shellfieldtoolswritebackrequest) * [`ShellDesignToolsWritebackRequest`](#shelldesigntoolswritebackrequest) * [`ShellInsertExtendedWritebackRequest`](#shellinsertextendedwritebackrequest) * [`ShellFileInterchangeActionRequest`](#shellfileinterchangeactionrequest) * [`ShellReviewDeleteCommentCopyResult`](#shellreviewdeletecommentcopyresult) * [`ShellReviewReplyCommentCopyResult`](#shellreviewreplycommentcopyresult) * [`ShellReviewResolveCommentCopyResult`](#shellreviewresolvecommentcopyresult) * [`ShellReviewSetCommentResolvedCopyResult`](#shellreviewsetcommentresolvedcopyresult) * [`ShellReviewResolveAllCommentsCopyResult`](#shellreviewresolveallcommentscopyresult) * [`ShellReviewResolveCommentsAuthorCopyResult`](#shellreviewresolvecommentsauthorcopyresult) * [`ShellReviewResolveMyCommentsCopyResult`](#shellreviewresolvemycommentscopyresult) * [`ShellReviewAcceptChangeCopyResult`](#shellreviewacceptchangecopyresult) * [`ShellReviewRejectChangeCopyResult`](#shellreviewrejectchangecopyresult) * [`ShellReviewModeCopyResult`](#shellreviewmodecopyresult) * [`ShellReviewNewDocumentCopyResult`](#shellreviewnewdocumentcopyresult) * [`ShellReviewToolsWritebackResult`](#shellreviewtoolswritebackresult) * [`ShellFieldToolsWritebackResult`](#shellfieldtoolswritebackresult) * [`ShellDesignToolsWritebackResult`](#shelldesigntoolswritebackresult) * [`ShellInsertExtendedWritebackResult`](#shellinsertextendedwritebackresult) * [`ShellFileInterchangeActionResult`](#shellfileinterchangeactionresult) * [`ShellReviewCommentRangeLineSegment`](#shellreviewcommentrangelinesegment) ### ShellCommentAnchorResolution [Section titled “ShellCommentAnchorResolution”](#shellcommentanchorresolution) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellCommentAnchorResolution { source_anchor_location: string; resolution_kind: string; paragraph_location: string | null; line_location: string | null; page_index: number | null; section_index: number | null; source_fragment_location: string | null; scene_x_milli_px: number | null; scene_y_milli_px: number | null; detail: string; support_markers?: ShellSupportMarker[]; } ``` ### ShellReviewComment [Section titled “ShellReviewComment”](#shellreviewcomment) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewComment { comment_id: number; author?: string | null; initials?: string | null; date?: string | null; is_resolved?: boolean; resolve_action_state?: string; thread_parent_comment_id?: number | null; thread_role?: string; thread_identity_source?: string; paragraph_texts: string[]; anchor_locations: string[]; anchor_ownership?: string; deferred_anchor_count: number; resolved_anchor_count: number; anchor_resolutions?: ShellCommentAnchorResolution[]; block_count?: number; support_markers?: ShellSupportMarker[]; } ``` ### ShellReviewTrackedChange [Section titled “ShellReviewTrackedChange”](#shellreviewtrackedchange) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewTrackedChange { change_id?: number | null; change_kind: string; author?: string | null; date?: string | null; location: string; text: string; review_state: string; prior_run_properties?: { bold?: boolean | null; italic?: boolean | null; font_color_rgb?: string | null; font_underline?: string | null; font_underline_color_rgb?: string | null; text_highlight_color?: string | null; font_strikethrough?: string | null; vertical_alignment?: string | null; character_spacing_twips?: number | null; character_scale_percent?: number | null; character_position_half_points?: number | null; character_kerning_half_points?: number | null; text_effect?: string | null; font_all_caps?: boolean | null; font_small_caps?: boolean | null; font_hidden?: boolean | null; proofing_language?: string | null; no_proof?: boolean | null; } | null; prior_run_property_names?: string[]; support_markers?: ShellSupportMarker[]; } ``` ### ShellReviewSnapshot [Section titled “ShellReviewSnapshot”](#shellreviewsnapshot) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewSnapshot { stage_id: string; comment_count: number; tracked_change_count: number; resolved_comment_anchor_count: number; deferred_comment_anchor_count: number; comments: ShellReviewComment[]; tracked_changes: ShellReviewTrackedChange[]; support_markers?: ShellSupportMarker[]; } ``` ### ShellProofingProviderState [Section titled “ShellProofingProviderState”](#shellproofingproviderstate) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellProofingProviderState { schema: "fastdoc.shell.proofing-provider-state.v1"; providerKind: "nspell-local-hunspell"; localOnly: true; ready: boolean; status: "ready" | "missing-dictionary" | "provider-error"; availableLanguages: string[]; activeLanguages: string[]; requestedLanguages: string[]; missingLanguages: string[]; customWords: string[]; customDictionaryPath: string; detail: string; cloudDependencyClaimed: false; grammarParityClaimed: false; arabicLinguisticParityClaimed: false; } ``` ### ShellProofingWordCheckRequest [Section titled “ShellProofingWordCheckRequest”](#shellproofingwordcheckrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellProofingWordCheckRequest { words: Array<{ word: string; language: "en-US" | "ru-RU"; }>; } ``` ### ShellProofingWordCheckResult [Section titled “ShellProofingWordCheckResult”](#shellproofingwordcheckresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellProofingWordCheckResult { schema: "fastdoc.shell.proofing-word-check.v1"; providerKind: "nspell-local-hunspell"; localOnly: true; results: Array<{ word: string; language: "en-US" | "ru-RU"; misspelled: boolean; suggestions: string[]; }>; } ``` ### ShellProofingDocumentPolicy [Section titled “ShellProofingDocumentPolicy”](#shellproofingdocumentpolicy) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellProofingDocumentPolicy { schema: "fastdoc.shell.proofing-document-policy.v1"; documentPath: string; trackRevisionsEnabled: boolean; } ``` ### ShellProofingDictionaryResult [Section titled “ShellProofingDictionaryResult”](#shellproofingdictionaryresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellProofingDictionaryResult { schema: "fastdoc.shell.proofing-dictionary-result.v1"; action: "add" | "remove" | "reset"; applied: boolean; word: string | null; customWords: string[]; persisted: boolean; documentModified: false; } ``` ### ShellReviewActionPreviewOperation [Section titled “ShellReviewActionPreviewOperation”](#shellreviewactionpreviewoperation) `TypeAliasDeclaration` · `api-review.ts` ```ts type ShellReviewActionPreviewOperation = "insert-comment" | "resolve-comment" | "accept-change" | "reject-change"; ``` ### ShellReviewActionPreviewRequest [Section titled “ShellReviewActionPreviewRequest”](#shellreviewactionpreviewrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewActionPreviewRequest { operation: ShellReviewActionPreviewOperation; commentId?: number | null; changeId?: number | null; anchorLocation?: string | null; anchorStartOffset?: number | null; anchorEndOffset?: number | null; text?: string | null; author?: string | null; } ``` ### ShellReviewActionPreviewResult [Section titled “ShellReviewActionPreviewResult”](#shellreviewactionpreviewresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewActionPreviewResult { schema: "fastdoc.shell.review-action-preview.v1"; documentPath: string; operationKind: string; requestedTargetId: number; resultKind: string; mutationMode: string | null; targetCommentId: number | null; targetChangeId: number | null; targetChangeKind: string | null; targetLocation: string | null; affectedCommentId?: number | null; affectedCommentAuthor?: string | null; mutatedCommentText?: string | null; targetAnchorLocation?: string | null; originalCommentCount: number | null; mutatedCommentCount: number | null; originalTrackedChangeCount: number | null; mutatedTrackedChangeCount: number | null; bodyEffectKind: string | null; writebackState: "deferred"; writebackPerformed: false; fullReviewParityClaimed: false; legalRedlineParityClaimed: false; collaborationParityClaimed: false; supportMarkerKinds: string[]; snapshot: Record; } ``` ### ShellReviewInsertCommentCopyRequest [Section titled “ShellReviewInsertCommentCopyRequest”](#shellreviewinsertcommentcopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewInsertCommentCopyRequest { documentPath: string; anchorLocation: string; anchorStartOffset?: number | null; anchorEndOffset?: number | null; text: string; author?: string | null; outputPath?: string | null; reopenAfterWrite?: boolean | null; } ``` ### ShellReviewInsertCommentCopyResult [Section titled “ShellReviewInsertCommentCopyResult”](#shellreviewinsertcommentcopyresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewInsertCommentCopyResult { schema: "fastdoc.shell.review-insert-comment-copy.v1"; documentPath: string; outputPath: string | null; route: ReviewCommandRouteKind; anchorLocation: string | null; requestedText: string; requestedAuthor: string; resultKind: string; writebackResultKind: string; writebackPerformed: boolean; beforeCommentCount: number; afterCommentCount: number | null; affectedCommentId: number | null; affectedCommentAuthor: string | null; mutatedCommentText: string | null; targetAnchorLocation: string | null; changedPartCount: number; preservedPartCount: number; fullReviewParityClaimed: false; legalRedlineParityClaimed: false; collaborationParityClaimed: false; wordSurfacePixelParityClaimed: false; detail: string | null; supportMarkerKinds: string[]; snapshot: Record; } ``` ### ShellReviewDeleteCommentCopyRequest [Section titled “ShellReviewDeleteCommentCopyRequest”](#shellreviewdeletecommentcopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewDeleteCommentCopyRequest { commentId: number; } ``` ### ShellReviewReplyCommentCopyRequest [Section titled “ShellReviewReplyCommentCopyRequest”](#shellreviewreplycommentcopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewReplyCommentCopyRequest { commentId: number; text?: string; author?: string | null; } ``` ### ShellReviewResolveCommentCopyRequest [Section titled “ShellReviewResolveCommentCopyRequest”](#shellreviewresolvecommentcopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewResolveCommentCopyRequest { commentId: number; } ``` ### ShellReviewSetCommentResolvedCopyRequest [Section titled “ShellReviewSetCommentResolvedCopyRequest”](#shellreviewsetcommentresolvedcopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewSetCommentResolvedCopyRequest { commentId: number; resolved: boolean; historySafeOutput?: boolean; } ``` ### ShellReviewResolveAllCommentsCopyRequest [Section titled “ShellReviewResolveAllCommentsCopyRequest”](#shellreviewresolveallcommentscopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewResolveAllCommentsCopyRequest { requestId?: string; historySafeOutput?: boolean; } ``` ### ShellReviewResolveCommentsAuthorCopyRequest [Section titled “ShellReviewResolveCommentsAuthorCopyRequest”](#shellreviewresolvecommentsauthorcopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewResolveCommentsAuthorCopyRequest { author: string; historySafeOutput?: boolean; } ``` ### ShellReviewResolveMyCommentsCopyRequest [Section titled “ShellReviewResolveMyCommentsCopyRequest”](#shellreviewresolvemycommentscopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewResolveMyCommentsCopyRequest { author: string; historySafeOutput?: boolean; } ``` ### ShellReviewAcceptChangeCopyRequest [Section titled “ShellReviewAcceptChangeCopyRequest”](#shellreviewacceptchangecopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewAcceptChangeCopyRequest { changeId: number; author?: string; changeKind?: string; changeOccurrence?: number; outputPath?: string; historySafeOutput?: boolean; } ``` ### ShellReviewRejectChangeCopyRequest [Section titled “ShellReviewRejectChangeCopyRequest”](#shellreviewrejectchangecopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewRejectChangeCopyRequest { changeId: number; author?: string; changeKind?: string; changeOccurrence?: number; outputPath?: string; historySafeOutput?: boolean; } ``` ### ShellReviewModeCopyRequest [Section titled “ShellReviewModeCopyRequest”](#shellreviewmodecopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewModeCopyRequest { enabled?: boolean; outputPath?: string | null; } ``` ### ShellReviewNewDocumentCopyRequest [Section titled “ShellReviewNewDocumentCopyRequest”](#shellreviewnewdocumentcopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewNewDocumentCopyRequest { reviewMode?: "on"; } ``` ### ShellTrackedChangeMarkupModeRequest [Section titled “ShellTrackedChangeMarkupModeRequest”](#shelltrackedchangemarkupmoderequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellTrackedChangeMarkupModeRequest { mode?: "in-line" | "balloon"; } ``` ### ShellTrackedChangeMarkupModeResult [Section titled “ShellTrackedChangeMarkupModeResult”](#shelltrackedchangemarkupmoderesult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellTrackedChangeMarkupModeResult { schema: "fastdoc.shell.tracked-change-markup-mode.v1"; documentPath: string | null; requestedMode: "in-line" | "balloon"; priorMode: "in-line" | "balloon"; effectiveMode: "in-line" | "balloon"; resultKind: "applied" | "no-op" | "no-document"; sceneReloaded: boolean; balloonDrawOpCountBefore: number; balloonDrawOpCountAfter: number; documentModified: false; wordSurfacePixelParityClaimed: false; detail: string | null; } ``` ### ShellReviewToolsActionId [Section titled “ShellReviewToolsActionId”](#shellreviewtoolsactionid) `TypeAliasDeclaration` · `api-review.ts` ```ts type ShellReviewToolsActionId = | "check-spelling" | "accept-spelling-suggestion" | "ignore-spelling-issue" | "add-word-to-dictionary" | "check-grammar" | "accept-grammar-suggestion" | "set-proofing-language" | "translate-selection" | "compare-documents" | "combine-documents" | "accept-all-changes" | "reject-all-changes" | "accept-filtered-changes" | "reject-filtered-changes" | "preserve-review-markup-on-export" | "protect-review-markup" | "mark-as-final" | "always-open-read-only" | "block-authors" | "restrict-editing-read-only" | "restrict-editing-tracked-changes" | "restrict-editing-comments" | "restrict-editing-forms" | "protected-view-enable-editing" | "protected-view-close" | "remove-review-protection"; ``` ### ShellFieldToolsActionId [Section titled “ShellFieldToolsActionId”](#shellfieldtoolsactionid) `TypeAliasDeclaration` · `api-review.ts` ```ts type ShellFieldToolsActionId = "edit-hyperlink" | "remove-hyperlink" | "follow-hyperlink" | "toggle-field-codes" | "show-field-result" | "lock-field" | "unlock-field"; ``` ### ShellDesignToolsActionId [Section titled “ShellDesignToolsActionId”](#shelldesigntoolsactionid) `TypeAliasDeclaration` · `api-review.ts` ```ts type ShellDesignToolsActionId = | "apply-style-set-standard" | "apply-style-set-plain" | "apply-style-set-blue-accent" | "apply-style-set-red-accent" | "apply-style-set-warm" | "apply-style-set-dark" | "apply-style-set-teal" | "apply-style-set-blue" | "apply-style-set-green" | "apply-style-set-classic" | "apply-theme-standard" | "apply-theme-headlines" | "apply-theme-aspect" | "apply-colors-office" | "apply-colors-blue-green" | "apply-colors-grayscale" | "apply-fonts-aptos" | "apply-fonts-calibri" | "apply-fonts-cambria" | "apply-effects-subtle" | "apply-effects-soft" | "apply-effects-intense" | "apply-paragraph-spacing-compact" | "apply-paragraph-spacing-open" | "apply-paragraph-spacing-relaxed" | "apply-page-color-none" | "apply-page-color-theme-blue" | "apply-page-color-warm" | "apply-watermark-confidential" | "apply-watermark-text" | "apply-watermark-picture" | "remove-watermark" | "apply-page-border-none" | "apply-page-border-box" | "apply-page-border-shadow" | "set-current-design-default"; ``` ### ShellInsertExtendedActionId [Section titled “ShellInsertExtendedActionId”](#shellinsertextendedactionid) `TypeAliasDeclaration` · `api-review.ts` ```ts type ShellInsertExtendedActionId = | "insert-cover-page" | "insert-blank-page" | "insert-wordart" | "insert-field-page" | "insert-icon-star" | "insert-picture-search-image" | "insert-picture-stock-image" | "insert-picture-online" | "insert-3d-model-package" | "insert-smartart-process" | "insert-chart-column" | "insert-screenshot-capture" | "insert-object-embedded-document" | "insert-media-link" | "insert-textbox-vertical"; ``` ### ShellFileInterchangeActionId [Section titled “ShellFileInterchangeActionId”](#shellfileinterchangeactionid) `TypeAliasDeclaration` · `api-review.ts` ```ts type ShellFileInterchangeActionId = | "open-docx-dialog" | "open-import-dialog" | "save-as-dialog" | "open-recent-file" | "document-open-integrity-check" | "document-save-clean-copy" | "document-recovery-snapshot" | "document-title-path-stability" | "export-html" | "export-txt" | "export-odt" | "export-fb2" | "export-epub" | "export-pdf" | "export-rtf" | "save-docx-as" | "convert-doc-html" | "import-fb2" | "import-epub" | "import-html" | "import-txt" | "import-rtf" | "import-odt" | "import-xodt"; ``` ### ShellReviewToolsWritebackRequest [Section titled “ShellReviewToolsWritebackRequest”](#shellreviewtoolswritebackrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewToolsWritebackRequest { actionId: ShellReviewToolsActionId; routeId?: "ribbon" | "review-command-center" | "market-launch-center"; originalPath?: string | null; revisedPath?: string | null; outputPath?: string | null; author?: string | null; date?: string | null; changeIds?: number[]; changeAuthors?: string[]; changeKinds?: string[]; changeOccurrences?: number[]; historySafeOutput?: boolean; password?: string | null; permissionRanges?: Array<{ id: string; user?: string | null; group?: string | null; startLocation: string; endLocation: string; }>; } ``` ### ShellFieldToolsWritebackRequest [Section titled “ShellFieldToolsWritebackRequest”](#shellfieldtoolswritebackrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellFieldToolsWritebackRequest { actionId: ShellFieldToolsActionId; routeId?: "ribbon" | "field-command-center" | "market-launch-center"; } ``` ### ShellDesignToolsWritebackRequest [Section titled “ShellDesignToolsWritebackRequest”](#shelldesigntoolswritebackrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellDesignToolsWritebackRequest { actionId: ShellDesignToolsActionId; defaultActionIds?: ShellDesignToolsActionId[] | null; selectPictureOnly?: boolean | null; watermarkText?: string | null; watermarkFont?: string | null; watermarkSizePoints?: number | null; watermarkColor?: string | null; watermarkTransparencyPercent?: number | null; watermarkOrientation?: "horizontal" | "diagonal" | null; picturePath?: string | null; reuseEmbeddedPicture?: boolean | null; pictureScalePercent?: number | null; pictureWashout?: boolean | null; } ``` ### ShellInsertExtendedWritebackRequest [Section titled “ShellInsertExtendedWritebackRequest”](#shellinsertextendedwritebackrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellInsertExtendedWritebackRequest { actionId: ShellInsertExtendedActionId; paragraphIndex?: number | null; offset?: number | null; screenshotDataUrl?: string | null; screenshotSourceLabel?: string | null; screenshotSourcePageIndex?: number | null; chartOperation?: "insert" | "update" | "resize" | "move" | "copy" | "delete"; chartTargetLocation?: string | null; chartLocation?: string | null; chartSpec?: { chart_type: "column" | "line" | "pie"; title: string; legend_position: "none" | "right" | "left" | "top" | "bottom"; data_labels: boolean; categories: string[]; series: Array<{ name: string; values: string[]; color_rgb: string; }>; } | null; chartWidthEmu?: number | null; chartHeightEmu?: number | null; chartXOffsetEmu?: number | null; chartYOffsetEmu?: number | null; expectedDocumentPath?: string | null; sourceDocumentPath?: string | null; } ``` ### ShellFileInterchangeActionRequest [Section titled “ShellFileInterchangeActionRequest”](#shellfileinterchangeactionrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellFileInterchangeActionRequest { actionId: ShellFileInterchangeActionId; routeId?: "file-menu" | "document-command-center" | "market-launch-center"; path?: string | null; } ``` ### ShellReviewDeleteCommentCopyResult [Section titled “ShellReviewDeleteCommentCopyResult”](#shellreviewdeletecommentcopyresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewDeleteCommentCopyResult { schema: "fastdoc.shell.review-delete-comment-copy.v1"; documentPath: string; outputPath: string | null; requestedCommentId: number; resultKind: string; writebackResultKind: string; writebackPerformed: boolean; beforeCommentCount: number; afterCommentCount: number | null; changedPartCount: number; preservedPartCount: number; fullReviewParityClaimed: false; legalRedlineParityClaimed: false; collaborationParityClaimed: false; wordSurfacePixelParityClaimed: false; detail: string | null; snapshot: Record; } ``` ### ShellReviewReplyCommentCopyResult [Section titled “ShellReviewReplyCommentCopyResult”](#shellreviewreplycommentcopyresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewReplyCommentCopyResult { schema: "fastdoc.shell.review-reply-comment-copy.v1"; documentPath: string; outputPath: string | null; requestedCommentId: number; requestedReplyText: string; requestedAuthor: string; resultKind: string; writebackResultKind: string; writebackPerformed: boolean; beforeCommentCount: number; afterCommentCount: number | null; changedPartCount: number; preservedPartCount: number; fullReviewParityClaimed: false; legalRedlineParityClaimed: false; collaborationParityClaimed: false; wordSurfacePixelParityClaimed: false; detail: string | null; snapshot: Record; } ``` ### ShellReviewResolveCommentCopyResult [Section titled “ShellReviewResolveCommentCopyResult”](#shellreviewresolvecommentcopyresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewResolveCommentCopyResult { schema: "fastdoc.shell.review-resolve-comment-copy.v1"; documentPath: string; outputPath: string | null; requestedCommentId: number; resultKind: string; writebackResultKind: string; writebackPerformed: boolean; beforeCommentCount: number; afterCommentCount: number | null; changedPartCount: number; preservedPartCount: number; fullReviewParityClaimed: false; legalRedlineParityClaimed: false; collaborationParityClaimed: false; wordSurfacePixelParityClaimed: false; detail: string | null; snapshot: Record; } ``` ### ShellReviewSetCommentResolvedCopyResult [Section titled “ShellReviewSetCommentResolvedCopyResult”](#shellreviewsetcommentresolvedcopyresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewSetCommentResolvedCopyResult { schema: "fastdoc.shell.review-set-comment-resolved-copy.v1"; documentPath: string; outputPath: string | null; requestedCommentId: number; requestedResolvedState: boolean; beforeResolvedState: boolean | null; afterResolvedState: boolean | null; resultKind: string; writebackResultKind: string; writebackPerformed: boolean; beforeCommentCount: number; afterCommentCount: number | null; changedPartCount: number; preservedPartCount: number; fullReviewParityClaimed: false; legalRedlineParityClaimed: false; collaborationParityClaimed: false; wordSurfacePixelParityClaimed: false; passwordEncryptionParityClaimed: false; detail: string | null; snapshot: Record; } ``` ### ShellReviewResolveAllCommentsCopyResult [Section titled “ShellReviewResolveAllCommentsCopyResult”](#shellreviewresolveallcommentscopyresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewResolveAllCommentsCopyResult { schema: "fastdoc.shell.review-resolve-all-comments-copy.v1"; documentPath: string; outputPath: string | null; requestedCommentCount: number; resultKind: string; writebackResultKind: string; writebackPerformed: boolean; beforeCommentCount: number; afterCommentCount: number | null; changedPartCount: number; preservedPartCount: number; fullReviewParityClaimed: false; legalRedlineParityClaimed: false; collaborationParityClaimed: false; wordSurfacePixelParityClaimed: false; detail: string | null; snapshot: Record; } ``` ### ShellReviewResolveCommentsAuthorCopyResult [Section titled “ShellReviewResolveCommentsAuthorCopyResult”](#shellreviewresolvecommentsauthorcopyresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewResolveCommentsAuthorCopyResult { schema: "fastdoc.shell.review-resolve-comments-author-copy.v1"; documentPath: string; outputPath: string | null; requestedAuthor: string; resultKind: string; writebackResultKind: string; writebackPerformed: boolean; beforeCommentCount: number; afterCommentCount: number | null; beforeAuthorCommentCount: number; afterAuthorCommentCount: number | null; changedPartCount: number; preservedPartCount: number; fullReviewParityClaimed: false; legalRedlineParityClaimed: false; collaborationParityClaimed: false; wordSurfacePixelParityClaimed: false; detail: string | null; snapshot: Record; } ``` ### ShellReviewResolveMyCommentsCopyResult [Section titled “ShellReviewResolveMyCommentsCopyResult”](#shellreviewresolvemycommentscopyresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewResolveMyCommentsCopyResult { schema: "fastdoc.shell.review-resolve-my-comments-copy.v1"; documentPath: string; outputPath: string | null; requestedAuthor: string; resultKind: string; writebackResultKind: string; writebackPerformed: boolean; beforeCommentCount: number; afterCommentCount: number | null; beforeAuthorCommentCount: number; afterAuthorCommentCount: number | null; changedPartCount: number; preservedPartCount: number; fullReviewParityClaimed: false; legalRedlineParityClaimed: false; collaborationParityClaimed: false; wordSurfacePixelParityClaimed: false; detail: string | null; snapshot: Record; } ``` ### ShellReviewAcceptChangeCopyResult [Section titled “ShellReviewAcceptChangeCopyResult”](#shellreviewacceptchangecopyresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewAcceptChangeCopyResult { schema: "fastdoc.shell.review-accept-change-copy.v1"; documentPath: string; outputPath: string | null; requestedChangeId: number; resultKind: string; writebackResultKind: string; writebackPerformed: boolean; beforeTrackedChangeCount: number; afterTrackedChangeCount: number | null; changedPartCount: number; preservedPartCount: number; bodyEffectKind: string | null; fullReviewParityClaimed: false; legalRedlineParityClaimed: false; collaborationParityClaimed: false; wordSurfacePixelParityClaimed: false; detail: string | null; snapshot: Record; } ``` ### ShellReviewRejectChangeCopyResult [Section titled “ShellReviewRejectChangeCopyResult”](#shellreviewrejectchangecopyresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewRejectChangeCopyResult { schema: "fastdoc.shell.review-reject-change-copy.v1"; documentPath: string; outputPath: string | null; requestedChangeId: number; resultKind: string; writebackResultKind: string; writebackPerformed: boolean; beforeTrackedChangeCount: number; afterTrackedChangeCount: number | null; changedPartCount: number; preservedPartCount: number; bodyEffectKind: string | null; fullReviewParityClaimed: false; legalRedlineParityClaimed: false; collaborationParityClaimed: false; wordSurfacePixelParityClaimed: false; detail: string | null; snapshot: Record; } ``` ### ShellReviewModeCopyResult [Section titled “ShellReviewModeCopyResult”](#shellreviewmodecopyresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewModeCopyResult { schema: "fastdoc.shell.review-mode-copy.v1"; documentPath: string; outputPath: string | null; route: ReviewModeRouteKind; requestedReviewMode: "on" | "off"; priorReviewMode: "on" | "off" | null; effectiveReviewMode: "on" | "off" | null; resultKind: string; writebackResultKind: string; writebackPerformed: boolean; beforeTrackedChangeCount: number; afterTrackedChangeCount: number | null; changedPartCount: number; preservedPartCount: number; fullReviewParityClaimed: false; legalRedlineParityClaimed: false; collaborationParityClaimed: false; wordSurfacePixelParityClaimed: false; detail: string | null; snapshot: Record; } ``` ### ShellReviewNewDocumentCopyResult [Section titled “ShellReviewNewDocumentCopyResult”](#shellreviewnewdocumentcopyresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewNewDocumentCopyResult { schema: "fastdoc.shell.review-new-document-copy.v1"; outputPath: string | null; requestedReviewMode: "on"; effectiveReviewMode: "on" | "off" | "unknown"; reviewModeDefaultEnabled: boolean; reviewState: string | null; resultKind: string; writebackResultKind: "written"; writebackPerformed: true; trackedChangeCount: number; commentCount: number; fullReviewParityClaimed: false; legalRedlineParityClaimed: false; collaborationParityClaimed: false; wordSurfacePixelParityClaimed: false; detail: string; snapshot: Record; } ``` ### ShellReviewToolsWritebackResult [Section titled “ShellReviewToolsWritebackResult”](#shellreviewtoolswritebackresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewToolsWritebackResult { schema: "fastdoc.shell.review-tools-writeback.v1"; documentPath: string; outputPath: string | null; requestedActionId: ShellReviewToolsActionId; routeId?: "ribbon" | "review-command-center" | "market-launch-center"; taskId: string | null; operationKind: string | null; resultKind: string; writebackResultKind: string; writebackPerformed: boolean; beforeCommentCount: number; afterCommentCount: number | null; beforeTrackedChangeCount: number; afterTrackedChangeCount: number | null; changedPartCount: number; preservedPartCount: number; documentXmlMarkers: unknown[]; settingsXmlMarkers: unknown[]; customXmlParts: unknown[]; commentsXmlWritten: boolean; proofingLanguage: string | null; targetLanguage: string | null; protectionMode: string | null; fullWordProofingEngineClaimed: false; fullWordTranslationEngineClaimed: false; fullWordCompareEngineClaimed: false; legalRedlineParityClaimed: false; collaborationParityClaimed: false; wordSurfacePixelParityClaimed: false; documentProtectionPasswordParityClaimed: false; passwordMetadataPersisted?: boolean; wrongPassword?: boolean; sourceUnchanged?: boolean; historyEntryCreated?: boolean; dirtyStateChanged?: boolean; signaturePresentBefore?: boolean; signatureInvalidatedByMutation?: boolean; signatureMessage?: string | null; canceled?: boolean; originalPath?: string | null; revisedPath?: string | null; originalSha256?: string | null; revisedSha256?: string | null; boundedScope?: string | null; revisionIdRebaseCount?: number; commentIdRebaseCount?: number; atomicOutput?: boolean; partialOutputPossible?: false; snapshot: Record; } ``` ### ShellFieldToolsWritebackResult [Section titled “ShellFieldToolsWritebackResult”](#shellfieldtoolswritebackresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellFieldToolsWritebackResult { schema: "fastdoc.shell.field-tools-writeback.v1"; documentPath: string; outputPath: string | null; documentPathAfterReopen?: string | null; currentDocumentReopened?: boolean; requestedActionId: ShellFieldToolsActionId; routeId?: "ribbon" | "field-command-center" | "market-launch-center"; taskId: string | null; operationKind: string | null; resultKind: string; writebackResultKind: string; writebackPerformed: boolean; changedPartCount: number; preservedPartCount: number; fieldCountBefore: number | null; fieldCountAfter: number | null; hyperlinkCountBefore: number | null; hyperlinkCountAfter: number | null; lockedFieldCountBefore: number | null; lockedFieldCountAfter: number | null; displayMode: string | null; hyperlinkTarget: string | null; documentXmlMarkers: unknown[]; relationshipMarkers: unknown[]; customXmlParts: unknown[]; fullWordFieldEngineClaimed: false; recomputeParityClaimed: false; browserNavigationParityClaimed: false; wordSurfacePixelParityClaimed: false; snapshot: Record; } ``` ### ShellDesignToolsWritebackResult [Section titled “ShellDesignToolsWritebackResult”](#shelldesigntoolswritebackresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellDesignToolsWritebackResult { schema: "fastdoc.shell.design-tools-writeback.v1"; documentPath: string; outputPath: string | null; outputSha256AtWriteback?: string | null; saveReopenCount?: number; selectedPicturePath?: string | null; requestedActionId: ShellDesignToolsActionId; taskId: string | null; operationKind: string | null; resultKind: string; writebackResultKind: string; writebackPerformed: boolean; changedPartCount: number; preservedPartCount: number; documentXmlMarkers: unknown[]; stylesXmlMarkers: unknown[]; themeXmlMarkers: unknown[]; settingsXmlMarkers: unknown[]; headerXmlMarkers: unknown[]; customXmlParts: unknown[]; designChoice: string | null; pageBackgroundColor: string | null; watermarkKind: string | null; watermarkStoryPartNames: string[]; applicationDefaultPersisted?: boolean; applicationDefaultActionIds?: ShellDesignToolsActionId[]; fullWordThemeEngineClaimed: false; normalTemplateDefaultClaimed: false; fullWordWatermarkVmlParityClaimed: false; wordSurfacePixelParityClaimed: false; snapshot: Record; } ``` ### ShellInsertExtendedWritebackResult [Section titled “ShellInsertExtendedWritebackResult”](#shellinsertextendedwritebackresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellInsertExtendedWritebackResult { schema: "fastdoc.shell.insert-extended-writeback.v1"; documentPath: string; outputPath: string | null; requestedActionId: ShellInsertExtendedActionId; taskId: string | null; operationKind: string | null; resultKind: string; writebackResultKind: string; writebackPerformed: boolean; changedPartCount: number; preservedPartCount: number; documentXmlMarkers: unknown[]; relationshipMarkers: unknown[]; customXmlParts: unknown[]; contentPartNames: unknown[]; insertedVisibleText: unknown[]; screenshotCapture?: Record | null; fullWordInsertGalleryClaimed: false; fullWordIconsGalleryClaimed: false; fullWordSmartArtEngineClaimed: false; fullWordChartEngineClaimed: false; fullWordMediaEmbeddingClaimed: false; fullWordFieldEngineClaimed: false; fullWord3dModelEngineClaimed: false; wordSurfacePixelParityClaimed: false; snapshot: Record; } ``` ### ShellFileInterchangeActionResult [Section titled “ShellFileInterchangeActionResult”](#shellfileinterchangeactionresult) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellFileInterchangeActionResult { schema: "fastdoc.shell.file-interchange-action.v1"; routeId?: "file-menu" | "document-command-center" | "market-launch-center"; documentPath: string | null; sourceInputPath: string | null; outputPath: string | null; requestedActionId: ShellFileInterchangeActionId; cliCommand: string; resultKind: string; writebackResultKind: string; writebackPerformed: boolean; outputKind: "html" | "fb2" | "epub" | "pdf" | "docx" | string; outputByteCount: number; documentTitleBefore: string | null; documentSubtitleBefore: string | null; documentPathAfter: string | null; documentTitleAfter: string | null; documentSubtitleAfter: string | null; currentDocumentReopened: boolean; dialogKind?: string | null; nativeDialogManualPath?: boolean; smokeDialogOverrideUsed?: boolean; systemOpenDialogInvoked?: boolean; systemSaveDialogInvoked?: boolean; recentPath?: string | null; shellUiRouteClaimed: true; boundedWritebackClaimed: boolean; fullFormatFidelityClaimed: false; wordSameRouteClaimed: false; wordSurfacePixelParityClaimed: false; cloudImportExportClaimed: false; snapshot: Record; } ``` ### ShellReviewCommentRangeLineSegment [Section titled “ShellReviewCommentRangeLineSegment”](#shellreviewcommentrangelinesegment) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewCommentRangeLineSegment { page_index: number; line_location: string; scene_x_milli_px: number; scene_width_milli_px: number; page_scene_fingerprint: string; } ``` # DTO · api-smoke.ts > 1 shell-contract type alias — smoke-run modes: names of internal SumDoc build checks, not used in embedding. 1 type alias — smoke-run modes: names of internal SumDoc build checks, not used in embedding. Internal contract These types describe the exchange inside the desktop SumDoc window. For embedding in your product, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). Some types include internal tags such as `backlog_id: "D38"` or `sharedSceneOwner: "D5"` — these are the task numbers the feature was filed under inside the team. They appear in the response, but embedding doesn’t need them: there’s no reason to parse or store them. Contract module: `api-smoke.ts`. **Types on this page — 1** * [`SmokeMode`](#smokemode) ### SmokeMode [Section titled “SmokeMode”](#smokemode) `TypeAliasDeclaration` · `api-smoke.ts` ```ts type SmokeMode = | "none" | "open" | "custom-titlebar" | "reference-layout" | "multipage-scroll" | "viewport-page" | "sticky-page-context" | "scroll-rail" | "font-canvas" | "visual-preview" | "product-list-status" | "editor-v0-statusbar-document-statistics" | "editor-v0-statusbar-nav-zoom-actions" | "editor-v0-view-market-tranche" | "editor-v0-nav-market-tranche" | "a4-document-navigation-authoring-workflow" | "editor-v0-hide-side-panels" | "editor-v0-ui-locale-switch" | "canvas-only" | "inspector"; // …list truncated: first 20 shown, 382 values total ``` # DTO · api-view.ts > 19 interfaces and 6 type aliases of shell-contract — display: inspector modes, rendering operations, text effects, and print view descriptors. 19 interfaces and 6 type aliases — display: inspector modes, rendering operations, text effects, and print view descriptors. Internal contract These types describe the exchange inside the desktop SumDoc window. For embedding in your product, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). Some types include internal tags such as `backlog_id: "D38"` or `sharedSceneOwner: "D5"` — these are the task numbers the feature was filed under inside the team. They appear in the response, but embedding doesn’t need them: there’s no reason to parse or store them. Contract module: `api-view.ts`. **Types on this page — 25** * [`InspectorMode`](#inspectormode) * [`ShellDrawOpKind`](#shelldrawopkind) * [`ShellDrawOp`](#shelldrawop) * [`ShellTextEffectPaintPass`](#shelltexteffectpaintpass) * [`ShellTextEffectDrawOp`](#shelltexteffectdrawop) * [`ShellPrintLineItem`](#shellprintlineitem) * [`ShellPrintPage`](#shellprintpage) * [`ShellPrintViewDescriptor`](#shellprintviewdescriptor) * [`ShellPrintSnapshot`](#shellprintsnapshot) * [`ShellPaginateFragment`](#shellpaginatefragment) * [`ShellPaginateSnapshot`](#shellpaginatesnapshot) * [`CurrentDocumentTruthViewerData`](#currentdocumenttruthviewerdata) * [`EditorV0QuickPrintRangeMode`](#editorv0quickprintrangemode) * [`EditorV0QuickPrintDuplexMode`](#editorv0quickprintduplexmode) * [`EditorV0QuickPrintDispatchMode`](#editorv0quickprintdispatchmode) * [`EditorV0QuickPrintSelectionGeometry`](#editorv0quickprintselectiongeometry) * [`EditorV0QuickPrintPlanRequest`](#editorv0quickprintplanrequest) * [`EditorV0QuickPrintNativeDispatchResult`](#editorv0quickprintnativedispatchresult) * [`EditorV0QuickPrintPlanResult`](#editorv0quickprintplanresult) * [`EditorV0SectionPageMarginsCommandRequest`](#editorv0sectionpagemarginscommandrequest) * [`EditorV0SectionPageMarginsCommandResult`](#editorv0sectionpagemarginscommandresult) * [`EditorV0SectionPageSetupPreset`](#editorv0sectionpagesetuppreset) * [`EditorV0SectionPageSetupPresetRequest`](#editorv0sectionpagesetuppresetrequest) * [`EditorV0SectionPageSetupPresetResult`](#editorv0sectionpagesetuppresetresult) * [`ShellImageRaster`](#shellimageraster) ### InspectorMode [Section titled “InspectorMode”](#inspectormode) `TypeAliasDeclaration` · `api-view.ts` ```ts type InspectorMode = "print" | "paginate" | "report" | "review"; ``` ### ShellDrawOpKind [Section titled “ShellDrawOpKind”](#shelldrawopkind) `TypeAliasDeclaration` · `api-view.ts` ```ts type ShellDrawOpKind = | "draw-text-line" | "draw-line-number" | "draw-table-cell-box" | "draw-table-row-box" | "draw-image-placeholder" | "draw-paragraph-border-box" | "draw-paragraph-shading-box" | "draw-body-tracked-change-redline" | "draw-body-tracked-change-balloon-bar" | "draw-body-tracked-change-balloon-leader" | "draw-review-comment-anchor" | "draw-review-comment-surface" | "draw-footnote-separator-line" | "draw-endnote-separator-line" | "draw-footnote-table-cell-box" | "draw-footnote-table-row-box" | "draw-shape-textbox" | "draw-shape-rect" | "draw-shape-ellipse" | "draw-shape-round-rect" | "draw-shape-triangle" | "draw-shape-diamond" | "draw-shape-pentagon" | "draw-shape-hexagon" | "draw-shape-parallelogram" | "draw-shape-trapezoid" | "draw-shape-plus" | "draw-shape-star5" | "draw-shape-can" | "draw-shape-cube" | "draw-shape-cloud" | "draw-shape-flowchart-process" | "draw-shape-flowchart-decision" | "draw-shape-flowchart-data" | "draw-shape-flowchart-terminator" | "draw-shape-flowchart-document" | "draw-shape-line" | "draw-shape-left-arrow" | "draw-shape-right-arrow" | "draw-shape-up-arrow" | "draw-shape-down-arrow" | "draw-chart-column" | "draw-chart-line" | "draw-chart-pie" | "draw-chart-error" | "draw-embedded-preserved"; ``` ### ShellDrawOp [Section titled “ShellDrawOp”](#shelldrawop) `InterfaceDeclaration` · `api-view.ts` ```ts interface ShellDrawOp { draw_index: number; op_kind: ShellDrawOpKind; source_line_location: string; scene_x_milli_px: number; scene_y_milli_px: number; scene_box_width_milli_px: number; scene_box_height_milli_px: number; text_baseline_offset_milli_px?: number | null; text: string; base_direction?: "ltr" | "rtl" | null; font_family_name?: string | null; font_size_half_points?: number | null; font_bold?: boolean | null; font_italic?: boolean | null; font_color_rgb?: string | null; font_underline?: string | null; font_underline_color_rgb?: string | null; text_highlight_color?: string | null; text_shading_color_rgb?: string | null; font_strikethrough?: string | null; font_vertical_align?: string | null; font_small_caps?: boolean | null; font_small_caps_size_half_points?: number | null; font_character_spacing_twips?: number | null; d5_ink_bbox_scale_x_per_mille?: number | null; table_cell_fill_color_rgb?: string | null; table_cell_shading_pattern?: string | null; table_cell_shading_foreground_color_rgb?: string | null; table_cell_borders?: ShellTableCellBorder[] | null; review_comment_id?: number | null; } ``` ### ShellTextEffectPaintPass [Section titled “ShellTextEffectPaintPass”](#shelltexteffectpaintpass) `InterfaceDeclaration` · `api-view.ts` ```ts interface ShellTextEffectPaintPass { pass_kind: "fill" | "stroke"; x_offset_milli_px: number; y_offset_milli_px: number; color_rgb: string; alpha_per_mille: number; line_width_milli_px: number; } ``` ### ShellTextEffectDrawOp [Section titled “ShellTextEffectDrawOp”](#shelltexteffectdrawop) `InterfaceDeclaration` · `api-view.ts` ```ts interface ShellTextEffectDrawOp { page_index: number; target_draw_index: number; source_line_location: string; source_run_locations: string[]; text: string; text_effect: "outline" | "shadow" | "emboss" | "imprint"; paint_passes: ShellTextEffectPaintPass[]; } ``` ### ShellPrintLineItem [Section titled “ShellPrintLineItem”](#shellprintlineitem) `InterfaceDeclaration` · `api-view.ts` ```ts interface ShellPrintLineItem { page_index: number; section_index: number; page_role: string; paragraph_index: number; paragraph_location: string; line_index: number; line_location: string; text: string; base_direction?: "ltr" | "rtl" | null; width_milli_px: number; keep_with_next?: boolean; keep_lines_together?: boolean; widow_control?: boolean; page_break_before?: boolean; drop_cap_kind?: string | null; source_fragment_location: string; scene_x_milli_px?: number | null; scene_y_milli_px?: number | null; scene_box_width_milli_px?: number | null; scene_box_height_milli_px?: number | null; text_baseline_offset_milli_px?: number | null; d5_ink_bbox_scale_x_per_mille?: number | null; font_family_name?: string | null; font_size_half_points?: number | null; font_bold?: boolean | null; font_italic?: boolean | null; font_color_rgb?: string | null; font_underline?: string | null; text_highlight_color?: string | null; text_shading_color_rgb?: string | null; font_strikethrough?: string | null; font_vertical_align?: string | null; fragments?: Array<{ run_location: string; text: string; font_family_name?: string | null; font_size_half_points?: number | null; font_bold?: boolean | null; font_italic?: boolean | null; font_color_rgb?: string | null; font_underline?: string | null; text_highlight_color?: string | null; text_shading_color_rgb?: string | null; font_strikethrough?: string | null; font_vertical_align?: string | null; }>; } ``` ### ShellPrintPage [Section titled “ShellPrintPage”](#shellprintpage) `InterfaceDeclaration` · `api-view.ts` ```ts interface ShellPrintPage { page_index: number; display_page_number: number; section_index?: number; page_role: string; page_width_twips: number; page_height_twips: number; column_count: number; column_space_twips?: number | null; column_widths_twips: number[]; column_line_between: boolean; column_right_to_left: boolean; content_box_x_milli_px: number; content_box_y_milli_px: number; content_box_width_milli_px: number; content_box_height_milli_px: number; header_footer_live_band: { text_left_milli_px: number; header_text_top_milli_px: number; footer_text_bottom_inset_milli_px: number; header_band_top_milli_px: number; footer_band_bottom_inset_milli_px: number; band_height_milli_px: number; line_height_milli_px: number; retrospective_bar_left_milli_px: number; font_family_name: string; font_size_milli_px: number; font_size_half_points: number; font_bold: boolean; font_italic: boolean; }; scene_fingerprint: string; screen_view: ShellPrintViewDescriptor; pdf_view: ShellPrintViewDescriptor; line_items?: ShellPrintLineItem[]; draw_ops: ShellDrawOp[]; support_markers?: ShellSupportMarker[]; } ``` ### ShellPrintViewDescriptor [Section titled “ShellPrintViewDescriptor”](#shellprintviewdescriptor) `InterfaceDeclaration` · `api-view.ts` ```ts interface ShellPrintViewDescriptor { view_kind: "screen" | "pdf"; source_scene_fingerprint: string; view_fingerprint: string; page_width_twips: number; page_height_twips: number; column_count: number; column_space_twips?: number | null; column_widths_twips: number[]; column_line_between: boolean; column_right_to_left: boolean; content_box_x_milli_px: number; content_box_y_milli_px: number; content_box_width_milli_px: number; content_box_height_milli_px: number; draw_op_count: number; deferred_lane_markers: string[]; } ``` ### ShellPrintSnapshot [Section titled “ShellPrintSnapshot”](#shellprintsnapshot) `InterfaceDeclaration` · `api-view.ts` ```ts interface ShellPrintSnapshot { stage_id: string; contract_mode: string; fingerprint_mode: string; document_fingerprint: string; source_document_fingerprint?: string; screen_view_fingerprint: string; pdf_view_fingerprint: string; page_count: number; line_item_count: number; draw_op_count: number; text_effect_draw_ops?: ShellTextEffectDrawOp[]; pages: ShellPrintPage[]; support_markers?: ShellSupportMarker[]; scene_cache_limit?: number; scene_cache_count?: number; scene_cache_peak?: number; hydration_payload_bytes?: number; hydration_duration_ms?: number; hydration_dropped_request_count?: number; } ``` ### ShellPaginateFragment [Section titled “ShellPaginateFragment”](#shellpaginatefragment) `InterfaceDeclaration` · `api-view.ts` ```ts interface ShellPaginateFragment { page_index: number; section_index: number; section_source_location?: string; section_type?: string | null; title_page_enabled?: boolean; page_number_in_section?: number; page_number_start?: number | null; page_role: string; block_range_start: number; block_range_end: number; closing_boundary_kind: string; observed_breaks?: ShellObservedBreak[]; header_binding?: { binding_kind: string; relationship_id: string; target_part_name: string; source_location: string; source_kind?: string; source_section_index?: number; } | null; footer_binding?: { binding_kind: string; relationship_id: string; target_part_name: string; source_location: string; source_kind?: string; source_section_index?: number; } | null; support_markers?: ShellSupportMarker[]; column_count?: number; column_space_twips?: number; column_widths_twips?: number[]; line_numbering_restart_mode?: string | null; line_numbering_count_by?: number | null; line_numbering_start?: number | null; } ``` ### ShellPaginateSnapshot [Section titled “ShellPaginateSnapshot”](#shellpaginatesnapshot) `InterfaceDeclaration` · `api-view.ts` ```ts interface ShellPaginateSnapshot { stage_id: string; mirror_margins_enabled?: boolean; even_and_odd_headers_enabled?: boolean; section_count: number; explicit_break_count: number; rendered_break_observation_count: number; page_fragment_count: number; hard_split_count: number; sections?: Array<{ section_index: number; source_location: string; section_type?: string | null; page_width_twips: number; page_height_twips: number; margin_top_twips?: number; margin_right_twips?: number; margin_bottom_twips?: number; margin_left_twips?: number; header_distance_twips?: number; footer_distance_twips?: number; gutter_twips?: number; title_page_enabled?: boolean; page_number_start?: number | null; column_count?: number; column_space_twips?: number; column_widths_twips?: number[]; line_numbering_restart_mode?: string | null; line_numbering_count_by?: number | null; line_numbering_start?: number | null; }>; page_fragments: ShellPaginateFragment[]; support_markers?: ShellSupportMarker[]; } ``` ### CurrentDocumentTruthViewerData [Section titled “CurrentDocumentTruthViewerData”](#currentdocumenttruthviewerdata) `InterfaceDeclaration` · `api-view.ts` ```ts interface CurrentDocumentTruthViewerData { schema: "fastdoc.desktop-truth.current-document-viewer-data.v1"; docxPath: string; repoRelativeDocxPath: string | null; availability: string; fixtureId: string | null; fixturePath: string | null; comparisonIndexPath: string; packetJsonPath: string | null; packetMarkdownPath: string | null; indexEntry: Record | null; packet: Record | null; blockedStates: unknown[]; forbiddenClaims: string[]; productHeartbeat: Record | null; unavailableReason: string | null; explicitUnclaimedAreas: string[]; } ``` ### EditorV0QuickPrintRangeMode [Section titled “EditorV0QuickPrintRangeMode”](#editorv0quickprintrangemode) `TypeAliasDeclaration` · `api-view.ts` ```ts type EditorV0QuickPrintRangeMode = "all" | "current-page" | "selection" | "pages"; ``` ### EditorV0QuickPrintDuplexMode [Section titled “EditorV0QuickPrintDuplexMode”](#editorv0quickprintduplexmode) `TypeAliasDeclaration` · `api-view.ts` ```ts type EditorV0QuickPrintDuplexMode = "one-sided" | "long-edge" | "short-edge"; ``` ### EditorV0QuickPrintDispatchMode [Section titled “EditorV0QuickPrintDispatchMode”](#editorv0quickprintdispatchmode) `TypeAliasDeclaration` · `api-view.ts` ```ts type EditorV0QuickPrintDispatchMode = "plan-only" | "native-print-test-dry-run" | "native-print-dialog" | "native-print"; ``` ### EditorV0QuickPrintSelectionGeometry [Section titled “EditorV0QuickPrintSelectionGeometry”](#editorv0quickprintselectiongeometry) `InterfaceDeclaration` · `api-view.ts` ```ts interface EditorV0QuickPrintSelectionGeometry { anchorXMilliPx: number; anchorYMilliPx: number; focusXMilliPx: number; focusYMilliPx: number; lineLocation: string; } ``` ### EditorV0QuickPrintPlanRequest [Section titled “EditorV0QuickPrintPlanRequest”](#editorv0quickprintplanrequest) `InterfaceDeclaration` · `api-view.ts` ```ts interface EditorV0QuickPrintPlanRequest { outputPath?: string | null; rangeMode?: EditorV0QuickPrintRangeMode; pageRange?: string | null; copies?: number; duplexMode?: EditorV0QuickPrintDuplexMode; currentPageIndex?: number | null; selectionGeometry?: EditorV0QuickPrintSelectionGeometry | null; dispatchMode?: EditorV0QuickPrintDispatchMode | null; deviceName?: string | null; } ``` ### EditorV0QuickPrintNativeDispatchResult [Section titled “EditorV0QuickPrintNativeDispatchResult”](#editorv0quickprintnativedispatchresult) `InterfaceDeclaration` · `api-view.ts` ```ts interface EditorV0QuickPrintNativeDispatchResult { schema: "fastdoc.shell.editor-v0-quick-print-native-dispatch.v1"; requested: boolean; dispatchMode: EditorV0QuickPrintDispatchMode; dispatchState: "plan-only" | "native-print-test-dry-run-not-spooled" | "native-print-spooled" | "native-print-failed" | "native-print-dialog-completed" | "native-print-dialog-canceled" | "native-print-dialog-failed"; sharedScenePdfPath: string | null; hiddenPrintWindowLoaded: boolean; nativePrintApiCalled: boolean; systemPrintDialogInvoked: boolean; printerDriverSpoolExecuted: boolean; printSuccess: boolean | null; printCanceled: boolean; failureReason: string | null; sharedSceneOwner: "D5"; sourceLayoutContract: string | null; sourceDocumentFingerprint: string | null; sourceViewFingerprint: string | null; pageSceneFingerprints: string[]; pageTextContracts: Record[]; selectedPageNumbers: number[]; pageCount: number | null; copies: number; duplexMode: EditorV0QuickPrintDuplexMode; } ``` ### EditorV0QuickPrintPlanResult [Section titled “EditorV0QuickPrintPlanResult”](#editorv0quickprintplanresult) `InterfaceDeclaration` · `api-view.ts` ```ts interface EditorV0QuickPrintPlanResult { prepared: boolean; schema: "fastdoc.shell.editor-v0-quick-print-action-result.v1"; documentPath: string; outputPath: string | null; rangeMode: EditorV0QuickPrintRangeMode; pageRange: string | null; copies: number; duplexMode: EditorV0QuickPrintDuplexMode; duplexCapability: { requestedMode: EditorV0QuickPrintDuplexMode; planSupported: true; nativeSupported: boolean; state: "one-sided" | "plan-only-native-unsupported"; reason: string | null; }; printerTarget: "a4-local-preview" | "system-default"; planPrinterTarget: "a4-local-preview"; planKind: string | null; pageCount: number | null; selectedPageNumbers: number[]; sheetCount: number | null; dispatchFingerprint: string | null; selectionGeometry: EditorV0QuickPrintSelectionGeometry | null; dispatchMode: EditorV0QuickPrintDispatchMode; nativePrintDispatch: EditorV0QuickPrintNativeDispatchResult; plan: Record; claims: Record; } ``` ### EditorV0SectionPageMarginsCommandRequest [Section titled “EditorV0SectionPageMarginsCommandRequest”](#editorv0sectionpagemarginscommandrequest) `InterfaceDeclaration` · `api-view.ts` ```ts interface EditorV0SectionPageMarginsCommandRequest { topMarginTwips: number; rightMarginTwips: number; bottomMarginTwips: number; leftMarginTwips: number; gutterTwips?: number | null; gutterPosition?: "left" | "top" | null; mirrorMarginsEnabled?: boolean | null; multiplePages?: "normal" | "mirror" | "two-pages-per-sheet" | "book-fold" | "reverse-book-fold"; pageOrientation?: "portrait" | "landscape"; paperSize?: "a3" | "a4" | "a5" | "letter" | "custom"; paperWidthTwips?: number; paperHeightTwips?: number; paperSourceFirst?: number | null; paperSourceOther?: number | null; sectionStart?: "nextPage" | "continuous" | "newColumn" | "evenPage" | "oddPage"; suppressEndnotes?: boolean; differentOddEvenPages?: boolean; differentFirstPage?: boolean; headerDistanceTwips?: number; footerDistanceTwips?: number; verticalAlignment?: "top" | "center" | "both" | "bottom"; lineNumberingMode?: "none" | "continuous" | "restart-page" | "restart-section"; lineNumberStart?: number; lineNumberCountBy?: number; lineNumberDistanceTwips?: number; paragraphIndex: number; paragraphIndexes?: number[] | null; outputKind?: "editor-v0-vertical-ruler-margin-writeback"; rulerDragRole?: "section-left-margin" | "section-right-margin" | "section-top-margin" | "section-bottom-margin" | null; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0SectionPageMarginsCommandResult [Section titled “EditorV0SectionPageMarginsCommandResult”](#editorv0sectionpagemarginscommandresult) `InterfaceDeclaration` · `api-view.ts` ```ts interface EditorV0SectionPageMarginsCommandResult { applied: boolean; outputPath: string; topMarginTwips: number; rightMarginTwips: number; bottomMarginTwips: number; leftMarginTwips: number; gutterTwips?: number | null; gutterPosition?: "left" | "top" | null; mirrorMarginsEnabled?: boolean | null; pageSetupValues?: Record; paragraphIndex: number; paragraphIndexes?: number[]; beforeTexts: string[]; afterTexts: string[]; } ``` ### EditorV0SectionPageSetupPreset [Section titled “EditorV0SectionPageSetupPreset”](#editorv0sectionpagesetuppreset) `TypeAliasDeclaration` · `api-view.ts` ```ts type EditorV0SectionPageSetupPreset = | "paper-a3" | "paper-a4" | "paper-a5" | "paper-letter" | "orientation-portrait" | "orientation-landscape" | "margins-normal" | "margins-narrow" | "margins-wide" | "margins-2cm" | "margins-report" | "margins-mirror" | "margins-binding" | "margins-binding-top" | "margins-moderate" | "columns-one" | "columns-two" | "columns-three" | "columns-left" | "columns-right" | "columns-custom-widths"; ``` ### EditorV0SectionPageSetupPresetRequest [Section titled “EditorV0SectionPageSetupPresetRequest”](#editorv0sectionpagesetuppresetrequest) `InterfaceDeclaration` · `api-view.ts` ```ts interface EditorV0SectionPageSetupPresetRequest { preset: EditorV0SectionPageSetupPreset; paragraphIndex: number; outputPath?: string | null; reopenAfterWrite?: boolean; columnWidthsTwips?: number[]; columnSpaceTwips?: number | null; columnLineBetween?: boolean | null; columnRightToLeft?: boolean | null; selectedParagraphStartIndex?: number | null; selectedParagraphEndIndex?: number | null; } ``` ### EditorV0SectionPageSetupPresetResult [Section titled “EditorV0SectionPageSetupPresetResult”](#editorv0sectionpagesetuppresetresult) `InterfaceDeclaration` · `api-view.ts` ```ts interface EditorV0SectionPageSetupPresetResult { applied: boolean; outputPath: string; preset: EditorV0SectionPageSetupPreset; label: string; paragraphIndex: number; beforePageSetupState: Record; afterPageSetupState: Record | null; selectedAction: Record | null; mirrorMarginsEnabled?: boolean; beforeTexts: string[]; afterTexts: string[]; popupWarningShown: false; } ``` ### ShellImageRaster [Section titled “ShellImageRaster”](#shellimageraster) `InterfaceDeclaration` · `api-view.ts` ```ts interface ShellImageRaster { receipt_schema: "fastdoc.d38-raster-scene-receipt.v1"; session_id: string; revision: number; source_document_fingerprint: string; requested_page_indexes: number[]; window_block_range_start?: number | null; window_block_range_end?: number | null; window_page_range_start: number; window_page_range_end: number; op_kind: "draw-image-raster"; page_index: number; page_scene_fingerprint: string; draw_index: number; source_line_location: string; relationship_id: string; target_part_name: string; content_type: "image/gif" | "image/jpeg" | "image/png"; package_fingerprint: string; part_sha256: string; byte_len: number; data_base64: string; intrinsic_width_px: number; intrinsic_height_px: number; crop_left?: number | null; crop_top?: number | null; crop_right?: number | null; crop_bottom?: number | null; rotation_degrees?: number | null; flip_horizontal?: boolean | null; flip_vertical?: boolean | null; scene_x_milli_px: number; scene_y_milli_px: number; scene_box_width_milli_px: number; scene_box_height_milli_px: number; bytes_shared_with_draw_index?: number | null; bytes_deferred?: boolean; } ``` # DTO · Fields, footnotes, and references > 34 interfaces and 8 type aliases from the `api-edit.ts` module — footnotes, table of contents, bibliography, indexes, mail merge, and form fields. 34 interfaces and 8 type aliases — footnotes, table of contents, bibliography, indexes, mail merge, and form fields. Internal contract These types describe the exchange inside the desktop SumDoc window. For embedding in your product, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). Some types include internal tags such as `backlog_id: "D38"` or `sharedSceneOwner: "D5"` — these are the task numbers the feature was filed under inside the team. They appear in the response, but embedding doesn’t need them: there’s no reason to parse or store them. Contract module: `api-edit.ts`. Other topics in this module: [Text and paragraphs](/reference/sumdoc/dto-edit-text/) · [Tables: structure](/reference/sumdoc/dto-edit-table-structure/) · [Tables: cells and formatting](/reference/sumdoc/dto-edit-table-cells/) · [Tables: placement on the page](/reference/sumdoc/dto-edit-table-layout/) · [Page setup and document structure](/reference/sumdoc/dto-edit-page/) · [Objects and drawings](/reference/sumdoc/dto-edit-objects/) · **Fields, footnotes, and references**. Types on this page — 42 * [`EditorV0InsertDateFieldRequest`](#editorv0insertdatefieldrequest) * [`EditorV0InsertDateTimeFieldRequest`](#editorv0insertdatetimefieldrequest) * [`EditorV0DateFieldKind`](#editorv0datefieldkind) * [`EditorV0UpdateDateFieldResultRequest`](#editorv0updatedatefieldresultrequest) * [`EditorV0InsertFootnoteRequest`](#editorv0insertfootnoterequest) * [`EditorV0ManageNoteKind`](#editorv0managenotekind) * [`EditorV0ManageNoteAction`](#editorv0managenoteaction) * [`EditorV0ManageNoteRequest`](#editorv0managenoterequest) * [`EditorV0CrossReferenceFieldKind`](#editorv0crossreferencefieldkind) * [`EditorV0InsertCrossReferenceRequest`](#editorv0insertcrossreferencerequest) * [`EditorV0UpdateCrossReferenceFieldResultRequest`](#editorv0updatecrossreferencefieldresultrequest) * [`EditorV0UpdateSequenceFieldResultRequest`](#editorv0updatesequencefieldresultrequest) * [`EditorV0BibliographyStyleRequest`](#editorv0bibliographystylerequest) * [`EditorV0BibliographyCommandAction`](#editorv0bibliographycommandaction) * [`EditorV0BibliographyCommandRequest`](#editorv0bibliographycommandrequest) * [`EditorV0IndexAuthoritiesCommandAction`](#editorv0indexauthoritiescommandaction) * [`EditorV0IndexAuthoritiesCommandRequest`](#editorv0indexauthoritiescommandrequest) * [`EditorV0MailMergeCommandAction`](#editorv0mailmergecommandaction) * [`EditorV0MailMergeCommandRequest`](#editorv0mailmergecommandrequest) * [`EditorV0FormsFieldsBusinessAction`](#editorv0formsfieldsbusinessaction) * [`EditorV0FormsFieldsBusinessRequest`](#editorv0formsfieldsbusinessrequest) * [`EditorV0InsertEndnoteRequest`](#editorv0insertendnoterequest) * [`EditorV0InsertHyperlinkRequest`](#editorv0inserthyperlinkrequest) * [`EditorV0InsertBookmarkRequest`](#editorv0insertbookmarkrequest) * [`EditorV0InsertDateFieldResult`](#editorv0insertdatefieldresult) * [`EditorV0InsertDateTimeFieldResult`](#editorv0insertdatetimefieldresult) * [`EditorV0UpdateDateFieldResultResult`](#editorv0updatedatefieldresultresult) * [`EditorV0InsertFootnoteResult`](#editorv0insertfootnoteresult) * [`EditorV0ManageNoteResult`](#editorv0managenoteresult) * [`EditorV0InsertCrossReferenceResult`](#editorv0insertcrossreferenceresult) * [`EditorV0UpdateCrossReferenceFieldResultResult`](#editorv0updatecrossreferencefieldresultresult) * [`EditorV0UpdateSequenceFieldResultResult`](#editorv0updatesequencefieldresultresult) * [`EditorV0BibliographyStyleResult`](#editorv0bibliographystyleresult) * [`EditorV0BibliographyCommandResult`](#editorv0bibliographycommandresult) * [`EditorV0IndexAuthoritiesCommandResult`](#editorv0indexauthoritiescommandresult) * [`EditorV0MailMergeCommandResult`](#editorv0mailmergecommandresult) * [`EditorV0FormsFieldsBusinessResult`](#editorv0formsfieldsbusinessresult) * [`EditorV0InsertTocResult`](#editorv0inserttocresult) * [`EditorV0RemoveTocResult`](#editorv0removetocresult) * [`EditorV0InsertEndnoteResult`](#editorv0insertendnoteresult) * [`EditorV0InsertHyperlinkResult`](#editorv0inserthyperlinkresult) * [`EditorV0InsertBookmarkResult`](#editorv0insertbookmarkresult) ### EditorV0InsertDateFieldRequest [Section titled “EditorV0InsertDateFieldRequest”](#editorv0insertdatefieldrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertDateFieldRequest { paragraphIndex: number; offset?: number | null; isoDate: string; picture?: string | null; language?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0InsertDateTimeFieldRequest [Section titled “EditorV0InsertDateTimeFieldRequest”](#editorv0insertdatetimefieldrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertDateTimeFieldRequest { paragraphIndex: number; offset?: number | null; isoDateTime: string; picture?: string | null; language?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0DateFieldKind [Section titled “EditorV0DateFieldKind”](#editorv0datefieldkind) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0DateFieldKind = "date" | "date-time"; ``` ### EditorV0UpdateDateFieldResultRequest [Section titled “EditorV0UpdateDateFieldResultRequest”](#editorv0updatedatefieldresultrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0UpdateDateFieldResultRequest { paragraphIndex: number; fieldKind?: EditorV0DateFieldKind | null; currentResult: string; updatedResult: string; picture?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0InsertFootnoteRequest [Section titled “EditorV0InsertFootnoteRequest”](#editorv0insertfootnoterequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertFootnoteRequest { paragraphIndex: number; offset?: number | null; noteText?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0ManageNoteKind [Section titled “EditorV0ManageNoteKind”](#editorv0managenotekind) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0ManageNoteKind = "footnote" | "endnote"; ``` ### EditorV0ManageNoteAction [Section titled “EditorV0ManageNoteAction”](#editorv0managenoteaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0ManageNoteAction = "edit" | "delete"; ``` ### EditorV0ManageNoteRequest [Section titled “EditorV0ManageNoteRequest”](#editorv0managenoterequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ManageNoteRequest { kind: EditorV0ManageNoteKind; action: EditorV0ManageNoteAction; noteId?: number | null; noteText?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0CrossReferenceFieldKind [Section titled “EditorV0CrossReferenceFieldKind”](#editorv0crossreferencefieldkind) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0CrossReferenceFieldKind = "REF" | "PAGEREF" | "NOTEREF"; ``` ### EditorV0InsertCrossReferenceRequest [Section titled “EditorV0InsertCrossReferenceRequest”](#editorv0insertcrossreferencerequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertCrossReferenceRequest { paragraphIndex: number; fieldKind?: EditorV0CrossReferenceFieldKind | null; targetBookmark: string; resultText: string; targetKind?: "bookmark" | "caption" | null; referenceKind?: "stored-result" | "only-label-and-number" | null; captionLabel?: string | null; captionParagraphIndex?: number | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0UpdateCrossReferenceFieldResultRequest [Section titled “EditorV0UpdateCrossReferenceFieldResultRequest”](#editorv0updatecrossreferencefieldresultrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0UpdateCrossReferenceFieldResultRequest { paragraphIndex: number; fieldKind?: EditorV0CrossReferenceFieldKind | null; targetBookmark: string; currentResult: string; updatedResult: string; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0UpdateSequenceFieldResultRequest [Section titled “EditorV0UpdateSequenceFieldResultRequest”](#editorv0updatesequencefieldresultrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0UpdateSequenceFieldResultRequest { paragraphIndex: number; fieldLabel: string; currentResult: string; updatedResult: string; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0BibliographyStyleRequest [Section titled “EditorV0BibliographyStyleRequest”](#editorv0bibliographystylerequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0BibliographyStyleRequest { selectedStyle: string; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0BibliographyCommandAction [Section titled “EditorV0BibliographyCommandAction”](#editorv0bibliographycommandaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0BibliographyCommandAction = "insert-citation" | "add-source" | "insert-bibliography"; ``` ### EditorV0BibliographyCommandRequest [Section titled “EditorV0BibliographyCommandRequest”](#editorv0bibliographycommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0BibliographyCommandRequest { action: EditorV0BibliographyCommandAction; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0IndexAuthoritiesCommandAction [Section titled “EditorV0IndexAuthoritiesCommandAction”](#editorv0indexauthoritiescommandaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0IndexAuthoritiesCommandAction = "mark-index-entry" | "insert-index" | "update-index" | "mark-authority-citation" | "insert-table-of-authorities" | "update-table-of-authorities"; ``` ### EditorV0IndexAuthoritiesCommandRequest [Section titled “EditorV0IndexAuthoritiesCommandRequest”](#editorv0indexauthoritiescommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0IndexAuthoritiesCommandRequest { action: EditorV0IndexAuthoritiesCommandAction; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0MailMergeCommandAction [Section titled “EditorV0MailMergeCommandAction”](#editorv0mailmergecommandaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0MailMergeCommandAction = | "start-mail-merge" | "select-recipients" | "edit-recipient-list" | "filter-recipients" | "insert-merge-field" | "insert-greeting-line" | "insert-rule-if" | "update-labels" | "preview-results" | "first-record" | "previous-record" | "next-record" | "last-record" | "finish-merge"; ``` ### EditorV0MailMergeCommandRequest [Section titled “EditorV0MailMergeCommandRequest”](#editorv0mailmergecommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0MailMergeCommandRequest { action: EditorV0MailMergeCommandAction; recordIndex?: number | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0FormsFieldsBusinessAction [Section titled “EditorV0FormsFieldsBusinessAction”](#editorv0formsfieldsbusinessaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0FormsFieldsBusinessAction = "insert-form-controls" | "protect-forms" | "fill-form-values" | "attempt-body-edit-while-protected" | "unprotect-forms" | "insert-business-fields" | "update-business-fields" | "insert-merge-placeholders" | "merge-from-data"; ``` ### EditorV0FormsFieldsBusinessRequest [Section titled “EditorV0FormsFieldsBusinessRequest”](#editorv0formsfieldsbusinessrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0FormsFieldsBusinessRequest { action: EditorV0FormsFieldsBusinessAction; dataSourcePath?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0InsertEndnoteRequest [Section titled “EditorV0InsertEndnoteRequest”](#editorv0insertendnoterequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertEndnoteRequest { paragraphIndex: number; offset?: number | null; noteText?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0InsertHyperlinkRequest [Section titled “EditorV0InsertHyperlinkRequest”](#editorv0inserthyperlinkrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertHyperlinkRequest { paragraphIndex: number; offset?: number | null; deleteCount?: number | null; hyperlinkUrl: string; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0InsertBookmarkRequest [Section titled “EditorV0InsertBookmarkRequest”](#editorv0insertbookmarkrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertBookmarkRequest { paragraphIndex: number; offset: number; deleteCount: number; bookmarkName: string; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0InsertDateFieldResult [Section titled “EditorV0InsertDateFieldResult”](#editorv0insertdatefieldresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertDateFieldResult { schema: "fastdoc.shell.editor-v0-insert-date-field-action.v1"; operationKind: "insert-date-field"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; paragraphIndex: number; offset: number; isoDate: string; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0InsertDateTimeFieldResult [Section titled “EditorV0InsertDateTimeFieldResult”](#editorv0insertdatetimefieldresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertDateTimeFieldResult { schema: "fastdoc.shell.editor-v0-insert-date-time-field-action.v1"; operationKind: "insert-date-time-field"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; paragraphIndex: number; offset: number; isoDateTime: string; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0UpdateDateFieldResultResult [Section titled “EditorV0UpdateDateFieldResultResult”](#editorv0updatedatefieldresultresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0UpdateDateFieldResultResult { schema: "fastdoc.shell.editor-v0-update-date-field-result-action.v1"; operationKind: "update-date-field-result"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; paragraphIndex: number; fieldKind: EditorV0DateFieldKind; currentResult: string; updatedResult: string; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0InsertFootnoteResult [Section titled “EditorV0InsertFootnoteResult”](#editorv0insertfootnoteresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertFootnoteResult { schema: "fastdoc.shell.editor-v0-insert-footnote-action.v1"; operationKind: "insert-footnote"; applied: boolean; documentPath: string | null; outputPath: string | null; paragraphIndex: number; offset: number; noteText: string; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0ManageNoteResult [Section titled “EditorV0ManageNoteResult”](#editorv0managenoteresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ManageNoteResult { schema: "fastdoc.shell.editor-v0-manage-note-action.v1"; operationKind: "edit-footnote" | "delete-footnote" | "edit-endnote" | "delete-endnote"; applied: boolean; documentPath: string | null; outputPath: string | null; kind: EditorV0ManageNoteKind; action: EditorV0ManageNoteAction; noteId: number; noteText: string | null; previousText: string; noteCountBefore: number; noteCountAfter: number; referenceCountBefore: number; referenceCountAfter: number; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0InsertCrossReferenceResult [Section titled “EditorV0InsertCrossReferenceResult”](#editorv0insertcrossreferenceresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertCrossReferenceResult { schema: "fastdoc.shell.editor-v0-insert-cross-reference-action.v1"; operationKind: "insert-cross-reference"; applied: boolean; documentPath: string | null; outputPath: string | null; paragraphIndex: number; fieldKind: EditorV0CrossReferenceFieldKind; targetBookmark: string; resultText: string; targetKind: "bookmark" | "caption"; referenceKind: "stored-result" | "only-label-and-number"; captionLabel: string | null; captionParagraphIndex: number | null; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0UpdateCrossReferenceFieldResultResult [Section titled “EditorV0UpdateCrossReferenceFieldResultResult”](#editorv0updatecrossreferencefieldresultresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0UpdateCrossReferenceFieldResultResult { schema: "fastdoc.shell.editor-v0-update-cross-reference-field-result-action.v1"; operationKind: "update-cross-reference-field-result"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; paragraphIndex: number; fieldKind: EditorV0CrossReferenceFieldKind; targetBookmark: string; currentResult: string; updatedResult: string; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0UpdateSequenceFieldResultResult [Section titled “EditorV0UpdateSequenceFieldResultResult”](#editorv0updatesequencefieldresultresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0UpdateSequenceFieldResultResult { schema: "fastdoc.shell.editor-v0-update-sequence-field-result-action.v1"; operationKind: "update-sequence-field-result"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; paragraphIndex: number; fieldLabel: string; currentResult: string; updatedResult: string; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0BibliographyStyleResult [Section titled “EditorV0BibliographyStyleResult”](#editorv0bibliographystyleresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0BibliographyStyleResult { schema: "fastdoc.shell.editor-v0-bibliography-style-action.v1"; operationKind: "set-bibliography-style"; applied: boolean; documentPath: string | null; outputPath: string | null; selectedStyle: string; previousStyle: string | null; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0BibliographyCommandResult [Section titled “EditorV0BibliographyCommandResult”](#editorv0bibliographycommandresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0BibliographyCommandResult { schema: "fastdoc.shell.editor-v0-bibliography-command-action.v1"; operationKind: "bibliography-command"; action: EditorV0BibliographyCommandAction; applied: boolean; documentPath: string | null; outputPath: string | null; documentPathAfterReopen: string | null; currentDocumentReopened: boolean; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; sourceCountBefore: number | null; sourceCountAfter: number | null; fieldCountBefore: number | null; fieldCountAfter: number | null; citationFieldCountBefore: number | null; citationFieldCountAfter: number | null; bibliographyFieldCountBefore: number | null; bibliographyFieldCountAfter: number | null; insertedCitationTag: string | null; insertedCitationResultText: string | null; addedSourceTag: string | null; insertedBibliographyResultText: string | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0IndexAuthoritiesCommandResult [Section titled “EditorV0IndexAuthoritiesCommandResult”](#editorv0indexauthoritiescommandresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0IndexAuthoritiesCommandResult { schema: "fastdoc.shell.editor-v0-index-authorities-command-action.v1"; operationKind: "index-authorities-command"; action: EditorV0IndexAuthoritiesCommandAction; applied: boolean; documentPath: string | null; outputPath: string | null; documentPathAfterReopen: string | null; currentDocumentReopened: boolean; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; fieldCountBefore: number | null; fieldCountAfter: number | null; xeFieldCountBefore: number | null; xeFieldCountAfter: number | null; indexFieldCountBefore: number | null; indexFieldCountAfter: number | null; taFieldCountBefore: number | null; taFieldCountAfter: number | null; toaFieldCountBefore: number | null; toaFieldCountAfter: number | null; insertedIndexEntryText: string | null; insertedIndexResultText: string | null; updatedIndexResultText: string | null; insertedAuthorityEntryText: string | null; insertedTableOfAuthoritiesResultText: string | null; updatedTableOfAuthoritiesResultText: string | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; fullWordFieldEngineClaim: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0MailMergeCommandResult [Section titled “EditorV0MailMergeCommandResult”](#editorv0mailmergecommandresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0MailMergeCommandResult { schema: "fastdoc.shell.editor-v0-mail-merge-command-action.v1"; operationKind: "mail-merge-command"; action: EditorV0MailMergeCommandAction; applied: boolean; documentPath: string | null; outputPath: string | null; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; fieldCountBefore: number | null; fieldCountAfter: number | null; mergeFieldCountBefore: number | null; mergeFieldCountAfter: number | null; ifFieldCountBefore: number | null; ifFieldCountAfter: number | null; settingsMailMergeBefore: boolean | null; settingsMailMergeAfter: boolean | null; recipientCount: number | null; activeRecordIndexBefore: number | null; activeRecordIndexAfter: number | null; activeRecordDisplayText: string | null; insertedMergeFieldNames: string[]; previewRecordIndex: number | null; previewResultText: string | null; finishRecordIndex: number | null; finishResultText: string | null; labelsResultText: string | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; externalDataSourceClaim: false; outlookDeliveryClaim: false; fullWordMailMergeEngineClaim: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0FormsFieldsBusinessResult [Section titled “EditorV0FormsFieldsBusinessResult”](#editorv0formsfieldsbusinessresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0FormsFieldsBusinessResult { schema: "fastdoc.shell.editor-v0-forms-fields-business-action.v1"; operationKind: "forms-fields-business-command"; action: EditorV0FormsFieldsBusinessAction; applied: boolean; documentPath: string | null; outputPath: string | null; dataSourcePath: string | null; documentPathAfterReopen: string | null; currentDocumentReopened: boolean; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; formTextInputCountAfter: number | null; formCheckboxCountAfter: number | null; formDropdownCountAfter: number | null; formValueCountAfter: number | null; protectionEditAfter: string | null; bodyEditBlocked: boolean | null; unprotectRestoresEditing: boolean | null; dateFieldCountAfter: number | null; documentPropertyFieldCountAfter: number | null; refFieldCountAfter: number | null; calculatedFieldCountAfter: number | null; fieldsUpdated: boolean | null; mergePlaceholderCountAfter: number | null; mergeRecordCount: number | null; mergeTemplatePreserved: boolean | null; mergeOutputDocxTruth: boolean | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; passwordOrEncryptionParityClaim: false; fullWordFieldEngineClaim: false; fullWordMailMergeEngineClaim: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0InsertTocResult [Section titled “EditorV0InsertTocResult”](#editorv0inserttocresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertTocResult { schema: "fastdoc.shell.editor-v0-insert-toc-action.v1"; operationKind: "insert-toc"; applied: boolean; documentPath: string | null; outputPath: string | null; documentPathAfterReopen: string | null; currentDocumentReopened: boolean; insertedInstructionText: string | null; insertedResultText: string | null; tocFieldCountBefore: number | null; tocFieldCountAfter: number | null; headingCount: number | null; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0RemoveTocResult [Section titled “EditorV0RemoveTocResult”](#editorv0removetocresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0RemoveTocResult { schema: "fastdoc.shell.editor-v0-remove-toc-action.v1"; operationKind: "remove-toc"; applied: boolean; documentPath: string | null; outputPath: string | null; documentPathAfterReopen: string | null; currentDocumentReopened: boolean; removedResultText: string | null; removedBlockIndex: number | null; tocFieldCountBefore: number | null; tocFieldCountAfter: number | null; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0InsertEndnoteResult [Section titled “EditorV0InsertEndnoteResult”](#editorv0insertendnoteresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertEndnoteResult { schema: "fastdoc.shell.editor-v0-insert-endnote-action.v1"; operationKind: "insert-endnote"; applied: boolean; documentPath: string | null; outputPath: string | null; paragraphIndex: number; offset: number; noteText: string; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0InsertHyperlinkResult [Section titled “EditorV0InsertHyperlinkResult”](#editorv0inserthyperlinkresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertHyperlinkResult { schema: "fastdoc.shell.editor-v0-insert-hyperlink-action.v1"; operationKind: "auto-create-hyperlink"; applied: boolean; documentPath: string | null; outputPath: string | null; paragraphIndex: number; offset: number; deleteCount: number; hyperlinkUrl: string; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0InsertBookmarkResult [Section titled “EditorV0InsertBookmarkResult”](#editorv0insertbookmarkresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertBookmarkResult { schema: "fastdoc.shell.editor-v0-insert-bookmark-action.v1"; operationKind: "insert-bookmark"; applied: boolean; documentPath: string | null; outputPath: string | null; paragraphIndex: number; offset: number; deleteCount: number; bookmarkName: string; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` # DTO · Objects and drawings > 29 interfaces and 2 type aliases from the `api-edit.ts` module — images, shapes, formulas, and other insertable objects. 29 interfaces and 2 type aliases — images, shapes, formulas, and other insertable objects. Internal contract These types describe the exchange inside the desktop SumDoc window. For embedding in your product, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). Some types include internal tags such as `backlog_id: "D38"` or `sharedSceneOwner: "D5"` — these are the task numbers the feature was filed under inside the team. They appear in the response, but embedding doesn’t need them: there’s no reason to parse or store them. Contract module: `api-edit.ts`. Other topics in this module: [Text and paragraphs](/reference/sumdoc/dto-edit-text/) · [Tables: structure](/reference/sumdoc/dto-edit-table-structure/) · [Tables: cells and formatting](/reference/sumdoc/dto-edit-table-cells/) · [Tables: placement on the page](/reference/sumdoc/dto-edit-table-layout/) · [Page setup and document structure](/reference/sumdoc/dto-edit-page/) · **Objects and drawings** · [Fields, footnotes, and references](/reference/sumdoc/dto-edit-fields/). Types on this page — 31 * [`EditorV0InsertImageObjectRequest`](#editorv0insertimageobjectrequest) * [`EditorV0InsertTextBoxObjectRequest`](#editorv0inserttextboxobjectrequest) * [`EditorV0InsertShapeObjectRequest`](#editorv0insertshapeobjectrequest) * [`EditorV0InsertEquationObjectRequest`](#editorv0insertequationobjectrequest) * [`EditorV0EquationSymbolAuthoringRequest`](#editorv0equationsymbolauthoringrequest) * [`EditorV0EditEquationObjectRequest`](#editorv0editequationobjectrequest) * [`EditorV0ResizeDrawingObjectRequest`](#editorv0resizedrawingobjectrequest) * [`EditorV0MoveDrawingObjectRequest`](#editorv0movedrawingobjectrequest) * [`EditorV0DistributeDrawingObjectsRequest`](#editorv0distributedrawingobjectsrequest) * [`EditorV0SetDrawingObjectStyleRequest`](#editorv0setdrawingobjectstylerequest) * [`EditorV0DeleteDrawingObjectRequest`](#editorv0deletedrawingobjectrequest) * [`EditorV0SetDrawingObjectAnchorLockRequest`](#editorv0setdrawingobjectanchorlockrequest) * [`EditorV0GroupDrawingObjectsRequest`](#editorv0groupdrawingobjectsrequest) * [`EditorV0UngroupDrawingObjectRequest`](#editorv0ungroupdrawingobjectrequest) * [`EditorV0EditDrawingObjectTextRequest`](#editorv0editdrawingobjecttextrequest) * [`EditorV0InsertObjectTextFileSourceResult`](#editorv0insertobjecttextfilesourceresult) * [`EditorV0InsertImageObjectResult`](#editorv0insertimageobjectresult) * [`EditorV0InsertEquationObjectResult`](#editorv0insertequationobjectresult) * [`EditorV0EquationSymbolAuthoringResult`](#editorv0equationsymbolauthoringresult) * [`EditorV0EditEquationObjectResult`](#editorv0editequationobjectresult) * [`EditorV0InsertTextBoxObjectResult`](#editorv0inserttextboxobjectresult) * [`EditorV0InsertShapeObjectResult`](#editorv0insertshapeobjectresult) * [`EditorV0EditDrawingObjectTextResult`](#editorv0editdrawingobjecttextresult) * [`EditorV0ResizeDrawingObjectResult`](#editorv0resizedrawingobjectresult) * [`EditorV0MoveDrawingObjectResult`](#editorv0movedrawingobjectresult) * [`EditorV0DistributeDrawingObjectsResult`](#editorv0distributedrawingobjectsresult) * [`EditorV0SetDrawingObjectStyleResult`](#editorv0setdrawingobjectstyleresult) * [`EditorV0DeleteDrawingObjectResult`](#editorv0deletedrawingobjectresult) * [`EditorV0SetDrawingObjectAnchorLockResult`](#editorv0setdrawingobjectanchorlockresult) * [`EditorV0GroupDrawingObjectsResult`](#editorv0groupdrawingobjectsresult) * [`EditorV0UngroupDrawingObjectResult`](#editorv0ungroupdrawingobjectresult) ### EditorV0InsertImageObjectRequest [Section titled “EditorV0InsertImageObjectRequest”](#editorv0insertimageobjectrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertImageObjectRequest { paragraphIndex: number; imagePath: string; wrapMode?: "inline" | "square" | "tight" | "through" | "top-bottom" | "behind-text" | "in-front-of-text" | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0InsertTextBoxObjectRequest [Section titled “EditorV0InsertTextBoxObjectRequest”](#editorv0inserttextboxobjectrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertTextBoxObjectRequest { paragraphIndex: number; text?: string | null; displayName?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; widthEmu?: number | null; heightEmu?: number | null; } ``` ### EditorV0InsertShapeObjectRequest [Section titled “EditorV0InsertShapeObjectRequest”](#editorv0insertshapeobjectrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertShapeObjectRequest { paragraphIndex: number; shape?: "rect" | string | null; displayName?: string | null; text?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; widthEmu?: number | null; heightEmu?: number | null; } ``` ### EditorV0InsertEquationObjectRequest [Section titled “EditorV0InsertEquationObjectRequest”](#editorv0insertequationobjectrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertEquationObjectRequest { schema?: "fastdoc.shell.equation-symbol-authoring.request.v1"; operationKind?: "insert-equation" | "edit-equation" | "delete-equation" | "insert-symbol"; selection?: { partName: string; paragraphLocation: string; textOffset: number; } | null; equationIndex?: number | null; linearInput?: string | null; symbol?: string | null; expectedDocumentPath?: string | null; expectedPartHash?: string | null; historyDepth?: number | null; paragraphIndex?: number; text?: string; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0EquationSymbolAuthoringRequest [Section titled “EditorV0EquationSymbolAuthoringRequest”](#editorv0equationsymbolauthoringrequest) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0EquationSymbolAuthoringRequest = EditorV0InsertEquationObjectRequest; ``` ### EditorV0EditEquationObjectRequest [Section titled “EditorV0EditEquationObjectRequest”](#editorv0editequationobjectrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0EditEquationObjectRequest { equationIndex?: number | null; text: string; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0ResizeDrawingObjectRequest [Section titled “EditorV0ResizeDrawingObjectRequest”](#editorv0resizedrawingobjectrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ResizeDrawingObjectRequest { objectLocation?: string | null; sourceLocation?: string | null; widthEmu: number; heightEmu: number; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0MoveDrawingObjectRequest [Section titled “EditorV0MoveDrawingObjectRequest”](#editorv0movedrawingobjectrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0MoveDrawingObjectRequest { objectLocation?: string | null; sourceLocation?: string | null; xOffsetEmu: number; yOffsetEmu: number; xRelativeFrom?: string | null; yRelativeFrom?: string | null; sourcePart?: string | null; sourceDrawingIndex?: number | null; wrapMode?: "inline" | "square" | "tight" | "through" | "top-bottom" | "behind-text" | "in-front-of-text" | null; positionBehavior?: "move-with-text" | "fix-position-on-page" | null; arrangeMode?: "bring-forward" | "bring-front" | "send-backward" | "send-back" | "behind-text" | "in-front-of-text" | null; alignHorizontal?: "left" | "center" | "right" | null; alignVertical?: "top" | "center" | "bottom" | null; alignRelativeFrom?: "margin" | "page" | null; rotateDegrees?: number | null; locked?: boolean | null; hidden?: boolean | null; duplicateTargetPart?: string | null; duplicateTargetStory?: "body" | "table" | "header" | "footer" | null; duplicateTargetParagraphIndex?: number | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0DistributeDrawingObjectsRequest [Section titled “EditorV0DistributeDrawingObjectsRequest”](#editorv0distributedrawingobjectsrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0DistributeDrawingObjectsRequest { objectLocations: string[]; axis: "horizontal" | "vertical"; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0SetDrawingObjectStyleRequest [Section titled “EditorV0SetDrawingObjectStyleRequest”](#editorv0setdrawingobjectstylerequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0SetDrawingObjectStyleRequest { objectLocation?: string | null; sourceLocation?: string | null; fillRgb?: string | null; fillOpacityPercent?: number | null; outlineRgb?: string | null; outlineWidthEmu?: number | null; outlineOpacityPercent?: number | null; textDirection?: "horizontal" | "vertical" | "vertical-270" | null; textAutofit?: "none" | "resize-shape" | "shrink-text" | null; displayName?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0DeleteDrawingObjectRequest [Section titled “EditorV0DeleteDrawingObjectRequest”](#editorv0deletedrawingobjectrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0DeleteDrawingObjectRequest { objectLocation?: string | null; sourceLocation?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0SetDrawingObjectAnchorLockRequest [Section titled “EditorV0SetDrawingObjectAnchorLockRequest”](#editorv0setdrawingobjectanchorlockrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0SetDrawingObjectAnchorLockRequest { objectLocation?: string | null; sourceLocation?: string | null; locked: boolean; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0GroupDrawingObjectsRequest [Section titled “EditorV0GroupDrawingObjectsRequest”](#editorv0groupdrawingobjectsrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0GroupDrawingObjectsRequest { objectLocations: string[]; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0UngroupDrawingObjectRequest [Section titled “EditorV0UngroupDrawingObjectRequest”](#editorv0ungroupdrawingobjectrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0UngroupDrawingObjectRequest { objectLocation?: string | null; sourceLocation?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0EditDrawingObjectTextRequest [Section titled “EditorV0EditDrawingObjectTextRequest”](#editorv0editdrawingobjecttextrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0EditDrawingObjectTextRequest { objectLocation?: string | null; sourceLocation?: string | null; text?: string | null; textSourcePath?: string | null; textFromFile?: boolean; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0InsertObjectTextFileSourceResult [Section titled “EditorV0InsertObjectTextFileSourceResult”](#editorv0insertobjecttextfilesourceresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertObjectTextFileSourceResult { canceled: boolean; path: string | null; text: string; length: number; } ``` ### EditorV0InsertImageObjectResult [Section titled “EditorV0InsertImageObjectResult”](#editorv0insertimageobjectresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertImageObjectResult { schema: "fastdoc.shell.editor-v0-insert-image-object-action.v1"; operationKind: "insert-image-object"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; imagePath: string | null; paragraphIndex: number; mediaPartName: string | null; relationshipId: string | null; contentKind: string | null; sourceUnchanged: boolean | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0InsertEquationObjectResult [Section titled “EditorV0InsertEquationObjectResult”](#editorv0insertequationobjectresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertEquationObjectResult { schema: "fastdoc.shell.editor-v0-insert-equation-object-action.v1"; operationKind: "insert-equation-object"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; paragraphIndex: number | null; equationIndex: number | null; beforeText: string | null; afterText: string | null; sourceUnchanged: boolean | null; resultKind?: string | null; authoringOperationKind?: string | null; changedPartName?: string | null; canonicalLinearInput?: string | null; equationInventory?: unknown[]; preservedUnknownSubtreeHashes?: string[]; packageVerifiedAfterReopen?: boolean | null; historyDepth?: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0EquationSymbolAuthoringResult [Section titled “EditorV0EquationSymbolAuthoringResult”](#editorv0equationsymbolauthoringresult) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0EquationSymbolAuthoringResult = EditorV0InsertEquationObjectResult; ``` ### EditorV0EditEquationObjectResult [Section titled “EditorV0EditEquationObjectResult”](#editorv0editequationobjectresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0EditEquationObjectResult { schema: "fastdoc.shell.editor-v0-edit-equation-object-action.v1"; operationKind: "edit-equation-object"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; paragraphIndex: number | null; equationIndex: number | null; beforeText: string | null; afterText: string | null; sourceUnchanged: boolean | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0InsertTextBoxObjectResult [Section titled “EditorV0InsertTextBoxObjectResult”](#editorv0inserttextboxobjectresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertTextBoxObjectResult { schema: "fastdoc.shell.editor-v0-insert-textbox-object-action.v1"; operationKind: "insert-textbox-object"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; paragraphIndex: number; text: string; displayName: string; widthEmu: number | null; heightEmu: number | null; sourceUnchanged: boolean | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0InsertShapeObjectResult [Section titled “EditorV0InsertShapeObjectResult”](#editorv0insertshapeobjectresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertShapeObjectResult { schema: "fastdoc.shell.editor-v0-insert-shape-object-action.v1"; operationKind: "insert-shape-object"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; paragraphIndex: number; shape: string; displayName: string; text: string | null; widthEmu: number | null; heightEmu: number | null; sourceUnchanged: boolean | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0EditDrawingObjectTextResult [Section titled “EditorV0EditDrawingObjectTextResult”](#editorv0editdrawingobjecttextresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0EditDrawingObjectTextResult { schema: "fastdoc.shell.editor-v0-edit-drawing-object-text-action.v1"; operationKind: "edit-drawing-object-text"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; objectLocation: string | null; sourceLocation: string | null; textSourcePath: string | null; textFromFile: boolean; beforeText: string | null; afterText: string | null; objectKind: string | null; displayName: string | null; sourceUnchanged: boolean | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0ResizeDrawingObjectResult [Section titled “EditorV0ResizeDrawingObjectResult”](#editorv0resizedrawingobjectresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ResizeDrawingObjectResult { schema: "fastdoc.shell.editor-v0-resize-drawing-object-action.v1"; operationKind: "resize-drawing-object"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; objectLocation: string | null; sourceLocation: string | null; widthEmu: number | null; heightEmu: number | null; beforeWpExtentEmu: Record | null; beforeShapeExtentEmu: Record | null; afterWpExtentEmu: Record | null; afterShapeExtentEmu: Record | null; sourceUnchanged: boolean | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0MoveDrawingObjectResult [Section titled “EditorV0MoveDrawingObjectResult”](#editorv0movedrawingobjectresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0MoveDrawingObjectResult { schema: "fastdoc.shell.editor-v0-move-drawing-object-action.v1"; operationKind: "move-drawing-object"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; objectLocation: string | null; sourceLocation: string | null; xOffsetEmu: number | null; yOffsetEmu: number | null; xRelativeFrom: string | null; yRelativeFrom: string | null; beforePosition: Record | null; afterPosition: Record | null; compositionApplied?: boolean; compositionMutations?: string[]; duplicated?: boolean; targetPart?: string | null; targetStory?: string | null; uniqueDrawingIds?: boolean | null; sourceUnchanged: boolean | null; snapshot: unknown; } ``` ### EditorV0DistributeDrawingObjectsResult [Section titled “EditorV0DistributeDrawingObjectsResult”](#editorv0distributedrawingobjectsresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0DistributeDrawingObjectsResult { schema: "fastdoc.shell.editor-v0-distribute-drawing-objects-action.v1"; operationKind: "distribute-drawing-objects-horizontal" | "distribute-drawing-objects-vertical"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; axis: "horizontal" | "vertical"; requestedLocations: string[]; resolvedLocations: string[]; objectCount: number | null; beforePrimaryOffsetsEmu: number[]; afterPrimaryOffsetsEmu: number[]; computedGapEmu: number | null; sourceUnchanged: boolean | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0SetDrawingObjectStyleResult [Section titled “EditorV0SetDrawingObjectStyleResult”](#editorv0setdrawingobjectstyleresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0SetDrawingObjectStyleResult { schema: "fastdoc.shell.editor-v0-set-drawing-object-style-action.v1"; operationKind: "set-drawing-object-style"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; objectLocation: string | null; sourceLocation: string | null; fillRgb: string | null; fillOpacityPercent: number | null; outlineRgb: string | null; outlineWidthEmu: number | null; outlineOpacityPercent: number | null; textDirection: "horizontal" | "vertical" | "vertical-270" | null; textAutofit: "none" | "resize-shape" | "shrink-text" | null; beforeFillRgb: string | null; beforeFillOpacityPercent: number | null; beforeOutlineRgb: string | null; beforeOutlineWidthEmu: number | null; beforeOutlineOpacityPercent: number | null; beforeTextDirection: string | null; beforeTextAutofit: string | null; afterFillRgb: string | null; afterFillOpacityPercent: number | null; afterOutlineRgb: string | null; afterOutlineWidthEmu: number | null; afterOutlineOpacityPercent: number | null; afterTextDirection: string | null; afterTextAutofit: string | null; objectKind: string | null; displayName: string | null; displayNameBefore: string | null; displayNameAfter: string | null; displayNameChanged: boolean | null; sourceUnchanged: boolean | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0DeleteDrawingObjectResult [Section titled “EditorV0DeleteDrawingObjectResult”](#editorv0deletedrawingobjectresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0DeleteDrawingObjectResult { schema: "fastdoc.shell.editor-v0-delete-drawing-object-action.v1"; operationKind: "delete-drawing-object"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; objectLocation: string | null; sourceLocation: string | null; objectKind: string | null; displayName: string | null; shapePreset: string | null; deleted: boolean; sourceUnchanged: boolean | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0SetDrawingObjectAnchorLockResult [Section titled “EditorV0SetDrawingObjectAnchorLockResult”](#editorv0setdrawingobjectanchorlockresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0SetDrawingObjectAnchorLockResult { schema: "fastdoc.shell.editor-v0-set-drawing-object-anchor-lock-action.v1"; operationKind: "set-drawing-object-anchor-lock"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; objectLocation: string | null; sourceLocation: string | null; objectKind: string | null; displayName: string | null; shapePreset: string | null; requestedLocked: boolean; beforeAnchorPresent: boolean | null; beforeLocked: string | null; afterAnchorPresent: boolean | null; afterLocked: string | null; anchorLocked: boolean; sourceUnchanged: boolean | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0GroupDrawingObjectsResult [Section titled “EditorV0GroupDrawingObjectsResult”](#editorv0groupdrawingobjectsresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0GroupDrawingObjectsResult { schema: "fastdoc.shell.editor-v0-group-drawing-objects-action.v1"; operationKind: "group-drawing-objects"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; requestedLocations: string[]; resolvedLocations: string[]; groupedObjectCount: number | null; ungroupedObjectCount: number | null; sourceUnchanged: boolean | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0UngroupDrawingObjectResult [Section titled “EditorV0UngroupDrawingObjectResult”](#editorv0ungroupdrawingobjectresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0UngroupDrawingObjectResult { schema: "fastdoc.shell.editor-v0-ungroup-drawing-object-action.v1"; operationKind: "ungroup-drawing-object"; applied: boolean; documentPath: string | null; outputPath: string | null; reopenAfterWrite: boolean; reopenedDocumentPath: string | null; objectLocation: string | null; sourceLocation: string | null; requestedLocations: string[]; resolvedLocations: string[]; groupedObjectCount: number | null; ungroupedObjectCount: number | null; sourceUnchanged: boolean | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` # DTO · Page setup and document structure > 19 interfaces and 11 type aliases from the `api-edit.ts` module — sections, page size and orientation, headers and footers, line numbering, hyphenation, and outline mode. 19 interfaces and 11 type aliases — sections, page size and orientation, headers and footers, line numbering, hyphenation, and outline mode. Internal contract These types describe the exchange inside the desktop SumDoc window. For embedding in your product, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). Some types include internal tags such as `backlog_id: "D38"` or `sharedSceneOwner: "D5"` — these are the task numbers the feature was filed under inside the team. They appear in the response, but embedding doesn’t need them: there’s no reason to parse or store them. Contract module: `api-edit.ts`. Other topics in this module: [Text and paragraphs](/reference/sumdoc/dto-edit-text/) · [Tables: structure](/reference/sumdoc/dto-edit-table-structure/) · [Tables: cells and formatting](/reference/sumdoc/dto-edit-table-cells/) · [Tables: placement on the page](/reference/sumdoc/dto-edit-table-layout/) · **Page setup and document structure** · [Objects and drawings](/reference/sumdoc/dto-edit-objects/) · [Fields, footnotes, and references](/reference/sumdoc/dto-edit-fields/). **Types on this page — 30** * [`OutlineMasterDocumentOperation`](#outlinemasterdocumentoperation) * [`OutlineMasterDocumentRequest`](#outlinemasterdocumentrequest) * [`OutlineMasterDocumentOutlineItem`](#outlinemasterdocumentoutlineitem) * [`OutlineMasterDocumentSubdocument`](#outlinemasterdocumentsubdocument) * [`OutlineMasterDocumentSnapshot`](#outlinemasterdocumentsnapshot) * [`OutlineMasterDocumentResult`](#outlinemasterdocumentresult) * [`EditorV0ContentControlsRequest`](#editorv0contentcontrolsrequest) * [`EditorV0ContentControlsResult`](#editorv0contentcontrolsresult) * [`D36CombinedSectionStart`](#d36combinedsectionstart) * [`D36CombinedPaperSize`](#d36combinedpapersize) * [`D36CombinedOrientation`](#d36combinedorientation) * [`D36CombinedMarginPreset`](#d36combinedmarginpreset) * [`D36CombinedSectionCommandRequest`](#d36combinedsectioncommandrequest) * [`D36CombinedSectionCommandResult`](#d36combinedsectioncommandresult) * [`D36SectionPresetVisibleWorkflowCommand`](#d36sectionpresetvisibleworkflowcommand) * [`D36SectionPresetVisibleWorkflowRequest`](#d36sectionpresetvisibleworkflowrequest) * [`D36SectionPresetVisibleWorkflowResult`](#d36sectionpresetvisibleworkflowresult) * [`D36LineNumbersCommand`](#d36linenumberscommand) * [`D36LineNumbersContinuousRequest`](#d36linenumberscontinuousrequest) * [`D36LineNumbersContinuousResult`](#d36linenumberscontinuousresult) * [`D36HyphenationCommand`](#d36hyphenationcommand) * [`D36HyphenationRequest`](#d36hyphenationrequest) * [`D36HyphenationResult`](#d36hyphenationresult) * [`D36HeaderFooterEditModeStoryKind`](#d36headerfootereditmodestorykind) * [`D36HeaderFooterEditModeStoryVariant`](#d36headerfootereditmodestoryvariant) * [`D36HeaderFooterEditModeSaveRequest`](#d36headerfootereditmodesaverequest) * [`D36HeaderFooterEditModeSaveResult`](#d36headerfootereditmodesaveresult) * [`D36HeaderFooterRemoveOperationKind`](#d36headerfooterremoveoperationkind) * [`D36HeaderFooterRemoveRequest`](#d36headerfooterremoverequest) * [`D36HeaderFooterRemoveResult`](#d36headerfooterremoveresult) ### OutlineMasterDocumentOperation [Section titled “OutlineMasterDocumentOperation”](#outlinemasterdocumentoperation) `TypeAliasDeclaration` · `api-edit.ts` ```ts type OutlineMasterDocumentOperation = | "inspect" | "set-level" | "promote" | "demote" | "move-up" | "move-down" | "collapse" | "expand" | "create-subdocument" | "insert-subdocument" | "expand-subdocument" | "collapse-subdocument" | "split-subdocument" | "merge-subdocuments" | "unlink-subdocument" | "update-link"; ``` ### OutlineMasterDocumentRequest [Section titled “OutlineMasterDocumentRequest”](#outlinemasterdocumentrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface OutlineMasterDocumentRequest { operation: OutlineMasterDocumentOperation; paragraphIndex?: number | null; level?: number | null; subdocumentIndex?: number | null; sourcePath?: string | null; splitParagraphIndex?: number | null; searchQuery?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### OutlineMasterDocumentOutlineItem [Section titled “OutlineMasterDocumentOutlineItem”](#outlinemasterdocumentoutlineitem) `InterfaceDeclaration` · `api-edit.ts` ```ts interface OutlineMasterDocumentOutlineItem { paragraph_index: number; body_child_index: number; text: string; style_id: string | null; level: number | null; is_body_text: boolean; has_children: boolean; collapsed: boolean; } ``` ### OutlineMasterDocumentSubdocument [Section titled “OutlineMasterDocumentSubdocument”](#outlinemasterdocumentsubdocument) `InterfaceDeclaration` · `api-edit.ts` ```ts interface OutlineMasterDocumentSubdocument { subdocument_index: number; relationship_id: string; source_path: string; source_identity: string; source_status: string; linked: boolean; expanded: boolean; paragraph_start: number; paragraph_end: number | null; paragraph_count: number | null; merge_group: string | null; editable: boolean; conflicts: Array<{ kind: string; identifier: string; message: string; }>; outline_items: OutlineMasterDocumentOutlineItem[]; } ``` ### OutlineMasterDocumentSnapshot [Section titled “OutlineMasterDocumentSnapshot”](#outlinemasterdocumentsnapshot) `InterfaceDeclaration` · `api-edit.ts` ```ts interface OutlineMasterDocumentSnapshot { schema: "fastdoc.outline-master-document.snapshot.v1"; operation_kind: string; result_kind: string; outline_items: OutlineMasterDocumentOutlineItem[]; subdocuments: OutlineMasterDocumentSubdocument[]; search_results: Array<{ document_kind: string; subdocument_index: number | null; paragraph_index: number; text: string; source_identity: string | null; }>; heading_levels_supported: number[]; source_documents_unchanged: boolean; fail_closed: boolean; styles_preserved: boolean; numbering_preserved: boolean; bookmarks_preserved: boolean; sections_preserved: boolean; headers_footers_preserved: boolean; comments_preserved: boolean; tracked_changes_preserved: boolean; word_parity_claim: false; } ``` ### OutlineMasterDocumentResult [Section titled “OutlineMasterDocumentResult”](#outlinemasterdocumentresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface OutlineMasterDocumentResult { schema: "fastdoc.shell.outline-master-document-action.v1"; operationKind: OutlineMasterDocumentOperation; applied: boolean; documentPath: string | null; outputPath: string | null; documentPathAfterReopen: string | null; currentDocumentReopened: boolean; resultKind: string; writebackResultKind: string | null; transactionCommitted: boolean; sourceDocumentsUnchanged: boolean; snapshot: OutlineMasterDocumentSnapshot; } ``` ### EditorV0ContentControlsRequest [Section titled “EditorV0ContentControlsRequest”](#editorv0contentcontrolsrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ContentControlsRequest { request: Record; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0ContentControlsResult [Section titled “EditorV0ContentControlsResult”](#editorv0contentcontrolsresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ContentControlsResult { schema: "fastdoc.shell.editor-v0-content-controls-action.v1"; operationKind: "content-controls-command"; action: string; applied: boolean; documentPath: string | null; outputPath: string | null; documentPathAfterReopen: string | null; currentDocumentReopened: boolean; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; controlCountAfter: number; boundControlCountAfter: number; protectionEditAfter: string | null; controls: Array>; snapshot: Record; } ``` ### D36CombinedSectionStart [Section titled “D36CombinedSectionStart”](#d36combinedsectionstart) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36CombinedSectionStart = "next-page" | "continuous" | "even-page" | "odd-page"; ``` ### D36CombinedPaperSize [Section titled “D36CombinedPaperSize”](#d36combinedpapersize) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36CombinedPaperSize = "A4" | "Letter"; ``` ### D36CombinedOrientation [Section titled “D36CombinedOrientation”](#d36combinedorientation) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36CombinedOrientation = "portrait" | "landscape"; ``` ### D36CombinedMarginPreset [Section titled “D36CombinedMarginPreset”](#d36combinedmarginpreset) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36CombinedMarginPreset = "normal" | "narrow" | "moderate" | "wide"; ``` ### D36CombinedSectionCommandRequest [Section titled “D36CombinedSectionCommandRequest”](#d36combinedsectioncommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D36CombinedSectionCommandRequest { paragraphIndex: number; sectionStart?: D36CombinedSectionStart; paperSize?: D36CombinedPaperSize; orientation?: D36CombinedOrientation; marginPreset?: D36CombinedMarginPreset; pageNumberStart?: number; defaultHeaderText?: string; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### D36CombinedSectionCommandResult [Section titled “D36CombinedSectionCommandResult”](#d36combinedsectioncommandresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D36CombinedSectionCommandResult { applied: boolean; outputPath: string; label: string; paragraphIndex: number; workflowResult: Record; finalPageSetupState: Record | null; finalHeaderFooterState: Record | null; beforeTexts: string[]; afterTexts: string[]; popupWarningShown: false; } ``` ### D36SectionPresetVisibleWorkflowCommand [Section titled “D36SectionPresetVisibleWorkflowCommand”](#d36sectionpresetvisibleworkflowcommand) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36SectionPresetVisibleWorkflowCommand = "section-preset-a4" | "section-preset-landscape" | "section-preset-first-page" | "section-preset-narrow-margins"; ``` ### D36SectionPresetVisibleWorkflowRequest [Section titled “D36SectionPresetVisibleWorkflowRequest”](#d36sectionpresetvisibleworkflowrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D36SectionPresetVisibleWorkflowRequest { command: D36SectionPresetVisibleWorkflowCommand; paragraphIndex: number; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### D36SectionPresetVisibleWorkflowResult [Section titled “D36SectionPresetVisibleWorkflowResult”](#d36sectionpresetvisibleworkflowresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D36SectionPresetVisibleWorkflowResult { schema: "fastdoc.shell.d36-section-presets-visible-workflow.v1"; applied: boolean; noOp: boolean; outputPath: string; command: D36SectionPresetVisibleWorkflowCommand; label: string; paragraphIndex: number; beforeState: Record | null; afterState: Record | null; beforePagination: Record | null; afterPagination: Record | null; steps: Record[]; beforeTexts: string[]; afterTexts: string[]; popupWarningShown: false; } ``` ### D36LineNumbersCommand [Section titled “D36LineNumbersCommand”](#d36linenumberscommand) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36LineNumbersCommand = "none" | "continuous" | "restart-page" | "restart-section" | "suppress-current-paragraph"; ``` ### D36LineNumbersContinuousRequest [Section titled “D36LineNumbersContinuousRequest”](#d36linenumberscontinuousrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D36LineNumbersContinuousRequest { command?: D36LineNumbersCommand; paragraphIndex: number; paragraphIndexes?: number[]; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### D36LineNumbersContinuousResult [Section titled “D36LineNumbersContinuousResult”](#d36linenumberscontinuousresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D36LineNumbersContinuousResult { schema: "fastdoc.shell.d36-line-numbers-continuous-writeback.v1"; applied: boolean; noOp: boolean; outputPath: string; command: D36LineNumbersCommand; label: string; paragraphIndex: number; paragraphIndexes: number[]; current: boolean; actualSavedMode: D36LineNumbersCommand; savedDocxTruthSource: "rust-paginate-docx-after-reopen" | "rust-model-docx-after-reopen"; beforePagination: Record | null; afterPagination: Record | null; afterModel: Record | null; writebackResult: Record | null; beforeTexts: string[]; afterTexts: string[]; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### D36HyphenationCommand [Section titled “D36HyphenationCommand”](#d36hyphenationcommand) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36HyphenationCommand = "none" | "auto"; ``` ### D36HyphenationRequest [Section titled “D36HyphenationRequest”](#d36hyphenationrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D36HyphenationRequest { command?: D36HyphenationCommand; paragraphIndex: number; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### D36HyphenationResult [Section titled “D36HyphenationResult”](#d36hyphenationresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D36HyphenationResult { schema: "fastdoc.shell.d36-hyphenation-writeback.v1"; applied: boolean; noOp: boolean; outputPath: string; command: D36HyphenationCommand; label: string; paragraphIndex: number; current: boolean; actualSavedMode: D36HyphenationCommand; savedDocxTruthSource: "rust-hyphenation-state-docx-after-reopen"; afterHyphenationState: Record | null; writebackResult: Record | null; beforeTexts: string[]; afterTexts: string[]; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### D36HeaderFooterEditModeStoryKind [Section titled “D36HeaderFooterEditModeStoryKind”](#d36headerfootereditmodestorykind) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36HeaderFooterEditModeStoryKind = "header" | "footer"; ``` ### D36HeaderFooterEditModeStoryVariant [Section titled “D36HeaderFooterEditModeStoryVariant”](#d36headerfootereditmodestoryvariant) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36HeaderFooterEditModeStoryVariant = "default" | "first" | "even"; ``` ### D36HeaderFooterEditModeSaveRequest [Section titled “D36HeaderFooterEditModeSaveRequest”](#d36headerfootereditmodesaverequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D36HeaderFooterEditModeSaveRequest { storyKind: D36HeaderFooterEditModeStoryKind; storyVariant?: D36HeaderFooterEditModeStoryVariant; text: string; paragraphIndex: number; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### D36HeaderFooterEditModeSaveResult [Section titled “D36HeaderFooterEditModeSaveResult”](#d36headerfootereditmodesaveresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D36HeaderFooterEditModeSaveResult { schema: "fastdoc.shell.d36-header-footer-edit-mode-save.v1"; applied: boolean; noOp: boolean; outputPath: string; storyKind: D36HeaderFooterEditModeStoryKind; operationKind: "set-default-header-text" | "edit-default-header-text" | "set-default-footer-text" | "edit-default-footer-text" | "set-first-header-text" | "edit-first-header-text" | "set-first-footer-text" | "edit-first-footer-text" | "set-even-header-text" | "edit-even-header-text" | "set-even-footer-text" | "edit-even-footer-text"; label: string; paragraphIndex: number; beforeHeaderFooterState: Record | null; afterHeaderFooterState: Record | null; beforePagination: Record | null; afterPagination: Record | null; writebackResult: Record | null; beforeTexts: string[]; afterTexts: string[]; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### D36HeaderFooterRemoveOperationKind [Section titled “D36HeaderFooterRemoveOperationKind”](#d36headerfooterremoveoperationkind) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36HeaderFooterRemoveOperationKind = "remove-default-header" | "remove-default-footer"; ``` ### D36HeaderFooterRemoveRequest [Section titled “D36HeaderFooterRemoveRequest”](#d36headerfooterremoverequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D36HeaderFooterRemoveRequest { storyKind: D36HeaderFooterEditModeStoryKind; paragraphIndex: number; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### D36HeaderFooterRemoveResult [Section titled “D36HeaderFooterRemoveResult”](#d36headerfooterremoveresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D36HeaderFooterRemoveResult { schema: "fastdoc.shell.d36-header-footer-remove.v1"; applied: boolean; noOp: boolean; outputPath: string; storyKind: D36HeaderFooterEditModeStoryKind; operationKind: D36HeaderFooterRemoveOperationKind; label: string; paragraphIndex: number; beforeHeaderFooterState: Record | null; afterHeaderFooterState: Record | null; beforePagination: Record | null; afterPagination: Record | null; writebackResult: Record | null; beforeTexts: string[]; afterTexts: string[]; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` # DTO · Tables: cells and formatting > 55 interfaces and 20 type aliases from the `api-edit.ts` module — cell content, borders, shading, merging, and alignment. 55 interfaces and 20 type aliases — cell content, borders, shading, merging, and alignment. Internal contract These types describe the exchange inside the desktop SumDoc window. For embedding in your product, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). Some types include internal tags such as `backlog_id: "D38"` or `sharedSceneOwner: "D5"` — these are the task numbers the feature was filed under inside the team. They appear in the response, but embedding doesn’t need them: there’s no reason to parse or store them. Contract module: `api-edit.ts`. Other topics in this module: [Text and paragraphs](/reference/sumdoc/dto-edit-text/) · [Tables: structure](/reference/sumdoc/dto-edit-table-structure/) · **Tables: cells and formatting** · [Tables: placement on the page](/reference/sumdoc/dto-edit-table-layout/) · [Page setup and document structure](/reference/sumdoc/dto-edit-page/) · [Objects and drawings](/reference/sumdoc/dto-edit-objects/) · [Fields, footnotes, and references](/reference/sumdoc/dto-edit-fields/). Types on this page — 75 * [`ShellTableCellBorder`](#shelltablecellborder) * [`D37TablePencilEraserSemanticOperation`](#d37tablepencilerasersemanticoperation) * [`D37TablePencilEraserSemanticRequest`](#d37tablepencilerasersemanticrequest) * [`D37TablePencilEraserSemanticResult`](#d37tablepencilerasersemanticresult) * [`D37TableSelectionPencilEraserAction`](#d37tableselectionpencileraseraction) * [`D37TableSelectionPencilEraserRange`](#d37tableselectionpencileraserrange) * [`D37TableSelectionPencilEraserRequest`](#d37tableselectionpencileraserrequest) * [`D37TableSelectionPencilEraserResult`](#d37tableselectionpencileraserresult) * [`D37TableSelectionPencilEraserCommandState`](#d37tableselectionpencilerasercommandstate) * [`D37TableEqualizeMode`](#d37tableequalizemode) * [`D37TableEqualizeRequest`](#d37tableequalizerequest) * [`D37TableEqualizeResult`](#d37tableequalizeresult) * [`D37TableSelectionEqualizeColumnsAction`](#d37tableselectionequalizecolumnsaction) * [`D37TableSelectionEqualizeColumnsRange`](#d37tableselectionequalizecolumnsrange) * [`D37TableSelectionEqualizeColumnsRequest`](#d37tableselectionequalizecolumnsrequest) * [`D37TableSelectionEqualizeColumnsResult`](#d37tableselectionequalizecolumnsresult) * [`D37TableSelectionEqualizeColumnsCommandState`](#d37tableselectionequalizecolumnscommandstate) * [`D37TableStyleRequest`](#d37tablestylerequest) * [`D37TableStyleResult`](#d37tablestyleresult) * [`D37TableStyleOptions`](#d37tablestyleoptions) * [`D37TableCellRangeFormatRequest`](#d37tablecellrangeformatrequest) * [`D37TableCellRangeFormatResult`](#d37tablecellrangeformatresult) * [`D37TableSelectionCellRangeFormatPreset`](#d37tableselectioncellrangeformatpreset) * [`D37TableSelectionCellRangeFormatRange`](#d37tableselectioncellrangeformatrange) * [`D37TableSelectionCellRangeFormatRequest`](#d37tableselectioncellrangeformatrequest) * [`D37TableSelectionCellRangeFormatResult`](#d37tableselectioncellrangeformatresult) * [`D37TableSelectionCellRangeFormatCommandState`](#d37tableselectioncellrangeformatcommandstate) * [`D37TableSelectionAllBordersAction`](#d37tableselectionallbordersaction) * [`D37TableSelectionAllBordersRequest`](#d37tableselectionallbordersrequest) * [`D37TableSelectionAllBordersResult`](#d37tableselectionallbordersresult) * [`D37TableSelectionAllBordersCommandState`](#d37tableselectionallborderscommandstate) * [`D37TableSelectionOutsideBordersAction`](#d37tableselectionoutsidebordersaction) * [`D37TableSelectionOutsideBordersRequest`](#d37tableselectionoutsidebordersrequest) * [`D37TableSelectionOutsideBordersResult`](#d37tableselectionoutsidebordersresult) * [`D37TableSelectionOutsideBordersCommandState`](#d37tableselectionoutsideborderscommandstate) * [`D37TableSelectionInsideBordersAction`](#d37tableselectioninsidebordersaction) * [`D37TableSelectionInsideBordersRequest`](#d37tableselectioninsidebordersrequest) * [`D37TableSelectionInsideBordersResult`](#d37tableselectioninsidebordersresult) * [`D37TableSelectionInsideBordersCommandState`](#d37tableselectioninsideborderscommandstate) * [`D37TableAlignmentMode`](#d37tablealignmentmode) * [`D37TableAlignmentRequest`](#d37tablealignmentrequest) * [`D37TableAlignmentResult`](#d37tablealignmentresult) * [`D37TableSelectionAlignmentAction`](#d37tableselectionalignmentaction) * [`D37TableSelectionAlignmentRange`](#d37tableselectionalignmentrange) * [`D37TableSelectionAlignmentRequest`](#d37tableselectionalignmentrequest) * [`D37TableSelectionAlignmentResult`](#d37tableselectionalignmentresult) * [`D37TableSelectionAlignmentCommandState`](#d37tableselectionalignmentcommandstate) * [`D37TableWidthMode`](#d37tablewidthmode) * [`D37TableWidthRequest`](#d37tablewidthrequest) * [`D37TableWidthResult`](#d37tablewidthresult) * [`D37TableSelectionWidthFitAction`](#d37tableselectionwidthfitaction) * [`D37TableSelectionWidthFitRange`](#d37tableselectionwidthfitrange) * [`D37TableSelectionWidthFitRequest`](#d37tableselectionwidthfitrequest) * [`D37TableSelectionWidthFitResult`](#d37tableselectionwidthfitresult) * [`D37TableSelectionWidthFitCommandState`](#d37tableselectionwidthfitcommandstate) * [`D37TableCellContentVerticalAlignment`](#d37tablecellcontentverticalalignment) * [`D37TableCellContentHorizontalAlignment`](#d37tablecellcontenthorizontalalignment) * [`D37TableCellContentAlignmentRequest`](#d37tablecellcontentalignmentrequest) * [`D37TableCellVerticalAlignment`](#d37tablecellverticalalignment) * [`D37TableCellVerticalAlignmentMode`](#d37tablecellverticalalignmentmode) * [`D37TableCellVerticalAlignmentRequest`](#d37tablecellverticalalignmentrequest) * [`D37TableCellContentAlignmentResult`](#d37tablecellcontentalignmentresult) * [`D37TableCellVerticalAlignmentResult`](#d37tablecellverticalalignmentresult) * [`D37TableCellContentAlignmentCommandState`](#d37tablecellcontentalignmentcommandstate) * [`D37TableCellVerticalAlignmentCommandState`](#d37tablecellverticalalignmentcommandstate) * [`D37TableCellExactSizeRequest`](#d37tablecellexactsizerequest) * [`D37TableCellExactSizeResult`](#d37tablecellexactsizeresult) * [`D37TableCellExactSizeCommandState`](#d37tablecellexactsizecommandstate) * [`D37TableCellTextDirection`](#d37tablecelltextdirection) * [`D37TableCellTextDirectionMode`](#d37tablecelltextdirectionmode) * [`D37TableCellTextDirectionRequest`](#d37tablecelltextdirectionrequest) * [`D37TableCellTextDirectionResult`](#d37tablecelltextdirectionresult) * [`D37TableCellTextDirectionCommandState`](#d37tablecelltextdirectioncommandstate) * [`EditorV0TableCellParagraphTextTarget`](#editorv0tablecellparagraphtexttarget) * [`EditorV0TableCellTextRangeEndpoint`](#editorv0tablecelltextrangeendpoint) ### ShellTableCellBorder [Section titled “ShellTableCellBorder”](#shelltablecellborder) `InterfaceDeclaration` · `api-edit.ts` ```ts interface ShellTableCellBorder { edge: string; style: string; size_eighths?: number | null; width_milli_px?: number | null; color_rgb?: string | null; } ``` ### D37TablePencilEraserSemanticOperation [Section titled “D37TablePencilEraserSemanticOperation”](#d37tablepencilerasersemanticoperation) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TablePencilEraserSemanticOperation = "eraser-merge-horizontal" | "merge-rectangular" | "merge-vertical" | "pencil-split-cell" | "pencil-split-cell-vertical" | "pencil-split-cell-rectangular" | "draw-table-partial-span-cell-split" | "split-cell-grid"; ``` ### D37TablePencilEraserSemanticRequest [Section titled “D37TablePencilEraserSemanticRequest”](#d37tablepencilerasersemanticrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TablePencilEraserSemanticRequest { bodyBlockIndex: number; rowIndex: number; columnIndex: number; spanCount: number; rowCount?: number | null; columnCount?: number | null; operation: D37TablePencilEraserSemanticOperation; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TablePencilEraserSemanticResult [Section titled “D37TablePencilEraserSemanticResult”](#d37tablepencilerasersemanticresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TablePencilEraserSemanticResult { schema: "fastdoc.shell.d37-table-pencil-eraser-semantic.v1"; operationKind: "eraser-merge-table-cells-horizontal" | "merge-table-cells-rectangular" | "merge-table-cells-vertical" | "pencil-split-table-cell" | "pencil-split-table-cell-vertical" | "pencil-split-table-cell-rectangular" | "split-table-cell-grid"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; rowIndex: number; columnIndex: number; spanCount: number | null; requestedSpanCount: number; tableInputProvenance: string | null; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; snapshot: unknown; } ``` ### D37TableSelectionPencilEraserAction [Section titled “D37TableSelectionPencilEraserAction”](#d37tableselectionpencileraseraction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionPencilEraserAction = "merge-selected-horizontal" | "merge-selected-rectangular" | "merge-selected-vertical" | "split-selected-horizontal" | "split-selected-vertical" | "split-selected-rectangular" | "split-draw-table-ordinary-cell" | "split-selected-cell"; ``` ### D37TableSelectionPencilEraserRange [Section titled “D37TableSelectionPencilEraserRange”](#d37tableselectionpencileraserrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionPencilEraserRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionPencilEraserRequest [Section titled “D37TableSelectionPencilEraserRequest”](#d37tableselectionpencileraserrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionPencilEraserRequest { selection: D37TableSelectionPencilEraserRange; action: D37TableSelectionPencilEraserAction; splitRows?: number | null; splitColumns?: number | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionPencilEraserResult [Section titled “D37TableSelectionPencilEraserResult”](#d37tableselectionpencileraserresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionPencilEraserResult { schema: "fastdoc.shell.d37-table-selection-pencil-eraser.v1"; action: D37TableSelectionPencilEraserAction; selection: D37TableSelectionPencilEraserRange; computedOperation: D37TablePencilEraserSemanticOperation; computedSpanCount: number; pencilEraserResult: D37TablePencilEraserSemanticResult; } ``` ### D37TableSelectionPencilEraserCommandState [Section titled “D37TableSelectionPencilEraserCommandState”](#d37tableselectionpencilerasercommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionPencilEraserCommandState { schema: "fastdoc.shell.d37-table-selection-pencil-eraser-command-state.v1"; action: D37TableSelectionPencilEraserAction; selection: D37TableSelectionPencilEraserRange; computedOperation: D37TablePencilEraserSemanticOperation; computedSpanCount: number | null; operationKind: D37TablePencilEraserSemanticResult["operationKind"]; canApply: boolean; disabledReason: string | null; documentPath: string | null; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableEqualizeMode [Section titled “D37TableEqualizeMode”](#d37tableequalizemode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableEqualizeMode = "row-heights" | "column-widths" | "column-widths-from-existing"; ``` ### D37TableEqualizeRequest [Section titled “D37TableEqualizeRequest”](#d37tableequalizerequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableEqualizeRequest { bodyBlockIndex: number; equalizeMode: D37TableEqualizeMode; heightTwips?: number | null; heightRule?: "exact" | "atLeast" | "auto" | "fit-content" | null; widthTwips?: number | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableEqualizeResult [Section titled “D37TableEqualizeResult”](#d37tableequalizeresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableEqualizeResult { schema: "fastdoc.shell.d37-table-equalize-dimensions.v1"; operationKind: "equalize-table-row-heights" | "equalize-table-column-widths" | "equalize-table-column-widths-from-existing"; applied: boolean; unchanged: boolean; historyEntryCreated: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; equalizeMode: D37TableEqualizeMode; resultKind: string | null; writebackResultKind: string | null; tableDimensionTwips: number | null; rowCount: number | null; columnCount: number | null; snapshot: unknown; } ``` ### D37TableSelectionEqualizeColumnsAction [Section titled “D37TableSelectionEqualizeColumnsAction”](#d37tableselectionequalizecolumnsaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionEqualizeColumnsAction = "equalize-selected-table-columns"; ``` ### D37TableSelectionEqualizeColumnsRange [Section titled “D37TableSelectionEqualizeColumnsRange”](#d37tableselectionequalizecolumnsrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionEqualizeColumnsRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionEqualizeColumnsRequest [Section titled “D37TableSelectionEqualizeColumnsRequest”](#d37tableselectionequalizecolumnsrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionEqualizeColumnsRequest { selection: D37TableSelectionEqualizeColumnsRange; action: D37TableSelectionEqualizeColumnsAction; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionEqualizeColumnsResult [Section titled “D37TableSelectionEqualizeColumnsResult”](#d37tableselectionequalizecolumnsresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionEqualizeColumnsResult { schema: "fastdoc.shell.d37-table-selection-equalize-columns.v1"; action: D37TableSelectionEqualizeColumnsAction; selection: D37TableSelectionEqualizeColumnsRange; computedEqualizeMode: "column-widths-from-existing"; equalizeResult: D37TableEqualizeResult; } ``` ### D37TableSelectionEqualizeColumnsCommandState [Section titled “D37TableSelectionEqualizeColumnsCommandState”](#d37tableselectionequalizecolumnscommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionEqualizeColumnsCommandState { schema: "fastdoc.shell.d37-table-selection-equalize-columns-command-state.v1"; operationKind: "equalize-table-column-widths-from-existing"; action: D37TableSelectionEqualizeColumnsAction; canApply: boolean; disabledReason: string | null; documentPath: string | null; selection: D37TableSelectionEqualizeColumnsRange; computedEqualizeMode: "column-widths-from-existing"; resultKind: string | null; writebackResultKind: string | null; tableDimensionTwips: number | null; rowCount: number | null; columnCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableStyleRequest [Section titled “D37TableStyleRequest”](#d37tablestylerequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableStyleRequest { bodyBlockIndex: number; styleKind?: "banded-blue" | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableStyleResult [Section titled “D37TableStyleResult”](#d37tablestyleresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableStyleResult { schema: "fastdoc.shell.d37-table-style.v1"; operationKind: "apply-table-style-banded-blue"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; styleKind: "banded-blue"; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; snapshot: unknown; } ``` ### D37TableStyleOptions [Section titled “D37TableStyleOptions”](#d37tablestyleoptions) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableStyleOptions { headerRow: boolean; totalRow: boolean; bandedRows: boolean; firstColumn: boolean; lastColumn: boolean; bandedColumns: boolean; } ``` ### D37TableCellRangeFormatRequest [Section titled “D37TableCellRangeFormatRequest”](#d37tablecellrangeformatrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellRangeFormatRequest { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; fillColorRgb?: string | null; borderColorRgb?: string | null; borderStyle?: "single" | "dotted" | "dashed" | "dashSmallGap" | "thick" | null; borderSizeEighths?: number | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableCellRangeFormatResult [Section titled “D37TableCellRangeFormatResult”](#d37tablecellrangeformatresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellRangeFormatResult { schema: "fastdoc.shell.d37-table-cell-range-format.v1"; operationKind: "format-table-cell-range"; applied: boolean; documentPath: string | null; outputPath: string | null; range: { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; }; fillColorRgb: string | null; borderColorRgb: string | null; borderStyle: string | null; borderSizeEighths: number | null; fillResultKind: string | null; fillWritebackResultKind: string | null; borderResultKind: string | null; borderWritebackResultKind: string | null; rowCount: number | null; columnCount: number | null; fillSnapshot: unknown; borderSnapshot: unknown; } ``` ### D37TableSelectionCellRangeFormatPreset [Section titled “D37TableSelectionCellRangeFormatPreset”](#d37tableselectioncellrangeformatpreset) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionCellRangeFormatPreset = "market-emphasis" | "review-attention"; ``` ### D37TableSelectionCellRangeFormatRange [Section titled “D37TableSelectionCellRangeFormatRange”](#d37tableselectioncellrangeformatrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionCellRangeFormatRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionCellRangeFormatRequest [Section titled “D37TableSelectionCellRangeFormatRequest”](#d37tableselectioncellrangeformatrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionCellRangeFormatRequest { selection: D37TableSelectionCellRangeFormatRange; preset: D37TableSelectionCellRangeFormatPreset; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionCellRangeFormatResult [Section titled “D37TableSelectionCellRangeFormatResult”](#d37tableselectioncellrangeformatresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionCellRangeFormatResult { schema: "fastdoc.shell.d37-table-selection-cell-range-format.v1"; preset: D37TableSelectionCellRangeFormatPreset; selection: D37TableSelectionCellRangeFormatRange; computedFillColorRgb: string; computedBorderColorRgb: string; computedBorderStyle: "single" | "thick"; computedBorderSizeEighths: number; cellRangeFormatResult: D37TableCellRangeFormatResult; } ``` ### D37TableSelectionCellRangeFormatCommandState [Section titled “D37TableSelectionCellRangeFormatCommandState”](#d37tableselectioncellrangeformatcommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionCellRangeFormatCommandState { schema: "fastdoc.shell.d37-table-selection-cell-range-format-command-state.v1"; operationKind: "format-table-cell-range"; preset: D37TableSelectionCellRangeFormatPreset; canApply: boolean; disabledReason: string | null; documentPath: string | null; selection: D37TableSelectionCellRangeFormatRange; computedFillColorRgb: string; computedBorderColorRgb: string; computedBorderStyle: "single" | "thick"; computedBorderSizeEighths: number; fillResultKind: string | null; fillWritebackResultKind: string | null; borderResultKind: string | null; borderWritebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; supportMarkerKinds: string[]; fillSnapshot: unknown; borderSnapshot: unknown; } ``` ### D37TableSelectionAllBordersAction [Section titled “D37TableSelectionAllBordersAction”](#d37tableselectionallbordersaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionAllBordersAction = "set-selected-all-borders" | "clear-selected-all-borders"; ``` ### D37TableSelectionAllBordersRequest [Section titled “D37TableSelectionAllBordersRequest”](#d37tableselectionallbordersrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionAllBordersRequest { selection: D37TableSelectionCellRangeFormatRange; action: D37TableSelectionAllBordersAction; borderColorRgb?: string | null; borderStyle?: "nil" | "single" | "dotted" | "dashed" | "dashSmallGap" | "thick" | null; borderSizeEighths?: number | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionAllBordersResult [Section titled “D37TableSelectionAllBordersResult”](#d37tableselectionallbordersresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionAllBordersResult { schema: "fastdoc.shell.d37-table-selection-all-borders.v1"; action: D37TableSelectionAllBordersAction; operationKind: "set-table-cell-all-borders-range" | "clear-table-cell-all-borders-range"; applied: boolean; documentPath: string | null; outputPath: string | null; selection: D37TableSelectionCellRangeFormatRange; computedBorderColorRgb: string | null; computedBorderStyle: string | null; computedBorderSizeEighths: number | null; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; snapshot: unknown; } ``` ### D37TableSelectionAllBordersCommandState [Section titled “D37TableSelectionAllBordersCommandState”](#d37tableselectionallborderscommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionAllBordersCommandState { schema: "fastdoc.shell.d37-table-selection-all-borders-command-state.v1"; action: D37TableSelectionAllBordersAction; operationKind: "set-table-cell-all-borders-range" | "clear-table-cell-all-borders-range"; canApply: boolean; disabledReason: string | null; documentPath: string | null; selection: D37TableSelectionCellRangeFormatRange; computedBorderColorRgb: string | null; computedBorderStyle: string | null; computedBorderSizeEighths: number | null; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableSelectionOutsideBordersAction [Section titled “D37TableSelectionOutsideBordersAction”](#d37tableselectionoutsidebordersaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionOutsideBordersAction = "set-selected-outside-borders" | "clear-selected-outside-borders"; ``` ### D37TableSelectionOutsideBordersRequest [Section titled “D37TableSelectionOutsideBordersRequest”](#d37tableselectionoutsidebordersrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionOutsideBordersRequest { selection: D37TableSelectionCellRangeFormatRange; action: D37TableSelectionOutsideBordersAction; borderColorRgb?: string | null; borderStyle?: "single" | "dotted" | "dashed" | "dashSmallGap" | "thick" | null; borderSizeEighths?: number | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionOutsideBordersResult [Section titled “D37TableSelectionOutsideBordersResult”](#d37tableselectionoutsidebordersresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionOutsideBordersResult { schema: "fastdoc.shell.d37-table-selection-outside-borders.v1"; action: D37TableSelectionOutsideBordersAction; operationKind: "set-table-cell-outside-borders-range" | "clear-table-cell-outside-borders-range"; applied: boolean; documentPath: string | null; outputPath: string | null; selection: D37TableSelectionCellRangeFormatRange; computedBorderColorRgb: string | null; computedBorderStyle: string | null; computedBorderSizeEighths: number | null; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; snapshot: unknown; } ``` ### D37TableSelectionOutsideBordersCommandState [Section titled “D37TableSelectionOutsideBordersCommandState”](#d37tableselectionoutsideborderscommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionOutsideBordersCommandState { schema: "fastdoc.shell.d37-table-selection-outside-borders-command-state.v1"; action: D37TableSelectionOutsideBordersAction; operationKind: "set-table-cell-outside-borders-range" | "clear-table-cell-outside-borders-range"; canApply: boolean; disabledReason: string | null; documentPath: string | null; selection: D37TableSelectionCellRangeFormatRange; computedBorderColorRgb: string | null; computedBorderStyle: string | null; computedBorderSizeEighths: number | null; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableSelectionInsideBordersAction [Section titled “D37TableSelectionInsideBordersAction”](#d37tableselectioninsidebordersaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionInsideBordersAction = "set-selected-inside-borders" | "clear-selected-inside-borders"; ``` ### D37TableSelectionInsideBordersRequest [Section titled “D37TableSelectionInsideBordersRequest”](#d37tableselectioninsidebordersrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionInsideBordersRequest { selection: D37TableSelectionCellRangeFormatRange; action: D37TableSelectionInsideBordersAction; borderColorRgb?: string | null; borderStyle?: "single" | "dotted" | "dashed" | "dashSmallGap" | "thick" | null; borderSizeEighths?: number | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionInsideBordersResult [Section titled “D37TableSelectionInsideBordersResult”](#d37tableselectioninsidebordersresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionInsideBordersResult { schema: "fastdoc.shell.d37-table-selection-inside-borders.v1"; action: D37TableSelectionInsideBordersAction; operationKind: "set-table-cell-inside-borders-range" | "clear-table-cell-inside-borders-range"; applied: boolean; documentPath: string | null; outputPath: string | null; selection: D37TableSelectionCellRangeFormatRange; computedBorderColorRgb: string | null; computedBorderStyle: string | null; computedBorderSizeEighths: number | null; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; snapshot: unknown; } ``` ### D37TableSelectionInsideBordersCommandState [Section titled “D37TableSelectionInsideBordersCommandState”](#d37tableselectioninsideborderscommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionInsideBordersCommandState { schema: "fastdoc.shell.d37-table-selection-inside-borders-command-state.v1"; action: D37TableSelectionInsideBordersAction; operationKind: "set-table-cell-inside-borders-range" | "clear-table-cell-inside-borders-range"; canApply: boolean; disabledReason: string | null; documentPath: string | null; selection: D37TableSelectionCellRangeFormatRange; computedBorderColorRgb: string | null; computedBorderStyle: string | null; computedBorderSizeEighths: number | null; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableAlignmentMode [Section titled “D37TableAlignmentMode”](#d37tablealignmentmode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableAlignmentMode = "left" | "center" | "right"; ``` ### D37TableAlignmentRequest [Section titled “D37TableAlignmentRequest”](#d37tablealignmentrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableAlignmentRequest { bodyBlockIndex: number; alignment: D37TableAlignmentMode; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableAlignmentResult [Section titled “D37TableAlignmentResult”](#d37tablealignmentresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableAlignmentResult { schema: "fastdoc.shell.d37-table-alignment.v1"; operationKind: "set-table-alignment"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; alignment: D37TableAlignmentMode; resultKind: string | null; writebackResultKind: string | null; tableAlignment: string | null; rowCount: number | null; columnCount: number | null; snapshot: unknown; } ``` ### D37TableSelectionAlignmentAction [Section titled “D37TableSelectionAlignmentAction”](#d37tableselectionalignmentaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionAlignmentAction = "align-selected-table-left" | "align-selected-table-center" | "align-selected-table-right"; ``` ### D37TableSelectionAlignmentRange [Section titled “D37TableSelectionAlignmentRange”](#d37tableselectionalignmentrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionAlignmentRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionAlignmentRequest [Section titled “D37TableSelectionAlignmentRequest”](#d37tableselectionalignmentrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionAlignmentRequest { selection: D37TableSelectionAlignmentRange; action: D37TableSelectionAlignmentAction; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionAlignmentResult [Section titled “D37TableSelectionAlignmentResult”](#d37tableselectionalignmentresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionAlignmentResult { schema: "fastdoc.shell.d37-table-selection-alignment.v1"; action: D37TableSelectionAlignmentAction; selection: D37TableSelectionAlignmentRange; computedAlignment: D37TableAlignmentMode; alignmentResult: D37TableAlignmentResult; } ``` ### D37TableSelectionAlignmentCommandState [Section titled “D37TableSelectionAlignmentCommandState”](#d37tableselectionalignmentcommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionAlignmentCommandState { schema: "fastdoc.shell.d37-table-selection-alignment-command-state.v1"; operationKind: "set-table-alignment"; action: D37TableSelectionAlignmentAction; canApply: boolean; disabledReason: string | null; documentPath: string | null; selection: D37TableSelectionAlignmentRange; computedAlignment: D37TableAlignmentMode; resultKind: string | null; writebackResultKind: string | null; tableAlignment: string | null; rowCount: number | null; columnCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableWidthMode [Section titled “D37TableWidthMode”](#d37tablewidthmode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableWidthMode = "centimeters" | "percent" | "fit-contents" | "fit-window" | "fixed-column-width"; ``` ### D37TableWidthRequest [Section titled “D37TableWidthRequest”](#d37tablewidthrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableWidthRequest { bodyBlockIndex: number; widthMode: D37TableWidthMode; widthCentimetersHundredths?: number | null; widthPercent?: number | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableWidthResult [Section titled “D37TableWidthResult”](#d37tablewidthresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableWidthResult { schema: "fastdoc.shell.d37-table-width.v1"; operationKind: "set-table-width-centimeters" | "set-table-width-percent" | "fit-table-width-to-contents" | "fit-table-width-to-window" | "fixed-table-column-width"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; widthMode: D37TableWidthMode; resultKind: string | null; writebackResultKind: string | null; tableWidthUnit: string | null; tableWidthValue: number | null; tableWidthTwips: number | null; computedTableWidthToContentsTwips: number | null; tableWidthPercentX50: number | null; tableDimensionTwips: number | null; rowCount: number | null; columnCount: number | null; snapshot: unknown; } ``` ### D37TableSelectionWidthFitAction [Section titled “D37TableSelectionWidthFitAction”](#d37tableselectionwidthfitaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionWidthFitAction = "fit-selected-table-to-contents"; ``` ### D37TableSelectionWidthFitRange [Section titled “D37TableSelectionWidthFitRange”](#d37tableselectionwidthfitrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionWidthFitRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionWidthFitRequest [Section titled “D37TableSelectionWidthFitRequest”](#d37tableselectionwidthfitrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionWidthFitRequest { selection: D37TableSelectionWidthFitRange; action: D37TableSelectionWidthFitAction; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionWidthFitResult [Section titled “D37TableSelectionWidthFitResult”](#d37tableselectionwidthfitresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionWidthFitResult { schema: "fastdoc.shell.d37-table-selection-width-fit.v1"; action: D37TableSelectionWidthFitAction; selection: D37TableSelectionWidthFitRange; computedWidthMode: "fit-contents"; tableWidthResult: D37TableWidthResult; } ``` ### D37TableSelectionWidthFitCommandState [Section titled “D37TableSelectionWidthFitCommandState”](#d37tableselectionwidthfitcommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionWidthFitCommandState { schema: "fastdoc.shell.d37-table-selection-width-fit-command-state.v1"; operationKind: "fit-table-width-to-contents"; action: D37TableSelectionWidthFitAction; canApply: boolean; disabledReason: string | null; documentPath: string | null; selection: D37TableSelectionWidthFitRange; computedWidthMode: "fit-contents"; resultKind: string | null; writebackResultKind: string | null; tableWidthUnit: string | null; tableWidthValue: number | null; tableWidthTwips: number | null; computedTableWidthToContentsTwips: number | null; tableWidthPercentX50: number | null; tableDimensionTwips: number | null; rowCount: number | null; columnCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableCellContentVerticalAlignment [Section titled “D37TableCellContentVerticalAlignment”](#d37tablecellcontentverticalalignment) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableCellContentVerticalAlignment = "top" | "center" | "middle" | "bottom"; ``` ### D37TableCellContentHorizontalAlignment [Section titled “D37TableCellContentHorizontalAlignment”](#d37tablecellcontenthorizontalalignment) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableCellContentHorizontalAlignment = "left" | "center" | "right"; ``` ### D37TableCellContentAlignmentRequest [Section titled “D37TableCellContentAlignmentRequest”](#d37tablecellcontentalignmentrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellContentAlignmentRequest { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; verticalAlignment: D37TableCellContentVerticalAlignment; horizontalAlignment: D37TableCellContentHorizontalAlignment; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableCellVerticalAlignment [Section titled “D37TableCellVerticalAlignment”](#d37tablecellverticalalignment) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableCellVerticalAlignment = "top" | "center" | "middle" | "bottom"; ``` ### D37TableCellVerticalAlignmentMode [Section titled “D37TableCellVerticalAlignmentMode”](#d37tablecellverticalalignmentmode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableCellVerticalAlignmentMode = "cell" | "range"; ``` ### D37TableCellVerticalAlignmentRequest [Section titled “D37TableCellVerticalAlignmentRequest”](#d37tablecellverticalalignmentrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellVerticalAlignmentRequest { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount?: number | null; columnCount?: number | null; alignment: D37TableCellVerticalAlignment; applyMode?: D37TableCellVerticalAlignmentMode | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableCellContentAlignmentResult [Section titled “D37TableCellContentAlignmentResult”](#d37tablecellcontentalignmentresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellContentAlignmentResult { schema: "fastdoc.shell.d37-table-cell-content-alignment.v1"; operationKind: "set-table-cell-alignment-range"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number | null; columnCount: number | null; requestedVerticalAlignment: D37TableCellContentVerticalAlignment; requestedHorizontalAlignment: D37TableCellContentHorizontalAlignment; verticalAlignment: string | null; horizontalAlignment: string | null; resultKind: string | null; writebackResultKind: string | null; spanCount: number | null; snapshot: unknown; } ``` ### D37TableCellVerticalAlignmentResult [Section titled “D37TableCellVerticalAlignmentResult”](#d37tablecellverticalalignmentresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellVerticalAlignmentResult { schema: "fastdoc.shell.d37-table-cell-vertical-alignment.v1"; operationKind: "set-table-cell-vertical-alignment" | "set-table-cell-vertical-alignment-range"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number | null; columnCount: number | null; applyMode: D37TableCellVerticalAlignmentMode; requestedAlignment: D37TableCellVerticalAlignment; cellVerticalAlignment: string | null; resultKind: string | null; writebackResultKind: string | null; spanCount: number | null; snapshot: unknown; } ``` ### D37TableCellContentAlignmentCommandState [Section titled “D37TableCellContentAlignmentCommandState”](#d37tablecellcontentalignmentcommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellContentAlignmentCommandState { schema: "fastdoc.shell.d37-table-cell-content-alignment-command-state.v1"; operationKind: "set-table-cell-alignment-range"; canApply: boolean; disabledReason: string | null; documentPath: string | null; bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number | null; columnCount: number | null; requestedVerticalAlignment: D37TableCellContentVerticalAlignment; requestedHorizontalAlignment: D37TableCellContentHorizontalAlignment; verticalAlignment: string | null; horizontalAlignment: string | null; resultKind: string | null; writebackResultKind: string | null; spanCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableCellVerticalAlignmentCommandState [Section titled “D37TableCellVerticalAlignmentCommandState”](#d37tablecellverticalalignmentcommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellVerticalAlignmentCommandState { schema: "fastdoc.shell.d37-table-cell-vertical-alignment-command-state.v1"; operationKind: D37TableCellVerticalAlignmentResult["operationKind"]; canApply: boolean; disabledReason: string | null; documentPath: string | null; bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number | null; columnCount: number | null; applyMode: D37TableCellVerticalAlignmentMode; requestedAlignment: D37TableCellVerticalAlignment; cellVerticalAlignment: string | null; resultKind: string | null; writebackResultKind: string | null; spanCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableCellExactSizeRequest [Section titled “D37TableCellExactSizeRequest”](#d37tablecellexactsizerequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellExactSizeRequest { bodyBlockIndex: number; rowIndex: number; columnIndex: number; widthTwips: number; heightTwips: number; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableCellExactSizeResult [Section titled “D37TableCellExactSizeResult”](#d37tablecellexactsizeresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellExactSizeResult { schema: "fastdoc.shell.d37-table-cell-exact-size.v1"; operationKind: "set-table-cell-exact-size"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; rowIndex: number; columnIndex: number; widthTwips: number | null; heightTwips: number | null; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; snapshot: unknown; } ``` ### D37TableCellExactSizeCommandState [Section titled “D37TableCellExactSizeCommandState”](#d37tablecellexactsizecommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellExactSizeCommandState { schema: "fastdoc.shell.d37-table-cell-exact-size-command-state.v1"; operationKind: "set-table-cell-exact-size"; canApply: boolean; disabledReason: string | null; documentPath: string | null; bodyBlockIndex: number; rowIndex: number; columnIndex: number; widthTwips: number | null; heightTwips: number | null; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableCellTextDirection [Section titled “D37TableCellTextDirection”](#d37tablecelltextdirection) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableCellTextDirection = "horizontal" | "normal" | "rotate_down" | "down" | "vertical" | "rotate_up" | "up" | "0deg" | "90deg" | "270deg" | "-90deg"; ``` ### D37TableCellTextDirectionMode [Section titled “D37TableCellTextDirectionMode”](#d37tablecelltextdirectionmode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableCellTextDirectionMode = "single" | "range"; ``` ### D37TableCellTextDirectionRequest [Section titled “D37TableCellTextDirectionRequest”](#d37tablecelltextdirectionrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellTextDirectionRequest { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount?: number | null; columnCount?: number | null; direction: D37TableCellTextDirection; applyMode?: D37TableCellTextDirectionMode | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableCellTextDirectionResult [Section titled “D37TableCellTextDirectionResult”](#d37tablecelltextdirectionresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellTextDirectionResult { schema: "fastdoc.shell.d37-table-cell-text-direction.v1"; operationKind: "set-table-cell-text-direction" | "set-table-cell-text-direction-range"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; rowIndex: number; columnIndex: number; requestedDirection: D37TableCellTextDirection; textDirection: string | null; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; snapshot: unknown; } ``` ### D37TableCellTextDirectionCommandState [Section titled “D37TableCellTextDirectionCommandState”](#d37tablecelltextdirectioncommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellTextDirectionCommandState { schema: "fastdoc.shell.d37-table-cell-text-direction-command-state.v1"; operationKind: D37TableCellTextDirectionResult["operationKind"]; canApply: boolean; disabledReason: string | null; documentPath: string | null; bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number | null; columnCount: number | null; applyMode: D37TableCellTextDirectionMode; requestedDirection: D37TableCellTextDirection; textDirection: string | null; resultKind: string | null; writebackResultKind: string | null; spanCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### EditorV0TableCellParagraphTextTarget [Section titled “EditorV0TableCellParagraphTextTarget”](#editorv0tablecellparagraphtexttarget) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0TableCellParagraphTextTarget = { kind: "table-cell"; bodyBlockIndex: number; rowIndex: number; cellIndex: number; paragraphIndex: number; } | { kind: "nested-table-cell"; bodyBlockIndex: number; outerRowIndex: number; outerCellIndex: number; nestedTableBlockIndex: number; rowIndex: number; cellIndex: number; paragraphIndex: number; }; ``` ### EditorV0TableCellTextRangeEndpoint [Section titled “EditorV0TableCellTextRangeEndpoint”](#editorv0tablecelltextrangeendpoint) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0TableCellTextRangeEndpoint = EditorV0TableCellParagraphTextTarget & { offset: number; }; ``` # DTO · Tables: placement on the page > 27 interfaces and 6 type aliases from the `api-edit.ts` module — text wrapping, floating tables, autofit, and indents. 27 interfaces and 6 type aliases — text wrapping, floating tables, autofit, and indents. Internal contract These types describe the exchange inside the desktop SumDoc window. For embedding in your product, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). Some types include internal tags such as `backlog_id: "D38"` or `sharedSceneOwner: "D5"` — these are the task numbers the feature was filed under inside the team. They appear in the response, but embedding doesn’t need them: there’s no reason to parse or store them. Contract module: `api-edit.ts`. Other topics in this module: [Text and paragraphs](/reference/sumdoc/dto-edit-text/) · [Tables: structure](/reference/sumdoc/dto-edit-table-structure/) · [Tables: cells and formatting](/reference/sumdoc/dto-edit-table-cells/) · **Tables: placement on the page** · [Page setup and document structure](/reference/sumdoc/dto-edit-page/) · [Objects and drawings](/reference/sumdoc/dto-edit-objects/) · [Fields, footnotes, and references](/reference/sumdoc/dto-edit-fields/). Types on this page — 33 * [`D37TableColumnAutofitRequest`](#d37tablecolumnautofitrequest) * [`D37TableColumnAutofitResult`](#d37tablecolumnautofitresult) * [`D37TableSelectionColumnAutofitStrategy`](#d37tableselectioncolumnautofitstrategy) * [`D37TableSelectionColumnAutofitRange`](#d37tableselectioncolumnautofitrange) * [`D37TableSelectionColumnAutofitRequest`](#d37tableselectioncolumnautofitrequest) * [`D37TableSelectionColumnAutofitResult`](#d37tableselectioncolumnautofitresult) * [`D37TableSelectionColumnAutofitCommandState`](#d37tableselectioncolumnautofitcommandstate) * [`D37TableCellSpacingRequest`](#d37tablecellspacingrequest) * [`D37TableCellSpacingResult`](#d37tablecellspacingresult) * [`D37TableCellSpacingCommandState`](#d37tablecellspacingcommandstate) * [`D37TableWrappingStyleMode`](#d37tablewrappingstylemode) * [`D37TableWrappingStyleRequest`](#d37tablewrappingstylerequest) * [`D37TableWrappingStyleResult`](#d37tablewrappingstyleresult) * [`D37TableWrappingStyleCommandState`](#d37tablewrappingstylecommandstate) * [`D37TableFloatingPositionRequest`](#d37tablefloatingpositionrequest) * [`D37TableFloatingPositionResult`](#d37tablefloatingpositionresult) * [`D37TableFloatingPositionCommandState`](#d37tablefloatingpositioncommandstate) * [`D37TableAutofitToWindowAction`](#d37tableautofittowindowaction) * [`D37TableAutofitToWindowRequest`](#d37tableautofittowindowrequest) * [`D37TableAutofitToWindowResult`](#d37tableautofittowindowresult) * [`D37TableAutofitToWindowCommandState`](#d37tableautofittowindowcommandstate) * [`D37TableFixedColumnWidthAction`](#d37tablefixedcolumnwidthaction) * [`D37TableFixedColumnWidthRequest`](#d37tablefixedcolumnwidthrequest) * [`D37TableFixedColumnWidthResult`](#d37tablefixedcolumnwidthresult) * [`D37TableFixedColumnWidthCommandState`](#d37tablefixedcolumnwidthcommandstate) * [`D37TableCellMarginsMode`](#d37tablecellmarginsmode) * [`D37TableCellMarginsRequest`](#d37tablecellmarginsrequest) * [`D37TableCellMarginsResult`](#d37tablecellmarginsresult) * [`D37TableCellMarginsCommandState`](#d37tablecellmarginscommandstate) * [`D37TableCellTextWrappingMode`](#d37tablecelltextwrappingmode) * [`D37TableCellTextWrappingRequest`](#d37tablecelltextwrappingrequest) * [`D37TableCellTextWrappingResult`](#d37tablecelltextwrappingresult) * [`D37TableCellTextWrappingCommandState`](#d37tablecelltextwrappingcommandstate) ### D37TableColumnAutofitRequest [Section titled “D37TableColumnAutofitRequest”](#d37tablecolumnautofitrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableColumnAutofitRequest { bodyBlockIndex: number; columnIndex: number; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableColumnAutofitResult [Section titled “D37TableColumnAutofitResult”](#d37tablecolumnautofitresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableColumnAutofitResult { schema: "fastdoc.shell.d37-table-column-autofit.v1"; operationKind: "autofit-table-column-to-content"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; columnIndex: number; resultKind: string | null; writebackResultKind: string | null; tableDimensionTwips: number | null; rowCount: number | null; columnCount: number | null; snapshot: unknown; } ``` ### D37TableSelectionColumnAutofitStrategy [Section titled “D37TableSelectionColumnAutofitStrategy”](#d37tableselectioncolumnautofitstrategy) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionColumnAutofitStrategy = "widest-content-column"; ``` ### D37TableSelectionColumnAutofitRange [Section titled “D37TableSelectionColumnAutofitRange”](#d37tableselectioncolumnautofitrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionColumnAutofitRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionColumnAutofitRequest [Section titled “D37TableSelectionColumnAutofitRequest”](#d37tableselectioncolumnautofitrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionColumnAutofitRequest { selection: D37TableSelectionColumnAutofitRange; strategy: D37TableSelectionColumnAutofitStrategy; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionColumnAutofitResult [Section titled “D37TableSelectionColumnAutofitResult”](#d37tableselectioncolumnautofitresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionColumnAutofitResult { schema: "fastdoc.shell.d37-table-selection-column-autofit.v1"; strategy: D37TableSelectionColumnAutofitStrategy; selection: D37TableSelectionColumnAutofitRange; computedColumnIndex: number; computedColumnTextLength: number; columnTextLengths: number[]; columnAutofitResult: D37TableColumnAutofitResult; } ``` ### D37TableSelectionColumnAutofitCommandState [Section titled “D37TableSelectionColumnAutofitCommandState”](#d37tableselectioncolumnautofitcommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionColumnAutofitCommandState { schema: "fastdoc.shell.d37-table-selection-column-autofit-command-state.v1"; operationKind: "autofit-table-column-to-content"; strategy: D37TableSelectionColumnAutofitStrategy; canApply: boolean; disabledReason: string | null; documentPath: string | null; selection: D37TableSelectionColumnAutofitRange; computedColumnIndex: number | null; computedColumnTextLength: number | null; columnTextLengths: number[]; resultKind: string | null; writebackResultKind: string | null; tableDimensionTwips: number | null; rowCount: number | null; columnCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableCellSpacingRequest [Section titled “D37TableCellSpacingRequest”](#d37tablecellspacingrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellSpacingRequest { bodyBlockIndex: number; spacingTwips: number; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableCellSpacingResult [Section titled “D37TableCellSpacingResult”](#d37tablecellspacingresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellSpacingResult { schema: "fastdoc.shell.d37-table-cell-spacing.v1"; operationKind: "set-table-cell-spacing"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; resultKind: string | null; writebackResultKind: string | null; spacingTwips: number | null; rowCount: number | null; columnCount: number | null; snapshot: unknown; } ``` ### D37TableCellSpacingCommandState [Section titled “D37TableCellSpacingCommandState”](#d37tablecellspacingcommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellSpacingCommandState { schema: "fastdoc.shell.d37-table-cell-spacing-command-state.v1"; operationKind: "set-table-cell-spacing"; canApply: boolean; disabledReason: string | null; documentPath: string | null; bodyBlockIndex: number; resultKind: string | null; writebackResultKind: string | null; spacingTwips: number | null; rowCount: number | null; columnCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableWrappingStyleMode [Section titled “D37TableWrappingStyleMode”](#d37tablewrappingstylemode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableWrappingStyleMode = "inline" | "floating"; ``` ### D37TableWrappingStyleRequest [Section titled “D37TableWrappingStyleRequest”](#d37tablewrappingstylerequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableWrappingStyleRequest { bodyBlockIndex: number; wrappingStyle: D37TableWrappingStyleMode; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableWrappingStyleResult [Section titled “D37TableWrappingStyleResult”](#d37tablewrappingstyleresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableWrappingStyleResult { schema: "fastdoc.shell.d37-table-wrapping-style.v1"; operationKind: "set-table-wrapping-inline" | "set-table-wrapping-floating"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; wrappingStyle: D37TableWrappingStyleMode; resultKind: string | null; writebackResultKind: string | null; tableWrappingStyle: string | null; rowCount: number | null; columnCount: number | null; snapshot: unknown; } ``` ### D37TableWrappingStyleCommandState [Section titled “D37TableWrappingStyleCommandState”](#d37tablewrappingstylecommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableWrappingStyleCommandState { schema: "fastdoc.shell.d37-table-wrapping-style-command-state.v1"; operationKind: "set-table-wrapping-inline" | "set-table-wrapping-floating"; canApply: boolean; disabledReason: string | null; documentPath: string | null; bodyBlockIndex: number; wrappingStyle: D37TableWrappingStyleMode; resultKind: string | null; writebackResultKind: string | null; tableWrappingStyle: string | null; rowCount: number | null; columnCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableFloatingPositionRequest [Section titled “D37TableFloatingPositionRequest”](#d37tablefloatingpositionrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableFloatingPositionRequest { bodyBlockIndex: number; leftFromTextTwips: number; rightFromTextTwips: number; topFromTextTwips: number; bottomFromTextTwips: number; positionXTwips: number; positionYTwips: number; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableFloatingPositionResult [Section titled “D37TableFloatingPositionResult”](#d37tablefloatingpositionresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableFloatingPositionResult { schema: "fastdoc.shell.d37-table-floating-position.v1"; operationKind: "set-table-floating-position"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; leftFromTextTwips: number; rightFromTextTwips: number; topFromTextTwips: number; bottomFromTextTwips: number; positionXTwips: number; positionYTwips: number; resultKind: string | null; writebackResultKind: string | null; tableWrappingStyle: string | null; tableFloatingLeftFromTextTwips: number | null; tableFloatingRightFromTextTwips: number | null; tableFloatingTopFromTextTwips: number | null; tableFloatingBottomFromTextTwips: number | null; tableFloatingPositionXTwips: number | null; tableFloatingPositionYTwips: number | null; rowCount: number | null; columnCount: number | null; snapshot: unknown; } ``` ### D37TableFloatingPositionCommandState [Section titled “D37TableFloatingPositionCommandState”](#d37tablefloatingpositioncommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableFloatingPositionCommandState { schema: "fastdoc.shell.d37-table-floating-position-command-state.v1"; operationKind: "set-table-floating-position"; canApply: boolean; disabledReason: string | null; documentPath: string | null; bodyBlockIndex: number; leftFromTextTwips: number; rightFromTextTwips: number; topFromTextTwips: number; bottomFromTextTwips: number; positionXTwips: number; positionYTwips: number; resultKind: string | null; writebackResultKind: string | null; tableWrappingStyle: string | null; tableFloatingLeftFromTextTwips: number | null; tableFloatingRightFromTextTwips: number | null; tableFloatingTopFromTextTwips: number | null; tableFloatingBottomFromTextTwips: number | null; tableFloatingPositionXTwips: number | null; tableFloatingPositionYTwips: number | null; rowCount: number | null; columnCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableAutofitToWindowAction [Section titled “D37TableAutofitToWindowAction”](#d37tableautofittowindowaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableAutofitToWindowAction = "fit-selected-table-to-window"; ``` ### D37TableAutofitToWindowRequest [Section titled “D37TableAutofitToWindowRequest”](#d37tableautofittowindowrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableAutofitToWindowRequest { selection: D37TableSelectionWidthFitRange; action: D37TableAutofitToWindowAction; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableAutofitToWindowResult [Section titled “D37TableAutofitToWindowResult”](#d37tableautofittowindowresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableAutofitToWindowResult { schema: "fastdoc.shell.d37-table-autofit-to-window.v1"; action: D37TableAutofitToWindowAction; selection: D37TableSelectionWidthFitRange; computedWidthMode: "fit-window"; tableWidthResult: D37TableWidthResult; } ``` ### D37TableAutofitToWindowCommandState [Section titled “D37TableAutofitToWindowCommandState”](#d37tableautofittowindowcommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableAutofitToWindowCommandState { schema: "fastdoc.shell.d37-table-autofit-to-window-command-state.v1"; operationKind: "fit-table-width-to-window"; action: D37TableAutofitToWindowAction; canApply: boolean; disabledReason: string | null; documentPath: string | null; selection: D37TableSelectionWidthFitRange; computedWidthMode: "fit-window"; resultKind: string | null; writebackResultKind: string | null; tableWidthUnit: string | null; tableWidthValue: number | null; tableWidthTwips: number | null; computedTableWidthToContentsTwips: number | null; tableWidthPercentX50: number | null; tableDimensionTwips: number | null; rowCount: number | null; columnCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableFixedColumnWidthAction [Section titled “D37TableFixedColumnWidthAction”](#d37tablefixedcolumnwidthaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableFixedColumnWidthAction = "fixed-selected-table-column-width"; ``` ### D37TableFixedColumnWidthRequest [Section titled “D37TableFixedColumnWidthRequest”](#d37tablefixedcolumnwidthrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableFixedColumnWidthRequest { selection: D37TableSelectionWidthFitRange; action: D37TableFixedColumnWidthAction; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableFixedColumnWidthResult [Section titled “D37TableFixedColumnWidthResult”](#d37tablefixedcolumnwidthresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableFixedColumnWidthResult { schema: "fastdoc.shell.d37-table-fixed-column-width.v1"; action: D37TableFixedColumnWidthAction; selection: D37TableSelectionWidthFitRange; computedWidthMode: "fixed-column-width"; tableWidthResult: D37TableWidthResult; } ``` ### D37TableFixedColumnWidthCommandState [Section titled “D37TableFixedColumnWidthCommandState”](#d37tablefixedcolumnwidthcommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableFixedColumnWidthCommandState { schema: "fastdoc.shell.d37-table-fixed-column-width-command-state.v1"; operationKind: "fixed-table-column-width"; action: D37TableFixedColumnWidthAction; canApply: boolean; disabledReason: string | null; documentPath: string | null; selection: D37TableSelectionWidthFitRange; computedWidthMode: "fixed-column-width"; resultKind: string | null; writebackResultKind: string | null; tableWidthUnit: string | null; tableWidthValue: number | null; tableWidthTwips: number | null; computedTableWidthToContentsTwips: number | null; tableWidthPercentX50: number | null; tableDimensionTwips: number | null; rowCount: number | null; columnCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableCellMarginsMode [Section titled “D37TableCellMarginsMode”](#d37tablecellmarginsmode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableCellMarginsMode = "cell" | "range" | "default-from-cell"; ``` ### D37TableCellMarginsRequest [Section titled “D37TableCellMarginsRequest”](#d37tablecellmarginsrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellMarginsRequest { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount?: number | null; columnCount?: number | null; topTwips?: number | null; rightTwips?: number | null; bottomTwips?: number | null; leftTwips?: number | null; applyMode?: D37TableCellMarginsMode | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableCellMarginsResult [Section titled “D37TableCellMarginsResult”](#d37tablecellmarginsresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellMarginsResult { schema: "fastdoc.shell.d37-table-cell-margins.v1"; operationKind: "set-table-cell-margins" | "set-table-cell-margins-range" | "set-table-default-cell-margins-from-cell"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number | null; columnCount: number | null; resultKind: string | null; writebackResultKind: string | null; topTwips: number | null; rightTwips: number | null; bottomTwips: number | null; leftTwips: number | null; spanCount: number | null; snapshot: unknown; } ``` ### D37TableCellMarginsCommandState [Section titled “D37TableCellMarginsCommandState”](#d37tablecellmarginscommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellMarginsCommandState { schema: "fastdoc.shell.d37-table-cell-margins-command-state.v1"; operationKind: D37TableCellMarginsResult["operationKind"]; canApply: boolean; disabledReason: string | null; documentPath: string | null; bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number | null; columnCount: number | null; applyMode: D37TableCellMarginsMode; resultKind: string | null; writebackResultKind: string | null; topTwips: number | null; rightTwips: number | null; bottomTwips: number | null; leftTwips: number | null; spanCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableCellTextWrappingMode [Section titled “D37TableCellTextWrappingMode”](#d37tablecelltextwrappingmode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableCellTextWrappingMode = "cell" | "range"; ``` ### D37TableCellTextWrappingRequest [Section titled “D37TableCellTextWrappingRequest”](#d37tablecelltextwrappingrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellTextWrappingRequest { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount?: number | null; columnCount?: number | null; wrapText: boolean; applyMode?: D37TableCellTextWrappingMode | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableCellTextWrappingResult [Section titled “D37TableCellTextWrappingResult”](#d37tablecelltextwrappingresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellTextWrappingResult { schema: "fastdoc.shell.d37-table-cell-text-wrapping.v1"; operationKind: "set-table-cell-text-wrapping" | "set-table-cell-text-wrapping-range"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number | null; columnCount: number | null; resultKind: string | null; writebackResultKind: string | null; wrapText: boolean | null; spanCount: number | null; snapshot: unknown; } ``` ### D37TableCellTextWrappingCommandState [Section titled “D37TableCellTextWrappingCommandState”](#d37tablecelltextwrappingcommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellTextWrappingCommandState { schema: "fastdoc.shell.d37-table-cell-text-wrapping-command-state.v1"; operationKind: D37TableCellTextWrappingResult["operationKind"]; canApply: boolean; disabledReason: string | null; documentPath: string | null; bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number | null; columnCount: number | null; applyMode: D37TableCellTextWrappingMode; resultKind: string | null; writebackResultKind: string | null; wrapText: boolean | null; spanCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` # DTO · Tables: structure > 60 interfaces and 14 type aliases from the `api-edit.ts` module — creating tables, rows and columns, selection, and grid editing. 60 interfaces and 14 type aliases — creating tables, rows and columns, selection, and grid editing. Internal contract These types describe the exchange inside the desktop SumDoc window. For embedding in your product, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). Some types include internal tags such as `backlog_id: "D38"` or `sharedSceneOwner: "D5"` — these are the task numbers the feature was filed under inside the team. They appear in the response, but embedding doesn’t need them: there’s no reason to parse or store them. Contract module: `api-edit.ts`. Other topics in this module: [Text and paragraphs](/reference/sumdoc/dto-edit-text/) · **Tables: structure** · [Tables: cells and formatting](/reference/sumdoc/dto-edit-table-cells/) · [Tables: placement on the page](/reference/sumdoc/dto-edit-table-layout/) · [Page setup and document structure](/reference/sumdoc/dto-edit-page/) · [Objects and drawings](/reference/sumdoc/dto-edit-objects/) · [Fields, footnotes, and references](/reference/sumdoc/dto-edit-fields/). Types on this page — 74 * [`D37TableRangeRequest`](#d37tablerangerequest) * [`D37TableRangeResult`](#d37tablerangeresult) * [`D37TableCreateRequest`](#d37tablecreaterequest) * [`D37TableCreateResult`](#d37tablecreateresult) * [`D37TableGridCreateRequest`](#d37tablegridcreaterequest) * [`D37TableGridCreateResult`](#d37tablegridcreateresult) * [`EditorV0ConvertTextToTableRequest`](#editorv0converttexttotablerequest) * [`EditorV0ConvertTextToTableResult`](#editorv0converttexttotableresult) * [`D37AnyTableCreateResult`](#d37anytablecreateresult) * [`EditorV0InsertTableCaptionRequest`](#editorv0inserttablecaptionrequest) * [`EditorV0UpdateTableRequest`](#editorv0updatetablerequest) * [`EditorV0TableOfFiguresRequest`](#editorv0tableoffiguresrequest) * [`EditorV0InsertTableCaptionResult`](#editorv0inserttablecaptionresult) * [`EditorV0UpdateTableResult`](#editorv0updatetableresult) * [`EditorV0TableOfFiguresResult`](#editorv0tableoffiguresresult) * [`EditorV0UpdateTableOfFiguresResult`](#editorv0updatetableoffiguresresult) * [`D37TableMouseDrawSemanticRequest`](#d37tablemousedrawsemanticrequest) * [`D37TableMouseDrawSemanticResult`](#d37tablemousedrawsemanticresult) * [`D37TableSelectionResizeAxis`](#d37tableselectionresizeaxis) * [`D37TableSelectionResizeEdge`](#d37tableselectionresizeedge) * [`D37TableSelectionResizeRange`](#d37tableselectionresizerange) * [`D37TableSelectionResizeRequest`](#d37tableselectionresizerequest) * [`D37TableSelectionResizeCommandState`](#d37tableselectionresizecommandstate) * [`D37TableSelectionResizeResult`](#d37tableselectionresizeresult) * [`D37TableTemplateRequest`](#d37tabletemplaterequest) * [`D37TableTemplateResult`](#d37tabletemplateresult) * [`D37TableHeaderRowMode`](#d37tableheaderrowmode) * [`D37TableHeaderRowRequest`](#d37tableheaderrowrequest) * [`D37TableHeaderRowResult`](#d37tableheaderrowresult) * [`D37TableHeaderRepeatMode`](#d37tableheaderrepeatmode) * [`D37TableHeaderRepeatRequest`](#d37tableheaderrepeatrequest) * [`D37TableHeaderRepeatResult`](#d37tableheaderrepeatresult) * [`D37TableDataCommandKind`](#d37tabledatacommandkind) * [`D37TableTextSeparator`](#d37tabletextseparator) * [`D37TableSortValueType`](#d37tablesortvaluetype) * [`D37TableSortDirection`](#d37tablesortdirection) * [`D37TableSortHeaderMode`](#d37tablesortheadermode) * [`D37TableSortKey`](#d37tablesortkey) * [`D37TableDataCommandRequest`](#d37tabledatacommandrequest) * [`D37TableDataCommandResult`](#d37tabledatacommandresult) * [`D37TableSelectionHeaderRepeatAction`](#d37tableselectionheaderrepeataction) * [`D37TableSelectionHeaderRepeatRange`](#d37tableselectionheaderrepeatrange) * [`D37TableSelectionHeaderRepeatRequest`](#d37tableselectionheaderrepeatrequest) * [`D37TableSelectionHeaderRepeatResult`](#d37tableselectionheaderrepeatresult) * [`D37TableSelectionHeaderRepeatCommandState`](#d37tableselectionheaderrepeatcommandstate) * [`D37TableSelectionClearFillRequest`](#d37tableselectionclearfillrequest) * [`D37TableSelectionClearFillResult`](#d37tableselectionclearfillresult) * [`D37TableSelectionClearFillCommandState`](#d37tableselectionclearfillcommandstate) * [`D37TableSelectionClearContentsRequest`](#d37tableselectionclearcontentsrequest) * [`D37TableSelectionClearContentsResult`](#d37tableselectionclearcontentsresult) * [`D37TableSelectionClearContentsCommandState`](#d37tableselectionclearcontentscommandstate) * [`D37TableSelectionClearFormattingRequest`](#d37tableselectionclearformattingrequest) * [`D37TableSelectionClearFormattingResult`](#d37tableselectionclearformattingresult) * [`D37TableSelectionClearFormattingCommandState`](#d37tableselectionclearformattingcommandstate) * [`D37TableSelectionClearContentFormatRequest`](#d37tableselectionclearcontentformatrequest) * [`D37TableSelectionClearContentFormatResult`](#d37tableselectionclearcontentformatresult) * [`D37TableSelectionClearContentFormatCommandState`](#d37tableselectionclearcontentformatcommandstate) * [`D37TableStructureEditMode`](#d37tablestructureeditmode) * [`D37TableSelectionStructureEditAction`](#d37tableselectionstructureeditaction) * [`D37TableStructureEditRequest`](#d37tablestructureeditrequest) * [`D37TableStructureEditResult`](#d37tablestructureeditresult) * [`D37TableSelectionRange`](#d37tableselectionrange) * [`D37TableSelectionStructureEditRequest`](#d37tableselectionstructureeditrequest) * [`D37TableSelectionStructureEditResult`](#d37tableselectionstructureeditresult) * [`D37TableSelectionStructureCommandState`](#d37tableselectionstructurecommandstate) * [`D37TableDimensionsRequest`](#d37tabledimensionsrequest) * [`D37TableDimensionsResult`](#d37tabledimensionsresult) * [`D37TableSelectionRowFitAction`](#d37tableselectionrowfitaction) * [`D37TableSelectionRowFitRange`](#d37tableselectionrowfitrange) * [`D37TableSelectionRowFitRequest`](#d37tableselectionrowfitrequest) * [`D37TableSelectionRowFitResult`](#d37tableselectionrowfitresult) * [`D37TableSelectionRowFitCommandState`](#d37tableselectionrowfitcommandstate) * [`D37TableAltTextRequest`](#d37tablealttextrequest) * [`D37TableAltTextResult`](#d37tablealttextresult) ### D37TableRangeRequest [Section titled “D37TableRangeRequest”](#d37tablerangerequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableRangeRequest { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; clipboardText?: string; clipboardHtml?: string; trackRevisions?: boolean; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableRangeResult [Section titled “D37TableRangeResult”](#d37tablerangeresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableRangeResult { schema: "fastdoc.shell.d37-table-range-clipboard.v1"; operationKind: "copy-table-cell-text-range" | "paste-table-cell-text-into-range"; applied: boolean; documentPath: string | null; outputPath: string | null; clipboardText: string | null; clipboardHtml: string | null; range: { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; }; resultKind: string | null; writebackResultKind: string | null; snapshot: unknown; } ``` ### D37TableCreateRequest [Section titled “D37TableCreateRequest”](#d37tablecreaterequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCreateRequest { bodyBlockIndex: number; clipboardText?: string; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableCreateResult [Section titled “D37TableCreateResult”](#d37tablecreateresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCreateResult { schema: "fastdoc.shell.d37-table-create-clipboard.v1"; operationKind: "create-simple-table-from-clipboard"; applied: boolean; documentPath: string | null; outputPath: string | null; clipboardText: string | null; bodyBlockIndex: number; resultKind: string | null; writebackResultKind: string | null; snapshot: unknown; } ``` ### D37TableGridCreateRequest [Section titled “D37TableGridCreateRequest”](#d37tablegridcreaterequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableGridCreateRequest { bodyBlockIndex: number; targetKind?: "body-block" | "table-cell"; rowIndex?: number | null; columnIndex?: number | null; rowCount: number; columnCount: number; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableGridCreateResult [Section titled “D37TableGridCreateResult”](#d37tablegridcreateresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableGridCreateResult { schema: "fastdoc.shell.d37-table-create-grid.v1"; operationKind: "create-simple-table" | "create-nested-simple-table"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; targetKind: "body-block" | "table-cell"; rowIndex: number | null; columnIndex: number | null; rowCount: number; columnCount: number; resultKind: string | null; writebackResultKind: string | null; snapshot: unknown; } ``` ### EditorV0ConvertTextToTableRequest [Section titled “EditorV0ConvertTextToTableRequest”](#editorv0converttexttotablerequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ConvertTextToTableRequest { bodyBlockIndex: number; clipboardText: string; separator: "paragraphs" | "tabs" | "semicolons" | `other:${string}`; columnCount: number; autofitMode: "fixed-auto" | "fixed" | "contents" | "window"; fixedColumnWidthTwips?: number | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0ConvertTextToTableResult [Section titled “EditorV0ConvertTextToTableResult”](#editorv0converttexttotableresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ConvertTextToTableResult { schema: "fastdoc.shell.editor-v0-convert-text-to-table.v1"; operationKind: "convert-text-to-table"; applied: boolean; documentPath: string | null; outputPath: string | null; transientWrite?: boolean; clipboardText: string | null; bodyBlockIndex: number; rowCount: number | null; columnCount: number | null; spanCount: number | null; separator: string; autofitMode: string; fixedColumnWidthTwips: number | null; resultKind: string | null; writebackResultKind: string | null; snapshot: unknown; } ``` ### D37AnyTableCreateResult [Section titled “D37AnyTableCreateResult”](#d37anytablecreateresult) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37AnyTableCreateResult = D37TableCreateResult | D37TableGridCreateResult; ``` ### EditorV0InsertTableCaptionRequest [Section titled “EditorV0InsertTableCaptionRequest”](#editorv0inserttablecaptionrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertTableCaptionRequest { bodyBlockIndex: number; label?: string | null; captionText?: string | null; captionPosition?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0UpdateTableRequest [Section titled “EditorV0UpdateTableRequest”](#editorv0updatetablerequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0UpdateTableRequest { reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0TableOfFiguresRequest [Section titled “EditorV0TableOfFiguresRequest”](#editorv0tableoffiguresrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0TableOfFiguresRequest { captionLabel?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0InsertTableCaptionResult [Section titled “EditorV0InsertTableCaptionResult”](#editorv0inserttablecaptionresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertTableCaptionResult { schema: "fastdoc.shell.editor-v0-insert-table-caption-action.v1"; operationKind: "insert-table-caption"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; label: string; captionText: string; captionPosition: string; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0UpdateTableResult [Section titled “EditorV0UpdateTableResult”](#editorv0updatetableresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0UpdateTableResult { schema: "fastdoc.shell.editor-v0-update-table-action.v1"; operationKind: "update-toc"; applied: boolean; documentPath: string | null; outputPath: string | null; documentPathAfterReopen: string | null; currentDocumentReopened: boolean; currentResultText: string | null; updatedResultText: string | null; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0TableOfFiguresResult [Section titled “EditorV0TableOfFiguresResult”](#editorv0tableoffiguresresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0TableOfFiguresResult { schema: "fastdoc.shell.editor-v0-table-of-figures-action.v1"; operationKind: "insert-table-of-figures"; applied: boolean; documentPath: string | null; outputPath: string | null; documentPathAfterReopen: string | null; currentDocumentReopened: boolean; captionLabel: string | null; captionCount: number | null; existingTableOfFiguresCount: number | null; insertedInstructionText: string | null; insertedResultText: string | null; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0UpdateTableOfFiguresResult [Section titled “EditorV0UpdateTableOfFiguresResult”](#editorv0updatetableoffiguresresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0UpdateTableOfFiguresResult { schema: "fastdoc.shell.editor-v0-update-table-of-figures-action.v1"; operationKind: "update-table-of-figures"; applied: boolean; documentPath: string | null; outputPath: string | null; documentPathAfterReopen: string | null; currentDocumentReopened: boolean; captionLabel: string | null; captionCount: number | null; existingTableOfFiguresCount: number | null; currentResultText: string | null; updatedResultText: string | null; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### D37TableMouseDrawSemanticRequest [Section titled “D37TableMouseDrawSemanticRequest”](#d37tablemousedrawsemanticrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableMouseDrawSemanticRequest { bodyBlockIndex: number; rowCount: number; columnCount: number; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableMouseDrawSemanticResult [Section titled “D37TableMouseDrawSemanticResult”](#d37tablemousedrawsemanticresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableMouseDrawSemanticResult { schema: "fastdoc.shell.d37-table-mouse-draw-semantic.v1"; operationKind: "create-drawn-simple-table"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; rowCount: number | null; columnCount: number | null; requestedRowCount: number; requestedColumnCount: number; tableInputProvenance: string | null; resultKind: string | null; writebackResultKind: string | null; mutatedTableCount: number | null; snapshot: unknown; } ``` ### D37TableSelectionResizeAxis [Section titled “D37TableSelectionResizeAxis”](#d37tableselectionresizeaxis) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionResizeAxis = "column-width" | "row-height"; ``` ### D37TableSelectionResizeEdge [Section titled “D37TableSelectionResizeEdge”](#d37tableselectionresizeedge) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionResizeEdge = "left" | "right" | "bottom"; ``` ### D37TableSelectionResizeRange [Section titled “D37TableSelectionResizeRange”](#d37tableselectionresizerange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionResizeRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionResizeRequest [Section titled “D37TableSelectionResizeRequest”](#d37tableselectionresizerequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionResizeRequest { selection: D37TableSelectionResizeRange; resizeAxis: D37TableSelectionResizeAxis; resizeEdge?: D37TableSelectionResizeEdge | null; startDimensionTwips: number; deltaTwips: number; minDimensionTwips?: number | null; maxDimensionTwips?: number | null; tableWidthTwips?: number | null; tableIndentTwips?: number | null; tableAlignment?: "left" | "center" | "right" | null; pairedColumnIndex?: number | null; pairedColumnWidthTwips?: number | null; startDimensionSource?: string | null; rowHeightRule?: "exact" | "atLeast" | "at_least" | "auto" | "automatic" | null; workflowSource?: "keyboard-nudge" | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionResizeCommandState [Section titled “D37TableSelectionResizeCommandState”](#d37tableselectionresizecommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionResizeCommandState { operationKind: "set-table-column-width" | "set-table-row-height"; targetRowIndex: number | null; targetColumnIndex: number | null; startDimensionTwips: number; deltaTwips: number; requestedDimensionTwips: number; clampedDimensionTwips: number; minDimensionTwips: number; maxDimensionTwips: number; tableWidthTwips: number | null; tableIndentTwips: number | null; tableAlignment: "left" | "center" | "right" | null; pairedColumnIndex: number | null; pairedColumnWidthTwips: number | null; startDimensionSource: string | null; rowHeightRule: string | null; workflowSource: string | null; } ``` ### D37TableSelectionResizeResult [Section titled “D37TableSelectionResizeResult”](#d37tableselectionresizeresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionResizeResult { schema: "fastdoc.shell.d37-table-selection-resize.v1"; resizeAxis: D37TableSelectionResizeAxis; resizeEdge: D37TableSelectionResizeEdge; selection: D37TableSelectionResizeRange; computedCommandState: D37TableSelectionResizeCommandState; dimensionsResult: D37TableDimensionsResult; } ``` ### D37TableTemplateRequest [Section titled “D37TableTemplateRequest”](#d37tabletemplaterequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableTemplateRequest { bodyBlockIndex: number; templateKind?: "banded-blue" | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableTemplateResult [Section titled “D37TableTemplateResult”](#d37tabletemplateresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableTemplateResult { schema: "fastdoc.shell.d37-table-template-format.v1"; operationKind: "apply-table-template-banded-blue"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; templateKind: "banded-blue"; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; snapshot: unknown; } ``` ### D37TableHeaderRowMode [Section titled “D37TableHeaderRowMode”](#d37tableheaderrowmode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableHeaderRowMode = "set"; ``` ### D37TableHeaderRowRequest [Section titled “D37TableHeaderRowRequest”](#d37tableheaderrowrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableHeaderRowRequest { bodyBlockIndex: number; headerRowMode?: D37TableHeaderRowMode | null; styleOptions?: D37TableStyleOptions | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableHeaderRowResult [Section titled “D37TableHeaderRowResult”](#d37tableheaderrowresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableHeaderRowResult { schema: "fastdoc.shell.d37-table-header-row.v1"; operationKind: "set-table-header-row"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; headerRowMode: D37TableHeaderRowMode; styleOptions: D37TableStyleOptions | null; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; snapshot: unknown; } ``` ### D37TableHeaderRepeatMode [Section titled “D37TableHeaderRepeatMode”](#d37tableheaderrepeatmode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableHeaderRepeatMode = "repeat" | "clear"; ``` ### D37TableHeaderRepeatRequest [Section titled “D37TableHeaderRepeatRequest”](#d37tableheaderrepeatrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableHeaderRepeatRequest { bodyBlockIndex: number; repeatMode?: D37TableHeaderRepeatMode | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableHeaderRepeatResult [Section titled “D37TableHeaderRepeatResult”](#d37tableheaderrepeatresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableHeaderRepeatResult { schema: "fastdoc.shell.d37-table-header-repeat.v1"; operationKind: "repeat-table-header-row" | "clear-repeat-table-header-row"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; repeatMode: D37TableHeaderRepeatMode; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; snapshot: unknown; } ``` ### D37TableDataCommandKind [Section titled “D37TableDataCommandKind”](#d37tabledatacommandkind) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableDataCommandKind = "sort-table-ascending" | "convert-table-to-text"; ``` ### D37TableTextSeparator [Section titled “D37TableTextSeparator”](#d37tabletextseparator) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableTextSeparator = "paragraphs" | "tabs" | "semicolons" | "other"; ``` ### D37TableSortValueType [Section titled “D37TableSortValueType”](#d37tablesortvaluetype) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSortValueType = "text" | "number" | "date"; ``` ### D37TableSortDirection [Section titled “D37TableSortDirection”](#d37tablesortdirection) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSortDirection = "ascending" | "descending"; ``` ### D37TableSortHeaderMode [Section titled “D37TableSortHeaderMode”](#d37tablesortheadermode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSortHeaderMode = "header" | "no-header"; ``` ### D37TableSortKey [Section titled “D37TableSortKey”](#d37tablesortkey) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSortKey { columnIndex: number; valueType: D37TableSortValueType; direction: D37TableSortDirection; } ``` ### D37TableDataCommandRequest [Section titled “D37TableDataCommandRequest”](#d37tabledatacommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableDataCommandRequest { bodyBlockIndex: number; command: D37TableDataCommandKind; keyColumnIndex?: number | null; sortKeys?: D37TableSortKey[]; sortHeaderMode?: D37TableSortHeaderMode; sortCaseSensitive?: boolean; sortLanguage?: string; sortFieldSeparator?: Exclude; sortCustomSeparator?: string | null; textSeparator?: D37TableTextSeparator; customSeparator?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableDataCommandResult [Section titled “D37TableDataCommandResult”](#d37tabledatacommandresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableDataCommandResult { schema: "fastdoc.shell.d37-table-data-command.v1"; operationKind: D37TableDataCommandKind; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; keyColumnIndex: number | null; sortKeys: D37TableSortKey[] | null; sortHeaderMode: D37TableSortHeaderMode | null; textSeparator: D37TableTextSeparator | null; customSeparator: string | null; resultKind: string | null; writebackResultKind: string | null; sortCaseSensitive: boolean | null; sortLanguage: string | null; sortFieldSeparator: Exclude | null; sortCustomSeparator: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; clipboardText: string | null; snapshot: unknown; } ``` ### D37TableSelectionHeaderRepeatAction [Section titled “D37TableSelectionHeaderRepeatAction”](#d37tableselectionheaderrepeataction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionHeaderRepeatAction = "repeat-selected-header-row"; ``` ### D37TableSelectionHeaderRepeatRange [Section titled “D37TableSelectionHeaderRepeatRange”](#d37tableselectionheaderrepeatrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionHeaderRepeatRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionHeaderRepeatRequest [Section titled “D37TableSelectionHeaderRepeatRequest”](#d37tableselectionheaderrepeatrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionHeaderRepeatRequest { selection: D37TableSelectionHeaderRepeatRange; action: D37TableSelectionHeaderRepeatAction; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionHeaderRepeatResult [Section titled “D37TableSelectionHeaderRepeatResult”](#d37tableselectionheaderrepeatresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionHeaderRepeatResult { schema: "fastdoc.shell.d37-table-selection-header-repeat.v1"; action: D37TableSelectionHeaderRepeatAction; selection: D37TableSelectionHeaderRepeatRange; computedRepeatMode: "repeat" | "clear"; headerRepeatResult: D37TableHeaderRepeatResult; } ``` ### D37TableSelectionHeaderRepeatCommandState [Section titled “D37TableSelectionHeaderRepeatCommandState”](#d37tableselectionheaderrepeatcommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionHeaderRepeatCommandState { schema: "fastdoc.shell.d37-table-selection-header-repeat-command-state.v1"; operationKind: "repeat-table-header-row" | "clear-repeat-table-header-row"; action: D37TableSelectionHeaderRepeatAction; canApply: boolean; disabledReason: string | null; documentPath: string | null; selection: D37TableSelectionHeaderRepeatRange; computedRepeatMode: "repeat" | "clear"; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableSelectionClearFillRequest [Section titled “D37TableSelectionClearFillRequest”](#d37tableselectionclearfillrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionClearFillRequest { selection: D37TableSelectionCellRangeFormatRange; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionClearFillResult [Section titled “D37TableSelectionClearFillResult”](#d37tableselectionclearfillresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionClearFillResult { schema: "fastdoc.shell.d37-table-selection-clear-fill.v1"; operationKind: "clear-table-cell-fill-range"; applied: boolean; documentPath: string | null; outputPath: string | null; selection: D37TableSelectionCellRangeFormatRange; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; snapshot: unknown; } ``` ### D37TableSelectionClearFillCommandState [Section titled “D37TableSelectionClearFillCommandState”](#d37tableselectionclearfillcommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionClearFillCommandState { schema: "fastdoc.shell.d37-table-selection-clear-fill-command-state.v1"; operationKind: "clear-table-cell-fill-range"; canApply: boolean; disabledReason: string | null; documentPath: string | null; selection: D37TableSelectionCellRangeFormatRange; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableSelectionClearContentsRequest [Section titled “D37TableSelectionClearContentsRequest”](#d37tableselectionclearcontentsrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionClearContentsRequest { selection: D37TableSelectionCellRangeFormatRange; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionClearContentsResult [Section titled “D37TableSelectionClearContentsResult”](#d37tableselectionclearcontentsresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionClearContentsResult { schema: "fastdoc.shell.d37-table-selection-clear-contents.v1"; operationKind: "clear-table-cell-text-range"; applied: boolean; documentPath: string | null; outputPath: string | null; selection: D37TableSelectionCellRangeFormatRange; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; snapshot: unknown; } ``` ### D37TableSelectionClearContentsCommandState [Section titled “D37TableSelectionClearContentsCommandState”](#d37tableselectionclearcontentscommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionClearContentsCommandState { schema: "fastdoc.shell.d37-table-selection-clear-contents-command-state.v1"; operationKind: "clear-table-cell-text-range"; canApply: boolean; disabledReason: string | null; documentPath: string | null; selection: D37TableSelectionCellRangeFormatRange; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableSelectionClearFormattingRequest [Section titled “D37TableSelectionClearFormattingRequest”](#d37tableselectionclearformattingrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionClearFormattingRequest { selection: D37TableSelectionCellRangeFormatRange; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionClearFormattingResult [Section titled “D37TableSelectionClearFormattingResult”](#d37tableselectionclearformattingresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionClearFormattingResult { schema: "fastdoc.shell.d37-table-selection-clear-formatting.v1"; operationKind: "clear-table-cell-formatting-range"; applied: boolean; documentPath: string | null; outputPath: string | null; selection: D37TableSelectionCellRangeFormatRange; fillResultKind: string | null; fillWritebackResultKind: string | null; borderResultKind: string | null; borderWritebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; fillSnapshot: unknown; borderSnapshot: unknown; } ``` ### D37TableSelectionClearFormattingCommandState [Section titled “D37TableSelectionClearFormattingCommandState”](#d37tableselectionclearformattingcommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionClearFormattingCommandState { schema: "fastdoc.shell.d37-table-selection-clear-formatting-command-state.v1"; operationKind: "clear-table-cell-formatting-range"; canApply: boolean; disabledReason: string | null; documentPath: string | null; selection: D37TableSelectionCellRangeFormatRange; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableSelectionClearContentFormatRequest [Section titled “D37TableSelectionClearContentFormatRequest”](#d37tableselectionclearcontentformatrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionClearContentFormatRequest { selection: D37TableSelectionCellRangeFormatRange; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionClearContentFormatResult [Section titled “D37TableSelectionClearContentFormatResult”](#d37tableselectionclearcontentformatresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionClearContentFormatResult { schema: "fastdoc.shell.d37-table-selection-clear-content-format.v1"; operationKind: "clear-table-cell-content-format-range"; applied: boolean; documentPath: string | null; outputPath: string | null; selection: D37TableSelectionCellRangeFormatRange; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; snapshot: unknown; } ``` ### D37TableSelectionClearContentFormatCommandState [Section titled “D37TableSelectionClearContentFormatCommandState”](#d37tableselectionclearcontentformatcommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionClearContentFormatCommandState { schema: "fastdoc.shell.d37-table-selection-clear-content-format-command-state.v1"; operationKind: "clear-table-cell-content-format-range"; canApply: boolean; disabledReason: string | null; documentPath: string | null; selection: D37TableSelectionCellRangeFormatRange; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableStructureEditMode [Section titled “D37TableStructureEditMode”](#d37tablestructureeditmode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableStructureEditMode = "delete-table" | "delete-cell" | "delete-cell-shift-up" | "split-table" | "insert-row" | "insert-rows" | "delete-row" | "delete-rows" | "insert-column" | "insert-columns" | "delete-column" | "delete-columns"; ``` ### D37TableSelectionStructureEditAction [Section titled “D37TableSelectionStructureEditAction”](#d37tableselectionstructureeditaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionStructureEditAction = "insert-row-above" | "insert-row-below" | "insert-column-left" | "insert-column-right" | "split-table" | "delete-selected-rows" | "delete-selected-columns"; ``` ### D37TableStructureEditRequest [Section titled “D37TableStructureEditRequest”](#d37tablestructureeditrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableStructureEditRequest { bodyBlockIndex: number; editMode: D37TableStructureEditMode; rowIndex?: number | null; columnIndex?: number | null; spanCount?: number | null; clipboardText?: string | null; cellTexts?: string[] | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableStructureEditResult [Section titled “D37TableStructureEditResult”](#d37tablestructureeditresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableStructureEditResult { schema: "fastdoc.shell.d37-table-structure-edit.v1"; operationKind: "delete-table" | "delete-table-cell" | "delete-table-cell-shift-up" | "split-table" | "insert-table-row" | "insert-table-rows" | "delete-table-row" | "delete-table-rows" | "insert-table-column" | "insert-table-columns" | "delete-table-column" | "delete-table-columns"; applied: boolean; documentPath: string | null; outputPath: string | null; editMode: D37TableStructureEditMode; bodyBlockIndex: number; targetIndex: number; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; clipboardText: string | null; cellTexts: string[]; snapshot: unknown; } ``` ### D37TableSelectionRange [Section titled “D37TableSelectionRange”](#d37tableselectionrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionStructureEditRequest [Section titled “D37TableSelectionStructureEditRequest”](#d37tableselectionstructureeditrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionStructureEditRequest { selection: D37TableSelectionRange; action: D37TableSelectionStructureEditAction; clipboardText?: string | null; cellTexts?: string[] | null; tableInputProvenance?: "mouse-internal-divider-intent" | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionStructureEditResult [Section titled “D37TableSelectionStructureEditResult”](#d37tableselectionstructureeditresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionStructureEditResult { schema: "fastdoc.shell.d37-table-selection-structure-edit.v1"; action: D37TableSelectionStructureEditAction; selection: D37TableSelectionRange; computedEditMode: D37TableStructureEditMode; computedTargetIndex: number; structureEditResult: D37TableStructureEditResult; } ``` ### D37TableSelectionStructureCommandState [Section titled “D37TableSelectionStructureCommandState”](#d37tableselectionstructurecommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionStructureCommandState { schema: "fastdoc.shell.d37-table-selection-structure-command-state.v1"; action: D37TableSelectionStructureEditAction; selection: D37TableSelectionRange; computedEditMode: D37TableStructureEditMode; computedTargetIndex: number; operationKind: D37TableStructureEditResult["operationKind"]; canApply: boolean; disabledReason: string | null; canonicalReason: string | null; canonicalDetail: string | null; documentPath: string | null; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; spanCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableDimensionsRequest [Section titled “D37TableDimensionsRequest”](#d37tabledimensionsrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableDimensionsRequest { bodyBlockIndex: number; rowIndex?: number | null; rowHeightTwips?: number | null; rowHeightRule?: "exact" | "atLeast" | "at_least" | "auto" | "automatic" | null; fitRowHeightToContents?: boolean | null; allowRowToBreakAcrossPages?: boolean | null; columnIndex?: number | null; columnWidthTwips?: number | null; tableWidthTwips?: number | null; tableIndentTwips?: number | null; tableAlignment?: "left" | "center" | "right" | null; pairedColumnIndex?: number | null; pairedColumnWidthTwips?: number | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableDimensionsResult [Section titled “D37TableDimensionsResult”](#d37tabledimensionsresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableDimensionsResult { schema: "fastdoc.shell.d37-table-dimensions.v1"; operationKind: "table-row-column-dimensions"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; rowIndex: number | null; columnIndex: number | null; rowOperationKind: string | null; rowResultKind: string | null; rowWritebackResultKind: string | null; rowDimensionTwips: number | null; rowHeightRule: string | null; allowRowToBreakAcrossPages: boolean | null; columnOperationKind: string | null; columnResultKind: string | null; columnWritebackResultKind: string | null; columnDimensionTwips: number | null; rowCount: number | null; columnCount: number | null; rowSnapshot: unknown; columnSnapshot: unknown; } ``` ### D37TableSelectionRowFitAction [Section titled “D37TableSelectionRowFitAction”](#d37tableselectionrowfitaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionRowFitAction = "fit-selected-table-row-to-contents"; ``` ### D37TableSelectionRowFitRange [Section titled “D37TableSelectionRowFitRange”](#d37tableselectionrowfitrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionRowFitRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionRowFitRequest [Section titled “D37TableSelectionRowFitRequest”](#d37tableselectionrowfitrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionRowFitRequest { selection: D37TableSelectionRowFitRange; action?: D37TableSelectionRowFitAction | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionRowFitResult [Section titled “D37TableSelectionRowFitResult”](#d37tableselectionrowfitresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionRowFitResult { schema: "fastdoc.shell.d37-table-selection-row-fit.v1"; action: D37TableSelectionRowFitAction; selection: D37TableSelectionRowFitRange; computedRowIndex: number; rowFitResult: D37TableDimensionsResult; } ``` ### D37TableSelectionRowFitCommandState [Section titled “D37TableSelectionRowFitCommandState”](#d37tableselectionrowfitcommandstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionRowFitCommandState { schema: "fastdoc.shell.d37-table-selection-row-fit-command-state.v1"; operationKind: "table-row-column-dimensions"; action: D37TableSelectionRowFitAction; canApply: boolean; disabledReason: string | null; documentPath: string | null; selection: D37TableSelectionRowFitRange; computedRowIndex: number | null; rowOperationKind: string | null; rowResultKind: string | null; rowWritebackResultKind: string | null; rowDimensionTwips: number | null; rowHeightRule: string | null; rowCount: number | null; columnCount: number | null; supportMarkerKinds: string[]; snapshot: unknown; } ``` ### D37TableAltTextRequest [Section titled “D37TableAltTextRequest”](#d37tablealttextrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableAltTextRequest { bodyBlockIndex: number; title: string; description: string; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableAltTextResult [Section titled “D37TableAltTextResult”](#d37tablealttextresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableAltTextResult { schema: "fastdoc.shell.d37-table-alt-text.v1"; operationKind: "set-table-alt-text"; applied: boolean; documentPath: string | null; outputPath: string | null; bodyBlockIndex: number; title: string | null; description: string | null; resultKind: string | null; writebackResultKind: string | null; rowCount: number | null; columnCount: number | null; snapshot: unknown; } ``` # DTO · Text and paragraphs > 49 interfaces and 7 type aliases from the `api-edit.ts` module — text editing, paragraphs, lists, fonts, clipboard, and history. 49 interfaces and 7 type aliases — text editing, paragraphs, lists, fonts, clipboard, and history. Internal contract These types describe the exchange inside the desktop SumDoc window. For embedding in your product, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). Some types include internal tags such as `backlog_id: "D38"` or `sharedSceneOwner: "D5"` — these are the task numbers the feature was filed under inside the team. They appear in the response, but embedding doesn’t need them: there’s no reason to parse or store them. Contract module: `api-edit.ts`. Other topics in this module: **Text and paragraphs** · [Tables: structure](/reference/sumdoc/dto-edit-table-structure/) · [Tables: cells and formatting](/reference/sumdoc/dto-edit-table-cells/) · [Tables: placement on the page](/reference/sumdoc/dto-edit-table-layout/) · [Page setup and document structure](/reference/sumdoc/dto-edit-page/) · [Objects and drawings](/reference/sumdoc/dto-edit-objects/) · [Fields, footnotes, and references](/reference/sumdoc/dto-edit-fields/). Types on this page — 56 * [`MenuCommand`](#menucommand) * [`SystemPastePayload`](#systempastepayload) * [`ShellObservedBreak`](#shellobservedbreak) * [`ShellReportSnapshot`](#shellreportsnapshot) * [`ShellFixtureOption`](#shellfixtureoption) * [`ShellParagraphTabStop`](#shellparagraphtabstop) * [`ShellComposedLineFragment`](#shellcomposedlinefragment) * [`ShellComposedParagraphLine`](#shellcomposedparagraphline) * [`ShellComposedParagraph`](#shellcomposedparagraph) * [`ShellParagraphCompositionSnapshot`](#shellparagraphcompositionsnapshot) * [`BoundedLiveTextInsertRequest`](#boundedlivetextinsertrequest) * [`EditorV0InsertBreakKind`](#editorv0insertbreakkind) * [`EditorV0InsertDropCapKind`](#editorv0insertdropcapkind) * [`EditorV0InsertBreakRequest`](#editorv0insertbreakrequest) * [`EditorV0InsertDropCapRequest`](#editorv0insertdropcaprequest) * [`EditorV0InsertBreakResult`](#editorv0insertbreakresult) * [`EditorV0AddTextLevel`](#editorv0addtextlevel) * [`EditorV0AddTextRequest`](#editorv0addtextrequest) * [`EditorV0InsertDropCapResult`](#editorv0insertdropcapresult) * [`EditorV0AddTextResult`](#editorv0addtextresult) * [`EditorV0ParagraphStructureRequest`](#editorv0paragraphstructurerequest) * [`EditorV0ParagraphStructureResult`](#editorv0paragraphstructureresult) * [`EditorV0ToolbarFormatCommandRequest`](#editorv0toolbarformatcommandrequest) * [`EditorV0ToolbarFormatCommandResult`](#editorv0toolbarformatcommandresult) * [`EditorV0ToolbarFormatBatchCommandRequest`](#editorv0toolbarformatbatchcommandrequest) * [`EditorV0ToolbarFormatBatchCommandResult`](#editorv0toolbarformatbatchcommandresult) * [`EditorV0ParagraphLayoutCommandRequest`](#editorv0paragraphlayoutcommandrequest) * [`EditorV0ParagraphLayoutCommandResult`](#editorv0paragraphlayoutcommandresult) * [`EditorV0UpdateStyleFromSelectionRequest`](#editorv0updatestylefromselectionrequest) * [`EditorV0UpdateStyleFromSelectionResult`](#editorv0updatestylefromselectionresult) * [`EditorV0HomeCharacterFormat`](#editorv0homecharacterformat) * [`EditorV0HomeTabStop`](#editorv0hometabstop) * [`EditorV0HomeParagraphFormat`](#editorv0homeparagraphformat) * [`EditorV0HomeStyleFormat`](#editorv0homestyleformat) * [`EditorV0HomeStyleDefinition`](#editorv0homestyledefinition) * [`EditorV0HomeParagraphState`](#editorv0homeparagraphstate) * [`EditorV0HomeFormattingSnapshot`](#editorv0homeformattingsnapshot) * [`EditorV0HomeFormattingOperation`](#editorv0homeformattingoperation) * [`EditorV0HomeFormattingRequest`](#editorv0homeformattingrequest) * [`EditorV0HomeFormattingResult`](#editorv0homeformattingresult) * [`EditorV0ParagraphLayoutBatchCommandRequest`](#editorv0paragraphlayoutbatchcommandrequest) * [`EditorV0ParagraphLayoutBatchCommandResult`](#editorv0paragraphlayoutbatchcommandresult) * [`EditorV0ParagraphFillCommandRequest`](#editorv0paragraphfillcommandrequest) * [`EditorV0ParagraphFillCommandResult`](#editorv0paragraphfillcommandresult) * [`EditorV0ParagraphBorderCommandRequest`](#editorv0paragraphbordercommandrequest) * [`EditorV0ParagraphBorderCommandResult`](#editorv0paragraphbordercommandresult) * [`EditorV0ParagraphSortCommandRequest`](#editorv0paragraphsortcommandrequest) * [`EditorV0ParagraphSortCommandResult`](#editorv0paragraphsortcommandresult) * [`BoundedLiveTextInsertResult`](#boundedlivetextinsertresult) * [`BoundedLiveTextMutationResult`](#boundedlivetextmutationresult) * [`EditorV0EditingReplaceFirstRequest`](#editorv0editingreplacefirstrequest) * [`EditorV0EditingReplaceFirstResult`](#editorv0editingreplacefirstresult) * [`EditorV0EditingReplaceAllRequest`](#editorv0editingreplaceallrequest) * [`EditorV0EditingReplaceAllSemanticRange`](#editorv0editingreplaceallsemanticrange) * [`EditorV0EditingReplaceAllParagraphResult`](#editorv0editingreplaceallparagraphresult) * [`EditorV0EditingReplaceAllResult`](#editorv0editingreplaceallresult) ### MenuCommand [Section titled “MenuCommand”](#menucommand) `TypeAliasDeclaration` · `api-edit.ts` ```ts type MenuCommand = | "open-docx" | "editor-save-copy" | "editor-reopen-saved-copy" | "editor-open-user-copy-dialog" | "editor-insert-date-time" | "editor-select-all" | "editor-copy" | "editor-cut" | "editor-history-undo" | "editor-history-redo" | "editor-format-subscript" | "editor-format-superscript" | "reload-current-docx" | "toggle-left-panel" | "toggle-right-panel" | "hide-side-panels" | "set-mode-print" | "set-mode-paginate" | "set-mode-report" | "set-mode-review" | "previous-page" | "next-page" | "zoom-in" | "zoom-out" | "zoom-reset" | "view-fit-page-width" | "view-fit-whole-page" | "view-fit-multiple-pages" | "view-draft-layout" | "view-web-layout" | "view-outline" | "view-show-ruler" | "view-hide-ruler" | "view-scroll-horizontal" | "view-smooth-scroll" | "view-enter-full-screen-reading" | "view-exit-full-screen-reading" | "view-use-dark-mode" | "view-focus-mode" | "view-show-object-guides" | "view-split-view" | "view-restore-state" | "nav-place-caret-by-click" | "nav-caret-left" | "nav-caret-right" | "nav-caret-up" | "nav-caret-down" | "nav-word-previous" | "nav-word-next" | "nav-line-start" | "nav-line-end" | "nav-paragraph-start" | "nav-paragraph-end" | "nav-document-start" | "nav-document-end" | "nav-previous-page" | "nav-next-page" | "nav-search-previous" | "nav-search-next" | "nav-heading-next" | "nav-bookmark-next" | "nav-footnote-next" | "nav-endnote-next" | "nav-comment-anchor-next" | "nav-table-cell-next" | "nav-inline-object-next" | "nav-floating-object-next" | "nav-return-last-edit-point"; ``` ### SystemPastePayload [Section titled “SystemPastePayload”](#systempastepayload) `TypeAliasDeclaration` · `api-edit.ts` ```ts type SystemPastePayload = { schema: "fastdoc.native-clipboard.v1"; text: string; html: string; rtf: string; imagePngBase64: string | null; imagePath?: string | null; files: string[]; internalJson: string | null; forcePlain: boolean; selectedFormat: "fastdoc-rich" | "rtf" | "html" | "image" | "files" | "plain-text" | "empty" | "rejected"; availableFormats: string[]; priority: readonly [ "fastdoc-rich", "html", "rtf", "image", "files", "plain-text" ]; fingerprint: string; totalBytes: number; rejectionReasons: string[]; }; ``` ### ShellObservedBreak [Section titled “ShellObservedBreak”](#shellobservedbreak) `InterfaceDeclaration` · `api-edit.ts` ```ts interface ShellObservedBreak { break_kind: string; location: string; detail: string; } ``` ### ShellReportSnapshot [Section titled “ShellReportSnapshot”](#shellreportsnapshot) `InterfaceDeclaration` · `api-edit.ts` ```ts interface ShellReportSnapshot { stage_id: string; part_count: number; relationship_count: number; detected_features?: ShellDetectedFeature[]; relationships?: ShellRelationshipSnapshot[]; support_state_counts?: Record; } ``` ### ShellFixtureOption [Section titled “ShellFixtureOption”](#shellfixtureoption) `InterfaceDeclaration` · `api-edit.ts` ```ts interface ShellFixtureOption { key: string; label: string; path: string; description: string; } ``` ### ShellParagraphTabStop [Section titled “ShellParagraphTabStop”](#shellparagraphtabstop) `InterfaceDeclaration` · `api-edit.ts` ```ts interface ShellParagraphTabStop { alignment: string; position_twips: number; leader?: string | null; source: string; text?: string; width_milli_px?: number; } ``` ### ShellComposedLineFragment [Section titled “ShellComposedLineFragment”](#shellcomposedlinefragment) `InterfaceDeclaration` · `api-edit.ts` ```ts interface ShellComposedLineFragment { text: string; width_milli_px: number; } ``` ### ShellComposedParagraphLine [Section titled “ShellComposedParagraphLine”](#shellcomposedparagraphline) `InterfaceDeclaration` · `api-edit.ts` ```ts interface ShellComposedParagraphLine { text: string; fragments: ShellComposedLineFragment[]; } ``` ### ShellComposedParagraph [Section titled “ShellComposedParagraph”](#shellcomposedparagraph) `InterfaceDeclaration` · `api-edit.ts` ```ts interface ShellComposedParagraph { paragraph_index: number; paragraph_location: string; text: string; available_width_milli_px: number; line_break_mode: string; drop_cap_kind?: string | null; alignment_mode?: string | null; tab_run_count: number; tab_stops: ShellParagraphTabStop[]; default_tab_stop_twips?: number | null; first_line_indent_twips?: number | null; left_indent_twips?: number | null; right_indent_twips?: number | null; spacing_before_twips?: number | null; spacing_after_twips?: number | null; line_spacing_twips?: number | null; line_spacing_rule?: string | null; fill_color_rgb?: string | null; keep_with_next?: boolean; keep_lines_together?: boolean; widow_control?: boolean; page_break_before?: boolean; blocked_reason?: string | null; lines?: ShellComposedParagraphLine[]; support_markers?: ShellSupportMarker[]; } ``` ### ShellParagraphCompositionSnapshot [Section titled “ShellParagraphCompositionSnapshot”](#shellparagraphcompositionsnapshot) `InterfaceDeclaration` · `api-edit.ts` ```ts interface ShellParagraphCompositionSnapshot { model_version: string; stage_id: string; stage_name: string; line_break_mode: string; width_source: string; paragraph_count: number; non_empty_paragraph_count: number; composed_paragraph_count: number; blocked_paragraph_count: number; line_count: number; support_marker_count: number; paragraphs: ShellComposedParagraph[]; support_markers?: ShellSupportMarker[]; } ``` ### BoundedLiveTextInsertRequest [Section titled “BoundedLiveTextInsertRequest”](#boundedlivetextinsertrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface BoundedLiveTextInsertRequest { documentPath?: string | null; sourcePath?: string | null; saveAsOwnershipReservationId?: string | null; paragraphIndex: number; offset: number; text?: string; insertText?: string; structuredCommentAnchorTargetText?: string; semanticBoundaryAffinity?: "before" | "after"; semanticBoundaryNoteId?: number; deleteCount?: number; persistentEdit?: OptimisticEditRequest; canonicalTransitionKind?: "typing" | "replacement" | "paste" | "ime" | "format"; canonicalBeforeCaretSlotIndex?: number; canonicalAfterCaretSlotIndex?: number; canonicalProjectionPageIndex?: number; canonicalProjectionRefresh?: "full"; canonicalAutocorrect?: { kind: "user-replacement" | "built-in-replacement" | "sentence-start" | "caps-lock" | "smart-quote" | "hyphen-to-dash" | "ordinal" | "common-symbol" | "hyperlink" | "bullet-list" | "numbered-list" | "border-line"; rawText: string; correctedText: string; }; trackRevisions?: boolean; noTextMutation?: boolean; reopenAfterWrite?: boolean; outputKind?: | "live-bounded-text-continue" | "editor-v0-text-continue" | "editor-v0-txt001-collapsed-typing" | "editor-v0-txt003-delete-previous-character" | "editor-v0-txt007-split-paragraph" | "editor-v0-txt008-join-paragraphs" | "editor-v0-txt009-insert-soft-line-break" | "editor-v0-txt010-insert-non-breaking-space" | "editor-v0-txt011-insert-non-breaking-hyphen" | "editor-v0-txt012-insert-optional-hyphen" | "editor-v0-text-continue-commands" | "editor-v0-undo" | "editor-v0-redo" | "editor-v0-save-as-dialog" | "editor-v0-save-state" | "editor-v0-nonblocking-typing" | "editor-v0-double-space-period-autocorrect" | "editor-v0-selection-replace" | "editor-v0-selection-edit-2" | "editor-v0-selection-edit-3"; // …list truncated: first 20 shown, 245 values total pasteStyleStrategy?: "inherit-start" | "plain" | "source"; pasteStyleSegments?: Array<{ offset: number; length: number; bold: boolean; italic: boolean; colorRgb: string | null; underline?: string | null; fontFamilyName?: string | null; fontSizeHalfPoints?: number | null; }> | null; pasteParagraphLayout?: { alignment: "left" | "center" | "right" | "both"; leftIndentTwips: number; firstLineIndentTwips?: number | null; rightIndentTwips?: number | null; tabStops?: Array<{ alignment: "left" | "center" | "right" | "decimal" | "bar"; positionTwips: number; leader?: "dot" | "hyphen" | "underscore" | "middleDot" | "heavy" | null; }>; spacingBeforeTwips?: number | null; spacingAfterTwips: number; lineSpacingTwips: number; numbering?: { kind?: "decimal" | "bullet"; numId: number; ilvl: number; start: number; numFormat: "decimal" | "bullet"; levelText: "%1." | "•"; } | null; } | null; pasteParagraphStyle?: "Normal" | "Heading1" | "Heading2" | "Heading3" | null; pasteParagraphDirection?: "ltr" | "rtl" | null; pasteHyperlinks?: Array<{ offset: number; length: number; url: string; }> | null; pasteParagraphBorder?: "box-single" | null; pasteSectionPageMargins?: { topMarginTwips: number; rightMarginTwips: number; bottomMarginTwips: number; leftMarginTwips: number; } | null; saveAsPath?: string | null; operationKind?: "delete-multiparagraph-range"; endParagraphIndex?: number; endOffset?: number; } ``` ### EditorV0InsertBreakKind [Section titled “EditorV0InsertBreakKind”](#editorv0insertbreakkind) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0InsertBreakKind = "line-break" | "page-break" | "column-break" | "section-break-next-page" | "section-break-continuous" | "section-break-even-page" | "section-break-odd-page"; ``` ### EditorV0InsertDropCapKind [Section titled “EditorV0InsertDropCapKind”](#editorv0insertdropcapkind) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0InsertDropCapKind = "none" | "drop" | "margin"; ``` ### EditorV0InsertBreakRequest [Section titled “EditorV0InsertBreakRequest”](#editorv0insertbreakrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertBreakRequest { breakKind: EditorV0InsertBreakKind; paragraphIndex: number; offset?: number | null; deleteCount?: number | null; reopenAfterWrite?: boolean; sourcePath?: string | null; outputPath?: string | null; } ``` ### EditorV0InsertDropCapRequest [Section titled “EditorV0InsertDropCapRequest”](#editorv0insertdropcaprequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertDropCapRequest { dropCapKind: EditorV0InsertDropCapKind; paragraphIndex: number; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0InsertBreakResult [Section titled “EditorV0InsertBreakResult”](#editorv0insertbreakresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertBreakResult { schema: "fastdoc.shell.editor-v0-insert-break-action.v1"; operationKind: "insert-line-break" | "delete-line-break" | "insert-page-break" | "insert-column-break" | "insert-section-break"; breakKind: EditorV0InsertBreakKind; applied: boolean; documentPath: string | null; outputPath: string | null; paragraphIndex: number; offset: number | null; deleteCount: number; resultKind: string | null; writebackResultKind: string | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; } ``` ### EditorV0AddTextLevel [Section titled “EditorV0AddTextLevel”](#editorv0addtextlevel) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0AddTextLevel = "none" | "1" | "2" | "3"; ``` ### EditorV0AddTextRequest [Section titled “EditorV0AddTextRequest”](#editorv0addtextrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0AddTextRequest { paragraphIndex: number; level: EditorV0AddTextLevel; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0InsertDropCapResult [Section titled “EditorV0InsertDropCapResult”](#editorv0insertdropcapresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertDropCapResult { schema: "fastdoc.shell.editor-v0-insert-drop-cap-action.v1"; operationKind: "set-paragraph-drop-cap"; applied: boolean; documentPath: string | null; outputPath: string | null; paragraphIndex: number; dropCapKind: EditorV0InsertDropCapKind; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0AddTextResult [Section titled “EditorV0AddTextResult”](#editorv0addtextresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0AddTextResult { schema: "fastdoc.shell.editor-v0-add-text-action.v1"; operationKind: "set-toc-entry-level"; applied: boolean; documentPath: string | null; outputPath: string | null; paragraphIndex: number; level: EditorV0AddTextLevel; resultKind: string | null; writebackResultKind: string | null; writebackChangedPartCount: number | null; snapshot: unknown; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0ParagraphStructureRequest [Section titled “EditorV0ParagraphStructureRequest”](#editorv0paragraphstructurerequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphStructureRequest { operationKind: "insert-text" | "delete-text" | "split-paragraph" | "merge-with-next" | "insert-line-break" | "delete-line-break" | "replace-table-cell-range"; target?: EditorV0TableCellParagraphTextTarget | null; range?: { anchor: EditorV0TableCellTextRangeEndpoint; focus: EditorV0TableCellTextRangeEndpoint; } | null; paragraphIndex: number; offset?: number | null; insertText?: string | null; replacementText?: string | null; deleteCount?: number | null; sourcePath?: string | null; outputKind?: | "editor-v0-paragraph-split-merge" | "d37-table-cell-text-structure" | "editor-v0-paragraph-text-flow" | "editor-v0-paragraph-text-flow-commands" | "editor-v0-styled-paragraph-flow" | "editor-v0-styled-paragraph-merge-controls" | "editor-v0-styled-paragraph-text-after-merge" | "editor-v0-paragraph-boundary-insert" | "editor-v0-paragraph-boundary-delete-controls" | "editor-v0-user-paragraph-boundary-edit" | "editor-v0-user-paragraph-multiline-flow" | "doc-br-001-manual-line-break" | "editor-v0-styled-multiline-boundary-edit" | "editor-v0-styled-multiline-live-toolbar-state" | "editor-v0-styled-multiline-second-fixture" | "editor-v0-toolbar-format-commands-bounded" | "editor-v0-bold-shortcut-command" | "editor-v0-toolbar-format-commands-italic-blue" | "editor-v0-home-chr-tranche2-market" | "editor-v0-font-family-size-commands"; // …list truncated: first 20 shown, 248 values total outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0ParagraphStructureResult [Section titled “EditorV0ParagraphStructureResult”](#editorv0paragraphstructureresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphStructureResult { applied: boolean; outputPath: string; operationKind: "insert-text" | "delete-text" | "split-paragraph" | "merge-with-next" | "insert-line-break" | "delete-line-break" | "replace-table-cell-range"; paragraphIndex: number; offset: number | null; beforeTexts: string[]; afterTexts: string[]; paragraphCountDelta: number | null; undoDelta: unknown | null; undoDeltas?: unknown[]; finalTarget?: EditorV0TableCellParagraphTextTarget | null; finalOffset?: number | null; selectionSemantics?: string | null; selectedCellCount?: number | null; } ``` ### EditorV0ToolbarFormatCommandRequest [Section titled “EditorV0ToolbarFormatCommandRequest”](#editorv0toolbarformatcommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ToolbarFormatCommandRequest { commandKind: | "bold" | "italic" | "underline" | "underline-color" | "blue" | "highlight" | "strikethrough" | "double-strikethrough" | "subscript" | "superscript" | "font-family" | "font-size" | "text-case" | "all-caps" | "small-caps" | "hidden" | "text-effect" | "character-spacing" | "character-scale" | "character-position" | "kerning" | "character-style" | "proofing-language" | "run-direction" | "paragraph-direction" | "disable-proofing"; enabled: boolean; fontFamilyName?: string | null; fontSizeHalfPoints?: number | null; textCase?: "sentence" | "lowercase" | "uppercase" | "capitalize" | "toggle" | null; underlineStyle?: "single" | "double" | "dotted" | "dash" | "wave" | "thick" | null; fontColorRgb?: string | null; underlineColorRgb?: string | null; textHighlightColor?: string | null; characterSpacing?: "normal" | "expanded" | "condensed" | null; textEffect?: "none" | "outline" | "shadow" | "emboss" | "imprint" | null; characterScale?: "normal" | "80pct" | null; characterPosition?: "normal" | "raised-3pt" | "lowered-3pt" | null; kerning?: "none" | "12pt" | null; characterStyle?: "none" | "Emphasis" | "Strong" | "Hyperlink" | null; proofingLanguage?: "en-US" | "es-ES" | "ru-RU" | "ar-SA" | "he-IL" | "ja-JP" | "zh-CN" | "ko-KR" | null; textDirection?: "ltr" | "rtl" | null; disableProofing?: boolean | null; paragraphIndex: number; offset: number; rangeLength: number; expectedParagraphText?: string | null; outputKind?: | "editor-v0-toolbar-format-commands-bounded" | "editor-v0-toolbar-format-commands-italic-blue" | "editor-v0-home-chr-tranche2-market" | "editor-v0-user-text-format-command" | "editor-v0-font-family-size-commands" | "editor-v0-home-character-formatting-market" | "editor-v0-home-color-highlight-market" | "editor-v0-text-case-toolbar-command" | "editor-v0-text-effect-toolbar-command" | "editor-v0-underline-style-toolbar-command" | "editor-v0-font-dialog-font-market" | "editor-v0-font-dialog-advanced-market" | "editor-v0-highlight-toolbar-command" | "editor-v0-font-color-toolbar-command" | "editor-v0-format-toolbar-multi-command-chain" | "editor-v0-format-clear-command" | "editor-v0-format-clear-partial-selection" | "editor-v0-format-apply-partial-selection" | "editor-v0-mixed-format-selection-workflow" | "editor-v0-mixed-format-clear-or-paste-rules" | "editor-v0-selection-consumes-paragraph-granularity-format" | "editor-v0-user-created-multiparagraph-source-paste" | "editor-v0-cut-clear-paste-target-index-expansion" | "editor-v0-cut-clear-paste-target-toolbar-state" | "editor-v0-wide-target-keyboard-toolbar-state" | "editor-v0-keyboard-wide-target-action-chain" | "editor-v0-keyboard-wide-target-manual-ux" | "editor-v0-keyboard-wide-target-manual-commands-richer-content" | "editor-v0-wrap-aware-selection-commands" | "editor-v0-wrap-aware-selection-manual-commands-polish" | "editor-v0-wrap-aware-paragraph-editing" | "editor-v0-wrap-aware-paragraph-manual-ux" | "editor-v0-wrap-aware-paragraph-commands-polish" | "editor-v0-wrap-aware-paragraph-reflow-polish"; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0ToolbarFormatCommandResult [Section titled “EditorV0ToolbarFormatCommandResult”](#editorv0toolbarformatcommandresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ToolbarFormatCommandResult { applied: boolean; outputPath: string; commandKind: | "bold" | "italic" | "underline" | "underline-color" | "blue" | "highlight" | "strikethrough" | "double-strikethrough" | "subscript" | "superscript" | "font-family" | "font-size" | "text-case" | "all-caps" | "small-caps" | "hidden" | "text-effect" | "character-spacing" | "character-scale" | "character-position" | "kerning" | "character-style" | "proofing-language" | "run-direction" | "paragraph-direction" | "disable-proofing"; enabled: boolean; fontFamilyName?: string | null; fontSizeHalfPoints?: number | null; textCase?: "sentence" | "lowercase" | "uppercase" | "capitalize" | "toggle" | null; underlineStyle?: "single" | "double" | "dotted" | "dash" | "wave" | "thick" | null; fontColorRgb?: string | null; underlineColorRgb?: string | null; textHighlightColor?: string | null; characterSpacing?: "normal" | "expanded" | "condensed" | null; textEffect?: "none" | "outline" | "shadow" | "emboss" | "imprint" | null; characterScale?: "normal" | "80pct" | null; characterPosition?: "normal" | "raised-3pt" | "lowered-3pt" | null; kerning?: "none" | "12pt" | null; characterStyle?: "none" | "Emphasis" | "Strong" | "Hyperlink" | null; proofingLanguage?: "en-US" | "es-ES" | "ru-RU" | "ar-SA" | "he-IL" | "ja-JP" | "zh-CN" | "ko-KR" | null; textDirection?: "ltr" | "rtl" | null; disableProofing?: boolean | null; paragraphIndex: number; offset: number; rangeLength: number; beforeTexts: string[]; afterTexts: string[]; disabledReason?: "no-current-document" | "unsupported-document" | null; resultKind?: "applied" | "no-current-document" | "unsupported-document"; writebackResultKind?: "written" | "not-requested"; popupWarningShown?: false; shellCoordinateChange?: false; } ``` ### EditorV0ToolbarFormatBatchCommandRequest [Section titled “EditorV0ToolbarFormatBatchCommandRequest”](#editorv0toolbarformatbatchcommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ToolbarFormatBatchCommandRequest { commands: EditorV0ToolbarFormatCommandRequest[]; reopenAfterWrite?: boolean; } ``` ### EditorV0ToolbarFormatBatchCommandResult [Section titled “EditorV0ToolbarFormatBatchCommandResult”](#editorv0toolbarformatbatchcommandresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ToolbarFormatBatchCommandResult { applied: boolean; outputPath: string; commandKinds: EditorV0ToolbarFormatCommandRequest["commandKind"][]; commandCount: number; paragraphIndex: number; offset: number; rangeLength: number; beforeTexts: string[]; afterTexts: string[]; disabledReason?: "no-current-document" | "unsupported-document" | null; resultKind?: "applied" | "no-current-document" | "unsupported-document"; writebackResultKind?: "written" | "not-requested"; popupWarningShown?: false; shellCoordinateChange?: false; oneOkOneReopenBatchRoute: boolean; } ``` ### EditorV0ParagraphLayoutCommandRequest [Section titled “EditorV0ParagraphLayoutCommandRequest”](#editorv0paragraphlayoutcommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphLayoutCommandRequest { alignment: "left" | "center" | "right" | "both"; leftIndentTwips: number; firstLineIndentTwips?: number | null; rightIndentTwips?: number | null; tabStops?: Array<{ alignment: "left" | "center" | "right" | "decimal" | "bar"; positionTwips: number; leader?: "dot" | "hyphen" | "underscore" | "middleDot" | "heavy" | null; }>; spacingBeforeTwips?: number | null; spacingAfterTwips: number; lineSpacingTwips: number; setNumberingDecimalLevel0?: boolean; setNumberingBulletLevel0?: boolean; setNumberingMultilevelLevel1?: boolean; setNumberingRestartDecimalLevel0?: boolean; styleId?: "Heading1" | "Heading2" | "Heading3" | "Normal" | null; paragraphIndex: number; outputKind?: | "editor-v0-paragraph-layout-basics" | "editor-v0-style-heading1-toolbar-command" | "editor-v0-style-heading2-toolbar-command" | "editor-v0-style-heading3-toolbar-command" | "editor-v0-style-normal-card-action" | "editor-v0-quick-access-more-menu" | "editor-v0-quick-print-action" | "editor-v0-paragraph-alignment-toolbar-command" | "editor-v0-paragraph-indent-toolbar-command" | "editor-v0-paragraph-line-spacing-toolbar-command" | "editor-v0-paragraph-numbering-toolbar-command" | "editor-v0-paragraph-bullets-toolbar-command" | "editor-v0-paragraph-multilevel-toolbar-command" | "editor-v0-ruler-drag-writeback"; rulerDragRole?: "paragraph-left-indent" | "paragraph-hanging-indent" | "paragraph-first-line-indent" | "paragraph-right-indent" | "tab-stop" | null; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0ParagraphLayoutCommandResult [Section titled “EditorV0ParagraphLayoutCommandResult”](#editorv0paragraphlayoutcommandresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphLayoutCommandResult { applied: boolean; outputPath: string; bulkCommandCount?: number; alignment: "left" | "center" | "right" | "both"; leftIndentTwips: number; firstLineIndentTwips?: number | null; rightIndentTwips?: number | null; tabStops?: Array<{ alignment: "left" | "center" | "right" | "decimal" | "bar"; positionTwips: number; leader?: "dot" | "hyphen" | "underscore" | "middleDot" | "heavy" | null; }>; spacingBeforeTwips?: number | null; spacingAfterTwips: number; lineSpacingTwips: number; setNumberingDecimalLevel0?: boolean; setNumberingBulletLevel0?: boolean; setNumberingMultilevelLevel1?: boolean; setNumberingRestartDecimalLevel0?: boolean; styleId?: "Heading1" | "Heading2" | "Heading3" | "Normal" | null; paragraphIndex: number; beforeTexts: string[]; afterTexts: string[]; } ``` ### EditorV0UpdateStyleFromSelectionRequest [Section titled “EditorV0UpdateStyleFromSelectionRequest”](#editorv0updatestylefromselectionrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0UpdateStyleFromSelectionRequest { styleId: "FastDocWritingHeading"; styleName: "FastDoc Writing Heading"; paragraphIndexes: number[]; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0UpdateStyleFromSelectionResult [Section titled “EditorV0UpdateStyleFromSelectionResult”](#editorv0updatestylefromselectionresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0UpdateStyleFromSelectionResult { schema: "fastdoc.shell.editor-v0-update-style-from-selection-action.v1"; operationKind: "update-style-from-selection"; applied: boolean; documentPath: string; outputPath: string; styleId: "FastDocWritingHeading"; styleName: "FastDoc Writing Heading"; paragraphIndexes: number[]; beforeTexts: string[]; afterTexts: string[]; modifiedStylesXml: true; appliedParagraphStyleRefs: true; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; muscleMemoryParityClaim: false; } ``` ### EditorV0HomeCharacterFormat [Section titled “EditorV0HomeCharacterFormat”](#editorv0homecharacterformat) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0HomeCharacterFormat { bold: boolean; italic: boolean; underline: boolean; colorRgb: string | null; fontFamily: string | null; fontSizeHalfPoints: number | null; } ``` ### EditorV0HomeTabStop [Section titled “EditorV0HomeTabStop”](#editorv0hometabstop) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0HomeTabStop { positionTwips: number; alignment: "left" | "center" | "right" | "decimal" | "bar" | "num" | "clear"; leader: "none" | "dot" | "hyphen" | "underscore" | "heavy" | "middle-dot"; } ``` ### EditorV0HomeParagraphFormat [Section titled “EditorV0HomeParagraphFormat”](#editorv0homeparagraphformat) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0HomeParagraphFormat { alignment: "left" | "center" | "right" | "both" | "distribute"; leftIndentTwips: number; rightIndentTwips: number; specialIndent: "none" | "first-line" | "hanging"; specialIndentTwips: number; spacingBeforeTwips: number; spacingAfterTwips: number; lineSpacingMode: "single" | "one-and-half" | "double" | "multiple" | "exact" | "at-least"; lineSpacingValue: number; outlineLevel: number | null; collapsedByDefault: boolean; mirrorIndents: boolean; adjustRightIndentToGrid: boolean; contextualSpacing: boolean; snapToGrid: boolean; keepWithNext: boolean; keepLinesTogether: boolean; widowControl: boolean; pageBreakBefore: boolean; suppressLineNumbers: boolean; suppressAutoHyphens: boolean; textboxTightWrap: "none" | "allLines" | "firstAndLastLine" | "firstLineOnly" | "lastLineOnly"; kinsoku: boolean; allowEnglishMidWordWrap: boolean; overflowPunctuation: boolean; topLinePunctuation: boolean; autoSpaceEastAsianLatin: boolean; autoSpaceEastAsianNumbers: boolean; textAlignment: "auto" | "top" | "center" | "baseline" | "bottom"; tabStops: EditorV0HomeTabStop[]; } ``` ### EditorV0HomeStyleFormat [Section titled “EditorV0HomeStyleFormat”](#editorv0homestyleformat) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0HomeStyleFormat { paragraph: EditorV0HomeParagraphFormat; character: EditorV0HomeCharacterFormat; } ``` ### EditorV0HomeStyleDefinition [Section titled “EditorV0HomeStyleDefinition”](#editorv0homestyledefinition) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0HomeStyleDefinition { styleId: string; name: string; styleType: string; basedOn: string | null; nextStyle: string | null; custom: boolean; builtIn: boolean; isDefault: boolean; format: EditorV0HomeStyleFormat; } ``` ### EditorV0HomeParagraphState [Section titled “EditorV0HomeParagraphState”](#editorv0homeparagraphstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0HomeParagraphState { paragraphIndex: number; text: string; styleId: string; hasNumbering: boolean; format: EditorV0HomeParagraphFormat; } ``` ### EditorV0HomeFormattingSnapshot [Section titled “EditorV0HomeFormattingSnapshot”](#editorv0homeformattingsnapshot) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0HomeFormattingSnapshot { schema: "fastdoc.home-formatting-state.v1"; defaultTabStopTwips: number; styles: EditorV0HomeStyleDefinition[]; paragraphs: EditorV0HomeParagraphState[]; } ``` ### EditorV0HomeFormattingOperation [Section titled “EditorV0HomeFormattingOperation”](#editorv0homeformattingoperation) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0HomeFormattingOperation = { kind: "createStyle"; styleId: string; name: string; basedOn: string; nextStyle: string; sourceParagraphIndex: number; paragraphIndexes: number[]; } | { kind: "modifyStyle"; styleId: string; name: string; basedOn: string; nextStyle: string; format: EditorV0HomeStyleFormat; } | { kind: "updateStyleFromSelection"; styleId: string; sourceParagraphIndex: number; } | { kind: "renameStyle"; styleId: string; newName: string; } | { kind: "deleteStyle"; styleId: string; fallbackStyleId: string | null; } | { kind: "applyStyle"; styleId: string; paragraphIndexes: number[]; } | { kind: "formatParagraphs"; paragraphIndexes: number[]; format: EditorV0HomeParagraphFormat; } | { kind: "setDefaultTabStop"; defaultTabStopTwips: number; } | { kind: "clearParagraphFormatting"; paragraphIndexes: number[]; }; ``` ### EditorV0HomeFormattingRequest [Section titled “EditorV0HomeFormattingRequest”](#editorv0homeformattingrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0HomeFormattingRequest { operations: EditorV0HomeFormattingOperation[]; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0HomeFormattingResult [Section titled “EditorV0HomeFormattingResult”](#editorv0homeformattingresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0HomeFormattingResult { schema: "fastdoc.shell.home-formatting.v1"; applied: true; documentPath: string; outputPath: string; operationCount: number; resultKind: "applied"; writebackResultKind: "written"; changedParts: string[]; sourceUnchanged: true; state: EditorV0HomeFormattingSnapshot; } ``` ### EditorV0ParagraphLayoutBatchCommandRequest [Section titled “EditorV0ParagraphLayoutBatchCommandRequest”](#editorv0paragraphlayoutbatchcommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphLayoutBatchCommandRequest { commands: EditorV0ParagraphLayoutCommandRequest[]; reopenAfterWrite?: boolean; } ``` ### EditorV0ParagraphLayoutBatchCommandResult [Section titled “EditorV0ParagraphLayoutBatchCommandResult”](#editorv0paragraphlayoutbatchcommandresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphLayoutBatchCommandResult { applied: boolean; outputPath: string; paragraphIndexes: number[]; commandCount: number; beforeTexts: string[]; afterTexts: string[]; } ``` ### EditorV0ParagraphFillCommandRequest [Section titled “EditorV0ParagraphFillCommandRequest”](#editorv0paragraphfillcommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphFillCommandRequest { paragraphIndex: number; fillColorRgb: string; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0ParagraphFillCommandResult [Section titled “EditorV0ParagraphFillCommandResult”](#editorv0paragraphfillcommandresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphFillCommandResult { applied: boolean; outputPath: string; fillColorRgb: string; paragraphIndex: number; beforeTexts: string[]; afterTexts: string[]; } ``` ### EditorV0ParagraphBorderCommandRequest [Section titled “EditorV0ParagraphBorderCommandRequest”](#editorv0paragraphbordercommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphBorderCommandRequest { paragraphIndex: number; borderColorRgb: string; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0ParagraphBorderCommandResult [Section titled “EditorV0ParagraphBorderCommandResult”](#editorv0paragraphbordercommandresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphBorderCommandResult { applied: boolean; outputPath: string; borderColorRgb: string; paragraphIndex: number; beforeTexts: string[]; afterTexts: string[]; } ``` ### EditorV0ParagraphSortCommandRequest [Section titled “EditorV0ParagraphSortCommandRequest”](#editorv0paragraphsortcommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphSortCommandRequest { startParagraphIndex: number; paragraphCount: number; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0ParagraphSortCommandResult [Section titled “EditorV0ParagraphSortCommandResult”](#editorv0paragraphsortcommandresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphSortCommandResult { applied: boolean; outputPath: string; startParagraphIndex: number; paragraphCount: number; beforeTexts: string[]; sortedTexts: string[]; afterTexts: string[]; resultKind: "applied" | "already-sorted" | "invalid-range"; writebackResultKind: "written" | "not-requested"; } ``` ### BoundedLiveTextInsertResult [Section titled “BoundedLiveTextInsertResult”](#boundedlivetextinsertresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface BoundedLiveTextInsertResult { applied: boolean; versionHistoryOwnership?: SaveAsOwnershipCommitReceipt; outputPath: string; paragraphIndex: number; insertedText: string; deletedCount?: number; nextCaretSlotIndex: number; beforeText: string | null; afterText: string | null; afterTexts?: string[] | null; canonicalOwnerAfter?: { documentId: string; sessionId: string; acceptedRevision: number; selectionRevision: number; }; persistentReceipt?: AcceptedEditTerminal; persistentCheckpoint?: { schema: "fastdoc.persistent-save-checkpoint-receipt.v1"; sessionId: string; documentId: string; requestId: string; acceptedRevision: number; publishedRevision: number; publishedModelHash: string; targetHashBefore: string | null; targetHash: string; targetIdentity: PublishedTargetIdentity; terminalResult: "published" | "unchanged"; physicalDocxWrites: 0 | 1; versionHistoryOwnership: SaveAsOwnershipCommitReceipt | null; }; inheritedStyle: { fontFamilyName: string | null; fontSizeHalfPoints: number | null; fontBold: boolean | null; fontItalic: boolean | null; fontColorRgb: string | null; fontUnderline: string | null; }; } ``` ### BoundedLiveTextMutationResult [Section titled “BoundedLiveTextMutationResult”](#boundedlivetextmutationresult) `TypeAliasDeclaration` · `api-edit.ts` ```ts type BoundedLiveTextMutationResult = Omit & { afterText: string; }; ``` ### EditorV0EditingReplaceFirstRequest [Section titled “EditorV0EditingReplaceFirstRequest”](#editorv0editingreplacefirstrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0EditingReplaceFirstRequest { paragraphIndex: number; findText: string; replaceText: string; offset?: number | null; deleteCount?: number | null; matchedText?: string | null; matchCountBefore?: number | null; matchCase?: boolean; wholeWord?: boolean; storyAware?: boolean; sourceStory?: "body" | "table" | "header" | "footer" | "footnote" | "endnote" | "comment"; sourcePartName?: string | null; sourcePartMatchIndex?: number | null; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0EditingReplaceFirstResult [Section titled “EditorV0EditingReplaceFirstResult”](#editorv0editingreplacefirstresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0EditingReplaceFirstResult { schema: "fastdoc.shell.editor-v0-editing-replace-first-command.v1"; applied: boolean; outputPath: string; paragraphIndex: number; findText: string; replaceText: string; beforeTexts: string[]; afterTexts: string[]; resultKind: "applied" | "not-found" | "unsupported-document" | "no-current-document" | "blocked-protected"; writebackResultKind: "written" | "not-requested" | "blocked"; matchCountBefore: number; matchCountAfter: number; offset?: number | null; deleteCount?: number | null; matchedText?: string | null; matchCase?: boolean; wholeWord?: boolean; operationKind?: string; deleteResultKind?: string | null; insertResultKind?: string | null; reopenedDocumentPath: string | null; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; } ``` ### EditorV0EditingReplaceAllRequest [Section titled “EditorV0EditingReplaceAllRequest”](#editorv0editingreplaceallrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0EditingReplaceAllRequest { findText: string; replaceText: string; matchCountBefore?: number | null; matchCase?: boolean; wholeWord?: boolean; storyAware?: boolean; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0EditingReplaceAllSemanticRange [Section titled “EditorV0EditingReplaceAllSemanticRange”](#editorv0editingreplaceallsemanticrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0EditingReplaceAllSemanticRange { offset: number; deleteCount: number; matchedText: string; } ``` ### EditorV0EditingReplaceAllParagraphResult [Section titled “EditorV0EditingReplaceAllParagraphResult”](#editorv0editingreplaceallparagraphresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0EditingReplaceAllParagraphResult { paragraphIndex: number; matchCountBefore: number; remainingFindMatchCount: number; replacementMatchCountAfter: number; beforeText: string; afterText: string; resultKind: string; writebackResultKind: string; normalizationDetail: string | null; operationKind?: string; rangeCount?: number; ranges?: EditorV0EditingReplaceAllSemanticRange[]; } ``` ### EditorV0EditingReplaceAllResult [Section titled “EditorV0EditingReplaceAllResult”](#editorv0editingreplaceallresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0EditingReplaceAllResult { schema: "fastdoc.shell.editor-v0-editing-replace-all-command.v1"; applied: boolean; outputPath: string; paragraphIndexes: number[]; findText: string; replaceText: string; beforeTexts: string[]; afterTexts: string[]; resultKind: "applied" | "not-found" | "unsupported-document" | "no-current-document" | "blocked-protected"; writebackResultKind: "written" | "not-requested" | "blocked"; matchCountBefore: number; matchCountAfter: number; remainingFindMatchCount: number; replacementMatchCountAfter: number; paragraphResults: EditorV0EditingReplaceAllParagraphResult[]; matchCase?: boolean; wholeWord?: boolean; operationKind?: string; rangeCount?: number; rangeWritebackStepCount?: number; rangeStepResultKinds?: string[]; reopenedDocumentPath: string | null; popupWarningShown: false; technicalPanelAdded: false; wordParityClaim: false; pixelParityClaim: false; } ``` # Events between the application and the editor > The full list: seven events from the application to the editor and eleven back, plus six that appeared after the document — each with its signature and channel name. Internal API The events below travel inside the desktop SumDoc window, between its shell and the editor. They don’t exist in the browser, in your `iframe`, or in someone else’s shell: for embedding, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). ## From the application to the editor — 7 events [Section titled “From the application to the editor — 7 events”](#from-the-application-to-the-editor--7-events) ### onDocumentSessionSnapshot [Section titled “onDocumentSessionSnapshot”](#ondocumentsessionsnapshot) ```ts onDocumentSessionSnapshot(callback: (snapshot: ShellDocumentSessionSnapshot) => void): () => void ``` Channel: `fastdoc-shell:document-session-snapshot` ### onMenuCommand [Section titled “onMenuCommand”](#onmenucommand) ```ts onMenuCommand(callback: (command: MenuCommand) => void): () => void ``` Channel: `fastdoc-shell:menu-command` ### onSaveBeforeClose [Section titled “onSaveBeforeClose”](#onsavebeforeclose) ```ts onSaveBeforeClose(callback: () => void): () => void ``` Channel: `fastdoc-shell:save-before-close` ### onSaveBeforeCloseFailed [Section titled “onSaveBeforeCloseFailed”](#onsavebeforeclosefailed) ```ts onSaveBeforeCloseFailed(callback: (payload: { message: string }) => void): () => void ``` Channel: `fastdoc-shell:save-before-close-failed` ### onSaveBeforeDocumentSwitch [Section titled “onSaveBeforeDocumentSwitch”](#onsavebeforedocumentswitch) ```ts onSaveBeforeDocumentSwitch(callback: (request: { requestId: number }) => void): () => void ``` Channel: `fastdoc-shell:save-before-document-switch` ### onStateChanged [Section titled “onStateChanged”](#onstatechanged) ```ts onStateChanged(callback: (state: ShellBridgeState) => void): () => void ``` Channel: `fastdoc-shell:state-changed` ### onSystemPaste [Section titled “onSystemPaste”](#onsystempaste) ```ts onSystemPaste(callback: (payload: SystemPastePayload) => void): () => void ``` Channel: `fastdoc-shell:system-paste` ## From the editor to the application — 11 events [Section titled “From the editor to the application — 11 events”](#from-the-editor-to-the-application--11-events) ### completeSaveBeforeClose [Section titled “completeSaveBeforeClose”](#completesavebeforeclose) ```ts completeSaveBeforeClose(payload: { saved: boolean; message?: string | null }): void ``` Channel: `fastdoc-shell:save-before-close-result` ### completeSaveBeforeDocumentSwitch [Section titled “completeSaveBeforeDocumentSwitch”](#completesavebeforedocumentswitch) ```ts completeSaveBeforeDocumentSwitch(result: { requestId: number; saved: boolean; savedPath: string | null; errorMessage: string | null; }): void ``` Channel: `fastdoc-shell:document-switch-save-result` ### notifyCanonicalEditDropped [Section titled “notifyCanonicalEditDropped”](#notifycanonicaleditdropped) ```ts notifyCanonicalEditDropped(payload: { code: string; requestId: string; commandType: string; }): void ``` Channel: `fastdoc-shell:canonical-edit-dropped` ### notifyCurrentDocumentTruthViewerReady [Section titled “notifyCurrentDocumentTruthViewerReady”](#notifycurrentdocumenttruthviewerready) ```ts notifyCurrentDocumentTruthViewerReady(payload: { availability: string; fixtureId: string | null; blockedStatesVisible: boolean; forbiddenClaimsVisible: boolean; unavailableStateVisible: boolean; genericFixtureListVisible: boolean; }): void ``` Channel: `fastdoc-shell:current-document-truth-viewer-ready` ### notifyDocumentRendered [Section titled “notifyDocumentRendered”](#notifydocumentrendered) ```ts notifyDocumentRendered(renderedPath: string | null): void ``` Channel: `fastdoc-shell:document-rendered` ### notifyEditKeyDropped [Section titled “notifyEditKeyDropped”](#notifyeditkeydropped) ```ts notifyEditKeyDropped(payload: { code: string; inputType: string; selectionShape: string; inputRoute: string; contextRefusal: string; pressIndex: number; }): void ``` Channel: `fastdoc-shell:edit-key-dropped` ### notifyPageHydrationDropped [Section titled “notifyPageHydrationDropped”](#notifypagehydrationdropped) ```ts notifyPageHydrationDropped(payload: { code: string; stage: string }): void ``` Channel: `fastdoc-shell:page-hydration-dropped` ### notifyPersistentSaveRefused [Section titled “notifyPersistentSaveRefused”](#notifypersistentsaverefused) ```ts notifyPersistentSaveRefused(payload: { code: string; requestId: string; saveAs: boolean; }): void ``` Channel: `fastdoc-shell:persistent-save-refused` ### notifyRendererReady [Section titled “notifyRendererReady”](#notifyrendererready) ```ts notifyRendererReady(): void ``` Channel: `fastdoc-shell:renderer-ready` ### notifySmokeCheckpoint [Section titled “notifySmokeCheckpoint”](#notifysmokecheckpoint) ```ts notifySmokeCheckpoint(checkpoint: string, payload?: { screenshotDataUrl?: string | null; screenshots?: Array<{ name?: string | null; dataUrl?: string | null }>; telemetry?: unknown; reserveCyclesCompleted?: number; reserveElapsedMs?: number; reserveRichPayloadBytes?: number; }): void ``` Channel: `fastdoc-shell:smoke-checkpoint` ### notifyUnsavedState [Section titled “notifyUnsavedState”](#notifyunsavedstate) ```ts notifyUnsavedState(hasUnsavedChanges: boolean): void ``` Channel: `fastdoc-shell:unsaved-state` Subscription lifecycle. Every `on*` method returns an unsubscribe function — call it when you remove the component or close the window, or the handlers will keep hanging around. ## Appeared after the document — 6 events [Section titled “Appeared after the document — 6 events”](#appeared-after-the-document--6-events) These channels are declared in the contract and in the desktop SumDoc `preload`, but didn’t make it into the document this reference is built from. Three go from the application to the editor, three go back. ### onCanonicalSceneRefreshed [Section titled “onCanonicalSceneRefreshed”](#oncanonicalscenerefreshed) ```ts onCanonicalSceneRefreshed(callback: (event: ShellCanonicalSceneRefreshed) => void): () => void ``` Channel: `fastdoc-shell:canonical-scene-refreshed` — the scene changed for a reason other than this person’s action: a peer’s edit or a deferred read of projections. ### onDocumentPatch [Section titled “onDocumentPatch”](#ondocumentpatch) ```ts onDocumentPatch(callback: (patch: ShellDocumentPatch) => void): () => void ``` Channel: `fastdoc-shell:document-patch` — a delta frame for a peer’s edit instead of the whole state. ### onProbeUnsavedState [Section titled “onProbeUnsavedState”](#onprobeunsavedstate) ```ts onProbeUnsavedState(callback: (request: { requestId: number }) => void): () => void ``` Channel: `fastdoc-shell:probe-unsaved-state` — the application asks whether there is anything unsaved. ### declareRendererCapabilities [Section titled “declareRendererCapabilities”](#declarerenderercapabilities) ```ts declareRendererCapabilities(capabilities: ShellRendererCapabilities): void ``` Channel: `fastdoc-shell:renderer-capabilities` — what the page can accept; declared before `notifyRendererReady`. ### notifyDocumentPatchOutcome [Section titled “notifyDocumentPatchOutcome”](#notifydocumentpatchoutcome) ```ts notifyDocumentPatchOutcome(outcome: ShellDocumentPatchOutcome): void ``` Channel: `fastdoc-shell:document-patch-outcome` — whether the page applied the delta frame, and why not. ### completeUnsavedStateProbe [Section titled “completeUnsavedStateProbe”](#completeunsavedstateprobe) ```ts completeUnsavedStateProbe(result: { requestId: number; unsaved: boolean }): void ``` Channel: `fastdoc-shell:unsaved-state-probe-result` — the reply to the unsaved-state probe, by `requestId`. # SumDoc reference > The full SumDoc API specification: the session protocol (41 commands), the Browser Surface API, window.fastdocShell (321 methods), events between the application and the editor, and the type catalog (487 types). If this is your first time here The reference answers “what is it called and what does it accept”, not “where do I start”. The full workflow is shown in the [quick start](/sumdoc/quickstart/): starting the processor, opening a DOCX file, editing with a command, saving, and checking the result. The request and response format is covered in [Request and response objects](/sumdoc/envelope/), embedding the ready-made surface in [Embedding the surface](/sumdoc/embedding/), and if something isn’t working, in [diagnostics](/sumdoc/diagnostics/). Term definitions are in the [glossary](/start/glossary/), and the session rules common to all commands are in [SumDoc session and conventions](/reference/sumdoc/conventions/). This section is a machine-verified reference for SumDoc’s external API. It describes four independent surfaces: | Surface | What it is | Pages | | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Rust Session Protocol** | 41 commands of the document session: exchanging JSON lines over standard input/output or over WebSocket on the local interface. The main path for external integration. | [Transport](/reference/sumdoc/transport/), [Session commands](/reference/sumdoc/session-protocol/), [Typed editing types](/reference/sumdoc/typed-dto/) | | **Browser Surface API** | Embedding the ready-made editor surface and the events it sends to your application. | [Browser surface interface](/reference/sumdoc/surface-api/) | | **window\.fastdocShell** | 321 methods inside the desktop SumDoc window. An internal contract, not a public interface. | [document](/reference/sumdoc/shell-document/) … [other methods](/reference/sumdoc/shell-current-api/) | | **Type catalog** | 487 internal contract types and 31 generated session types. | [api-document.ts](/reference/sumdoc/dto-api-document/) … [Session types](/reference/sumdoc/session-types/) | What’s in the type catalog, and what isn’t The catalog holds data types: what a request consists of, what comes back in the response, how state is described. Twenty-two contract types were deliberately left out — they describe not data but the bus itself: the list of domains (`ShellContractDomain`), exchange directions (`BridgeDirection`), capability groups (`ShellCapability`), the channel registry, and one composite type per domain (`DocumentBridgeContract` and its siblings). They matter to whoever rebuilds the shell itself, and are useless to whoever builds a request. They live in the same place, in `shell-contract`, next to the data types. How to choose the right API For embedding in someone else’s product, use the **Rust Session Protocol** or the **Browser Surface API**. `window.fastdocShell` is the desktop application’s internal contract. It isn’t a public interface and doesn’t carry over into someone else’s shell. ## What the reference consists of [Section titled “What the reference consists of”](#what-the-reference-consists-of) *Session protocol · surface interface · internal window objects · events · types* | Metric | Value | | --------------------- | ---------------------------------------------------------------------------------------- | | Rust Session Protocol | 41 commands · fastdoc.session-protocol-descriptor.v1 | | `window.fastdocShell` | 321 methods / 323 signatures | | Types | 487 internal contract types and 31 generated session types | | Reference status | First-version draft: names and contents may be refined before the public interface ships | # Rust Session Protocol — 41 commands > The full list of document session commands: the parameters, preconditions, and result of each command — 41 in total. For `mutate`, envelope success isn’t yet an edit The response to `mutate` comes back with `ok: true` even when the core didn’t accept the edit. The real outcome is in `result.mutation.result_kind`, and only the value `applied` means the document changed. The other four — `invalid-request`, `invalid-target`, `not-found`, and `deferred` — mean it didn’t, each for its own reason. Checking for equality with `applied` is more reliable than enumerating refusals: [how to read a response](/sumdoc/envelope/). Undo history limits History isn’t infinite. When the number of steps exceeds the limit, or snapshots no longer fit in the allotted memory, the oldest ones are evicted — one step back always stays available. Undoing past the evicted point simply won’t restore the document, and that’s not an error. | Limit | Value | | --------------------------- | ------ | | steps in the undo history | 2 048 | | memory for the undo history | 256 MB | | ::: | | Checkpoints and outside changes to the file `save-checkpoint` has something plain `save` doesn’t: `target` carries `expected_hash` — the file’s state as your application last saw it. Before publishing, the core checks the file against this state and refuses if it was changed from outside in the meantime: by another program, a second session, or sync. The refusal comes before the write, so no outside edit gets overwritten. The text of such refusals starts with `external modification`. On receiving one, don’t overwrite the document blindly: the file on disk is newer than the one you started from, and the decision belongs to a person or to your application’s own rules. Values you can’t guess from the type | Field | Commands | What it accepts | | ---------------------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `tracked_change_markup_mode` | `print`, `print-delta` | `in-line` — changes are shown inline in the text, the default value; `balloon` — as margin callouts. The mode applies to how the scene is displayed, not to the document itself. | | `page_indexes` | `print-window` | The numbers of the pages whose scenes to build. Numbering starts at zero. Without the field, the window is empty — the core doesn’t reject such a request. | | `defer_raster_bytes` | `print-window` | Don’t embed raster bytes in the response, leaving their identifiers and geometry — for the first display of the document. | | `soft_page_cursor` | `print-window` | An opaque cursor issued by the core — for the next window of soft pages. | | `co_editing` | `apply-text-transaction` | Editing during co-editing: undo and redo without a command for peers refuse before acceptance. | | `rebase_package_baseline` | `save` | Accept the current projection as the baseline of the session package without publishing the file. | | `include_page_stack` | `print-window` | Add page geometry and brief navigation data to the response. Needed when the document is first opened. | | `known_fingerprints` | `print-delta` | Scene fingerprints the client already has, by page number. The core returns only what changed. | | `id` | all | A request tag chosen by the client. Returned unchanged — it’s what matches the response to the request. | | ::: | | | | cmd | mut. | params | precondition | result | | -------------------------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | apply-composition | yes | request: JSON (required) | open | CompositionReceipt | | apply-text-transaction | yes | request: JSON (required); co\_editing: boolean (optional, default false) | open | AcceptedEditTerminal { dirty, receipt, model\_delta, model\_projection\_patch, owner\_state, typing\_attributes } | | commit-snapshot | yes | document\_id: string (required); path: string (required); transaction\_order: integer (required); transition\_kind: string (required) | open | a deprecated commit-and-history receipt | | commit-structural-snapshot | yes | path: string (required); request: JSON (required) | open | the result of a structural edit, with a receipt | | compatibility-inspect | no | — | open | fastdoc.docx-compatibility-command.v1 | | compose | no | — | open | ParagraphCompositionSnapshot\[] | | model | no | — | open | CanonicalDocument | | mutate | yes | after\_caret\_slot\_index: integer or null (optional); before\_caret\_slot\_index: integer or null (optional); before\_selection\_end\_slot\_index: integer or null (optional); before\_selection\_start\_slot\_index: integer or null (optional); delete\_count: integer (optional, default 0); document\_id: string or null (optional); offset: integer (optional, default 0); operation\_kind: string (required); paragraph\_index: integer (required); revision\_author: string or null (optional); revision\_date: string or null (optional); revision\_date\_utc: string or null (optional); text: string or null (optional); transaction\_order: integer (optional, default 0); transition\_kind: string or null (optional) | open | { mutation: BodyTextMutationSnapshot, mutation\_count, history } | | open | yes | document\_id: string or null (optional); path: string (required) | no | { opened, byte\_count, digital\_signature\_present, session\_id, document\_id, revision, accepted\_revision, dirty, history, open\_stage\_timings\_ms } | | paginate | no | — | open | PaginationSnapshot | | ping | no | — | no | { pong: true } | | print | no | tracked\_change\_markup\_mode: string or null (optional) | open | PrintParitySnapshot | | print-delta | no | known\_fingerprints: JSON array (optional); tracked\_change\_markup\_mode: string or null (optional) | open | snapshot details, `changed_pages[]`, and `unchanged_page_indexes[]` | | print-summary | no | — | open | { page\_count, line\_item\_count, scene\_fingerprints\[] } | | print-window | no | include\_page\_stack: boolean (optional); page\_indexes: JSON array (optional, default empty); defer\_raster\_bytes: boolean (optional); soft\_page\_cursor: JSON (optional) | open | the print window and the built pages; on request, `page_stack` and the window model | | redo | yes | document\_id: string or null (optional); transaction\_order: integer (optional, default 0) | open | history, the transition, `redone=true`, and a receipt | | report | no | — | open | SupportReport | | review | no | — | open | ReviewSnapshot | | save | yes | path: string or null (optional); rebase\_package\_baseline: boolean (optional) | open | { saved, saved\_document\_itself?, byte\_count, history\_preserved, history } | | save-checkpoint | yes | expected\_revision: integer (required); request\_id: string (required); session\_id: string (required); target: JSON (required) | open | fastdoc.persistent-save-checkpoint-receipt.v1 | | set-selection | yes | request: JSON (required) | open | SelectionUpdateReceipt | | shutdown | yes | — | no | { id, ok:true, shutdown:true } | | simple-field-inventory | no | — | open | SimpleFieldInventorySnapshot | | squash-history | yes | base\_undo\_depth: integer (required); document\_id: string (required); transition\_kind: string or null (optional) | open | history state | | status | no | — | open | session state: path, cache, history, revision, the unsaved flag, and the model hash | | style | no | — | open | StyleSnapshot | | track-revisions-state | no | — | open | TrackRevisionsStateSnapshot | | undo | yes | document\_id: string or null (optional); transaction\_order: integer (optional, default 0) | open | history, the transition, `undone=true`, and a receipt | ## apply-composition [Section titled “apply-composition”](#apply-composition) Parameters: request: JSON (required) Result: CompositionReceipt ```json { "id": "req-1", "cmd": "apply-composition", "request": { "...": "edit types — see “Typed editing types”" } } ``` Concurrent access. `expected_revision` and `expected_selection_revision` are required: a request sent from a stale state is rejected. ## apply-text-transaction [Section titled “apply-text-transaction”](#apply-text-transaction) Parameters: request: JSON (required); co\_editing: boolean (optional, default false) Result: AcceptedEditTerminal { dirty, receipt, model\_delta, model\_projection\_patch, owner\_state, typing\_attributes } ```json { "id": "req-1", "cmd": "apply-text-transaction", "request": { "...": "edit types — see “Typed editing types”" } } ``` Concurrent access. `expected_revision` and `expected_selection_revision` are required: a request sent from a stale state is rejected. ## commit-snapshot [Section titled “commit-snapshot”](#commit-snapshot) Parameters: document\_id: string (required); path: string (required); transaction\_order: integer (required); transition\_kind: string (required) Result: a deprecated commit-and-history receipt ```json { "id": "req-1", "cmd": "commit-snapshot", "document_id": "document_id-1", "path": "/absolute/document.docx", "transaction_order": 1, "transition_kind": "transition_kind-1" } ``` ## commit-structural-snapshot [Section titled “commit-structural-snapshot”](#commit-structural-snapshot) Parameters: path: string (required); request: JSON (required) Result: the result of a structural edit, with a receipt ```json { "id": "req-1", "cmd": "commit-structural-snapshot", "path": "/absolute/document.docx", "request": { "...": "edit types — see “Typed editing types”" } } ``` ## compatibility-inspect [Section titled “compatibility-inspect”](#compatibility-inspect) Parameters: — Result: fastdoc.docx-compatibility-command.v1 ```json { "id": "req-1", "cmd": "compatibility-inspect" } ``` ## compose [Section titled “compose”](#compose) Parameters: — Result: ParagraphCompositionSnapshot\[] ```json { "id": "req-1", "cmd": "compose" } ``` ## model [Section titled “model”](#model) Parameters: — Result: CanonicalDocument ```json { "id": "req-1", "cmd": "model" } ``` ## mutate [Section titled “mutate”](#mutate) Parameters: after\_caret\_slot\_index: integer or null (optional); before\_caret\_slot\_index: integer or null (optional); before\_selection\_end\_slot\_index: integer or null (optional); before\_selection\_start\_slot\_index: integer or null (optional); delete\_count: integer (optional, default 0); document\_id: string or null (optional); offset: integer (optional, default 0); operation\_kind: string (required); paragraph\_index: integer (required); revision\_author: string or null (optional); revision\_date: string or null (optional); revision\_date\_utc: string or null (optional); text: string or null (optional); transaction\_order: integer (optional, default 0); transition\_kind: string or null (optional) Result: { mutation: BodyTextMutationSnapshot, mutation\_count, history } ```json { "id": "req-1", "cmd": "mutate", "operation_kind": "insert-text", "paragraph_index": 0 } ``` Units. For `mutate`, `offset` and `delete_count` are counted in characters (Unicode scalar values) — not bytes and not UTF-16 units. In JavaScript, that’s what `Array.from(text).length` gives you; the familiar `string.length` returns a different number, because it counts UTF-16 units. Typed editing uses different units The second editing path — [typed transactions](/reference/sumdoc/typed-dto/) — measures positions in UTF-16 units instead, the same way `string.length` does. For Latin and Cyrillic text the numbers match; for emoji and rare CJK characters they don’t: one such character is 1 for `mutate` and 2 for typed editing. When you switch from one path to the other, recalculate the offsets. ## open [Section titled “open”](#open) Parameters: document\_id: string or null (optional); path: string (required) Result: { opened, byte\_count, digital\_signature\_present, session\_id, document\_id, revision, accepted\_revision, dirty, history, open\_stage\_timings\_ms } ```json { "id": "req-1", "cmd": "open", "path": "/absolute/document.docx" } ``` ## paginate [Section titled “paginate”](#paginate) Parameters: — Result: PaginationSnapshot ```json { "id": "req-1", "cmd": "paginate" } ``` ## ping [Section titled “ping”](#ping) Parameters: — Result: { pong: true } ```json { "id": "req-1", "cmd": "ping" } ``` ## print [Section titled “print”](#print) Parameters: tracked\_change\_markup\_mode: string or null (optional) Result: PrintParitySnapshot ```json { "id": "req-1", "cmd": "print" } ``` ## print-delta [Section titled “print-delta”](#print-delta) Parameters: known\_fingerprints: JSON array (optional); tracked\_change\_markup\_mode: string or null (optional) Result: snapshot details, `changed_pages[]`, and `unchanged_page_indexes[]` ```json { "id": "req-1", "cmd": "print-delta" } ``` ## print-summary [Section titled “print-summary”](#print-summary) Parameters: — Result: { page\_count, line\_item\_count, scene\_fingerprints\[] } ```json { "id": "req-1", "cmd": "print-summary" } ``` ## print-window [Section titled “print-window”](#print-window) Parameters: include\_page\_stack: boolean (optional); page\_indexes: JSON array (optional, default empty); defer\_raster\_bytes: boolean (optional); soft\_page\_cursor: JSON (optional) Result: the print window and the built pages; on request, `page_stack` and the window model ```json { "id": "req-1", "cmd": "print-window", "page_indexes": [ 0 ] } ``` ## redo [Section titled “redo”](#redo) Parameters: document\_id: string or null (optional); transaction\_order: integer (optional, default 0) Result: history, the transition, `redone=true`, and a receipt ```json { "id": "req-1", "cmd": "redo" } ``` ## report [Section titled “report”](#report) Parameters: — Result: SupportReport ```json { "id": "req-1", "cmd": "report" } ``` ## review [Section titled “review”](#review) Parameters: — Result: ReviewSnapshot ```json { "id": "req-1", "cmd": "review" } ``` ## save [Section titled “save”](#save) Parameters: path: string or null (optional); rebase\_package\_baseline: boolean (optional) Result: { saved, saved\_document\_itself?, byte\_count, history\_preserved, history } ```json { "id": "req-1", "cmd": "save" } ``` ## save-checkpoint [Section titled “save-checkpoint”](#save-checkpoint) Parameters: expected\_revision: integer (required); request\_id: string (required); session\_id: string (required); target: JSON (required) Result: fastdoc.persistent-save-checkpoint-receipt.v1 ```json { "id": "req-1", "cmd": "save-checkpoint", "expected_revision": 1, "request_id": "request_id-1", "session_id": "session_id-1", "target": { "path": "/absolute/document.docx", "expected_hash": "sha256:..." } } ``` ## set-selection [Section titled “set-selection”](#set-selection) Parameters: request: JSON (required) Result: SelectionUpdateReceipt ```json { "id": "req-1", "cmd": "set-selection", "request": { "...": "edit types — see “Typed editing types”" } } ``` Concurrent access. `expected_revision` and `expected_selection_revision` are required: a request sent from a stale state is rejected. ## shutdown [Section titled “shutdown”](#shutdown) Parameters: — Result: { id, ok:true, shutdown:true } ```json { "id": "req-1", "cmd": "shutdown" } ``` ## simple-field-inventory [Section titled “simple-field-inventory”](#simple-field-inventory) Parameters: — Result: SimpleFieldInventorySnapshot ```json { "id": "req-1", "cmd": "simple-field-inventory" } ``` ## squash-history [Section titled “squash-history”](#squash-history) Parameters: base\_undo\_depth: integer (required); document\_id: string (required); transition\_kind: string or null (optional) Result: history state ```json { "id": "req-1", "cmd": "squash-history", "base_undo_depth": 1, "document_id": "document_id-1" } ``` ## status [Section titled “status”](#status) Parameters: — Result: session state: path, cache, history, revision, the unsaved flag, and the model hash ```json { "id": "req-1", "cmd": "status" } ``` ## style [Section titled “style”](#style) Parameters: — Result: StyleSnapshot ```json { "id": "req-1", "cmd": "style" } ``` ## track-revisions-state [Section titled “track-revisions-state”](#track-revisions-state) Parameters: — Result: TrackRevisionsStateSnapshot ```json { "id": "req-1", "cmd": "track-revisions-state" } ``` ## undo [Section titled “undo”](#undo) Parameters: document\_id: string or null (optional); transaction\_order: integer (optional, default 0) Result: history, the transition, `undone=true`, and a receipt ```json { "id": "req-1", "cmd": "undo" } ``` ## Commands added later [Section titled “Commands added later”](#commands-added-later) The same session accepts these commands, but they didn’t make it into the original table. All of them require an open document. | cmd | mut. | params | what it does | result | | --------------------------------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | propose | no | request: JSON (required) | The same edit as `apply-text-transaction`, but on a throwaway copy of the session: the document doesn’t change | { proposal\_id, base\_revision, after\_revision, request\_id, applied: false, change { range\_before, deleted\_text, inserted\_text, before\_text, after\_text, before\_hash, after\_hash } } | | commit-proposal | yes | proposal\_id: string (required) | Applies a proposal by its number; the revision is checked again | { proposal\_id, committed, repeated, base\_revision, accepted\_revision, change, applied } | | snapshot-checkpoint | no | expected\_revision: integer (required); request\_id: string (required); session\_id: string (required); target: string (required) | Writes the current state to a new file `target` without clearing the unsaved flag | details of the written file | | vba-inspect | no | include\_source: boolean (optional, default false) | The macro project of the open document: modules, procedures, and with `include_source` the source text | `fastdoc.vba.project.v1` | | vba-plan | no | entrypoint: string (required); allow: boolean (optional); now\_declared: boolean (optional); answer\_declared: boolean (optional); granted\_classes: JSON array (optional) | The plan for running one entry point: what will stop it — before anything is started | `fastdoc.vba.plan.v1` | | vba-preview | no | entrypoint: string (required); allow: boolean (optional); now: string or null (optional); answer: string or null (optional); grants: JSON array (optional); cancel\_file: string or null (optional) | The macro runs against a snapshot of the session document; the diff goes out, the document doesn’t change | `fastdoc.vba.preview.v1` | | vba-trust | no | registry: string (required); action: string (optional, default `ask`); label: string or null (optional) | The trust decision for the project: `ask`, `trust`, `block`, `forget`. Bound to the project hash and remembered in the `registry` file | `fastdoc.vba.trust.v1` | | vba-commit | yes | entrypoint: string (required); registry: string or null (optional); allow: boolean (optional); now: string or null (optional); answer: string or null (optional); grants: JSON array (optional); cancel\_file: string or null (optional) | The macro’s edits enter the open document by the same road as `mutate`. A refusal recorded in `registry` outranks `allow` | `fastdoc.vba.commit.v1` | | vba-document-event | no | event: string (required); registry: string or null (optional); allow: boolean (optional); now: string or null (optional); answer: string or null (optional); grants: JSON array (optional); cancel\_file: string or null (optional) | A document event from the shell — `open`, `close`, or `new`; reports what happened, doesn’t commit edits | fastdoc.vba.document-event.v1 | | apply-concurrent-text-transaction | yes | request: JSON (required); site: string (required); local\_site: string (required); order: JSON (optional); typing\_attributes: JSON (optional); run\_format: JSON (optional) | A peer’s edit composed against an old revision: it is transferred onto the current state rather than rejected | Edit confirmation (`AcceptedEditTerminal`) with a `transfer` block: the numbers `seq`, `base`, `seen`, `own`, `site`, `local_site`, `through_earlier`, `through_later`, `insert_at`, and the `journal` log | | note-operation-order | no | request\_id: string (required); seq: integer (required) | The manager has named the number of its own, already applied edit in the shared order | The fields `known`, `outcome` (`known`, `unknown`, or `out_of_order`), and the `journal` log | | note-operation-baseline | no | seq: integer (required) | Up to which number the file the document was opened from already contains other people’s work | { baseline } | | note-tracked-revision-range | no | participant: integer (required) | The band of tracked-change numbers for a co-editing participant; `0` removes the band | { participant, range { start, end } or null, next } | Who needs the co-editing commands `apply-concurrent-text-transaction`, `note-operation-order`, `note-operation-baseline`, and `note-tracked-revision-range` are sent by the web host’s co-editing manager, not by your wrapper: they carry edit numbers from the shared order, which a single session doesn’t have. How this works for the user — [The editor in the browser](/sumdoc/webhost/#two-people-in-one-document). ## propose [Section titled “propose”](#propose) Parameters: request: JSON (required) Result: a preview of the edit — `proposal_id`, the revisions before and after, `change` with the text before and after and hashes, `applied: false` ```json { "id": "req-1", "cmd": "propose", "request": { "request_id": "edit-1", "expected_revision": 3, "…": "same as apply-text-transaction" } } ``` ## commit-proposal [Section titled “commit-proposal”](#commit-proposal) Parameters: proposal\_id: string (required) Result: `committed`, `repeated`, `base_revision`, `accepted_revision`, `change`, `applied`. If the document has moved since `propose`, the refusal is `proposal-stale` and nothing is applied. A repeated call with the same number returns the same response with `repeated: true`, not a second effect. ```json { "id": "req-2", "cmd": "commit-proposal", "proposal_id": "proposal-1" } ``` ## snapshot-checkpoint [Section titled “snapshot-checkpoint”](#snapshot-checkpoint) Parameters: expected\_revision: integer (required); request\_id: string (required); session\_id: string (required); target: string (required) Result: details of the written file. Unlike `save-checkpoint`, the person’s file, the “modified” flag, and the document address don’t change: `target` must be a new path, and the session must hold an unsaved edit. ```json { "id": "req-3", "cmd": "snapshot-checkpoint", "session_id": "session_id-1", "request_id": "request_id-1", "expected_revision": 4, "target": "/absolute/snapshot.docx" } ``` ## vba-inspect [Section titled “vba-inspect”](#vba-inspect) Parameters: include\_source: boolean (optional, default false) Result: fastdoc.vba.project.v1 — `macros_present`, `project_name`, `modules` with procedures, `offered_macros`, `user_forms`. Read-only: the project is taken from the already open session package; the file isn’t read a second time. ```json { "id": "req-4", "cmd": "vba-inspect", "include_source": true } ``` ## vba-plan [Section titled “vba-plan”](#vba-plan) Parameters: entrypoint: string (required); allow: boolean (optional); now\_declared: boolean (optional); answer\_declared: boolean (optional); granted\_classes: JSON array (optional) Result: fastdoc.vba.plan.v1 — whether this run will go ahead and what exactly will stop it. Executes nothing and writes nothing; the plan describes a specific run, so it repeats the person’s decisions: whether the project identity is confirmed, whether the run moment and the answer to dialogs are given, and which classes of external objects are allowed. ```json { "id": "req-5", "cmd": "vba-plan", "entrypoint": "Module1.FillContract", "allow": true, "now_declared": true, "granted_classes": ["Scripting.FileSystemObject"] } ``` ## vba-preview [Section titled “vba-preview”](#vba-preview) Parameters: entrypoint: string (required); allow: boolean (optional); now: string or null (optional); answer: string or null (optional); grants: JSON array (optional); cancel\_file: string or null (optional) Result: fastdoc.vba.preview\.v1 — `entrypoint`, `result`, `denied_capability`, `stop`, and the “before → after” diff. The macro does run — otherwise the preview would promise something other than what will happen — but the session document doesn’t change by a single byte: the run goes against a snapshot. The appearance of the `cancel_file` file stops the run at the nearest command boundary. ```json { "id": "req-6", "cmd": "vba-preview", "entrypoint": "Module1.FillContract", "allow": true, "now": "2026-09-21T10:00:00", "answer": "ok", "grants": ["object:Scripting.FileSystemObject"] } ``` ## vba-trust [Section titled “vba-trust”](#vba-trust) Parameters: registry: string (required); action: string (optional, default `ask`); label: string or null (optional) Result: fastdoc.vba.trust.v1 — what is recorded about the open document’s project. The decision is bound to the project bytes (the hash of the `vbaProject.bin` part), not to the file name: editing a macro revokes trust by itself. `ask` only shows the state; `trust`, `block`, and `forget` change it. Where to store the registry is up to your application. ```json { "id": "req-7", "cmd": "vba-trust", "registry": "/absolute/macro-trust.json", "action": "trust", "label": "Contract template, fill-in macro" } ``` ## vba-commit [Section titled “vba-commit”](#vba-commit) Parameters: entrypoint: string (required); registry: string or null (optional); allow: boolean (optional); now: string or null (optional); answer: string or null (optional); grants: JSON array (optional); cancel\_file: string or null (optional) Result: fastdoc.vba.commit.v1 — `entrypoint`, `result`, and what entered the document. The edits take the same road as `mutate`: the document after the macro matches the document after the same edits made by hand. The policy decides whether to start: a refusal recorded in `registry` outranks `allow`. A canceled run isn’t committed at all. ```json { "id": "req-8", "cmd": "vba-commit", "entrypoint": "Module1.FillContract", "registry": "/absolute/macro-trust.json", "now": "2026-09-21T10:00:00" } ``` ## vba-document-event [Section titled “vba-document-event”](#vba-document-event) Parameters: event: string (required); registry: string or null (optional); allow: boolean (optional); now: string or null (optional); answer: string or null (optional); grants: JSON array (optional); cancel\_file: string or null (optional) Result: fastdoc.vba.document-event.v1 — what happened on the `open`, `close`, or `new` event. The event is raised by the shell, not by a flag: the “run or not” decision stays with the guard and the trust policy. Edits aren’t committed — that’s what `vba-commit` is for. ```json { "id": "req-9", "cmd": "vba-document-event", "event": "open", "registry": "/absolute/macro-trust.json" } ``` ## apply-concurrent-text-transaction [Section titled “apply-concurrent-text-transaction”](#apply-concurrent-text-transaction) Parameters: request: JSON (required); site: string (required); local\_site: string (required); order: JSON (optional); typing\_attributes: JSON (optional); run\_format: JSON (optional) Result: AcceptedEditTerminal with a `transfer` field — how the edit landed after the transfer. `request` is the same EditRequest as for `apply-text-transaction`, but `expected_revision` may be old: a peer’s edit is transferred onto the current state. `order` is `{ seq, base }`: the edit’s number in the manager’s shared order and up to which number its author had absorbed everything; `typing_attributes` and `run_format` are what the author executed the edit with, so that here it lands with the same look. ```json { "id": "req-10", "cmd": "apply-concurrent-text-transaction", "site": "boris", "local_site": "anna", "order": { "seq": 17, "base": 15 }, "request": { "request_id": "edit-17", "expected_revision": 15, "…": "same as apply-text-transaction" } } ``` ## note-operation-order [Section titled “note-operation-order”](#note-operation-order) Parameters: request\_id: string (required); seq: integer (required) Result: `known`, `outcome` (`known`, `unknown`, or `out_of_order`), `journal`. Your own edit, already applied by `apply-text-transaction`, receives its number in the manager’s shared order. ```json { "id": "req-11", "cmd": "note-operation-order", "request_id": "edit-16", "seq": 16 } ``` ## note-operation-baseline [Section titled “note-operation-baseline”](#note-operation-baseline) Parameters: seq: integer (required) Result: `baseline`. Reports up to which number the file the document was opened from already contains other people’s work — for whoever arrives later. ```json { "id": "req-12", "cmd": "note-operation-baseline", "seq": 15 } ``` ## note-tracked-revision-range [Section titled “note-tracked-revision-range”](#note-tracked-revision-range) Parameters: participant: integer (required) Result: `participant`, `range { start, end }` or null, `next`. The core mints the numbers of its tracked changes within the participant’s band so that different people’s numbers in one document don’t collide; `0` removes the band. ```json { "id": "req-13", "cmd": "note-tracked-revision-range", "participant": 2 } ``` ## What comes back in the `model` response [Section titled “What comes back in the model response”](#what-comes-back-in-the-model-response) The `CanonicalDocument` type is how the `model` command answers the question “what’s in the document right now”. It’s built from two layers, and that’s its main property. **Counters** — how much of what is in the document: `block_count`, `paragraph_count`, `run_count`, `section_count`, `table_count`, `table_row_count`, `table_cell_count`, `body_word_count`, `header_count`, `footer_count`, `footnote_count`, `endnote_count`, `field_count`, `comment_count`, `tracked_change_count`, `object_count`, `style_definition_count`, `numbering_definition_count`, `support_marker_count`. You use them to check that the file opened as expected, without parsing the content. **Content** — the objects themselves: `body` with text blocks, `sections`, `headers`, `footers`, `footnotes`, `endnotes`, `fields`, `comments`, `tracked_changes`, `objects`, `style_definitions`, `numbering_definitions`, `support_markers`. Plus `document_design`. Four fields appear only when there’s something to show: `document_protection`, `bibliography`, `footnote_properties`, and `endnote_properties`. `model_version`, `stage_id`, `stage_name`, and `word_count_source` stand apart: the model version, the parsing stage label, and where the word count was taken from. The document language is `document_language`: read from the first paragraph with text, then from the defaults layer, then from the most frequent paragraph language; the defaults layer itself (`document_default_language`) is stored in the model but doesn’t appear in the response. The other result types Names like `PaginationSnapshot`, `StyleSnapshot`, `ReviewSnapshot`, or `AcceptedEditTerminal` won’t turn up in the type catalog: the catalog is built from the TypeScript shell contract, while these are declared in the Rust core. The easiest way to see what each one contains is in the response itself — run the command on your document and look at the JSON: the fields are named the same as in this breakdown. ## What comes back after an edit [Section titled “What comes back after an edit”](#what-comes-back-after-an-edit) `AcceptedEditTerminal` is the response to `mutate` and `apply-text-transaction`. It answers the question that comes up right after a successful edit: what to show the user without rereading the whole document. | Field | What it is | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `receipt` | A receipt for the edit: `before_revision` and `after_revision`, the selection revision numbers before and after, `selection_after` itself, the history state, and the boundary of what changed. You use it to confirm that it was your change that got applied. | | `model_projection_patch` | What to redraw: `story_id`, `node_id`, the block number in the body, and `paragraph_after` itself — the paragraph after the edit. Plus `before_hash` and `after_hash`, which show which state the patch was built from. | | `model_delta` | What exactly changed in the text: the range before the edit, the deleted and inserted strings, the text before and after. Useful for a log and for replaying the edit on your side. | | `owner_state` | The session owner’s state at the moment of the response. | | `typing_attributes` | The character properties at the input point: what the next text you type will look like. | | `dirty` | Whether the document has unsaved changes. | | `projection_baseline` | Only for documents in restricted mode, and only in the response to the first edit after activation: a pair of hashes, `owner_hash` (what the shell held before activation) and `model_hash` (the model built from the same package). From it, the shell understands that two different hashes describe the same document. The field is absent from other responses. | The rule is simple: render from `model_projection_patch` — it gives you a ready-made paragraph and where to put it. `model_delta` is for when you need to record or replay the edit on your side, not display it. ## Layout and review snapshots [Section titled “Layout and review snapshots”](#layout-and-review-snapshots) `PaginationSnapshot` (the response to `paginate`) and `ReviewSnapshot` (the response to `review`) are built the same way as the `model` response: counters first, then content. If you’ve made sense of one, you’ll make sense of the others. **`PaginationSnapshot` — how the document breaks down into pages.** Counters: `section_count`, `explicit_break_count`, `rendered_break_observation_count`, `page_fragment_count`, `hard_split_count`, `table_placeholder_count`, `anchored_object_placeholder_count`, `support_marker_count`. Content: `sections`, `explicit_breaks`, `page_fragments`, `support_markers`. Separately, three spread flags — `even_and_odd_headers_enabled`, `mirror_margins_enabled`, `gutter_at_top_enabled`: different headers and footers for even and odd pages, mirrored margins, and a gutter at the top. Plus `frontier_mode` — how far layout has been computed. **`ReviewSnapshot` — comments and tracked changes.** Counters: `comment_count`, `tracked_change_count`, `resolved_comment_anchor_count`, `deferred_comment_anchor_count`, `support_marker_count`. Content: `comments`, `tracked_changes`, `support_markers`. The `snapshot_mode` field says in what form the snapshot was taken. Two anchor counters are worth telling apart: `resolved_comment_anchor_count` — comments whose anchor to the text was successfully restored; `deferred_comment_anchor_count` — those whose anchor is deferred. A nonzero second number means some comments currently have nothing to attach to for display. Like `model`, both snapshots have `model_version`, `stage_id`, and `stage_name` — the model version and the parsing-stage marker. # Session types in TypeScript > 31 types generated from the session contract: this is the shape requests and responses take over the connection to the Rust core. The types are generated from the session contract — your code uses them to build requests and parse responses. Command names are listed in [session commands](/reference/sumdoc/session-protocol/). ### SessionCommandName [Section titled “SessionCommandName”](#sessioncommandname) ```ts type SessionCommandName = | "apply-composition" | "apply-text-transaction" | "commit-snapshot" | "commit-structural-snapshot" | "compatibility-inspect" | "compose" | "model" | "mutate" | "open" | "paginate" | "ping" | "print" | "print-delta" | "print-summary" | "print-window" | "redo" | "report" | "review" | "save" | "save-checkpoint" | "set-selection" | "shutdown" | "simple-field-inventory" | "squash-history" | "status" | "style" | "track-revisions-state" | "undo"; ``` ### SessionApplyCompositionRequest [Section titled “SessionApplyCompositionRequest”](#sessionapplycompositionrequest) ```ts interface SessionApplyCompositionRequest { cmd: "apply-composition"; id?: unknown; request: unknown; } ``` ### SessionApplyTextTransactionRequest [Section titled “SessionApplyTextTransactionRequest”](#sessionapplytexttransactionrequest) ```ts interface SessionApplyTextTransactionRequest { cmd: "apply-text-transaction"; id?: unknown; request: unknown; } ``` ### SessionCommitSnapshotRequest [Section titled “SessionCommitSnapshotRequest”](#sessioncommitsnapshotrequest) ```ts interface SessionCommitSnapshotRequest { cmd: "commit-snapshot"; id?: unknown; document_id: string; path: string; transaction_order: number; transition_kind: string; } ``` ### SessionCommitStructuralSnapshotRequest [Section titled “SessionCommitStructuralSnapshotRequest”](#sessioncommitstructuralsnapshotrequest) ```ts interface SessionCommitStructuralSnapshotRequest { cmd: "commit-structural-snapshot"; id?: unknown; path: string; request: unknown; } ``` ### SessionCompatibilityInspectRequest [Section titled “SessionCompatibilityInspectRequest”](#sessioncompatibilityinspectrequest) ```ts interface SessionCompatibilityInspectRequest { cmd: "compatibility-inspect"; id?: unknown; } ``` ### SessionComposeRequest [Section titled “SessionComposeRequest”](#sessioncomposerequest) ```ts interface SessionComposeRequest { cmd: "compose"; id?: unknown; } ``` ### SessionModelRequest [Section titled “SessionModelRequest”](#sessionmodelrequest) ```ts interface SessionModelRequest { cmd: "model"; id?: unknown; } ``` ### SessionMutateRequest [Section titled “SessionMutateRequest”](#sessionmutaterequest) ```ts interface SessionMutateRequest { cmd: "mutate"; id?: unknown; after_caret_slot_index?: number | null; before_caret_slot_index?: number | null; before_selection_end_slot_index?: number | null; before_selection_start_slot_index?: number | null; delete_count?: number; document_id?: string | null; offset?: number; operation_kind: string; paragraph_index: number; revision_author?: string | null; revision_date?: string | null; revision_date_utc?: string | null; text?: string | null; transaction_order?: number; transition_kind?: string | null; } ``` ### SessionOpenRequest [Section titled “SessionOpenRequest”](#sessionopenrequest) ```ts interface SessionOpenRequest { cmd: "open"; id?: unknown; document_id?: string | null; path: string; } ``` ### SessionPaginateRequest [Section titled “SessionPaginateRequest”](#sessionpaginaterequest) ```ts interface SessionPaginateRequest { cmd: "paginate"; id?: unknown; } ``` ### SessionPingRequest [Section titled “SessionPingRequest”](#sessionpingrequest) ```ts interface SessionPingRequest { cmd: "ping"; id?: unknown; } ``` ### SessionPrintRequest [Section titled “SessionPrintRequest”](#sessionprintrequest) ```ts interface SessionPrintRequest { cmd: "print"; id?: unknown; tracked_change_markup_mode?: string | null; } ``` ### SessionPrintDeltaRequest [Section titled “SessionPrintDeltaRequest”](#sessionprintdeltarequest) ```ts interface SessionPrintDeltaRequest { cmd: "print-delta"; id?: unknown; known_fingerprints?: unknown[]; tracked_change_markup_mode?: string | null; } ``` ### SessionPrintSummaryRequest [Section titled “SessionPrintSummaryRequest”](#sessionprintsummaryrequest) ```ts interface SessionPrintSummaryRequest { cmd: "print-summary"; id?: unknown; } ``` ### SessionPrintWindowRequest [Section titled “SessionPrintWindowRequest”](#sessionprintwindowrequest) ```ts interface SessionPrintWindowRequest { cmd: "print-window"; id?: unknown; include_page_stack?: boolean; page_indexes: unknown[]; } ``` ### SessionRedoRequest [Section titled “SessionRedoRequest”](#sessionredorequest) ```ts interface SessionRedoRequest { cmd: "redo"; id?: unknown; document_id?: string | null; transaction_order?: number; } ``` ### SessionReportRequest [Section titled “SessionReportRequest”](#sessionreportrequest) ```ts interface SessionReportRequest { cmd: "report"; id?: unknown; } ``` ### SessionReviewRequest [Section titled “SessionReviewRequest”](#sessionreviewrequest) ```ts interface SessionReviewRequest { cmd: "review"; id?: unknown; } ``` ### SessionSaveRequest [Section titled “SessionSaveRequest”](#sessionsaverequest) ```ts interface SessionSaveRequest { cmd: "save"; id?: unknown; path?: string | null; } ``` ### SessionSaveCheckpointRequest [Section titled “SessionSaveCheckpointRequest”](#sessionsavecheckpointrequest) ```ts interface SessionSaveCheckpointRequest { cmd: "save-checkpoint"; id?: unknown; expected_revision: number; request_id: string; session_id: string; target: unknown; } ``` ### SessionSetSelectionRequest [Section titled “SessionSetSelectionRequest”](#sessionsetselectionrequest) ```ts interface SessionSetSelectionRequest { cmd: "set-selection"; id?: unknown; request: unknown; } ``` ### SessionShutdownRequest [Section titled “SessionShutdownRequest”](#sessionshutdownrequest) ```ts interface SessionShutdownRequest { cmd: "shutdown"; id?: unknown; } ``` ### SessionSimpleFieldInventoryRequest [Section titled “SessionSimpleFieldInventoryRequest”](#sessionsimplefieldinventoryrequest) ```ts interface SessionSimpleFieldInventoryRequest { cmd: "simple-field-inventory"; id?: unknown; } ``` ### SessionSquashHistoryRequest [Section titled “SessionSquashHistoryRequest”](#sessionsquashhistoryrequest) ```ts interface SessionSquashHistoryRequest { cmd: "squash-history"; id?: unknown; base_undo_depth: number; document_id: string; transition_kind?: string | null; } ``` ### SessionStatusRequest [Section titled “SessionStatusRequest”](#sessionstatusrequest) ```ts interface SessionStatusRequest { cmd: "status"; id?: unknown; } ``` ### SessionStyleRequest [Section titled “SessionStyleRequest”](#sessionstylerequest) ```ts interface SessionStyleRequest { cmd: "style"; id?: unknown; } ``` ### SessionTrackRevisionsStateRequest [Section titled “SessionTrackRevisionsStateRequest”](#sessiontrackrevisionsstaterequest) ```ts interface SessionTrackRevisionsStateRequest { cmd: "track-revisions-state"; id?: unknown; } ``` ### SessionUndoRequest [Section titled “SessionUndoRequest”](#sessionundorequest) ```ts interface SessionUndoRequest { cmd: "undo"; id?: unknown; document_id?: string | null; transaction_order?: number; } ``` ### SessionRequest [Section titled “SessionRequest”](#sessionrequest) ```ts type SessionRequest = SessionApplyCompositionRequest | SessionApplyTextTransactionRequest | SessionCommitSnapshotRequest | SessionCommitStructuralSnapshotRequest | SessionCompatibilityInspectRequest | SessionComposeRequest | SessionModelRequest | SessionMutateRequest | SessionOpenRequest | SessionPaginateRequest | SessionPingRequest | SessionPrintRequest | SessionPrintDeltaRequest | SessionPrintSummaryRequest | SessionPrintWindowRequest | SessionRedoRequest | SessionReportRequest | SessionReviewRequest | SessionSaveRequest | SessionSaveCheckpointRequest | SessionSetSelectionRequest | SessionShutdownRequest | SessionSimpleFieldInventoryRequest | SessionSquashHistoryRequest | SessionStatusRequest | SessionStyleRequest | SessionTrackRevisionsStateRequest | SessionUndoRequest; ``` ### SessionResponse [Section titled “SessionResponse”](#sessionresponse) ```ts interface SessionResponse { cmd?: string; elapsed_ms?: number; error?: string; id?: unknown; ok?: boolean; result?: unknown; } ``` # window.fastdocShell · other methods > Methods that don't fit the topic groups above: edit history, working with the current document and windows, templates, autosave, and recovery. Methods: 70. Methods that don’t fit the topic groups above: edit history, working with the current document and windows, templates, autosave, and recovery. Methods on this page: 70. Internal API `window.fastdocShell` is only available inside the desktop SumDoc window. For external integration, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). How to read the line under the signature Under each method is a line of four values — for example `web_to_host_request_response` · `invoke` · `fastdoc-shell:get-state` · `capability=document`. | Value | What it means | | ------------------------------ | ------------------------------------------------------------------------------- | | `web_to_host_request_response` | The editor window asks the application shell and waits for a response | | `web_to_host_event` | The editor window notifies the shell and doesn’t wait for a response | | `host_to_web_event` | The shell notifies the editor window; you subscribe to these methods | | `invoke`, `send`, `on` | Exchange method: request with a response, send without a response, subscription | | `fastdoc-shell:…` | The name of the channel the message travels on | | `capability=…` | The capability group the method belongs to | All three sets of values are declared in the shell contract: directions in `BridgeDirection`, domains in `ShellContractDomain`, capabilities in `ShellCapability`. The last set doesn’t match the domains: smoke runs and the release center have no capability of their own, so their methods are assigned to `internal` or `document`. The first word of the name tells you what the method does | Start of the name | What happens | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `apply…` | Performs an action and changes the document. The response says what happened | | `compute…CommandState` | Changes nothing: answers whether the action can be performed now (`canApply`) and why not (`disabledReason`). The shell uses this response to decide whether to enable the button | | `run…` | Runs an entire scenario — a compatibility check or a release-readiness check | | `get…`, `list…` | Read state and change nothing | | `set…`, `update…` | Change a setting, not the document’s content | | `create…`, `delete…` | Create and delete — a version, a comment, a checkpoint | | `open…` | Opens — the document, one of its versions, a link in an external program | | `resolve…` | Two different meanings, visible from the rest of the name: for comments, it marks one resolved; for recovery and external changes, it resolves a conflict by choosing whose edit to keep | | `notify…` | Notifies the shell of an event and doesn’t wait for a response | | `on…` | Subscription: the shell calls you when the event happens | The `apply…` and `compute…CommandState` pairs go together: first you ask for the state, then you apply. A method ending in `Copy` is a special case, covered below. What `Copy` at the end of a name means This kind of method doesn’t change the open document. It creates a file next to it and applies the action to that copy: the open document and its history stay as they were. Where to write it is set by the `outputPath` field; without it, the shell picks a path itself, next to the source file. So “accepting a change” with `Copy` isn’t an in-place edit — it produces a second file with the change accepted. Editing the open document goes through a different path — session commands, `mutate` and `apply-text-transaction`: [Rust Session Protocol](/reference/sumdoc/session-protocol/). Methods on this page — 70 * [`applyCanonicalHistory`](#applycanonicalhistory) * [`applyEditorV0HomeFormattingCommand`](#applyeditorv0homeformattingcommand) * [`applyEditorV0MailMergeCommandAction`](#applyeditorv0mailmergecommandaction) * [`applyOutlineMasterDocumentAction`](#applyoutlinemasterdocumentaction) * [`applyPersistentEditingComposition`](#applypersistenteditingcomposition) * [`applyPersistentEditingStructuralCommand`](#applypersistenteditingstructuralcommand) * [`applyQuickPartsDocumentOperation`](#applyquickpartsdocumentoperation) * [`arrangeDocumentWindows`](#arrangedocumentwindows) * [`checkLocalProofingWords`](#checklocalproofingwords) * [`clearRecentDocuments`](#clearrecentdocuments) * [`closeCurrentDocument`](#closecurrentdocument) * [`commitAutosaveRecovery`](#commitautosaverecovery) * [`commitUserTemplate`](#commitusertemplate) * [`completeSaveBeforeDocumentSwitch`](#completesavebeforedocumentswitch) * [`configureLocalProofingProvider`](#configurelocalproofingprovider) * [`createDocumentWindow`](#createdocumentwindow) * [`createEditableOdtCopy`](#createeditableodtcopy) * [`createFromBuiltinTemplate`](#createfrombuiltintemplate) * [`createFromUserTemplate`](#createfromusertemplate) * [`createQuickPartsBuildingBlock`](#createquickpartsbuildingblock) * [`createVersionCheckpoint`](#createversioncheckpoint) * [`deleteQuickPartsBuildingBlock`](#deletequickpartsbuildingblock) * [`deleteUserTemplate`](#deleteusertemplate) * [`deleteVersion`](#deleteversion) * [`finalizeAutosaveRecovery`](#finalizeautosaverecovery) * [`focusDocumentWindow`](#focusdocumentwindow) * [`getAutosaveRecoveryState`](#getautosaverecoverystate) * [`getDocumentWindowSession`](#getdocumentwindowsession) * [`getLocalProofingDocumentPolicy`](#getlocalproofingdocumentpolicy) * [`getPathForFile`](#getpathforfile) * [`inspectEditorV0HomeFormatting`](#inspecteditorv0homeformatting) * [`inspectExternalChange`](#inspectexternalchange) * [`invalidatePersistentEditingProductRoute`](#invalidatepersistenteditingproductroute) * [`linkVersionHistorySaveAs`](#linkversionhistorysaveas) * [`listDocumentWindows`](#listdocumentwindows) * [`listFileStartTemplates`](#listfilestarttemplates) * [`listQuickPartsBuildingBlocks`](#listquickpartsbuildingblocks) * [`listVersionHistory`](#listversionhistory) * [`materializeDocumentPageWindow`](#materializedocumentpagewindow) * [`mutateLocalProofingDictionary`](#mutatelocalproofingdictionary) * [`notifyCanonicalEditDropped`](#notifycanonicaleditdropped) * [`notifyEditKeyDropped`](#notifyeditkeydropped) * [`notifyPageHydrationDropped`](#notifypagehydrationdropped) * [`notifyPersistentSaveRefused`](#notifypersistentsaverefused) * [`notifyUserDocumentSaved`](#notifyuserdocumentsaved) * [`onDocumentSessionSnapshot`](#ondocumentsessionsnapshot) * [`onSaveBeforeDocumentSwitch`](#onsavebeforedocumentswitch) * [`openMostRecentDocument`](#openmostrecentdocument) * [`openVersion`](#openversion) * [`prepareAutosaveRecovery`](#prepareautosaverecovery) * [`preparePersistentSaveCopyTarget`](#preparepersistentsavecopytarget) * [`prepareUserTemplate`](#prepareusertemplate) * [`publishDocumentSessionSnapshot`](#publishdocumentsessionsnapshot) * [`removeRecentDocument`](#removerecentdocument) * [`requestDocumentWindowClose`](#requestdocumentwindowclose) * [`resolveAutosaveRecovery`](#resolveautosaverecovery) * [`resolveExternalChange`](#resolveexternalchange) * [`resolveFileSessionRecovery`](#resolvefilesessionrecovery) * [`restoreVersion`](#restoreversion) * [`rollbackSaveAsOwnershipReservation`](#rollbacksaveasownershipreservation) * [`runDocxCompatibility`](#rundocxcompatibility) * [`runEditorV0MailMergeBusiness`](#runeditorv0mailmergebusiness) * [`saveOdtAsDocxCopy`](#saveodtasdocxcopy) * [`savePersistentEditingCheckpoint`](#savepersistenteditingcheckpoint) * [`setPersistentEditingSelection`](#setpersistenteditingselection) * [`setRecentDocumentPinned`](#setrecentdocumentpinned) * [`setRestoreLastDocument`](#setrestorelastdocument) * [`updateAutosaveRecoverySettings`](#updateautosaverecoverysettings) * [`updateQuickPartsBuildingBlock`](#updatequickpartsbuildingblock) * [`updateVersionMetadata`](#updateversionmetadata) ### applyCanonicalHistory [Section titled “applyCanonicalHistory”](#applycanonicalhistory) ```ts applyCanonicalHistory(direction: "undo" | "redo"): Promise<{ owner: "rust-session"; available: boolean; sessionId: string | null; documentId: string | null; transactionOrder: number; acceptedRevision: number; selectionRevision: number; publishedRevision: number; dirty: boolean; modelHash: string | null; undoDepth: number; redoDepth: number; direction: "undo" | "redo"; projectionPath: string; historyPreservedBySave: boolean; sceneModelHash: string; visibleSceneMatchesCanonicalModel: boolean; residueCount: 0; structuralProjection?: boolean; structuralStartBodyBlockIndex?: number; bridgeState?: ShellBridgeState; transition: { transitionKind: string; transactionOrder: number; beforeModelHash: string; afterModelHash: string; paragraphIndex?: number; beforeCaretSlotIndex?: number; afterCaretSlotIndex?: number; beforeSelectionStartSlotIndex?: number; beforeSelectionEndSlotIndex?: number; paragraphOwner?: string; requestId?: string; }; persistentReceipt?: BoundedLiveTextInsertResult["persistentReceipt"]; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-canonical-history` ### applyEditorV0HomeFormattingCommand [Section titled “applyEditorV0HomeFormattingCommand”](#applyeditorv0homeformattingcommand) ```ts applyEditorV0HomeFormattingCommand(request: EditorV0HomeFormattingRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-home-formatting-command` ### applyEditorV0MailMergeCommandAction [Section titled “applyEditorV0MailMergeCommandAction”](#applyeditorv0mailmergecommandaction) ```ts applyEditorV0MailMergeCommandAction(request: EditorV0MailMergeCommandRequest): Promise ``` **deprecated: always responds with a refusal** · **the refusal comes with the code MAIL\_MERGE\_LEGACY\_COMMAND\_OWNER\_RETIRED** ### applyOutlineMasterDocumentAction [Section titled “applyOutlineMasterDocumentAction”](#applyoutlinemasterdocumentaction) ```ts applyOutlineMasterDocumentAction(request: OutlineMasterDocumentRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-outline-master-document-action` ### applyPersistentEditingComposition [Section titled “applyPersistentEditingComposition”](#applypersistenteditingcomposition) ```ts applyPersistentEditingComposition(request: CompositionRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-persistent-editing-composition` ### applyPersistentEditingStructuralCommand [Section titled “applyPersistentEditingStructuralCommand”](#applypersistenteditingstructuralcommand) ```ts applyPersistentEditingStructuralCommand(request: EditRequest, options?: { projectionRefresh?: "full" | "page-window" | "model-only"; pageIndex?: number; }): Promise<{ receipt: EditReceipt; model: Record; document: ShellLoadedDocument; canonicalHistory: CanonicalHistoryState; projectionRefresh: "full" | "page-window" | "model-only"; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-persistent-editing-structural-command` ### applyQuickPartsDocumentOperation [Section titled “applyQuickPartsDocumentOperation”](#applyquickpartsdocumentoperation) `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-quick-parts-document-operation` ### arrangeDocumentWindows [Section titled “arrangeDocumentWindows”](#arrangedocumentwindows) ```ts arrangeDocumentWindows(): Promise<{ arranged: number; bounds: Array<{ x: number; y: number; width: number; height: number }>; windows: ShellDocumentWindowDescriptor[]; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:arrange-document-windows` ### checkLocalProofingWords [Section titled “checkLocalProofingWords”](#checklocalproofingwords) ```ts checkLocalProofingWords(request: ShellProofingWordCheckRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:check-local-proofing-words` ### clearRecentDocuments [Section titled “clearRecentDocuments”](#clearrecentdocuments) ```ts clearRecentDocuments(): Promise<{ cleared: boolean; persisted: boolean; recentDocuments: string[]; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:clear-recent-documents` ### closeCurrentDocument [Section titled “closeCurrentDocument”](#closecurrentdocument) ```ts closeCurrentDocument(decision: "save" | "discard"): Promise<{ closed: boolean; path: string | null; decision: "save" | "discard"; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:close-current-document` ### commitAutosaveRecovery [Section titled “commitAutosaveRecovery”](#commitautosaverecovery) ```ts commitAutosaveRecovery(request: { recoveryId: string; stagedPath: string }): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:commit-autosave-recovery` ### commitUserTemplate [Section titled “commitUserTemplate”](#commitusertemplate) ```ts commitUserTemplate(request: { id: string; title: string; sourcePath: string; previewText?: string; }): ReturnType ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:commit-user-template` ### completeSaveBeforeDocumentSwitch [Section titled “completeSaveBeforeDocumentSwitch”](#completesavebeforedocumentswitch) ```ts completeSaveBeforeDocumentSwitch(result: { requestId: number; saved: boolean; savedPath: string | null; errorMessage: string | null; }): void ``` `web_to_host_event` · `send` · `fastdoc-shell:document-switch-save-result` ### configureLocalProofingProvider [Section titled “configureLocalProofingProvider”](#configurelocalproofingprovider) ```ts configureLocalProofingProvider(): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:configure-local-proofing-provider` ### createDocumentWindow [Section titled “createDocumentWindow”](#createdocumentwindow) ```ts createDocumentWindow(): Promise<{ created: boolean; windowId: number | null; documentPath: string | null; error: string | null; windows: ShellDocumentWindowDescriptor[]; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:create-document-window` ### createEditableOdtCopy [Section titled “createEditableOdtCopy”](#createeditableodtcopy) ```ts createEditableOdtCopy(): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:create-editable-odt-copy` ### createFromBuiltinTemplate [Section titled “createFromBuiltinTemplate”](#createfrombuiltintemplate) ```ts createFromBuiltinTemplate(templateId: string): Promise<{ opened: boolean; canceled: boolean; path: string | null; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:create-from-builtin-template` ### createFromUserTemplate [Section titled “createFromUserTemplate”](#createfromusertemplate) ```ts createFromUserTemplate(templateId: string): Promise<{ opened: boolean; canceled: boolean; path: string | null; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:create-from-user-template` ### createQuickPartsBuildingBlock [Section titled “createQuickPartsBuildingBlock”](#createquickpartsbuildingblock) `web_to_host_request_response` · `invoke` · `fastdoc-shell:create-quick-parts-building-block` ### createVersionCheckpoint [Section titled “createVersionCheckpoint”](#createversioncheckpoint) ```ts createVersionCheckpoint(request: { reason: ShellVersionHistoryEntry["reason"]; name?: string | null; pinned?: boolean; recoverySessionId?: string | null; }): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:create-version-checkpoint` ### deleteQuickPartsBuildingBlock [Section titled “deleteQuickPartsBuildingBlock”](#deletequickpartsbuildingblock) `web_to_host_request_response` · `invoke` · `fastdoc-shell:delete-quick-parts-building-block` ### deleteUserTemplate [Section titled “deleteUserTemplate”](#deleteusertemplate) ```ts deleteUserTemplate(templateId: string): ReturnType ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:delete-user-template` ### deleteVersion [Section titled “deleteVersion”](#deleteversion) ```ts deleteVersion(request: { versionId: string; confirmed: boolean }): Promise<{ deleted: true }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:delete-version` ### finalizeAutosaveRecovery [Section titled “finalizeAutosaveRecovery”](#finalizeautosaverecovery) ```ts finalizeAutosaveRecovery(request: { recoveryId: string; action: "save" | "save-as" | "discard" | "cancel"; savedPath?: string | null; }): Promise<{ finalized: boolean; preserved: boolean }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:finalize-autosave-recovery` ### focusDocumentWindow [Section titled “focusDocumentWindow”](#focusdocumentwindow) ```ts focusDocumentWindow(windowId: number): Promise<{ focused: boolean; windows: ShellDocumentWindowDescriptor[]; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:focus-document-window` ### getAutosaveRecoveryState [Section titled “getAutosaveRecoveryState”](#getautosaverecoverystate) ```ts getAutosaveRecoveryState(): Promise<{ sessionId: string; settings: ShellAutosaveRecoverySettings; candidates: ShellAutosaveRecoveryCandidate[] }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:get-autosave-recovery-state` ### getDocumentWindowSession [Section titled “getDocumentWindowSession”](#getdocumentwindowsession) ```ts getDocumentWindowSession(): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:get-document-window-session` ### getLocalProofingDocumentPolicy [Section titled “getLocalProofingDocumentPolicy”](#getlocalproofingdocumentpolicy) ```ts getLocalProofingDocumentPolicy(request: { documentPath: string }): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:get-local-proofing-document-policy` ### getPathForFile [Section titled “getPathForFile”](#getpathforfile) ```ts getPathForFile(file: { readonly name: string }): string ``` **a direct Electron adapter, not a core command** · **runs synchronously and never reaches the core** ### inspectEditorV0HomeFormatting [Section titled “inspectEditorV0HomeFormatting”](#inspecteditorv0homeformatting) ```ts inspectEditorV0HomeFormatting(): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:inspect-editor-v0-home-formatting` ### inspectExternalChange [Section titled “inspectExternalChange”](#inspectexternalchange) ```ts inspectExternalChange(request: { dirty: boolean }): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:inspect-external-change` ### invalidatePersistentEditingProductRoute [Section titled “invalidatePersistentEditingProductRoute”](#invalidatepersistenteditingproductroute) ```ts invalidatePersistentEditingProductRoute(reason: string): Promise<{ invalidated: true }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:invalidate-persistent-editing-product-route` ### linkVersionHistorySaveAs [Section titled “linkVersionHistorySaveAs”](#linkversionhistorysaveas) ```ts linkVersionHistorySaveAs(request: { previousPath: string; nextPath: string }): Promise<{ linked: true }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:link-version-history-save-as` ### listDocumentWindows [Section titled “listDocumentWindows”](#listdocumentwindows) ```ts listDocumentWindows(): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:list-document-windows` ### listFileStartTemplates [Section titled “listFileStartTemplates”](#listfilestarttemplates) ```ts listFileStartTemplates(): Promise<{ builtInTemplates: Array<{ id: "blank" | "letter" | "report" | "meeting-notes"; title: string; description: string; previewText: string; }>; userTemplates: Array<{ id: string; title: string; sourcePath: string; previewText: string; createdAt: string; }>; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:list-file-start-templates` ### listQuickPartsBuildingBlocks [Section titled “listQuickPartsBuildingBlocks”](#listquickpartsbuildingblocks) `web_to_host_request_response` · `invoke` · `fastdoc-shell:list-quick-parts-building-blocks` ### listVersionHistory [Section titled “listVersionHistory”](#listversionhistory) ```ts listVersionHistory(): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:list-version-history` ### materializeDocumentPageWindow [Section titled “materializeDocumentPageWindow”](#materializedocumentpagewindow) ```ts materializeDocumentPageWindow(request: { path: string; pageIndex: number; }): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:materialize-document-page-window` ### mutateLocalProofingDictionary [Section titled “mutateLocalProofingDictionary”](#mutatelocalproofingdictionary) ```ts mutateLocalProofingDictionary(request: { action: "add" | "remove" | "reset"; word?: string | null; }): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:mutate-local-proofing-dictionary` ### notifyCanonicalEditDropped [Section titled “notifyCanonicalEditDropped”](#notifycanonicaleditdropped) ```ts notifyCanonicalEditDropped(payload: { code: string; requestId: string; commandType: string; }): void ``` `web_to_host_event` · `send` · `fastdoc-shell:canonical-edit-dropped` ### notifyEditKeyDropped [Section titled “notifyEditKeyDropped”](#notifyeditkeydropped) ```ts notifyEditKeyDropped(payload: { code: string; inputType: string; selectionShape: string; inputRoute: string; contextRefusal: string; pressIndex: number; }): void ``` `web_to_host_event` · `send` · `fastdoc-shell:edit-key-dropped` ### notifyPageHydrationDropped [Section titled “notifyPageHydrationDropped”](#notifypagehydrationdropped) ```ts notifyPageHydrationDropped(payload: { code: string; stage: string }): void ``` `web_to_host_event` · `send` · `fastdoc-shell:page-hydration-dropped` ### notifyPersistentSaveRefused [Section titled “notifyPersistentSaveRefused”](#notifypersistentsaverefused) ```ts notifyPersistentSaveRefused(payload: { code: string; requestId: string; saveAs: boolean; }): void ``` `web_to_host_event` · `send` · `fastdoc-shell:persistent-save-refused` ### notifyUserDocumentSaved [Section titled “notifyUserDocumentSaved”](#notifyuserdocumentsaved) ```ts notifyUserDocumentSaved(savedPath: string): Promise<{ recorded: boolean }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:user-document-saved` ### onDocumentSessionSnapshot [Section titled “onDocumentSessionSnapshot”](#ondocumentsessionsnapshot) ```ts onDocumentSessionSnapshot(callback: (snapshot: ShellDocumentSessionSnapshot) => void): () => void ``` `host_to_web_event` · `on` · `fastdoc-shell:document-session-snapshot` ### onSaveBeforeDocumentSwitch [Section titled “onSaveBeforeDocumentSwitch”](#onsavebeforedocumentswitch) ```ts onSaveBeforeDocumentSwitch(callback: (request: { requestId: number }) => void): () => void ``` `host_to_web_event` · `on` · `fastdoc-shell:save-before-document-switch` ### openMostRecentDocument [Section titled “openMostRecentDocument”](#openmostrecentdocument) ```ts openMostRecentDocument(): Promise<{ opened: boolean; canceled: boolean; path: string | null; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:open-most-recent-document` ### openVersion [Section titled “openVersion”](#openversion) ```ts openVersion(request: { versionId: string; mode: "preview" | "read-only" | "compare"; }): Promise<{ opened: true; mode: "preview" | "read-only" | "compare"; snapshotPath: string; sourceHash: string }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:open-version` ### prepareAutosaveRecovery [Section titled “prepareAutosaveRecovery”](#prepareautosaverecovery) ```ts prepareAutosaveRecovery(request: { recoveryId?: string | null; documentId?: string | null; displayName: string; sourcePath: string | null; serializationPath: string; }): Promise<{ recoveryId: string; documentId: string; stagingPath: string; settings: ShellAutosaveRecoverySettings }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:prepare-autosave-recovery` ### preparePersistentSaveCopyTarget [Section titled “preparePersistentSaveCopyTarget”](#preparepersistentsavecopytarget) ```ts preparePersistentSaveCopyTarget(request?: { outputKind?: string; saveAsPath?: string | null; }): Promise<{ status: "canceled" | "reserved"; canceled: boolean; path: string | null; reservationId: string | null; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:prepare-persistent-save-copy-target` ### prepareUserTemplate [Section titled “prepareUserTemplate”](#prepareusertemplate) ```ts prepareUserTemplate(request: { title: string; previewText?: string }): Promise<{ id: string; title: string; targetPath: string; previewText: string; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:prepare-user-template` ### publishDocumentSessionSnapshot [Section titled “publishDocumentSessionSnapshot”](#publishdocumentsessionsnapshot) ```ts publishDocumentSessionSnapshot(snapshot: ShellDocumentSessionSnapshot): Promise<{ accepted: boolean; revision: number; recipients: number; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:publish-document-session-snapshot` ### removeRecentDocument [Section titled “removeRecentDocument”](#removerecentdocument) ```ts removeRecentDocument(path: string): Promise<{ removed: boolean; persisted: boolean; recentDocuments: string[]; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:remove-recent-document` ### requestDocumentWindowClose [Section titled “requestDocumentWindowClose”](#requestdocumentwindowclose) ```ts requestDocumentWindowClose(): Promise<{ requested: boolean; remaining: number; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:request-document-window-close` ### resolveAutosaveRecovery [Section titled “resolveAutosaveRecovery”](#resolveautosaverecovery) ```ts resolveAutosaveRecovery(request: { recoveryId: string; action: "recover" | "open-copy" | "delete" | "dismiss"; outputPath?: string | null; }): Promise<{ action: string; documentPath: string | null; candidates: ShellAutosaveRecoveryCandidate[] }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:resolve-autosave-recovery` ### resolveExternalChange [Section titled “resolveExternalChange”](#resolveexternalchange) ```ts resolveExternalChange(request: { decision: "keep-current" | "keep-mine" | "reload-disk" | "save-mine-copy" | "compare" | "cancel"; revision: number; }): Promise<{ resolved: boolean; stale: boolean; decision: string; requiresRendererSaveAs: boolean; documentPath: string | null; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:resolve-external-change` ### resolveFileSessionRecovery [Section titled “resolveFileSessionRecovery”](#resolvefilesessionrecovery) ```ts resolveFileSessionRecovery(request: { decision: "recover" | "decline" | "open-original"; }): Promise<{ state: ShellFileSessionRecoveryState; recovered: boolean; declined: boolean; openedOriginal: boolean; documentPath: string | null; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:resolve-file-session-recovery` ### restoreVersion [Section titled “restoreVersion”](#restoreversion) ```ts restoreVersion(request: { versionId: string; mode: "current" | "copy"; outputPath?: string | null; }): Promise<{ restored: boolean; canceled: boolean; mode: "current" | "copy"; outputPath: string | null }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:restore-version` ### rollbackSaveAsOwnershipReservation [Section titled “rollbackSaveAsOwnershipReservation”](#rollbacksaveasownershipreservation) ```ts rollbackSaveAsOwnershipReservation(request: { reservationId: string; targetPath: string; }): Promise<{ rolledBack: boolean }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:rollback-save-as-ownership-reservation` ### runDocxCompatibility [Section titled “runDocxCompatibility”](#rundocxcompatibility) ```ts runDocxCompatibility(request: { action: "check" | "inspect" | "repair-copy"; sourcePath?: string | null; selectSource?: boolean; }): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-docx-compatibility` ### runEditorV0MailMergeBusiness [Section titled “runEditorV0MailMergeBusiness”](#runeditorv0mailmergebusiness) ```ts runEditorV0MailMergeBusiness(request: Record): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-editor-v0-mail-merge-business` ### saveOdtAsDocxCopy [Section titled “saveOdtAsDocxCopy”](#saveodtasdocxcopy) ```ts saveOdtAsDocxCopy(): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:save-odt-as-docx-copy` ### savePersistentEditingCheckpoint [Section titled “savePersistentEditingCheckpoint”](#savepersistenteditingcheckpoint) ```ts savePersistentEditingCheckpoint(request?: { saveAs?: boolean; targetPath?: string; saveAsOwnershipReservationId?: string; }): Promise< BoundedLiveTextInsertResult | null > ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:save-persistent-editing-checkpoint` ### setPersistentEditingSelection [Section titled “setPersistentEditingSelection”](#setpersistenteditingselection) ```ts setPersistentEditingSelection(request: SelectionUpdateRequest): Promise setPersistentEditingSelection(request: SelectionUpdateRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:set-persistent-editing-selection` ### setRecentDocumentPinned [Section titled “setRecentDocumentPinned”](#setrecentdocumentpinned) ```ts setRecentDocumentPinned(path: string, pinned: boolean): Promise<{ pinned: boolean; persisted: boolean; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:set-recent-document-pinned` ### setRestoreLastDocument [Section titled “setRestoreLastDocument”](#setrestorelastdocument) ```ts setRestoreLastDocument(enabled: boolean): Promise<{ enabled: boolean; persisted: boolean; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:set-restore-last-document` ### updateAutosaveRecoverySettings [Section titled “updateAutosaveRecoverySettings”](#updateautosaverecoverysettings) ```ts updateAutosaveRecoverySettings(request: Partial> & { retention?: Partial; }): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:update-autosave-recovery-settings` ### updateQuickPartsBuildingBlock [Section titled “updateQuickPartsBuildingBlock”](#updatequickpartsbuildingblock) `web_to_host_request_response` · `invoke` · `fastdoc-shell:update-quick-parts-building-block` ### updateVersionMetadata [Section titled “updateVersionMetadata”](#updateversionmetadata) ```ts updateVersionMetadata(request: { versionId: string; name?: string | null; pinned?: boolean; }): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:update-version-metadata` # window.fastdocShell · document > Working with the current document: opening, image export, comparison, printing. Methods: 35. Working with the current document: opening, image export, comparison, printing. Methods on this page: 35. Internal API `window.fastdocShell` is only available inside the desktop SumDoc window. For external integration, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). How to read the line under the signature Under each method is a line of four values — for example `web_to_host_request_response` · `invoke` · `fastdoc-shell:get-state` · `capability=document`. | Value | What it means | | ------------------------------ | ------------------------------------------------------------------------------- | | `web_to_host_request_response` | The editor window asks the application shell and waits for a response | | `web_to_host_event` | The editor window notifies the shell and doesn’t wait for a response | | `host_to_web_event` | The shell notifies the editor window; you subscribe to these methods | | `invoke`, `send`, `on` | Exchange method: request with a response, send without a response, subscription | | `fastdoc-shell:…` | The name of the channel the message travels on | | `capability=…` | The capability group the method belongs to | All three sets of values are declared in the shell contract: directions in `BridgeDirection`, domains in `ShellContractDomain`, capabilities in `ShellCapability`. The last set doesn’t match the domains: smoke runs and the release center have no capability of their own, so their methods are assigned to `internal` or `document`. The first word of the name tells you what the method does | Start of the name | What happens | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `apply…` | Performs an action and changes the document. The response says what happened | | `compute…CommandState` | Changes nothing: answers whether the action can be performed now (`canApply`) and why not (`disabledReason`). The shell uses this response to decide whether to enable the button | | `run…` | Runs an entire scenario — a compatibility check or a release-readiness check | | `get…`, `list…` | Read state and change nothing | | `set…`, `update…` | Change a setting, not the document’s content | | `create…`, `delete…` | Create and delete — a version, a comment, a checkpoint | | `open…` | Opens — the document, one of its versions, a link in an external program | | `resolve…` | Two different meanings, visible from the rest of the name: for comments, it marks one resolved; for recovery and external changes, it resolves a conflict by choosing whose edit to keep | | `notify…` | Notifies the shell of an event and doesn’t wait for a response | | `on…` | Subscription: the shell calls you when the event happens | The `apply…` and `compute…CommandState` pairs go together: first you ask for the state, then you apply. A method ending in `Copy` is a special case, covered below. ## Contract methods missing from the source document [Section titled “Contract methods missing from the source document”](#contract-methods-missing-from-the-source-document) These five methods are declared in the shell contract but didn’t make it into the document the reference was compiled from. Their signatures are taken directly from the contract. ```ts openDocxDialog(): Promise<{ canceled: boolean; path: string | null }> reloadCurrentDocx(): Promise<{ reloaded: boolean; canceled: boolean }> createA4DefaultNewDocument(): Promise<{ opened: boolean; canceled: boolean; path: string | null }> openFixture(fixtureKey: string): Promise<{ opened: boolean; canceled: boolean; path: string | null }> openCompareFixture(fixtureKey: string): Promise<{ opened: boolean }> ``` The first three are ordinary document operations: the open dialog, re-reading the current file, and creating a new default one. The last two open samples for internal build checks and aren’t needed for embedding. Ten more methods appeared in the contract after the document — for collaborative editing, the delta frame, and the exact page count. The signatures are also from the contract: ```ts getPersistentDispatchIdentity(): Promise savePersistentRecoverySnapshot(request: { snapshotPath: string; requestId?: string }): Promise<{ sessionId: string; documentId: string; requestId: string; acceptedRevision: number; publishedRevision: number; snapshotPath: string; snapshotHash: string; dirty: boolean }> countDocumentPagesExactly(request: { path: string }): Promise exactPageCountStatus(request: { path: string }): Promise onCanonicalSceneRefreshed(callback: (event: ShellCanonicalSceneRefreshed) => void): () => void onDocumentPatch(callback: (patch: ShellDocumentPatch) => void): () => void declareRendererCapabilities(capabilities: ShellRendererCapabilities): void notifyDocumentPatchOutcome(outcome: ShellDocumentPatchOutcome): void onProbeUnsavedState(callback: (request: { requestId: number }) => void): () => void completeUnsavedStateProbe(result: { requestId: number; unsaved: boolean }): void ``` * `getPersistentDispatchIdentity` — five fields about whose edit is first in the queue, instead of a whole state frame; an old shell responds with a refusal, and then the page takes `getState()`. * `savePersistentRecoverySnapshot` — a recovery snapshot at the given path; the response contains the accepted and published revisions and the snapshot hash. * `countDocumentPagesExactly` and `exactPageCountStatus` — count the pages exactly on a person’s request and find out how the count ended. `counted: false` with a named reason is a valid answer: the number remains an estimate. * `onCanonicalSceneRefreshed` — the scene changed not because of this person’s action: a neighbor’s edit or a deferred read of projections after your own typing. * `onDocumentPatch`, `declareRendererCapabilities`, `notifyDocumentPatchOutcome` — a delta frame for a neighbor’s edit instead of the whole state: the page declares that it can accept one, receives the frame, and reports whether it applied it. * `onProbeUnsavedState` and `completeUnsavedStateProbe` — the shell asks the page whether there is anything unsaved and gets the answer by `requestId`. What `Copy` at the end of a name means This kind of method doesn’t change the open document. It creates a file next to it and applies the action to that copy: the open document and its history stay as they were. Where to write it is set by the `outputPath` field; without it, the shell picks a path itself, next to the source file. So “accepting a change” with `Copy` isn’t an in-place edit — it produces a second file with the change accepted. Editing the open document goes through a different path — session commands, `mutate` and `apply-text-transaction`: [Rust Session Protocol](/reference/sumdoc/session-protocol/). **Methods on this page — 20** * [`clearCompareDocx`](#clearcomparedocx) * [`copyCurrentImageWorkflowImage`](#copycurrentimageworkflowimage) * [`copyShareText`](#copysharetext) * [`exportCurrentDocumentImages`](#exportcurrentdocumentimages) * [`exportCurrentImageWorkflowImages`](#exportcurrentimageworkflowimages) * [`getCurrentDocumentTruth`](#getcurrentdocumenttruth) * [`getCurrentDrawingMlWorkflow`](#getcurrentdrawingmlworkflow) * [`getCurrentImageWorkflow`](#getcurrentimageworkflow) * [`getCurrentImageWorkflowExportPlan`](#getcurrentimageworkflowexportplan) * [`notifyDocumentRendered`](#notifydocumentrendered) * [`openCompareDocxPath`](#opencomparedocxpath) * [`openDocxPath`](#opendocxpath) * [`openEditorV0UserCopyDialog`](#openeditorv0usercopydialog) * [`pathExists`](#pathexists) * [`prepareEditorV0QuickPrintPlan`](#prepareeditorv0quickprintplan) * [`reopenEditorV0TextContinueCopy`](#reopeneditorv0textcontinuecopy) * [`selectCurrentImageWorkflowReplacementImage`](#selectcurrentimageworkflowreplacementimage) * [`selectEditorV0InsertImageObjectImage`](#selecteditorv0insertimageobjectimage) * [`selectEditorV0InsertObjectTextFileSource`](#selecteditorv0insertobjecttextfilesource) * [`writeJsonFile`](#writejsonfile) ### clearCompareDocx [Section titled “clearCompareDocx”](#clearcomparedocx) ```ts clearCompareDocx(): Promise<{ cleared: boolean }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:clear-compare-docx` · `capability=document` ### copyCurrentImageWorkflowImage [Section titled “copyCurrentImageWorkflowImage”](#copycurrentimageworkflowimage) ```ts copyCurrentImageWorkflowImage(request?: ShellExportCurrentImageWorkflowImagesRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:copy-current-image-workflow-image` · `capability=document` ### copyShareText [Section titled “copyShareText”](#copysharetext) ```ts copyShareText(text: string): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:copy-share-text` · `capability=document` ### exportCurrentDocumentImages [Section titled “exportCurrentDocumentImages”](#exportcurrentdocumentimages) ```ts exportCurrentDocumentImages(request: ShellExportCurrentDocumentImagesRequest & { renderedCanvas: ShellSaveRenderedCanvasImagesRequest; }): Promise exportCurrentDocumentImages(request?: ShellExportCurrentDocumentImagesRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:export-current-document-images` · `capability=document` ### exportCurrentImageWorkflowImages [Section titled “exportCurrentImageWorkflowImages”](#exportcurrentimageworkflowimages) ```ts exportCurrentImageWorkflowImages(request?: ShellExportCurrentImageWorkflowImagesRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:export-current-image-workflow-images` · `capability=document` ### getCurrentDocumentTruth [Section titled “getCurrentDocumentTruth”](#getcurrentdocumenttruth) ```ts getCurrentDocumentTruth(): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:get-current-document-truth` · `capability=document` ### getCurrentDrawingMlWorkflow [Section titled “getCurrentDrawingMlWorkflow”](#getcurrentdrawingmlworkflow) ```ts getCurrentDrawingMlWorkflow(): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:get-current-drawingml-workflow` · `capability=document` ### getCurrentImageWorkflow [Section titled “getCurrentImageWorkflow”](#getcurrentimageworkflow) ```ts getCurrentImageWorkflow(): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:get-current-image-workflow` · `capability=document` ### getCurrentImageWorkflowExportPlan [Section titled “getCurrentImageWorkflowExportPlan”](#getcurrentimageworkflowexportplan) ```ts getCurrentImageWorkflowExportPlan(request?: ShellCurrentImageWorkflowExportPlanRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:get-current-image-workflow-export-plan` · `capability=document` ### notifyDocumentRendered [Section titled “notifyDocumentRendered”](#notifydocumentrendered) ```ts notifyDocumentRendered(renderedPath: string | null): void ``` `web_to_host_event` · `send` · `fastdoc-shell:document-rendered` · `capability=document` ### openCompareDocxPath [Section titled “openCompareDocxPath”](#opencomparedocxpath) ```ts openCompareDocxPath(path: string): Promise<{ opened: boolean; path: string }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:open-compare-docx-path` · `capability=document` ### openDocxPath [Section titled “openDocxPath”](#opendocxpath) ```ts openDocxPath(path: string, source?: "file-menu" | "drop" | "recent" | "outline-history"): Promise<{ opened: boolean; canceled: boolean; path: string | null; reentryReceipt?: FileSessionReentryReceipt; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:open-docx-path` · `capability=document` ### openEditorV0UserCopyDialog [Section titled “openEditorV0UserCopyDialog”](#openeditorv0usercopydialog) ```ts openEditorV0UserCopyDialog(request?: { path?: string | null; }): Promise<{ canceled: boolean; path: string | null; text: string | null }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:open-editor-v0-user-copy-dialog` · `capability=document` ### pathExists [Section titled “pathExists”](#pathexists) ```ts pathExists(path: string): Promise<{ path: string; exists: boolean }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:path-exists` · `capability=document` ### prepareEditorV0QuickPrintPlan [Section titled “prepareEditorV0QuickPrintPlan”](#prepareeditorv0quickprintplan) ```ts prepareEditorV0QuickPrintPlan(request?: EditorV0QuickPrintPlanRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:prepare-editor-v0-quick-print-plan` · `capability=document` ### reopenEditorV0TextContinueCopy [Section titled “reopenEditorV0TextContinueCopy”](#reopeneditorv0textcontinuecopy) ```ts reopenEditorV0TextContinueCopy(request?: { outputKind?: | | "editor-v0-text-continue-commands" | "editor-v0-undo" | "editor-v0-redo" | "editor-v0-save-as-dialog" | "editor-v0-save-state" | "editor-v0-nonblocking-typing" | "editor-v0-double-space-period-autocorrect" | "editor-v0-selection-replace" | "editor-v0-selection-edit-2" | "editor-v0-selection-edit-3" | "editor-v0-selection-edit-4" | "editor-v0-save-open-loop" | "editor-v0-autosave-toggle-action" | "editor-v0-open-saved-copy-ui" | "editor-v0-multistep-undo" | "editor-v0-save-copy-shortcuts" | "editor-v0-save-copy-destination-polish" | "editor-v0-save-copy-as-user-path" | "editor-v0-quick-save-copy-action" | "editor-v0-quick-open-copy-action" | "editor-v0-quick-open-docx-action" | "editor-v0-open-user-copy-dialog" | "editor-v0-save-open-recent-copy" | "editor-v0-formatted-run-edit" | "editor-v0-formatted-selection-edit" | "editor-v0-formatted-text-tranche" | "editor-v0-formatted-selection-ui" | "editor-v0-formatted-selection-controls" | "editor-v0-run-boundary-edit" | "editor-v0-run-boundary-edit-controls" | "editor-v0-run-boundary-insert-controls" | "editor-v0-run-boundary-text-input-controls" | "editor-v0-cross-run-selection-input" | "editor-v0-paragraph-split-merge" | "editor-v0-paragraph-text-flow" | "editor-v0-paragraph-text-flow-commands" | "editor-v0-styled-paragraph-flow" | "editor-v0-styled-paragraph-merge-controls" | "editor-v0-styled-paragraph-text-after-merge" | "editor-v0-paragraph-boundary-insert" | "editor-v0-paragraph-boundary-delete-controls" | "editor-v0-user-paragraph-boundary-edit" | "editor-v0-user-paragraph-multiline-flow" | "editor-v0-styled-multiline-boundary-edit" | "editor-v0-toolbar-format-commands-bounded" | "editor-v0-toolbar-format-commands-italic-blue" | "editor-v0-home-chr-tranche2-market" | "editor-v0-font-family-size-commands" | "editor-v0-text-case-toolbar-command" | "editor-v0-format-toolbar-multi-command-chain" | "editor-v0-format-clear-command" | "editor-v0-format-clear-partial-selection" | "editor-v0-format-apply-partial-selection" | "editor-v0-mixed-format-selection-workflow" | "editor-v0-mixed-format-clear-or-paste-rules" | "editor-v0-mixed-format-paste-rules" | "editor-v0-clipboard-copy-cut-paste"; path?: string | null; transientTableEdit?: boolean; canonicalHistoryTransitionKind?: | "table-cell-semantic-undo" | "table-cell-semantic-redo"; expectedClipboardFingerprint?: string | null; expectedDocumentPath?: string | null; canonicalOwnerReceipt?: { schema: "fastdoc.persistent-save-checkpoint-receipt.v1"; sessionId: string; documentId: string; acceptedRevision: number; publishedModelHash: string; targetHash: string; targetIdentity: PublishedTargetIdentity; } | null; }): Promise<{ opened: boolean; path: string; text?: string | null }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:reopen-editor-v0-text-continue-copy` · `capability=document` ### selectCurrentImageWorkflowReplacementImage [Section titled “selectCurrentImageWorkflowReplacementImage”](#selectcurrentimageworkflowreplacementimage) ```ts selectCurrentImageWorkflowReplacementImage(): Promise<{ canceled: boolean; path: string | null; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:select-current-image-workflow-replacement-image` · `capability=document` ### selectEditorV0InsertImageObjectImage [Section titled “selectEditorV0InsertImageObjectImage”](#selecteditorv0insertimageobjectimage) ```ts selectEditorV0InsertImageObjectImage(): Promise<{ canceled: boolean; path: string | null; }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:select-editor-v0-insert-image-object-image` · `capability=document` ### selectEditorV0InsertObjectTextFileSource [Section titled “selectEditorV0InsertObjectTextFileSource”](#selecteditorv0insertobjecttextfilesource) ```ts selectEditorV0InsertObjectTextFileSource(): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:select-editor-v0-insert-object-text-file-source` · `capability=document` ### writeJsonFile [Section titled “writeJsonFile”](#writejsonfile) ```ts writeJsonFile(path: string, data: unknown): Promise<{ path: string; written: boolean; bytes: number }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:write-json-file` · `capability=document` # window.fastdocShell · edit > The largest family: text editing, formatting, tables, clipboard, history. Methods: 118. The largest family: text editing, formatting, tables, clipboard, history. Methods on this page: 118. Internal API `window.fastdocShell` is only available inside the desktop SumDoc window. For external integration, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). How to read the line under the signature Under each method is a line of four values — for example `web_to_host_request_response` · `invoke` · `fastdoc-shell:get-state` · `capability=document`. | Value | What it means | | ------------------------------ | ------------------------------------------------------------------------------- | | `web_to_host_request_response` | The editor window asks the application shell and waits for a response | | `web_to_host_event` | The editor window notifies the shell and doesn’t wait for a response | | `host_to_web_event` | The shell notifies the editor window; you subscribe to these methods | | `invoke`, `send`, `on` | Exchange method: request with a response, send without a response, subscription | | `fastdoc-shell:…` | The name of the channel the message travels on | | `capability=…` | The capability group the method belongs to | All three sets of values are declared in the shell contract: directions in `BridgeDirection`, domains in `ShellContractDomain`, capabilities in `ShellCapability`. The last set doesn’t match the domains: smoke runs and the release center have no capability of their own, so their methods are assigned to `internal` or `document`. The first word of the name tells you what the method does | Start of the name | What happens | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `apply…` | Performs an action and changes the document. The response says what happened | | `compute…CommandState` | Changes nothing: answers whether the action can be performed now (`canApply`) and why not (`disabledReason`). The shell uses this response to decide whether to enable the button | | `run…` | Runs an entire scenario — a compatibility check or a release-readiness check | | `get…`, `list…` | Read state and change nothing | | `set…`, `update…` | Change a setting, not the document’s content | | `create…`, `delete…` | Create and delete — a version, a comment, a checkpoint | | `open…` | Opens — the document, one of its versions, a link in an external program | | `resolve…` | Two different meanings, visible from the rest of the name: for comments, it marks one resolved; for recovery and external changes, it resolves a conflict by choosing whose edit to keep | | `notify…` | Notifies the shell of an event and doesn’t wait for a response | | `on…` | Subscription: the shell calls you when the event happens | The `apply…` and `compute…CommandState` pairs go together: first you ask for the state, then you apply. A method ending in `Copy` is a special case, covered below. Methods on this page — 118 * [`applyD36CombinedSectionCommand`](#applyd36combinedsectioncommand) * [`applyD36HeaderFooterEditModeSave`](#applyd36headerfootereditmodesave) * [`applyD36HeaderFooterMarketWorkflow`](#applyd36headerfootermarketworkflow) * [`applyD36HeaderFooterRemove`](#applyd36headerfooterremove) * [`applyD36HyphenationWriteback`](#applyd36hyphenationwriteback) * [`applyD36LineNumbersContinuousWriteback`](#applyd36linenumberscontinuouswriteback) * [`applyD36SectionPresetVisibleWorkflow`](#applyd36sectionpresetvisibleworkflow) * [`applyDesignToolsWriteback`](#applydesigntoolswriteback) * [`applyEditorV0AddTextAction`](#applyeditorv0addtextaction) * [`applyEditorV0BibliographyCommandAction`](#applyeditorv0bibliographycommandaction) * [`applyEditorV0BibliographyStyleAction`](#applyeditorv0bibliographystyleaction) * [`applyEditorV0ContentControlsAction`](#applyeditorv0contentcontrolsaction) * [`applyEditorV0ConvertTextToTable`](#applyeditorv0converttexttotable) * [`applyEditorV0DeleteDrawingObjectAction`](#applyeditorv0deletedrawingobjectaction) * [`applyEditorV0DistributeDrawingObjectsAction`](#applyeditorv0distributedrawingobjectsaction) * [`applyEditorV0Doc001005MarketRouteAction`](#applyeditorv0doc001005marketrouteaction) * [`applyEditorV0Doc006015MarketRouteAction`](#applyeditorv0doc006015marketrouteaction) * [`applyEditorV0Doc016025MarketRouteAction`](#applyeditorv0doc016025marketrouteaction) * [`applyEditorV0EditDrawingObjectTextAction`](#applyeditorv0editdrawingobjecttextaction) * [`applyEditorV0EditEquationObjectAction`](#applyeditorv0editequationobjectaction) * [`applyEditorV0EditingReplaceAllCommand`](#applyeditorv0editingreplaceallcommand) * [`applyEditorV0EditingReplaceFirstCommand`](#applyeditorv0editingreplacefirstcommand) * [`applyEditorV0FormsFieldsBusinessAction`](#applyeditorv0formsfieldsbusinessaction) * [`applyEditorV0GroupDrawingObjectsAction`](#applyeditorv0groupdrawingobjectsaction) * [`applyEditorV0IndexAuthoritiesCommandAction`](#applyeditorv0indexauthoritiescommandaction) * [`applyEditorV0InsertBookmarkAction`](#applyeditorv0insertbookmarkaction) * [`applyEditorV0InsertBreakAction`](#applyeditorv0insertbreakaction) * [`applyEditorV0InsertCrossReferenceAction`](#applyeditorv0insertcrossreferenceaction) * [`applyEditorV0InsertDateFieldAction`](#applyeditorv0insertdatefieldaction) * [`applyEditorV0InsertDateTimeFieldAction`](#applyeditorv0insertdatetimefieldaction) * [`applyEditorV0InsertDropCapAction`](#applyeditorv0insertdropcapaction) * [`applyEditorV0InsertEndnoteAction`](#applyeditorv0insertendnoteaction) * [`applyEditorV0InsertEquationObjectAction`](#applyeditorv0insertequationobjectaction) * [`applyEditorV0InsertFootnoteAction`](#applyeditorv0insertfootnoteaction) * [`applyEditorV0InsertHyperlinkAction`](#applyeditorv0inserthyperlinkaction) * [`applyEditorV0InsertImageObjectAction`](#applyeditorv0insertimageobjectaction) * [`applyEditorV0InsertShapeObjectAction`](#applyeditorv0insertshapeobjectaction) * [`applyEditorV0InsertTableCaptionAction`](#applyeditorv0inserttablecaptionaction) * [`applyEditorV0InsertTextBoxObjectAction`](#applyeditorv0inserttextboxobjectaction) * [`applyEditorV0InsertTocAction`](#applyeditorv0inserttocaction) * [`applyEditorV0ManageNoteAction`](#applyeditorv0managenoteaction) * [`applyEditorV0MoveDrawingObjectAction`](#applyeditorv0movedrawingobjectaction) * [`applyEditorV0ParagraphBorderCommand`](#applyeditorv0paragraphbordercommand) * [`applyEditorV0ParagraphFillCommand`](#applyeditorv0paragraphfillcommand) * [`applyEditorV0ParagraphLayoutBatchCommand`](#applyeditorv0paragraphlayoutbatchcommand) * [`applyEditorV0ParagraphLayoutCommand`](#applyeditorv0paragraphlayoutcommand) * [`applyEditorV0ParagraphSortCommand`](#applyeditorv0paragraphsortcommand) * [`applyEditorV0ParagraphStructure`](#applyeditorv0paragraphstructure) * [`applyEditorV0RemoveTocAction`](#applyeditorv0removetocaction) * [`applyEditorV0ResizeDrawingObjectAction`](#applyeditorv0resizedrawingobjectaction) * [`applyEditorV0SectionPageMarginsCommand`](#applyeditorv0sectionpagemarginscommand) * [`applyEditorV0SectionPageSetupPreset`](#applyeditorv0sectionpagesetuppreset) * [`applyEditorV0SetDrawingObjectAnchorLockAction`](#applyeditorv0setdrawingobjectanchorlockaction) * [`applyEditorV0SetDrawingObjectStyleAction`](#applyeditorv0setdrawingobjectstyleaction) * [`applyEditorV0TableOfFiguresAction`](#applyeditorv0tableoffiguresaction) * [`applyEditorV0ToolbarFormatBatchCommand`](#applyeditorv0toolbarformatbatchcommand) * [`applyEditorV0ToolbarFormatCommand`](#applyeditorv0toolbarformatcommand) * [`applyEditorV0UngroupDrawingObjectAction`](#applyeditorv0ungroupdrawingobjectaction) * [`applyEditorV0UpdateCrossReferenceFieldResultAction`](#applyeditorv0updatecrossreferencefieldresultaction) * [`applyEditorV0UpdateDateFieldResultAction`](#applyeditorv0updatedatefieldresultaction) * [`applyEditorV0UpdateSequenceFieldResultAction`](#applyeditorv0updatesequencefieldresultaction) * [`applyEditorV0UpdateStyleFromSelectionCommand`](#applyeditorv0updatestylefromselectioncommand) * [`applyEditorV0UpdateTableAction`](#applyeditorv0updatetableaction) * [`applyEditorV0UpdateTableOfFiguresAction`](#applyeditorv0updatetableoffiguresaction) * [`applyFieldToolsWriteback`](#applyfieldtoolswriteback) * [`applyFileInterchangeAction`](#applyfileinterchangeaction) * [`applyInsertExtendedWriteback`](#applyinsertextendedwriteback) * [`applyTableAlignment`](#applytablealignment) * [`applyTableAltText`](#applytablealttext) * [`applyTableAutofitToWindow`](#applytableautofittowindow) * [`applyTableCellContentAlignment`](#applytablecellcontentalignment) * [`applyTableCellExactSize`](#applytablecellexactsize) * [`applyTableCellMargins`](#applytablecellmargins) * [`applyTableCellRangeFormat`](#applytablecellrangeformat) * [`applyTableCellSpacing`](#applytablecellspacing) * [`applyTableCellTextDirection`](#applytablecelltextdirection) * [`applyTableCellTextWrapping`](#applytablecelltextwrapping) * [`applyTableCellVerticalAlignment`](#applytablecellverticalalignment) * [`applyTableColumnAutofit`](#applytablecolumnautofit) * [`applyTableDataCommand`](#applytabledatacommand) * [`applyTableDimensions`](#applytabledimensions) * [`applyTableFixedColumnWidth`](#applytablefixedcolumnwidth) * [`applyTableFloatingPosition`](#applytablefloatingposition) * [`applyTableHeaderRepeat`](#applytableheaderrepeat) * [`applyTableHeaderRow`](#applytableheaderrow) * [`applyTablePencilEraserSemantic`](#applytablepencilerasersemantic) * [`applyTableSelectionAlignment`](#applytableselectionalignment) * [`applyTableSelectionAllBorders`](#applytableselectionallborders) * [`applyTableSelectionCellRangeFormat`](#applytableselectioncellrangeformat) * [`applyTableSelectionClearContentFormat`](#applytableselectionclearcontentformat) * [`applyTableSelectionClearContents`](#applytableselectionclearcontents) * [`applyTableSelectionClearFill`](#applytableselectionclearfill) * [`applyTableSelectionClearFormatting`](#applytableselectionclearformatting) * [`applyTableSelectionColumnAutofit`](#applytableselectioncolumnautofit) * [`applyTableSelectionHeaderRepeat`](#applytableselectionheaderrepeat) * [`applyTableSelectionInsideBorders`](#applytableselectioninsideborders) * [`applyTableSelectionOutsideBorders`](#applytableselectionoutsideborders) * [`applyTableSelectionPencilEraser`](#applytableselectionpencileraser) * [`applyTableSelectionRowFit`](#applytableselectionrowfit) * [`applyTableSelectionStructureEdit`](#applytableselectionstructureedit) * [`applyTableSelectionWidthFit`](#applytableselectionwidthfit) * [`applyTableStructureEdit`](#applytablestructureedit) * [`applyTableStyle`](#applytablestyle) * [`applyTableTemplate`](#applytabletemplate) * [`applyTableWidth`](#applytablewidth) * [`applyTableWrappingStyle`](#applytablewrappingstyle) * [`compressCurrentImageWorkflowImage`](#compresscurrentimageworkflowimage) * [`copyTableCellRange`](#copytablecellrange) * [`createMouseDrawnTableFromSemanticIntent`](#createmousedrawntablefromsemanticintent) * [`createTableGrid`](#createtablegrid) * [`equalizeTableDimensions`](#equalizetabledimensions) * [`equalizeTableSelectionColumns`](#equalizetableselectioncolumns) * [`insertBoundedLiveText`](#insertboundedlivetext) * [`pasteTableCellRange`](#pastetablecellrange) * [`replaceCurrentImageWorkflowImage`](#replacecurrentimageworkflowimage) * [`resizeTableSelection`](#resizetableselection) * [`saveBoundedLiveTextCopyAs`](#saveboundedlivetextcopyas) * [`saveBoundedLiveTextDraft`](#saveboundedlivetextdraft) ### applyD36CombinedSectionCommand [Section titled “applyD36CombinedSectionCommand”](#applyd36combinedsectioncommand) ```ts applyD36CombinedSectionCommand(request: D36CombinedSectionCommandRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-d36-combined-section-command` · `capability=edit` ### applyD36HeaderFooterEditModeSave [Section titled “applyD36HeaderFooterEditModeSave”](#applyd36headerfootereditmodesave) ```ts applyD36HeaderFooterEditModeSave(request: D36HeaderFooterEditModeSaveRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-d36-header-footer-edit-mode-save` · `capability=edit` ### applyD36HeaderFooterMarketWorkflow [Section titled “applyD36HeaderFooterMarketWorkflow”](#applyd36headerfootermarketworkflow) ```ts applyD36HeaderFooterMarketWorkflow(request: D36HeaderFooterMarketRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-d36-header-footer-market-workflow` · `capability=edit` ### applyD36HeaderFooterRemove [Section titled “applyD36HeaderFooterRemove”](#applyd36headerfooterremove) ```ts applyD36HeaderFooterRemove(request: D36HeaderFooterRemoveRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-d36-header-footer-remove` · `capability=edit` ### applyD36HyphenationWriteback [Section titled “applyD36HyphenationWriteback”](#applyd36hyphenationwriteback) ```ts applyD36HyphenationWriteback(request: D36HyphenationRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-d36-hyphenation-writeback` · `capability=edit` ### applyD36LineNumbersContinuousWriteback [Section titled “applyD36LineNumbersContinuousWriteback”](#applyd36linenumberscontinuouswriteback) ```ts applyD36LineNumbersContinuousWriteback(request: D36LineNumbersContinuousRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-d36-line-numbers-continuous-writeback` · `capability=edit` ### applyD36SectionPresetVisibleWorkflow [Section titled “applyD36SectionPresetVisibleWorkflow”](#applyd36sectionpresetvisibleworkflow) ```ts applyD36SectionPresetVisibleWorkflow(request: D36SectionPresetVisibleWorkflowRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-d36-section-preset-visible-workflow` · `capability=edit` ### applyDesignToolsWriteback [Section titled “applyDesignToolsWriteback”](#applydesigntoolswriteback) ```ts applyDesignToolsWriteback(request: ShellDesignToolsWritebackRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-design-tools-writeback` · `capability=edit` ### applyEditorV0AddTextAction [Section titled “applyEditorV0AddTextAction”](#applyeditorv0addtextaction) ```ts applyEditorV0AddTextAction(request: EditorV0AddTextRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-add-text-action` · `capability=edit` ### applyEditorV0BibliographyCommandAction [Section titled “applyEditorV0BibliographyCommandAction”](#applyeditorv0bibliographycommandaction) ```ts applyEditorV0BibliographyCommandAction(request: EditorV0BibliographyCommandRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-bibliography-command-action` · `capability=edit` ### applyEditorV0BibliographyStyleAction [Section titled “applyEditorV0BibliographyStyleAction”](#applyeditorv0bibliographystyleaction) ```ts applyEditorV0BibliographyStyleAction(request: EditorV0BibliographyStyleRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-bibliography-style-action` · `capability=edit` ### applyEditorV0ContentControlsAction [Section titled “applyEditorV0ContentControlsAction”](#applyeditorv0contentcontrolsaction) ```ts applyEditorV0ContentControlsAction(request: EditorV0ContentControlsRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-content-controls-action` · `capability=edit` ### applyEditorV0ConvertTextToTable [Section titled “applyEditorV0ConvertTextToTable”](#applyeditorv0converttexttotable) ```ts applyEditorV0ConvertTextToTable(request: EditorV0ConvertTextToTableRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-convert-text-to-table` · `capability=edit` ### applyEditorV0DeleteDrawingObjectAction [Section titled “applyEditorV0DeleteDrawingObjectAction”](#applyeditorv0deletedrawingobjectaction) ```ts applyEditorV0DeleteDrawingObjectAction(request: EditorV0DeleteDrawingObjectRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-delete-drawing-object-action` · `capability=edit` ### applyEditorV0DistributeDrawingObjectsAction [Section titled “applyEditorV0DistributeDrawingObjectsAction”](#applyeditorv0distributedrawingobjectsaction) ```ts applyEditorV0DistributeDrawingObjectsAction(request: EditorV0DistributeDrawingObjectsRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-distribute-drawing-objects-action` · `capability=edit` ### applyEditorV0Doc001005MarketRouteAction [Section titled “applyEditorV0Doc001005MarketRouteAction”](#applyeditorv0doc001005marketrouteaction) ```ts applyEditorV0Doc001005MarketRouteAction(request: EditorV0Doc001005MarketRouteRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-doc-001-005-market-route-action` · `capability=edit` ### applyEditorV0Doc006015MarketRouteAction [Section titled “applyEditorV0Doc006015MarketRouteAction”](#applyeditorv0doc006015marketrouteaction) ```ts applyEditorV0Doc006015MarketRouteAction(request: EditorV0Doc006015MarketRouteRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-doc-006-015-market-route-action` · `capability=edit` ### applyEditorV0Doc016025MarketRouteAction [Section titled “applyEditorV0Doc016025MarketRouteAction”](#applyeditorv0doc016025marketrouteaction) ```ts applyEditorV0Doc016025MarketRouteAction(request: EditorV0Doc016025MarketRouteRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-doc-016-025-market-route-action` · `capability=edit` ### applyEditorV0EditDrawingObjectTextAction [Section titled “applyEditorV0EditDrawingObjectTextAction”](#applyeditorv0editdrawingobjecttextaction) ```ts applyEditorV0EditDrawingObjectTextAction(request: EditorV0EditDrawingObjectTextRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-edit-drawing-object-text-action` · `capability=edit` ### applyEditorV0EditEquationObjectAction [Section titled “applyEditorV0EditEquationObjectAction”](#applyeditorv0editequationobjectaction) ```ts applyEditorV0EditEquationObjectAction(request: EditorV0EditEquationObjectRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-edit-equation-object-action` · `capability=edit` ### applyEditorV0EditingReplaceAllCommand [Section titled “applyEditorV0EditingReplaceAllCommand”](#applyeditorv0editingreplaceallcommand) ```ts applyEditorV0EditingReplaceAllCommand(request: EditorV0EditingReplaceAllRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-editing-replace-all-command` · `capability=edit` ### applyEditorV0EditingReplaceFirstCommand [Section titled “applyEditorV0EditingReplaceFirstCommand”](#applyeditorv0editingreplacefirstcommand) ```ts applyEditorV0EditingReplaceFirstCommand(request: EditorV0EditingReplaceFirstRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-editing-replace-first-command` · `capability=edit` ### applyEditorV0FormsFieldsBusinessAction [Section titled “applyEditorV0FormsFieldsBusinessAction”](#applyeditorv0formsfieldsbusinessaction) ```ts applyEditorV0FormsFieldsBusinessAction(request: EditorV0FormsFieldsBusinessRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-forms-fields-business-action` · `capability=edit` ### applyEditorV0GroupDrawingObjectsAction [Section titled “applyEditorV0GroupDrawingObjectsAction”](#applyeditorv0groupdrawingobjectsaction) ```ts applyEditorV0GroupDrawingObjectsAction(request: EditorV0GroupDrawingObjectsRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-group-drawing-objects-action` · `capability=edit` ### applyEditorV0IndexAuthoritiesCommandAction [Section titled “applyEditorV0IndexAuthoritiesCommandAction”](#applyeditorv0indexauthoritiescommandaction) ```ts applyEditorV0IndexAuthoritiesCommandAction(request: EditorV0IndexAuthoritiesCommandRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-index-authorities-command-action` · `capability=edit` ### applyEditorV0InsertBookmarkAction [Section titled “applyEditorV0InsertBookmarkAction”](#applyeditorv0insertbookmarkaction) ```ts applyEditorV0InsertBookmarkAction(request: EditorV0InsertBookmarkRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-insert-bookmark-action` · `capability=edit` ### applyEditorV0InsertBreakAction [Section titled “applyEditorV0InsertBreakAction”](#applyeditorv0insertbreakaction) ```ts applyEditorV0InsertBreakAction(request: EditorV0InsertBreakRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-insert-break-action` · `capability=edit` ### applyEditorV0InsertCrossReferenceAction [Section titled “applyEditorV0InsertCrossReferenceAction”](#applyeditorv0insertcrossreferenceaction) ```ts applyEditorV0InsertCrossReferenceAction(request: EditorV0InsertCrossReferenceRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-insert-cross-reference-action` · `capability=edit` ### applyEditorV0InsertDateFieldAction [Section titled “applyEditorV0InsertDateFieldAction”](#applyeditorv0insertdatefieldaction) ```ts applyEditorV0InsertDateFieldAction(request: EditorV0InsertDateFieldRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-insert-date-field-action` · `capability=edit` ### applyEditorV0InsertDateTimeFieldAction [Section titled “applyEditorV0InsertDateTimeFieldAction”](#applyeditorv0insertdatetimefieldaction) ```ts applyEditorV0InsertDateTimeFieldAction(request: EditorV0InsertDateTimeFieldRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-insert-date-time-field-action` · `capability=edit` ### applyEditorV0InsertDropCapAction [Section titled “applyEditorV0InsertDropCapAction”](#applyeditorv0insertdropcapaction) ```ts applyEditorV0InsertDropCapAction(request: EditorV0InsertDropCapRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-insert-drop-cap-action` · `capability=edit` ### applyEditorV0InsertEndnoteAction [Section titled “applyEditorV0InsertEndnoteAction”](#applyeditorv0insertendnoteaction) ```ts applyEditorV0InsertEndnoteAction(request: EditorV0InsertEndnoteRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-insert-endnote-action` · `capability=edit` ### applyEditorV0InsertEquationObjectAction [Section titled “applyEditorV0InsertEquationObjectAction”](#applyeditorv0insertequationobjectaction) ```ts applyEditorV0InsertEquationObjectAction(request: EditorV0InsertEquationObjectRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-insert-equation-object-action` · `capability=edit` ### applyEditorV0InsertFootnoteAction [Section titled “applyEditorV0InsertFootnoteAction”](#applyeditorv0insertfootnoteaction) ```ts applyEditorV0InsertFootnoteAction(request: EditorV0InsertFootnoteRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-insert-footnote-action` · `capability=edit` ### applyEditorV0InsertHyperlinkAction [Section titled “applyEditorV0InsertHyperlinkAction”](#applyeditorv0inserthyperlinkaction) ```ts applyEditorV0InsertHyperlinkAction(request: EditorV0InsertHyperlinkRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-insert-hyperlink-action` · `capability=edit` ### applyEditorV0InsertImageObjectAction [Section titled “applyEditorV0InsertImageObjectAction”](#applyeditorv0insertimageobjectaction) ```ts applyEditorV0InsertImageObjectAction(request: EditorV0InsertImageObjectRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-insert-image-object-action` · `capability=edit` ### applyEditorV0InsertShapeObjectAction [Section titled “applyEditorV0InsertShapeObjectAction”](#applyeditorv0insertshapeobjectaction) ```ts applyEditorV0InsertShapeObjectAction(request: EditorV0InsertShapeObjectRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-insert-shape-object-action` · `capability=edit` ### applyEditorV0InsertTableCaptionAction [Section titled “applyEditorV0InsertTableCaptionAction”](#applyeditorv0inserttablecaptionaction) ```ts applyEditorV0InsertTableCaptionAction(request: EditorV0InsertTableCaptionRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-insert-table-caption-action` · `capability=edit` ### applyEditorV0InsertTextBoxObjectAction [Section titled “applyEditorV0InsertTextBoxObjectAction”](#applyeditorv0inserttextboxobjectaction) ```ts applyEditorV0InsertTextBoxObjectAction(request: EditorV0InsertTextBoxObjectRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-insert-textbox-object-action` · `capability=edit` ### applyEditorV0InsertTocAction [Section titled “applyEditorV0InsertTocAction”](#applyeditorv0inserttocaction) ```ts applyEditorV0InsertTocAction(request: EditorV0UpdateTableRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-insert-toc-action` · `capability=edit` ### applyEditorV0ManageNoteAction [Section titled “applyEditorV0ManageNoteAction”](#applyeditorv0managenoteaction) ```ts applyEditorV0ManageNoteAction(request: EditorV0ManageNoteRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-manage-note-action` · `capability=edit` ### applyEditorV0MoveDrawingObjectAction [Section titled “applyEditorV0MoveDrawingObjectAction”](#applyeditorv0movedrawingobjectaction) ```ts applyEditorV0MoveDrawingObjectAction(request: EditorV0MoveDrawingObjectRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-move-drawing-object-action` · `capability=edit` ### applyEditorV0ParagraphBorderCommand [Section titled “applyEditorV0ParagraphBorderCommand”](#applyeditorv0paragraphbordercommand) ```ts applyEditorV0ParagraphBorderCommand(request: EditorV0ParagraphBorderCommandRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-paragraph-border-command` · `capability=edit` ### applyEditorV0ParagraphFillCommand [Section titled “applyEditorV0ParagraphFillCommand”](#applyeditorv0paragraphfillcommand) ```ts applyEditorV0ParagraphFillCommand(request: EditorV0ParagraphFillCommandRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-paragraph-fill-command` · `capability=edit` ### applyEditorV0ParagraphLayoutBatchCommand [Section titled “applyEditorV0ParagraphLayoutBatchCommand”](#applyeditorv0paragraphlayoutbatchcommand) ```ts applyEditorV0ParagraphLayoutBatchCommand(request: EditorV0ParagraphLayoutBatchCommandRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-paragraph-layout-batch-command` · `capability=edit` ### applyEditorV0ParagraphLayoutCommand [Section titled “applyEditorV0ParagraphLayoutCommand”](#applyeditorv0paragraphlayoutcommand) ```ts applyEditorV0ParagraphLayoutCommand(request: EditorV0ParagraphLayoutCommandRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-paragraph-layout-command` · `capability=edit` ### applyEditorV0ParagraphSortCommand [Section titled “applyEditorV0ParagraphSortCommand”](#applyeditorv0paragraphsortcommand) ```ts applyEditorV0ParagraphSortCommand(request: EditorV0ParagraphSortCommandRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-paragraph-sort-command` · `capability=edit` ### applyEditorV0ParagraphStructure [Section titled “applyEditorV0ParagraphStructure”](#applyeditorv0paragraphstructure) ```ts applyEditorV0ParagraphStructure(request: EditorV0ParagraphStructureRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-paragraph-structure` · `capability=edit` ### applyEditorV0RemoveTocAction [Section titled “applyEditorV0RemoveTocAction”](#applyeditorv0removetocaction) ```ts applyEditorV0RemoveTocAction(request: EditorV0UpdateTableRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-remove-toc-action` · `capability=edit` ### applyEditorV0ResizeDrawingObjectAction [Section titled “applyEditorV0ResizeDrawingObjectAction”](#applyeditorv0resizedrawingobjectaction) ```ts applyEditorV0ResizeDrawingObjectAction(request: EditorV0ResizeDrawingObjectRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-resize-drawing-object-action` · `capability=edit` ### applyEditorV0SectionPageMarginsCommand [Section titled “applyEditorV0SectionPageMarginsCommand”](#applyeditorv0sectionpagemarginscommand) ```ts applyEditorV0SectionPageMarginsCommand(request: EditorV0SectionPageMarginsCommandRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-section-page-margins-command` · `capability=edit` ### applyEditorV0SectionPageSetupPreset [Section titled “applyEditorV0SectionPageSetupPreset”](#applyeditorv0sectionpagesetuppreset) ```ts applyEditorV0SectionPageSetupPreset(request: EditorV0SectionPageSetupPresetRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-section-page-setup-preset` · `capability=edit` ### applyEditorV0SetDrawingObjectAnchorLockAction [Section titled “applyEditorV0SetDrawingObjectAnchorLockAction”](#applyeditorv0setdrawingobjectanchorlockaction) ```ts applyEditorV0SetDrawingObjectAnchorLockAction(request: EditorV0SetDrawingObjectAnchorLockRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-set-drawing-object-anchor-lock-action` · `capability=edit` ### applyEditorV0SetDrawingObjectStyleAction [Section titled “applyEditorV0SetDrawingObjectStyleAction”](#applyeditorv0setdrawingobjectstyleaction) ```ts applyEditorV0SetDrawingObjectStyleAction(request: EditorV0SetDrawingObjectStyleRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-set-drawing-object-style-action` · `capability=edit` ### applyEditorV0TableOfFiguresAction [Section titled “applyEditorV0TableOfFiguresAction”](#applyeditorv0tableoffiguresaction) ```ts applyEditorV0TableOfFiguresAction(request: EditorV0TableOfFiguresRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-table-of-figures-action` · `capability=edit` ### applyEditorV0ToolbarFormatBatchCommand [Section titled “applyEditorV0ToolbarFormatBatchCommand”](#applyeditorv0toolbarformatbatchcommand) ```ts applyEditorV0ToolbarFormatBatchCommand(request: EditorV0ToolbarFormatBatchCommandRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-toolbar-format-batch-command` · `capability=edit` ### applyEditorV0ToolbarFormatCommand [Section titled “applyEditorV0ToolbarFormatCommand”](#applyeditorv0toolbarformatcommand) ```ts applyEditorV0ToolbarFormatCommand(request: EditorV0ToolbarFormatCommandRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-toolbar-format-command` · `capability=edit` ### applyEditorV0UngroupDrawingObjectAction [Section titled “applyEditorV0UngroupDrawingObjectAction”](#applyeditorv0ungroupdrawingobjectaction) ```ts applyEditorV0UngroupDrawingObjectAction(request: EditorV0UngroupDrawingObjectRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-ungroup-drawing-object-action` · `capability=edit` ### applyEditorV0UpdateCrossReferenceFieldResultAction [Section titled “applyEditorV0UpdateCrossReferenceFieldResultAction”](#applyeditorv0updatecrossreferencefieldresultaction) ```ts applyEditorV0UpdateCrossReferenceFieldResultAction(request: EditorV0UpdateCrossReferenceFieldResultRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-update-cross-reference-field-result-action` · `capability=edit` ### applyEditorV0UpdateDateFieldResultAction [Section titled “applyEditorV0UpdateDateFieldResultAction”](#applyeditorv0updatedatefieldresultaction) ```ts applyEditorV0UpdateDateFieldResultAction(request: EditorV0UpdateDateFieldResultRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-update-date-field-result-action` · `capability=edit` ### applyEditorV0UpdateSequenceFieldResultAction [Section titled “applyEditorV0UpdateSequenceFieldResultAction”](#applyeditorv0updatesequencefieldresultaction) ```ts applyEditorV0UpdateSequenceFieldResultAction(request: EditorV0UpdateSequenceFieldResultRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-update-sequence-field-result-action` · `capability=edit` ### applyEditorV0UpdateStyleFromSelectionCommand [Section titled “applyEditorV0UpdateStyleFromSelectionCommand”](#applyeditorv0updatestylefromselectioncommand) ```ts applyEditorV0UpdateStyleFromSelectionCommand(request: EditorV0UpdateStyleFromSelectionRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-update-style-from-selection-command` · `capability=edit` ### applyEditorV0UpdateTableAction [Section titled “applyEditorV0UpdateTableAction”](#applyeditorv0updatetableaction) ```ts applyEditorV0UpdateTableAction(request: EditorV0UpdateTableRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-update-table-action` · `capability=edit` ### applyEditorV0UpdateTableOfFiguresAction [Section titled “applyEditorV0UpdateTableOfFiguresAction”](#applyeditorv0updatetableoffiguresaction) ```ts applyEditorV0UpdateTableOfFiguresAction(request: EditorV0TableOfFiguresRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-editor-v0-update-table-of-figures-action` · `capability=edit` ### applyFieldToolsWriteback [Section titled “applyFieldToolsWriteback”](#applyfieldtoolswriteback) ```ts applyFieldToolsWriteback(request: ShellFieldToolsWritebackRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-field-tools-writeback` · `capability=edit` ### applyFileInterchangeAction [Section titled “applyFileInterchangeAction”](#applyfileinterchangeaction) ```ts applyFileInterchangeAction(request: ShellFileInterchangeActionRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-file-interchange-action` · `capability=edit` ### applyInsertExtendedWriteback [Section titled “applyInsertExtendedWriteback”](#applyinsertextendedwriteback) ```ts applyInsertExtendedWriteback(request: ShellInsertExtendedWritebackRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-insert-extended-writeback` · `capability=edit` ### applyTableAlignment [Section titled “applyTableAlignment”](#applytablealignment) ```ts applyTableAlignment(request: D37TableAlignmentRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-alignment` · `capability=edit` ### applyTableAltText [Section titled “applyTableAltText”](#applytablealttext) ```ts applyTableAltText(request: D37TableAltTextRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-alt-text` · `capability=edit` ### applyTableAutofitToWindow [Section titled “applyTableAutofitToWindow”](#applytableautofittowindow) ```ts applyTableAutofitToWindow(request: D37TableAutofitToWindowRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-autofit-to-window` · `capability=edit` ### applyTableCellContentAlignment [Section titled “applyTableCellContentAlignment”](#applytablecellcontentalignment) ```ts applyTableCellContentAlignment(request: D37TableCellContentAlignmentRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-cell-content-alignment` · `capability=edit` ### applyTableCellExactSize [Section titled “applyTableCellExactSize”](#applytablecellexactsize) ```ts applyTableCellExactSize(request: D37TableCellExactSizeRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-cell-exact-size` · `capability=edit` ### applyTableCellMargins [Section titled “applyTableCellMargins”](#applytablecellmargins) ```ts applyTableCellMargins(request: D37TableCellMarginsRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-cell-margins` · `capability=edit` ### applyTableCellRangeFormat [Section titled “applyTableCellRangeFormat”](#applytablecellrangeformat) ```ts applyTableCellRangeFormat(request: D37TableCellRangeFormatRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-cell-range-format` · `capability=edit` ### applyTableCellSpacing [Section titled “applyTableCellSpacing”](#applytablecellspacing) ```ts applyTableCellSpacing(request: D37TableCellSpacingRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-cell-spacing` · `capability=edit` ### applyTableCellTextDirection [Section titled “applyTableCellTextDirection”](#applytablecelltextdirection) ```ts applyTableCellTextDirection(request: D37TableCellTextDirectionRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-cell-text-direction` · `capability=edit` ### applyTableCellTextWrapping [Section titled “applyTableCellTextWrapping”](#applytablecelltextwrapping) ```ts applyTableCellTextWrapping(request: D37TableCellTextWrappingRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-cell-text-wrapping` · `capability=edit` ### applyTableCellVerticalAlignment [Section titled “applyTableCellVerticalAlignment”](#applytablecellverticalalignment) ```ts applyTableCellVerticalAlignment(request: D37TableCellVerticalAlignmentRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-cell-vertical-alignment` · `capability=edit` ### applyTableColumnAutofit [Section titled “applyTableColumnAutofit”](#applytablecolumnautofit) ```ts applyTableColumnAutofit(request: D37TableColumnAutofitRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-column-autofit` · `capability=edit` ### applyTableDataCommand [Section titled “applyTableDataCommand”](#applytabledatacommand) ```ts applyTableDataCommand(request: D37TableDataCommandRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-data-command` · `capability=edit` ### applyTableDimensions [Section titled “applyTableDimensions”](#applytabledimensions) ```ts applyTableDimensions(request: D37TableDimensionsRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-dimensions` · `capability=edit` ### applyTableFixedColumnWidth [Section titled “applyTableFixedColumnWidth”](#applytablefixedcolumnwidth) ```ts applyTableFixedColumnWidth(request: D37TableFixedColumnWidthRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-fixed-column-width` · `capability=edit` ### applyTableFloatingPosition [Section titled “applyTableFloatingPosition”](#applytablefloatingposition) ```ts applyTableFloatingPosition(request: D37TableFloatingPositionRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-floating-position` · `capability=edit` ### applyTableHeaderRepeat [Section titled “applyTableHeaderRepeat”](#applytableheaderrepeat) ```ts applyTableHeaderRepeat(request: D37TableHeaderRepeatRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-header-repeat` · `capability=edit` ### applyTableHeaderRow [Section titled “applyTableHeaderRow”](#applytableheaderrow) ```ts applyTableHeaderRow(request: D37TableHeaderRowRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-header-row` · `capability=edit` ### applyTablePencilEraserSemantic [Section titled “applyTablePencilEraserSemantic”](#applytablepencilerasersemantic) ```ts applyTablePencilEraserSemantic(request: D37TablePencilEraserSemanticRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-pencil-eraser-semantic` · `capability=edit` ### applyTableSelectionAlignment [Section titled “applyTableSelectionAlignment”](#applytableselectionalignment) ```ts applyTableSelectionAlignment(request: D37TableSelectionAlignmentRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-selection-alignment` · `capability=edit` ### applyTableSelectionAllBorders [Section titled “applyTableSelectionAllBorders”](#applytableselectionallborders) ```ts applyTableSelectionAllBorders(request: D37TableSelectionAllBordersRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-selection-all-borders` · `capability=edit` ### applyTableSelectionCellRangeFormat [Section titled “applyTableSelectionCellRangeFormat”](#applytableselectioncellrangeformat) ```ts applyTableSelectionCellRangeFormat(request: D37TableSelectionCellRangeFormatRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-selection-cell-range-format` · `capability=edit` ### applyTableSelectionClearContentFormat [Section titled “applyTableSelectionClearContentFormat”](#applytableselectionclearcontentformat) ```ts applyTableSelectionClearContentFormat(request: D37TableSelectionClearContentFormatRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-selection-clear-content-format` · `capability=edit` ### applyTableSelectionClearContents [Section titled “applyTableSelectionClearContents”](#applytableselectionclearcontents) ```ts applyTableSelectionClearContents(request: D37TableSelectionClearContentsRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-selection-clear-contents` · `capability=edit` ### applyTableSelectionClearFill [Section titled “applyTableSelectionClearFill”](#applytableselectionclearfill) ```ts applyTableSelectionClearFill(request: D37TableSelectionClearFillRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-selection-clear-fill` · `capability=edit` ### applyTableSelectionClearFormatting [Section titled “applyTableSelectionClearFormatting”](#applytableselectionclearformatting) ```ts applyTableSelectionClearFormatting(request: D37TableSelectionClearFormattingRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-selection-clear-formatting` · `capability=edit` ### applyTableSelectionColumnAutofit [Section titled “applyTableSelectionColumnAutofit”](#applytableselectioncolumnautofit) ```ts applyTableSelectionColumnAutofit(request: D37TableSelectionColumnAutofitRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-selection-column-autofit` · `capability=edit` ### applyTableSelectionHeaderRepeat [Section titled “applyTableSelectionHeaderRepeat”](#applytableselectionheaderrepeat) ```ts applyTableSelectionHeaderRepeat(request: D37TableSelectionHeaderRepeatRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-selection-header-repeat` · `capability=edit` ### applyTableSelectionInsideBorders [Section titled “applyTableSelectionInsideBorders”](#applytableselectioninsideborders) ```ts applyTableSelectionInsideBorders(request: D37TableSelectionInsideBordersRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-selection-inside-borders` · `capability=edit` ### applyTableSelectionOutsideBorders [Section titled “applyTableSelectionOutsideBorders”](#applytableselectionoutsideborders) ```ts applyTableSelectionOutsideBorders(request: D37TableSelectionOutsideBordersRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-selection-outside-borders` · `capability=edit` ### applyTableSelectionPencilEraser [Section titled “applyTableSelectionPencilEraser”](#applytableselectionpencileraser) ```ts applyTableSelectionPencilEraser(request: D37TableSelectionPencilEraserRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-selection-pencil-eraser` · `capability=edit` ### applyTableSelectionRowFit [Section titled “applyTableSelectionRowFit”](#applytableselectionrowfit) ```ts applyTableSelectionRowFit(request: D37TableSelectionRowFitRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-selection-row-fit` · `capability=edit` ### applyTableSelectionStructureEdit [Section titled “applyTableSelectionStructureEdit”](#applytableselectionstructureedit) ```ts applyTableSelectionStructureEdit(request: D37TableSelectionStructureEditRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-selection-structure-edit` · `capability=edit` ### applyTableSelectionWidthFit [Section titled “applyTableSelectionWidthFit”](#applytableselectionwidthfit) ```ts applyTableSelectionWidthFit(request: D37TableSelectionWidthFitRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-selection-width-fit` · `capability=edit` ### applyTableStructureEdit [Section titled “applyTableStructureEdit”](#applytablestructureedit) ```ts applyTableStructureEdit(request: D37TableStructureEditRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-structure-edit` · `capability=edit` ### applyTableStyle [Section titled “applyTableStyle”](#applytablestyle) ```ts applyTableStyle(request: D37TableStyleRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-style` · `capability=edit` ### applyTableTemplate [Section titled “applyTableTemplate”](#applytabletemplate) ```ts applyTableTemplate(request: D37TableTemplateRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-template` · `capability=edit` ### applyTableWidth [Section titled “applyTableWidth”](#applytablewidth) ```ts applyTableWidth(request: D37TableWidthRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-width` · `capability=edit` ### applyTableWrappingStyle [Section titled “applyTableWrappingStyle”](#applytablewrappingstyle) ```ts applyTableWrappingStyle(request: D37TableWrappingStyleRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-table-wrapping-style` · `capability=edit` ### compressCurrentImageWorkflowImage [Section titled “compressCurrentImageWorkflowImage”](#compresscurrentimageworkflowimage) ```ts compressCurrentImageWorkflowImage(request?: ShellCompressCurrentImageWorkflowImageRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compress-current-image-workflow-image` · `capability=edit` ### copyTableCellRange [Section titled “copyTableCellRange”](#copytablecellrange) ```ts copyTableCellRange(request: D37TableRangeRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:copy-table-cell-range` · `capability=edit` ### createMouseDrawnTableFromSemanticIntent [Section titled “createMouseDrawnTableFromSemanticIntent”](#createmousedrawntablefromsemanticintent) ```ts createMouseDrawnTableFromSemanticIntent(request: D37TableMouseDrawSemanticRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:create-mouse-drawn-table-from-semantic-intent` · `capability=edit` ### createTableGrid [Section titled “createTableGrid”](#createtablegrid) ```ts createTableGrid(request: D37TableGridCreateRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:create-table-grid` · `capability=edit` ### equalizeTableDimensions [Section titled “equalizeTableDimensions”](#equalizetabledimensions) ```ts equalizeTableDimensions(request: D37TableEqualizeRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:equalize-table-dimensions` · `capability=edit` ### equalizeTableSelectionColumns [Section titled “equalizeTableSelectionColumns”](#equalizetableselectioncolumns) ```ts equalizeTableSelectionColumns(request: D37TableSelectionEqualizeColumnsRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:equalize-table-selection-columns` · `capability=edit` ### insertBoundedLiveText [Section titled “insertBoundedLiveText”](#insertboundedlivetext) ```ts insertBoundedLiveText(request: BoundedLiveTextInsertRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:insert-bounded-live-text` · `capability=edit` ### pasteTableCellRange [Section titled “pasteTableCellRange”](#pastetablecellrange) ```ts pasteTableCellRange(request: D37TableRangeRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:paste-table-cell-range` · `capability=edit` ### replaceCurrentImageWorkflowImage [Section titled “replaceCurrentImageWorkflowImage”](#replacecurrentimageworkflowimage) ```ts replaceCurrentImageWorkflowImage(request?: ShellReplaceCurrentImageWorkflowImageRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:replace-current-image-workflow-image` · `capability=edit` ### resizeTableSelection [Section titled “resizeTableSelection”](#resizetableselection) ```ts resizeTableSelection(request: D37TableSelectionResizeRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:resize-table-selection` · `capability=edit` ### saveBoundedLiveTextCopyAs [Section titled “saveBoundedLiveTextCopyAs”](#saveboundedlivetextcopyas) ```ts saveBoundedLiveTextCopyAs(request: BoundedLiveTextInsertRequest): Promise<{ canceled: boolean; result: BoundedLiveTextInsertResult | null }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:save-bounded-live-text-copy-as` · `capability=edit` ### saveBoundedLiveTextDraft [Section titled “saveBoundedLiveTextDraft”](#saveboundedlivetextdraft) ```ts saveBoundedLiveTextDraft(request: BoundedLiveTextInsertRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:save-bounded-live-text-draft` · `capability=edit` # window.fastdocShell · market > Scripted routes the SumDoc team uses to check release readiness. Like smoke runs, they aren't used in embedding. Methods: 40. Scripted routes the SumDoc team uses to check release readiness. Like smoke runs, they aren’t used in embedding. Methods on this page: 40. Internal API `window.fastdocShell` is only available inside the desktop SumDoc window. For external integration, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). How to read the line under the signature Under each method is a line of four values — for example `web_to_host_request_response` · `invoke` · `fastdoc-shell:get-state` · `capability=document`. | Value | What it means | | ------------------------------ | ------------------------------------------------------------------------------- | | `web_to_host_request_response` | The editor window asks the application shell and waits for a response | | `web_to_host_event` | The editor window notifies the shell and doesn’t wait for a response | | `host_to_web_event` | The shell notifies the editor window; you subscribe to these methods | | `invoke`, `send`, `on` | Exchange method: request with a response, send without a response, subscription | | `fastdoc-shell:…` | The name of the channel the message travels on | | `capability=…` | The capability group the method belongs to | All three sets of values are declared in the shell contract: directions in `BridgeDirection`, domains in `ShellContractDomain`, capabilities in `ShellCapability`. The last set doesn’t match the domains: smoke runs and the release center have no capability of their own, so their methods are assigned to `internal` or `document`. The first word of the name tells you what the method does | Start of the name | What happens | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `apply…` | Performs an action and changes the document. The response says what happened | | `compute…CommandState` | Changes nothing: answers whether the action can be performed now (`canApply`) and why not (`disabledReason`). The shell uses this response to decide whether to enable the button | | `run…` | Runs an entire scenario — a compatibility check or a release-readiness check | | `get…`, `list…` | Read state and change nothing | | `set…`, `update…` | Change a setting, not the document’s content | | `create…`, `delete…` | Create and delete — a version, a comment, a checkpoint | | `open…` | Opens — the document, one of its versions, a link in an external program | | `resolve…` | Two different meanings, visible from the rest of the name: for comments, it marks one resolved; for recovery and external changes, it resolves a conflict by choosing whose edit to keep | | `notify…` | Notifies the shell of an event and doesn’t wait for a response | | `on…` | Subscription: the shell calls you when the event happens | The `apply…` and `compute…CommandState` pairs go together: first you ask for the state, then you apply. A method ending in `Copy` is a special case, covered below. Words the names are built from The methods on this page walk a release candidate through its steps: assemble, hand off, accept, confirm. Hence the long names — each one names its own step. | Word in the name | Which step | | ---------------- | ------------------------------------------------------------------------------------------------------ | | `Custody` | Keeping custody of the candidate on record: who handed it off, what’s inside, what totals it’s tied to | | `Handoff` | Handing the assembled package further down the chain — as an archive, a report, and a digest | | `Intake` | Accepting what was handed off, at the next step | | `Acceptance` | Confirming that what was accepted has been checked | | `Restore` | Restoring from the archive back into a working form | | `Readiness` | Checking readiness: whether the package is assembled and everything is in place | | `Delivery` | Delivering the candidate to whoever decides on the release | None of this is part of embedding: it’s SumDoc’s internal release machinery. If you were looking for how to accept a document into your product, you need [session commands](/reference/sumdoc/session-protocol/). Methods on this page — 40 * [`runMarketLaunchCenterCurrentHeadPackagePrepare`](#runmarketlaunchcentercurrentheadpackageprepare) * [`runMarketLaunchCenterCurrentHeadPackageReadiness`](#runmarketlaunchcentercurrentheadpackagereadiness) * [`runMarketLaunchCenterDistributionHandoff`](#runmarketlaunchcenterdistributionhandoff) * [`runMarketLaunchCenterExternalReleaseExecution`](#runmarketlaunchcenterexternalreleaseexecution) * [`runMarketLaunchCenterExternalReleaseOperatorPacket`](#runmarketlaunchcenterexternalreleaseoperatorpacket) * [`runMarketLaunchCenterInstallerVerification`](#runmarketlaunchcenterinstallerverification) * [`runMarketLaunchCenterMarketHandoffAcceptance`](#runmarketlaunchcentermarkethandoffacceptance) * [`runMarketLaunchCenterMarketLaunchAcceptanceBattery`](#runmarketlaunchcentermarketlaunchacceptancebattery) * [`runMarketLaunchCenterOperatorConsole`](#runmarketlaunchcenteroperatorconsole) * [`runMarketLaunchCenterReleaseCandidateCustodyArchive`](#runmarketlaunchcenterreleasecandidatecustodyarchive) * [`runMarketLaunchCenterReleaseCandidateCustodyArchiveIntake`](#runmarketlaunchcenterreleasecandidatecustodyarchiveintake) * [`runMarketLaunchCenterReleaseCandidateCustodyArchiveRestore`](#runmarketlaunchcenterreleasecandidatecustodyarchiverestore) * [`runMarketLaunchCenterReleaseCandidateCustodyLedger`](#runmarketlaunchcenterreleasecandidatecustodyledger) * [`runMarketLaunchCenterReleaseCandidateCustodyOperatorAcceptance`](#runmarketlaunchcenterreleasecandidatecustodyoperatoracceptance) * [`runMarketLaunchCenterReleaseCandidateCustodyOperatorActivation`](#runmarketlaunchcenterreleasecandidatecustodyoperatoractivation) * [`runMarketLaunchCenterReleaseCandidateCustodyOperatorDelivery`](#runmarketlaunchcenterreleasecandidatecustodyoperatordelivery) * [`runMarketLaunchCenterReleaseCandidateCustodyOperatorDeliveryIntake`](#runmarketlaunchcenterreleasecandidatecustodyoperatordeliveryintake) * [`runMarketLaunchCenterReleaseCandidateCustodyOperatorDeliveryRestore`](#runmarketlaunchcenterreleasecandidatecustodyoperatordeliveryrestore) * [`runMarketLaunchCenterReleaseCandidateCustodyOperatorDeliveryRestoreAcceptance`](#runmarketlaunchcenterreleasecandidatecustodyoperatordeliveryrestoreacceptance) * [`runMarketLaunchCenterReleaseCandidateCustodyOperatorDispatch`](#runmarketlaunchcenterreleasecandidatecustodyoperatordispatch) * [`runMarketLaunchCenterReleaseCandidateCustodyOperatorDispatchAcceptance`](#runmarketlaunchcenterreleasecandidatecustodyoperatordispatchacceptance) * [`runMarketLaunchCenterReleaseCandidateCustodyOperatorHandoff`](#runmarketlaunchcenterreleasecandidatecustodyoperatorhandoff) * [`runMarketLaunchCenterReleaseCandidateCustodyOperatorLaunchHandoff`](#runmarketlaunchcenterreleasecandidatecustodyoperatorlaunchhandoff) * [`runMarketLaunchCenterReleaseCandidateCustodyOperatorLaunchHandoffAcceptance`](#runmarketlaunchcenterreleasecandidatecustodyoperatorlaunchhandoffacceptance) * [`runMarketLaunchCenterReleaseCandidateCustodyOperatorLaunchHandoffIntake`](#runmarketlaunchcenterreleasecandidatecustodyoperatorlaunchhandoffintake) * [`runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchDecision`](#runmarketlaunchcenterreleasecandidatecustodyoperatormarketlaunchdecision) * [`runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchReadinessPacket`](#runmarketlaunchcenterreleasecandidatecustodyoperatormarketlaunchreadinesspacket) * [`runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchReadinessPacketIntake`](#runmarketlaunchcenterreleasecandidatecustodyoperatormarketlaunchreadinesspacketintake) * [`runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchReadinessRestore`](#runmarketlaunchcenterreleasecandidatecustodyoperatormarketlaunchreadinessrestore) * [`runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchReadinessRestoreAcceptance`](#runmarketlaunchcenterreleasecandidatecustodyoperatormarketlaunchreadinessrestoreacceptance) * [`runMarketLaunchCenterReleaseCandidateHandoff`](#runmarketlaunchcenterreleasecandidatehandoff) * [`runMarketLaunchCenterReleaseCandidateHandoffAcceptance`](#runmarketlaunchcenterreleasecandidatehandoffacceptance) * [`runMarketLaunchCenterReleaseCandidateIntake`](#runmarketlaunchcenterreleasecandidateintake) * [`runMarketLaunchCenterReleaseCandidatePublisher`](#runmarketlaunchcenterreleasecandidatepublisher) * [`runMarketLaunchCenterReleaseCandidateRestore`](#runmarketlaunchcenterreleasecandidaterestore) * [`runMarketLaunchCenterReleaseCandidateSealer`](#runmarketlaunchcenterreleasecandidatesealer) * [`runMarketLaunchCenterReleaseCandidateStaging`](#runmarketlaunchcenterreleasecandidatestaging) * [`runMarketLaunchCenterReleaseCandidateVerifier`](#runmarketlaunchcenterreleasecandidateverifier) * [`runMarketLaunchCenterReleaseGate`](#runmarketlaunchcenterreleasegate) * [`validateMarketLaunchCenterLaunchPack`](#validatemarketlaunchcenterlaunchpack) ### runMarketLaunchCenterCurrentHeadPackagePrepare [Section titled “runMarketLaunchCenterCurrentHeadPackagePrepare”](#runmarketlaunchcentercurrentheadpackageprepare) ```ts runMarketLaunchCenterCurrentHeadPackagePrepare(request: { preparePath: string; readinessPath: string; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-current-head-package-prepare` · `capability=internal` ### runMarketLaunchCenterCurrentHeadPackageReadiness [Section titled “runMarketLaunchCenterCurrentHeadPackageReadiness”](#runmarketlaunchcentercurrentheadpackagereadiness) ```ts runMarketLaunchCenterCurrentHeadPackageReadiness(request: { readinessPath: string; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-current-head-package-readiness` · `capability=internal` ### runMarketLaunchCenterDistributionHandoff [Section titled “runMarketLaunchCenterDistributionHandoff”](#runmarketlaunchcenterdistributionhandoff) ```ts runMarketLaunchCenterDistributionHandoff(request: { handoffPath: string; markdownPath?: string | null; checksumPath?: string | null; releasePath?: string | null; manifestPath?: string | null; validationPath?: string | null; repairPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-distribution-handoff` · `capability=internal` ### runMarketLaunchCenterExternalReleaseExecution [Section titled “runMarketLaunchCenterExternalReleaseExecution”](#runmarketlaunchcenterexternalreleaseexecution) ```ts runMarketLaunchCenterExternalReleaseExecution(request: { executionPath: string; markdownPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-external-release-execution` · `capability=internal` ### runMarketLaunchCenterExternalReleaseOperatorPacket [Section titled “runMarketLaunchCenterExternalReleaseOperatorPacket”](#runmarketlaunchcenterexternalreleaseoperatorpacket) ```ts runMarketLaunchCenterExternalReleaseOperatorPacket(request: { packetPath: string; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-external-release-operator-packet` · `capability=internal` ### runMarketLaunchCenterInstallerVerification [Section titled “runMarketLaunchCenterInstallerVerification”](#runmarketlaunchcenterinstallerverification) ```ts runMarketLaunchCenterInstallerVerification(request: { verificationPath: string; markdownPath?: string | null; handoffPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-installer-verification` · `capability=internal` ### runMarketLaunchCenterMarketHandoffAcceptance [Section titled “runMarketLaunchCenterMarketHandoffAcceptance”](#runmarketlaunchcentermarkethandoffacceptance) ```ts runMarketLaunchCenterMarketHandoffAcceptance(request: { acceptancePath: string; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-market-handoff-acceptance` · `capability=internal` ### runMarketLaunchCenterMarketLaunchAcceptanceBattery [Section titled “runMarketLaunchCenterMarketLaunchAcceptanceBattery”](#runmarketlaunchcentermarketlaunchacceptancebattery) ```ts runMarketLaunchCenterMarketLaunchAcceptanceBattery(request: { batteryPath: string; markdownPath?: string | null; digestPath?: string | null; summaryPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-market-launch-acceptance-battery` · `capability=internal` ### runMarketLaunchCenterOperatorConsole [Section titled “runMarketLaunchCenterOperatorConsole”](#runmarketlaunchcenteroperatorconsole) ```ts runMarketLaunchCenterOperatorConsole(request: { consolePath: string; markdownPath?: string | null; digestPath?: string | null; acceptancePath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-operator-console` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyArchive [Section titled “runMarketLaunchCenterReleaseCandidateCustodyArchive”](#runmarketlaunchcenterreleasecandidatecustodyarchive) ```ts runMarketLaunchCenterReleaseCandidateCustodyArchive(request: { custodyPath?: string | null; archivePacketPath?: string | null; archivePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-archive` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyArchiveIntake [Section titled “runMarketLaunchCenterReleaseCandidateCustodyArchiveIntake”](#runmarketlaunchcenterreleasecandidatecustodyarchiveintake) ```ts runMarketLaunchCenterReleaseCandidateCustodyArchiveIntake(request: { archivePacketPath?: string | null; archivePath?: string | null; intakePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-archive-intake` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyArchiveRestore [Section titled “runMarketLaunchCenterReleaseCandidateCustodyArchiveRestore”](#runmarketlaunchcenterreleasecandidatecustodyarchiverestore) ```ts runMarketLaunchCenterReleaseCandidateCustodyArchiveRestore(request: { intakePath?: string | null; archivePacketPath?: string | null; archivePath?: string | null; restorePath?: string | null; restoreRootPath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-archive-restore` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyLedger [Section titled “runMarketLaunchCenterReleaseCandidateCustodyLedger”](#runmarketlaunchcenterreleasecandidatecustodyledger) ```ts runMarketLaunchCenterReleaseCandidateCustodyLedger(request: { custodyPath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-ledger` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyOperatorAcceptance [Section titled “runMarketLaunchCenterReleaseCandidateCustodyOperatorAcceptance”](#runmarketlaunchcenterreleasecandidatecustodyoperatoracceptance) ```ts runMarketLaunchCenterReleaseCandidateCustodyOperatorAcceptance(request: { handoffPath?: string | null; archivePath?: string | null; acceptancePath?: string | null; operatorWorkspacePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-operator-acceptance` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyOperatorActivation [Section titled “runMarketLaunchCenterReleaseCandidateCustodyOperatorActivation”](#runmarketlaunchcenterreleasecandidatecustodyoperatoractivation) ```ts runMarketLaunchCenterReleaseCandidateCustodyOperatorActivation(request: { acceptancePath?: string | null; operatorWorkspacePath?: string | null; activationPath?: string | null; activationWorkspacePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-operator-activation` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyOperatorDelivery [Section titled “runMarketLaunchCenterReleaseCandidateCustodyOperatorDelivery”](#runmarketlaunchcenterreleasecandidatecustodyoperatordelivery) ```ts runMarketLaunchCenterReleaseCandidateCustodyOperatorDelivery(request: { dispatchAcceptancePath?: string | null; operatorDispatchWorkspacePath?: string | null; dispatchPath?: string | null; deliveryPath?: string | null; archivePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-operator-delivery` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyOperatorDeliveryIntake [Section titled “runMarketLaunchCenterReleaseCandidateCustodyOperatorDeliveryIntake”](#runmarketlaunchcenterreleasecandidatecustodyoperatordeliveryintake) ```ts runMarketLaunchCenterReleaseCandidateCustodyOperatorDeliveryIntake(request: { deliveryPath?: string | null; archivePath?: string | null; intakePath?: string | null; receivedOperatorDeliveryWorkspacePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-operator-delivery-intake` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyOperatorDeliveryRestore [Section titled “runMarketLaunchCenterReleaseCandidateCustodyOperatorDeliveryRestore”](#runmarketlaunchcenterreleasecandidatecustodyoperatordeliveryrestore) ```ts runMarketLaunchCenterReleaseCandidateCustodyOperatorDeliveryRestore(request: { intakePath?: string | null; receivedOperatorDeliveryWorkspacePath?: string | null; restorePath?: string | null; restoredOperatorDispatchWorkspacePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-operator-delivery-restore` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyOperatorDeliveryRestoreAcceptance [Section titled “runMarketLaunchCenterReleaseCandidateCustodyOperatorDeliveryRestoreAcceptance”](#runmarketlaunchcenterreleasecandidatecustodyoperatordeliveryrestoreacceptance) ```ts runMarketLaunchCenterReleaseCandidateCustodyOperatorDeliveryRestoreAcceptance(request: { restorePath?: string | null; restoredOperatorDispatchWorkspacePath?: string | null; acceptancePath?: string | null; operatorLaunchHandoverWorkspacePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-operator-delivery-restore-acceptance` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyOperatorDispatch [Section titled “runMarketLaunchCenterReleaseCandidateCustodyOperatorDispatch”](#runmarketlaunchcenterreleasecandidatecustodyoperatordispatch) ```ts runMarketLaunchCenterReleaseCandidateCustodyOperatorDispatch(request: { activationPath?: string | null; activationWorkspacePath?: string | null; acceptancePath?: string | null; dispatchPath?: string | null; archivePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-operator-dispatch` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyOperatorDispatchAcceptance [Section titled “runMarketLaunchCenterReleaseCandidateCustodyOperatorDispatchAcceptance”](#runmarketlaunchcenterreleasecandidatecustodyoperatordispatchacceptance) ```ts runMarketLaunchCenterReleaseCandidateCustodyOperatorDispatchAcceptance(request: { dispatchPath?: string | null; archivePath?: string | null; acceptancePath?: string | null; operatorDispatchWorkspacePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-operator-dispatch-acceptance` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyOperatorHandoff [Section titled “runMarketLaunchCenterReleaseCandidateCustodyOperatorHandoff”](#runmarketlaunchcenterreleasecandidatecustodyoperatorhandoff) ```ts runMarketLaunchCenterReleaseCandidateCustodyOperatorHandoff(request: { restorePath?: string | null; restoreRootPath?: string | null; intakePath?: string | null; archivePacketPath?: string | null; handoffPath?: string | null; archivePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-operator-handoff` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyOperatorLaunchHandoff [Section titled “runMarketLaunchCenterReleaseCandidateCustodyOperatorLaunchHandoff”](#runmarketlaunchcenterreleasecandidatecustodyoperatorlaunchhandoff) ```ts runMarketLaunchCenterReleaseCandidateCustodyOperatorLaunchHandoff(request: { restoreAcceptancePath?: string | null; operatorLaunchHandoverWorkspacePath?: string | null; handoffPath?: string | null; archivePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-operator-launch-handoff` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyOperatorLaunchHandoffAcceptance [Section titled “runMarketLaunchCenterReleaseCandidateCustodyOperatorLaunchHandoffAcceptance”](#runmarketlaunchcenterreleasecandidatecustodyoperatorlaunchhandoffacceptance) ```ts runMarketLaunchCenterReleaseCandidateCustodyOperatorLaunchHandoffAcceptance(request: { intakePath?: string | null; receivedOperatorLaunchHandoffWorkspacePath?: string | null; acceptancePath?: string | null; operatorMarketLaunchReadinessWorkspacePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-operator-launch-handoff-acceptance` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyOperatorLaunchHandoffIntake [Section titled “runMarketLaunchCenterReleaseCandidateCustodyOperatorLaunchHandoffIntake”](#runmarketlaunchcenterreleasecandidatecustodyoperatorlaunchhandoffintake) ```ts runMarketLaunchCenterReleaseCandidateCustodyOperatorLaunchHandoffIntake(request: { handoffPath?: string | null; archivePath?: string | null; intakePath?: string | null; receivedOperatorLaunchHandoffWorkspacePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-operator-launch-handoff-intake` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchDecision [Section titled “runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchDecision”](#runmarketlaunchcenterreleasecandidatecustodyoperatormarketlaunchdecision) ```ts runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchDecision(request: { restoreAcceptancePath?: string | null; acceptedOperatorMarketLaunchReadinessWorkspacePath?: string | null; decisionPath?: string | null; decisionDossierPath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-operator-market-launch-decision` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchReadinessPacket [Section titled “runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchReadinessPacket”](#runmarketlaunchcenterreleasecandidatecustodyoperatormarketlaunchreadinesspacket) ```ts runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchReadinessPacket(request: { acceptancePath?: string | null; operatorMarketLaunchReadinessWorkspacePath?: string | null; packetPath?: string | null; archivePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-operator-market-launch-readiness-packet` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchReadinessPacketIntake [Section titled “runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchReadinessPacketIntake”](#runmarketlaunchcenterreleasecandidatecustodyoperatormarketlaunchreadinesspacketintake) ```ts runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchReadinessPacketIntake(request: { packetPath?: string | null; archivePath?: string | null; intakePath?: string | null; receivedOperatorMarketLaunchReadinessWorkspacePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-operator-market-launch-readiness-packet-intake` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchReadinessRestore [Section titled “runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchReadinessRestore”](#runmarketlaunchcenterreleasecandidatecustodyoperatormarketlaunchreadinessrestore) ```ts runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchReadinessRestore(request: { intakePath?: string | null; receivedOperatorMarketLaunchReadinessWorkspacePath?: string | null; restorePath?: string | null; restoredOperatorMarketLaunchReadinessWorkspacePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-operator-market-launch-readiness-restore` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchReadinessRestoreAcceptance [Section titled “runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchReadinessRestoreAcceptance”](#runmarketlaunchcenterreleasecandidatecustodyoperatormarketlaunchreadinessrestoreacceptance) ```ts runMarketLaunchCenterReleaseCandidateCustodyOperatorMarketLaunchReadinessRestoreAcceptance(request: { restorePath?: string | null; restoredOperatorMarketLaunchReadinessWorkspacePath?: string | null; acceptancePath?: string | null; acceptedOperatorMarketLaunchReadinessWorkspacePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-custody-operator-market-launch-readiness-restore-acceptance` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateHandoff [Section titled “runMarketLaunchCenterReleaseCandidateHandoff”](#runmarketlaunchcenterreleasecandidatehandoff) ```ts runMarketLaunchCenterReleaseCandidateHandoff(request: { stagingPath: string; stagingRootPath: string; handoffPath?: string | null; archivePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-handoff` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateHandoffAcceptance [Section titled “runMarketLaunchCenterReleaseCandidateHandoffAcceptance”](#runmarketlaunchcenterreleasecandidatehandoffacceptance) ```ts runMarketLaunchCenterReleaseCandidateHandoffAcceptance(request: { handoffPath: string; archivePath: string; acceptancePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-handoff-acceptance` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateIntake [Section titled “runMarketLaunchCenterReleaseCandidateIntake”](#runmarketlaunchcenterreleasecandidateintake) ```ts runMarketLaunchCenterReleaseCandidateIntake(request: { sealPath: string; archivePath: string; intakePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-intake` · `capability=internal` ### runMarketLaunchCenterReleaseCandidatePublisher [Section titled “runMarketLaunchCenterReleaseCandidatePublisher”](#runmarketlaunchcenterreleasecandidatepublisher) ```ts runMarketLaunchCenterReleaseCandidatePublisher(request: { manifestPath: string; markdownPath?: string | null; digestPath?: string | null; bundleRootPath?: string | null; consolePath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-publisher` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateRestore [Section titled “runMarketLaunchCenterReleaseCandidateRestore”](#runmarketlaunchcenterreleasecandidaterestore) ```ts runMarketLaunchCenterReleaseCandidateRestore(request: { intakePath: string; archivePath: string; restoreRootPath?: string | null; restorePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-restore` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateSealer [Section titled “runMarketLaunchCenterReleaseCandidateSealer”](#runmarketlaunchcenterreleasecandidatesealer) ```ts runMarketLaunchCenterReleaseCandidateSealer(request: { verificationPath: string; sealPath?: string | null; archivePath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-sealer` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateStaging [Section titled “runMarketLaunchCenterReleaseCandidateStaging”](#runmarketlaunchcenterreleasecandidatestaging) ```ts runMarketLaunchCenterReleaseCandidateStaging(request: { restorePath: string; restoredRootPath: string; stagingRootPath?: string | null; stagingPath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-staging` · `capability=internal` ### runMarketLaunchCenterReleaseCandidateVerifier [Section titled “runMarketLaunchCenterReleaseCandidateVerifier”](#runmarketlaunchcenterreleasecandidateverifier) ```ts runMarketLaunchCenterReleaseCandidateVerifier(request: { manifestPath: string; verificationPath?: string | null; markdownPath?: string | null; digestPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-candidate-verifier` · `capability=internal` ### runMarketLaunchCenterReleaseGate [Section titled “runMarketLaunchCenterReleaseGate”](#runmarketlaunchcenterreleasegate) ```ts runMarketLaunchCenterReleaseGate(request: { releasePath: string; manifestPath?: string | null; validationPath?: string | null; repairPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:run-market-launch-center-release-gate` · `capability=internal` ### validateMarketLaunchCenterLaunchPack [Section titled “validateMarketLaunchCenterLaunchPack”](#validatemarketlaunchcenterlaunchpack) ```ts validateMarketLaunchCenterLaunchPack(request: { manifestPath: string; validationPath?: string | null; }): Promise> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:validate-market-launch-center-launch-pack` · `capability=internal` # window.fastdocShell · review > Review: comments, tracked changes, display modes. Methods: 15. Review: comments, tracked changes, display modes. Methods on this page: 15. Internal API `window.fastdocShell` is only available inside the desktop SumDoc window. For external integration, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). How to read the line under the signature Under each method is a line of four values — for example `web_to_host_request_response` · `invoke` · `fastdoc-shell:get-state` · `capability=document`. | Value | What it means | | ------------------------------ | ------------------------------------------------------------------------------- | | `web_to_host_request_response` | The editor window asks the application shell and waits for a response | | `web_to_host_event` | The editor window notifies the shell and doesn’t wait for a response | | `host_to_web_event` | The shell notifies the editor window; you subscribe to these methods | | `invoke`, `send`, `on` | Exchange method: request with a response, send without a response, subscription | | `fastdoc-shell:…` | The name of the channel the message travels on | | `capability=…` | The capability group the method belongs to | All three sets of values are declared in the shell contract: directions in `BridgeDirection`, domains in `ShellContractDomain`, capabilities in `ShellCapability`. The last set doesn’t match the domains: smoke runs and the release center have no capability of their own, so their methods are assigned to `internal` or `document`. The first word of the name tells you what the method does | Start of the name | What happens | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `apply…` | Performs an action and changes the document. The response says what happened | | `compute…CommandState` | Changes nothing: answers whether the action can be performed now (`canApply`) and why not (`disabledReason`). The shell uses this response to decide whether to enable the button | | `run…` | Runs an entire scenario — a compatibility check or a release-readiness check | | `get…`, `list…` | Read state and change nothing | | `set…`, `update…` | Change a setting, not the document’s content | | `create…`, `delete…` | Create and delete — a version, a comment, a checkpoint | | `open…` | Opens — the document, one of its versions, a link in an external program | | `resolve…` | Two different meanings, visible from the rest of the name: for comments, it marks one resolved; for recovery and external changes, it resolves a conflict by choosing whose edit to keep | | `notify…` | Notifies the shell of an event and doesn’t wait for a response | | `on…` | Subscription: the shell calls you when the event happens | The `apply…` and `compute…CommandState` pairs go together: first you ask for the state, then you apply. A method ending in `Copy` is a special case, covered below. What `Copy` at the end of a name means This kind of method doesn’t change the open document. It creates a file next to it and applies the action to that copy: the open document and its history stay as they were. Where to write it is set by the `outputPath` field; without it, the shell picks a path itself, next to the source file. So “accepting a change” with `Copy` isn’t an in-place edit — it produces a second file with the change accepted. Editing the open document goes through a different path — session commands, `mutate` and `apply-text-transaction`: [Rust Session Protocol](/reference/sumdoc/session-protocol/). **Methods on this page — 15** * [`acceptReviewTrackedChangeCopy`](#acceptreviewtrackedchangecopy) * [`applyReviewToolsWriteback`](#applyreviewtoolswriteback) * [`createReviewModeNewDocumentCopy`](#createreviewmodenewdocumentcopy) * [`deleteReviewCommentCopy`](#deletereviewcommentcopy) * [`insertReviewCommentCopy`](#insertreviewcommentcopy) * [`previewReviewAction`](#previewreviewaction) * [`rejectReviewTrackedChangeCopy`](#rejectreviewtrackedchangecopy) * [`replyReviewCommentCopy`](#replyreviewcommentcopy) * [`resolveAllReviewCommentsCopy`](#resolveallreviewcommentscopy) * [`resolveReviewCommentCopy`](#resolvereviewcommentcopy) * [`resolveReviewCommentsAuthorCopy`](#resolvereviewcommentsauthorcopy) * [`resolveReviewMyCommentsCopy`](#resolvereviewmycommentscopy) * [`setReviewCommentResolvedCopy`](#setreviewcommentresolvedcopy) * [`setReviewModeCopy`](#setreviewmodecopy) * [`setTrackedChangeMarkupMode`](#settrackedchangemarkupmode) ### acceptReviewTrackedChangeCopy [Section titled “acceptReviewTrackedChangeCopy”](#acceptreviewtrackedchangecopy) ```ts acceptReviewTrackedChangeCopy(request: ShellReviewAcceptChangeCopyRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:accept-review-tracked-change-copy` · `capability=review` ### applyReviewToolsWriteback [Section titled “applyReviewToolsWriteback”](#applyreviewtoolswriteback) ```ts applyReviewToolsWriteback(request: ShellReviewToolsWritebackRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:apply-review-tools-writeback` · `capability=review` ### createReviewModeNewDocumentCopy [Section titled “createReviewModeNewDocumentCopy”](#createreviewmodenewdocumentcopy) ```ts createReviewModeNewDocumentCopy(request?: ShellReviewNewDocumentCopyRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:create-review-mode-new-document-copy` · `capability=review` ### deleteReviewCommentCopy [Section titled “deleteReviewCommentCopy”](#deletereviewcommentcopy) ```ts deleteReviewCommentCopy(request: ShellReviewDeleteCommentCopyRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:delete-review-comment-copy` · `capability=review` ### insertReviewCommentCopy [Section titled “insertReviewCommentCopy”](#insertreviewcommentcopy) ```ts insertReviewCommentCopy(request: ShellReviewInsertCommentCopyRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:insert-review-comment-copy` · `capability=review` ### previewReviewAction [Section titled “previewReviewAction”](#previewreviewaction) ```ts previewReviewAction(request: ShellReviewActionPreviewRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:preview-review-action` · `capability=review` ### rejectReviewTrackedChangeCopy [Section titled “rejectReviewTrackedChangeCopy”](#rejectreviewtrackedchangecopy) ```ts rejectReviewTrackedChangeCopy(request: ShellReviewRejectChangeCopyRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:reject-review-tracked-change-copy` · `capability=review` ### replyReviewCommentCopy [Section titled “replyReviewCommentCopy”](#replyreviewcommentcopy) ```ts replyReviewCommentCopy(request: ShellReviewReplyCommentCopyRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:reply-review-comment-copy` · `capability=review` ### resolveAllReviewCommentsCopy [Section titled “resolveAllReviewCommentsCopy”](#resolveallreviewcommentscopy) ```ts resolveAllReviewCommentsCopy(request?: ShellReviewResolveAllCommentsCopyRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:resolve-all-review-comments-copy` · `capability=review` ### resolveReviewCommentCopy [Section titled “resolveReviewCommentCopy”](#resolvereviewcommentcopy) ```ts resolveReviewCommentCopy(request: ShellReviewResolveCommentCopyRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:resolve-review-comment-copy` · `capability=review` ### resolveReviewCommentsAuthorCopy [Section titled “resolveReviewCommentsAuthorCopy”](#resolvereviewcommentsauthorcopy) ```ts resolveReviewCommentsAuthorCopy(request: ShellReviewResolveCommentsAuthorCopyRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:resolve-review-comments-author-copy` · `capability=review` ### resolveReviewMyCommentsCopy [Section titled “resolveReviewMyCommentsCopy”](#resolvereviewmycommentscopy) ```ts resolveReviewMyCommentsCopy(request: ShellReviewResolveMyCommentsCopyRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:resolve-review-my-comments-copy` · `capability=review` ### setReviewCommentResolvedCopy [Section titled “setReviewCommentResolvedCopy”](#setreviewcommentresolvedcopy) ```ts setReviewCommentResolvedCopy(request: ShellReviewSetCommentResolvedCopyRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:set-review-comment-resolved-copy` · `capability=review` ### setReviewModeCopy [Section titled “setReviewModeCopy”](#setreviewmodecopy) ```ts setReviewModeCopy(request: ShellReviewModeCopyRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:set-review-mode-copy` · `capability=review` ### setTrackedChangeMarkupMode [Section titled “setTrackedChangeMarkupMode”](#settrackedchangemarkupmode) ```ts setTrackedChangeMarkupMode(request?: ShellTrackedChangeMarkupModeRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:set-tracked-change-markup-mode` · `capability=review` # window.fastdocShell · smoke > Smoke-run routes — internal checks of the SumDoc build itself. Not used in embedding. Methods: 3. Smoke-run routes — internal checks of the SumDoc build itself. Not used in embedding. Methods on this page: 3. Internal API `window.fastdocShell` is only available inside the desktop SumDoc window. For external integration, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). How to read the line under the signature Under each method is a line of four values — for example `web_to_host_request_response` · `invoke` · `fastdoc-shell:get-state` · `capability=document`. | Value | What it means | | ------------------------------ | ------------------------------------------------------------------------------- | | `web_to_host_request_response` | The editor window asks the application shell and waits for a response | | `web_to_host_event` | The editor window notifies the shell and doesn’t wait for a response | | `host_to_web_event` | The shell notifies the editor window; you subscribe to these methods | | `invoke`, `send`, `on` | Exchange method: request with a response, send without a response, subscription | | `fastdoc-shell:…` | The name of the channel the message travels on | | `capability=…` | The capability group the method belongs to | All three sets of values are declared in the shell contract: directions in `BridgeDirection`, domains in `ShellContractDomain`, capabilities in `ShellCapability`. The last set doesn’t match the domains: smoke runs and the release center have no capability of their own, so their methods are assigned to `internal` or `document`. The first word of the name tells you what the method does | Start of the name | What happens | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `apply…` | Performs an action and changes the document. The response says what happened | | `compute…CommandState` | Changes nothing: answers whether the action can be performed now (`canApply`) and why not (`disabledReason`). The shell uses this response to decide whether to enable the button | | `run…` | Runs an entire scenario — a compatibility check or a release-readiness check | | `get…`, `list…` | Read state and change nothing | | `set…`, `update…` | Change a setting, not the document’s content | | `create…`, `delete…` | Create and delete — a version, a comment, a checkpoint | | `open…` | Opens — the document, one of its versions, a link in an external program | | `resolve…` | Two different meanings, visible from the rest of the name: for comments, it marks one resolved; for recovery and external changes, it resolves a conflict by choosing whose edit to keep | | `notify…` | Notifies the shell of an event and doesn’t wait for a response | | `on…` | Subscription: the shell calls you when the event happens | The `apply…` and `compute…CommandState` pairs go together: first you ask for the state, then you apply. A method ending in `Copy` is a special case, covered below. **Methods on this page — 3** * [`notifyCurrentDocumentTruthViewerReady`](#notifycurrentdocumenttruthviewerready) * [`notifyRendererReady`](#notifyrendererready) * [`notifySmokeCheckpoint`](#notifysmokecheckpoint) ### notifyCurrentDocumentTruthViewerReady [Section titled “notifyCurrentDocumentTruthViewerReady”](#notifycurrentdocumenttruthviewerready) ```ts notifyCurrentDocumentTruthViewerReady(payload: { availability: string; fixtureId: string | null; blockedStatesVisible: boolean; forbiddenClaimsVisible: boolean; unavailableStateVisible: boolean; genericFixtureListVisible: boolean; }): void ``` `web_to_host_event` · `send` · `fastdoc-shell:current-document-truth-viewer-ready` · `capability=internal` ### notifyRendererReady [Section titled “notifyRendererReady”](#notifyrendererready) ```ts notifyRendererReady(): void ``` `web_to_host_event` · `send` · `fastdoc-shell:renderer-ready` · `capability=internal` ### notifySmokeCheckpoint [Section titled “notifySmokeCheckpoint”](#notifysmokecheckpoint) ```ts notifySmokeCheckpoint(checkpoint: string, payload?: { screenshotDataUrl?: string | null; screenshots?: Array<{ name?: string | null; dataUrl?: string | null }>; telemetry?: unknown; reserveCyclesCompleted?: number; reserveElapsedMs?: number; reserveRichPayloadBytes?: number; }): void ``` `web_to_host_event` · `send` · `fastdoc-shell:smoke-checkpoint` · `capability=internal` # window.fastdocShell · view > Display: zoom, page modes, panels, full-screen reading. Methods: 40. Display: zoom, page modes, panels, full-screen reading. Methods on this page: 40. Internal API `window.fastdocShell` is only available inside the desktop SumDoc window. For external integration, use the [Rust Session Protocol](/reference/sumdoc/session-protocol/) or the [browser surface interface](/reference/sumdoc/surface-api/). How to read the line under the signature Under each method is a line of four values — for example `web_to_host_request_response` · `invoke` · `fastdoc-shell:get-state` · `capability=document`. | Value | What it means | | ------------------------------ | ------------------------------------------------------------------------------- | | `web_to_host_request_response` | The editor window asks the application shell and waits for a response | | `web_to_host_event` | The editor window notifies the shell and doesn’t wait for a response | | `host_to_web_event` | The shell notifies the editor window; you subscribe to these methods | | `invoke`, `send`, `on` | Exchange method: request with a response, send without a response, subscription | | `fastdoc-shell:…` | The name of the channel the message travels on | | `capability=…` | The capability group the method belongs to | All three sets of values are declared in the shell contract: directions in `BridgeDirection`, domains in `ShellContractDomain`, capabilities in `ShellCapability`. The last set doesn’t match the domains: smoke runs and the release center have no capability of their own, so their methods are assigned to `internal` or `document`. The first word of the name tells you what the method does | Start of the name | What happens | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `apply…` | Performs an action and changes the document. The response says what happened | | `compute…CommandState` | Changes nothing: answers whether the action can be performed now (`canApply`) and why not (`disabledReason`). The shell uses this response to decide whether to enable the button | | `run…` | Runs an entire scenario — a compatibility check or a release-readiness check | | `get…`, `list…` | Read state and change nothing | | `set…`, `update…` | Change a setting, not the document’s content | | `create…`, `delete…` | Create and delete — a version, a comment, a checkpoint | | `open…` | Opens — the document, one of its versions, a link in an external program | | `resolve…` | Two different meanings, visible from the rest of the name: for comments, it marks one resolved; for recovery and external changes, it resolves a conflict by choosing whose edit to keep | | `notify…` | Notifies the shell of an event and doesn’t wait for a response | | `on…` | Subscription: the shell calls you when the event happens | The `apply…` and `compute…CommandState` pairs go together: first you ask for the state, then you apply. A method ending in `Copy` is a special case, covered below. Methods on this page — 40 * [`completeSaveBeforeClose`](#completesavebeforeclose) * [`computeTableAutofitToWindowCommandState`](#computetableautofittowindowcommandstate) * [`computeTableCellContentAlignmentCommandState`](#computetablecellcontentalignmentcommandstate) * [`computeTableCellExactSizeCommandState`](#computetablecellexactsizecommandstate) * [`computeTableCellMarginsCommandState`](#computetablecellmarginscommandstate) * [`computeTableCellSpacingCommandState`](#computetablecellspacingcommandstate) * [`computeTableCellTextDirectionCommandState`](#computetablecelltextdirectioncommandstate) * [`computeTableCellTextWrappingCommandState`](#computetablecelltextwrappingcommandstate) * [`computeTableCellVerticalAlignmentCommandState`](#computetablecellverticalalignmentcommandstate) * [`computeTableFixedColumnWidthCommandState`](#computetablefixedcolumnwidthcommandstate) * [`computeTableFloatingPositionCommandState`](#computetablefloatingpositioncommandstate) * [`computeTableSelectionAlignmentCommandState`](#computetableselectionalignmentcommandstate) * [`computeTableSelectionAllBordersCommandState`](#computetableselectionallborderscommandstate) * [`computeTableSelectionCellRangeFormatCommandState`](#computetableselectioncellrangeformatcommandstate) * [`computeTableSelectionClearContentFormatCommandState`](#computetableselectionclearcontentformatcommandstate) * [`computeTableSelectionClearContentsCommandState`](#computetableselectionclearcontentscommandstate) * [`computeTableSelectionClearFillCommandState`](#computetableselectionclearfillcommandstate) * [`computeTableSelectionClearFormattingCommandState`](#computetableselectionclearformattingcommandstate) * [`computeTableSelectionColumnAutofitCommandState`](#computetableselectioncolumnautofitcommandstate) * [`computeTableSelectionEqualizeColumnsCommandState`](#computetableselectionequalizecolumnscommandstate) * [`computeTableSelectionHeaderRepeatCommandState`](#computetableselectionheaderrepeatcommandstate) * [`computeTableSelectionInsideBordersCommandState`](#computetableselectioninsideborderscommandstate) * [`computeTableSelectionOutsideBordersCommandState`](#computetableselectionoutsideborderscommandstate) * [`computeTableSelectionPencilEraserCommandState`](#computetableselectionpencilerasercommandstate) * [`computeTableSelectionRowFitCommandState`](#computetableselectionrowfitcommandstate) * [`computeTableSelectionStructureCommandState`](#computetableselectionstructurecommandstate) * [`computeTableSelectionWidthFitCommandState`](#computetableselectionwidthfitcommandstate) * [`computeTableWrappingStyleCommandState`](#computetablewrappingstylecommandstate) * [`createTableFromClipboard`](#createtablefromclipboard) * [`getState`](#getstate) * [`notifyUnsavedState`](#notifyunsavedstate) * [`onMenuCommand`](#onmenucommand) * [`onSaveBeforeClose`](#onsavebeforeclose) * [`onSaveBeforeCloseFailed`](#onsavebeforeclosefailed) * [`onStateChanged`](#onstatechanged) * [`onSystemPaste`](#onsystempaste) * [`openExternalHyperlink`](#openexternalhyperlink) * [`readEditorClipboardText`](#readeditorclipboardtext) * [`revealPath`](#revealpath) * [`writeEditorClipboardText`](#writeeditorclipboardtext) ### completeSaveBeforeClose [Section titled “completeSaveBeforeClose”](#completesavebeforeclose) ```ts completeSaveBeforeClose(payload: { saved: boolean; message?: string | null }): void ``` `web_to_host_event` · `send` · `fastdoc-shell:save-before-close-result` · `capability=view` ### computeTableAutofitToWindowCommandState [Section titled “computeTableAutofitToWindowCommandState”](#computetableautofittowindowcommandstate) ```ts computeTableAutofitToWindowCommandState(request: D37TableAutofitToWindowRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-autofit-to-window-command-state` · `capability=view` ### computeTableCellContentAlignmentCommandState [Section titled “computeTableCellContentAlignmentCommandState”](#computetablecellcontentalignmentcommandstate) ```ts computeTableCellContentAlignmentCommandState(request: D37TableCellContentAlignmentRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-cell-content-alignment-command-state` · `capability=view` ### computeTableCellExactSizeCommandState [Section titled “computeTableCellExactSizeCommandState”](#computetablecellexactsizecommandstate) ```ts computeTableCellExactSizeCommandState(request: D37TableCellExactSizeRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-cell-exact-size-command-state` · `capability=view` ### computeTableCellMarginsCommandState [Section titled “computeTableCellMarginsCommandState”](#computetablecellmarginscommandstate) ```ts computeTableCellMarginsCommandState(request: D37TableCellMarginsRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-cell-margins-command-state` · `capability=view` ### computeTableCellSpacingCommandState [Section titled “computeTableCellSpacingCommandState”](#computetablecellspacingcommandstate) ```ts computeTableCellSpacingCommandState(request: D37TableCellSpacingRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-cell-spacing-command-state` · `capability=view` ### computeTableCellTextDirectionCommandState [Section titled “computeTableCellTextDirectionCommandState”](#computetablecelltextdirectioncommandstate) ```ts computeTableCellTextDirectionCommandState(request: D37TableCellTextDirectionRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-cell-text-direction-command-state` · `capability=view` ### computeTableCellTextWrappingCommandState [Section titled “computeTableCellTextWrappingCommandState”](#computetablecelltextwrappingcommandstate) ```ts computeTableCellTextWrappingCommandState(request: D37TableCellTextWrappingRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-cell-text-wrapping-command-state` · `capability=view` ### computeTableCellVerticalAlignmentCommandState [Section titled “computeTableCellVerticalAlignmentCommandState”](#computetablecellverticalalignmentcommandstate) ```ts computeTableCellVerticalAlignmentCommandState(request: D37TableCellVerticalAlignmentRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-cell-vertical-alignment-command-state` · `capability=view` ### computeTableFixedColumnWidthCommandState [Section titled “computeTableFixedColumnWidthCommandState”](#computetablefixedcolumnwidthcommandstate) ```ts computeTableFixedColumnWidthCommandState(request: D37TableFixedColumnWidthRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-fixed-column-width-command-state` · `capability=view` ### computeTableFloatingPositionCommandState [Section titled “computeTableFloatingPositionCommandState”](#computetablefloatingpositioncommandstate) ```ts computeTableFloatingPositionCommandState(request: D37TableFloatingPositionRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-floating-position-command-state` · `capability=view` ### computeTableSelectionAlignmentCommandState [Section titled “computeTableSelectionAlignmentCommandState”](#computetableselectionalignmentcommandstate) ```ts computeTableSelectionAlignmentCommandState(request: D37TableSelectionAlignmentRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-selection-alignment-command-state` · `capability=view` ### computeTableSelectionAllBordersCommandState [Section titled “computeTableSelectionAllBordersCommandState”](#computetableselectionallborderscommandstate) ```ts computeTableSelectionAllBordersCommandState(request: D37TableSelectionAllBordersRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-selection-all-borders-command-state` · `capability=view` ### computeTableSelectionCellRangeFormatCommandState [Section titled “computeTableSelectionCellRangeFormatCommandState”](#computetableselectioncellrangeformatcommandstate) ```ts computeTableSelectionCellRangeFormatCommandState(request: D37TableSelectionCellRangeFormatRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-selection-cell-range-format-command-state` · `capability=view` ### computeTableSelectionClearContentFormatCommandState [Section titled “computeTableSelectionClearContentFormatCommandState”](#computetableselectionclearcontentformatcommandstate) ```ts computeTableSelectionClearContentFormatCommandState(request: D37TableSelectionClearContentFormatRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-selection-clear-content-format-command-state` · `capability=view` ### computeTableSelectionClearContentsCommandState [Section titled “computeTableSelectionClearContentsCommandState”](#computetableselectionclearcontentscommandstate) ```ts computeTableSelectionClearContentsCommandState(request: D37TableSelectionClearContentsRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-selection-clear-contents-command-state` · `capability=view` ### computeTableSelectionClearFillCommandState [Section titled “computeTableSelectionClearFillCommandState”](#computetableselectionclearfillcommandstate) ```ts computeTableSelectionClearFillCommandState(request: D37TableSelectionClearFillRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-selection-clear-fill-command-state` · `capability=view` ### computeTableSelectionClearFormattingCommandState [Section titled “computeTableSelectionClearFormattingCommandState”](#computetableselectionclearformattingcommandstate) ```ts computeTableSelectionClearFormattingCommandState(request: D37TableSelectionClearFormattingRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-selection-clear-formatting-command-state` · `capability=view` ### computeTableSelectionColumnAutofitCommandState [Section titled “computeTableSelectionColumnAutofitCommandState”](#computetableselectioncolumnautofitcommandstate) ```ts computeTableSelectionColumnAutofitCommandState(request: D37TableSelectionColumnAutofitRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-selection-column-autofit-command-state` · `capability=view` ### computeTableSelectionEqualizeColumnsCommandState [Section titled “computeTableSelectionEqualizeColumnsCommandState”](#computetableselectionequalizecolumnscommandstate) ```ts computeTableSelectionEqualizeColumnsCommandState(request: D37TableSelectionEqualizeColumnsRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-selection-equalize-columns-command-state` · `capability=view` ### computeTableSelectionHeaderRepeatCommandState [Section titled “computeTableSelectionHeaderRepeatCommandState”](#computetableselectionheaderrepeatcommandstate) ```ts computeTableSelectionHeaderRepeatCommandState(request: D37TableSelectionHeaderRepeatRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-selection-header-repeat-command-state` · `capability=view` ### computeTableSelectionInsideBordersCommandState [Section titled “computeTableSelectionInsideBordersCommandState”](#computetableselectioninsideborderscommandstate) ```ts computeTableSelectionInsideBordersCommandState(request: D37TableSelectionInsideBordersRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-selection-inside-borders-command-state` · `capability=view` ### computeTableSelectionOutsideBordersCommandState [Section titled “computeTableSelectionOutsideBordersCommandState”](#computetableselectionoutsideborderscommandstate) ```ts computeTableSelectionOutsideBordersCommandState(request: D37TableSelectionOutsideBordersRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-selection-outside-borders-command-state` · `capability=view` ### computeTableSelectionPencilEraserCommandState [Section titled “computeTableSelectionPencilEraserCommandState”](#computetableselectionpencilerasercommandstate) ```ts computeTableSelectionPencilEraserCommandState(request: D37TableSelectionPencilEraserRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-selection-pencil-eraser-command-state` · `capability=view` ### computeTableSelectionRowFitCommandState [Section titled “computeTableSelectionRowFitCommandState”](#computetableselectionrowfitcommandstate) ```ts computeTableSelectionRowFitCommandState(request: D37TableSelectionRowFitRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-selection-row-fit-command-state` · `capability=view` ### computeTableSelectionStructureCommandState [Section titled “computeTableSelectionStructureCommandState”](#computetableselectionstructurecommandstate) ```ts computeTableSelectionStructureCommandState(request: D37TableSelectionStructureEditRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-selection-structure-command-state` · `capability=view` ### computeTableSelectionWidthFitCommandState [Section titled “computeTableSelectionWidthFitCommandState”](#computetableselectionwidthfitcommandstate) ```ts computeTableSelectionWidthFitCommandState(request: D37TableSelectionWidthFitRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-selection-width-fit-command-state` · `capability=view` ### computeTableWrappingStyleCommandState [Section titled “computeTableWrappingStyleCommandState”](#computetablewrappingstylecommandstate) ```ts computeTableWrappingStyleCommandState(request: D37TableWrappingStyleRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:compute-table-wrapping-style-command-state` · `capability=view` ### createTableFromClipboard [Section titled “createTableFromClipboard”](#createtablefromclipboard) ```ts createTableFromClipboard(request: D37TableCreateRequest): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:create-table-from-clipboard` · `capability=view` ### getState [Section titled “getState”](#getstate) ```ts getState(): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:get-state` · `capability=view` ### notifyUnsavedState [Section titled “notifyUnsavedState”](#notifyunsavedstate) ```ts notifyUnsavedState(hasUnsavedChanges: boolean): void ``` `web_to_host_event` · `send` · `fastdoc-shell:unsaved-state` · `capability=view` ### onMenuCommand [Section titled “onMenuCommand”](#onmenucommand) ```ts onMenuCommand(callback: (command: MenuCommand) => void): () => void ``` `host_to_web_event` · `on` · `fastdoc-shell:menu-command` · `capability=view` ### onSaveBeforeClose [Section titled “onSaveBeforeClose”](#onsavebeforeclose) ```ts onSaveBeforeClose(callback: () => void): () => void ``` `host_to_web_event` · `on` · `fastdoc-shell:save-before-close` · `capability=view` ### onSaveBeforeCloseFailed [Section titled “onSaveBeforeCloseFailed”](#onsavebeforeclosefailed) ```ts onSaveBeforeCloseFailed(callback: (payload: { message: string }) => void): () => void ``` `host_to_web_event` · `on` · `fastdoc-shell:save-before-close-failed` · `capability=view` ### onStateChanged [Section titled “onStateChanged”](#onstatechanged) ```ts onStateChanged(callback: (state: ShellBridgeState) => void): () => void ``` `host_to_web_event` · `on` · `fastdoc-shell:state-changed` · `capability=view` ### onSystemPaste [Section titled “onSystemPaste”](#onsystempaste) ```ts onSystemPaste(callback: (payload: SystemPastePayload) => void): () => void ``` `host_to_web_event` · `on` · `fastdoc-shell:system-paste` · `capability=view` ### openExternalHyperlink [Section titled “openExternalHyperlink”](#openexternalhyperlink) ```ts openExternalHyperlink(target: string): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:open-external-hyperlink` · `capability=view` ### readEditorClipboardText [Section titled “readEditorClipboardText”](#readeditorclipboardtext) ```ts readEditorClipboardText(): Promise< SystemPastePayload & { length: number; reserveConfig?: { cycles: number; durationMs: number; richPayloadBytes: number } | null; externalSource?: string | null; } > ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:read-editor-clipboard-text` · `capability=view` ### revealPath [Section titled “revealPath”](#revealpath) ```ts revealPath(path: string): Promise ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:reveal-path` · `capability=view` ### writeEditorClipboardText [Section titled “writeEditorClipboardText”](#writeeditorclipboardtext) ```ts writeEditorClipboardText(text: string, representations?: { html?: string | null; rtf?: string | null; internalJson?: string | null }): Promise<{ written: boolean; length: number; formats: string[]; fingerprint: string }> ``` `web_to_host_request_response` · `invoke` · `fastdoc-shell:write-editor-clipboard-text` · `capability=view` # Browser surface interface (Browser Surface API) > Embedding the surface: mounting and unmounting it, events for your application, and its current limits. One surface per page The active surface is kept in a single place in the module. A second call to `mount` doesn’t create a second surface — it first unmounts the first one, silently for the caller, but the host receives an `unmounted` event it didn’t ask for. You can’t put two documents side by side on one page this way. This is also why the two `unmount` methods in the declarations below differ. On `Handle`, it unmounts your surface; on `FastDocSurface`, it unmounts whichever one is currently active — and that may no longer be yours. And there’s one place where the surface doesn’t forgive mistakes: if the first argument to `mount` isn’t a page node, the call throws a `TypeError`. The settings next to it, by contrast, are silently dropped — see [what is accepted and what is discarded](/sumdoc/embedding/). Starting the surface. `$CLI` is the path to the processor inside the installed application, defined on the [Installation and verification](/sumdoc/install/) page: ```bash "$CLI" surface --port 0 --doc /absolute/input.docx --save /absolute/output.docx ``` What the surface exposes on the window. The names start with `fastdoc` — this is the document engine’s internal name in the code, not a different product: the rename to SumDoc didn’t touch them, because changing the names in the code would break compatibility for anyone who has already embedded the surface. The same applies to the spreadsheet, with the `fastsheet` prefix. ```ts interface HostConfig { theme?:"light"|"dark"; locale?:string; readOnly?:boolean; cssVariables?:Record<`--fastdoc-${string}`,string>; } interface Handle { container:HTMLElement; hostConfig:Readonly; unmount():void; } interface FastDocSurface { version:"fastdoc.surface-mount.v1"; mount(container:HTMLElement, config?:HostConfig):Handle; unmount():void; } // window.fastdocSurface: FastDocSurface ``` ## Events for your application [Section titled “Events for your application”](#events-for-your-application) ```ts type SurfaceEvent = | {schema:"fastdoc.surface-host-event.v1";type:"ready";documentPath:string;savePath:string;theme:string;locale:string} | {schema:"fastdoc.surface-host-event.v1";type:"dirty";dirty:boolean} | {schema:"fastdoc.surface-host-event.v1";type:"saved";dirty:false;path:string;byteCount:number} | {schema:"fastdoc.surface-host-event.v1";type:"error";operation:"connect"|"save";message:string} | {schema:"fastdoc.surface-host-event.v1";type:"unmounted"}; window.addEventListener("fastdoc-host-event", e => consume((e as CustomEvent).detail)); // In WKWebView, events arrive at the fastdocHost handler; in WebView2, via WebMessageReceived ``` The surface is limited today: mounting and unmounting, reading and editing the first paragraph, saving, finishing, and five events. Arbitrary document structure, selection, and the context menu are not exposed. # SumDoc transport and message format > Exchanging JSON strings and over WebSocket, the request and response format, refusal texts, timeouts, and exchange contract versions. ## JSONL stdio [Section titled “JSONL stdio”](#jsonl-stdio) ```bash # $CLI is the path to the processor inside the installed application, # it's given on the “Installation and verification” page "$CLI" serve { "schema": "fastdoc.session-serve.v1", "stage_id": "D7", "session_kind": "jsonl-stdio-document-session-prototype", "supported_commands": [ "apply-composition", "apply-text-transaction", "commit-snapshot", "commit-structural-snapshot", "compatibility-inspect", "compose", "model", "mutate", "open", "paginate", "ping", "print", "print-delta", "print-summary", "print-window", "redo", "report", "review", "save", "save-checkpoint", "set-selection", "shutdown", "simple-field-inventory", "squash-history", "status", "style", "track-revisions-state", "undo" ], "ready": true } ``` ## WebSocket [Section titled “WebSocket”](#websocket) ```bash "$CLI" serve --ws 0 [--token ] {"schema":"fastdoc.session-ws-bootstrap.v1","transport":"websocket","host":"127.0.0.1","port":49152,"token":"<64 hex>","ready":true} ``` The connection accepts only UTF-8 text frames, listens only on a local address, and checks the token passed in the connection address. Right after connecting, the same readiness line arrives as with standard-input/output exchange. About `--token`. If you don’t set one, the processor generates a new token on every launch: 256 bits from the system randomness source — the same 64 hex characters in the readiness line — and it lives exactly as long as the process runs. If you set your own, rotating it on every launch becomes your responsibility, and a fixed value in the startup script cancels that rotation. The core checks your own token only for being non-empty The processor requires neither length nor randomness: `--token secret` is accepted just like 64 hex characters. It can’t tell a weak value from a strong one — the quality of your token is entirely up to you, and an empty string is the only thing it rejects. The `stage_id` field in the readiness response The readiness line carries a `stage_id` field with a value like `D7`. This is an internal marker of the core’s development stage: it can change in any release, and you shouldn’t rely on it. The `schema` field names the contract version. ## Request and response envelope [Section titled “Request and response envelope”](#request-and-response-envelope) ```ts interface Request { id?: unknown; cmd: SessionCommandName; /* command fields flattened */ } interface Response { id:unknown; ok:boolean; cmd?:string; elapsed_ms?:number; result?:T; error?:string; } ``` | Situation | What comes back | | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | The request isn’t an object, or is missing the `cmd` field | `ok: false`, with the `error` field — `each request line must be a JSON object with a string cmd field` | | No command with that name exists | `ok: false`, with `error` — `unknown session command: ` | | The command requires an open document | `ok: false`, with `error` — `no document is open in this session` | | An internal processing error | `ok: false` and a message marked `panicked`. The session stays alive and the connection doesn’t drop — you can send the next command | ## What’s in the greeting line [Section titled “What’s in the greeting line”](#whats-in-the-greeting-line) The first line of the session isn’t a formality: you use it to verify what you’re talking to. It has five fields. | Field | What’s in it | | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `schema` | `fastdoc.session-serve.v1` — the version of the conversation itself. Check this one at startup: if it doesn’t match, the processor is older or newer than your code. | | `session_kind` | How you connected (three values, below). | | `supported_commands` | The full list of commands this particular processor will accept. More reliable than the reference: it speaks for itself. | | `stage_id` | An internal build-stage marker. Not needed for embedding; don’t branch on it. | | `ready` | `true` when the session is ready to accept commands. | There are three kinds of session, and they show which way the conversation was opened: | `session_kind` value | When you see it | | ----------------------------------------- | ---------------------------------------------------------------------- | | `jsonl-stdio-document-session-prototype` | Exchanging strings over standard input/output — `serve` with no flags. | | `json-websocket-document-session` | The same contract over WebSocket — `serve --ws`. | | `json-websocket-embedded-surface-session` | An embedded-surface session — `surface`. | The word `prototype` in the first name This is the channel’s historical name, not a judgment of its maturity: exchanging lines over standard input and output is the main path for external integration; the quick start is built on it, and all session commands go through it. It can’t be renamed without breaking those who already check this value. About timeouts There’s no timeout in the JSONL or WebSocket session: the response arrives when the command has been processed, and any time limit is set by the client itself. The only timeout on the SumDoc side is five seconds for reading an HTTP request in Surface Host. ## Exchange contract versions [Section titled “Exchange contract versions”](#exchange-contract-versions) | Contract | Version | | ---------------------------------------------------- | ---------------------------------------------- | | Machine-readable description of the session protocol | fastdoc.session-protocol-descriptor.v1 | | JSONL session readiness | fastdoc.session-serve.v1 | | Address and token for WebSocket | fastdoc.session-ws-bootstrap.v1 | | Starting the surface: address, token, version | fastdoc.surface-host-bootstrap.v1 | | Mounting the surface on your page | fastdoc.surface-mount.v1 | | Surface event to your application | fastdoc.surface-host-event.v1 | | Interaction context — proposed | `a4.interaction-context.v1`, not yet finalized | What this is, and what it doesn’t replace This describes the verified current boundaries and a proposed external contract. It doesn’t replace an agreed specification: the final addressing types, the support matrix, and availability commitments are part of the pilot’s capability profile. # Typed editing types > Typed edit-transaction structures at the Rust boundary. These are the same structures the core uses to accept edits, shown as they appear from the browser side. Two of their properties matter from the very first call. **Positions are measured in UTF-16 code units** — the same way JavaScript counts them. So `utf16_offset` comes straight from the browser selection and needs no recalculation: a character outside the basic multilingual plane — an emoji, a rare CJK character — takes two units in both places. **An unknown field causes a refusal, not silence.** The structures don’t accept extra fields: a typo in a name isn’t silently dropped — the core responds with a refusal. Keep this in mind before adding a field “just in case.” Acceptance and projections of these same structures are on the shell pages, starting with [`window.fastdocShell · edit`](/reference/sumdoc/shell-edit/). ```ts type RequestId = string; type DocumentId = string; type SessionId = string; type ViewId = string; type StoryId = string; type NodeId = string; type Revision = number; type SelectionRevision = number; type Utf16Offset = number; type Affinity = "upstream" | "downstream"; interface DocumentPosition { story_id: StoryId; node_id: NodeId; utf16_offset: Utf16Offset; affinity: Affinity; } interface DocumentRange { anchor: DocumentPosition; focus: DocumentPosition; } interface DocumentSelection { range: DocumentRange; } interface CharacterProperties { font_family?: string | null; font_size_half_points?: number | null; bold?: boolean | null; italic?: boolean | null; underline?: "none" | "single" | "double" | "dotted" | "thick" | "dash" | "wave" | null; color_rgb?: string | null; vertical_alignment?: "baseline" | "superscript" | "subscript" | null; highlight?: {mode:"color";color:string} | {mode:"clear"} | null; shading?: {mode:"fill";color_rgb:string} | {mode:"clear"} | null; strikethrough?: boolean | null; text_effect?: "none" | "outline" | "shadow" | "emboss" | "imprint" | null; change_case?: "sentence" | "lower" | "upper" | "capitalize" | "toggle" | null; } type LineSpacing = | {rule:"auto";twips:number} | {rule:"exact";twips:number} | {rule:"at_least";twips:number}; type ParagraphNumbering = | {action:"apply"|"continue";kind:"bullet"|"decimal";ilvl:number} | {action:"set_level";ilvl:number} | {action:"clear"}; interface ParagraphProperties { alignment?: "left"|"center"|"right"|"justify" | null; left_indent_twips?: number | null; right_indent_twips?: number | null; first_line_indent_twips?: number | null; line_spacing?: LineSpacing | null; shading?: {mode:"fill";color_rgb:string}|{mode:"clear"}|null; borders?: unknown; numbering?: ParagraphNumbering | null; style?: "normal"|"heading1"|"heading2"|"heading3" | null; } interface FragmentRun { text:string; properties:CharacterProperties; } interface FragmentParagraph { runs:FragmentRun[]; properties:ParagraphProperties; } interface DocumentFragment { paragraphs:FragmentParagraph[]; } type EditCommand = | {type:"insert_text";at:DocumentPosition;text:string} | {type:"insert_tracked_text";text:string;expected_model_hash:string} | {type:"delete_range";range:DocumentRange} | {type:"delete_tracked_deletion_range";paragraph:DocumentPosition;deletion_index:number;start_utf16_offset:number;end_utf16_offset:number} | {type:"replace_range";range:DocumentRange;text:string} | {type:"split_paragraph";at:DocumentPosition} | {type:"split_paragraph_replacing_range";range:DocumentRange} | {type:"merge_paragraphs";left:DocumentPosition;right:DocumentPosition} | {type:"paste_plain_text";range:DocumentRange;text:string} | {type:"paste_fragment";range:DocumentRange;fragment:DocumentFragment} | {type:"set_character_properties";range:DocumentRange;properties:CharacterProperties} | {type:"set_paragraph_properties";range:DocumentRange;properties:ParagraphProperties} | {type:"clear_formatting";range:DocumentRange} | {type:"autocorrect";range:DocumentRange;replacement:string} | {type:"insert_merge_field";field_name:string;expected_model_hash:string} | {type:"apply_structural_snapshot";transition_kind:string;selection_after?:DocumentSelection|null} | {type:"undo"} | {type:"redo"}; interface EditRequest { request_id:RequestId; document_id:DocumentId; session_id:SessionId; view_id:ViewId; expected_revision:Revision; expected_selection_revision:SelectionRevision; command:EditCommand; } interface SelectionUpdateRequest { request_id:RequestId; document_id:DocumentId; session_id:SessionId; view_id:ViewId; expected_revision:Revision; expected_selection_revision:SelectionRevision; selection:DocumentSelection; } type CompositionCommand = | {type:"start"|"update";range:DocumentRange;text:string} | {type:"cancel"} | {type:"commit"}; interface CompositionRequest { request_id:RequestId; document_id:DocumentId; session_id:SessionId; view_id:ViewId; expected_revision:Revision; expected_selection_revision:SelectionRevision; command:CompositionCommand; } interface SaveCheckpointTarget { path:string; expected_hash?:string|null; expected_identity?:Record|null; } ``` # Cells and ranges > Cell editing, reading details, shifts, copy and paste, find and replace, sorting, undo and redo, navigation around the sheet. Operations on the page: 23. Cell editing, reading details, shifts, copy and paste, find and replace, sorting, undo and redo, navigation around the sheet. Terms are in the [glossary](/start/glossary/). **Operations on this page — 23** * [`apply_cell_edits`](#apply_cell_edits) * [`apply_cell_shift`](#apply_cell_shift) * [`clear_sheet_bounded`](#clear_sheet_bounded) * [`commit_replacements_in_workbook_subset`](#commit_replacements_in_workbook_subset) * [`compute_replacements_in_workbook_subset`](#compute_replacements_in_workbook_subset) * [`compute_selection_aggregates`](#compute_selection_aggregates) * [`convert_entity_data_type_in_place`](#convert_entity_data_type_in_place) * [`copy_range`](#copy_range) * [`fill_across_sheets`](#fill_across_sheets) * [`find_in_workbook_subset`](#find_in_workbook_subset) * [`flash_fill_pattern`](#flash_fill_pattern) * [`mark_used_range_dirty_bounded`](#mark_used_range_dirty_bounded) * [`move_clipboard_range`](#move_clipboard_range) * [`paste_range`](#paste_range) * [`preview_cell_edits`](#preview_cell_edits) * [`read_cell_details`](#read_cell_details) * [`redo_last_cell_edit`](#redo_last_cell_edit) * [`redo_last_range_edit`](#redo_last_range_edit) * [`resolve_current_region`](#resolve_current_region) * [`resolve_navigation_edge`](#resolve_navigation_edge) * [`sort_range_rows`](#sort_range_rows) * [`undo_last_cell_edit`](#undo_last_cell_edit) * [`undo_last_range_edit`](#undo_last_range_edit) ## apply\_cell\_edits [Section titled “apply\_cell\_edits”](#apply_cell_edits) Applies a batch of cell edits in one atomic action: either all the edits apply, or none of them do. A batch stays within one sheet Every edit in `edits` must belong to the same sheet. A batch touching two sheets is rejected in full with `unsupported-cross-sheet-edit`, and the workbook doesn’t change. Edits across different sheets are sent as separate requests — atomicity then applies within each sheet, but not across them. **Request** | Field | TypeScript type | Req. | Note from the contract | | ------------------ | ---------------------------------------------------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | operation | `"apply_cell_edits"` | yes | | | `subsetId` | string | yes | | | edits | [CellInputEdit](/reference/sumsheet/types-cells/#cellinputedit)\[] | yes | | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | | `expectedRevision` | number \| null | no | An optional race-condition check. If this field is present, it must match the workbook’s current history revision; on a mismatch, the request is rejected with `apply-cell-edits-stale-revision`, and nothing changes. Without this field, the edit is applied unconditionally. | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | | **Response on success · apply\_cell\_edits** | Field | TypeScript type | Req. | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---- | | operation | `"apply_cell_edits"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `editedKeys` | string\[] | yes | | `changedKeys` | string\[] | yes | | `dirtyCellCount` | number | yes | | `sheetProtected` | boolean | yes | | `conditionalFormattingRules` | [ContractConditionalRule](/reference/sumsheet/types-format/#contractconditionalrule)\[] | no | | `currentSourceSaveReadiness` | [ContractCurrentSourceSaveReadiness](/reference/sumsheet/types-common/#contractcurrentsourcesavereadiness) \| null | no | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `tableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) \| null | no | | `workbookTableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) \| null | no | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | **Minimal JSON template** ```json { "operation": "apply_cell_edits", "subsetId": "", "edits": [], "requestedBackend": "native-desktop" } ``` ## apply\_cell\_shift [Section titled “apply\_cell\_shift”](#apply_cell_shift) Applies a cell shift. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------------- | ---- | | operation | `"apply_cell_shift"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | `rowStart` | number | yes | | `rowEnd` | number | yes | | `colStart` | number | yes | | `colEnd` | number | yes | | direction | [ContractXlsxCellShiftDirection](/reference/sumsheet/types-cells/#contractxlsxcellshiftdirection) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · apply\_cell\_shift** | Field | TypeScript type | Req. | | ------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ---- | | operation | `"apply_cell_shift"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | range | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | direction | [ContractXlsxCellShiftDirection](/reference/sumsheet/types-cells/#contractxlsxcellshiftdirection) | yes | | `changedRows` | number\[] | yes | | `changedColumns` | number\[] | yes | | `shiftedCellCount` | number | yes | | `removedCellCount` | number | yes | | `cellShiftClaim` | `"live_verified"` | yes | | `shiftScope` | `"active_visible_value_cells_current_sheet"` | yes | | `formulaReferenceRewriteClaim` | `"no"` | yes | | `mergeReferenceRewriteClaim` | `"no"` | yes | | `dirtyCellCount` | number | yes | | `currentSourceSaveReadiness` | [ContractCurrentSourceSaveReadiness](/reference/sumsheet/types-common/#contractcurrentsourcesavereadiness) \| null | no | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | yes | **Minimal JSON template** ```json { "operation": "apply_cell_shift", "subsetId": "", "sheetKey": "", "rowStart": 0, "rowEnd": 0, "colStart": 0, "colEnd": 0, "direction": "", "requestedBackend": "native-desktop" } ``` ## clear\_sheet\_bounded [Section titled “clear\_sheet\_bounded”](#clear_sheet_bounded) Clears a sheet within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"clear_sheet_bounded"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · clear\_sheet\_bounded** | Field | TypeScript type | Req. | | ---------------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"clear_sheet_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `clearedSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `sheetClearClaim` | `"live_verified"` | yes | | `clearScope` | `"active_worksheet_cells_only_preserve_sheet_metadata"` | yes | | `formattingClearClaim` | `"no"` | yes | **Minimal JSON template** ```json { "operation": "clear_sheet_bounded", "subsetId": "", "sheetKey": "", "requestedBackend": "native-desktop" } ``` ## commit\_replacements\_in\_workbook\_subset [Section titled “commit\_replacements\_in\_workbook\_subset”](#commit_replacements_in_workbook_subset) Commits replacements in a workbook subset. **Request** | Field | TypeScript type | Req. | | ------------------ | ----------------------------------------------------------------------------------- | ---- | | operation | `"commit_replacements_in_workbook_subset"` | yes | | `subsetId` | string | yes | | query | string | yes | | replacement | string | yes | | `matchCase` | boolean | no | | `matchEntireCell` | boolean | no | | `lookIn` | [ContractFindLookIn](/reference/sumsheet/types-cells/#contractfindlookin) | yes | | scope | [ContractFindScope](/reference/sumsheet/types-cells/#contractfindscope) | yes | | `searchOrder` | [ContractFindSearchOrder](/reference/sumsheet/types-cells/#contractfindsearchorder) | no | | `expectedRevision` | number | yes | | locale | string | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · commit\_replacements\_in\_workbook\_subset** | Field | TypeScript type | Req. | | ------------------ | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"commit_replacements_in_workbook_subset"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | scope | [ContractFindScope](/reference/sumsheet/types-cells/#contractfindscope) | yes | | `lookIn` | [ContractFindLookIn](/reference/sumsheet/types-cells/#contractfindlookin) | yes | | `searchOrder` | [ContractFindSearchOrder](/reference/sumsheet/types-cells/#contractfindsearchorder) | yes | | `plannedEditCount` | number | yes | | `appliedEditCount` | number | yes | | `changedKeys` | string\[] | yes | | dirty | boolean | yes | | `recalcNeeded` | boolean | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | **Minimal JSON template** ```json { "operation": "commit_replacements_in_workbook_subset", "subsetId": "", "query": "", "replacement": "", "lookIn": "", "scope": "", "expectedRevision": 0, "requestedBackend": "native-desktop" } ``` ## compute\_replacements\_in\_workbook\_subset [Section titled “compute\_replacements\_in\_workbook\_subset”](#compute_replacements_in_workbook_subset) Computes replacements in a workbook subset. **Request** | Field | TypeScript type | Req. | | ------------------ | ----------------------------------------------------------------------------------- | ---- | | operation | `"compute_replacements_in_workbook_subset"` | yes | | `subsetId` | string | yes | | query | string | yes | | replacement | string | yes | | `matchCase` | boolean | no | | `matchEntireCell` | boolean | no | | `lookIn` | [ContractFindLookIn](/reference/sumsheet/types-cells/#contractfindlookin) | yes | | scope | [ContractFindScope](/reference/sumsheet/types-cells/#contractfindscope) | yes | | `searchOrder` | [ContractFindSearchOrder](/reference/sumsheet/types-cells/#contractfindsearchorder) | no | | `resultOffset` | number | no | | `resultLimit` | number | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · compute\_replacements\_in\_workbook\_subset** | Field | TypeScript type | Req. | | ------------------- | ----------------------------------------------------------------------------------------- | ---- | | operation | `"compute_replacements_in_workbook_subset"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | scope | [ContractFindScope](/reference/sumsheet/types-cells/#contractfindscope) | yes | | `lookIn` | [ContractFindLookIn](/reference/sumsheet/types-cells/#contractfindlookin) | yes | | `searchOrder` | [ContractFindSearchOrder](/reference/sumsheet/types-cells/#contractfindsearchorder) | yes | | `totalEditCount` | number | yes | | `resultOffset` | number | yes | | `returnedEditCount` | number | yes | | truncated | boolean | yes | | `nextResultOffset` | number | no | | index | [ContractFindIndexStats](/reference/sumsheet/types-cells/#contractfindindexstats) | yes | | edits | [ContractReplaceEdit](/reference/sumsheet/types-common/#contractreplaceedit)\[] | yes | **Minimal JSON template** ```json { "operation": "compute_replacements_in_workbook_subset", "subsetId": "", "query": "", "replacement": "", "lookIn": "", "scope": "", "requestedBackend": "native-desktop" } ``` ## compute\_selection\_aggregates [Section titled “compute\_selection\_aggregates”](#compute_selection_aggregates) Computes totals for a selection. **Request** | Field | TypeScript type | Req. | | ------------------- | ---------------------------------------------------------------------------------- | ---- | | operation | `"compute_selection_aggregates"` | yes | | `subsetId` | string | yes | | ranges | [CellRange](/reference/sumsheet/types-cells/#cellrange)\[] | yes | | `aggregateMode` | `"visible_rows"` \| “all\_rows” | no | | `requestGeneration` | number | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · compute\_selection\_aggregates** | Field | TypeScript type | Req. | Note from the contract | | ---------------------------- | ----------------------------------------------------------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------- | | operation | `"compute_selection_aggregates"` | yes | | | `subsetId` | string | yes | | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | | `aggregateMode` | `"visible_rows"` \| “all\_rows” | yes | | | `requestGeneration` | number | no | | | `workbookRevision` | number | yes | | | `calculationGeneration` | number | yes | | | `cacheStatus` | `"hit"` \| “miss” | yes | | | `cacheEntryCount` | number | yes | | | `scannedCellCount` | number | yes | | | `nonEmptyCount` | number | yes | How many non-empty cells are in the selection — both text and numbers count. The same as the COUNTA function gives. | | `numericCount` | number | yes | How many cells go into the numeric totals below. | | `errorCount` | number | yes | | | `formulaCount` | number | yes | | | `numericAggregatesAvailable` | boolean | yes | | | sum | number | yes | | | average | number | yes | | | min | number | yes | | | max | number | yes | | **Minimal JSON template** ```json { "operation": "compute_selection_aggregates", "subsetId": "", "ranges": [], "requestedBackend": "native-desktop" } ``` ## convert\_entity\_data\_type\_in\_place [Section titled “convert\_entity\_data\_type\_in\_place”](#convert_entity_data_type_in_place) Converts an entity’s data type in place. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------ | ---- | | operation | `"convert_entity_data_type_in_place"` | yes | | `subsetId` | string | yes | | kind | [ContractEntityDataTypeKind](/reference/sumsheet/types-common/#contractentitydatatypekind) | yes | | range | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · convert\_entity\_data\_type\_in\_place** | Field | TypeScript type | Req. | | --------------- | ------------------------------------------------------------------------------------------------------------ | ---- | | operation | `"convert_entity_data_type_in_place"` | yes | | `subsetId` | string | yes | | kind | [ContractEntityDataTypeKind](/reference/sumsheet/types-common/#contractentitydatatypekind) | yes | | range | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | `originalTexts` | string\[] | yes | | disposition | [ContractEntityConversionDisposition](/reference/sumsheet/types-common/#contractentityconversiondisposition) | yes | | `didMutate` | boolean | yes | | `entityCells` | [ContractEntityCellMetadata](/reference/sumsheet/types-cells/#contractentitycellmetadata)\[] | yes | | refusal | [ContractEntityConversionRefusal](/reference/sumsheet/types-common/#contractentityconversionrefusal) \| null | no | **Minimal JSON template** ```json { "operation": "convert_entity_data_type_in_place", "subsetId": "", "kind": "", "range": "", "requestedBackend": "native-desktop" } ``` ## copy\_range [Section titled “copy\_range”](#copy_range) Copies a range. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"copy_range"` | yes | | `subsetId` | string | yes | | range | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · copy\_range** | Field | TypeScript type | Req. | | ---------------------------------- | ----------------------------------------------------------------------------------------- | ---- | | operation | `"copy_range"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `clipboardId` | string | yes | | range | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | `rowCount` | number | yes | | `colCount` | number | yes | | `cellCount` | number | yes | | `mimeTypes` | string\[] | yes | | `mergedRanges` | [CellRange](/reference/sumsheet/types-cells/#cellrange)\[] | no | | `sourceSelectionExpandedForMerges` | boolean | no | | `clipboardHtml` | string \| null | no | | `canonicalEdits` | [CellInputEdit](/reference/sumsheet/types-cells/#cellinputedit)\[] | no | **Minimal JSON template** ```json { "operation": "copy_range", "subsetId": "", "range": "", "requestedBackend": "native-desktop" } ``` ## fill\_across\_sheets [Section titled “fill\_across\_sheets”](#fill_across_sheets) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ------------------ | ----------------------------------------------------------------------------------------------- | ---- | | operation | “fill\_across\_sheets” | yes | | `subsetId` | string | yes | | `sourceRange` | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | `targetSheetKeys` | string\[] | yes | | mode | [ContractFillAcrossSheetsMode](/reference/sumsheet/types-session/#contractfillacrosssheetsmode) | yes | | `expectedRevision` | number \| null | no | | `readOnly` | boolean | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | **Response on success · fill\_across\_sheets** | Field | TypeScript type | Req. | | ----------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | “fill\_across\_sheets” | yes | | `subsetId` | string | yes | | mode | [ContractFillAcrossSheetsMode](/reference/sumsheet/types-session/#contractfillacrosssheetsmode) | yes | | `sourceRange` | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | `targetSheetKeys` | string\[] | yes | | `mutationCount` | number | yes | | `changedKeys` | string\[] | yes | | dirty | boolean | yes | | `recalcNeeded` | boolean | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | **Minimal JSON template** ```json { "operation": "fill_across_sheets", "subsetId": "", "sourceRange": "", "targetSheetKeys": "", "mode": "" } ``` ## find\_in\_workbook\_subset [Section titled “find\_in\_workbook\_subset”](#find_in_workbook_subset) Searches within a workbook subset. **Request** | Field | TypeScript type | Req. | | ------------------ | ----------------------------------------------------------------------------------- | ---- | | operation | `"find_in_workbook_subset"` | yes | | `subsetId` | string | yes | | query | string | yes | | `matchCase` | boolean | no | | `matchEntireCell` | boolean | no | | `lookIn` | [ContractFindLookIn](/reference/sumsheet/types-cells/#contractfindlookin) | yes | | scope | [ContractFindScope](/reference/sumsheet/types-cells/#contractfindscope) | yes | | `searchOrder` | [ContractFindSearchOrder](/reference/sumsheet/types-cells/#contractfindsearchorder) | no | | `resultOffset` | number | no | | `resultLimit` | number | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · find\_in\_workbook\_subset** | Field | TypeScript type | Req. | | -------------------- | ----------------------------------------------------------------------------------------- | ---- | | operation | `"find_in_workbook_subset"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | scope | [ContractFindScope](/reference/sumsheet/types-cells/#contractfindscope) | yes | | `lookIn` | [ContractFindLookIn](/reference/sumsheet/types-cells/#contractfindlookin) | yes | | `searchOrder` | [ContractFindSearchOrder](/reference/sumsheet/types-cells/#contractfindsearchorder) | yes | | `totalMatchCount` | number | yes | | `resultOffset` | number | yes | | `returnedMatchCount` | number | yes | | truncated | boolean | yes | | `nextResultOffset` | number | no | | index | [ContractFindIndexStats](/reference/sumsheet/types-cells/#contractfindindexstats) | yes | | matches | [ContractFindMatch](/reference/sumsheet/types-cells/#contractfindmatch)\[] | yes | **Minimal JSON template** ```json { "operation": "find_in_workbook_subset", "subsetId": "", "query": "", "lookIn": "", "scope": "", "requestedBackend": "native-desktop" } ``` ## flash\_fill\_pattern [Section titled “flash\_fill\_pattern”](#flash_fill_pattern) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | --------------------- | ------------------------------------------------------------------------------------ | ---- | | operation | “flash\_fill\_pattern” | yes | | `subsetId` | string | yes | | mode | [FlashFillMode](/reference/sumsheet/types-format/#flashfillmode) | yes | | generation | number | yes | | examples | [FlashFillExample](/reference/sumsheet/types-format/#flashfillexample)\[] | yes | | rows | [FlashFillTargetRow](/reference/sumsheet/types-format/#flashfilltargetrow)\[] | yes | | `selectedCandidateId` | string \| null | no | | locale | string \| null | no | | refusal | [FlashFillRefusalContext](/reference/sumsheet/types-format/#flashfillrefusalcontext) | no | | `expectedRevision` | number \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | **Response on success · flash\_fill\_pattern** | Field | TypeScript type | Req. | | --------------- | -------------------------------------------------------------------------- | ---- | | operation | “flash\_fill\_pattern” | yes | | `subsetId` | string | yes | | mode | [FlashFillMode](/reference/sumsheet/types-format/#flashfillmode) | yes | | generation | number | yes | | inference | [FlashFillInference](/reference/sumsheet/types-format/#flashfillinference) | yes | | applied | boolean | yes | | `mutationCount` | number | yes | | projection | ComputeResponsePayload \| null | no | **Minimal JSON template** ```json { "operation": "flash_fill_pattern", "subsetId": "", "mode": "", "generation": 0, "examples": [], "rows": [] } ``` ## mark\_used\_range\_dirty\_bounded [Section titled “mark\_used\_range\_dirty\_bounded”](#mark_used_range_dirty_bounded) Marks the used range as changed, within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"mark_used_range_dirty_bounded"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · mark\_used\_range\_dirty\_bounded** | Field | TypeScript type | Req. | | ------------------------ | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"mark_used_range_dirty_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `changedSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `previousUsedRangeDirty` | boolean | yes | | `usedRangeDirty` | true | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `usedRangeDirtyClaim` | `"live_verified"` | yes | | `usedRangeDirtyScope` | `"current_session_worksheet_used_range_marker"` | yes | | `workbookMutationClaim` | `"no"` | yes | **Minimal JSON template** ```json { "operation": "mark_used_range_dirty_bounded", "subsetId": "", "sheetKey": "", "requestedBackend": "native-desktop" } ``` ## move\_clipboard\_range [Section titled “move\_clipboard\_range”](#move_clipboard_range) Moves a range from the clipboard. The response will come back under a different operation’s name For a `move_clipboard_range` request, `payload.operation` comes back as `paste_range`. Match the response to the request by its identifier, not by the operation name — [why](/reference/sumsheet/conventions/). **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"move_clipboard_range"` | yes | | `subsetId` | string | yes | | `clipboardId` | string | yes | | target | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | transpose | false | no | | `pasteMode` | `"all"` | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · paste\_range** | Field | TypeScript type | Req. | Note from the contract | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---- | --------------------------------------------------------------------------------------------------------------- | | operation | `"paste_range"` | yes | | | `subsetId` | string | yes | | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | | `clipboardId` | string | yes | | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | | `currentSourceSaveReadiness` | [ContractCurrentSourceSaveReadiness](/reference/sumsheet/types-common/#contractcurrentsourcesavereadiness) \| null | no | | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | no | | | `recalcNeeded` | boolean | yes | | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | | `conditionalFormattingRules` | [ContractConditionalRule](/reference/sumsheet/types-format/#contractconditionalrule)\[] | no | | | `dataValidationMetadata` | [ContractDataValidationMetadata](/reference/sumsheet/types-data/#contractdatavalidationmetadata) | no | | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | The history state after the edit is applied: owner, depth, and revision. The shell displays these values as-is. | **Minimal JSON template** ```json { "operation": "move_clipboard_range", "subsetId": "", "clipboardId": "", "target": "", "requestedBackend": "native-desktop" } ``` ## paste\_range [Section titled “paste\_range”](#paste_range) Pastes a range. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"paste_range"` | yes | | `subsetId` | string | yes | | `clipboardId` | string | yes | | target | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | transpose | boolean | no | | `pasteMode` | [ContractPasteMode](/reference/sumsheet/types-common/#contractpastemode) | no | | `expectedRevision` | number | no | | `readOnly` | boolean | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · paste\_range** | Field | TypeScript type | Req. | Note from the contract | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---- | --------------------------------------------------------------------------------------------------------------- | | operation | `"paste_range"` | yes | | | `subsetId` | string | yes | | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | | `clipboardId` | string | yes | | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | | `currentSourceSaveReadiness` | [ContractCurrentSourceSaveReadiness](/reference/sumsheet/types-common/#contractcurrentsourcesavereadiness) \| null | no | | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | no | | | `recalcNeeded` | boolean | yes | | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | | `conditionalFormattingRules` | [ContractConditionalRule](/reference/sumsheet/types-format/#contractconditionalrule)\[] | no | | | `dataValidationMetadata` | [ContractDataValidationMetadata](/reference/sumsheet/types-data/#contractdatavalidationmetadata) | no | | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | The history state after the edit is applied: owner, depth, and revision. The shell displays these values as-is. | **Minimal JSON template** ```json { "operation": "paste_range", "subsetId": "", "clipboardId": "", "target": "", "requestedBackend": "native-desktop" } ``` ## preview\_cell\_edits [Section titled “preview\_cell\_edits”](#preview_cell_edits) Builds a preview: cell edits. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"preview_cell_edits"` | yes | | `subsetId` | string | yes | | edits | [CellInputEdit](/reference/sumsheet/types-cells/#cellinputedit)\[] | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · preview\_cell\_edits** | Field | TypeScript type | Req. | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---- | | operation | `"preview_cell_edits"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `editedKeys` | string\[] | yes | | `changedKeys` | string\[] | yes | | `dirtyCellCount` | number | yes | | `currentSourceSaveReadiness` | [ContractCurrentSourceSaveReadiness](/reference/sumsheet/types-common/#contractcurrentsourcesavereadiness) \| null | no | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "preview_cell_edits", "subsetId": "", "edits": [], "requestedBackend": "native-desktop" } ``` ## read\_cell\_details [Section titled “read\_cell\_details”](#read_cell_details) Reads cell details. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"read_cell_details"` | yes | | `subsetId` | string | yes | | row | number | yes | | col | number | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `warmSheetForEdit` | boolean | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · read\_cell\_details** | Field | TypeScript type | Req. | | ---------- | ----------------------------------------------------------------------------------------- | ---- | | operation | `"read_cell_details"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | cell | [ContractCellDetails](/reference/sumsheet/types-cells/#contractcelldetails) | yes | **Minimal JSON template** ```json { "operation": "read_cell_details", "subsetId": "", "row": 0, "col": 0, "viewport": { "top": 0, "left": 0, "rows": 40, "cols": 12 }, "requestedBackend": "native-desktop" } ``` ## redo\_last\_cell\_edit [Section titled “redo\_last\_cell\_edit”](#redo_last_cell_edit) Redoes the last cell edit. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"redo_last_cell_edit"` | yes | | `subsetId` | string | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · redo\_last\_cell\_edit** | Field | TypeScript type | Req. | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---- | | operation | `"redo_last_cell_edit"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `redoneKey` | string | yes | | `changedKeys` | string\[] | yes | | `dirtyCellCount` | number | yes | | `conditionalFormattingRules` | [ContractConditionalRule](/reference/sumsheet/types-format/#contractconditionalrule)\[] | no | | `currentSourceSaveReadiness` | [ContractCurrentSourceSaveReadiness](/reference/sumsheet/types-common/#contractcurrentsourcesavereadiness) \| null | no | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "redo_last_cell_edit", "subsetId": "", "requestedBackend": "native-desktop" } ``` ## redo\_last\_range\_edit [Section titled “redo\_last\_range\_edit”](#redo_last_range_edit) Redoes the last range edit. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"redo_last_range_edit"` | yes | | `subsetId` | string | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · redo\_last\_range\_edit** | Field | TypeScript type | Req. | | ----------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---- | | operation | `"redo_last_range_edit"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `redoneRange` | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | `redoneKeys` | string\[] | yes | | `changedKeys` | string\[] | yes | | `dirtyCellCount` | number | yes | | `sheetProtected` | boolean | yes | | `conditionalFormattingRules` | [ContractConditionalRule](/reference/sumsheet/types-format/#contractconditionalrule)\[] | no | | `currentSourceSaveReadiness` | [ContractCurrentSourceSaveReadiness](/reference/sumsheet/types-common/#contractcurrentsourcesavereadiness) \| null | no | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `dataValidationMetadata` | [ContractDataValidationMetadata](/reference/sumsheet/types-data/#contractdatavalidationmetadata) | yes | | `tableName` | string \| null | no | | `tableRef` | string \| null | no | | `tableDataBodyRef` | string \| null | no | | `tableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) \| null | no | | `workbookTableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) \| null | no | | `worksheetAutoFilterMetadata` | [ContractWorksheetAutoFilterMetadata](/reference/sumsheet/types-data/#contractworksheetautofiltermetadata) \| null | no | | `hiddenRows` | number\[] | yes | | `manualHiddenRows` | number\[] | yes | | `filterHiddenRows` | number\[] | yes | | `rangeFilterHistoryReplay` | boolean | yes | **Minimal JSON template** ```json { "operation": "redo_last_range_edit", "subsetId": "", "requestedBackend": "native-desktop" } ``` ## resolve\_current\_region [Section titled “resolve\_current\_region”](#resolve_current_region) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ---------- | -------------------------- | ---- | | operation | “resolve\_current\_region” | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | row | number | yes | | col | number | yes | **Response on success · resolve\_current\_region** | Field | TypeScript type | Req. | | ---------- | -------------------------- | ---- | | operation | “resolve\_current\_region” | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | `fromRow` | number | yes | | `fromCol` | number | yes | | `rowStart` | number | yes | | `colStart` | number | yes | | `rowEnd` | number | yes | | `colEnd` | number | yes | **Minimal JSON template** ```json { "operation": "resolve_current_region", "subsetId": "", "sheetKey": "", "row": 0, "col": 0 } ``` ## resolve\_navigation\_edge [Section titled “resolve\_navigation\_edge”](#resolve_navigation_edge) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ---------- | ---------------------------------------------------------------------------------------------------- | ---- | | operation | “resolve\_navigation\_edge” | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | row | number | yes | | col | number | yes | | direction | [ContractNavigationEdgeDirection](/reference/sumsheet/types-common/#contractnavigationedgedirection) | yes | **Response on success · resolve\_navigation\_edge** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------------------------- | ---- | | operation | “resolve\_navigation\_edge” | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | `fromRow` | number | yes | | `fromCol` | number | yes | | direction | [ContractNavigationEdgeDirection](/reference/sumsheet/types-common/#contractnavigationedgedirection) | yes | | row | number | yes | | col | number | yes | | `hitSheetBoundary` | boolean | yes | **Minimal JSON template** ```json { "operation": "resolve_navigation_edge", "subsetId": "", "sheetKey": "", "row": 0, "col": 0, "direction": "" } ``` ## sort\_range\_rows [Section titled “sort\_range\_rows”](#sort_range_rows) Sorts the rows of a range. **Request** | Field | TypeScript type | Req. | | ------------------- | ---------------------------------------------------------------------------------------------- | ---- | | operation | `"sort_range_rows"` | yes | | `subsetId` | string | yes | | range | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | levels | [SortRangeRowsLevel](/reference/sumsheet/types-format/#sortrangerowslevel)\[] | yes | | control | `"apply"` \| “prepare” \| “commit” \| “cancel” | no | | `requestGeneration` | number \| null | no | | `expectedRevision` | number \| null | no | | `visibleRowsOnly` | boolean | no | | locale | string \| null | no | | `caseSensitive` | boolean | no | | `numericTextMode` | [SortRangeRowsNumericTextMode](/reference/sumsheet/types-format/#sortrangerowsnumerictextmode) | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · sort\_range\_rows** | Field | TypeScript type | Req. | | ------------------- | ------------------------------------------------------------- | ---- | | operation | `"sort_range_rows"` | yes | | `subsetId` | string | yes | | control | `"apply"` \| “prepare” \| “commit” \| “cancel” | yes | | `requestGeneration` | number \| null | no | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `movedRowCount` | number | yes | | `sortedRowCount` | number | yes | | `rowMoves` | SortRangeRowsRowMove\[] | yes | **Minimal JSON template** ```json { "operation": "sort_range_rows", "subsetId": "", "range": "", "levels": [], "requestedBackend": "native-desktop" } ``` ## undo\_last\_cell\_edit [Section titled “undo\_last\_cell\_edit”](#undo_last_cell_edit) Undoes the last cell edit. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"undo_last_cell_edit"` | yes | | `subsetId` | string | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · undo\_last\_cell\_edit** | Field | TypeScript type | Req. | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---- | | operation | `"undo_last_cell_edit"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `restoredKey` | string | yes | | `changedKeys` | string\[] | yes | | `dirtyCellCount` | number | yes | | `conditionalFormattingRules` | [ContractConditionalRule](/reference/sumsheet/types-format/#contractconditionalrule)\[] | no | | `currentSourceSaveReadiness` | [ContractCurrentSourceSaveReadiness](/reference/sumsheet/types-common/#contractcurrentsourcesavereadiness) \| null | no | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "undo_last_cell_edit", "subsetId": "", "requestedBackend": "native-desktop" } ``` ## undo\_last\_range\_edit [Section titled “undo\_last\_range\_edit”](#undo_last_range_edit) Undoes the last range edit. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"undo_last_range_edit"` | yes | | `subsetId` | string | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · undo\_last\_range\_edit** | Field | TypeScript type | Req. | | ----------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---- | | operation | `"undo_last_range_edit"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `restoredRange` | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | `restoredKeys` | string\[] | yes | | `changedKeys` | string\[] | yes | | `dirtyCellCount` | number | yes | | `sheetProtected` | boolean | yes | | `conditionalFormattingRules` | [ContractConditionalRule](/reference/sumsheet/types-format/#contractconditionalrule)\[] | no | | `currentSourceSaveReadiness` | [ContractCurrentSourceSaveReadiness](/reference/sumsheet/types-common/#contractcurrentsourcesavereadiness) \| null | no | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `dataValidationMetadata` | [ContractDataValidationMetadata](/reference/sumsheet/types-data/#contractdatavalidationmetadata) | yes | | `tableName` | string \| null | no | | `tableRef` | string \| null | no | | `tableDataBodyRef` | string \| null | no | | `tableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) \| null | no | | `workbookTableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) \| null | no | | `worksheetAutoFilterMetadata` | [ContractWorksheetAutoFilterMetadata](/reference/sumsheet/types-data/#contractworksheetautofiltermetadata) \| null | no | | `hiddenRows` | number\[] | yes | | `manualHiddenRows` | number\[] | yes | | `filterHiddenRows` | number\[] | yes | | `rangeFilterHistoryReplay` | boolean | yes | **Minimal JSON template** ```json { "operation": "undo_last_range_edit", "subsetId": "", "requestedBackend": "native-desktop" } ``` # SumSheet session and conventions > The session identifier, zero-based indexes, bounded requests, race protection, responses under a different operation's name, and the fields that appear almost always. Field names in SumSheet are written in camelCase, with a lowercase first letter: `subsetId`, `sheetKey`, `expectedRevision`, `requestId`. This differs from SumDoc, where words are separated by underscores — `document_id`, `paragraph_index`. If you’re embedding both products, a field from one won’t be found in the other. There are two differences that break shared code, and both go deeper than naming. First: here, a refusal has a `code` — a stable string to branch on; SumDoc only sends `error`, a reason in words, and you can’t branch on it. Second: here the conversation isn’t always strictly alternating — the core can send a line of its own and wait for your answer, while the SumDoc processor never asks questions at all. So stream-reading code is written separately for each product: a loop borrowed from SumDoc will stall on the very first workbook with an external source — [how the conversation works](/sumsheet/session/). Sheet dimensions arrive in Excel’s own units, and they differ. Column width is in character units: one unit equals the width of a digit in the default font, so a normal-width column is `8.43`, not eight pixels. Row height is in points, that is, seventy-seconds of an inch: a normal row is `15`. There are no pixels in the contract, for either one. The operations themselves come in two styles, and it’s not a typo: almost all of them are written with underscores — `apply_cell_edits`, `save_workbook_subset` — while nineteen use hyphens. That’s the seventeen Power Query operations with the `pq-` prefix, plus two external-range operations, `external-range-properties-apply` and `external-range-properties-inventory`. The operation name is passed letter for letter: don’t normalize it to one style — the core won’t recognize such an operation. Rows and columns are numbered from zero: the first row is `0`. The bounds of the visible area are numbered the same way. A range is described by the `sheetKey`, `rowStart`, `rowEnd`, `colStart`, and `colEnd` fields. But not everything is numbered this way. Window state arrives as **Excel-style addresses**: `activeCell` is the string `"A1"`, `selection` is `"A1:B4"`, and `focus` and `scrollTopLeftCell` are written the same way. The two systems differ both in indexing and in notation: the cell `row: 0, col: 0` from a request is `"A1"` in window state, and `row: 4` is the fifth row, that is, `"A5"`. A value from window state needs to be parsed, not dropped straight into `row` and `col` fields. Opening a workbook — with the `open_workbook_subset` or `open_workbook_subset_from_bytes` operations — returns `subsetId`. Every subsequent operation on this workbook passes it back: it’s how the core knows which open session you mean. The `expectedRevision` field is race protection. If it’s passed and the workbook has changed since, the request is rejected **before** the edit, instead of being applied on top of someone else’s. The field is optional: without it, the edit goes through unconditionally. Requests for a visible area or a range have to stay bounded: the contract doesn’t promise to unfold the whole workbook into memory, so a “give me everything” request has nothing to rely on. A successful response can come back under the name of a **different** operation — the one the request was reduced to inside the core: * `open_workbook_subset_from_bytes` responds as `open_workbook_subset`; * `move_clipboard_range` responds as `paste_range`; * `paste_conditional_formatting_rules` responds as `apply_conditional_formatting_rules`. A handler that checks the response’s operation name against the one it sent won’t recognize these three cases. Match a request to its response by identifier, not by name. ## What depends on the build, not the workbook [Section titled “What depends on the build, not the workbook”](#what-depends-on-the-build-not-the-workbook) An operation can be in the contract, be on the release list — and still be refused, because the executor isn’t present in the build you launched. In this case, the refusal is the same for any workbook, and isn’t fixed by a different file or different arguments. | What | Where it works | Where it refuses, and with what | | ----------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | | Outside requests: `https`, Postgres, SQL Server | The desktop and server processor, launched with `--session`, when the host responds to counter-lines | One-shot mode, browser, phone — `tls-error`, `postgres-provider-unavailable`, `sqlserver-provider-unavailable` | | Running, canceling, and rolling back a macro | The desktop and server processor | Browser and phone — `automation-provider-unavailable`, before the workbook is even read | | Real-time data, the `RTD` formula | The Windows build only | macOS and Linux — the value `#N/A`, the same as on Windows without the source server running | | Calls to COM, OLE, and ActiveX objects | The Windows build only | On other systems a stub remains: types compile, but calls don’t execute | Inspection, parsing, and planning aren’t part of this list: they work in any build. The boundary runs along execution, not reading — you can view a macro’s contents anywhere, but you can’t run it everywhere. ## Fields that appear almost always [Section titled “Fields that appear almost always”](#fields-that-appear-almost-always) | Field | What it means | | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | | `previewCells` | The cells of the requested range: address, the displayed value, the value kind, and the source formula, if there is one. This is what gets drawn on screen. | | `recalcNeeded` | `true` if the workbook still has formulas waiting to be recalculated. The values in `previewCells` are already shown at this point — but may not be final. | | `supportedSubset` | A string describing which subset of formulas the core understands in this session. Useful to show in diagnostics, not to parse in code. | | `dirtyCellCount` | How many cells have changed since the workbook was opened. Convenient for showing the unsaved-changes flag. | | `layoutMetrics` | The sheet layout: row heights, column widths, hidden rows and columns, merges. Doesn’t appear in every response — only where it’s needed for rendering. | # Data, filters, and objects > Filters, subtotals, data cleanup, tables, text import, data validation, slicers, and form controls. Operations on this page: 23. Filters, subtotals, data cleanup, tables, text import, data validation, slicers, and form controls. Terms are in the [glossary](/start/glossary/). **Operations on this page — 23** * [`advanced_filter_plan`](#advanced_filter_plan) * [`apply_outline_subtotal`](#apply_outline_subtotal) * [`apply_range_filter`](#apply_range_filter) * [`commit_delimited_text_import`](#commit_delimited_text_import) * [`data_cleanup`](#data_cleanup) * [`drawing_object_action`](#drawing_object_action) * [`drawing_object_history_replay`](#drawing_object_history_replay) * [`evaluate_data_validation_input`](#evaluate_data_validation_input) * [`external-range-properties-apply`](#external-range-properties-apply) * [`external-range-properties-inventory`](#external-range-properties-inventory) * [`finalize_object_selection_pane_package`](#finalize_object_selection_pane_package) * [`form_controls`](#form_controls) * [`mutate_table_hyperlink_artifacts`](#mutate_table_hyperlink_artifacts) * [`mutate_table_model`](#mutate_table_model) * [`open_document_object_creation`](#open_document_object_creation) * [`read_data_validation_rules`](#read_data_validation_rules) * [`set_data_validation_rules`](#set_data_validation_rules) * [`set_range_filter_enabled`](#set_range_filter_enabled) * [`slicer_timeline`](#slicer_timeline) * [`sort_filter_index_update`](#sort_filter_index_update) * [`sparkline_actions`](#sparkline_actions) * [`sparkline_history_replay`](#sparkline_history_replay) * [`update_table_model`](#update_table_model) ## advanced\_filter\_plan [Section titled “advanced\_filter\_plan”](#advanced_filter_plan) Plans an advanced filter — “Data” → “Advanced”. The operation only reads: it returns a plan of which rows to hide or what to copy where, and your side applies it through the usual editing paths. **Request** | Field | TypeScript type | Req. | | ------------------- | -------------------------------------------------------------------------------------------- | ---- | | operation | `"advanced_filter_plan"` | yes | | `subsetId` | string | yes | | action | [ContractAdvancedFilterAction](/reference/sumsheet/types-data/#contractadvancedfilteraction) | yes | | `listRange` | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | `criteriaRange` | [CellRange](/reference/sumsheet/types-cells/#cellrange) \| null | no | | `copyToRange` | [CellRange](/reference/sumsheet/types-cells/#cellrange) \| null | no | | `uniqueRecordsOnly` | boolean | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · advanced\_filter\_plan** | Field | TypeScript type | Req. | | --------------------- | ------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"advanced_filter_plan"` | yes | | `matchedRows` | number\[] | yes | | `hiddenRows` | number\[] | yes | | `projectionCells` | [ContractAdvancedFilterProjectedCell](/reference/sumsheet/types-data/#contractadvancedfilterprojectedcell)\[] | yes | | `outputRange` | [CellRange](/reference/sumsheet/types-cells/#cellrange) \| null | no | | `sourceRowCount` | number | yes | | `resultRowCount` | number | yes | | `criteriaRowCount` | number | yes | | `uniqueRecordsOnly` | boolean | yes | | `formulaCriteriaUsed` | boolean | yes | **Minimal JSON template** ```json { "operation": "advanced_filter_plan", "subsetId": "", "action": "", "listRange": "", "requestedBackend": "native-desktop" } ``` ## apply\_outline\_subtotal [Section titled “apply\_outline\_subtotal”](#apply_outline_subtotal) Applies an outline subtotal. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------------------- | ---- | | operation | `"apply_outline_subtotal"` | yes | | `subsetId` | string | yes | | range | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | action | [ContractOutlineSubtotalAction](/reference/sumsheet/types-data/#contractoutlinesubtotalaction) | yes | | axis | [ContractOutlineAxis](/reference/sumsheet/types-data/#contractoutlineaxis) \| null | no | | level | number \| null | no | | subtotal | [ContractSubtotalOptions](/reference/sumsheet/types-data/#contractsubtotaloptions) \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · apply\_outline\_subtotal** | Field | TypeScript type | Req. | | ----------------- | ---------------------------------------------------------------------------------------------- | ---- | | operation | `"apply_outline_subtotal"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | [ContractOutlineSubtotalAction](/reference/sumsheet/types-data/#contractoutlinesubtotalaction) | yes | | `didChange` | boolean | yes | | `outlineState` | [ContractOutlineSubtotalState](/reference/sumsheet/types-data/#contractoutlinesubtotalstate) | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "apply_outline_subtotal", "subsetId": "", "range": "", "action": "", "requestedBackend": "native-desktop" } ``` ## apply\_range\_filter [Section titled “apply\_range\_filter”](#apply_range_filter) Applies a range filter. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"apply_range_filter"` | yes | | `subsetId` | string | yes | | range | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | action | [ContractRangeFilterAction](/reference/sumsheet/types-data/#contractrangefilteraction) | no | | `targetColumn` | number \| null | no | | criteria | [ContractRangeFilterColumnCriteria](/reference/sumsheet/types-format/#contractrangefiltercolumncriteria)\[] | no | | `headerPolicy` | [ContractRemoveDuplicatesHeaderPolicy](/reference/sumsheet/types-print/#contractremoveduplicatesheaderpolicy) | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · apply\_range\_filter** | Field | TypeScript type | Req. | | ------------------ | ----------------------------------------------------------------------------------------------------------- | ---- | | operation | `"apply_range_filter"` | yes | | `subsetId` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | [ContractRangeFilterAction](/reference/sumsheet/types-data/#contractrangefilteraction) | yes | | criteria | [ContractRangeFilterColumnCriteria](/reference/sumsheet/types-format/#contractrangefiltercolumncriteria)\[] | yes | | `hiddenRows` | number\[] | yes | | `manualHiddenRows` | number\[] | yes | | `filterHiddenRows` | number\[] | yes | | `hiddenRowCount` | number | yes | | `visibleRowCount` | number | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `recalcNeeded` | boolean | yes | **Minimal JSON template** ```json { "operation": "apply_range_filter", "subsetId": "", "range": "", "requestedBackend": "native-desktop" } ``` ## commit\_delimited\_text\_import [Section titled “commit\_delimited\_text\_import”](#commit_delimited_text_import) Commits a delimited-text import. **Request** | Field | TypeScript type | Req. | | ------------------ | -------------------------------------------------------------------------------------------------------- | ---- | | operation | `"commit_delimited_text_import"` | yes | | `subsetId` | string | yes | | edits | [CellInputEdit](/reference/sumsheet/types-cells/#cellinputedit)\[] | yes | | destination | [ContractDelimitedImportDestination](/reference/sumsheet/types-data/#contractdelimitedimportdestination) | yes | | `expectedRevision` | number \| null | no | | `readOnly` | boolean | no | | cancelled | boolean | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · commit\_delimited\_text\_import** | Field | TypeScript type | Req. | | ------------------ | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"commit_delimited_text_import"` | yes | | `subsetId` | string | yes | | `createdSheet` | boolean | yes | | `sheetKey` | string | yes | | `appliedEditCount` | number | yes | | `mutationCount` | number | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | projection | ComputeResponsePayload | yes | **Minimal JSON template** ```json { "operation": "commit_delimited_text_import", "subsetId": "", "edits": [], "destination": "", "requestedBackend": "native-desktop" } ``` ## data\_cleanup [Section titled “data\_cleanup”](#data_cleanup) Data cleanup from the “Data” tab: text to columns, removing duplicates, and similar. It runs in two steps — a preview, then applying it. **Request** | Field | TypeScript type | Req. | Note from the contract | | ---------------------------- | ---------------------------------------------------------------------------------------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | | operation | `"data_cleanup"` | yes | | | `subsetId` | string | yes | | | action | [ContractDataCleanupAction](/reference/sumsheet/types-common/#contractdatacleanupaction) | yes | | | intent | [ContractDataCleanupIntent](/reference/sumsheet/types-common/#contractdatacleanupintent) | yes | | | `consecutiveDelimitersAsOne` | boolean | no | Treat several consecutive delimiters as one — when parsing text to columns. | | locale | string \| null | no | The language and regional rules the core uses to recognize a value’s type in General format — for example, a comma as the decimal separator for `ru-RU`. | | `expectedRevision` | number \| null | no | The workbook’s own revision, as seen by the preview. The operation runs in two steps, and on apply, a mismatch is rejected before the edit happens. | | `previewToken` | string \| null | no | | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | | **Response on success · data\_cleanup** | Field | TypeScript type | Req. | | ------------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"data_cleanup"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | kind | `"text_to_columns"` \| “remove\_duplicates” \| “remove\_duplicates\_copy” | yes | | `previewToken` | string | yes | | applied | boolean | yes | | `sourceRange` | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | `outputRange` | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | `duplicateCount` | number | yes | | `remainingCount` | number | yes | | `headerRowCount` | number | yes | | `resultRowCount` | number | yes | | `resultColCount` | number | yes | | `copyOutput` | boolean | yes | | `duplicateRowSpans` | [ContractDataCleanupRowSpan](/reference/sumsheet/types-format/#contractdatacleanuprowspan)\[] | yes | | audit | [ContractDataCleanupAudit](/reference/sumsheet/types-formulas/#contractdatacleanupaudit) | yes | | `tableName` | string \| null | no | | `tableRef` | string \| null | no | | `tableDataBodyRef` | string \| null | no | | `previewRows` | [ContractDataCleanupPreviewRow](/reference/sumsheet/types-format/#contractdatacleanuppreviewrow)\[] | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `changedKeys` | string\[] | yes | | `dirtyCellCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "data_cleanup", "subsetId": "", "action": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## drawing\_object\_action [Section titled “drawing\_object\_action”](#drawing_object_action) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ------------------ | -------------------------------------------------------------------------------------------- | ---- | | operation | “drawing\_object\_action” | yes | | `subsetId` | string | yes | | action | [ContractDrawingObjectAction](/reference/sumsheet/types-charts/#contractdrawingobjectaction) | yes | | `expectedRevision` | number | yes | | `readOnly` | boolean | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | **Response on success · drawing\_object\_action** | Field | TypeScript type | Req. | | ------------------------ | ------------------------------------------------------------------------------------------------------------------ | ---- | | operation | “drawing\_object\_action” | yes | | `subsetId` | string | yes | | `changedStableIds` | string\[] | yes | | `regroupGroupId` | string \| null | no | | `regroupMemberStableIds` | string\[] | yes | | dirty | boolean | yes | | `authoritativeRevision` | number | yes | | `historyOwner` | “drawing\_objects” | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `surfaceObjects` | [ContractSheetObject](/reference/sumsheet/types-session/#contractsheetobject)\[] | yes | | `objectInventory` | [ContractWorkbookObjectInventoryEntry](/reference/sumsheet/types-session/#contractworkbookobjectinventoryentry)\[] | yes | | `inkProjection` | [ContractReviewInkProjectionItem](/reference/sumsheet/types-protection/#contractreviewinkprojectionitem)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | no | **Minimal JSON template** ```json { "operation": "drawing_object_action", "subsetId": "", "action": "", "expectedRevision": 0 } ``` ## drawing\_object\_history\_replay [Section titled “drawing\_object\_history\_replay”](#drawing_object_history_replay) Not yet in the published release The operation is described by the contract, but the latest release’s core doesn’t accept it: such a request gets a refusal listing the operations it does know. What’s in the release and what’s still only in the contract is in the [reference overview](/reference/sumsheet/overview/). From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Response on success · drawing\_object\_history\_replay** | Field | TypeScript type | Req. | | ----------------- | ------------------------------------------------------------------------------------------------------------------ | ---- | | operation | “drawing\_object\_history\_replay” | yes | | `subsetId` | string | yes | | direction | [ContractWorkbookHistoryDirection](/reference/sumsheet/types-session/#contractworkbookhistorydirection) | yes | | dirty | boolean | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `surfaceObjects` | [ContractSheetObject](/reference/sumsheet/types-session/#contractsheetobject)\[] | yes | | `objectInventory` | [ContractWorkbookObjectInventoryEntry](/reference/sumsheet/types-session/#contractworkbookobjectinventoryentry)\[] | yes | | `inkProjection` | [ContractReviewInkProjectionItem](/reference/sumsheet/types-protection/#contractreviewinkprojectionitem)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | no | ## evaluate\_data\_validation\_input [Section titled “evaluate\_data\_validation\_input”](#evaluate_data_validation_input) Evaluates a value against validation rules. **Request** | Field | TypeScript type | Req. | Note from the contract | | ------------------- | ---------------------------------------------------------------------------------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | operation | `"evaluate_data_validation_input"` | yes | | | `subsetId` | string | yes | | | inputs | [ContractDataValidationRawInput](/reference/sumsheet/types-data/#contractdatavalidationrawinput)\[] | yes | | | `companionEdits` | [CellInputEdit](/reference/sumsheet/types-cells/#cellinputedit)\[] | no | | | `programmaticEdits` | [CellInputEdit](/reference/sumsheet/types-cells/#cellinputedit)\[] | no | The core first expands adjacent fill and drag-fill, and only then validates each destination cell. | | commit | boolean | no | | | `expectedRevision` | number \| null | no | An optional race-condition check when `commit: true`. On a mismatch, the refusal `apply-cell-edits-stale-revision` comes back before the cells, history, or revision change. A check-only call with `commit: false` never becomes an edit. | | continuation | [ContractDataValidationContinuation](/reference/sumsheet/types-data/#contractdatavalidationcontinuation) \| null | no | | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | | **Response on success · evaluate\_data\_validation\_input** | Field | TypeScript type | Req. | | ------------------- | ------------------------------------------------------------------------------------------------------ | ---- | | operation | `"evaluate_data_validation_input"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | verdict | [ContractDataValidationVerdictKind](/reference/sumsheet/types-data/#contractdatavalidationverdictkind) | yes | | verdicts | [ContractDataValidationVerdict](/reference/sumsheet/types-data/#contractdatavalidationverdict)\[] | yes | | `continuationToken` | string \| null | no | | `allowedDecisions` | [ContractDataValidationDecision](/reference/sumsheet/types-data/#contractdatavalidationdecision)\[] | no | | committed | ComputeResponsePayload \| null | no | **Minimal JSON template** ```json { "operation": "evaluate_data_validation_input", "subsetId": "", "inputs": [], "requestedBackend": "native-desktop" } ``` ## external-range-properties-apply [Section titled “external-range-properties-apply”](#external-range-properties-apply) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ------------------ | -------------------------------------------------------------------------------------------------- | ---- | | operation | “external-range-properties-apply” | yes | | `subsetId` | string | yes | | `expectedRevision` | number | no | | identity | [ContractExternalRangeIdentity](/reference/sumsheet/types-data/#contractexternalrangeidentity) | yes | | properties | [ContractExternalRangeProperties](/reference/sumsheet/types-data/#contractexternalrangeproperties) | yes | **Response on success · external-range-properties-apply** | Field | TypeScript type | Req. | | ----------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | “external-range-properties-apply” | yes | | applied | boolean | yes | | reason | string | no | | detail | string | no | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | no | | ranges | [ContractExternalRangeEntry](/reference/sumsheet/types-data/#contractexternalrangeentry)\[] | yes | **Minimal JSON template** ```json { "operation": "external-range-properties-apply", "subsetId": "", "identity": "", "properties": "" } ``` ## external-range-properties-inventory [Section titled “external-range-properties-inventory”](#external-range-properties-inventory) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ---------- | ------------------------------------- | ---- | | operation | “external-range-properties-inventory” | yes | | `subsetId` | string | yes | **Response on success · external-range-properties-inventory** | Field | TypeScript type | Req. | | --------- | ------------------------------------------------------------------------------------------- | ---- | | operation | “external-range-properties-inventory” | yes | | ranges | [ContractExternalRangeEntry](/reference/sumsheet/types-data/#contractexternalrangeentry)\[] | yes | **Minimal JSON template** ```json { "operation": "external-range-properties-inventory", "subsetId": "" } ``` ## finalize\_object\_selection\_pane\_package [Section titled “finalize\_object\_selection\_pane\_package”](#finalize_object_selection_pane_package) Finishes a Selection Pane batch. **Request** | Field | TypeScript type | Req. | | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"finalize_object_selection_pane_package"` | yes | | `subsetId` | string | yes | | `sourcePackageBytesBase64` | string | yes | | `candidatePackageBytesBase64` | string | yes | | `objectProtectionMutations` | [ContractSheetObjectMutationIntent](/reference/sumsheet/types-session/#contractsheetobjectmutationintent)\[] | yes | | commands | [ContractObjectSelectionPanePackageCommand](/reference/sumsheet/types-common/#contractobjectselectionpanepackagecommand)\[] | yes | | `drawingTextEdits` | [ContractDrawingTextEditSemantics](/reference/sumsheet/types-charts/#contractdrawingtexteditsemantics)\[] | yes | | `adoptCurrentSource` | boolean | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · finalize\_object\_selection\_pane\_package** | Field | TypeScript type | Req. | | --------------------------- | ------------------------------------------ | ---- | | operation | `"finalize_object_selection_pane_package"` | yes | | `packageBytesBase64` | string | yes | | `byteCount` | number | yes | | `mutationCount` | number | yes | | `authoritativeRevision` | number | yes | | `validatedDrawingTextCount` | number | yes | | `adoptedCurrentSource` | boolean | yes | **Minimal JSON template** ```json { "operation": "finalize_object_selection_pane_package", "subsetId": "", "sourcePackageBytesBase64": "", "candidatePackageBytesBase64": "", "objectProtectionMutations": [], "commands": [], "drawingTextEdits": [], "adoptCurrentSource": false, "requestedBackend": "native-desktop" } ``` ## form\_controls [Section titled “form\_controls”](#form_controls) Form controls on a sheet — checkboxes, option buttons, list boxes: adding, configuring, and removing. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------ | ---- | | operation | `"form_controls"` | yes | | `subsetId` | string | yes | | intent | [ContractFormControlsAction](/reference/sumsheet/types-common/#contractformcontrolsaction) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · form\_controls** | Field | TypeScript type | Req. | | ----------------- | ------------------------------------------------------------------------------------------------------------------ | ---- | | operation | `"form_controls"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | status | string | yes | | controls | [ContractFormControlView](/reference/sumsheet/types-common/#contractformcontrolview)\[] | yes | | `objectInventory` | [ContractWorkbookObjectInventoryEntry](/reference/sumsheet/types-session/#contractworkbookobjectinventoryentry)\[] | yes | | `linkedCellWrite` | [ContractFormControlLinkedCellWrite](/reference/sumsheet/types-cells/#contractformcontrollinkedcellwrite) \| null | no | | `changedKeys` | string\[] | yes | | `dirtyCellCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "form_controls", "subsetId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## mutate\_table\_hyperlink\_artifacts [Section titled “mutate\_table\_hyperlink\_artifacts”](#mutate_table_hyperlink_artifacts) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ------------------ | -------------------------------------------------------------------------------------------- | ---- | | operation | “mutate\_table\_hyperlink\_artifacts” | yes | | `subsetId` | string | yes | | action | [ContractTableHyperlinkAction](/reference/sumsheet/types-data/#contracttablehyperlinkaction) | yes | | `expectedRevision` | number | yes | | `readOnly` | boolean | no | | protected | boolean | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | **Response on success · mutate\_table\_hyperlink\_artifacts** | Field | TypeScript type | Req. | | --------------------------- | ------------------------------------------------------------------------------------------------------------ | ---- | | operation | “mutate\_table\_hyperlink\_artifacts” | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | `tableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) | yes | | `workbookTableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) | yes | | `hyperlinkMetadata` | [ContractHyperlinkMetadataProjection](/reference/sumsheet/types-common/#contracthyperlinkmetadataprojection) | yes | | `workbookHyperlinkMetadata` | [ContractHyperlinkMetadataProjection](/reference/sumsheet/types-common/#contracthyperlinkmetadataprojection) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | **Minimal JSON template** ```json { "operation": "mutate_table_hyperlink_artifacts", "subsetId": "", "action": "", "expectedRevision": 0 } ``` ## mutate\_table\_model [Section titled “mutate\_table\_model”](#mutate_table_model) Changes a table’s model. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------------- | ---- | | operation | `"mutate_table_model"` | yes | | `subsetId` | string | yes | | mutation | [ContractTableModelMutation](/reference/sumsheet/types-data/#contracttablemodelmutation) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · mutate\_table\_model** | Field | TypeScript type | Req. | | ----------------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"mutate_table_model"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | `tableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) | yes | | `workbookTableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | **Minimal JSON template** ```json { "operation": "mutate_table_model", "subsetId": "", "mutation": "", "requestedBackend": "native-desktop" } ``` ## open\_document\_object\_creation [Section titled “open\_document\_object\_creation”](#open_document_object_creation) Opens creation of an embedded document object. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------------------------------- | ---- | | operation | `"open_document_object_creation"` | yes | | `subsetId` | string | yes | | `sheetPath` | string | yes | | creation | [ContractOpenDocumentObjectCreation](/reference/sumsheet/types-common/#contractopendocumentobjectcreation) | yes | | `readOnly` | boolean | no | | `expectedRevision` | number \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · open\_document\_object\_creation** | Field | TypeScript type | Req. | | ----------------------- | ------------------------------------------------------------------------------------------------ | ---- | | operation | `"open_document_object_creation"` | yes | | `subsetId` | string | yes | | `createdObject` | [ContractCreatedDocumentObject](/reference/sumsheet/types-common/#contractcreateddocumentobject) | yes | | `byteCount` | number | yes | | dirty | boolean | yes | | `undoDepth` | number | yes | | `redoDepth` | number | yes | | `authoritativeRevision` | number | yes | | `historyOwner` | `"drawing_objects"` | yes | **Minimal JSON template** ```json { "operation": "open_document_object_creation", "subsetId": "", "sheetPath": "", "creation": "", "requestedBackend": "native-desktop" } ``` ## read\_data\_validation\_rules [Section titled “read\_data\_validation\_rules”](#read_data_validation_rules) Reads data validation rules. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"read_data_validation_rules"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | range | [CellRange](/reference/sumsheet/types-cells/#cellrange) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · read\_data\_validation\_rules** | Field | TypeScript type | Req. | | ------------------------ | ------------------------------------------------------------------------------------------------ | ---- | | operation | `"read_data_validation_rules"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `sheetKey` | string | yes | | `dataValidationMetadata` | [ContractDataValidationMetadata](/reference/sumsheet/types-data/#contractdatavalidationmetadata) | yes | **Minimal JSON template** ```json { "operation": "read_data_validation_rules", "subsetId": "", "sheetKey": "", "requestedBackend": "native-desktop" } ``` ## set\_data\_validation\_rules [Section titled “set\_data\_validation\_rules”](#set_data_validation_rules) Sets data validation rules. **Request** | Field | TypeScript type | Req. | Note from the contract | | ------------------ | ------------------------------------------------------------------------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------ | | operation | `"set_data_validation_rules"` | yes | | | `subsetId` | string | yes | | | `sheetKey` | string | yes | | | rules | [ContractDataValidationRuleIntent](/reference/sumsheet/types-data/#contractdatavalidationruleintent)\[] | yes | | | `sourceLocale` | string \| null | no | The locale that applies only to this request: the core uses it to parse the source entry in a list rule. | | `expectedRevision` | number \| null | no | Rejects writing rules from a stale state — before the markup, the unsaved flag, history, or revision change. | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | | **Response on success · set\_data\_validation\_rules** | Field | TypeScript type | Req. | | ------------------------ | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"set_data_validation_rules"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `sheetKey` | string | yes | | `appliedRuleCount` | number | yes | | `dataValidationMetadata` | [ContractDataValidationMetadata](/reference/sumsheet/types-data/#contractdatavalidationmetadata) | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | **Minimal JSON template** ```json { "operation": "set_data_validation_rules", "subsetId": "", "sheetKey": "", "rules": [], "requestedBackend": "native-desktop" } ``` ## set\_range\_filter\_enabled [Section titled “set\_range\_filter\_enabled”](#set_range_filter_enabled) Sets whether a range filter is enabled. **Request** | Field | TypeScript type | Req. | Note from the contract | | ------------------ | ---------------------------------------------------------------------------------- | ---- | --------------------------------------------------------------------------------------------------- | | operation | `"set_range_filter_enabled"` | yes | The same as the “Data ▸ Filter” button: turns AutoFilter on or off for the selected table or sheet. | | `subsetId` | string | yes | | | range | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | | enabled | boolean | yes | | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | | **Response on success · set\_range\_filter\_enabled** | Field | TypeScript type | Req. | | ----------------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"set_range_filter_enabled"` | yes | | `subsetId` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `autoFilterRef` | string | no | | `unhiddenRowCount` | number | yes | | `targetKind` | `"range"` \| “table” | yes | | `tableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) | yes | | `workbookTableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `recalcNeeded` | boolean | yes | **Minimal JSON template** ```json { "operation": "set_range_filter_enabled", "subsetId": "", "range": "", "enabled": false, "requestedBackend": "native-desktop" } ``` ## slicer\_timeline [Section titled “slicer\_timeline”](#slicer_timeline) Slicers and timelines: adding, configuring, and removing the visual controls used to filter pivot tables. **Request** | Field | TypeScript type | Req. | | ------------------------- | -------------------------------------------------------------------------------------------- | ---- | | operation | `"slicer_timeline"` | yes | | `subsetId` | string | yes | | intent | [ContractSlicerTimelineAction](/reference/sumsheet/types-data/#contractslicertimelineaction) | yes | | `expectedCacheGeneration` | number \| null | no | | `requestGeneration` | number \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · slicer\_timeline** | Field | TypeScript type | Req. | | ------------------- | ---------------------------------------------------------------------------------------------------------- | ---- | | operation | `"slicer_timeline"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | status | string | yes | | controls | [ContractSlicerTimelineControlView](/reference/sumsheet/types-data/#contractslicertimelinecontrolview)\[] | yes | | `changedRows` | number\[] | yes | | `hiddenRows` | number\[] | yes | | `refreshTargets` | string\[] | yes | | `connectedTargets` | [ContractSlicerTimelineTargetView](/reference/sumsheet/types-data/#contractslicertimelinetargetview)\[] | yes | | `filterConnections` | [ContractPivotFilterConnectionView](/reference/sumsheet/types-pivot/#contractpivotfilterconnectionview)\[] | yes | | `refreshStatus` | [ContractPivotRefreshStatusView](/reference/sumsheet/types-pivot/#contractpivotrefreshstatusview) \| null | no | | `dirtyCellCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "slicer_timeline", "subsetId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## sort\_filter\_index\_update [Section titled “sort\_filter\_index\_update”](#sort_filter_index_update) Sorts the filter pointer’s update. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"sort_filter_index_update"` | yes | | `subsetId` | string | yes | | range | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · sort\_filter\_index\_update** | Field | TypeScript type | Req. | | -------------- | ------------------------------------------------------------- | ---- | | operation | `"sort_filter_index_update"` | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `indexVersion` | number | yes | **Minimal JSON template** ```json { "operation": "sort_filter_index_update", "subsetId": "", "range": "", "requestedBackend": "native-desktop" } ``` ## sparkline\_actions [Section titled “sparkline\_actions”](#sparkline_actions) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------------- | ---- | | operation | “sparkline\_actions” | yes | | `subsetId` | string | yes | | mode | [ContractSparklinePlanMode](/reference/sumsheet/types-charts/#contractsparklineplanmode) | yes | | action | [ContractSparklineAction](/reference/sumsheet/types-charts/#contractsparklineaction) | yes | | `expectedRevision` | number | yes | | `readOnly` | boolean | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | **Response on success · sparkline\_actions** | Field | TypeScript type | Req. | | ----------------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | “sparkline\_actions” | yes | | `subsetId` | string | yes | | mode | [ContractSparklinePlanMode](/reference/sumsheet/types-charts/#contractsparklineplanmode) | yes | | applied | boolean | yes | | dirty | boolean | yes | | `authoritativeRevision` | number | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | projection | [ContractSparklineProjectionEntry](/reference/sumsheet/types-charts/#contractsparklineprojectionentry)\[] | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | no | **Minimal JSON template** ```json { "operation": "sparkline_actions", "subsetId": "", "mode": "", "action": "", "expectedRevision": 0 } ``` ## sparkline\_history\_replay [Section titled “sparkline\_history\_replay”](#sparkline_history_replay) Not yet in the published release The operation is described by the contract, but the latest release’s core doesn’t accept it: such a request gets a refusal listing the operations it does know. What’s in the release and what’s still only in the contract is in the [reference overview](/reference/sumsheet/overview/). From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Response on success · sparkline\_history\_replay** | Field | TypeScript type | Req. | | ----------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | “sparkline\_history\_replay” | yes | | `subsetId` | string | yes | | direction | [ContractWorkbookHistoryDirection](/reference/sumsheet/types-session/#contractworkbookhistorydirection) | yes | | dirty | boolean | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | projection | [ContractSparklineProjectionEntry](/reference/sumsheet/types-charts/#contractsparklineprojectionentry)\[] | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | no | ## update\_table\_model [Section titled “update\_table\_model”](#update_table_model) Refreshes a table’s model. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------------- | ---- | | operation | `"update_table_model"` | yes | | `subsetId` | string | yes | | table | [ContractTableMetadataEntry](/reference/sumsheet/types-data/#contracttablemetadataentry) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · update\_table\_model** | Field | TypeScript type | Req. | | ----------------------- | -------------------------------------------------------------------------------------------------- | ---- | | operation | `"update_table_model"` | yes | | `subsetId` | string | yes | | `stableId` | string | yes | | `tableCount` | number | yes | | `tableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) | yes | | `workbookTableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) | yes | **Minimal JSON template** ```json { "operation": "update_table_model", "subsetId": "", "table": "", "requestedBackend": "native-desktop" } ``` # Formatting > Column width and row height, merging cells, themes and fonts, conditional formatting. Operations on this page: 10. Column width and row height, merging cells, themes and fonts, conditional formatting. Terms are in the [glossary](/start/glossary/). **Operations on this page — 10** * [`apply_column_width`](#apply_column_width) * [`apply_conditional_formatting_rules`](#apply_conditional_formatting_rules) * [`apply_merge_cells`](#apply_merge_cells) * [`apply_row_height`](#apply_row_height) * [`apply_theme_fonts_patch`](#apply_theme_fonts_patch) * [`apply_workbook_theme`](#apply_workbook_theme) * [`manage_cell_styles`](#manage_cell_styles) * [`manage_conditional_formatting_rules`](#manage_conditional_formatting_rules) * [`manage_table_styles`](#manage_table_styles) * [`paste_conditional_formatting_rules`](#paste_conditional_formatting_rules) ## apply\_column\_width [Section titled “apply\_column\_width”](#apply_column_width) Applies column width. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"apply_column_width"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | col | number \| null | no | | width | number \| null | no | | columns | [ContractColumnWidth](/reference/sumsheet/types-format/#contractcolumnwidth)\[] | no | | `defaultWidth` | number \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · apply\_column\_width** | Field | TypeScript type | Req. | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---- | | operation | `"apply_column_width"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `changedColumns` | number\[] | yes | | `dirtyCellCount` | number | yes | | `currentSourceSaveReadiness` | [ContractCurrentSourceSaveReadiness](/reference/sumsheet/types-common/#contractcurrentsourcesavereadiness) \| null | no | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | yes | **Minimal JSON template** ```json { "operation": "apply_column_width", "subsetId": "", "sheetKey": "", "requestedBackend": "native-desktop" } ``` ## apply\_conditional\_formatting\_rules [Section titled “apply\_conditional\_formatting\_rules”](#apply_conditional_formatting_rules) Applies conditional formatting rules. **Request** | Field | TypeScript type | Req. | | ------------------ | --------------------------------------------------------------------------------------- | ---- | | operation | `"apply_conditional_formatting_rules"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | rules | [ContractConditionalRule](/reference/sumsheet/types-format/#contractconditionalrule)\[] | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · apply\_conditional\_formatting\_rules** | Field | TypeScript type | Req. | | ------------------------------------ | ----------------------------------------------------------------------------------------- | ---- | | operation | `"apply_conditional_formatting_rules"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | rules | [ContractConditionalRule](/reference/sumsheet/types-format/#contractconditionalrule)\[] | yes | | `preservedUnsupportedRuleBlockCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "apply_conditional_formatting_rules", "subsetId": "", "sheetKey": "", "rules": [], "requestedBackend": "native-desktop" } ``` ## apply\_merge\_cells [Section titled “apply\_merge\_cells”](#apply_merge_cells) Applies cell merging. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------ | ---- | | operation | `"apply_merge_cells"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | range | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | merge | boolean | yes | | mode | [ContractMergeCellsMode](/reference/sumsheet/types-format/#contractmergecellsmode) \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · apply\_merge\_cells** | Field | TypeScript type | Req. | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---- | | operation | `"apply_merge_cells"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | merge | boolean | yes | | mode | [ContractMergeCellsMode](/reference/sumsheet/types-format/#contractmergecellsmode) | yes | | `mergeRef` | string \| null | no | | `mergeRefs` | string\[] | yes | | `changedMerges` | string\[] | yes | | `removedMerges` | string\[] | yes | | `dirtyCellCount` | number | yes | | `currentSourceSaveReadiness` | [ContractCurrentSourceSaveReadiness](/reference/sumsheet/types-common/#contractcurrentsourcesavereadiness) \| null | no | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | yes | **Minimal JSON template** ```json { "operation": "apply_merge_cells", "subsetId": "", "sheetKey": "", "range": "", "merge": false, "requestedBackend": "native-desktop" } ``` ## apply\_row\_height [Section titled “apply\_row\_height”](#apply_row_height) Applies row height. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"apply_row_height"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | row | number \| null | no | | height | number \| null | no | | rows | [ContractRowHeight](/reference/sumsheet/types-format/#contractrowheight)\[] | no | | `defaultHeight` | number \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · apply\_row\_height** | Field | TypeScript type | Req. | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---- | | operation | `"apply_row_height"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `changedRows` | number\[] | yes | | `dirtyCellCount` | number | yes | | `currentSourceSaveReadiness` | [ContractCurrentSourceSaveReadiness](/reference/sumsheet/types-common/#contractcurrentsourcesavereadiness) \| null | no | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | yes | **Minimal JSON template** ```json { "operation": "apply_row_height", "subsetId": "", "sheetKey": "", "requestedBackend": "native-desktop" } ``` ## apply\_theme\_fonts\_patch [Section titled “apply\_theme\_fonts\_patch”](#apply_theme_fonts_patch) Applies an edit to the theme fonts. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------------------- | ---- | | operation | `"apply_theme_fonts_patch"` | yes | | `subsetId` | string | yes | | patch | [ContractApplyThemeFontsPatch](/reference/sumsheet/types-format/#contractapplythemefontspatch) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · apply\_theme\_fonts\_patch** | Field | TypeScript type | Req. | | ---------- | --------------------------- | ---- | | operation | `"apply_theme_fonts_patch"` | yes | | `subsetId` | string | yes | | major | string | yes | | minor | string | yes | | applied | boolean | yes | **Minimal JSON template** ```json { "operation": "apply_theme_fonts_patch", "subsetId": "", "patch": "", "requestedBackend": "native-desktop" } ``` ## apply\_workbook\_theme [Section titled “apply\_workbook\_theme”](#apply_workbook_theme) Applies the workbook theme. **Request** | Field | TypeScript type | Req. | Note from the contract | | ------------------ | --------------------------------------------------------------------------------------------------------------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | operation | `"apply_workbook_theme"` | yes | | | `subsetId` | string | yes | | | `presetId` | string | yes | A theme identifier from the theme catalog — colors together with fonts. If `colorsOnly` is set, the identifier is taken from the color-set catalog instead, the same list as “Page Layout → Colors”. | | `colorsOnly` | boolean | no | Apply only the theme’s color set, without touching the fonts. Without this field, or with `false`, the theme is applied in full — both colors and fonts. | | `customColors` | [ContractWorkbookThemeColorScheme](/reference/sumsheet/types-session/#contractworkbookthemecolorscheme) \| null | no | | | `previewOnly` | boolean | no | Re-parse the workbook and show the result in a separate session, without changing anything. | | `expectedRevision` | number \| null | no | Required when saving; ignored when just viewing without changes. | | `readOnly` | boolean | no | | | protected | boolean | no | | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | | **Response on success · apply\_workbook\_theme** | Field | TypeScript type | Req. | Note from the contract | | ------------------- | ----------------------------------------------------------------------------------------------------------------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | operation | `"apply_workbook_theme"` | yes | The response repeats the main fields of `open_workbook_subset` and `apply_cell_edits`, so the shell redraws the workbook the same way it does after an ordinary edit — no separate handling is needed. | | `subsetId` | string | yes | | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | | `appliedPresetId` | string | yes | | | `createdThemePart` | boolean | yes | | | `previewOnly` | boolean | no | | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | | `recalcNeeded` | boolean | yes | | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | no | | | `themeColorPalette` | string\[] | no | The workbook’s twelve-color theme palette — the same in composition and meaning as in `open_workbook_subset`, but after the theme has been applied. Elements that follow the theme (table styles, for example) are recolored from it immediately, with no save and reopen needed. | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) \| null | no | | **Minimal JSON template** ```json { "operation": "apply_workbook_theme", "subsetId": "", "presetId": "", "requestedBackend": "native-desktop" } ``` ## manage\_cell\_styles [Section titled “manage\_cell\_styles”](#manage_cell_styles) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------------------------- | ---- | | operation | “manage\_cell\_styles” | yes | | `subsetId` | string | yes | | action | [ContractCellStylesManagerAction](/reference/sumsheet/types-format/#contractcellstylesmanageraction) | yes | | `expectedRevision` | number \| null | no | | `readOnly` | boolean | no | | protected | boolean | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | **Response on success · manage\_cell\_styles** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------------------------------- | ---- | | operation | “manage\_cell\_styles” | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | action | “inspect” \| “commit” \| “applyStyle” \| “mergeFromWorkbook” | yes | | styles | [ContractCellStyleDefinition](/reference/sumsheet/types-format/#contractcellstyledefinition)\[] | yes | | authority | [ContractCellStylesManagerAuthority](/reference/sumsheet/types-format/#contractcellstylesmanagerauthority) | yes | | `didChange` | boolean | yes | | `changedCellCount` | number | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "manage_cell_styles", "subsetId": "", "action": "" } ``` ## manage\_conditional\_formatting\_rules [Section titled “manage\_conditional\_formatting\_rules”](#manage_conditional_formatting_rules) Manages conditional formatting rules. **Request** | Field | TypeScript type | Req. | | ------------------ | -------------------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"manage_conditional_formatting_rules"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | action | [ContractConditionalFormattingManagerAction](/reference/sumsheet/types-format/#contractconditionalformattingmanageraction) | yes | | `expectedRevision` | number \| null | no | | `readOnly` | boolean | no | | protected | boolean | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · manage\_conditional\_formatting\_rules** | Field | TypeScript type | Req. | | ----------------- | -------------------------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"manage_conditional_formatting_rules"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | action | `"inspect"` \| “apply” | yes | | rules | [ContractConditionalRule](/reference/sumsheet/types-format/#contractconditionalrule)\[] | yes | | `opaqueRules` | [ContractConditionalFormattingOpaqueRule](/reference/sumsheet/types-format/#contractconditionalformattingopaquerule)\[] | yes | | authority | [ContractConditionalFormattingManagerAuthority](/reference/sumsheet/types-format/#contractconditionalformattingmanagerauthority) | yes | | `didChange` | boolean | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "manage_conditional_formatting_rules", "subsetId": "", "sheetKey": "", "action": "", "requestedBackend": "native-desktop" } ``` ## manage\_table\_styles [Section titled “manage\_table\_styles”](#manage_table_styles) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------------------ | ---- | | operation | “manage\_table\_styles” | yes | | `subsetId` | string | yes | | action | [ContractTableStylesManagerAction](/reference/sumsheet/types-format/#contracttablestylesmanageraction) | yes | | `expectedRevision` | number \| null | no | | `readOnly` | boolean | no | | protected | boolean | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | **Response on success · manage\_table\_styles** | Field | TypeScript type | Req. | | ------------------- | ------------------------------------------------------------------------------------------------------------ | ---- | | operation | “manage\_table\_styles” | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | action | “inspect” \| “commit” \| “applyStyle” | yes | | styles | [ContractTableStyleDefinition](/reference/sumsheet/types-format/#contracttablestyledefinition)\[] | yes | | tables | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) | yes | | authority | [ContractTableStylesManagerAuthority](/reference/sumsheet/types-format/#contracttablestylesmanagerauthority) | yes | | `didChange` | boolean | yes | | `changedTableCount` | number | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "manage_table_styles", "subsetId": "", "action": "" } ``` ## paste\_conditional\_formatting\_rules [Section titled “paste\_conditional\_formatting\_rules”](#paste_conditional_formatting_rules) Pastes conditional formatting rules. The response will come back under a different operation’s name For a `paste_conditional_formatting_rules` request, `payload.operation` comes back as `apply_conditional_formatting_rules`. Match the response to the request by its identifier, not by the operation name — [why](/reference/sumsheet/conventions/). **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"paste_conditional_formatting_rules"` | yes | | `subsetId` | string | yes | | `clipboardId` | string | yes | | target | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · apply\_conditional\_formatting\_rules** | Field | TypeScript type | Req. | | ------------------------------------ | ----------------------------------------------------------------------------------------- | ---- | | operation | `"apply_conditional_formatting_rules"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | rules | [ContractConditionalRule](/reference/sumsheet/types-format/#contractconditionalrule)\[] | yes | | `preservedUnsupportedRuleBlockCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "paste_conditional_formatting_rules", "subsetId": "", "clipboardId": "", "target": "", "requestedBackend": "native-desktop" } ``` # What you can do with each format > The format matrix: where opening and editing are full, where they're partial, where the file saves to, and which limits are written into the contract. The table is built from the format registry inside the core: it’s not a promise in words, but what the core reports about itself. Here you can see how one format differs from another, even before the pilot. **Full** — works with no caveats. **Partial** — works within declared bounds; the rest is rejected with a reason. In the “Save” column: **to the same file** — writes back to the source format; **export only** — you can save, but only to a different file; the source format isn’t written back; **not possible** — there’s no saving at all; a workbook from such a file has to be exported to a different format. **Precision** answers the question “partial — relative to what?”: the core states which reference model it treats this format by. The benchmark is **benchmark**, meaning XLSX; the other classes are described relative to it. **The package carries over whole** — whatever the core doesn’t parse in the file, it doesn’t touch either: the unparsed parts go back exactly as they were. **Like a template** — the file opens and edits like a workbook, but stays a template, so edits leave through export to a regular file, and the template itself is never rewritten. **Binary compatibility**, **XML compatibility**, and the **ODF family** — their own storage method, which doesn’t match XLSX; exactly what the core gives up for these formats is stated in the contract column of the same row. **Delimited text** — the format holds a single grid of values: there’s simply no room in it for a second sheet, formulas, or formatting. **FODS** — flat ODS: the same OpenDocument format, but as a single XML file instead of a zip package. For documents, its counterpart is XODT. | Format | Precision | Open | Edit | Save | How it saves | What’s written into the contract | | ------------------ | -------------------------- | ------- | ------- | ---------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | | XLSX | benchmark | full | full | to the same file | native format both ways | macros aren’t executed, VBA isn’t interpreted, there’s no shared M-language runtime, and Power Query isn’t a full match | | XLSM | package carries over whole | full | partial | to the same file | native format, unparsed parts carry over as-is | macros aren’t executed, VBA isn’t interpreted, there’s no shared M-language runtime, and Power Query isn’t a full match | | XLSB | binary compatibility | full | partial | to the same file | native format both ways | — | | XLTX | like a template | full | partial | export only | native format both ways | macros aren’t executed, VBA isn’t interpreted, there’s no shared M-language runtime, and Power Query isn’t a full match | | XLTM | like a template | full | partial | export only | native format, unparsed parts carry over as-is | macros aren’t executed, VBA isn’t interpreted, there’s no shared M-language runtime, and Power Query isn’t a full match | | XLS | binary compatibility | full | partial | export only | export to a canonical form | macros aren’t executed, VBA isn’t interpreted, there’s no saving back to the same format, and styles aren’t a full match | | ODS | ODF family | full | partial | to the same file | native format both ways | styles aren’t a full match | | FODS | ODF family | full | partial | partial | native format both ways | no saving to the same format, styles don’t match completely | | SpreadsheetML 2003 | XML compatibility | full | partial | export only | export to a canonical form | no saving back to the same format | | CSV | delimited text | partial | partial | to the same file | native format both ways | the format holds a single sheet | | TSV | delimited text | partial | partial | to the same file | native format both ways | the format holds a single sheet | | TXT | delimited text | partial | partial | to the same file | native format both ways | the format holds a single sheet | | HTML | delimited text | partial | partial | not possible | — | the format holds a single sheet | How to use this The “What is written into the contract” row isn’t fine print but part of the agreement: the core declares these limits itself, and you can refer to them during acceptance. The “macros are not executed” and “VBA is not interpreted” items for XLSM and XLTM are the default declaration: until a build is released with VBA execution enabled (a vendor switch), the contract answers about the format exactly this way. Running a macro is already in the contract — on a copy of the workbook, with a preview of the changed cells, commit, and rollback ([how macro execution works](/reference/sumsheet/vba/)). For XLSX, XLTX and XLS these items are always present: these formats never contain macros. # Formulas and calculation > Recalculation, calculation modes, dependency tracing, formula auditing, named ranges, and what-if analysis. Operations on this page: 17. Recalculation, calculation modes, dependency tracing, formula auditing, named ranges, and what-if analysis. Terms are in the [glossary](/start/glossary/). ## Which functions the core understands [Section titled “Which functions the core understands”](#which-functions-the-core-understands) The list is taken from the registry in the delivery — it holds 508 functions, one entry per name; each records its category and the stage at which it goes live. The names are canonical English ones — that is how the core accepts them; in the Russian-language interface they are shown in Russian. | Category | Functions | Count | | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | | Math | `ABS`, `ACOS`, `ACOSH`, `ACOT`, `ACOTH`, `AGGREGATE`, `ASIN`, `ASINH`, `ATAN`, `ATAN2`, `ATANH`, `AVERAGE`, `AVERAGEIF`, `AVERAGEIFS`, `CEILING`, `CEILING.MATH`, `CEILING.PRECISE`, `COMBIN`, `COMBINA`, `COS`, `COSH`, `COT`, `COTH`, `COUNT`, `COUNTA`, `COUNTBLANK`, `COUNTIF`, `COUNTIFS`, `CSC`, `CSCH`, `DEGREES`, `EVEN`, `EXP`, `FACT`, `FACTDOUBLE`, `FLOOR`, `FLOOR.MATH`, `FLOOR.PRECISE`, `GCD`, `INT`, `ISO.CEILING`, `LCM`, `LN`, `LOG`, `LOG10`, `MAX`, `MAXA`, `MAXIFS`, `MDETERM`, `MIN`, `MINA`, `MINIFS`, `MINVERSE`, `MMULT`, `MOD`, `MROUND`, `MULTINOMIAL`, `MUNIT`, `ODD`, `PERCENTOF`, `PERMUT`, `PERMUTATIONA`, `PI`, `POWER`, `PRODUCT`, `QUOTIENT`, `RADIANS`, `RAND`, `RANDBETWEEN`, `ROUND`, `ROUNDDOWN`, `ROUNDUP`, `SEC`, `SECH`, `SERIESSUM`, `SIGN`, `SIN`, `SINH`, `SQRT`, `SQRTPI`, `SUBTOTAL`, `SUM`, `SUMIF`, `SUMIFS`, `SUMPRODUCT`, `SUMSQ`, `SUMX2MY2`, `SUMX2PY2`, `SUMXMY2`, `TAN`, `TANH`, `TRUNC` | 92 | | Text | `ARRAYTOTEXT`, `ASC`, `BAHTTEXT`, `CHAR`, `CLEAN`, `CODE`, `CONCAT`, `CONCATENATE`, `DBCS`, `DOLLAR`, `ENCODEURL`, `EXACT`, `FILTERXML`, `FIND`, `FINDB`, `FIXED`, `JIS`, `LEFT`, `LEFTB`, `LEN`, `LENB`, `LOWER`, `MID`, `MIDB`, `NUMBERVALUE`, `PHONETIC`, `PROPER`, `REGEXEXTRACT`, `REGEXREPLACE`, `REGEXTEST`, `REPLACE`, `REPLACEB`, `REPT`, `RIGHT`, `RIGHTB`, `SEARCH`, `SEARCHB`, `SUBSTITUTE`, `TEXT`, `TEXTAFTER`, `TEXTBEFORE`, `TEXTJOIN`, `TEXTSPLIT`, `TRIM`, `UNICHAR`, `UNICODE`, `UPPER`, `VALUETOTEXT`, `WEBSERVICE` | 49 | | Lookup and reference | `ADDRESS`, `ANCHORARRAY`, `AREAS`, `BYCOL`, `BYROW`, `CHOOSECOLS`, `CHOOSEROWS`, `COLUMN`, `COLUMNS`, `DROP`, `EXPAND`, `FILTER`, `GETPIVOTDATA`, `GROUPBY`, `HLOOKUP`, `HSTACK`, `HYPERLINK`, `IMAGE`, `INDEX`, `INDIRECT`, `LOOKUP`, `MAKEARRAY`, `MAP`, `MATCH`, `OFFSET`, `PIVOTBY`, `RANDARRAY`, `REDUCE`, `ROW`, `ROWS`, `SCAN`, `SEQUENCE`, `SHEET`, `SHEETS`, `SORT`, `SORTBY`, `TAKE`, `TOCOL`, `TOROW`, `TRANSPOSE`, `TRIMRANGE`, `UNIQUE`, `VLOOKUP`, `VSTACK`, `WRAPCOLS`, `WRAPROWS`, `XLOOKUP`, `XMATCH` | 48 | | Date and time | `DATE`, `DATEDIF`, `DATEVALUE`, `DAY`, `DAYS`, `DAYS360`, `EDATE`, `EOMONTH`, `HOUR`, `ISOWEEKNUM`, `MINUTE`, `MONTH`, `NETWORKDAYS`, `NETWORKDAYS.INTL`, `NOW`, `SECOND`, `TIME`, `TIMEVALUE`, `TODAY`, `WEEKDAY`, `WEEKNUM`, `WORKDAY`, `WORKDAY.INTL`, `YEAR`, `YEARFRAC` | 25 | | Statistical | `AVEDEV`, `AVERAGEA`, `BETA.DIST`, `BETA.INV`, `BETADIST`, `BETAINV`, `BINOM.DIST`, `BINOM.DIST.RANGE`, `BINOM.INV`, `BINOMDIST`, `CHIDIST`, `CHIINV`, `CHISQ.DIST`, `CHISQ.DIST.RT`, `CHISQ.INV`, `CHISQ.INV.RT`, `CHISQ.TEST`, `CHITEST`, `CONFIDENCE`, `CONFIDENCE.NORM`, `CONFIDENCE.T`, `CORREL`, `COVAR`, `COVARIANCE.P`, `COVARIANCE.S`, `CRITBINOM`, `DEVSQ`, `EXPON.DIST`, `EXPONDIST`, `F.DIST`, `F.DIST.RT`, `F.INV`, `F.INV.RT`, `F.TEST`, `FDIST`, `FINV`, `FISHER`, `FISHERINV`, `FORECAST`, `FORECAST.ETS`, `FORECAST.ETS.CONFINT`, `FORECAST.ETS.SEASONALITY`, `FORECAST.ETS.STAT`, `FORECAST.LINEAR`, `FREQUENCY`, `FTEST`, `GAMMA`, `GAMMA.DIST`, `GAMMA.INV`, `GAMMADIST`, `GAMMAINV`, `GAMMALN`, `GAMMALN.PRECISE`, `GAUSS`, `GEOMEAN`, `GROWTH`, `HARMEAN`, `HYPGEOM.DIST`, `HYPGEOMDIST`, `INTERCEPT`, `KURT`, `LARGE`, `LINEST`, `LOGEST`, `LOGINV`, `LOGNORM.DIST`, `LOGNORM.INV`, `LOGNORMDIST`, `MEDIAN`, `MODE`, `MODE.MULT`, `MODE.SNGL`, `NEGBINOM.DIST`, `NEGBINOMDIST`, `NORM.DIST`, `NORM.INV`, `NORM.S.DIST`, `NORM.S.INV`, `NORMDIST`, `NORMINV`, `NORMSDIST`, `NORMSINV`, `PEARSON`, `PERCENTILE`, `PERCENTILE.EXC`, `PERCENTILE.INC`, `PERCENTRANK.EXC`, `PERCENTRANK.INC`, `PHI`, `POISSON`, `POISSON.DIST`, `PROB`, `QUARTILE`, `QUARTILE.EXC`, `QUARTILE.INC`, `RANK`, `RANK.AVG`, `RANK.EQ`, `RSQ`, `SKEW`, `SKEW.P`, `SLOPE`, `SMALL`, `STANDARDIZE`, `STDEV`, `STDEV.P`, `STDEV.S`, `STDEVA`, `STDEVP`, `STDEVPA`, `STEYX`, `T.DIST`, `T.DIST.2T`, `T.DIST.RT`, `T.INV`, `T.INV.2T`, `T.TEST`, `TDIST`, `TINV`, `TREND`, `TRIMMEAN`, `TTEST`, `VAR`, `VAR.P`, `VAR.S`, `VARA`, `VARP`, `VARPA`, `WEIBULL`, `WEIBULL.DIST`, `Z.TEST`, `ZTEST` | 132 | | Logical | `AND`, `CHOOSE`, `FALSE`, `IF`, `IFERROR`, `IFNA`, `IFS`, `ISOMITTED`, `LAMBDA`, `LET`, `NOT`, `OR`, `SWITCH`, `TRUE`, `XOR` | 15 | | Information | `CELL`, `ERROR.TYPE`, `FORMULATEXT`, `INFO`, `ISBLANK`, `ISERR`, `ISERROR`, `ISEVEN`, `ISFORMULA`, `ISLOGICAL`, `ISNA`, `ISNONTEXT`, `ISNUMBER`, `ISODD`, `ISREF`, `ISTEXT`, `N`, `NA`, `T`, `TYPE`, `VALUE` | 21 | | Financial | `ACCRINT`, `ACCRINTM`, `AMORDEGRC`, `AMORLINC`, `COUPDAYBS`, `COUPDAYS`, `COUPDAYSNC`, `COUPNCD`, `COUPNUM`, `COUPPCD`, `CUMIPMT`, `CUMPRINC`, `DB`, `DDB`, `DISC`, `DOLLARDE`, `DOLLARFR`, `DURATION`, `EFFECT`, `FV`, `FVSCHEDULE`, `INTRATE`, `IPMT`, `IRR`, `ISPMT`, `MDURATION`, `MIRR`, `NOMINAL`, `NPER`, `NPV`, `ODDFPRICE`, `ODDFYIELD`, `ODDLPRICE`, `ODDLYIELD`, `PDURATION`, `PMT`, `PPMT`, `PRICE`, `PRICEDISC`, `PRICEMAT`, `PV`, `RATE`, `RECEIVED`, `RRI`, `SLN`, `SYD`, `TBILLEQ`, `TBILLPRICE`, `TBILLYIELD`, `VDB`, `XIRR`, `XNPV`, `YIELD`, `YIELDDISC`, `YIELDMAT` | 55 | | Engineering | `ARABIC`, `BASE`, `BESSELI`, `BESSELJ`, `BESSELK`, `BESSELY`, `BIN2DEC`, `BIN2HEX`, `BIN2OCT`, `BITAND`, `BITLSHIFT`, `BITOR`, `BITRSHIFT`, `BITXOR`, `COMPLEX`, `CONVERT`, `DEC2BIN`, `DEC2HEX`, `DEC2OCT`, `DECIMAL`, `DELTA`, `ERF`, `ERF.PRECISE`, `ERFC`, `ERFC.PRECISE`, `GESTEP`, `HEX2BIN`, `HEX2DEC`, `HEX2OCT`, `IMABS`, `IMAGINARY`, `IMARGUMENT`, `IMCONJUGATE`, `IMCOS`, `IMCOSH`, `IMCOT`, `IMCSC`, `IMCSCH`, `IMDIV`, `IMEXP`, `IMLN`, `IMLOG10`, `IMLOG2`, `IMPOWER`, `IMPRODUCT`, `IMREAL`, `IMSEC`, `IMSECH`, `IMSIN`, `IMSINH`, `IMSQRT`, `IMSUB`, `IMSUM`, `IMTAN`, `OCT2BIN`, `OCT2DEC`, `OCT2HEX`, `ROMAN` | 58 | | Database | `DAVERAGE`, `DCOUNT`, `DCOUNTA`, `DGET`, `DMAX`, `DMIN`, `DPRODUCT`, `DSTDEV`, `DSTDEVP`, `DSUM`, `DVAR`, `DVARP` | 12 | | Compatibility | `PERCENTRANK` | 1 | A name being on the list means the function is known to the core and has an owner of its meaning. The stage at which it goes live is recorded in the same registry entry — that’s a matter for the capability profile, not a blanket promise. **Operations on this page — 17** * [`build_lookup_indices`](#build_lookup_indices) * [`calculate`](#calculate) * [`consolidate_plan`](#consolidate_plan) * [`data_analysis_toolpak`](#data_analysis_toolpak) * [`defined_name_values`](#defined_name_values) * [`defined_names_lifecycle`](#defined_names_lifecycle) * [`delete_defined_name_bounded`](#delete_defined_name_bounded) * [`evaluate_formula_trace`](#evaluate_formula_trace) * [`formula_audit_watch`](#formula_audit_watch) * [`formula_builder_catalog`](#formula_builder_catalog) * [`formula_trust_window`](#formula_trust_window) * [`recalc_frontier`](#recalc_frontier) * [`recalculate_used_range_bounded`](#recalculate_used_range_bounded) * [`set_calculation_options`](#set_calculation_options) * [`trace_formula_dependencies`](#trace_formula_dependencies) * [`upsert_defined_name_bounded`](#upsert_defined_name_bounded) * [`what_if_analysis`](#what_if_analysis) ## build\_lookup\_indices [Section titled “build\_lookup\_indices”](#build_lookup_indices) Builds lookup indexes. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"build_lookup_indices"` | yes | | `subsetId` | string | yes | | ranges | [CellRange](/reference/sumsheet/types-cells/#cellrange)\[] | yes | | mode | [LookupIndexMode](/reference/sumsheet/types-common/#lookupindexmode) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · build\_lookup\_indices** | Field | TypeScript type | Req. | | ----------------- | ----------------------------------------------------------------------------------------- | ---- | | operation | `"build_lookup_indices"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | mode | [LookupIndexMode](/reference/sumsheet/types-common/#lookupindexmode) | yes | | `duplicatePolicy` | string | yes | | `indexHandles` | [LookupIndexHandleInfo](/reference/sumsheet/types-common/#lookupindexhandleinfo)\[] | yes | **Minimal JSON template** ```json { "operation": "build_lookup_indices", "subsetId": "", "ranges": [], "mode": "", "requestedBackend": "native-desktop" } ``` ## calculate [Section titled “calculate”](#calculate) Formula recalculation: what controls the workbook’s calculation engine. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------------- | ---- | | operation | `"calculate"` | yes | | `subsetId` | string | yes | | scope | [ContractCalculationScope](/reference/sumsheet/types-formulas/#contractcalculationscope) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · calculate** | Field | TypeScript type | Req. | | ------------------------------- | -------------------------------------------------------------------------------------------------------- | ---- | | operation | `"calculate"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | scope | [ContractCalculationScope](/reference/sumsheet/types-formulas/#contractcalculationscope) | yes | | `formulaTrustSnapshot` | [ContractFormulaTrustSnapshot](/reference/sumsheet/types-formulas/#contractformulatrustsnapshot) \| null | no | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `changedKeys` | string\[] | yes | | `dirtyCellCount` | number | yes | | `completionState` | `"settled"` \| “incomplete” | yes | | `supportedFormulaCount` | number | yes | | `settledSupportedFormulaCount` | number | yes | | `supportedDirtyCellCount` | number | yes | | `supportedUnpublishedCellCount` | number | yes | | `boundaryFormulaCount` | number | yes | | `startedStatus` | [ContractCalculationStatus](/reference/sumsheet/types-formulas/#contractcalculationstatus) | yes | | `resultStatus` | [ContractCalculationStatus](/reference/sumsheet/types-formulas/#contractcalculationstatus) | yes | | `workbookGeneration` | number | yes | | `loadedSheetCountBefore` | number | yes | | `loadedSheetCountAfter` | number | yes | | `dependencyBoundarySheetCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "calculate", "subsetId": "", "scope": "", "requestedBackend": "native-desktop" } ``` ## consolidate\_plan [Section titled “consolidate\_plan”](#consolidate_plan) Plans a consolidation — “Data” → “Consolidate” — in one atomic action. **Request** | Field | TypeScript type | Req. | | --------------------- | ------------------------------------------------------------------------------------------ | ---- | | operation | `"consolidate_plan"` | yes | | `subsetId` | string | yes | | `sourceRanges` | [CellRange](/reference/sumsheet/types-cells/#cellrange)\[] | yes | | destination | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | function | [ContractConsolidateFunction](/reference/sumsheet/types-data/#contractconsolidatefunction) | no | | `useTopRowLabels` | boolean | no | | `useLeftColumnLabels` | boolean | no | | `createLinks` | boolean | no | | `expectedRevision` | number | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · consolidate\_plan** | Field | TypeScript type | Req. | | --------------------- | ---------------------------------------------------------------------------------------------- | ---- | | operation | `"consolidate_plan"` | yes | | `outputRange` | [CellRange](/reference/sumsheet/types-cells/#cellrange) | yes | | `sourceValueCount` | number | yes | | `outputCellCount` | number | yes | | function | [ContractConsolidateFunction](/reference/sumsheet/types-data/#contractconsolidatefunction) | yes | | `useTopRowLabels` | boolean | yes | | `useLeftColumnLabels` | boolean | yes | | `createLinks` | false | yes | | mutation | [ContractConsolidationMutation](/reference/sumsheet/types-data/#contractconsolidationmutation) | yes | **Minimal JSON template** ```json { "operation": "consolidate_plan", "subsetId": "", "sourceRanges": [], "destination": "", "requestedBackend": "native-desktop" } ``` ## data\_analysis\_toolpak [Section titled “data\_analysis\_toolpak”](#data_analysis_toolpak) The Analysis Toolpak: descriptive statistics, a forecast sheet, and other tools from the “Data” tab. **Request** | Field | TypeScript type | Req. | | ---------------------------- | ------------------------------------------------------------------------------------------ | ---- | | operation | `"data_analysis_toolpak"` | yes | | `subsetId` | string | yes | | intent | [ContractDataAnalysisAction](/reference/sumsheet/types-common/#contractdataanalysisaction) | yes | | `expectedWorkbookGeneration` | number \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · data\_analysis\_toolpak** | Field | TypeScript type | Req. | | -------------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"data_analysis_toolpak"` | yes | | `subsetId` | string | yes | | `targetSubsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | `"run"` \| “undo” \| “redo” \| “cancel” | yes | | status | string | yes | | tool | [ContractDataAnalysisTool](/reference/sumsheet/types-common/#contractdataanalysistool)\[`"tool"`] \| null | no | | applied | boolean | yes | | `createdSheet` | boolean | yes | | `createdWorkbook` | boolean | yes | | `workbookGeneration` | number | yes | | `outputRange` | [CellRange](/reference/sumsheet/types-cells/#cellrange) \| null | no | | `chartPlan` | [ContractDataAnalysisChartPlan](/reference/sumsheet/types-charts/#contractdataanalysischartplan) \| null | no | | `changedKeys` | string\[] | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "data_analysis_toolpak", "subsetId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## defined\_name\_values [Section titled “defined\_name\_values”](#defined_name_values) Named-range values: reading what a name currently points to. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"defined_name_values"` | yes | | `subsetId` | string | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · defined\_name\_values** | Field | TypeScript type | Req. | | ---------- | ------------------------------------------------------------------------------------------- | ---- | | operation | `"defined_name_values"` | yes | | `subsetId` | string | yes | | values | [ContractDefinedNameValue](/reference/sumsheet/types-formulas/#contractdefinednamevalue)\[] | yes | **Minimal JSON template** ```json { "operation": "defined_name_values", "subsetId": "", "requestedBackend": "native-desktop" } ``` ## defined\_names\_lifecycle [Section titled “defined\_names\_lifecycle”](#defined_names_lifecycle) Named ranges in full: creating, changing, and deleting them with a scope, creating one from a selection, a single history entry, and rewriting formulas on rename. **Request** | Field | TypeScript type | Req. | | ------------------ | -------------------------------------------------------------------------------------------- | ---- | | operation | `"defined_names_lifecycle"` | yes | | `subsetId` | string | yes | | intent | [ContractDefinedNamesIntent](/reference/sumsheet/types-formulas/#contractdefinednamesintent) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · defined\_names\_lifecycle** | Field | TypeScript type | Req. | | ---------------- | --------------------------------------------------------------------------------------------- | ---- | | operation | `"defined_names_lifecycle"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | result | [ContractDefinedNamesResult](/reference/sumsheet/types-formulas/#contractdefinednamesresult) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | no | **Minimal JSON template** ```json { "operation": "defined_names_lifecycle", "subsetId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## delete\_defined\_name\_bounded [Section titled “delete\_defined\_name\_bounded”](#delete_defined_name_bounded) Deletes a named range within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"delete_defined_name_bounded"` | yes | | `subsetId` | string | yes | | name | string | yes | | scope | `"workbook"` \| “sheet” | yes | | `scopeSheetKey` | string \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · delete\_defined\_name\_bounded** | Field | TypeScript type | Req. | | ------------------------ | --------------------------------------------------------------------------------------------- | ---- | | operation | `"delete_defined_name_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `deletedName` | string | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | no | | `definedNameDeleteClaim` | string | yes | **Minimal JSON template** ```json { "operation": "delete_defined_name_bounded", "subsetId": "", "name": "", "scope": "workbook", "requestedBackend": "native-desktop" } ``` ## evaluate\_formula\_trace [Section titled “evaluate\_formula\_trace”](#evaluate_formula_trace) Computes a formula trace. **Request** | Field | TypeScript type | Req. | | ---------------------------- | ------------------------------------------------------------------------------------------------------ | ---- | | operation | `"evaluate_formula_trace"` | yes | | `subsetId` | string | yes | | action | [ContractFormulaEvaluationAction](/reference/sumsheet/types-formulas/#contractformulaevaluationaction) | yes | | `anchorKey` | string | no | | `traceId` | string | no | | `expectedWorkbookGeneration` | number | no | | `activeSheetKey` | string | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · evaluate\_formula\_trace** | Field | TypeScript type | Req. | | --------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"evaluate_formula_trace"` | yes | | `subsetId` | string | yes | | `traceId` | string \| null | yes | | `requestWorkbookGeneration` | number \| null | yes | | `workbookGeneration` | number | yes | | `deterministicTraceHash` | string | yes | | `anchorKey` | string | yes | | `resolvedAnchorKey` | string | yes | | `formulaSource` | string \| null | yes | | `currentStep` | [ContractFormulaEvaluationStep](/reference/sumsheet/types-formulas/#contractformulaevaluationstep) \| null | yes | | `stepIndex` | number | yes | | `stepCount` | number | yes | | stack | [ContractFormulaEvaluationStackFrame](/reference/sumsheet/types-formulas/#contractformulaevaluationstackframe)\[] | yes | | value | [ContractFormulaEvaluationValue](/reference/sumsheet/types-formulas/#contractformulaevaluationvalue) | yes | | trust | [ContractFormulaEvaluationTrust](/reference/sumsheet/types-formulas/#contractformulaevaluationtrust) | yes | | `referenceTargetKey` | string \| null | yes | | diagnostic | [ContractFormulaEvaluationDiagnostic](/reference/sumsheet/types-formulas/#contractformulaevaluationdiagnostic) \| null | yes | | outcome | [ContractFormulaEvaluationOutcome](/reference/sumsheet/types-formulas/#contractformulaevaluationoutcome) | yes | | actions | [ContractFormulaEvaluationActions](/reference/sumsheet/types-formulas/#contractformulaevaluationactions) | yes | | persistence | [ContractFormulaAuditingStatePersistence](/reference/sumsheet/types-formulas/#contractformulaauditingstatepersistence) | no | **Minimal JSON template** ```json { "operation": "evaluate_formula_trace", "subsetId": "", "action": "", "activeSheetKey": "", "requestedBackend": "native-desktop" } ``` ## formula\_audit\_watch [Section titled “formula\_audit\_watch”](#formula_audit_watch) Error checking and the Watch Window — what lives on Excel’s “Formulas” tab. **Request** | Field | TypeScript type | Req. | | ---------------------------- | ------------------------------------------------------------------------------------------------------ | ---- | | operation | `"formula_audit_watch"` | yes | | `subsetId` | string | yes | | action | [ContractFormulaAuditWatchAction](/reference/sumsheet/types-formulas/#contractformulaauditwatchaction) | yes | | `expectedWorkbookGeneration` | number | yes | | `activeSheetKey` | string | yes | | `targetKey` | string | no | | `findingKind` | [ContractFormulaAuditFindingKind](/reference/sumsheet/types-formulas/#contractformulaauditfindingkind) | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · formula\_audit\_watch** | Field | TypeScript type | Req. | | --------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"formula_audit_watch"` | yes | | `subsetId` | string | yes | | `requestWorkbookGeneration` | number | yes | | `workbookGeneration` | number | yes | | `deterministicSnapshotHash` | string | yes | | `calculationMode` | [ContractWorkbookCalculationMode](/reference/sumsheet/types-session/#contractworkbookcalculationmode) | yes | | outcome | [ContractFormulaAuditOutcome](/reference/sumsheet/types-formulas/#contractformulaauditoutcome) | yes | | `didChange` | boolean | yes | | findings | [ContractFormulaAuditFinding](/reference/sumsheet/types-formulas/#contractformulaauditfinding)\[] | yes | | watches | [ContractFormulaAuditWatchRow](/reference/sumsheet/types-formulas/#contractformulaauditwatchrow)\[] | yes | | counts | [ContractFormulaAuditCounts](/reference/sumsheet/types-formulas/#contractformulaauditcounts) | yes | | actions | [ContractFormulaAuditActions](/reference/sumsheet/types-formulas/#contractformulaauditactions) | yes | | persistence | [ContractFormulaAuditingStatePersistence](/reference/sumsheet/types-formulas/#contractformulaauditingstatepersistence) | no | **Minimal JSON template** ```json { "operation": "formula_audit_watch", "subsetId": "", "action": "", "expectedWorkbookGeneration": 0, "activeSheetKey": "", "requestedBackend": "native-desktop" } ``` ## formula\_builder\_catalog [Section titled “formula\_builder\_catalog”](#formula_builder_catalog) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | --------- | --------------------------- | ---- | | operation | “formula\_builder\_catalog” | yes | | locale | string | yes | **Response on success · formula\_builder\_catalog** | Field | TypeScript type | Req. | | --------- | -------------------------------------------------------------------------------------------------- | ---- | | operation | “formula\_builder\_catalog” | yes | | catalog | [ContractFormulaBuilderCatalog](/reference/sumsheet/types-formulas/#contractformulabuildercatalog) | yes | **Minimal JSON template** ```json { "operation": "formula_builder_catalog", "locale": "" } ``` ## formula\_trust\_window [Section titled “formula\_trust\_window”](#formula_trust_window) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | What it is | | ---------- | ------------------------------------------------------------------- | ---- | ---------------------------------------------------------------------------------------- | | operation | “formula\_trust\_window” | yes | A snapshot of formula trust over an arbitrary window of a live session (scroll-through). | | `subsetId` | string | yes | | | `sheetKey` | string | yes | | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | **Response on success · formula\_trust\_window** | Field | TypeScript type | Req. | What it is | | ---------------------- | ------------------------------------------------------------------------------------------------ | ---- | -------------------------------------------------------------------------------------------------------------------------- | | operation | “formula\_trust\_window” | yes | | | `subsetId` | string | yes | | | `sheetKey` | string | yes | | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | An echo of the requested window: the response cannot be fitted to a different window. | | hydrated | boolean | yes | false — the sheet index is still being built: the response is incomplete, and the window should not be considered covered. | | `formulaTrustSnapshot` | [ContractFormulaTrustSnapshot](/reference/sumsheet/types-formulas/#contractformulatrustsnapshot) | yes | | **Minimal JSON template** ```json { "operation": "formula_trust_window", "subsetId": "", "sheetKey": "", "viewport": "" } ``` ## recalc\_frontier [Section titled “recalc\_frontier”](#recalc_frontier) Recalculates a bound area. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"recalc_frontier"` | yes | | `subsetId` | string | yes | | `frontierKeys` | string\[] | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · recalc\_frontier** | Field | TypeScript type | Req. | | ----------------- | ----------------------------------------------------------------------------------------- | ---- | | operation | `"recalc_frontier"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `changedKeys` | string\[] | yes | | `dirtyCellCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "recalc_frontier", "subsetId": "", "frontierKeys": [], "requestedBackend": "native-desktop" } ``` ## recalculate\_used\_range\_bounded [Section titled “recalculate\_used\_range\_bounded”](#recalculate_used_range_bounded) Recalculates the used range within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"recalculate_used_range_bounded"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · recalculate\_used\_range\_bounded** | Field | TypeScript type | Req. | | --------------------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"recalculate_used_range_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `changedSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `previousUsedRange` | string | yes | | `usedRange` | string | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `usedRangeRecalculateClaim` | `"live_verified"` | yes | | `usedRangeRecalculateScope` | `"same_workbook_worksheet_dimension_from_present_cells_and_metadata"` | yes | | `usedRangeDirtyCleared` | true | yes | **Minimal JSON template** ```json { "operation": "recalculate_used_range_bounded", "subsetId": "", "sheetKey": "", "requestedBackend": "native-desktop" } ``` ## set\_calculation\_options [Section titled “set\_calculation\_options”](#set_calculation_options) Sets recalculation settings. **Request** | Field | TypeScript type | Req. | | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"set_calculation_options"` | yes | | `subsetId` | string | yes | | `calculationMode` | Exclude< [ContractWorkbookCalculationMode](/reference/sumsheet/types-session/#contractworkbookcalculationmode), `"unknown"` > \| null | no | | `recalculateBeforeSave` | boolean \| null | no | | `iterativeCalculationEnabled` | boolean \| null | no | | `maximumIterations` | number \| null | no | | `maximumChange` | number \| null | no | | `historyAction` | [ContractCalculationOptionsHistoryAction](/reference/sumsheet/types-formulas/#contractcalculationoptionshistoryaction) | no | | `expectedWorkbookGeneration` | number \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · set\_calculation\_options** | Field | TypeScript type | Req. | | --------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"set_calculation_options"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `previousCalculationMode` | [ContractWorkbookCalculationMode](/reference/sumsheet/types-session/#contractworkbookcalculationmode) | yes | | `calculationMode` | [ContractWorkbookCalculationMode](/reference/sumsheet/types-session/#contractworkbookcalculationmode) | yes | | `previousIterativeSettings` | [ContractIterativeCalculationSettings](/reference/sumsheet/types-formulas/#contractiterativecalculationsettings) | yes | | `iterativeSettings` | [ContractIterativeCalculationSettings](/reference/sumsheet/types-formulas/#contractiterativecalculationsettings) | yes | | `recalculateBeforeSave` | boolean \| null | no | | `historyAction` | [ContractCalculationOptionsHistoryAction](/reference/sumsheet/types-formulas/#contractcalculationoptionshistoryaction) | yes | | `workbookGeneration` | number | yes | | `undoAvailable` | boolean | yes | | `redoAvailable` | boolean | yes | | `optionsChanged` | boolean | yes | | `formulaTrustSnapshot` | [ContractFormulaTrustSnapshot](/reference/sumsheet/types-formulas/#contractformulatrustsnapshot) \| null | no | | `calculationPerformed` | boolean | yes | | `changedKeys` | string\[] | yes | | `dirtyCellCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "set_calculation_options", "subsetId": "", "requestedBackend": "native-desktop" } ``` ## trace\_formula\_dependencies [Section titled “trace\_formula\_dependencies”](#trace_formula_dependencies) Traces a formula’s dependencies. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"trace_formula_dependencies"` | yes | | `subsetId` | string | yes | | `anchorKey` | string | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · trace\_formula\_dependencies** | Field | TypeScript type | Req. | | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"trace_formula_dependencies"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | `anchorKey` | string | yes | | `anchorFormula` | string \| null | yes | | `anchorStatus` | [FormulaSubsetStatus](/reference/sumsheet/types-session/#formulasubsetstatus) | yes | | `directPrecedentKeys` | string\[] | yes | | `directDependentKeys` | string\[] | yes | | `unsupportedReferences` | string\[] | yes | | `graphVersion` | number | no | | `graphHash` | string | no | | `maxDepth` | number | no | | edges | [ContractFormulaTraceEdge](/reference/sumsheet/types-formulas/#contractformulatraceedge)\[] | no | | `precedentTruncated` | boolean | no | | `dependentTruncated` | boolean | no | | `cycleGroups` | string\[]\[] | no | | `missingOrDeletedReferences` | string\[] | no | | persistence | [ContractFormulaAuditingStatePersistence](/reference/sumsheet/types-formulas/#contractformulaauditingstatepersistence) | no | **Minimal JSON template** ```json { "operation": "trace_formula_dependencies", "subsetId": "", "anchorKey": "", "requestedBackend": "native-desktop" } ``` ## upsert\_defined\_name\_bounded [Section titled “upsert\_defined\_name\_bounded”](#upsert_defined_name_bounded) Creates or updates a named range within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"upsert_defined_name_bounded"` | yes | | `subsetId` | string | yes | | name | string | yes | | `refersTo` | string | yes | | scope | `"workbook"` \| “sheet” | yes | | `scopeSheetKey` | string \| null | no | | `previousName` | string \| null | no | | comment | string \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · upsert\_defined\_name\_bounded** | Field | TypeScript type | Req. | | ------------------------ | --------------------------------------------------------------------------------------------- | ---- | | operation | `"upsert_defined_name_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `upsertedName` | string | yes | | `refersTo` | string | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | no | | `definedNameUpsertClaim` | string | yes | **Minimal JSON template** ```json { "operation": "upsert_defined_name_bounded", "subsetId": "", "name": "", "refersTo": "", "scope": "workbook", "requestedBackend": "native-desktop" } ``` ## what\_if\_analysis [Section titled “what\_if\_analysis”](#what_if_analysis) What-if analysis: goal seek, data tables, scenarios. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"what_if_analysis"` | yes | | `subsetId` | string | yes | | intent | [ContractWhatIfAction](/reference/sumsheet/types-common/#contractwhatifaction) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · what\_if\_analysis** | Field | TypeScript type | Req. | | ----------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"what_if_analysis"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | status | string | yes | | `previewToken` | string \| null | no | | applied | boolean | yes | | iterations | number | yes | | solution | number \| null | no | | `resultValue` | [ContractWhatIfValue](/reference/sumsheet/types-common/#contractwhatifvalue) \| null | no | | `tableValues` | [ContractWhatIfValue](/reference/sumsheet/types-common/#contractwhatifvalue)\[]\[] | yes | | scenarios | [ContractWhatIfScenarioView](/reference/sumsheet/types-formulas/#contractwhatifscenarioview)\[] | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `changedKeys` | string\[] | yes | | `dirtyCellCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "what_if_analysis", "subsetId": "", "intent": "", "requestedBackend": "native-desktop" } ``` # SumSheet reference > Compute Contract: transport, session conventions and the 208 operations of the spreadsheet processor, grouped by domain. If this is your first time here The reference answers “what’s the operation called and what does it accept”, not “where do I start”. The full workflow is shown in the [quick start](/sumsheet/quickstart/): open a workbook, write a value and a formula, recalculate, and save. How the session works and what a response contains are in [How the session API works](/sumsheet/session/); a breakdown of every call from the example is in [Sample requests](/sumsheet/requests/); and if something isn’t working, see [diagnostics](/sumsheet/diagnostics/). The SumSheet reference describes working with XLSX spreadsheets. For DOCX documents, there’s the [SumDoc reference](/reference/sumdoc/overview/). The Compute Contract is the only typed boundary between the interface, automation, adapters to your application and the SumSheet core in Rust. All 208 operations pass through it, wherever the core runs: in the desktop app, in the browser via WebAssembly or as a service on a server. The contract and the release are different numbers 208 operations are described in the contract. The core of the latest published release accepts 206 of them: two are in the contract but not yet in the build—`drawing_object_history_replay`, `sparkline_history_replay`. On their pages such operations are marked with a “not yet in the published release” callout. You can verify this on your own copy: ask the core for a nonexistent operation, and it will list all the ones it accepts. Key conventions The `row` and `col` indexes, as well as the bounds of the [viewport](/start/glossary/), are numbered from zero: the first row is `0`. Operations within a session pass the [`subsetId`](/start/glossary/) obtained from `open_workbook_subset`. The [`expectedRevision`](/start/glossary/) field, when present, protects against races: if the workbook has changed since the moment the caller last saw it, the request is rejected **before** the workbook changes, not halfway through. Definitions of these and other terms are in the [glossary](/start/glossary/). ## Operation sections [Section titled “Operation sections”](#operation-sections) | Section | Operations | What it covers | | ------------------------------------------------------------------------ | ---------- | ----------------------------------------------------------------------------------------------------------------------------------- | | [Session and workbook](/reference/sumsheet/session/) | 19 | Opening a workbook subset, saving, the viewport, recovery, properties, comparing, and merging revisions. | | [Cells and ranges](/reference/sumsheet/cells/) | 23 | Editing cells, reading details, shifts, copy and paste, find and replace, sorting, undo and redo, navigating the sheet. | | [Sheets](/reference/sumsheet/sheets/) | 17 | Sheet lifecycle, copying between workbooks, visibility, protection, and freezing panes. | | [Printing and layout](/reference/sumsheet/printing/) | 7 | Page setup, breaks, sheet background, and printing chart sheets. | | [Formulas and calculation](/reference/sumsheet/formulas/) | 17 | Recalculation, calculation modes, dependency tracing, formula auditing, named ranges, and what-if analysis. | | [Formatting](/reference/sumsheet/format/) | 10 | Column width and row height, merging cells, themes and fonts, conditional formatting. | | [Data, filters, and objects](/reference/sumsheet/data/) | 23 | Filters, subtotals, data cleanup, tables, text import, data validation, slicers, and form controls. | | [Pivot tables](/reference/sumsheet/pivot/) | 11 | Cache, calculated fields and items, grouping and drill-down, layout, report filters, sorting, and value field settings. | | [Power Query: M expressions](/reference/sumsheet/pq-expressions/) | 9 | Evaluating and inspecting M expressions, including with external sources. | | [Power Query: connectors](/reference/sumsheet/pq-connectors/) | 13 | Connecting to Postgres, SQL Server, OData, and web sources: testing the connection, previewing, and navigating objects. | | [Power Query: queries and steps](/reference/sumsheet/pq-queries/) | 13 | Query lifecycle, applied steps, parameters, and folder navigation. | | [Power Query: tables from queries](/reference/sumsheet/pq-tables/) | 8 | Loading a query’s result onto a sheet, refreshing such tables, and the link between a table on a sheet and the query that fills it. | | [Power Query: execution and progress](/reference/sumsheet/pq-execution/) | 9 | The query graph, refreshing, cancellation, and monitoring long-running operations. | | [Power Query: trust and privacy](/reference/sumsheet/pq-trust/) | 6 | Source privacy levels, trust decisions, and connection settings. | | [Power Query: external mashups](/reference/sumsheet/pq-mashup/) | 3 | Reading, writing, and refreshing Power Query query sets assembled outside the product. | | [VBA and macros](/reference/sumsheet/vba/) | 12 | Project inspection, planning and running, status, cancellation and rollback, macro trust, and the approved list. | | [Protection and review](/reference/sumsheet/protection/) | 8 | Sheet and workbook protection, range permissions, protection auditing, change tracking, comments, and ink annotations. | ## Type dictionary [Section titled “Type dictionary”](#type-dictionary) The “TypeScript type” column holds names like `ViewportWindow` or `ContractSubsetSessionInfo`. Their definitions are collected in the [type dictionary](/reference/sumsheet/types-session/)—959 names, arranged by the same topics as the operations. Every name in the field tables leads straight to its definition. Returning under a different name An operation can return a success payload with a different `operation`: `open_workbook_subset_from_bytes` → `open_workbook_subset`; `move_clipboard_range` → `paste_range`; `paste_conditional_formatting_rules` → `apply_conditional_formatting_rules`. # Pivot tables > Cache, calculated fields and items, grouping and drill-down, layout, report filters, sorting, and value field settings. Operations on this page: 11. Cache, calculated fields and items, grouping and drill-down, layout, report filters, sorting, and value field settings. Terms are in the [glossary](/start/glossary/). **Operations on this page — 11** * [`pivot_cache_options`](#pivot_cache_options) * [`pivot_calculated_fields`](#pivot_calculated_fields) * [`pivot_calculated_items`](#pivot_calculated_items) * [`pivot_data_model_olap_readonly`](#pivot_data_model_olap_readonly) * [`pivot_field_list_authoring`](#pivot_field_list_authoring) * [`pivot_grouping_drilldown`](#pivot_grouping_drilldown) * [`pivot_layout_format`](#pivot_layout_format) * [`pivot_move_copy`](#pivot_move_copy) * [`pivot_report_filter_pages`](#pivot_report_filter_pages) * [`pivot_sort_filter_ranking`](#pivot_sort_filter_ranking) * [`pivot_value_field_settings`](#pivot_value_field_settings) ## pivot\_cache\_options [Section titled “pivot\_cache\_options”](#pivot_cache_options) Pivot table cache settings: what it holds between refreshes, and for how long. **Request** | Field | TypeScript type | Req. | | ------------------ | --------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_cache_options"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | intent | [ContractPivotCacheOptionsAction](/reference/sumsheet/types-pivot/#contractpivotcacheoptionsaction) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · pivot\_cache\_options** | Field | TypeScript type | Req. | | --------------------- | -------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_cache_options"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | status | string | yes | | `didChange` | boolean | yes | | options | [ContractPivotCacheOptionsView](/reference/sumsheet/types-pivot/#contractpivotcacheoptionsview)\[] | yes | | `refreshedPivotNames` | string\[] | yes | | `dirtyCellCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "pivot_cache_options", "subsetId": "", "requestId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## pivot\_calculated\_fields [Section titled “pivot\_calculated\_fields”](#pivot_calculated_fields) Pivot table calculated fields: your own formulas on top of the source data. **Request** | Field | TypeScript type | Req. | | ------------------ | ----------------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_calculated_fields"` | yes | | `subsetId` | string | yes | | intent | [ContractPivotCalculatedFieldsAction](/reference/sumsheet/types-pivot/#contractpivotcalculatedfieldsaction) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · pivot\_calculated\_fields** | Field | TypeScript type | Req. | | ------------------- | -------------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_calculated_fields"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | status | string | yes | | caches | [ContractPivotCalculatedCacheView](/reference/sumsheet/types-pivot/#contractpivotcalculatedcacheview)\[] | yes | | fields | [ContractPivotCalculatedFieldView](/reference/sumsheet/types-pivot/#contractpivotcalculatedfieldview)\[] | yes | | `refreshedCacheIds` | string\[] | yes | | `dirtyCellCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "pivot_calculated_fields", "subsetId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## pivot\_calculated\_items [Section titled “pivot\_calculated\_items”](#pivot_calculated_items) Pivot table calculated items: your own formulas inside a field. **Request** | Field | TypeScript type | Req. | | ------------------ | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_calculated_items"` | yes | | `subsetId` | string | yes | | intent | [ContractPivotCalculatedItemsAction](/reference/sumsheet/types-pivot/#contractpivotcalculateditemsaction) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · pivot\_calculated\_items** | Field | TypeScript type | Req. | | ------------------- | ---------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_calculated_items"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | status | string | yes | | fields | [ContractPivotCalculatedItemFieldView](/reference/sumsheet/types-pivot/#contractpivotcalculateditemfieldview)\[] | yes | | items | [ContractPivotCalculatedItemView](/reference/sumsheet/types-pivot/#contractpivotcalculateditemview)\[] | yes | | `refreshedCacheIds` | string\[] | yes | | `dirtyCellCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "pivot_calculated_items", "subsetId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## pivot\_data\_model\_olap\_readonly [Section titled “pivot\_data\_model\_olap\_readonly”](#pivot_data_model_olap_readonly) Reading a pivot table built on the data model or an OLAP source. Read-only: the core doesn’t change these pivot tables. **Request** | Field | TypeScript type | Req. | | ------------------ | --------------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_data_model_olap_readonly"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | intent | [ContractPivotDataModelOlapReadonlyAction](/reference/sumsheet/types-pivot/#contractpivotdatamodelolapreadonlyaction) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · pivot\_data\_model\_olap\_readonly** | Field | TypeScript type | Req. | | ------------------------ | ----------------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_data_model_olap_readonly"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | status | `"ok"` \| “blocked” | yes | | `didChange` | false | yes | | `blockedReasonCode` | string \| null | yes | | `selectedEntityStableId` | string \| null | yes | | inventory | [ContractPivotDataModelOlapInventory](/reference/sumsheet/types-pivot/#contractpivotdatamodelolapinventory) | yes | **Minimal JSON template** ```json { "operation": "pivot_data_model_olap_readonly", "subsetId": "", "requestId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## pivot\_field\_list\_authoring [Section titled “pivot\_field\_list\_authoring”](#pivot_field_list_authoring) The pivot table field list: what’s in the rows, columns, values, and filters. **Request** | Field | TypeScript type | Req. | | ------------------ | --------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_field_list_authoring"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | intent | [ContractPivotFieldListAuthoringAction](/reference/sumsheet/types-pivot/#contractpivotfieldlistauthoringaction) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · pivot\_field\_list\_authoring** | Field | TypeScript type | Req. | | ---------------- | -------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_field_list_authoring"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | status | string | yes | | `didChange` | boolean | yes | | `draftChanged` | boolean | yes | | layouts | [ContractPivotFieldListView](/reference/sumsheet/types-pivot/#contractpivotfieldlistview)\[] | yes | | `dirtyCellCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "pivot_field_list_authoring", "subsetId": "", "requestId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## pivot\_grouping\_drilldown [Section titled “pivot\_grouping\_drilldown”](#pivot_grouping_drilldown) Grouping in a pivot table, and drilling down to the source rows. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_grouping_drilldown"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | intent | [ContractPivotGroupingDrilldownAction](/reference/sumsheet/types-pivot/#contractpivotgroupingdrilldownaction) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · pivot\_grouping\_drilldown** | Field | TypeScript type | Req. | | --------------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_grouping_drilldown"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | status | string | yes | | `didChange` | boolean | yes | | caches | [ContractPivotGroupingCacheView](/reference/sumsheet/types-pivot/#contractpivotgroupingcacheview)\[] | yes | | items | [ContractPivotGroupingItemView](/reference/sumsheet/types-pivot/#contractpivotgroupingitemview)\[] | yes | | groups | [ContractPivotGroupView](/reference/sumsheet/types-pivot/#contractpivotgroupview)\[] | yes | | `expandedItems` | [ContractPivotExpandedItemView](/reference/sumsheet/types-pivot/#contractpivotexpandeditemview)\[] | yes | | `hierarchyNodes` | [ContractPivotHierarchyNodeView](/reference/sumsheet/types-pivot/#contractpivothierarchynodeview)\[] | yes | | `refreshedPivotNames` | string\[] | yes | | `detailContext` | [ContractPivotDetailContextView](/reference/sumsheet/types-pivot/#contractpivotdetailcontextview) \| null | no | | `getPivotData` | [ContractPivotGetPivotDataView](/reference/sumsheet/types-pivot/#contractpivotgetpivotdataview) \| null | no | | `detailSheetLineage` | [ContractPivotDetailLineageView](/reference/sumsheet/types-pivot/#contractpivotdetaillineageview) \| null | no | | `dirtyCellCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "pivot_grouping_drilldown", "subsetId": "", "requestId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## pivot\_layout\_format [Section titled “pivot\_layout\_format”](#pivot_layout_format) Pivot table appearance: layout, subtotals, repeated labels, formatting. **Request** | Field | TypeScript type | Req. | | ------------------ | --------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_layout_format"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | intent | [ContractPivotLayoutFormatAction](/reference/sumsheet/types-pivot/#contractpivotlayoutformataction) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · pivot\_layout\_format** | Field | TypeScript type | Req. | | --------------------- | -------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_layout_format"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | status | string | yes | | `didChange` | boolean | yes | | layouts | [ContractPivotLayoutFormatView](/reference/sumsheet/types-pivot/#contractpivotlayoutformatview)\[] | yes | | `refreshedPivotNames` | string\[] | yes | | `dirtyCellCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "pivot_layout_format", "subsetId": "", "requestId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## pivot\_move\_copy [Section titled “pivot\_move\_copy”](#pivot_move_copy) Moving and copying a pivot table. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_move_copy"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | intent | [ContractPivotMoveCopyAction](/reference/sumsheet/types-pivot/#contractpivotmovecopyaction) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · pivot\_move\_copy** | Field | TypeScript type | Req. | | ------------------- | ---------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_move_copy"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | status | string | yes | | `didChange` | boolean | yes | | pivots | [ContractPivotMoveCopyView](/reference/sumsheet/types-pivot/#contractpivotmovecopyview)\[] | yes | | `destinationSheets` | [ContractPivotMoveCopySheetView](/reference/sumsheet/types-pivot/#contractpivotmovecopysheetview)\[] | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "pivot_move_copy", "subsetId": "", "requestId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## pivot\_report\_filter\_pages [Section titled “pivot\_report\_filter\_pages”](#pivot_report_filter_pages) Expanding a report filter into separate sheets — one sheet per value. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_report_filter_pages"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | intent | [ContractPivotReportFilterPagesAction](/reference/sumsheet/types-pivot/#contractpivotreportfilterpagesaction) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · pivot\_report\_filter\_pages** | Field | TypeScript type | Req. | | --------------------- | ---------------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_report_filter_pages"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | status | string | yes | | `didChange` | boolean | yes | | reports | [ContractPivotReportFilterView](/reference/sumsheet/types-pivot/#contractpivotreportfilterview)\[] | yes | | `generatedPages` | [ContractPivotReportFilterPageView](/reference/sumsheet/types-pivot/#contractpivotreportfilterpageview)\[] | yes | | `refreshedPivotNames` | string\[] | yes | | `dirtyCellCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "pivot_report_filter_pages", "subsetId": "", "requestId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## pivot\_sort\_filter\_ranking [Section titled “pivot\_sort\_filter\_ranking”](#pivot_sort_filter_ranking) Sorting, filtering, and ranking in a pivot table. **Request** | Field | TypeScript type | Req. | | ------------------ | ----------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_sort_filter_ranking"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | intent | [ContractPivotSortFilterAction](/reference/sumsheet/types-pivot/#contractpivotsortfilteraction) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · pivot\_sort\_filter\_ranking** | Field | TypeScript type | Req. | | --------------------- | ---------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_sort_filter_ranking"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | status | string | yes | | `didChange` | boolean | yes | | fields | [ContractPivotSortFilterView](/reference/sumsheet/types-pivot/#contractpivotsortfilterview)\[] | yes | | `refreshedPivotNames` | string\[] | yes | | `dirtyCellCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "pivot_sort_filter_ranking", "subsetId": "", "requestId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## pivot\_value\_field\_settings [Section titled “pivot\_value\_field\_settings”](#pivot_value_field_settings) Value field settings: which summary to compute, and how to display it. **Request** | Field | TypeScript type | Req. | | ------------------ | --------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_value_field_settings"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | intent | [ContractPivotValueFieldSettingsAction](/reference/sumsheet/types-pivot/#contractpivotvaluefieldsettingsaction) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · pivot\_value\_field\_settings** | Field | TypeScript type | Req. | | --------------------- | -------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"pivot_value_field_settings"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | status | string | yes | | `didChange` | boolean | yes | | `valueFields` | [ContractPivotValueFieldSettingsView](/reference/sumsheet/types-pivot/#contractpivotvaluefieldsettingsview)\[] | yes | | `refreshedPivotNames` | string\[] | yes | | `dirtyCellCount` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "pivot_value_field_settings", "subsetId": "", "requestId": "", "intent": "", "requestedBackend": "native-desktop" } ``` # Power Query: connectors > Connecting to Postgres, SQL Server, OData, and web sources: testing the connection, previewing, and navigating objects. Operations on this page: 13. Connecting to Postgres, SQL Server, OData, and web sources: testing the connection, previewing, and navigating objects. Terms are in the [glossary](/start/glossary/). Session mode only The processor has no network of its own: the build has no TLS, and it can’t negotiate `https`. So anything that reaches outside works only when launched with the `--session` flag, where a host is on hand, ready to reach the network on the core’s behalf. In one-shot mode, live providers are deliberately not connected, and the operations refuse honestly instead of pretending there’s no connection: the codes `postgres-provider-unavailable` and `sqlserver-provider-unavailable`, and an `https` request gets `tls-error`. What’s needed from the host for this — the counter-lines with a `kind` field that it responds to — is described in [how the session works](/sumsheet/session/). **Operations on this page — 13** * [`evaluate_power_query_odata_feed_transform`](#evaluate_power_query_odata_feed_transform) * [`evaluate_power_query_postgres_transform`](#evaluate_power_query_postgres_transform) * [`evaluate_power_query_sqlserver_transform`](#evaluate_power_query_sqlserver_transform) * [`evaluate_power_query_transform`](#evaluate_power_query_transform) * [`evaluate_power_query_web_connector_transform`](#evaluate_power_query_web_connector_transform) * [`pq_postgres_cancel`](#pq_postgres_cancel) * [`pq_postgres_list_navigation`](#pq_postgres_list_navigation) * [`pq_postgres_preview`](#pq_postgres_preview) * [`pq_postgres_test_connection`](#pq_postgres_test_connection) * [`pq_sqlserver_cancel`](#pq_sqlserver_cancel) * [`pq_sqlserver_list_navigation`](#pq_sqlserver_list_navigation) * [`pq_sqlserver_preview`](#pq_sqlserver_preview) * [`pq_sqlserver_test_connection`](#pq_sqlserver_test_connection) ## evaluate\_power\_query\_odata\_feed\_transform [Section titled “evaluate\_power\_query\_odata\_feed\_transform”](#evaluate_power_query_odata_feed_transform) Evaluates a Power Query transform for an OData feed. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------------ | ---- | | operation | `"evaluate_power_query_odata_feed_transform"` | yes | | `mSource` | string | yes | | connector | [ApprovedODataFeedDescriptor](/reference/sumsheet/types-powerquery/#approvedodatafeeddescriptor) | no | | destination | [PowerQueryLoadDestination](/reference/sumsheet/types-powerquery/#powerqueryloaddestination) | no | | `refreshQueryId` | string | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · evaluate\_power\_query\_odata\_feed\_transform** | Field | TypeScript type | Req. | | ---------- | -------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"evaluate_power_query_odata_feed_transform"` | yes | | outcome | [ContractPowerQueryTransformOutcome](/reference/sumsheet/types-powerquery/#contractpowerquerytransformoutcome) | yes | | `loadPlan` | [PowerQueryLoadPlan](/reference/sumsheet/types-powerquery/#powerqueryloadplan) | no | **Minimal JSON template** ```json { "operation": "evaluate_power_query_odata_feed_transform", "mSource": "", "requestedBackend": "native-desktop" } ``` ## evaluate\_power\_query\_postgres\_transform [Section titled “evaluate\_power\_query\_postgres\_transform”](#evaluate_power_query_postgres_transform) Evaluates a Power Query transform for Postgres. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------------------- | ---- | | operation | `"evaluate_power_query_postgres_transform"` | yes | | descriptor | [PqPostgresDialogDescriptor](/reference/sumsheet/types-powerquery/#pqpostgresdialogdescriptor) | no | | table | [PqPostgresPreviewTableRef](/reference/sumsheet/types-powerquery/#pqpostgrespreviewtableref) | no | | `mSource` | string | no | | destination | [PowerQueryLoadDestination](/reference/sumsheet/types-powerquery/#powerqueryloaddestination) | no | | `refreshQueryId` | string | no | | `connectUser` | string | no | | `lanGrants` | [PqPostgresLanGrantWire](/reference/sumsheet/types-powerquery/#pqpostgreslangrantwire)\[] | no | | privacy | [PqPrivacyEvaluationInput](/reference/sumsheet/types-powerquery/#pqprivacyevaluationinput) | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · evaluate\_power\_query\_postgres\_transform** | Field | TypeScript type | Req. | | ---------- | -------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"evaluate_power_query_postgres_transform"` | yes | | outcome | [ContractPowerQueryTransformOutcome](/reference/sumsheet/types-powerquery/#contractpowerquerytransformoutcome) | yes | | `loadPlan` | [PowerQueryLoadPlan](/reference/sumsheet/types-powerquery/#powerqueryloadplan) | no | **Minimal JSON template** ```json { "operation": "evaluate_power_query_postgres_transform", "requestedBackend": "native-desktop" } ``` ## evaluate\_power\_query\_sqlserver\_transform [Section titled “evaluate\_power\_query\_sqlserver\_transform”](#evaluate_power_query_sqlserver_transform) Evaluates a Power Query transform for SQL Server. **Request** | Field | TypeScript type | Req. | | ------------------ | -------------------------------------------------------------------------------------------- | ---- | | operation | `"evaluate_power_query_sqlserver_transform"` | yes | | descriptor | [PqSqlServerDescriptor](/reference/sumsheet/types-powerquery/#pqsqlserverdescriptor) | no | | table | [PqSqlServerTableRef](/reference/sumsheet/types-powerquery/#pqsqlservertableref) | no | | destination | [PowerQueryLoadDestination](/reference/sumsheet/types-powerquery/#powerqueryloaddestination) | no | | `refreshQueryId` | string | no | | privacy | [PqPrivacyEvaluationInput](/reference/sumsheet/types-powerquery/#pqprivacyevaluationinput) | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · evaluate\_power\_query\_sqlserver\_transform** | Field | TypeScript type | Req. | | ---------- | -------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"evaluate_power_query_sqlserver_transform"` | yes | | outcome | [ContractPowerQueryTransformOutcome](/reference/sumsheet/types-powerquery/#contractpowerquerytransformoutcome) | yes | | `loadPlan` | [PowerQueryLoadPlan](/reference/sumsheet/types-powerquery/#powerqueryloadplan) | no | **Minimal JSON template** ```json { "operation": "evaluate_power_query_sqlserver_transform", "requestedBackend": "native-desktop" } ``` ## evaluate\_power\_query\_transform [Section titled “evaluate\_power\_query\_transform”](#evaluate_power_query_transform) Evaluates a Power Query transform. **Request** | Field | TypeScript type | Req. | Note from the contract | | ------------------------ | -------------------------------------------------------------------------------------------------------------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | operation | `"evaluate_power_query_transform"` | yes | | | `mSource` | string | yes | | | `sourceId` | string | yes | | | `sourceUri` | string | no | | | `sourceKind` | `"csv"` \| “workbook” \| “folder” \| “json” \| “xml” | no | For `csv` and `workbook`, this is informational — it’s already inferred from the query. For `folder`, it’s meaningful: it’s exactly what routes processing down the folder-combine path instead of the single-file one. | | `previewStep` | number | no | A preview of an intermediate step; works the same way as for the other Power Query sources. | | destination | [PowerQueryLoadDestination](/reference/sumsheet/types-powerquery/#powerqueryloaddestination) | no | An optional destination for the result. Without this field, it’s a plain preview with no plan. With it, it’s still a preview, but the response carries a verified load plan in `loadPlan`; the load itself doesn’t happen. | | `includeDependencyGraph` | boolean | no | | | `paramOptions` | [ContractPersistedParamOptionsBinding](/reference/sumsheet/types-common/#contractpersistedparamoptionsbinding) | no | | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | | **Response on success · evaluate\_power\_query\_transform** | Field | TypeScript type | Req. | Note from the contract | | ----------------- | -------------------------------------------------------------------------------------------------------------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | operation | `"evaluate_power_query_transform"` | yes | | | outcome | [ContractPowerQueryTransformOutcome](/reference/sumsheet/types-powerquery/#contractpowerquerytransformoutcome) | yes | | | `loadPlan` | [PowerQueryLoadPlan](/reference/sumsheet/types-powerquery/#powerqueryloadplan) | no | Present in the response only if the request included a load destination and the computation succeeded. Absent for a plain preview and on a refusal. No data is written anywhere in this case. | | recomputed | boolean | no | | | `dependencyGraph` | [ContractDependencyGraphSnapshot](/reference/sumsheet/types-formulas/#contractdependencygraphsnapshot) \| null | no | | **Minimal JSON template** ```json { "operation": "evaluate_power_query_transform", "mSource": "", "sourceId": "", "requestedBackend": "native-desktop" } ``` ## evaluate\_power\_query\_web\_connector\_transform [Section titled “evaluate\_power\_query\_web\_connector\_transform”](#evaluate_power_query_web_connector_transform) Evaluates a Power Query transform for a web connector. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------------------ | ---- | | operation | `"evaluate_power_query_web_connector_transform"` | yes | | `mSource` | string | yes | | connector | [ApprovedWebConnectorDescriptor](/reference/sumsheet/types-powerquery/#approvedwebconnectordescriptor) | no | | destination | [PowerQueryLoadDestination](/reference/sumsheet/types-powerquery/#powerqueryloaddestination) | no | | `refreshQueryId` | string | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · evaluate\_power\_query\_web\_connector\_transform** | Field | TypeScript type | Req. | | ---------- | -------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"evaluate_power_query_web_connector_transform"` | yes | | outcome | [ContractPowerQueryTransformOutcome](/reference/sumsheet/types-powerquery/#contractpowerquerytransformoutcome) | yes | | `loadPlan` | [PowerQueryLoadPlan](/reference/sumsheet/types-powerquery/#powerqueryloadplan) | no | **Minimal JSON template** ```json { "operation": "evaluate_power_query_web_connector_transform", "mSource": "", "requestedBackend": "native-desktop" } ``` ## pq\_postgres\_cancel [Section titled “pq\_postgres\_cancel”](#pq_postgres_cancel) Cancels a Postgres request that’s already in progress. **Request** | Field | TypeScript type | Req. | | ---------- | ---------------------------------------------------------------------------------------------- | ---- | | operation | `"pq_postgres_cancel"` | yes | | descriptor | [PqPostgresDialogDescriptor](/reference/sumsheet/types-powerquery/#pqpostgresdialogdescriptor) | no | **Response on success · pq\_postgres\_cancel** | Field | TypeScript type | Req. | | ------------ | ---------------------- | ---- | | operation | `"pq_postgres_cancel"` | yes | | acknowledged | boolean | yes | **Minimal JSON template** ```json { "operation": "pq_postgres_cancel", "requestedBackend": "native-desktop" } ``` ## pq\_postgres\_list\_navigation [Section titled “pq\_postgres\_list\_navigation”](#pq_postgres_list_navigation) Lists what’s in Postgres: without a schema specified, the schemas themselves; with one, its tables and views. **Request** | Field | TypeScript type | Req. | Note from the contract | | ------------- | ---------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------------------------------------------------------- | | operation | `"pq_postgres_list_navigation"` | yes | | | descriptor | [PqPostgresDialogDescriptor](/reference/sumsheet/types-powerquery/#pqpostgresdialogdescriptor) | yes | | | schema | string | no | Without this field, the root schemas are returned; with it, the tables and views of the given schema. | | `connectUser` | string | no | | | `lanGrants` | [PqPostgresLanGrantWire](/reference/sumsheet/types-powerquery/#pqpostgreslangrantwire)\[] | no | | | privacy | [PqPrivacyEvaluationInput](/reference/sumsheet/types-powerquery/#pqprivacyevaluationinput) | no | | **Response on success · pq\_postgres\_list\_navigation** | Field | TypeScript type | Req. | Note from the contract | | --------- | --------------------------------------------------------------------------------------------------------- | ---- | ------------------------------------------------------------- | | operation | `"pq_postgres_list_navigation"` | yes | | | schemas | [PqPostgresNavigationSchemaWire](/reference/sumsheet/types-powerquery/#pqpostgresnavigationschemawire)\[] | no | Present in the response to a root-schema request. | | tables | [PqPostgresNavTableWire](/reference/sumsheet/types-powerquery/#pqpostgresnavtablewire)\[] | no | Present in the response to a request for one schema’s tables. | | denied | [PqPostgresDeniedWire](/reference/sumsheet/types-powerquery/#pqpostgresdeniedwire) | no | | **Minimal JSON template** ```json { "operation": "pq_postgres_list_navigation", "descriptor": "", "requestedBackend": "native-desktop" } ``` ## pq\_postgres\_preview [Section titled “pq\_postgres\_preview”](#pq_postgres_preview) A preview of data from Postgres — the first rows, to see its shape. **Request** | Field | TypeScript type | Req. | | ------------- | ---------------------------------------------------------------------------------------------- | ---- | | operation | `"pq_postgres_preview"` | yes | | descriptor | [PqPostgresDialogDescriptor](/reference/sumsheet/types-powerquery/#pqpostgresdialogdescriptor) | yes | | table | [PqPostgresPreviewTableRef](/reference/sumsheet/types-powerquery/#pqpostgrespreviewtableref) | yes | | `maxRows` | number | no | | `connectUser` | string | no | | `lanGrants` | [PqPostgresLanGrantWire](/reference/sumsheet/types-powerquery/#pqpostgreslangrantwire)\[] | no | | privacy | [PqPrivacyEvaluationInput](/reference/sumsheet/types-powerquery/#pqprivacyevaluationinput) | no | **Response on success · pq\_postgres\_preview** | Field | TypeScript type | Req. | Note from the contract | | --------- | ---------------------------------------------------------------------------------- | ---- | -------------------------------------------------------------------------------------- | | operation | `"pq_postgres_preview"` | yes | | | columns | string\[] | no | | | rows | string\[]\[] | no | Display-projected rows (each cell a string); bounded ≤ min(maxRows, descriptor bound). | | truncated | boolean | yes | | | denied | [PqPostgresDeniedWire](/reference/sumsheet/types-powerquery/#pqpostgresdeniedwire) | no | | **Minimal JSON template** ```json { "operation": "pq_postgres_preview", "descriptor": "", "table": "", "requestedBackend": "native-desktop" } ``` ## pq\_postgres\_test\_connection [Section titled “pq\_postgres\_test\_connection”](#pq_postgres_test_connection) Tests the connection to Postgres for a given connection, without reading any data. **Request** | Field | TypeScript type | Req. | | ------------- | ---------------------------------------------------------------------------------------------- | ---- | | operation | `"pq_postgres_test_connection"` | yes | | descriptor | [PqPostgresDialogDescriptor](/reference/sumsheet/types-powerquery/#pqpostgresdialogdescriptor) | yes | | `connectUser` | string | no | | `lanGrants` | [PqPostgresLanGrantWire](/reference/sumsheet/types-powerquery/#pqpostgreslangrantwire)\[] | no | | privacy | [PqPrivacyEvaluationInput](/reference/sumsheet/types-powerquery/#pqprivacyevaluationinput) | no | **Response on success · pq\_postgres\_test\_connection** | Field | TypeScript type | Req. | | --------------- | ---------------------------------------------------------------------------------- | ---- | | operation | `"pq_postgres_test_connection"` | yes | | `serverVersion` | string | no | | denied | [PqPostgresDeniedWire](/reference/sumsheet/types-powerquery/#pqpostgresdeniedwire) | no | **Minimal JSON template** ```json { "operation": "pq_postgres_test_connection", "descriptor": "", "requestedBackend": "native-desktop" } ``` ## pq\_sqlserver\_cancel [Section titled “pq\_sqlserver\_cancel”](#pq_sqlserver_cancel) Cancels a SQL Server request that’s already in progress. **Request** | Field | TypeScript type | Req. | | --------- | ----------------------- | ---- | | operation | `"pq_sqlserver_cancel"` | yes | **Response on success · pq\_sqlserver\_cancel** | Field | TypeScript type | Req. | | ------------ | ----------------------- | ---- | | operation | `"pq_sqlserver_cancel"` | yes | | acknowledged | boolean | yes | **Minimal JSON template** ```json { "operation": "pq_sqlserver_cancel", "requestedBackend": "native-desktop" } ``` ## pq\_sqlserver\_list\_navigation [Section titled “pq\_sqlserver\_list\_navigation”](#pq_sqlserver_list_navigation) Lists what’s in SQL Server: without a schema specified, the schemas themselves; with one, its tables and views. **Request** | Field | TypeScript type | Req. | | ---------- | ------------------------------------------------------------------------------------------ | ---- | | operation | `"pq_sqlserver_list_navigation"` | yes | | descriptor | [PqSqlServerDescriptor](/reference/sumsheet/types-powerquery/#pqsqlserverdescriptor) | yes | | privacy | [PqPrivacyEvaluationInput](/reference/sumsheet/types-powerquery/#pqprivacyevaluationinput) | no | **Response on success · pq\_sqlserver\_list\_navigation** | Field | TypeScript type | Req. | | --------- | ------------------------------------------------------------------------------------------------------- | ---- | | operation | `"pq_sqlserver_list_navigation"` | yes | | items | [PqSqlServerNavigationItemWire](/reference/sumsheet/types-powerquery/#pqsqlservernavigationitemwire)\[] | no | | denied | [PqSqlServerDeniedWire](/reference/sumsheet/types-powerquery/#pqsqlserverdeniedwire) | no | **Minimal JSON template** ```json { "operation": "pq_sqlserver_list_navigation", "descriptor": "", "requestedBackend": "native-desktop" } ``` ## pq\_sqlserver\_preview [Section titled “pq\_sqlserver\_preview”](#pq_sqlserver_preview) A preview of data from SQL Server — the first rows, to see its shape. **Request** | Field | TypeScript type | Req. | | ---------- | ------------------------------------------------------------------------------------------ | ---- | | operation | `"pq_sqlserver_preview"` | yes | | descriptor | [PqSqlServerDescriptor](/reference/sumsheet/types-powerquery/#pqsqlserverdescriptor) | yes | | table | [PqSqlServerTableRef](/reference/sumsheet/types-powerquery/#pqsqlservertableref) | yes | | `maxRows` | number | no | | privacy | [PqPrivacyEvaluationInput](/reference/sumsheet/types-powerquery/#pqprivacyevaluationinput) | no | **Response on success · pq\_sqlserver\_preview** | Field | TypeScript type | Req. | | --------- | ------------------------------------------------------------------------------------ | ---- | | operation | `"pq_sqlserver_preview"` | yes | | columns | string\[] | no | | rows | string\[]\[] | no | | truncated | boolean | yes | | denied | [PqSqlServerDeniedWire](/reference/sumsheet/types-powerquery/#pqsqlserverdeniedwire) | no | **Minimal JSON template** ```json { "operation": "pq_sqlserver_preview", "descriptor": "", "table": "", "requestedBackend": "native-desktop" } ``` ## pq\_sqlserver\_test\_connection [Section titled “pq\_sqlserver\_test\_connection”](#pq_sqlserver_test_connection) Tests the connection to SQL Server for a given connection, without reading any data. **Request** | Field | TypeScript type | Req. | | ---------- | ------------------------------------------------------------------------------------------ | ---- | | operation | `"pq_sqlserver_test_connection"` | yes | | descriptor | [PqSqlServerDescriptor](/reference/sumsheet/types-powerquery/#pqsqlserverdescriptor) | yes | | privacy | [PqPrivacyEvaluationInput](/reference/sumsheet/types-powerquery/#pqprivacyevaluationinput) | no | **Response on success · pq\_sqlserver\_test\_connection** | Field | TypeScript type | Req. | | --------------- | ------------------------------------------------------------------------------------ | ---- | | operation | `"pq_sqlserver_test_connection"` | yes | | `serverVersion` | string | no | | denied | [PqSqlServerDeniedWire](/reference/sumsheet/types-powerquery/#pqsqlserverdeniedwire) | no | **Minimal JSON template** ```json { "operation": "pq_sqlserver_test_connection", "descriptor": "", "requestedBackend": "native-desktop" } ``` # Power Query: execution and progress > The query graph, refreshing, cancellation, and monitoring long-running operations. Operations on this page: 9. The query graph, refreshing, cancellation, and monitoring long-running operations. Terms are in the [glossary](/start/glossary/). **Operations on this page — 9** * [`pq-query-graph-cancel`](#pq-query-graph-cancel) * [`pq-query-graph-explain`](#pq-query-graph-explain) * [`pq-query-graph-refresh`](#pq-query-graph-refresh) * [`pq-query-graph-snapshot`](#pq-query-graph-snapshot) * [`pq-scale-progress-cancel`](#pq-scale-progress-cancel) * [`pq-scale-progress-close`](#pq-scale-progress-close) * [`pq-scale-progress-open`](#pq-scale-progress-open) * [`pq-scale-progress-pull`](#pq-scale-progress-pull) * [`pq-scale-progress-snapshot`](#pq-scale-progress-snapshot) ## pq-query-graph-cancel [Section titled “pq-query-graph-cancel”](#pq-query-graph-cancel) Cancels a query-graph analysis that’s already started. **Request** | Field | TypeScript type | Req. | | ----------- | ------------------------- | ---- | | operation | `"pq-query-graph-cancel"` | yes | | generation | number | yes | | `subset_id` | string | no | **Response on success · pq-query-graph-cancel** | Field | TypeScript type | Req. | | --------- | ---------------------------------------------------------------------------------------------- | ---- | | operation | `"pq-query-graph-cancel"` | yes | | outcome | [PqQueryGraphRefreshOutcome](/reference/sumsheet/types-powerquery/#pqquerygraphrefreshoutcome) | yes | **Minimal JSON template** ```json { "operation": "pq-query-graph-cancel", "generation": 0, "requestedBackend": "native-desktop" } ``` ## pq-query-graph-explain [Section titled “pq-query-graph-explain”](#pq-query-graph-explain) Explains why the graph looks the way it does: where a query’s dependency comes from. **Request** | Field | TypeScript type | Req. | | ----------------- | -------------------------- | ---- | | operation | `"pq-query-graph-explain"` | yes | | `query_stable_id` | string | yes | | `subset_id` | string | no | **Response on success · pq-query-graph-explain** | Field | TypeScript type | Req. | | --------- | -------------------------------------------------------------------------------- | ---- | | operation | `"pq-query-graph-explain"` | yes | | explain | [PqQueryGraphExplain](/reference/sumsheet/types-powerquery/#pqquerygraphexplain) | yes | **Minimal JSON template** ```json { "operation": "pq-query-graph-explain", "query_stable_id": "", "requestedBackend": "native-desktop" } ``` ## pq-query-graph-refresh [Section titled “pq-query-graph-refresh”](#pq-query-graph-refresh) Refreshes the query graph after an edit. **Request** | Field | TypeScript type | Req. | | ------------------- | ---------------------------------------------------------------- | ---- | | operation | `"pq-query-graph-refresh"` | yes | | scope | `"current"` \| “all” \| string | yes | | `query_stable_id` | string | no | | `subset_id` | string | no | | `user_store_levels` | { canonicalScope: string; level: string; invalid?: boolean; }\[] | no | **Response on success · pq-query-graph-refresh** | Field | TypeScript type | Req. | | ------------ | --------------------------------------------------------------------------------------------------- | ---- | | operation | `"pq-query-graph-refresh"` | yes | | outcome | [PqQueryGraphRefreshOutcome](/reference/sumsheet/types-powerquery/#pqquerygraphrefreshoutcome) | yes | | committed | boolean | yes | | publications | [PqQueryGraphNodePublication](/reference/sumsheet/types-powerquery/#pqquerygraphnodepublication)\[] | no | **Minimal JSON template** ```json { "operation": "pq-query-graph-refresh", "scope": "current", "requestedBackend": "native-desktop" } ``` ## pq-query-graph-snapshot [Section titled “pq-query-graph-snapshot”](#pq-query-graph-snapshot) A snapshot of the query graph: which queries exist and how they depend on each other. **Request** | Field | TypeScript type | Req. | | ----------- | --------------------------- | ---- | | operation | `"pq-query-graph-snapshot"` | yes | | `subset_id` | string | no | **Response on success · pq-query-graph-snapshot** | Field | TypeScript type | Req. | | --------- | ---------------------------------------------------------------------------------- | ---- | | operation | `"pq-query-graph-snapshot"` | yes | | snapshot | [PqQueryGraphSnapshot](/reference/sumsheet/types-powerquery/#pqquerygraphsnapshot) | yes | **Minimal JSON template** ```json { "operation": "pq-query-graph-snapshot", "requestedBackend": "native-desktop" } ``` ## pq-scale-progress-cancel [Section titled “pq-scale-progress-cancel”](#pq-scale-progress-cancel) Stops a refresh that’s in progress. **Request** | Field | TypeScript type | Req. | | ------------ | ---------------------------- | ---- | | operation | `"pq-scale-progress-cancel"` | yes | | `session_id` | string | yes | **Response on success · pq-scale-progress-cancel** | Field | TypeScript type | Req. | | --------- | -------------------------------------------------------------------------------------------------- | ---- | | operation | `"pq-scale-progress-cancel"` | yes | | outcome | [PqScaleProgressCancelPayload](/reference/sumsheet/types-powerquery/#pqscaleprogresscancelpayload) | no | | denied | [PqScaleDenied](/reference/sumsheet/types-powerquery/#pqscaledenied) | no | **Minimal JSON template** ```json { "operation": "pq-scale-progress-cancel", "session_id": "", "requestedBackend": "native-desktop" } ``` ## pq-scale-progress-close [Section titled “pq-scale-progress-close”](#pq-scale-progress-close) Closes progress monitoring. **Request** | Field | TypeScript type | Req. | | ------------ | --------------------------- | ---- | | operation | `"pq-scale-progress-close"` | yes | | `session_id` | string | yes | **Response on success · pq-scale-progress-close** | Field | TypeScript type | Req. | | --------- | --------------------------- | ---- | | operation | `"pq-scale-progress-close"` | yes | | closed | boolean | yes | **Minimal JSON template** ```json { "operation": "pq-scale-progress-close", "session_id": "", "requestedBackend": "native-desktop" } ``` ## pq-scale-progress-open [Section titled “pq-scale-progress-open”](#pq-scale-progress-open) Opens progress monitoring for a long Power Query refresh. **Request** | Field | TypeScript type | Req. | | ---------------- | -------------------------- | ---- | | operation | `"pq-scale-progress-open"` | yes | | `rows_requested` | number | no | | `max_batch_rows` | number | no | **Response on success · pq-scale-progress-open** | Field | TypeScript type | Req. | | --------- | ---------------------------------------------------------------------------------------------- | ---- | | operation | `"pq-scale-progress-open"` | yes | | session | [PqScaleProgressOpenPayload](/reference/sumsheet/types-powerquery/#pqscaleprogressopenpayload) | yes | | denied | [PqScaleDenied](/reference/sumsheet/types-powerquery/#pqscaledenied) | no | **Minimal JSON template** ```json { "operation": "pq-scale-progress-open", "requestedBackend": "native-desktop" } ``` ## pq-scale-progress-pull [Section titled “pq-scale-progress-pull”](#pq-scale-progress-pull) Retrieves the progress information collected so far. **Request** | Field | TypeScript type | Req. | | ------------ | -------------------------- | ---- | | operation | `"pq-scale-progress-pull"` | yes | | `session_id` | string | yes | **Response on success · pq-scale-progress-pull** | Field | TypeScript type | Req. | | --------- | ---------------------------------------------------------------------------------------------- | ---- | | operation | `"pq-scale-progress-pull"` | yes | | progress | [PqScaleProgressPullPayload](/reference/sumsheet/types-powerquery/#pqscaleprogresspullpayload) | no | | denied | [PqScaleDenied](/reference/sumsheet/types-powerquery/#pqscaledenied) | no | **Minimal JSON template** ```json { "operation": "pq-scale-progress-pull", "session_id": "", "requestedBackend": "native-desktop" } ``` ## pq-scale-progress-snapshot [Section titled “pq-scale-progress-snapshot”](#pq-scale-progress-snapshot) A snapshot of progress at the current moment. **Request** | Field | TypeScript type | Req. | | ------------ | ------------------------------ | ---- | | operation | `"pq-scale-progress-snapshot"` | yes | | `session_id` | string | yes | **Response on success · pq-scale-progress-snapshot** | Field | TypeScript type | Req. | | --------- | ------------------------------------------------------------------------------------------------------ | ---- | | operation | `"pq-scale-progress-snapshot"` | yes | | snapshot | [PqScaleProgressSnapshotPayload](/reference/sumsheet/types-powerquery/#pqscaleprogresssnapshotpayload) | no | | denied | [PqScaleDenied](/reference/sumsheet/types-powerquery/#pqscaledenied) | no | **Minimal JSON template** ```json { "operation": "pq-scale-progress-snapshot", "session_id": "", "requestedBackend": "native-desktop" } ``` # Power Query: M expressions > Evaluating and inspecting M expressions, including with external sources. Operations on this page: 9. Evaluating and inspecting M expressions, including with external sources. Terms are in the [glossary](/start/glossary/). Outside sources — session mode only Parsing and evaluating an expression always work. But operations that pull data from outside — OData, a web source, a web connector, Postgres — require launching with the `--session` flag: the processor has no network of its own, and reaches out to the host for it. In one-shot mode they refuse honestly — [more detail](/reference/sumsheet/pq-connectors/). **Operations on this page — 9** * [`evaluate_m_expression`](#evaluate_m_expression) * [`evaluate_m_expression_with_odata_feed`](#evaluate_m_expression_with_odata_feed) * [`evaluate_m_expression_with_sources`](#evaluate_m_expression_with_sources) * [`evaluate_m_expression_with_web_connector`](#evaluate_m_expression_with_web_connector) * [`evaluate_m_expression_with_web_source`](#evaluate_m_expression_with_web_source) * [`inspect_m_expression`](#inspect_m_expression) * [`inspect_m_expression_with_odata_feed`](#inspect_m_expression_with_odata_feed) * [`inspect_m_expression_with_postgres`](#inspect_m_expression_with_postgres) * [`inspect_m_expression_with_sources`](#inspect_m_expression_with_sources) ## evaluate\_m\_expression [Section titled “evaluate\_m\_expression”](#evaluate_m_expression) Evaluates an M expression. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"evaluate_m_expression"` | yes | | `mText` | string | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · evaluate\_m\_expression** | Field | TypeScript type | Req. | | --------- | -------------------------------------------------------------------------- | ---- | | operation | `"evaluate_m_expression"` | yes | | outcome | [MExpressionOutcome](/reference/sumsheet/types-common/#mexpressionoutcome) | yes | **Minimal JSON template** ```json { "operation": "evaluate_m_expression", "mText": "", "requestedBackend": "native-desktop" } ``` ## evaluate\_m\_expression\_with\_odata\_feed [Section titled “evaluate\_m\_expression\_with\_odata\_feed”](#evaluate_m_expression_with_odata_feed) Evaluates an M expression with an OData feed. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------------ | ---- | | operation | `"evaluate_m_expression_with_odata_feed"` | yes | | `mText` | string | yes | | connector | [ApprovedODataFeedDescriptor](/reference/sumsheet/types-powerquery/#approvedodatafeeddescriptor) | no | | privacy | [PqPrivacyEvaluationInput](/reference/sumsheet/types-powerquery/#pqprivacyevaluationinput) | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · evaluate\_m\_expression\_with\_odata\_feed** | Field | TypeScript type | Req. | | --------- | -------------------------------------------------------------------------- | ---- | | operation | `"evaluate_m_expression_with_odata_feed"` | yes | | outcome | [MExpressionOutcome](/reference/sumsheet/types-common/#mexpressionoutcome) | yes | **Minimal JSON template** ```json { "operation": "evaluate_m_expression_with_odata_feed", "mText": "", "requestedBackend": "native-desktop" } ``` ## evaluate\_m\_expression\_with\_sources [Section titled “evaluate\_m\_expression\_with\_sources”](#evaluate_m_expression_with_sources) Evaluates an M expression with sources. **Request** | Field | TypeScript type | Req. | | ------------------ | --------------------------------------------------------------------------------------------- | ---- | | operation | `"evaluate_m_expression_with_sources"` | yes | | `mText` | string | yes | | sources | [ApprovedSourceDescriptor](/reference/sumsheet/types-powerquery/#approvedsourcedescriptor)\[] | yes | | privacy | [PqPrivacyEvaluationInput](/reference/sumsheet/types-powerquery/#pqprivacyevaluationinput) | no | | `foldMode` | `"folding-on"` \| “force-local” | no | | `userStoreLevels` | [PqPrivacyLevelAssignment](/reference/sumsheet/types-powerquery/#pqprivacylevelassignment)\[] | no | | `subsetId` | string | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · evaluate\_m\_expression\_with\_sources** | Field | TypeScript type | Req. | | --------- | -------------------------------------------------------------------------- | ---- | | operation | `"evaluate_m_expression_with_sources"` | yes | | outcome | [MExpressionOutcome](/reference/sumsheet/types-common/#mexpressionoutcome) | yes | **Minimal JSON template** ```json { "operation": "evaluate_m_expression_with_sources", "mText": "", "sources": [], "requestedBackend": "native-desktop" } ``` ## evaluate\_m\_expression\_with\_web\_connector [Section titled “evaluate\_m\_expression\_with\_web\_connector”](#evaluate_m_expression_with_web_connector) Evaluates an M expression with a web connector. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------------------ | ---- | | operation | `"evaluate_m_expression_with_web_connector"` | yes | | `mText` | string | yes | | connector | [ApprovedWebConnectorDescriptor](/reference/sumsheet/types-powerquery/#approvedwebconnectordescriptor) | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · evaluate\_m\_expression\_with\_web\_connector** | Field | TypeScript type | Req. | | --------- | -------------------------------------------------------------------------- | ---- | | operation | `"evaluate_m_expression_with_web_connector"` | yes | | outcome | [MExpressionOutcome](/reference/sumsheet/types-common/#mexpressionoutcome) | yes | **Minimal JSON template** ```json { "operation": "evaluate_m_expression_with_web_connector", "mText": "", "requestedBackend": "native-desktop" } ``` ## evaluate\_m\_expression\_with\_web\_source [Section titled “evaluate\_m\_expression\_with\_web\_source”](#evaluate_m_expression_with_web_source) Evaluates an M expression with a web source. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------------ | ---- | | operation | `"evaluate_m_expression_with_web_source"` | yes | | `mText` | string | yes | | source | [ApprovedWebSourceDescriptor](/reference/sumsheet/types-powerquery/#approvedwebsourcedescriptor) | no | | privacy | [PqPrivacyEvaluationInput](/reference/sumsheet/types-powerquery/#pqprivacyevaluationinput) | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · evaluate\_m\_expression\_with\_web\_source** | Field | TypeScript type | Req. | | --------- | -------------------------------------------------------------------------- | ---- | | operation | `"evaluate_m_expression_with_web_source"` | yes | | outcome | [MExpressionOutcome](/reference/sumsheet/types-common/#mexpressionoutcome) | yes | **Minimal JSON template** ```json { "operation": "evaluate_m_expression_with_web_source", "mText": "", "requestedBackend": "native-desktop" } ``` ## inspect\_m\_expression [Section titled “inspect\_m\_expression”](#inspect_m_expression) Inspects an M expression. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"inspect_m_expression"` | yes | | `mText` | string | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · inspect\_m\_expression** | Field | TypeScript type | Req. | | --------- | ------------------------------------------------------------------------------------------------ | ---- | | operation | `"inspect_m_expression"` | yes | | snapshot | [PowerQueryInspectorSnapshot](/reference/sumsheet/types-powerquery/#powerqueryinspectorsnapshot) | yes | **Minimal JSON template** ```json { "operation": "inspect_m_expression", "mText": "", "requestedBackend": "native-desktop" } ``` ## inspect\_m\_expression\_with\_odata\_feed [Section titled “inspect\_m\_expression\_with\_odata\_feed”](#inspect_m_expression_with_odata_feed) Inspects an M expression with an OData feed. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------------ | ---- | | operation | `"inspect_m_expression_with_odata_feed"` | yes | | `mText` | string | yes | | connector | [ApprovedODataFeedDescriptor](/reference/sumsheet/types-powerquery/#approvedodatafeeddescriptor) | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · inspect\_m\_expression\_with\_odata\_feed** | Field | TypeScript type | Req. | | --------- | ------------------------------------------------------------------------------------------------ | ---- | | operation | `"inspect_m_expression_with_odata_feed"` | yes | | snapshot | [PowerQueryInspectorSnapshot](/reference/sumsheet/types-powerquery/#powerqueryinspectorsnapshot) | yes | **Minimal JSON template** ```json { "operation": "inspect_m_expression_with_odata_feed", "mText": "", "requestedBackend": "native-desktop" } ``` ## inspect\_m\_expression\_with\_postgres [Section titled “inspect\_m\_expression\_with\_postgres”](#inspect_m_expression_with_postgres) Inspects an M expression with Postgres. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------------------- | ---- | | operation | `"inspect_m_expression_with_postgres"` | yes | | `mText` | string | yes | | descriptor | [PqPostgresDialogDescriptor](/reference/sumsheet/types-powerquery/#pqpostgresdialogdescriptor) | no | | schema | string | no | | item | string | no | | `connectUser` | string | no | | `lanGrants` | [PqPostgresLanGrantWire](/reference/sumsheet/types-powerquery/#pqpostgreslangrantwire)\[] | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · inspect\_m\_expression\_with\_postgres** | Field | TypeScript type | Req. | | --------- | ------------------------------------------------------------------------------------------------ | ---- | | operation | `"inspect_m_expression_with_postgres"` | yes | | snapshot | [PowerQueryInspectorSnapshot](/reference/sumsheet/types-powerquery/#powerqueryinspectorsnapshot) | yes | **Minimal JSON template** ```json { "operation": "inspect_m_expression_with_postgres", "mText": "", "requestedBackend": "native-desktop" } ``` ## inspect\_m\_expression\_with\_sources [Section titled “inspect\_m\_expression\_with\_sources”](#inspect_m_expression_with_sources) Inspects an M expression with sources. **Request** | Field | TypeScript type | Req. | | ------------------ | --------------------------------------------------------------------------------------------- | ---- | | operation | `"inspect_m_expression_with_sources"` | yes | | `mText` | string | yes | | sources | [ApprovedSourceDescriptor](/reference/sumsheet/types-powerquery/#approvedsourcedescriptor)\[] | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · inspect\_m\_expression\_with\_sources** | Field | TypeScript type | Req. | | --------- | ------------------------------------------------------------------------------------------------ | ---- | | operation | `"inspect_m_expression_with_sources"` | yes | | snapshot | [PowerQueryInspectorSnapshot](/reference/sumsheet/types-powerquery/#powerqueryinspectorsnapshot) | yes | **Minimal JSON template** ```json { "operation": "inspect_m_expression_with_sources", "mText": "", "sources": [], "requestedBackend": "native-desktop" } ``` # Power Query: external mashups > Reading, writing, and refreshing Power Query query sets assembled outside the product. Operations on this page: 3. Reading, writing, and refreshing Power Query query sets assembled outside the product. Terms are in the [glossary](/start/glossary/). **Operations on this page — 3** * [`read_foreign_mashup`](#read_foreign_mashup) * [`refresh_foreign_mashup_query`](#refresh_foreign_mashup_query) * [`write_foreign_mashup`](#write_foreign_mashup) ## read\_foreign\_mashup [Section titled “read\_foreign\_mashup”](#read_foreign_mashup) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ---------- | ----------------------- | ---- | | operation | “read\_foreign\_mashup” | yes | | `subsetId` | string | yes | **Response on success · read\_foreign\_mashup** | Field | TypeScript type | Req. | | ---------- | -------------------------------------------------------------------------------------------------------- | ---- | | operation | “read\_foreign\_mashup” | yes | | projection | [ContractForeignMashupProjection](/reference/sumsheet/types-powerquery/#contractforeignmashupprojection) | yes | **Minimal JSON template** ```json { "operation": "read_foreign_mashup", "subsetId": "" } ``` ## refresh\_foreign\_mashup\_query [Section titled “refresh\_foreign\_mashup\_query”](#refresh_foreign_mashup_query) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | What it is | | ------------------ | --------------------------------- | ---- | ------------------------------------------------------------------------------------------- | | operation | “refresh\_foreign\_mashup\_query” | yes | | | `expectedRevision` | number | yes | | | `subsetId` | string | yes | | | `queryIdentity` | string | yes | | | generation | number | yes | The caller’s generation, returned unchanged: a stale response is dropped deterministically. | | cancel | boolean | no | Cancellation only advances the generation fence — it computes and changes nothing. | **Response on success · refresh\_foreign\_mashup\_query** | Field | TypeScript type | Req. | | --------- | -------------------------------------------------------------------------------------------------------------- | ---- | | operation | “refresh\_foreign\_mashup\_query” | yes | | outcome | [ContractForeignMashupRefreshResult](/reference/sumsheet/types-powerquery/#contractforeignmashuprefreshresult) | yes | **Minimal JSON template** ```json { "operation": "refresh_foreign_mashup_query", "expectedRevision": 0, "subsetId": "", "queryIdentity": "", "generation": 0 } ``` ## write\_foreign\_mashup [Section titled “write\_foreign\_mashup”](#write_foreign_mashup) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------- | ---- | | operation | “write\_foreign\_mashup” | yes | | `expectedRevision` | number | yes | | `subsetId` | string | yes | | `readOnly` | boolean | no | | edits | [ContractMashupWriteEdit](/reference/sumsheet/types-powerquery/#contractmashupwriteedit)\[] | yes | **Response on success · write\_foreign\_mashup** | Field | TypeScript type | Req. | | --------- | -------------------------------------------------------------------------------------------- | ---- | | operation | “write\_foreign\_mashup” | yes | | outcome | [ContractMashupWriteResult](/reference/sumsheet/types-powerquery/#contractmashupwriteresult) | yes | **Minimal JSON template** ```json { "operation": "write_foreign_mashup", "expectedRevision": 0, "subsetId": "", "edits": [] } ``` # Power Query: queries and steps > Query lifecycle, applied steps, parameters, and folder navigation. Operations on this page: 13. Query lifecycle, applied steps, parameters, and folder navigation. Terms are in the [glossary](/start/glossary/). **Operations on this page — 13** * [`commit_applied_step_edit`](#commit_applied_step_edit) * [`commit_power_query_load`](#commit_power_query_load) * [`delete_power_query`](#delete_power_query) * [`duplicate_power_query`](#duplicate_power_query) * [`list_power_query_definitions`](#list_power_query_definitions) * [`mutate_applied_step`](#mutate_applied_step) * [`power_query_folder_navigator`](#power_query_folder_navigator) * [`power_query_parameter_manager`](#power_query_parameter_manager) * [`profile_applied_step_columns`](#profile_applied_step_columns) * [`project_applied_steps`](#project_applied_steps) * [`reference_power_query`](#reference_power_query) * [`rename_power_query`](#rename_power_query) * [`save_power_query_definition`](#save_power_query_definition) ## commit\_applied\_step\_edit [Section titled “commit\_applied\_step\_edit”](#commit_applied_step_edit) Commits an edit to a query step. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"commit_applied_step_edit"` | yes | | `mText` | string | yes | | `queryStableId` | string | no | | `stepId` | string | yes | | `canonicalM` | string | yes | | `editorSessionId` | string | no | | generation | number | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · commit\_applied\_step\_edit** | Field | TypeScript type | Req. | | --------- | -------------------------------------------------------------------------- | ---- | | operation | `"commit_applied_step_edit"` | yes | | result | [StepMutationResult](/reference/sumsheet/types-common/#stepmutationresult) | yes | **Minimal JSON template** ```json { "operation": "commit_applied_step_edit", "mText": "", "stepId": "", "canonicalM": "", "requestedBackend": "native-desktop" } ``` ## commit\_power\_query\_load [Section titled “commit\_power\_query\_load”](#commit_power_query_load) Commits a Power Query load. **Request** | Field | TypeScript type | Req. | Note from the contract | | ------------------ | ---------------------------------------------------------------------------------- | ---- | ----------------------------------------------------------------------------- | | operation | `"commit_power_query_load"` | yes | | | `subsetId` | string | yes | | | `loadPlan` | [PowerQueryLoadPlan](/reference/sumsheet/types-powerquery/#powerqueryloadplan) | yes | | | query | unknown | yes | Opaque, secret-free Rust-owned persisted query record returned by evaluation. | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | | **Response on success · commit\_power\_query\_load** | Field | TypeScript type | Req. | Note from the contract | | ------------------ | -------------------------------------------------------------------------- | ---- | --------------------------------------------------------------------------------------------------------- | | operation | `"commit_power_query_load"` | yes | | | `queryId` | string | yes | | | `appliedEditCount` | number | yes | | | `createdSheet` | boolean | yes | | | `sheetKey` | string | no | | | `staleClearCount` | number | yes | | | projection | Extract< ComputeResponsePayload, { operation: `"open_workbook_subset"` } > | yes | The workbook’s state after the edit is applied, obtained in the same session within one atomic operation. | **Minimal JSON template** ```json { "operation": "commit_power_query_load", "subsetId": "", "loadPlan": "", "query": "", "requestedBackend": "native-desktop" } ``` ## delete\_power\_query [Section titled “delete\_power\_query”](#delete_power_query) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ---------- | ---------------------- | ---- | | operation | “delete\_power\_query” | yes | | `subsetId` | string | yes | | `stableId` | string | yes | **Response on success · delete\_power\_query** | Field | TypeScript type | Req. | | -------------------- | ---------------------- | ---- | | operation | “delete\_power\_query” | yes | | status | string | yes | | reason | string | no | | `removedDisplayName` | string | no | **Minimal JSON template** ```json { "operation": "delete_power_query", "subsetId": "", "stableId": "" } ``` ## duplicate\_power\_query [Section titled “duplicate\_power\_query”](#duplicate_power_query) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ---------- | ------------------------- | ---- | | operation | “duplicate\_power\_query” | yes | | `subsetId` | string | yes | | `stableId` | string | yes | **Response on success · duplicate\_power\_query** | Field | TypeScript type | Req. | | ---------------- | ------------------------- | ---- | | operation | “duplicate\_power\_query” | yes | | status | string | yes | | reason | string | no | | `newStableId` | string | no | | `newDisplayName` | string | no | **Minimal JSON template** ```json { "operation": "duplicate_power_query", "subsetId": "", "stableId": "" } ``` ## list\_power\_query\_definitions [Section titled “list\_power\_query\_definitions”](#list_power_query_definitions) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ---------- | --------------------------------- | ---- | | operation | “list\_power\_query\_definitions” | yes | | `subsetId` | string | yes | **Response on success · list\_power\_query\_definitions** | Field | TypeScript type | Req. | | --------- | --------------------------------- | ---- | | operation | “list\_power\_query\_definitions” | yes | | queries | unknown\[] | yes | **Minimal JSON template** ```json { "operation": "list_power_query_definitions", "subsetId": "" } ``` ## mutate\_applied\_step [Section titled “mutate\_applied\_step”](#mutate_applied_step) Changes a query step. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"mutate_applied_step"` | yes | | `mText` | string | yes | | `queryStableId` | string | no | | mutation | [StepMutation](/reference/sumsheet/types-common/#stepmutation) | yes | | `editorSessionId` | string | no | | generation | number | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · mutate\_applied\_step** | Field | TypeScript type | Req. | | --------- | -------------------------------------------------------------------------- | ---- | | operation | `"mutate_applied_step"` | yes | | result | [StepMutationResult](/reference/sumsheet/types-common/#stepmutationresult) | yes | **Minimal JSON template** ```json { "operation": "mutate_applied_step", "mText": "", "mutation": "", "requestedBackend": "native-desktop" } ``` ## power\_query\_folder\_navigator [Section titled “power\_query\_folder\_navigator”](#power_query_folder_navigator) Traversing a folder as a source: what files are in it, and what will come out of them. **Request** | Field | TypeScript type | Req. | Note from the contract | | ------------------ | ---------------------------------------------------------------------------------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------- | | operation | `"power_query_folder_navigator"` | yes | | | action | string | yes | “list-entries” \| “preview-entry” \| “preview-combined” \| “refresh” \| “package-ledger” | | `sourceKind` | `"folder"` \| “json” \| “xml” | yes | | | `rootUri` | string | yes | The folder address in the same form as in the transform operation above: `file:///path` with the `include`, `exclude`, and `recursive` parameters. | | `entryId` | string | no | | | `lineageJson` | string | no | | | `savedDigest` | number | no | | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | | **Response on success · power\_query\_folder\_navigator** | Field | TypeScript type | Req. | | --------- | ---------------------------------------------------------------------------------- | ---- | | operation | `"power_query_folder_navigator"` | yes | | outcome | [FolderNavigatorOutcome](/reference/sumsheet/types-common/#foldernavigatoroutcome) | yes | **Minimal JSON template** ```json { "operation": "power_query_folder_navigator", "action": "", "sourceKind": "folder", "rootUri": "", "requestedBackend": "native-desktop" } ``` ## power\_query\_parameter\_manager [Section titled “power\_query\_parameter\_manager”](#power_query_parameter_manager) Query parameters: creating, changing, and default values. **Request** | Field | TypeScript type | Req. | Note from the contract | | ------------------ | ---------------------------------------------------------------------------------- | ---- | --------------------------------------------------------------------------------------------------------------- | | operation | `"power_query_parameter_manager"` | yes | | | `subsetId` | string | yes | | | action | string | yes | One of “create” \| “edit” \| “rename” \| “duplicate” \| “delete” \| “list” \| “set-value”. | | dto | [ContractParameterDTO](/reference/sumsheet/types-common/#contractparameterdto) | no | The full object: with `create`, its identifier is ignored; with `edit`, the field values are replaced entirely. | | id | string | no | Target parameter’s stable id; required by edit/rename/duplicate/delete/set-value. | | name | string | no | New display name; required by “rename”. | | value | [ContractParamValueRepr](/reference/sumsheet/types-common/#contractparamvaluerepr) | no | New current value; required by “set-value”. | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | | **Response on success · power\_query\_parameter\_manager** | Field | TypeScript type | Req. | Note from the contract | | ----------------- | -------------------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------------------------------------------------------------------- | | operation | `"power_query_parameter_manager"` | yes | | | status | string | yes | | | reason | string \| null | no | | | parameter | [ContractParameterDTO](/reference/sumsheet/types-common/#contractparameterdto) \| null | no | The parameter the action applied to, or the one it created. Absent from the response for `list` and on a refusal. | | parameters | [ContractParameterDTO](/reference/sumsheet/types-common/#contractparameterdto)\[] | yes | Every parameter currently registered, in stable creation order. | | recomputed | [ContractRecomputedQueryStatus](/reference/sumsheet/types-powerquery/#contractrecomputedquerystatus)\[] | yes | Present in the response only if `edit` or `set-value` actually changed the value. | | `dependencyGraph` | [ContractDependencyGraphSnapshot](/reference/sumsheet/types-formulas/#contractdependencygraphsnapshot) \| null | no | | **Minimal JSON template** ```json { "operation": "power_query_parameter_manager", "subsetId": "", "action": "", "requestedBackend": "native-desktop" } ``` ## profile\_applied\_step\_columns [Section titled “profile\_applied\_step\_columns”](#profile_applied_step_columns) Profiles the columns of a query step. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"profile_applied_step_columns"` | yes | | `mText` | string | yes | | `queryStableId` | string | no | | `stepId` | string | no | | `editorSessionId` | string | no | | generation | number | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · profile\_applied\_step\_columns** | Field | TypeScript type | Req. | Note from the contract | | ------------- | --------------------------------------------------------------------------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | operation | `"profile_applied_step_columns"` | yes | | | profiled | boolean | yes | `true` if the profile was computed successfully; `false` if the computation failed. | | columns | [ColumnProfile](/reference/sumsheet/types-format/#columnprofile)\[] | yes | One profile per column of the result; empty if the computation failed. The core computes the values; the interface only displays them. | | `rowCount` | number | yes | The actual number of rows in the result, not the sample size. | | sampled | boolean | yes | `true` if the profile was built not from all the rows but from the start of the result: there were more rows than the sample limit. | | `sampledRows` | number | yes | How many rows went into the profile: either all of them, or the sample limit — whichever is smaller. | | `sampleCap` | number | yes | The row sample limit that was in effect for this pass. | | block | { sourceId: string; mSource: string; reason: string; detail: string; } | no | The reason the profile couldn’t be built. There’s no such thing as a partial profile: it’s either complete, or this field holds the refusal reason. | | session | [EditorSessionStamp](/reference/sumsheet/types-session/#editorsessionstamp) | no | A session marker returned in responses tied to a session. Calls without a session don’t have this field. | **Minimal JSON template** ```json { "operation": "profile_applied_step_columns", "mText": "", "requestedBackend": "native-desktop" } ``` ## project\_applied\_steps [Section titled “project\_applied\_steps”](#project_applied_steps) Projects the steps of a query. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"project_applied_steps"` | yes | | `mText` | string | yes | | `queryStableId` | string | no | | `editorSessionId` | string | no | | generation | number | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · project\_applied\_steps** | Field | TypeScript type | Req. | | ---------- | -------------------------------------------------------------------------------------- | ---- | | operation | `"project_applied_steps"` | yes | | projection | [AppliedStepsProjection](/reference/sumsheet/types-powerquery/#appliedstepsprojection) | yes | **Minimal JSON template** ```json { "operation": "project_applied_steps", "mText": "", "requestedBackend": "native-desktop" } ``` ## reference\_power\_query [Section titled “reference\_power\_query”](#reference_power_query) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ---------- | ------------------------- | ---- | | operation | “reference\_power\_query” | yes | | `subsetId` | string | yes | | `stableId` | string | yes | **Response on success · reference\_power\_query** | Field | TypeScript type | Req. | | ------------------ | ------------------------- | ---- | | operation | “reference\_power\_query” | yes | | status | string | yes | | reason | string | no | | `newStableId` | string | no | | `newDisplayName` | string | no | | `upstreamStableId` | string | no | **Minimal JSON template** ```json { "operation": "reference_power_query", "subsetId": "", "stableId": "" } ``` ## rename\_power\_query [Section titled “rename\_power\_query”](#rename_power_query) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ---------------- | ---------------------- | ---- | | operation | “rename\_power\_query” | yes | | `subsetId` | string | yes | | `stableId` | string | yes | | `newDisplayName` | string | yes | **Response on success · rename\_power\_query** | Field | TypeScript type | Req. | | --------------------- | ---------------------- | ---- | | operation | “rename\_power\_query” | yes | | status | string | yes | | reason | string | no | | `previousDisplayName` | string | no | | `newDisplayName` | string | no | **Minimal JSON template** ```json { "operation": "rename_power_query", "subsetId": "", "stableId": "", "newDisplayName": "" } ``` ## save\_power\_query\_definition [Section titled “save\_power\_query\_definition”](#save_power_query_definition) Saves a Power Query query definition. **Request** | Field | TypeScript type | Req. | | -------------------------- | ---------------------------------------------------------------------------------- | ---- | | operation | `"save_power_query_definition"` | yes | | `subsetId` | string | yes | | query | unknown | yes | | `boundDestinationSheetKey` | string | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · save\_power\_query\_definition** | Field | TypeScript type | Req. | | --------- | ------------------------------- | ---- | | operation | `"save_power_query_definition"` | yes | | status | string | yes | | reason | string | no | **Minimal JSON template** ```json { "operation": "save_power_query_definition", "subsetId": "", "query": "", "requestedBackend": "native-desktop" } ``` # Power Query: tables from queries > Loading a query's result onto a sheet, refreshing such tables, and the link between a table on a sheet and the query that fills it. Operations on this page: 8. Loading a query’s result onto a sheet, refreshing such tables, and the link between a table on a sheet and the query that fills it. Terms are in the [glossary](/start/glossary/). **Operations on this page — 8** * [`pq-product-ribbon-list`](#pq-product-ribbon-list) * [`pq-product-ribbon-probe`](#pq-product-ribbon-probe) * [`pq-product-ribbon-remove`](#pq-product-ribbon-remove) * [`product_table_range_load_to`](#product_table_range_load_to) * [`product_table_range_mutate_step`](#product_table_range_mutate_step) * [`product_table_range_open_query`](#product_table_range_open_query) * [`product_table_range_refresh_all`](#product_table_range_refresh_all) * [`product_table_range_refresh_current`](#product_table_range_refresh_current) ## pq-product-ribbon-list [Section titled “pq-product-ribbon-list”](#pq-product-ribbon-list) Lists the queries bound to a sheet or table. **Request** | Field | TypeScript type | Req. | | --------- | -------------------------- | ---- | | operation | `"pq-product-ribbon-list"` | yes | **Response on success · pq-product-ribbon-list** | Field | TypeScript type | Req. | | --------- | --------------------------------------------------------------------------------------------------- | ---- | | operation | `"pq-product-ribbon-list"` | yes | | queries | [PqProductRibbonQueryPayload](/reference/sumsheet/types-powerquery/#pqproductribbonquerypayload)\[] | yes | **Minimal JSON template** ```json { "operation": "pq-product-ribbon-list", "requestedBackend": "native-desktop" } ``` ## pq-product-ribbon-probe [Section titled “pq-product-ribbon-probe”](#pq-product-ribbon-probe) Checks whether the named sheet, table, or range has a query. **Request** | Field | TypeScript type | Req. | | ------------ | --------------------------- | ---- | | operation | `"pq-product-ribbon-probe"` | yes | | `sheet_name` | string | yes | | `table_name` | string | no | | `range_ref` | string | no | **Response on success · pq-product-ribbon-probe** | Field | TypeScript type | Req. | | --------- | ------------------------------------------------------------------------------------------------ | ---- | | operation | `"pq-product-ribbon-probe"` | yes | | query | [PqProductRibbonQueryPayload](/reference/sumsheet/types-powerquery/#pqproductribbonquerypayload) | no | | denied | [PqProductRibbonDenied](/reference/sumsheet/types-powerquery/#pqproductribbondenied) | no | **Minimal JSON template** ```json { "operation": "pq-product-ribbon-probe", "sheet_name": "", "requestedBackend": "native-desktop" } ``` ## pq-product-ribbon-remove [Section titled “pq-product-ribbon-remove”](#pq-product-ribbon-remove) Unbinds a query from a sheet or table. **Request** | Field | TypeScript type | Req. | | ---------- | ---------------------------- | ---- | | operation | `"pq-product-ribbon-remove"` | yes | | `query_id` | string | yes | **Response on success · pq-product-ribbon-remove** | Field | TypeScript type | Req. | | --------- | ---------------------------- | ---- | | operation | `"pq-product-ribbon-remove"` | yes | | removed | boolean | yes | **Minimal JSON template** ```json { "operation": "pq-product-ribbon-remove", "query_id": "", "requestedBackend": "native-desktop" } ``` ## product\_table\_range\_load\_to [Section titled “product\_table\_range\_load\_to”](#product_table_range_load_to) Loads a query’s result onto a sheet: where to place it, with or without a header. **Request** | Field | TypeScript type | Req. | | ------------------ | -------------------------------------------------------------------------------------- | ---- | | operation | `"product_table_range_load_to"` | yes | | `subsetId` | string | yes | | identity | [TableRangeSourceIdentity](/reference/sumsheet/types-data/#tablerangesourceidentity) | yes | | `mText` | string | yes | | `queryStableId` | string | no | | `displayName` | string | no | | destination | [TableRangeOutputPlacement](/reference/sumsheet/types-data/#tablerangeoutputplacement) | yes | | anchor | [CellAnchor](/reference/sumsheet/types-cells/#cellanchor) | no | | `includeHeader` | boolean | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · product\_table\_range\_load\_to** | Field | TypeScript type | Req. | | --------- | ------------------------------- | ---- | | operation | `"product_table_range_load_to"` | yes | **Minimal JSON template** ```json { "operation": "product_table_range_load_to", "subsetId": "", "identity": "", "mText": "", "destination": "", "includeHeader": false, "requestedBackend": "native-desktop" } ``` ## product\_table\_range\_mutate\_step [Section titled “product\_table\_range\_mutate\_step”](#product_table_range_mutate_step) Edits the query step behind a range. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------ | ---- | | operation | `"product_table_range_mutate_step"` | yes | | `subsetId` | string | yes | | identity | [TableRangeSourceIdentity](/reference/sumsheet/types-data/#tablerangesourceidentity) | yes | | `mText` | string | yes | | `queryStableId` | string | no | | mutation | [StepMutation](/reference/sumsheet/types-common/#stepmutation) | yes | | `editorSessionId` | string | no | | generation | number | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · product\_table\_range\_mutate\_step** | Field | TypeScript type | Req. | | --------- | ------------------------------------------------------------------------------------------------------ | ---- | | operation | `"product_table_range_mutate_step"` | yes | | result | [TableRangeQueryMutationPreview](/reference/sumsheet/types-powerquery/#tablerangequerymutationpreview) | yes | | session | [EditorSessionStamp](/reference/sumsheet/types-session/#editorsessionstamp) | no | **Minimal JSON template** ```json { "operation": "product_table_range_mutate_step", "subsetId": "", "identity": "", "mText": "", "mutation": "", "requestedBackend": "native-desktop" } ``` ## product\_table\_range\_open\_query [Section titled “product\_table\_range\_open\_query”](#product_table_range_open_query) Opens the query that produced this range. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------ | ---- | | operation | `"product_table_range_open_query"` | yes | | `subsetId` | string | yes | | identity | [TableRangeSourceIdentity](/reference/sumsheet/types-data/#tablerangesourceidentity) | yes | | `queryStableId` | string | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · product\_table\_range\_open\_query** | Field | TypeScript type | Req. | | ------------------------ | -------------------------------------------------------------------------------------- | ---- | | operation | `"product_table_range_open_query"` | yes | | ready | boolean | yes | | projection | [AppliedStepsProjection](/reference/sumsheet/types-powerquery/#appliedstepsprojection) | no | | preview | [TableRangeQueryPreview](/reference/sumsheet/types-powerquery/#tablerangequerypreview) | no | | session | [EditorSessionStamp](/reference/sumsheet/types-session/#editorsessionstamp) | no | | `blockReason` | string | no | | `blockDetail` | string | no | | `existingOutputStableId` | string | no | **Minimal JSON template** ```json { "operation": "product_table_range_open_query", "subsetId": "", "identity": "", "requestedBackend": "native-desktop" } ``` ## product\_table\_range\_refresh\_all [Section titled “product\_table\_range\_refresh\_all”](#product_table_range_refresh_all) Refreshes every range in the workbook from its query. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"product_table_range_refresh_all"` | yes | | `subsetId` | string | yes | | action | `"run"` \| “start” \| “poll” \| “commit” \| “cancel” | no | | generation | number | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · product\_table\_range\_refresh\_all** | Field | TypeScript type | Req. | | --------- | ----------------------------------- | ---- | | operation | `"product_table_range_refresh_all"` | yes | **Minimal JSON template** ```json { "operation": "product_table_range_refresh_all", "subsetId": "", "requestedBackend": "native-desktop" } ``` ## product\_table\_range\_refresh\_current [Section titled “product\_table\_range\_refresh\_current”](#product_table_range_refresh_current) Refreshes a single range from its query. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"product_table_range_refresh_current"` | yes | | `subsetId` | string | yes | | `queryStableId` | string | yes | | action | `"run"` \| “start” \| “poll” \| “commit” \| “cancel” | no | | generation | number | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · product\_table\_range\_refresh\_current** | Field | TypeScript type | Req. | | --------- | --------------------------------------- | ---- | | operation | `"product_table_range_refresh_current"` | yes | **Minimal JSON template** ```json { "operation": "product_table_range_refresh_current", "subsetId": "", "queryStableId": "", "requestedBackend": "native-desktop" } ``` # Power Query: trust and privacy > Source privacy levels, trust decisions, and connection settings. Operations on this page: 6. Source privacy levels, trust decisions, and connection settings. Terms are in the [glossary](/start/glossary/). **Operations on this page — 6** * [`pq-data-source-settings-apply`](#pq-data-source-settings-apply) * [`pq-data-source-settings-list`](#pq-data-source-settings-list) * [`pq-privacy-level-list`](#pq-privacy-level-list) * [`pq-privacy-level-reset`](#pq-privacy-level-reset) * [`pq-privacy-level-set`](#pq-privacy-level-set) * [`source_trust_decision`](#source_trust_decision) ## pq-data-source-settings-apply [Section titled “pq-data-source-settings-apply”](#pq-data-source-settings-apply) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ---------- | ------------------------------------------------------------------ | ---- | | operation | “pq-data-source-settings-apply” | yes | | `subsetId` | string | yes | | action | “change-source-path” \| “clear-permissions” \| “set-privacy-level” | yes | | `scopeId` | string | yes | | `newPath` | string | no | | level | string | no | **Response on success · pq-data-source-settings-apply** | Field | TypeScript type | Req. | | --------- | ------------------------------------------------------------------------------------------------ | ---- | | operation | “pq-data-source-settings-apply” | yes | | outcome | [PqDataSourceSettingsOutcome](/reference/sumsheet/types-powerquery/#pqdatasourcesettingsoutcome) | yes | **Minimal JSON template** ```json { "operation": "pq-data-source-settings-apply", "subsetId": "", "action": "change-source-path", "scopeId": "" } ``` ## pq-data-source-settings-list [Section titled “pq-data-source-settings-list”](#pq-data-source-settings-list) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ---------- | ------------------------------ | ---- | | operation | “pq-data-source-settings-list” | yes | | `subsetId` | string | yes | **Response on success · pq-data-source-settings-list** | Field | TypeScript type | Req. | | --------- | ------------------------------------------------------------------------------- | ---- | | operation | “pq-data-source-settings-list” | yes | | sources | [PqDataSourceEntry](/reference/sumsheet/types-powerquery/#pqdatasourceentry)\[] | yes | **Minimal JSON template** ```json { "operation": "pq-data-source-settings-list", "subsetId": "" } ``` ## pq-privacy-level-list [Section titled “pq-privacy-level-list”](#pq-privacy-level-list) Lists the privacy levels assigned to sources. **Request** | Field | TypeScript type | Req. | | ------------------ | --------------------------------------------------------------------------------------------- | ---- | | operation | `"pq-privacy-level-list"` | yes | | `userStore` | [PqPrivacyLevelAssignment](/reference/sumsheet/types-powerquery/#pqprivacylevelassignment)\[] | no | | `workbookDeclared` | [PqPrivacyLevelAssignment](/reference/sumsheet/types-powerquery/#pqprivacylevelassignment)\[] | no | | `knownScopes` | [PqSourceScopeWire](/reference/sumsheet/types-powerquery/#pqsourcescopewire)\[] | no | | `subsetId` | string | no | **Response on success · pq-privacy-level-list** | Field | TypeScript type | Req. | | --------- | ------------------------------------------------------------------------------------------- | ---- | | operation | `"pq-privacy-level-list"` | yes | | entries | [PqPrivacyLevelListEntry](/reference/sumsheet/types-powerquery/#pqprivacylevellistentry)\[] | yes | **Minimal JSON template** ```json { "operation": "pq-privacy-level-list", "requestedBackend": "native-desktop" } ``` ## pq-privacy-level-reset [Section titled “pq-privacy-level-reset”](#pq-privacy-level-reset) Clears the privacy level assigned to a source. **Request** | Field | TypeScript type | Req. | | ---------------- | -------------------------- | ---- | | operation | `"pq-privacy-level-reset"` | yes | | `canonicalScope` | string | yes | **Response on success · pq-privacy-level-reset** | Field | TypeScript type | Req. | | --------- | ---------------------------------------------------------------------------------------------- | ---- | | operation | `"pq-privacy-level-reset"` | yes | | outcome | [PqPrivacyLevelWriteOutcome](/reference/sumsheet/types-powerquery/#pqprivacylevelwriteoutcome) | yes | **Minimal JSON template** ```json { "operation": "pq-privacy-level-reset", "canonicalScope": "", "requestedBackend": "native-desktop" } ``` ## pq-privacy-level-set [Section titled “pq-privacy-level-set”](#pq-privacy-level-set) Assigns a privacy level to a source. **Request** | Field | TypeScript type | Req. | | ---------------- | ------------------------ | ---- | | operation | `"pq-privacy-level-set"` | yes | | `canonicalScope` | string | yes | | level | string | yes | **Response on success · pq-privacy-level-set** | Field | TypeScript type | Req. | | --------- | ---------------------------------------------------------------------------------------------- | ---- | | operation | `"pq-privacy-level-set"` | yes | | outcome | [PqPrivacyLevelWriteOutcome](/reference/sumsheet/types-powerquery/#pqprivacylevelwriteoutcome) | yes | **Minimal JSON template** ```json { "operation": "pq-privacy-level-set", "canonicalScope": "", "level": "", "requestedBackend": "native-desktop" } ``` ## source\_trust\_decision [Section titled “source\_trust\_decision”](#source_trust_decision) A trust decision for a source: allow, deny, or remember for the session. **Request** | Field | TypeScript type | Req. | | ------------------ | ----------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"source_trust_decision"` | yes | | action | [ContractSourceTrustAction](/reference/sumsheet/types-common/#contractsourcetrustaction) | yes | | observation | [ContractSourceTrustObservation](/reference/sumsheet/types-common/#contractsourcetrustobservation) | yes | | grant | [ContractSourceTrustGrantBinding](/reference/sumsheet/types-common/#contractsourcetrustgrantbinding) \| null | no | | session | [ContractSourceTrustSessionBinding](/reference/sumsheet/types-session/#contractsourcetrustsessionbinding) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · source\_trust\_decision** | Field | TypeScript type | Req. | | --------- | -------------------------------------------------------------------------------------------- | ---- | | operation | `"source_trust_decision"` | yes | | decision | [ContractSourceTrustDecision](/reference/sumsheet/types-common/#contractsourcetrustdecision) | yes | **Minimal JSON template** ```json { "operation": "source_trust_decision", "action": "", "observation": "", "requestedBackend": "native-desktop" } ``` # Printing and layout > Page setup, breaks, sheet background, and printing chart sheets. Operations on this page: 7. Page setup, breaks, sheet background, and printing chart sheets. Terms are in the [glossary](/start/glossary/). **Operations on this page — 7** * [`apply_sheet_background_patch`](#apply_sheet_background_patch) * [`apply_worksheet_page_setup`](#apply_worksheet_page_setup) * [`compute_page_break_layout`](#compute_page_break_layout) * [`create_chart_sheet_bounded`](#create_chart_sheet_bounded) * [`mutate_worksheet_page_breaks`](#mutate_worksheet_page_breaks) * [`preview_chart_sheet_print`](#preview_chart_sheet_print) * [`set_chart_sheet_print_bounded`](#set_chart_sheet_print_bounded) ## apply\_sheet\_background\_patch [Section titled “apply\_sheet\_background\_patch”](#apply_sheet_background_patch) Applies an edit to the sheet background. **Request** | Field | TypeScript type | Req. | | -------------------- | ------------------------------------------------------------------------------------------------------- | ---- | | operation | `"apply_sheet_background_patch"` | yes | | `subsetId` | string | yes | | `packageBytesBase64` | string | yes | | patch | [ContractXlsxSheetBackgroundPatch](/reference/sumsheet/types-session/#contractxlsxsheetbackgroundpatch) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · apply\_sheet\_background\_patch** | Field | TypeScript type | Req. | | -------------------- | -------------------------------- | ---- | | operation | `"apply_sheet_background_patch"` | yes | | `packageBytesBase64` | string | yes | | `byteCount` | number | yes | | applied | boolean | yes | **Minimal JSON template** ```json { "operation": "apply_sheet_background_patch", "subsetId": "", "packageBytesBase64": "", "patch": "", "requestedBackend": "native-desktop" } ``` ## apply\_worksheet\_page\_setup [Section titled “apply\_worksheet\_page\_setup”](#apply_worksheet_page_setup) Applies the sheet’s page setup. **Request** | Field | TypeScript type | Req. | | ------------------ | ----------------------------------------------------------------------------------------- | ---- | | operation | `"apply_worksheet_page_setup"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | `pageSetup` | [ContractWorksheetPageSetup](/reference/sumsheet/types-print/#contractworksheetpagesetup) | yes | | `expectedRevision` | number \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · apply\_worksheet\_page\_setup** | Field | TypeScript type | Req. | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---- | | operation | `"apply_worksheet_page_setup"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `changedPageSetup` | boolean | yes | | `pageSetup` | [ContractWorksheetPageSetup](/reference/sumsheet/types-print/#contractworksheetpagesetup) | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `dirtyCellCount` | number | yes | | `currentSourceSaveReadiness` | [ContractCurrentSourceSaveReadiness](/reference/sumsheet/types-common/#contractcurrentsourcesavereadiness) \| null | no | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | yes | **Minimal JSON template** ```json { "operation": "apply_worksheet_page_setup", "subsetId": "", "sheetKey": "", "pageSetup": "", "requestedBackend": "native-desktop" } ``` ## compute\_page\_break\_layout [Section titled “compute\_page\_break\_layout”](#compute_page_break_layout) Computes the page-break layout. **Request** | Field | TypeScript type | Req. | Note from the contract | | ------------------ | ----------------------------------------------------------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------ | | operation | `"compute_page_break_layout"` | yes | | | `subsetId` | string | yes | | | `sheetKey` | string | yes | | | `usedRowEnd` | number | yes | The bottom-right corner of the used area that pagination needs to cover. Zero-based, bounds inclusive. | | `usedColEnd` | number | yes | | | `pageSetup` | [ContractPageBreakPageSetup](/reference/sumsheet/types-print/#contractpagebreakpagesetup) | yes | | | `manualRowBreaks` | number\[] | yes | The row numbers the user placed a manual page break before. Zero-based. | | `manualColBreaks` | number\[] | yes | The column numbers the user placed a manual page break before. Zero-based. | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | | **Response on success · compute\_page\_break\_layout** | Field | TypeScript type | Req. | | ------------- | ----------------------------------------------------------------------------------------- | ---- | | operation | `"compute_page_break_layout"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `rowBreaks` | [ContractPageBreakLine](/reference/sumsheet/types-print/#contractpagebreakline)\[] | yes | | `colBreaks` | [ContractPageBreakLine](/reference/sumsheet/types-print/#contractpagebreakline)\[] | yes | | `pagesAcross` | number | yes | | `pagesDown` | number | yes | | `pageCount` | number | yes | **Minimal JSON template** ```json { "operation": "compute_page_break_layout", "subsetId": "", "sheetKey": "", "usedRowEnd": 0, "usedColEnd": 0, "pageSetup": "", "manualRowBreaks": 0, "manualColBreaks": 0, "requestedBackend": "native-desktop" } ``` ## create\_chart\_sheet\_bounded [Section titled “create\_chart\_sheet\_bounded”](#create_chart_sheet_bounded) Creates a chart sheet within given bounds. **Request** | Field | TypeScript type | Req. | | --------------------- | ---------------------------------------------------------------------------------- | ---- | | operation | `"create_chart_sheet_bounded"` | yes | | `subsetId` | string | yes | | `sourceSheetKey` | string | yes | | `sourceChartStableId` | string | yes | | name | string | yes | | `targetIndex` | number \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · create\_chart\_sheet\_bounded** | Field | TypeScript type | Req. | | ------------------------ | ----------------------------------------------------------------------------------------------------- | ---- | | operation | `"create_chart_sheet_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `createdSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `surfaceObjects` | [ContractSheetObject](/reference/sumsheet/types-session/#contractsheetobject)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `nativeChartsheetClaim` | `"live_verified"` | yes | | `lifecycleClaim` | `"live_verified"` | yes | | `macroSheetParityClaim` | `"no"` | yes | | `dialogSheetParityClaim` | `"no"` | yes | **Minimal JSON template** ```json { "operation": "create_chart_sheet_bounded", "subsetId": "", "sourceSheetKey": "", "sourceChartStableId": "", "name": "", "requestedBackend": "native-desktop" } ``` ## mutate\_worksheet\_page\_breaks [Section titled “mutate\_worksheet\_page\_breaks”](#mutate_worksheet_page_breaks) From the typed contract Fields are reconstructed from the Compute Contract types. There’s no text description for this operation yet. **Request** | Field | TypeScript type | Req. | | ------------------ | ----------------------------------------------------------------------------------------------------- | ---- | | operation | “mutate\_worksheet\_page\_breaks” | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | intent | [ContractWorksheetPageBreakIntent](/reference/sumsheet/types-print/#contractworksheetpagebreakintent) | yes | | `expectedRevision` | number | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | **Response on success · mutate\_worksheet\_page\_breaks** | Field | TypeScript type | Req. | | ------------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | “mutate\_worksheet\_page\_breaks” | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `changedPageBreaks` | boolean | yes | | `effectiveScale` | number | yes | | areas | [ContractPageBreakAreaProjection](/reference/sumsheet/types-print/#contractpagebreakareaprojection)\[] | yes | | `rowBreaks` | [ContractPageBreakLine](/reference/sumsheet/types-print/#contractpagebreakline)\[] | yes | | `colBreaks` | [ContractPageBreakLine](/reference/sumsheet/types-print/#contractpagebreakline)\[] | yes | | `pagesAcross` | number | yes | | `pagesDown` | number | yes | | `pageCount` | number | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `dirtyCellCount` | number | yes | | `recalcNeeded` | boolean | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | yes | **Minimal JSON template** ```json { "operation": "mutate_worksheet_page_breaks", "subsetId": "", "sheetKey": "", "intent": "", "expectedRevision": 0 } ``` ## preview\_chart\_sheet\_print [Section titled “preview\_chart\_sheet\_print”](#preview_chart_sheet_print) Builds a preview: printing a chart sheet. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"preview_chart_sheet_print"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · preview\_chart\_sheet\_print** | Field | TypeScript type | Req. | | ------------------------ | ---------------------------------------------------------------------------------------------------- | ---- | | operation | `"preview_chart_sheet_print"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `chartSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | settings | [ContractChartSheetPrintSettings](/reference/sumsheet/types-charts/#contractchartsheetprintsettings) | yes | | preview | [ContractChartSheetPrintPreview](/reference/sumsheet/types-charts/#contractchartsheetprintpreview) | yes | | `nativeChartsheetClaim` | `"live_verified"` | yes | | `printPreviewClaim` | `"live_verified"` | yes | | `macroSheetParityClaim` | `"no"` | yes | | `dialogSheetParityClaim` | `"no"` | yes | **Minimal JSON template** ```json { "operation": "preview_chart_sheet_print", "subsetId": "", "sheetKey": "", "requestedBackend": "native-desktop" } ``` ## set\_chart\_sheet\_print\_bounded [Section titled “set\_chart\_sheet\_print\_bounded”](#set_chart_sheet_print_bounded) Sets up printing for a chart sheet within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------------------------- | ---- | | operation | `"set_chart_sheet_print_bounded"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | settings | [ContractChartSheetPrintSettings](/reference/sumsheet/types-charts/#contractchartsheetprintsettings) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · set\_chart\_sheet\_print\_bounded** | Field | TypeScript type | Req. | | ------------------------ | ---------------------------------------------------------------------------------------------------- | ---- | | operation | `"set_chart_sheet_print_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `didChange` | boolean | yes | | `chartSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | settings | [ContractChartSheetPrintSettings](/reference/sumsheet/types-charts/#contractchartsheetprintsettings) | yes | | preview | [ContractChartSheetPrintPreview](/reference/sumsheet/types-charts/#contractchartsheetprintpreview) | yes | | `nativeChartsheetClaim` | `"live_verified"` | yes | | `printPreviewClaim` | `"live_verified"` | yes | | `macroSheetParityClaim` | `"no"` | yes | | `dialogSheetParityClaim` | `"no"` | yes | **Minimal JSON template** ```json { "operation": "set_chart_sheet_print_bounded", "subsetId": "", "sheetKey": "", "settings": "", "requestedBackend": "native-desktop" } ``` # Protection and review > Sheet and workbook protection, range permissions, protection auditing, change tracking, comments, and ink annotations. Operations on this page: 8. Sheet and workbook protection, range permissions, protection auditing, change tracking, comments, and ink annotations. Terms are in the [glossary](/start/glossary/). **Operations on this page — 8** * [`apply_track_insert_delete`](#apply_track_insert_delete) * [`apply_track_visibility`](#apply_track_visibility) * [`protected_ranges_permissions`](#protected_ranges_permissions) * [`protection_inspector_audit`](#protection_inspector_audit) * [`review_annotations_lifecycle`](#review_annotations_lifecycle) * [`review_ink_lifecycle`](#review_ink_lifecycle) * [`set_sheet_protection_bounded`](#set_sheet_protection_bounded) * [`workbook_protection_lifecycle`](#workbook_protection_lifecycle) ## apply\_track\_insert\_delete [Section titled “apply\_track\_insert\_delete”](#apply_track_insert_delete) Applies tracking of insertions and deletions. **Request** | Field | TypeScript type | Req. | | -------------------- | -------------------------------------------------------------------------------------------------- | ---- | | operation | `"apply_track_insert_delete"` | yes | | `expectedRevision` | number \| null | no | | `subsetId` | string | yes | | `sheetKey` | string | yes | | axis | [ContractTrackAxis](/reference/sumsheet/types-protection/#contracttrackaxis) | yes | | index | number | yes | | action | [ContractTrackStructureAction](/reference/sumsheet/types-protection/#contracttrackstructureaction) | yes | | scope | [CellRange](/reference/sumsheet/types-cells/#cellrange) \| null | no | | count | number | no | | `insertedHeaderText` | string \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · apply\_track\_insert\_delete** | Field | TypeScript type | Req. | | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"apply_track_insert_delete"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | axis | [ContractTrackAxis](/reference/sumsheet/types-protection/#contracttrackaxis) | yes | | index | number | yes | | action | [ContractTrackStructureAction](/reference/sumsheet/types-protection/#contracttrackstructureaction) | yes | | scope | [CellRange](/reference/sumsheet/types-cells/#cellrange) \| null | no | | count | number | yes | | `changedRows` | number\[] | yes | | `changedColumns` | number\[] | yes | | `shiftedCellCount` | number | yes | | `removedCellCount` | number | yes | | `trackStructureClaim` | `"live_verified"` | yes | | `structureScope` | \| “active\_visible\_value\_track\_current\_sheet” \| “active\_visible\_value\_and\_simple\_formula\_insert\_current\_sheet” \| “active\_visible\_value\_and\_simple\_formula\_structure\_current\_sheet” \| “table\_scoped\_sparse\_structure\_current\_sheet” | yes | | `formulaReferenceRewriteClaim` | \| “no” \| “insert\_only\_bounded\_same\_sheet\_refs” \| “bounded\_same\_sheet\_refs” | yes | | `mergeReferenceRewriteClaim` | `"no"` \| “bounded\_track\_merge\_refs” | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `dirtyCellCount` | number | yes | | `currentSourceSaveReadiness` | [ContractCurrentSourceSaveReadiness](/reference/sumsheet/types-common/#contractcurrentsourcesavereadiness) \| null | no | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | yes | **Minimal JSON template** ```json { "operation": "apply_track_insert_delete", "subsetId": "", "sheetKey": "", "axis": "", "index": 0, "action": "", "requestedBackend": "native-desktop" } ``` ## apply\_track\_visibility [Section titled “apply\_track\_visibility”](#apply_track_visibility) Applies the visibility of tracked changes. **Request** | Field | TypeScript type | Req. | | ------------------------ | -------------------------------------------------------------------------------------------------- | ---- | | operation | `"apply_track_visibility"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | axis | [ContractTrackAxis](/reference/sumsheet/types-protection/#contracttrackaxis) | yes | | `visibilityOwner` | [ContractTrackVisibilityOwner](/reference/sumsheet/types-protection/#contracttrackvisibilityowner) | no | | index | number \| null | no | | indices | number\[] | no | | `replaceOwnerProjection` | boolean | no | | hidden | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · apply\_track\_visibility** | Field | TypeScript type | Req. | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---- | | operation | `"apply_track_visibility"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | axis | [ContractTrackAxis](/reference/sumsheet/types-protection/#contracttrackaxis) | yes | | index | number | yes | | hidden | boolean | yes | | `changedRows` | number\[] | yes | | `changedColumns` | number\[] | yes | | `hiddenRows` | number\[] | yes | | `manualHiddenRows` | number\[] | yes | | `filterHiddenRows` | number\[] | yes | | `dirtyCellCount` | number | yes | | `currentSourceSaveReadiness` | [ContractCurrentSourceSaveReadiness](/reference/sumsheet/types-common/#contractcurrentsourcesavereadiness) \| null | no | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | yes | **Minimal JSON template** ```json { "operation": "apply_track_visibility", "subsetId": "", "sheetKey": "", "axis": "", "hidden": false, "requestedBackend": "native-desktop" } ``` ## protected\_ranges\_permissions [Section titled “protected\_ranges\_permissions”](#protected_ranges_permissions) Permissions on protected ranges: who’s allowed to do what inside a protected sheet. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------------------------- | ---- | | operation | `"protected_ranges_permissions"` | yes | | `subsetId` | string | yes | | intent | [ContractProtectedRangesIntent](/reference/sumsheet/types-protection/#contractprotectedrangesintent) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · protected\_ranges\_permissions** | Field | TypeScript type | Req. | | ---------- | ---------------------------------------------------------------------------------------------------- | ---- | | operation | `"protected_ranges_permissions"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | result | [ContractProtectedRangesResult](/reference/sumsheet/types-protection/#contractprotectedrangesresult) | yes | **Minimal JSON template** ```json { "operation": "protected_ranges_permissions", "subsetId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## protection\_inspector\_audit [Section titled “protection\_inspector\_audit”](#protection_inspector_audit) Inspecting workbook protection and a plan of tracked changes within given bounds. **Request** | Field | TypeScript type | Req. | | -------------------- | ---------------------------------------------------------------------------------------------------- | ---- | | operation | `"protection_inspector_audit"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | `expectedRevision` | number | yes | | `expectedGeneration` | number | yes | | `readOnly` | boolean | no | | intent | [ContractProtectionAuditIntent](/reference/sumsheet/types-protection/#contractprotectionauditintent) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · protection\_inspector\_audit** | Field | TypeScript type | Req. | | ---------- | ---------------------------------------------------------------------------------------------------- | ---- | | operation | `"protection_inspector_audit"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | result | [ContractProtectionAuditResult](/reference/sumsheet/types-protection/#contractprotectionauditresult) | yes | **Minimal JSON template** ```json { "operation": "protection_inspector_audit", "subsetId": "", "requestId": "", "expectedRevision": 0, "expectedGeneration": 0, "intent": "", "requestedBackend": "native-desktop" } ``` ## review\_annotations\_lifecycle [Section titled “review\_annotations\_lifecycle”](#review_annotations_lifecycle) Notes and comments: identification and lifecycle — the classic notes and comments that live inside the workbook. **Request** | Field | TypeScript type | Req. | | -------------------- | -------------------------------------------------------------------------------------------------------- | ---- | | operation | `"review_annotations_lifecycle"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | `expectedRevision` | number | yes | | `expectedGeneration` | number | yes | | `nowUtc` | string | yes | | `readOnly` | boolean | no | | protected | boolean | no | | state | [ContractReviewAnnotationsState](/reference/sumsheet/types-protection/#contractreviewannotationsstate) | yes | | intent | [ContractReviewAnnotationsIntent](/reference/sumsheet/types-protection/#contractreviewannotationsintent) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · review\_annotations\_lifecycle** | Field | TypeScript type | Req. | | ----------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"review_annotations_lifecycle"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | result | [ContractReviewAnnotationsResult](/reference/sumsheet/types-protection/#contractreviewannotationsresult) | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | **Minimal JSON template** ```json { "operation": "review_annotations_lifecycle", "subsetId": "", "requestId": "", "expectedRevision": 0, "expectedGeneration": 0, "nowUtc": "", "state": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## review\_ink\_lifecycle [Section titled “review\_ink\_lifecycle”](#review_ink_lifecycle) Ink annotations: an inventory of existing ones, and deleting them in one atomic action. **Request** | Field | TypeScript type | Req. | | ------------------ | -------------------------------------------------------------------------------------------------- | ---- | | operation | `"review_ink_lifecycle"` | yes | | `subsetId` | string | yes | | scope | [ContractReviewInkDeleteScope](/reference/sumsheet/types-protection/#contractreviewinkdeletescope) | yes | | `sheetPath` | string \| null | no | | `expectedRevision` | number | yes | | `readOnly` | boolean | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · review\_ink\_lifecycle** | Field | TypeScript type | Req. | | --------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"review_ink_lifecycle"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | scope | [ContractReviewInkDeleteScope](/reference/sumsheet/types-protection/#contractreviewinkdeletescope) | yes | | `deletedCount` | number | yes | | `byteCount` | number | yes | | `identityLedger` | [ContractReviewInkIdentityLedgerEntry](/reference/sumsheet/types-protection/#contractreviewinkidentityledgerentry)\[] | yes | | `removedPartCount` | number | yes | | `removedRelationshipCount` | number | yes | | `removedContentTypeOverrideCount` | number | yes | | `preservedInkParts` | [ContractReviewInkPreservedPart](/reference/sumsheet/types-protection/#contractreviewinkpreservedpart)\[] | yes | | `preexistingOrphanCount` | number | yes | | `orphanCount` | number | yes | | `newOrphanCount` | number | yes | | `objectInventory` | [ContractWorkbookObjectInventoryEntry](/reference/sumsheet/types-session/#contractworkbookobjectinventoryentry)\[] | yes | | `inkProjection` | [ContractReviewInkProjectionItem](/reference/sumsheet/types-protection/#contractreviewinkprojectionitem)\[] | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `surfaceObjects` | [ContractSheetObject](/reference/sumsheet/types-session/#contractsheetobject)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | no | **Minimal JSON template** ```json { "operation": "review_ink_lifecycle", "subsetId": "", "scope": "", "expectedRevision": 0, "requestedBackend": "native-desktop" } ``` ## set\_sheet\_protection\_bounded [Section titled “set\_sheet\_protection\_bounded”](#set_sheet_protection_bounded) Sets sheet protection within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ----------------------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"set_sheet_protection_bounded"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | protected | boolean | yes | | `allowedActions` | [ContractSheetProtectionAllowedAction](/reference/sumsheet/types-protection/#contractsheetprotectionallowedaction)\[] \| null | no | | password | string \| null | no | | `sessionAction` | [ContractSheetProtectionSessionAction](/reference/sumsheet/types-protection/#contractsheetprotectionsessionaction) \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · set\_sheet\_protection\_bounded** | Field | TypeScript type | Req. | | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"set_sheet_protection_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `changedSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `previousProtected` | boolean | yes | | `previousAllowedActions` | [ContractSheetProtectionAllowedAction](/reference/sumsheet/types-protection/#contractsheetprotectionallowedaction)\[] \| null | no | | `previousPasswordProtected` | boolean | yes | | protected | boolean | yes | | `allowedActions` | [ContractSheetProtectionAllowedAction](/reference/sumsheet/types-protection/#contractsheetprotectionallowedaction)\[] \| null | no | | `passwordProtected` | boolean | yes | | `packageProtected` | boolean | yes | | `effectiveProtected` | boolean | yes | | `sessionUnlocked` | boolean | yes | | `sessionAction` | [ContractSheetProtectionSessionAction](/reference/sumsheet/types-protection/#contractsheetprotectionsessionaction) \| null | no | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `sheetProtectionClaim` | `"live_verified"` | yes | | `protectionScope` | `"same_workbook_sheetProtection_metadata"` | yes | | `passwordProtectionClaim` | `"live_verified"` | yes | **Minimal JSON template** ```json { "operation": "set_sheet_protection_bounded", "subsetId": "", "sheetKey": "", "protected": false, "requestedBackend": "native-desktop" } ``` ## workbook\_protection\_lifecycle [Section titled “workbook\_protection\_lifecycle”](#workbook_protection_lifecycle) Protecting the entire workbook: setting it, removing it, and checking its state. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------------------------------- | ---- | | operation | `"workbook_protection_lifecycle"` | yes | | `subsetId` | string | yes | | intent | [ContractWorkbookProtectionIntent](/reference/sumsheet/types-protection/#contractworkbookprotectionintent) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · workbook\_protection\_lifecycle** | Field | TypeScript type | Req. | | ---------- | ---------------------------------------------------------------------------------------------------------- | ---- | | operation | `"workbook_protection_lifecycle"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | result | [ContractWorkbookProtectionResult](/reference/sumsheet/types-protection/#contractworkbookprotectionresult) | yes | **Minimal JSON template** ```json { "operation": "workbook_protection_lifecycle", "subsetId": "", "intent": "", "requestedBackend": "native-desktop" } ``` # Session and workbook > Opening a workbook subset, saving, the viewport, recovery, properties, comparing, and merging revisions. Operations on this page: 19. Opening a workbook subset, saving, the viewport, recovery, properties, comparing, and merging revisions. Terms are in the [glossary](/start/glossary/). Revision-merge limits The `merge_workbook_revisions` operation checks the size of what it’s given, and refuses if the limit is exceeded — without changing anything. | Limit | Value | Refusal code | | -------------------------- | ------ | ------------------------------------------------- | | edits in a single merge | 4 096 | `workbook-revision-merge-mutation-limit-exceeded` | | history entries in a merge | 100 | — | | bytes of text in a cell | 32 767 | — | | bytes in a formula | 8 192 | — | | bytes in a sheet key | 1 024 | — | | ::: | | | **Operations on this page — 19** * [`check_workbook_compatibility`](#check_workbook_compatibility) * [`close_workbook_subset`](#close_workbook_subset) * [`compare_workbook_versions`](#compare_workbook_versions) * [`diagnose_file_open_recovery`](#diagnose_file_open_recovery) * [`document_properties_lifecycle`](#document_properties_lifecycle) * [`inspect_workbook_privacy`](#inspect_workbook_privacy) * [`merge_workbook_revisions`](#merge_workbook_revisions) * [`open_password_protected_workbook_subset`](#open_password_protected_workbook_subset) * [`open_password_protected_workbook_subset_from_bytes`](#open_password_protected_workbook_subset_from_bytes) * [`open_workbook_subset`](#open_workbook_subset) * [`open_workbook_subset_from_bytes`](#open_workbook_subset_from_bytes) * [`publish_file_open_recovery`](#publish_file_open_recovery) * [`replay_workbook_history`](#replay_workbook_history) * [`save_workbook_subset`](#save_workbook_subset) * [`save_workbook_subset_to_bytes`](#save_workbook_subset_to_bytes) * [`synchronize_workbook_viewport`](#synchronize_workbook_viewport) * [`workbook_accessibility`](#workbook_accessibility) * [`workbook_links_manager`](#workbook_links_manager) * [`workbook_window_session_command`](#workbook_window_session_command) ## check\_workbook\_compatibility [Section titled “check\_workbook\_compatibility”](#check_workbook_compatibility) Checks a workbook’s compatibility. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"check_workbook_compatibility"` | yes | | `subsetId` | string | yes | | target | [CompatibilityTarget](/reference/sumsheet/types-session/#compatibilitytarget) | yes | | `readOnly` | boolean | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · check\_workbook\_compatibility** | Field | TypeScript type | Req. | | ---------- | ----------------------------------------------------------------------------------------------- | ---- | | operation | `"check_workbook_compatibility"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | report | [CompatibilityInventoryReport](/reference/sumsheet/types-session/#compatibilityinventoryreport) | yes | **Minimal JSON template** ```json { "operation": "check_workbook_compatibility", "subsetId": "", "target": "", "requestedBackend": "native-desktop" } ``` ## close\_workbook\_subset [Section titled “close\_workbook\_subset”](#close_workbook_subset) Closes a workbook session and releases the records tied to it. Success doesn’t mean the workbook closed Check the `closed` field in the response, not just `ok`. For a workbook with approved macros, closing triggers the `Workbook_BeforeClose` handler, and it can cancel the close — just as in Excel. In that case you get `ok: true` and `closed: false`: the session stays alive, `subsetId` is still valid, the workbook is still open. If the handler itself crashes, the response is the refusal `workbook-before-close-handler-failed`, and the workbook again stays open. A workbook with no macros, or a build with no automation provider, doesn’t have this path — closing is unconditional. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"close_workbook_subset"` | yes | | `subsetId` | string | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · close\_workbook\_subset** | Field | TypeScript type | Req. | | ------------------------ | ------------------------- | ---- | | operation | `"close_workbook_subset"` | yes | | `subsetId` | string | yes | | closed | boolean | yes | | `releasedClipboardCount` | number | yes | | `remainingSessionCount` | number | yes | **Minimal JSON template** ```json { "operation": "close_workbook_subset", "subsetId": "", "requestedBackend": "native-desktop" } ``` ## compare\_workbook\_versions [Section titled “compare\_workbook\_versions”](#compare_workbook_versions) Compares workbook versions. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"compare_workbook_versions"` | yes | | `currentSourceUri` | string | yes | | `versionSourceUri` | string | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · compare\_workbook\_versions** | Field | TypeScript type | Req. | | --------- | ------------------------------------------------------------------------------------------------- | ---- | | operation | `"compare_workbook_versions"` | yes | | diff | [WorkbookVersionStructuralDiff](/reference/sumsheet/types-session/#workbookversionstructuraldiff) | yes | **Minimal JSON template** ```json { "operation": "compare_workbook_versions", "currentSourceUri": "", "versionSourceUri": "", "requestedBackend": "native-desktop" } ``` ## diagnose\_file\_open\_recovery [Section titled “diagnose\_file\_open\_recovery”](#diagnose_file_open_recovery) Diagnoses recovery on file open. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"diagnose_file_open_recovery"` | yes | | `sourceUri` | string | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · diagnose\_file\_open\_recovery** | Field | TypeScript type | Req. | | --------- | -------------------------------------------------------------------------------------- | ---- | | operation | `"diagnose_file_open_recovery"` | yes | | plan | [ContractFileRecoveryPlan](/reference/sumsheet/types-common/#contractfilerecoveryplan) | yes | **Minimal JSON template** ```json { "operation": "diagnose_file_open_recovery", "sourceUri": "file:///path/book.xlsx", "requestedBackend": "native-desktop" } ``` ## document\_properties\_lifecycle [Section titled “document\_properties\_lifecycle”](#document_properties_lifecycle) Document properties — “File” → “Info” → “Properties”, including the advanced ones. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------------------ | ---- | | operation | `"document_properties_lifecycle"` | yes | | `subsetId` | string | yes | | intent | [ContractDocumentPropertiesIntent](/reference/sumsheet/types-common/#contractdocumentpropertiesintent) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · document\_properties\_lifecycle** | Field | TypeScript type | Req. | | ---------- | ------------------------------------------------------------------------------------------------------ | ---- | | operation | `"document_properties_lifecycle"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | result | [ContractDocumentPropertiesResult](/reference/sumsheet/types-common/#contractdocumentpropertiesresult) | yes | **Minimal JSON template** ```json { "operation": "document_properties_lifecycle", "subsetId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## inspect\_workbook\_privacy [Section titled “inspect\_workbook\_privacy”](#inspect_workbook_privacy) Inspects a workbook’s privacy. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------------------ | ---- | | operation | `"inspect_workbook_privacy"` | yes | | `subsetId` | string | yes | | intent | [ContractPrivacyInspectorIntent](/reference/sumsheet/types-powerquery/#contractprivacyinspectorintent) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · inspect\_workbook\_privacy** | Field | TypeScript type | Req. | | ---------- | ------------------------------------------------------------------------------------------------------ | ---- | | operation | `"inspect_workbook_privacy"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | result | [ContractPrivacyInspectorResult](/reference/sumsheet/types-powerquery/#contractprivacyinspectorresult) | yes | **Minimal JSON template** ```json { "operation": "inspect_workbook_privacy", "subsetId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## merge\_workbook\_revisions [Section titled “merge\_workbook\_revisions”](#merge_workbook_revisions) Merges workbook revisions. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------------- | ---- | | operation | `"merge_workbook_revisions"` | yes | | `subsetId` | string | yes | | `workbookId` | string | yes | | `baseRevision` | number | yes | | local | [ContractWorkbookRevisionDelta](/reference/sumsheet/types-session/#contractworkbookrevisiondelta) | yes | | incoming | [ContractWorkbookRevisionDelta](/reference/sumsheet/types-session/#contractworkbookrevisiondelta) | yes | | `expectedRevision` | number | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · merge\_workbook\_revisions** | Field | TypeScript type | Req. | | ---------------------- | --------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"merge_workbook_revisions"` | yes | | `subsetId` | string | yes | | `workbookId` | string | yes | | `baseRevision` | number | yes | | `localRevision` | number | yes | | `incomingRevision` | number | yes | | outcome | [ContractWorkbookRevisionMergeOutcome](/reference/sumsheet/types-session/#contractworkbookrevisionmergeoutcome) | yes | | `appliedMutationCount` | number | yes | | conflicts | [ContractWorkbookRevisionConflict](/reference/sumsheet/types-session/#contractworkbookrevisionconflict)\[] | yes | | `changedKeys` | string\[] | yes | | dirty | boolean | yes | | `recalcNeeded` | boolean | yes | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | **Minimal JSON template** ```json { "operation": "merge_workbook_revisions", "subsetId": "", "workbookId": "", "baseRevision": 0, "local": "", "incoming": "", "expectedRevision": 0, "requestedBackend": "native-desktop" } ``` ## open\_password\_protected\_workbook\_subset [Section titled “open\_password\_protected\_workbook\_subset”](#open_password_protected_workbook_subset) Opens a password-protected workbook: the file path and password are in the request. After that, the session works just like an ordinary open. **Request** | Field | TypeScript type | Req. | | ---------------------- | ------------------------------------------------------------------------------------------------------ | ---- | | operation | “open\_password\_protected\_workbook\_subset” | yes | | `sourceUri` | string | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `delimitedOpenOptions` | [ContractDelimitedOpenOptions](/reference/sumsheet/types-common/#contractdelimitedopenoptions) \| null | no | | password | string | yes | **Minimal JSON template** ```json { "operation": "open_password_protected_workbook_subset", "sourceUri": "", "password": "" } ``` ## open\_password\_protected\_workbook\_subset\_from\_bytes [Section titled “open\_password\_protected\_workbook\_subset\_from\_bytes”](#open_password_protected_workbook_subset_from_bytes) The same for a workbook passed as bytes: the password is in the request, and the core doesn’t need file-system access. **Request** | Field | TypeScript type | Req. | | ---------------------- | ------------------------------------------------------------------------------------------------------ | ---- | | operation | “open\_password\_protected\_workbook\_subset\_from\_bytes” | yes | | `sourceName` | string | yes | | `sourceBytesBase64` | string | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `delimitedOpenOptions` | [ContractDelimitedOpenOptions](/reference/sumsheet/types-common/#contractdelimitedopenoptions) \| null | no | | password | string | yes | **Minimal JSON template** ```json { "operation": "open_password_protected_workbook_subset_from_bytes", "sourceName": "", "sourceBytesBase64": "", "password": "" } ``` ## open\_workbook\_subset [Section titled “open\_workbook\_subset”](#open_workbook_subset) Opens a workbook subset. **Request** | Field | TypeScript type | Req. | | ---------------------- | ------------------------------------------------------------------------------------------------------ | ---- | | operation | `"open_workbook_subset"` | yes | | `sourceUri` | string | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `delimitedOpenOptions` | [ContractDelimitedOpenOptions](/reference/sumsheet/types-common/#contractdelimitedopenoptions) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · open\_workbook\_subset** | Field | TypeScript type | Req. | Note from the contract | | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ---- | ---------------------------------------------------------------------------------- | | operation | `"open_workbook_subset"` | yes | | | `subsetId` | string | yes | | | `sheetCount` | number | yes | | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | | readiness | [ContractWorkbookReadiness](/reference/sumsheet/types-session/#contractworkbookreadiness) | yes | | | `formatCapabilities` | [ContractFormatCapabilities](/reference/sumsheet/types-format/#contractformatcapabilities) \| null | no | | | `xlsbDirtySaveProfile` | [ContractXlsbDirtySaveProfile](/reference/sumsheet/types-common/#contractxlsbdirtysaveprofile) \| null | no | | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | no | | | `themeFonts` | [ContractWorkbookThemeFontsProjection](/reference/sumsheet/types-session/#contractworkbookthemefontsprojection) \| null | no | | | `tableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) \| null | no | | | `workbookTableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) \| null | no | | | `worksheetAutoFilterMetadata` | [ContractWorksheetAutoFilterMetadata](/reference/sumsheet/types-data/#contractworksheetautofiltermetadata) \| null | no | | | `directionPlaceholder` | [ContractDirectionPlaceholderSubset](/reference/sumsheet/types-session/#contractdirectionplaceholdersubset) \| null | no | | | `objectStatusPlaceholder` | [ContractObjectStatusPlaceholderSubset](/reference/sumsheet/types-session/#contractobjectstatusplaceholdersubset) \| null | no | | | `surfaceObjects` | [ContractSheetObject](/reference/sumsheet/types-session/#contractsheetobject)\[] \| null | no | | | `objectInventory` | [ContractWorkbookObjectInventoryEntry](/reference/sumsheet/types-session/#contractworkbookobjectinventoryentry)\[] \| null | no | | | `inkProjection` | [ContractReviewInkProjectionItem](/reference/sumsheet/types-protection/#contractreviewinkprojectionitem)\[] \| null | no | | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | | `recalcNeeded` | boolean | yes | | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | | `conditionalFormattingRules` | [ContractConditionalRule](/reference/sumsheet/types-format/#contractconditionalrule)\[] | no | | | `dataValidationMetadata` | [ContractDataValidationMetadata](/reference/sumsheet/types-data/#contractdatavalidationmetadata) | no | | | `frozenBandCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | no | | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | | `formulaTrustSnapshot` | [ContractFormulaTrustSnapshot](/reference/sumsheet/types-formulas/#contractformulatrustsnapshot) \| null | no | | | `themeColorPalette` | string\[] | no | | | `viewportReadiness` | [ContractViewportReadiness](/reference/sumsheet/types-session/#contractviewportreadiness) | no | Data-area readiness: you can only display it after the core has declared it ready. | **Minimal JSON template** ```json { "operation": "open_workbook_subset", "sourceUri": "file:///path/book.xlsx", "requestedBackend": "native-desktop" } ``` ## open\_workbook\_subset\_from\_bytes [Section titled “open\_workbook\_subset\_from\_bytes”](#open_workbook_subset_from_bytes) Opens a workbook subset from bytes. The response will come back under a different operation’s name For an `open_workbook_subset_from_bytes` request, `payload.operation` comes back as `open_workbook_subset`. Match the response to the request by its identifier, not by the operation name — [why](/reference/sumsheet/conventions/). **Request** | Field | TypeScript type | Req. | | ---------------------- | ------------------------------------------------------------------------------------------------------ | ---- | | operation | `"open_workbook_subset_from_bytes"` | yes | | `sourceName` | string | yes | | `sourceBytesBase64` | string | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `delimitedOpenOptions` | [ContractDelimitedOpenOptions](/reference/sumsheet/types-common/#contractdelimitedopenoptions) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · open\_workbook\_subset** | Field | TypeScript type | Req. | Note from the contract | | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ---- | ---------------------------------------------------------------------------------- | | operation | `"open_workbook_subset"` | yes | | | `subsetId` | string | yes | | | `sheetCount` | number | yes | | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | | readiness | [ContractWorkbookReadiness](/reference/sumsheet/types-session/#contractworkbookreadiness) | yes | | | `formatCapabilities` | [ContractFormatCapabilities](/reference/sumsheet/types-format/#contractformatcapabilities) \| null | no | | | `xlsbDirtySaveProfile` | [ContractXlsbDirtySaveProfile](/reference/sumsheet/types-common/#contractxlsbdirtysaveprofile) \| null | no | | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | no | | | `themeFonts` | [ContractWorkbookThemeFontsProjection](/reference/sumsheet/types-session/#contractworkbookthemefontsprojection) \| null | no | | | `tableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) \| null | no | | | `workbookTableMetadata` | [ContractTableMetadataProjection](/reference/sumsheet/types-data/#contracttablemetadataprojection) \| null | no | | | `worksheetAutoFilterMetadata` | [ContractWorksheetAutoFilterMetadata](/reference/sumsheet/types-data/#contractworksheetautofiltermetadata) \| null | no | | | `directionPlaceholder` | [ContractDirectionPlaceholderSubset](/reference/sumsheet/types-session/#contractdirectionplaceholdersubset) \| null | no | | | `objectStatusPlaceholder` | [ContractObjectStatusPlaceholderSubset](/reference/sumsheet/types-session/#contractobjectstatusplaceholdersubset) \| null | no | | | `surfaceObjects` | [ContractSheetObject](/reference/sumsheet/types-session/#contractsheetobject)\[] \| null | no | | | `objectInventory` | [ContractWorkbookObjectInventoryEntry](/reference/sumsheet/types-session/#contractworkbookobjectinventoryentry)\[] \| null | no | | | `inkProjection` | [ContractReviewInkProjectionItem](/reference/sumsheet/types-protection/#contractreviewinkprojectionitem)\[] \| null | no | | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | | `recalcNeeded` | boolean | yes | | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | | `conditionalFormattingRules` | [ContractConditionalRule](/reference/sumsheet/types-format/#contractconditionalrule)\[] | no | | | `dataValidationMetadata` | [ContractDataValidationMetadata](/reference/sumsheet/types-data/#contractdatavalidationmetadata) | no | | | `frozenBandCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | no | | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | | `formulaTrustSnapshot` | [ContractFormulaTrustSnapshot](/reference/sumsheet/types-formulas/#contractformulatrustsnapshot) \| null | no | | | `themeColorPalette` | string\[] | no | | | `viewportReadiness` | [ContractViewportReadiness](/reference/sumsheet/types-session/#contractviewportreadiness) | no | Data-area readiness: you can only display it after the core has declared it ready. | **Minimal JSON template** ```json { "operation": "open_workbook_subset_from_bytes", "sourceName": "book.xlsx", "sourceBytesBase64": "", "requestedBackend": "native-desktop" } ``` ## publish\_file\_open\_recovery [Section titled “publish\_file\_open\_recovery”](#publish_file_open_recovery) Publishes recovery on file open. **Request** | Field | TypeScript type | Req. | | ------------------ | -------------------------------------------------------------------------------------- | ---- | | operation | `"publish_file_open_recovery"` | yes | | `sourceUri` | string | yes | | `destinationUri` | string | yes | | `planId` | string | yes | | mode | [ContractFileRecoveryMode](/reference/sumsheet/types-common/#contractfilerecoverymode) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · publish\_file\_open\_recovery** | Field | TypeScript type | Req. | | ----------- | ---------------------------------------------------------------------------------------------------- | ---- | | operation | `"publish_file_open_recovery"` | yes | | publication | [ContractFileRecoveryPublication](/reference/sumsheet/types-common/#contractfilerecoverypublication) | yes | **Minimal JSON template** ```json { "operation": "publish_file_open_recovery", "sourceUri": "file:///path/book.xlsx", "destinationUri": "file:///path/output.xlsx", "planId": "", "mode": "", "requestedBackend": "native-desktop" } ``` ## replay\_workbook\_history [Section titled “replay\_workbook\_history”](#replay_workbook_history) Replays a workbook’s history. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------------------- | ---- | | operation | `"replay_workbook_history"` | yes | | `subsetId` | string | yes | | direction | [ContractWorkbookHistoryDirection](/reference/sumsheet/types-session/#contractworkbookhistorydirection) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · replay\_workbook\_history** | Field | TypeScript type | Req. | | -------------- | ------------------------------------------------------------------------------------------------------- | ---- | | operation | `"replay_workbook_history"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | direction | [ContractWorkbookHistoryDirection](/reference/sumsheet/types-session/#contractworkbookhistorydirection) | yes | | `historyOwner` | [ContractWorkbookHistoryOwner](/reference/sumsheet/types-session/#contractworkbookhistoryowner) | yes | | `undoDepth` | number | yes | | `redoDepth` | number | yes | | revision | number | yes | | replayed | ComputeResponsePayload | yes | **Minimal JSON template** ```json { "operation": "replay_workbook_history", "subsetId": "", "direction": "", "requestedBackend": "native-desktop" } ``` ## save\_workbook\_subset [Section titled “save\_workbook\_subset”](#save_workbook_subset) Saves a workbook subset. **Request** | Field | TypeScript type | Req. | | ---------------------- | ------------------------------------------------------------------------------------------------------ | ---- | | operation | `"save_workbook_subset"` | yes | | `subsetId` | string | yes | | `destinationUri` | string | yes | | `preserveCachedValues` | boolean | yes | | `delimitedSaveOptions` | [ContractDelimitedSaveOptions](/reference/sumsheet/types-common/#contractdelimitedsaveoptions) \| null | no | | `xlsxSavePatch` | [ContractXlsxSavePatch](/reference/sumsheet/types-common/#contractxlsxsavepatch) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · save\_workbook\_subset** | Field | TypeScript type | Req. | | -------------- | --------------------------------------------------------------------------------------------------- | ---- | | operation | `"save_workbook_subset"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `saveRoute` | [ContractCurrentSubsetSaveRoute](/reference/sumsheet/types-session/#contractcurrentsubsetsaveroute) | yes | | `wroteBytes` | number | yes | | `recalcNeeded` | boolean | yes | **Minimal JSON template** ```json { "operation": "save_workbook_subset", "subsetId": "", "destinationUri": "file:///path/output.xlsx", "preserveCachedValues": false, "requestedBackend": "native-desktop" } ``` ## save\_workbook\_subset\_to\_bytes [Section titled “save\_workbook\_subset\_to\_bytes”](#save_workbook_subset_to_bytes) Saves a workbook subset to bytes. **Request** | Field | TypeScript type | Req. | | ---------------------- | ------------------------------------------------------------------------------------------------------ | ---- | | operation | `"save_workbook_subset_to_bytes"` | yes | | `subsetId` | string | yes | | `saveFormat` | [ContractFileFormat](/reference/sumsheet/types-format/#contractfileformat) \| null | no | | `preserveCachedValues` | boolean | yes | | `delimitedSaveOptions` | [ContractDelimitedSaveOptions](/reference/sumsheet/types-common/#contractdelimitedsaveoptions) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · save\_workbook\_subset\_to\_bytes** | Field | TypeScript type | Req. | | ---------------------- | -------------------------------------------------------------------------------------------------------- | ---- | | operation | `"save_workbook_subset_to_bytes"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `saveRoute` | [ContractCurrentSubsetSaveRoute](/reference/sumsheet/types-session/#contractcurrentsubsetsaveroute) | yes | | `formulaTrustSnapshot` | [ContractFormulaTrustSnapshot](/reference/sumsheet/types-formulas/#contractformulatrustsnapshot) \| null | no | | `savedFormat` | [ContractFileFormat](/reference/sumsheet/types-format/#contractfileformat) | yes | | `byteCount` | number | yes | | `bytesBase64` | string | yes | | `recalcNeeded` | boolean | yes | **Minimal JSON template** ```json { "operation": "save_workbook_subset_to_bytes", "subsetId": "", "preserveCachedValues": false, "requestedBackend": "native-desktop" } ``` ## synchronize\_workbook\_viewport [Section titled “synchronize\_workbook\_viewport”](#synchronize_workbook_viewport) Synchronizes a workbook’s visible area. **Request** | Field | TypeScript type | Req. | Note from the contract | | ----------------------------- | ---------------------------------------------------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------ | | operation | `"synchronize_workbook_viewport"` | yes | | | `subsetId` | string | yes | | | `sourceUri` | string | yes | | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | | `recordHistory` | false | yes | A view change isn’t a user edit and doesn’t go into the history. | | `expectedReadinessGeneration` | number \| null | no | Omitting this field belongs only in old code. The normal approach is to tie the display to the data generation you saw before the request. | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | | **Response on success · synchronize\_workbook\_viewport** | Field | TypeScript type | Req. | Note from the contract | | ------------------- | --------------------------------------------------------------------------------------------------------------------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | | operation | `"synchronize_workbook_viewport"` | yes | | | `subsetId` | string | yes | | | `viewportReadiness` | [ContractViewportReadiness](/reference/sumsheet/types-session/#contractviewportreadiness) | yes | | | projection | [OpenWorkbookSubsetProjectionPayload](/reference/sumsheet/types-session/#openworkbooksubsetprojectionpayload) \| null | no | Present only when `state=ready`. In responses about a deferred, canceled, superseded, or failed request, there’s never an empty state passed off as ready data. | **Minimal JSON template** ```json { "operation": "synchronize_workbook_viewport", "subsetId": "", "sourceUri": "file:///path/book.xlsx", "recordHistory": false, "requestedBackend": "native-desktop" } ``` ## workbook\_accessibility [Section titled “workbook\_accessibility”](#workbook_accessibility) Workbook accessibility: an inventory of issues and fixing them within given bounds. **Request** | Field | TypeScript type | Req. | | -------------------- | ------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"workbook_accessibility"` | yes | | `subsetId` | string | yes | | `requestId` | string | yes | | `expectedRevision` | number | yes | | `expectedGeneration` | number | yes | | `readOnly` | boolean | no | | protected | boolean | no | | intent | [ContractWorkbookAccessibilityIntent](/reference/sumsheet/types-session/#contractworkbookaccessibilityintent) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · workbook\_accessibility** | Field | TypeScript type | Req. | | ---------- | ------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"workbook_accessibility"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | result | [ContractWorkbookAccessibilityResult](/reference/sumsheet/types-session/#contractworkbookaccessibilityresult) | yes | **Minimal JSON template** ```json { "operation": "workbook_accessibility", "subsetId": "", "requestId": "", "expectedRevision": 0, "expectedGeneration": 0, "intent": "", "requestedBackend": "native-desktop" } ``` ## workbook\_links\_manager [Section titled “workbook\_links\_manager”](#workbook_links_manager) Links to other workbooks: an inventory of local external links and their lifecycle. **Request** | Field | TypeScript type | Req. | | ------------------ | --------------------------------------------------------------------------------------------- | ---- | | operation | `"workbook_links_manager"` | yes | | `subsetId` | string | yes | | intent | [ContractWorkbookLinksIntent](/reference/sumsheet/types-session/#contractworkbooklinksintent) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · workbook\_links\_manager** | Field | TypeScript type | Req. | | ---------- | --------------------------------------------------------------------------------------------- | ---- | | operation | `"workbook_links_manager"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | result | [ContractWorkbookLinksResult](/reference/sumsheet/types-session/#contractworkbooklinksresult) | yes | **Minimal JSON template** ```json { "operation": "workbook_links_manager", "subsetId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## workbook\_window\_session\_command [Section titled “workbook\_window\_session\_command”](#workbook_window_session_command) Workbook and window: what the core owns within a single contract, and which commands are projected outward. **Request** | Field | TypeScript type | Req. | | ------------------ | ------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"workbook_window_session_command"` | yes | | `subsetId` | string | yes | | intent | [ContractWorkbookWindowSessionAction](/reference/sumsheet/types-session/#contractworkbookwindowsessionaction) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · workbook\_window\_session\_command** | Field | TypeScript type | Req. | | ---------- | --------------------------------------------------------------------------------------------------------------------- | ---- | | operation | `"workbook_window_session_command"` | yes | | projection | [ContractWorkbookWindowSessionProjection](/reference/sumsheet/types-session/#contractworkbookwindowsessionprojection) | yes | **Minimal JSON template** ```json { "operation": "workbook_window_session_command", "subsetId": "", "intent": "", "requestedBackend": "native-desktop" } ``` # Sheets > Sheet lifecycle, copying between workbooks, visibility, protection, and freezing panes. Operations on this page: 17. Sheet lifecycle, copying between workbooks, visibility, protection, and freezing panes. Terms are in the [glossary](/start/glossary/). Undoing sheet deletion — one step back `undo_delete_sheet_bounded` doesn’t restore just any deleted sheet, only the last one: there’s exactly one slot reserved for it, and it’s freed as soon as the undo is used. There’s no going back two steps. This undo lives within the current session and only on the `.xlsx` package path. The wrong path gets the refusal `bounded-sheet-undo-delete-route-not-live`; nothing to restore gets `bounded-sheet-undo-delete-empty`. **Operations on this page — 17** * [`apply_freeze_pane`](#apply_freeze_pane) * [`copy_sheet_bounded`](#copy_sheet_bounded) * [`copy_sheet_to_workbook_bounded`](#copy_sheet_to_workbook_bounded) * [`copy_sheet_values_only_bounded`](#copy_sheet_values_only_bounded) * [`create_sheet_bounded`](#create_sheet_bounded) * [`custom_views_manager`](#custom_views_manager) * [`delete_sheet_bounded`](#delete_sheet_bounded) * [`move_sheet_to_workbook_bounded`](#move_sheet_to_workbook_bounded) * [`redo_sheet_lifecycle_bounded`](#redo_sheet_lifecycle_bounded) * [`rename_sheet_bounded`](#rename_sheet_bounded) * [`reorder_sheet_bounded`](#reorder_sheet_bounded) * [`set_sheet_code_name_bounded`](#set_sheet_code_name_bounded) * [`set_sheet_right_to_left_bounded`](#set_sheet_right_to_left_bounded) * [`set_sheet_tab_color_bounded`](#set_sheet_tab_color_bounded) * [`set_sheet_visibility_bounded`](#set_sheet_visibility_bounded) * [`undo_delete_sheet_bounded`](#undo_delete_sheet_bounded) * [`undo_sheet_lifecycle_bounded`](#undo_sheet_lifecycle_bounded) ## apply\_freeze\_pane [Section titled “apply\_freeze\_pane”](#apply_freeze_pane) Applies freezing panes. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"apply_freeze_pane"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | row | number | yes | | col | number | yes | | frozen | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · apply\_freeze\_pane** | Field | TypeScript type | Req. | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---- | | operation | `"apply_freeze_pane"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | frozen | boolean | yes | | `topLeftCell` | string \| null | no | | `xSplit` | number \| null | no | | `ySplit` | number \| null | no | | `changedFreezePane` | boolean | yes | | `dirtyCellCount` | number | yes | | `currentSourceSaveReadiness` | [ContractCurrentSourceSaveReadiness](/reference/sumsheet/types-common/#contractcurrentsourcesavereadiness) \| null | no | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) | yes | **Minimal JSON template** ```json { "operation": "apply_freeze_pane", "subsetId": "", "sheetKey": "", "row": 0, "col": 0, "frozen": false, "requestedBackend": "native-desktop" } ``` ## copy\_sheet\_bounded [Section titled “copy\_sheet\_bounded”](#copy_sheet_bounded) Copies a sheet within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"copy_sheet_bounded"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | name | string | yes | | `targetIndex` | number \| null | no | | `expectedRevision` | number \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · copy\_sheet\_bounded** | Field | TypeScript type | Req. | | ---------------------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"copy_sheet_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `sourceSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `copiedSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `sheetCopyClaim` | `"live_verified"` | yes | | `copyScope` | `"same_workbook_cell_formula_style_merge_layout_and_safe_sheet_metadata"` | yes | | `copiedSheetIdentityNew` | true | yes | | `copiedSheetValuesPreserved` | true | yes | | `formulaCopyClaim` | `"live_verified"` | yes | | `formulaCopyScope` | `"same_sheet_formula_text_and_cached_value_preserved"` | yes | | `styleCopyClaim` | `"live_verified"` | yes | | `styleCopyScope` | `"existing_workbook_style_indexes_preserved"` | yes | | `mergeLayoutCopyClaim` | `"live_verified"` | yes | | `mergeLayoutCopyScope` | `"row_column_geometry_merges_freeze_views_tables_and_safe_sheet_xml_preserved"` | yes | | `pqOutputTargetCopyClaim` | `"no"` | yes | | `vbaModuleCopyClaim` | `"no"` | yes | | `broadWorkbookCloneClaim` | `"no"` | yes | **Minimal JSON template** ```json { "operation": "copy_sheet_bounded", "subsetId": "", "sheetKey": "", "name": "", "requestedBackend": "native-desktop" } ``` ## copy\_sheet\_to\_workbook\_bounded [Section titled “copy\_sheet\_to\_workbook\_bounded”](#copy_sheet_to_workbook_bounded) Copies a sheet into another workbook, within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"copy_sheet_to_workbook_bounded"` | yes | | `sourceSubsetId` | string | yes | | `targetSubsetId` | string | yes | | `sourceSheetKey` | string | yes | | name | string | yes | | `targetViewport` | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · copy\_sheet\_to\_workbook\_bounded** | Field | TypeScript type | Req. | | ---------------------------- | ----------------------------------------------------------------------------------------------------- | ---- | | operation | `"copy_sheet_to_workbook_bounded"` | yes | | `sourceSubsetId` | string | yes | | `targetSubsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `sourceSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `copiedSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `targetActiveSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `targetSheetCount` | number | yes | | `targetWorkbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | `targetGeometry` | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `targetRecalcNeeded` | boolean | yes | | `targetViewport` | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `targetPreviewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `targetLayoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `sheetCopyClaim` | `"live_verified"` | yes | | `copyScope` | `"bounded_cross_workbook_cell_formula_style_merge_layout"` | yes | | `copiedSheetIdentityNew` | true | yes | | `copiedSheetValuesPreserved` | true | yes | | `formulaCopyClaim` | `"live_verified"` | yes | | `formulaCopyScope` | `"same_sheet_formula_text_and_cached_value_preserved"` | yes | | `styleCopyClaim` | `"live_verified"` | yes | | `styleCopyScope` | `"existing_target_workbook_style_indexes_preserved"` | yes | | `mergeLayoutCopyClaim` | `"live_verified"` | yes | | `mergeLayoutCopyScope` | `"row_column_geometry_merges_and_freeze_preserved"` | yes | | `pqOutputTargetCopyClaim` | `"no"` | yes | | `vbaModuleCopyClaim` | `"no"` | yes | | `broadWorkbookCloneClaim` | `"no"` | yes | **Minimal JSON template** ```json { "operation": "copy_sheet_to_workbook_bounded", "sourceSubsetId": "", "targetSubsetId": "", "sourceSheetKey": "", "name": "", "requestedBackend": "native-desktop" } ``` ## copy\_sheet\_values\_only\_bounded [Section titled “copy\_sheet\_values\_only\_bounded”](#copy_sheet_values_only_bounded) Copies a sheet without formulas, as values only, within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"copy_sheet_values_only_bounded"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | name | string | yes | | `expectedRevision` | number \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · copy\_sheet\_values\_only\_bounded** | Field | TypeScript type | Req. | | ---------------------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"copy_sheet_values_only_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `sourceSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `copiedSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `sheetCopyClaim` | `"live_verified"` | yes | | `copyScope` | `"values_only_same_workbook_sheet"` | yes | | `copiedSheetIdentityNew` | true | yes | | `copiedSheetValuesPreserved` | true | yes | | `formulaCopyClaim` | `"no"` | yes | | `styleCopyClaim` | `"no"` | yes | | `mergeLayoutCopyClaim` | `"no"` | yes | | `pqOutputTargetCopyClaim` | `"no"` | yes | | `vbaModuleCopyClaim` | `"no"` | yes | | `broadWorkbookCloneClaim` | `"no"` | yes | **Minimal JSON template** ```json { "operation": "copy_sheet_values_only_bounded", "subsetId": "", "sheetKey": "", "name": "", "requestedBackend": "native-desktop" } ``` ## create\_sheet\_bounded [Section titled “create\_sheet\_bounded”](#create_sheet_bounded) Creates a sheet within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"create_sheet_bounded"` | yes | | `subsetId` | string | yes | | name | string | yes | | `targetIndex` | number \| null | no | | `expectedRevision` | number \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · create\_sheet\_bounded** | Field | TypeScript type | Req. | | ------------------------------------ | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"create_sheet_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `createdSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `sheetCreateClaim` | `"live_verified"` | yes | | `sheetCopyClaim` | `"live_verified"` | yes | | `deleteReferencedSheetClaim` | `"blocked_truthful_boundary"` | yes | | `formulaReferenceDeleteRewriteClaim` | `"no"` | yes | **Minimal JSON template** ```json { "operation": "create_sheet_bounded", "subsetId": "", "name": "", "requestedBackend": "native-desktop" } ``` ## custom\_views\_manager [Section titled “custom\_views\_manager”](#custom_views_manager) Workbook views: checking and planning an atomic edit to the workbook and its package. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------------- | ---- | | operation | `"custom_views_manager"` | yes | | `subsetId` | string | yes | | intent | [ContractCustomViewsIntent](/reference/sumsheet/types-common/#contractcustomviewsintent) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · custom\_views\_manager** | Field | TypeScript type | Req. | | ---------- | ----------------------------------------------------------------------------------------- | ---- | | operation | `"custom_views_manager"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | result | [ContractCustomViewsResult](/reference/sumsheet/types-common/#contractcustomviewsresult) | yes | **Minimal JSON template** ```json { "operation": "custom_views_manager", "subsetId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## delete\_sheet\_bounded [Section titled “delete\_sheet\_bounded”](#delete_sheet_bounded) Deletes a sheet within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"delete_sheet_bounded"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | `expectedRevision` | number \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · delete\_sheet\_bounded** | Field | TypeScript type | Req. | | ------------------------------------ | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"delete_sheet_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `deletedSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `sheetDeleteClaim` | `"live_verified"` | yes | | `deleteScope` | `"unreferenced_bounded_sheet_only"` | yes | | `deleteReferencedSheetClaim` | `"blocked_truthful_boundary"` | yes | | `sheetCopyClaim` | `"live_verified"` | yes | | `formulaReferenceDeleteRewriteClaim` | `"no"` | yes | **Minimal JSON template** ```json { "operation": "delete_sheet_bounded", "subsetId": "", "sheetKey": "", "requestedBackend": "native-desktop" } ``` ## move\_sheet\_to\_workbook\_bounded [Section titled “move\_sheet\_to\_workbook\_bounded”](#move_sheet_to_workbook_bounded) Moves a sheet into another workbook, within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"move_sheet_to_workbook_bounded"` | yes | | `sourceSubsetId` | string | yes | | `targetSubsetId` | string | yes | | `sourceSheetKey` | string | yes | | name | string | yes | | `sourceViewport` | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `targetViewport` | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · move\_sheet\_to\_workbook\_bounded** | Field | TypeScript type | Req. | | ---------------------------------- | ----------------------------------------------------------------------------------------------------- | ---- | | operation | `"move_sheet_to_workbook_bounded"` | yes | | `sourceSubsetId` | string | yes | | `targetSubsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | `targetDelta` | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `sourceDelta` | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `sourceSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `movedSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sourceActiveSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sourceSheetCount` | number | yes | | `sourceWorkbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | `sourceGeometry` | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `sourceRecalcNeeded` | boolean | yes | | `sourceViewport` | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `sourcePreviewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `sourceLayoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `targetActiveSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `targetSheetCount` | number | yes | | `targetWorkbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | `targetGeometry` | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `targetRecalcNeeded` | boolean | yes | | `targetViewport` | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `targetPreviewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `targetLayoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `sheetMoveClaim` | `"live_verified"` | yes | | `moveScope` | `"bounded_cross_workbook_unreferenced_sheet_cell_formula_style_merge_layout"` | yes | | `sourceSheetRemoved` | true | yes | | `targetSheetIdentityNew` | true | yes | | `movedSheetValuesPreserved` | true | yes | | `formulaCopyClaim` | `"live_verified"` | yes | | `formulaCopyScope` | `"same_sheet_formula_text_and_cached_value_preserved"` | yes | | `styleCopyClaim` | `"live_verified"` | yes | | `styleCopyScope` | `"existing_target_workbook_style_indexes_preserved"` | yes | | `mergeLayoutCopyClaim` | `"live_verified"` | yes | | `mergeLayoutCopyScope` | `"row_column_geometry_merges_and_freeze_preserved"` | yes | | `formulaReferenceMoveRewriteClaim` | `"no"` | yes | | `pqOutputTargetCopyClaim` | `"no"` | yes | | `vbaModuleCopyClaim` | `"no"` | yes | | `broadWorkbookCloneClaim` | `"no"` | yes | **Minimal JSON template** ```json { "operation": "move_sheet_to_workbook_bounded", "sourceSubsetId": "", "targetSubsetId": "", "sourceSheetKey": "", "name": "", "requestedBackend": "native-desktop" } ``` ## redo\_sheet\_lifecycle\_bounded [Section titled “redo\_sheet\_lifecycle\_bounded”](#redo_sheet_lifecycle_bounded) Redoes a sheet-lifecycle action within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"redo_sheet_lifecycle_bounded"` | yes | | `subsetId` | string | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · redo\_sheet\_lifecycle\_bounded** | Field | TypeScript type | Req. | | ------------------------- | ----------------------------------------------------------------------------------------------------- | ---- | | operation | `"redo_sheet_lifecycle_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | `sheetName` | string | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `sheetLifecycleRedoClaim` | `"live_verified"` | yes | | `redoScope` | `"last_undone_current_workbook_sheet_move_or_copy_snapshot_current_session"` | yes | **Minimal JSON template** ```json { "operation": "redo_sheet_lifecycle_bounded", "subsetId": "", "requestedBackend": "native-desktop" } ``` ## rename\_sheet\_bounded [Section titled “rename\_sheet\_bounded”](#rename_sheet_bounded) Renames a sheet within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"rename_sheet_bounded"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | `newName` | string | yes | | `expectedRevision` | number \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · rename\_sheet\_bounded** | Field | TypeScript type | Req. | | --------------------------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"rename_sheet_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `renamedSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `sheetRenameClaim` | `"live_verified"` | yes | | `formulaReferenceAutoUpdateClaim` | `"live_verified"` | yes | | `formulaReferenceBehavior` | `"updated_truthfully"` | yes | **Minimal JSON template** ```json { "operation": "rename_sheet_bounded", "subsetId": "", "sheetKey": "", "newName": "", "requestedBackend": "native-desktop" } ``` ## reorder\_sheet\_bounded [Section titled “reorder\_sheet\_bounded”](#reorder_sheet_bounded) Reorders a sheet within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"reorder_sheet_bounded"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | `targetIndex` | number | yes | | `expectedRevision` | number \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · reorder\_sheet\_bounded** | Field | TypeScript type | Req. | | -------------------------------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"reorder_sheet_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `movedSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `previousIndex` | number | yes | | `targetIndex` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `sheetReorderClaim` | `"live_verified"` | yes | | `reorderScope` | `"same_workbook_sheet_order_only"` | yes | | `sheetIdentityPreservedAfterReorder` | true | yes | | `formulaReferencePositionRewriteClaim` | `"no"` | yes | | `formulaReferencesRemainIdentityBased` | true | yes | | `sheetCopyClaim` | `"live_verified"` | yes | **Minimal JSON template** ```json { "operation": "reorder_sheet_bounded", "subsetId": "", "sheetKey": "", "targetIndex": 0, "requestedBackend": "native-desktop" } ``` ## set\_sheet\_code\_name\_bounded [Section titled “set\_sheet\_code\_name\_bounded”](#set_sheet_code_name_bounded) Sets a sheet’s code name within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"set_sheet_code_name_bounded"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | `codeName` | string | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · set\_sheet\_code\_name\_bounded** | Field | TypeScript type | Req. | | -------------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"set_sheet_code_name_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `changedSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `previousCodeName` | string \| null | yes | | `codeName` | string | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `sheetCodeNameClaim` | `"live_verified"` | yes | | `codeNameScope` | `"same_workbook_worksheet_sheetPr_codeName"` | yes | **Minimal JSON template** ```json { "operation": "set_sheet_code_name_bounded", "subsetId": "", "sheetKey": "", "codeName": "", "requestedBackend": "native-desktop" } ``` ## set\_sheet\_right\_to\_left\_bounded [Section titled “set\_sheet\_right\_to\_left\_bounded”](#set_sheet_right_to_left_bounded) Sets right-to-left text on a sheet, within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"set_sheet_right_to_left_bounded"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | `rightToLeft` | boolean | yes | | `expectedRevision` | number \| null | no | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · set\_sheet\_right\_to\_left\_bounded** | Field | TypeScript type | Req. | | ----------------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"set_sheet_right_to_left_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `changedSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `previousRightToLeft` | boolean \| null | yes | | `rightToLeft` | boolean | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `sheetRightToLeftClaim` | `"live_verified"` | yes | | `rightToLeftScope` | `"same_workbook_worksheet_sheetView_rightToLeft"` | yes | **Minimal JSON template** ```json { "operation": "set_sheet_right_to_left_bounded", "subsetId": "", "sheetKey": "", "rightToLeft": false, "requestedBackend": "native-desktop" } ``` ## set\_sheet\_tab\_color\_bounded [Section titled “set\_sheet\_tab\_color\_bounded”](#set_sheet_tab_color_bounded) Sets a sheet tab’s color within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"set_sheet_tab_color_bounded"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | rgb | string \| null | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · set\_sheet\_tab\_color\_bounded** | Field | TypeScript type | Req. | | --------------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"set_sheet_tab_color_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `changedSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `previousTabColorRgb` | string \| null | yes | | `tabColorRgb` | string \| null | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `sheetTabColorClaim` | `"live_verified"` | yes | | `tabColorScope` | `"same_workbook_worksheet_sheetPr_tabColor_rgb"` | yes | **Minimal JSON template** ```json { "operation": "set_sheet_tab_color_bounded", "subsetId": "", "sheetKey": "", "rgb": "", "requestedBackend": "native-desktop" } ``` ## set\_sheet\_visibility\_bounded [Section titled “set\_sheet\_visibility\_bounded”](#set_sheet_visibility_bounded) Sets a sheet’s visibility within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ----------------------------------------------------------------------------------------------- | ---- | | operation | `"set_sheet_visibility_bounded"` | yes | | `subsetId` | string | yes | | `sheetKey` | string | yes | | `visibilityState` | [ContractSheetVisibilityState](/reference/sumsheet/types-session/#contractsheetvisibilitystate) | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · set\_sheet\_visibility\_bounded** | Field | TypeScript type | Req. | | --------------------------- | --------------------------------------------------------------------------------------------------------- | ---- | | operation | `"set_sheet_visibility_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `changedSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `previousVisibilityState` | [ContractSheetVisibilityState](/reference/sumsheet/types-session/#contractsheetvisibilitystate) | yes | | `visibilityState` | [ContractSheetVisibilityState](/reference/sumsheet/types-session/#contractsheetvisibilitystate) | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `workbookHistory` | [ContractWorkbookHistoryProjection](/reference/sumsheet/types-session/#contractworkbookhistoryprojection) | yes | | `sheetVisibilityClaim` | `"live_verified"` | yes | | `visibilityScope` | `"same_workbook_visible_hidden_very_hidden"` | yes | | `veryHiddenClaim` | `"live_verified"` | yes | | `lastVisibleSheetHideClaim` | `"blocked_truthful_boundary"` | yes | **Minimal JSON template** ```json { "operation": "set_sheet_visibility_bounded", "subsetId": "", "sheetKey": "", "visibilityState": "", "requestedBackend": "native-desktop" } ``` ## undo\_delete\_sheet\_bounded [Section titled “undo\_delete\_sheet\_bounded”](#undo_delete_sheet_bounded) Undoes sheet deletion within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"undo_delete_sheet_bounded"` | yes | | `subsetId` | string | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · undo\_delete\_sheet\_bounded** | Field | TypeScript type | Req. | | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | ---- | | operation | `"undo_delete_sheet_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `restoredSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `restoredIndex` | number | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `sheetUndoDeleteClaim` | `"live_verified"` | yes | | `undoDeleteScope` | `"last_unreferenced_bounded_sheet_current_session"` | yes | | `undoDeletePersistenceClaim` | `"save_reopen_after_restore_live"` | yes | | `formulaReferenceDeleteRewriteClaim` | `"no"` | yes | **Minimal JSON template** ```json { "operation": "undo_delete_sheet_bounded", "subsetId": "", "requestedBackend": "native-desktop" } ``` ## undo\_sheet\_lifecycle\_bounded [Section titled “undo\_sheet\_lifecycle\_bounded”](#undo_sheet_lifecycle_bounded) Undoes a sheet-lifecycle action within given bounds. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"undo_sheet_lifecycle_bounded"` | yes | | `subsetId` | string | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · undo\_sheet\_lifecycle\_bounded** | Field | TypeScript type | Req. | | ------------------------- | ----------------------------------------------------------------------------------------------------- | ---- | | operation | `"undo_sheet_lifecycle_bounded"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | `supportedSubset` | string | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | action | string | yes | | `sheetName` | string | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | `sheetCount` | number | yes | | `workbookSheets` | [ContractWorkbookSheetMeta](/reference/sumsheet/types-session/#contractworkbooksheetmeta)\[] | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | | `layoutMetrics` | [ContractLayoutMetricsSubset](/reference/sumsheet/types-session/#contractlayoutmetricssubset) \| null | no | | `sheetLifecycleUndoClaim` | `"live_verified"` | yes | | `undoScope` | `"last_current_workbook_sheet_move_or_copy_snapshot_current_session"` | yes | **Minimal JSON template** ```json { "operation": "undo_sheet_lifecycle_bounded", "subsetId": "", "requestedBackend": "native-desktop" } ``` # SumSheet transport and message format > The request and response format, choosing a runtime, and handling refusals. The processor is launched with the `compute_contract_cli --session` command. After the greeting line, it accepts one JSON request per line and responds with one line for each. The browser uses the same format — through a session call in WebAssembly. Not every incoming line is a response to your request. For an operation that needs the network, the processor writes a counter-line with a `kind` field and its own `id`, and stops until it gets a response with the same `id`: it has no network of its own, and reaches out to you for `https` and for connecting to Postgres or SQL Server. Sort incoming lines by `kind`; the processor has no timeout of its own, and watching the clock is your job. In detail — [how the session works](/sumsheet/session/) and [what depends on the build](/reference/sumsheet/conventions/#what-depends-on-the-build-not-the-workbook). ```bash # the path inside the installed application — see “SumSheet installation” "$F1_CLI" --session ``` Common request fields | Field | TypeScript type | Req. | What it is | | ------------------ | ------------------------------------------------------------ | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------- | | `operation` | `ComputeRequest["operation"]` | yes | The operation name; the core uses it to decide what to do. | | `requestedBackend` | `"wasm"` \| `"native-desktop"` \| `"service-host"` \| `null` | no | Where you’re asking the request to run. | | `requestId` | `string` | no | Your request number. The core returns it in the response unchanged — that’s how a response is tied to a request by identity, not by arrival order. | Response on success — `ComputeSuccessEnvelope` | Field | TypeScript type | Req. | What it is | | ------------------ | -------------------------------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ok` | `true` | yes | The request was executed. | | `requestId` | `string` | no | The same number you sent. | | `requestedBackend` | `ComputeBackendKind` | yes | Where you asked it to run. | | `backendUsed` | `ComputeBackendKind` | yes | Where it actually ran. | | `fallbackUsed` | `boolean` | yes | `true` if the requested runtime was unavailable and the core ran the request in a different one. | | `warnings` | `ComputeWarning[]` | yes | Warnings: they don’t affect success, but two of them change how you should write your code: after opening a large workbook, its size fields may describe less than the whole sheet, and formula values may arrive exactly as Excel last saved them. [What kinds there are](/sumsheet/session/). | | `responsiveRecalc` | `ContractResponsiveRecalcSnapshot` \| `null` | no | The state of background recalculation at the moment of the response, if it’s enabled. | | `payload` | `ComputeResponsePayload` | yes | The result of the operation itself; its shape is different for every operation. | Response on refusal — `ComputeErrorEnvelope` | Field | TypeScript type | Req. | What it is | | ---------------------- | -------------------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ok` | `false` | yes | The request was rejected; the workbook didn’t change. | | `requestId` | `string` | no | The same number you sent. | | `requestedBackend` | `ComputeBackendKind` | yes | Where you asked it to run. | | `backendUsed` | `ComputeBackendKind` | yes | Where it actually ran. | | `fallbackUsed` | `boolean` | yes | `true` if the requested runtime was unavailable and the core ran the request in a different one. | | `warnings` | `ComputeWarning[]` | yes | Warnings: they don’t affect success, but two of them change how you should write your code: after opening a large workbook, its size fields may describe less than the whole sheet, and formula values may arrive exactly as Excel last saved them. [What kinds there are](/sumsheet/session/). | | `code` | `string` | yes | The refusal code — a stable string you use to tell refusals apart in code. The field’s type is exactly `string`, and that’s not a simplification: the contract doesn’t declare a closed list of codes; they arise at the point of refusal. Branch on the ones you need, and keep a default branch: an unfamiliar code is business as usual, not a sign of breakage. | | `message` | `string` | yes | An explanation in words. | | `details` | `string` \| `null` | no | Details, if the core has anything to add. | | `dataValidationSource` | `ContractDataValidationSourceValidation` \| `null` | no | Filled in when the refusal is caused by data validation: which field wasn’t accepted, and why. | | `calculationStatus` | `ContractCalculationStatus` \| `null` | no | The calculation state, if the refusal is related to it. | Refusal codes The contract declares `code` as a plain string, not a closed list of values. So what’s described here is the exact response schema, not a list of every possible code: there simply isn’t one. The codes that matter for your work are declared by whichever part of the core is responsible for that specific operation. ## What the two envelope types consist of [Section titled “What the two envelope types consist of”](#what-the-two-envelope-types-consist-of) Their names appear in both tables above, but they don’t have their own pages in the catalog: the catalog describes operation data, and these are types of the envelope itself. **`ComputeWarning`** — a single warning: | Field | TypeScript type | Req. | What it is | | --------- | ------------------ | ---- | ------------------------------------------------ | | `code` | `string` | yes | The warning code — a stable string to branch on. | | `message` | `string` | yes | An explanation in words. | | `details` | `string` \| `null` | no | Details, if the core has anything to add. | It’s built the same way as a refusal, and you tell them apart not by their shape but by the envelope’s `ok` field: a warning can arrive on success too. **`ContractResponsiveRecalcSnapshot`** — the state of background recalculation: | Field | TypeScript type | Req. | What it is | | --------------------------- | ------------------------------------------- | ---- | ---------------------------------------------------------------------------------------------------------- | | `enabled` | `boolean` | yes | Whether background recalculation is enabled at all. | | `latestGeneration` | `number` | yes | The number of the last requested recalculation. | | `committedGeneration` | `number` | yes | The number of the last one completed. | | `pendingGeneration` | `number` \| `null` | no | The number of the one being computed right now. | | `status` | `ContractResponsiveRecalcStatus` | yes | State: computing, ready, canceled. | | `trigger` | `ContractResponsiveRecalcTrigger` \| `null` | no | What started it. | | `scope` | `ContractResponsiveRecalcScope` \| `null` | no | How wide a scope the recalculation covers. | | `supersededGenerationCount` | `number` | yes | How many recalculations were superseded by newer ones. | | `staleCommitRejectionCount` | `number` | yes | How many times a finished recalculation was discarded: the workbook moved on while it was still computing. | | `note` | `string` | yes | An explanation in words — for showing to a person, not for branching on. | Comparing `latestGeneration` with `committedGeneration` tells you whether recalculation has caught up with the latest edit: equal means it has. # Types: cells and ranges > Compute Contract type definitions — addressing, content, clipboard, search, sorting, and edit history. Names: 22. Definitions of the names from the “TypeScript type” column on the operation pages. Other dictionary topics: [session, workbook, and sheets](/reference/sumsheet/types-session/) · **cells and ranges** · [formulas and calculation](/reference/sumsheet/types-formulas/) · [formatting](/reference/sumsheet/types-format/) · [data and sheet objects](/reference/sumsheet/types-data/) · [pivot tables](/reference/sumsheet/types-pivot/) · [charts and graphics](/reference/sumsheet/types-charts/) · [printing and page layout](/reference/sumsheet/types-print/) · [Power Query](/reference/sumsheet/types-powerquery/) · [VBA and macros](/reference/sumsheet/types-vba/) · [protection and review](/reference/sumsheet/types-protection/) · [general and utility](/reference/sumsheet/types-common/). **Types on this page — 22** * [`CellAnchor`](#cellanchor) * [`CellInputEdit`](#cellinputedit) * [`CellRange`](#cellrange) * [`CellRect`](#cellrect) * [`ContractCellDetails`](#contractcelldetails) * [`ContractEntityCellMetadata`](#contractentitycellmetadata) * [`ContractFindIndexStats`](#contractfindindexstats) * [`ContractFindLookIn`](#contractfindlookin) * [`ContractFindMatch`](#contractfindmatch) * [`ContractFindScope`](#contractfindscope) * [`ContractFindSearchOrder`](#contractfindsearchorder) * [`ContractFormControlLinkedCellWrite`](#contractformcontrollinkedcellwrite) * [`ContractObjectAnchorCell`](#contractobjectanchorcell) * [`ContractOpenDocumentReplacementRange`](#contractopendocumentreplacementrange) * [`ContractParameterNumericRange`](#contractparameternumericrange) * [`ContractPreviewCell`](#contractpreviewcell) * [`ContractWhatIfCellRef`](#contractwhatifcellref) * [`ContractXlsxCellCopyPatch`](#contractxlsxcellcopypatch) * [`ContractXlsxCellShiftDirection`](#contractxlsxcellshiftdirection) * [`ContractXlsxCellShiftPatch`](#contractxlsxcellshiftpatch) * [`DeltaSummary`](#deltasummary) * [`SourceCellDescriptor`](#sourcecelldescriptor) ### CellAnchor [Section titled “CellAnchor”](#cellanchor) ```ts interface CellAnchor { row: number; col: number; } ``` ### CellInputEdit [Section titled “CellInputEdit”](#cellinputedit) ```ts type CellInputEdit = | { inputKind: "sheet-protection"; sheetKey: string; row: number; col: number; protected: boolean; } | { inputKind: "fill-series"; sheetKey: string; row: number; col: number; rowEnd: number; colEnd: number; axis: "rows" | "columns"; seriesType: | "linear" | "growth" | "date" | "autofill" | "fill-down" | "fill-up" | "fill-left" | "fill-right"; dateUnit: "day" | "weekday" | "month" | "year"; stepValue: string; stopValue?: string | null; } | { inputKind: "drag-fill"; sheetKey: string; row: number; col: number; rowEnd: number; colEnd: number; sourceRow: number; sourceCol: number; sourceRowEnd: number; sourceColEnd: number; axis: "rows" | "columns"; } | { inputKind: "prepared-cell"; sheetKey: string; row: number; col: number; raw: string; display: string; formula?: string | null; cellType?: string | null; styleIndex?: number | null; richTextRuns?: ContractRichTextRun[]; } | { inputKind: "raw-user-input"; sheetKey: string; row: number; col: number; input: string; locale?: string; } | { inputKind: "number"; sheetKey: string; row: number; col: number; input: string; } | { inputKind: "text"; sheetKey: string; row: number; col: number; input: string; } | { inputKind: "empty-string"; sheetKey: string; row: number; col: number; } | { inputKind: "clear-to-blank"; sheetKey: string; row: number; col: number; } | { inputKind: "clear-formatting"; sheetKey: string; row: number; col: number; } | { inputKind: "formula"; sheetKey: string; row: number; col: number; input: string; } | { inputKind: "legacy-array-formula"; sheetKey: string; row: number; col: number; input: string; refRange: string; } | { inputKind: "formatting"; sheetKey: string; row: number; col: number; fillColor?: string; fontColor?: string; numberFormat?: string; fontFamily?: string; fontSize?: number; bold?: boolean; italic?: boolean; fontVerticalAlign?: ContractPreviewFontVerticalAlign; underlineKind?: ContractPreviewUnderlineKind; underline?: boolean; strike?: boolean; horizontalAlign?: string | null; verticalAlign?: string | null; wrapText?: boolean; shrinkToFit?: boolean; locked?: boolean; hidden?: boolean; diagonalUp?: boolean; diagonalDown?: boolean; borderPreset?: | "all" | "none" | "bottom" | "top" | "left" | "right" | "outside-thin-all" | "outside-thin-top" | "outside-thin-bottom" | "outside-thin-left" | "outside-thin-right" | "outside-thin-top-bottom" | "outside-thin-top-left" | "outside-thin-top-right" | "outside-thin-bottom-left" | "outside-thin-bottom-right" | "outside-thin-left-right" | "outside-thin-top-bottom-left" | "outside-thin-top-bottom-right" | "outside-thin-top-left-right" | "outside-thin-bottom-left-right" | "outside-thick-all" | "outside-thick-top" | "outside-thick-bottom" | "outside-thick-left" | "outside-thick-right" | "outside-thick-top-bottom" | "outside-thick-top-left" | "outside-thick-top-right" | "outside-thick-bottom-left" | "outside-thick-bottom-right" | "outside-thick-left-right" | "outside-thick-top-bottom-left" | "outside-thick-top-bottom-right" | "outside-thick-top-left-right" | "outside-thick-bottom-left-right" | "outside-double-all" | "outside-double-top" | "outside-double-bottom" | "outside-double-left" | "outside-double-right" | "outside-double-top-bottom" | "outside-double-top-left" | "outside-double-top-right" | "outside-double-bottom-left" | "outside-double-bottom-right" | "outside-double-left-right" | "outside-double-top-bottom-left" | "outside-double-top-bottom-right" | "outside-double-top-left-right" | "outside-double-bottom-left-right" | "green-all" | `border-line-${string}` | `border-color-${string}`; textRotation?: number; indent?: number; }; ``` ### CellRange [Section titled “CellRange”](#cellrange) ```ts interface CellRange { sheetKey: string; rowStart: number; rowEnd: number; colStart: number; colEnd: number; } ``` ### CellRect [Section titled “CellRect”](#cellrect) ```ts interface CellRect { top: number; left: number; rows: number; cols: number; } ``` ### ContractCellDetails [Section titled “ContractCellDetails”](#contractcelldetails) ```ts interface ContractCellDetails { cellKey: string; address: string; displayValue: string | null; editText: string | null; calculationTrust?: ContractCalculationTrust | null; } ``` ### ContractEntityCellMetadata [Section titled “ContractEntityCellMetadata”](#contractentitycellmetadata) ```ts interface ContractEntityCellMetadata { cellKey: string; stableEntityId: string; kind: ContractEntityDataTypeKind; state: ContractEntityResolutionState; provider: ContractEntityProviderIdentity; originalText: string; displayText: string; fields: ContractEntityFieldValue[]; } ``` ### ContractFindIndexStats [Section titled “ContractFindIndexStats”](#contractfindindexstats) ```ts interface ContractFindIndexStats { cacheHit: boolean; indexedCellCount: number; indexedBytes: number; queryCacheBytes: number; indexBuildCount: number; workbookRevision: number; invalidationCount: number; lastInvalidatedCellCount: number; lastInvalidatedRangeCount: number; lastInvalidatedSheetCount: number; lastReconciledQueryCount: number; fullResetCount: number; } ``` ### ContractFindLookIn [Section titled “ContractFindLookIn”](#contractfindlookin) ```ts type ContractFindLookIn = "values" | "formulas"; ``` ### ContractFindMatch [Section titled “ContractFindMatch”](#contractfindmatch) ```ts interface ContractFindMatch { cellKey: string; sheetName: string; address: string; value: string; } ``` ### ContractFindScope [Section titled “ContractFindScope”](#contractfindscope) ```ts type ContractFindScope = "active_sheet" | "workbook" | { selection: { range: CellRange } }; ``` ### ContractFindSearchOrder [Section titled “ContractFindSearchOrder”](#contractfindsearchorder) ```ts type ContractFindSearchOrder = "by_rows" | "by_columns"; ``` ### ContractFormControlLinkedCellWrite [Section titled “ContractFormControlLinkedCellWrite”](#contractformcontrollinkedcellwrite) ```ts interface ContractFormControlLinkedCellWrite { sheetKey: string; row: number; col: number; display: string; } ``` ### ContractObjectAnchorCell [Section titled “ContractObjectAnchorCell”](#contractobjectanchorcell) ```ts interface ContractObjectAnchorCell { row: number; col: number; dxEmu: number; dyEmu: number; } ``` ### ContractOpenDocumentReplacementRange [Section titled “ContractOpenDocumentReplacementRange”](#contractopendocumentreplacementrange) ```ts interface ContractOpenDocumentReplacementRange { rowStart: number; rowEnd: number; colStart: number; colEnd: number; } ``` ### ContractParameterNumericRange [Section titled “ContractParameterNumericRange”](#contractparameternumericrange) ```ts interface ContractParameterNumericRange { min: number; max: number; } ``` ### ContractPreviewCell [Section titled “ContractPreviewCell”](#contractpreviewcell) ```ts interface ContractPreviewCell { row: number; col: number; value: string; valueKind: ContractPreviewValueKind; scalarValueKind?: "number" | "text" | "date"; delimitedValueKind?: "number" | "text" | "date" | "emptyString"; delimitedSemanticValue?: string; rawFormula?: string; selectionAllowed?: boolean; hyperlink?: ContractPreviewHyperlink | null; booleanValue?: boolean | null; errorCode?: ContractErrorCode | null; formatting?: ContractPreviewFormatting | null; richTextRuns?: ContractRichTextRun[] | null; } ``` ### ContractWhatIfCellRef [Section titled “ContractWhatIfCellRef”](#contractwhatifcellref) ```ts interface ContractWhatIfCellRef { sheetKey: string; row: number; col: number; } ``` ### ContractXlsxCellCopyPatch [Section titled “ContractXlsxCellCopyPatch”](#contractxlsxcellcopypatch) ```ts interface ContractXlsxCellCopyPatch { activeSheetPath: string; sourceCellRef: string; targetCellRef: string; } ``` ### ContractXlsxCellShiftDirection [Section titled “ContractXlsxCellShiftDirection”](#contractxlsxcellshiftdirection) ```ts type ContractXlsxCellShiftDirection = | "insert-shift-right" | "insert-shift-down" | "delete-shift-left" | "delete-shift-up"; ``` ### ContractXlsxCellShiftPatch [Section titled “ContractXlsxCellShiftPatch”](#contractxlsxcellshiftpatch) ```ts interface ContractXlsxCellShiftPatch { activeSheetPath: string; rowStart: number; rowEnd: number; colStart: number; colEnd: number; direction: ContractXlsxCellShiftDirection; } ``` ### DeltaSummary [Section titled “DeltaSummary”](#deltasummary) ```ts interface DeltaSummary { deltaId: string; changedCellCount: number; } ``` ### SourceCellDescriptor [Section titled “SourceCellDescriptor”](#sourcecelldescriptor) ```ts type SourceCellDescriptor = | { kind: "blank" } | { kind: "text"; value: string } | { kind: "number"; value: number } | { kind: "integer"; value: number } | { kind: "logical"; value: boolean } | { kind: "date"; year: number; month: number; day: number } | { kind: "error"; code: string }; ``` # Types: charts and graphics > Compute Contract type definitions — charts, sparklines, shapes, and images. Names: 92. Definitions of the names from the “TypeScript type” column on the operation pages. Other dictionary topics: [session, workbook, and sheets](/reference/sumsheet/types-session/) · [cells and ranges](/reference/sumsheet/types-cells/) · [formulas and calculation](/reference/sumsheet/types-formulas/) · [formatting](/reference/sumsheet/types-format/) · [data and sheet objects](/reference/sumsheet/types-data/) · [pivot tables](/reference/sumsheet/types-pivot/) · **charts and graphics** · [printing and page layout](/reference/sumsheet/types-print/) · [Power Query](/reference/sumsheet/types-powerquery/) · [VBA and macros](/reference/sumsheet/types-vba/) · [protection and review](/reference/sumsheet/types-protection/) · [general and utility](/reference/sumsheet/types-common/). Types on this page — 92 * [`ContractChartAreaFormatting`](#contractchartareaformatting) * [`ContractChartAxisFormatting`](#contractchartaxisformatting) * [`ContractChartAxisId`](#contractchartaxisid) * [`ContractChartBoundedFamily`](#contractchartboundedfamily) * [`ContractChartBoxWhiskerSettings`](#contractchartboxwhiskersettings) * [`ContractChartBubblePointIdentity`](#contractchartbubblepointidentity) * [`ContractChartCapabilityRefusal`](#contractchartcapabilityrefusal) * [`ContractChartCustomErrorBarRange`](#contractchartcustomerrorbarrange) * [`ContractChartDataLabelPosition`](#contractchartdatalabelposition) * [`ContractChartDataLabelsFormatting`](#contractchartdatalabelsformatting) * [`ContractChartDataTableFormatting`](#contractchartdatatableformatting) * [`ContractChartErrorBarDirection`](#contractcharterrorbardirection) * [`ContractChartErrorBarEndStyle`](#contractcharterrorbarendstyle) * [`ContractChartErrorBarKind`](#contractcharterrorbarkind) * [`ContractChartErrorBarsFormatting`](#contractcharterrorbarsformatting) * [`ContractChartFeatureCapability`](#contractchartfeaturecapability) * [`ContractChartFormatting`](#contractchartformatting) * [`ContractChartFormattingCapabilities`](#contractchartformattingcapabilities) * [`ContractChartFunnelSettings`](#contractchartfunnelsettings) * [`ContractChartGeographyRegion`](#contractchartgeographyregion) * [`ContractChartGeographySettings`](#contractchartgeographysettings) * [`ContractChartHierarchyBlankPolicy`](#contractcharthierarchyblankpolicy) * [`ContractChartHierarchyErrorPolicy`](#contractcharthierarchyerrorpolicy) * [`ContractChartHierarchyNode`](#contractcharthierarchynode) * [`ContractChartHierarchySettings`](#contractcharthierarchysettings) * [`ContractChartHistogramBin`](#contractcharthistogrambin) * [`ContractChartHistogramSettings`](#contractcharthistogramsettings) * [`ContractChartIntervalClosedSide`](#contractchartintervalclosedside) * [`ContractChartLegendFormatPosition`](#contractchartlegendformatposition) * [`ContractChartLegendPosition`](#contractchartlegendposition) * [`ContractChartLineDash`](#contractchartlinedash) * [`ContractChartManualLayout`](#contractchartmanuallayout) * [`ContractChartMarkerFormatting`](#contractchartmarkerformatting) * [`ContractChartMarkerStyle`](#contractchartmarkerstyle) * [`ContractChartMissingValuePolicy`](#contractchartmissingvaluepolicy) * [`ContractChartModernFormatting`](#contractchartmodernformatting) * [`ContractChartPayload`](#contractchartpayload) * [`ContractChartPointFormatting`](#contractchartpointformatting) * [`ContractChartQuartileMethod`](#contractchartquartilemethod) * [`ContractChartSeries`](#contractchartseries) * [`ContractChartSeriesErrorBarCapability`](#contractchartserieserrorbarcapability) * [`ContractChartSeriesFormatting`](#contractchartseriesformatting) * [`ContractChartSeriesType`](#contractchartseriestype) * [`ContractChartShapeStyle`](#contractchartshapestyle) * [`ContractChartSheetOrientation`](#contractchartsheetorientation) * [`ContractChartSheetPageMargins`](#contractchartsheetpagemargins) * [`ContractChartSheetPrintPreview`](#contractchartsheetprintpreview) * [`ContractChartSheetPrintSettings`](#contractchartsheetprintsettings) * [`ContractChartStackMode`](#contractchartstackmode) * [`ContractChartStatus`](#contractchartstatus) * [`ContractChartStockSeriesRole`](#contractchartstockseriesrole) * [`ContractChartStylePreset`](#contractchartstylepreset) * [`ContractChartSurfaceFormatting`](#contractchartsurfaceformatting) * [`ContractChartSurfaceView3D`](#contractchartsurfaceview3d) * [`ContractChartTemplateSelection`](#contractcharttemplateselection) * [`ContractChartTemplateSource`](#contractcharttemplatesource) * [`ContractChartThemeColorSlot`](#contractchartthemecolorslot) * [`ContractChartThemeReference`](#contractchartthemereference) * [`ContractChartTrendlineFacts`](#contractcharttrendlinefacts) * [`ContractChartTrendlineFormatting`](#contractcharttrendlineformatting) * [`ContractChartTrendlineKind`](#contractcharttrendlinekind) * [`ContractChartTrendlinePoint`](#contractcharttrendlinepoint) * [`ContractChartType`](#contractcharttype) * [`ContractChartWaterfallPoint`](#contractchartwaterfallpoint) * [`ContractChartWaterfallSettings`](#contractchartwaterfallsettings) * [`ContractDataAnalysisChartPlan`](#contractdataanalysischartplan) * [`ContractDrawingObjectAction`](#contractdrawingobjectaction) * [`ContractDrawingObjectImageCrop`](#contractdrawingobjectimagecrop) * [`ContractDrawingTextEditSemantics`](#contractdrawingtexteditsemantics) * [`ContractImagePayload`](#contractimagepayload) * [`ContractOpenDocumentChartSeries`](#contractopendocumentchartseries) * [`ContractSparklineAction`](#contractsparklineaction) * [`ContractSparklineFlags`](#contractsparklineflags) * [`ContractSparklinePlanMode`](#contractsparklineplanmode) * [`ContractSparklineProjectionEntry`](#contractsparklineprojectionentry) * [`ContractSparklineStyle`](#contractsparklinestyle) * [`ContractSparklineType`](#contractsparklinetype) * [`ContractXlsxChartCreationPatch`](#contractxlsxchartcreationpatch) * [`ContractXlsxChartMutationPatch`](#contractxlsxchartmutationpatch) * [`ContractXlsxChartObjectMovePatch`](#contractxlsxchartobjectmovepatch) * [`ContractXlsxChartSeriesUpdatePatch`](#contractxlsxchartseriesupdatepatch) * [`ContractXlsxDrawingImageCreationPatch`](#contractxlsxdrawingimagecreationpatch) * [`ContractXlsxDrawingObjectDeletionPatch`](#contractxlsxdrawingobjectdeletionpatch) * [`ContractXlsxDrawingObjectGroupMemberPatch`](#contractxlsxdrawingobjectgroupmemberpatch) * [`ContractXlsxDrawingObjectGroupPatch`](#contractxlsxdrawingobjectgrouppatch) * [`ContractXlsxDrawingObjectImageTransformPatch`](#contractxlsxdrawingobjectimagetransformpatch) * [`ContractXlsxDrawingObjectMetadataPatch`](#contractxlsxdrawingobjectmetadatapatch) * [`ContractXlsxDrawingObjectMovePatch`](#contractxlsxdrawingobjectmovepatch) * [`ContractXlsxDrawingObjectUngroupPatch`](#contractxlsxdrawingobjectungrouppatch) * [`ContractXlsxDrawingObjectZOrderPatch`](#contractxlsxdrawingobjectzorderpatch) * [`ContractXlsxShapeObjectPatch`](#contractxlsxshapeobjectpatch) * [`ContractXlsxShapeSheetPatch`](#contractxlsxshapesheetpatch) ### ContractChartAreaFormatting [Section titled “ContractChartAreaFormatting”](#contractchartareaformatting) ```ts interface ContractChartAreaFormatting { style: ContractChartShapeStyle; layout?: ContractChartManualLayout | null; } ``` ### ContractChartAxisFormatting [Section titled “ContractChartAxisFormatting”](#contractchartaxisformatting) ```ts interface ContractChartAxisFormatting { axis: ContractChartAxisId; title?: string | null; visible: boolean; minimum?: number | null; maximum?: number | null; majorUnit?: number | null; minorUnit?: number | null; numberFormat?: string | null; logBase?: number | null; showMajorGridlines: boolean; showMinorGridlines: boolean; } ``` ### ContractChartAxisId [Section titled “ContractChartAxisId”](#contractchartaxisid) ```ts type ContractChartAxisId = | "primary-category" | "primary-value" | "secondary-category" | "secondary-value"; ``` ### ContractChartBoundedFamily [Section titled “ContractChartBoundedFamily”](#contractchartboundedfamily) ```ts type ContractChartBoundedFamily = | "bubble" | "radar" | "radar-markers" | "radar-filled" | "surface" | "wireframe-surface" | "contour" | "wireframe-contour" | "stock-hlc" | "stock-ohlc" | "stock-volume-hlc" | "stock-volume-ohlc" | "histogram" | "pareto" | "waterfall" | "funnel" | "box-whisker" | "treemap" | "sunburst" | "map"; ``` ### ContractChartBoxWhiskerSettings [Section titled “ContractChartBoxWhiskerSettings”](#contractchartboxwhiskersettings) ```ts interface ContractChartBoxWhiskerSettings { quartileMethod: ContractChartQuartileMethod; showMeanLine: boolean; showMeanMarker: boolean; showInnerPoints: boolean; showOutlierPoints: boolean; readonly summaries: ReadonlyArray<{ seriesIndex: number; firstQuartile: number; median: number; thirdQuartile: number; mean: number; whiskerMinimum: number; whiskerMaximum: number; outliers: number[]; }>; } ``` ### ContractChartBubblePointIdentity [Section titled “ContractChartBubblePointIdentity”](#contractchartbubblepointidentity) ```ts interface ContractChartBubblePointIdentity { pointIndex: number; size: number; } ``` ### ContractChartCapabilityRefusal [Section titled “ContractChartCapabilityRefusal”](#contractchartcapabilityrefusal) ```ts type ContractChartCapabilityRefusal = | "unsupported-chart-type" | "unsupported-series-type" | "unsupported-three-d" | "unsupported-stock" | "unsupported-surface" | "incompatible-combination"; ``` ### ContractChartCustomErrorBarRange [Section titled “ContractChartCustomErrorBarRange”](#contractchartcustomerrorbarrange) ```ts interface ContractChartCustomErrorBarRange { formula: string; pointCount: number; } ``` ### ContractChartDataLabelPosition [Section titled “ContractChartDataLabelPosition”](#contractchartdatalabelposition) ```ts type ContractChartDataLabelPosition = | "best-fit" | "center" | "inside-end" | "inside-base" | "outside-end" | "left" | "right" | "above" | "below"; ``` ### ContractChartDataLabelsFormatting [Section titled “ContractChartDataLabelsFormatting”](#contractchartdatalabelsformatting) ```ts interface ContractChartDataLabelsFormatting { visible: boolean; showValue: boolean; showCategoryName: boolean; showSeriesName: boolean; showLegendKey: boolean; showPercentage: boolean; separator?: string | null; numberFormat?: string | null; position?: ContractChartDataLabelPosition | null; showLeaderLines: boolean; } ``` ### ContractChartDataTableFormatting [Section titled “ContractChartDataTableFormatting”](#contractchartdatatableformatting) ```ts interface ContractChartDataTableFormatting { visible: boolean; showLegendKeys: boolean; showHorizontalBorder: boolean; showVerticalBorder: boolean; showOutlineBorder: boolean; style: ContractChartShapeStyle; } ``` ### ContractChartErrorBarDirection [Section titled “ContractChartErrorBarDirection”](#contractcharterrorbardirection) ```ts type ContractChartErrorBarDirection = "x" | "y"; ``` ### ContractChartErrorBarEndStyle [Section titled “ContractChartErrorBarEndStyle”](#contractcharterrorbarendstyle) ```ts type ContractChartErrorBarEndStyle = "both" | "plus" | "minus"; ``` ### ContractChartErrorBarKind [Section titled “ContractChartErrorBarKind”](#contractcharterrorbarkind) ```ts type ContractChartErrorBarKind = "fixed" | "percentage" | "standard-deviation" | "standard-error" | "custom"; ``` ### ContractChartErrorBarsFormatting [Section titled “ContractChartErrorBarsFormatting”](#contractcharterrorbarsformatting) ```ts interface ContractChartErrorBarsFormatting { direction: ContractChartErrorBarDirection; kind: ContractChartErrorBarKind; endStyle: ContractChartErrorBarEndStyle; noEndCap: boolean; value?: number | null; plusRange?: ContractChartCustomErrorBarRange | null; minusRange?: ContractChartCustomErrorBarRange | null; } ``` ### ContractChartFeatureCapability [Section titled “ContractChartFeatureCapability”](#contractchartfeaturecapability) ```ts interface ContractChartFeatureCapability { supported: boolean; reason?: ContractChartCapabilityRefusal | null; } ``` ### ContractChartFormatting [Section titled “ContractChartFormatting”](#contractchartformatting) ```ts interface ContractChartFormatting { template?: ContractChartTemplateSelection | null; family?: ContractChartBoundedFamily | null; bubbleScale?: number | null; missingValuePolicy?: ContractChartMissingValuePolicy; modern?: ContractChartModernFormatting; surface?: ContractChartSurfaceFormatting | null; title?: string | null; legendPosition: ContractChartLegendFormatPosition; legendOverlay: boolean; dataLabels: ContractChartDataLabelsFormatting; dataTable?: ContractChartDataTableFormatting; readonly capabilities?: ContractChartFormattingCapabilities; chartArea: ContractChartAreaFormatting; plotArea: ContractChartAreaFormatting; axes: ContractChartAxisFormatting[]; series: ContractChartSeriesFormatting[]; } ``` ### ContractChartFormattingCapabilities [Section titled “ContractChartFormattingCapabilities”](#contractchartformattingcapabilities) ```ts interface ContractChartFormattingCapabilities { combo?: ContractChartFeatureCapability; boundedFamilies?: ContractChartFeatureCapability; dataTable: ContractChartFeatureCapability; errorBars: ContractChartSeriesErrorBarCapability[]; } ``` ### ContractChartFunnelSettings [Section titled “ContractChartFunnelSettings”](#contractchartfunnelsettings) ```ts interface ContractChartFunnelSettings { readonly points: ReadonlyArray<{ pointIndex: number; value: number }>; } ``` ### ContractChartGeographyRegion [Section titled “ContractChartGeographyRegion”](#contractchartgeographyregion) ```ts interface ContractChartGeographyRegion { readonly inputLabel: string; readonly identity: "FRA" | "DEU" | "ITA" | "ESP" | "PRT" | "GBR"; readonly value: number; readonly color: string; } ``` ### ContractChartGeographySettings [Section titled “ContractChartGeographySettings”](#contractchartgeographysettings) ```ts interface ContractChartGeographySettings { readonly cultureLanguage?: string | null; readonly cultureRegion?: string | null; readonly attribution?: string | null; readonly minimum: number; readonly maximum: number; readonly regions: ReadonlyArray; } ``` ### ContractChartHierarchyBlankPolicy [Section titled “ContractChartHierarchyBlankPolicy”](#contractcharthierarchyblankpolicy) ```ts type ContractChartHierarchyBlankPolicy = "zero"; ``` ### ContractChartHierarchyErrorPolicy [Section titled “ContractChartHierarchyErrorPolicy”](#contractcharthierarchyerrorpolicy) ```ts type ContractChartHierarchyErrorPolicy = "refuse"; ``` ### ContractChartHierarchyNode [Section titled “ContractChartHierarchyNode”](#contractcharthierarchynode) ```ts interface ContractChartHierarchyNode { readonly nodeId: string; readonly parentId?: string | null; readonly level: number; readonly label: string; readonly aggregate: number; readonly leafCount: number; readonly color: string; } ``` ### ContractChartHierarchySettings [Section titled “ContractChartHierarchySettings”](#contractcharthierarchysettings) ```ts interface ContractChartHierarchySettings { readonly blankPolicy: ContractChartHierarchyBlankPolicy; readonly errorPolicy: ContractChartHierarchyErrorPolicy; readonly rootAggregate: number; readonly nodes: ReadonlyArray; } ``` ### ContractChartHistogramBin [Section titled “ContractChartHistogramBin”](#contractcharthistogrambin) ```ts interface ContractChartHistogramBin { readonly binIndex: number; readonly lowerBound: number; readonly upperBound: number; readonly count: number; readonly cumulativePercent: number; } ``` ### ContractChartHistogramSettings [Section titled “ContractChartHistogramSettings”](#contractcharthistogramsettings) ```ts interface ContractChartHistogramSettings { binCount?: number | null; binWidth?: number | null; underflow?: number | null; overflow?: number | null; intervalClosed: ContractChartIntervalClosedSide; readonly bins: ContractChartHistogramBin[]; } ``` ### ContractChartIntervalClosedSide [Section titled “ContractChartIntervalClosedSide”](#contractchartintervalclosedside) ```ts type ContractChartIntervalClosedSide = "left" | "right"; ``` ### ContractChartLegendFormatPosition [Section titled “ContractChartLegendFormatPosition”](#contractchartlegendformatposition) ```ts type ContractChartLegendFormatPosition = "none" | "top" | "bottom" | "left" | "right"; ``` ### ContractChartLegendPosition [Section titled “ContractChartLegendPosition”](#contractchartlegendposition) ```ts type ContractChartLegendPosition = "top" | "left" | "right" | "bottom" | "none"; ``` ### ContractChartLineDash [Section titled “ContractChartLineDash”](#contractchartlinedash) ```ts type ContractChartLineDash = "solid" | "dash" | "dot" | "dash-dot"; ``` ### ContractChartManualLayout [Section titled “ContractChartManualLayout”](#contractchartmanuallayout) ```ts interface ContractChartManualLayout { x: number; y: number; width: number; height: number; } ``` ### ContractChartMarkerFormatting [Section titled “ContractChartMarkerFormatting”](#contractchartmarkerformatting) ```ts interface ContractChartMarkerFormatting { style: ContractChartMarkerStyle; size: number; fillColor?: string | null; lineColor?: string | null; fillThemeSlot?: number | null; lineThemeSlot?: number | null; } ``` ### ContractChartMarkerStyle [Section titled “ContractChartMarkerStyle”](#contractchartmarkerstyle) ```ts type ContractChartMarkerStyle = "none" | "circle" | "square" | "diamond" | "triangle" | "x" | "plus"; ``` ### ContractChartMissingValuePolicy [Section titled “ContractChartMissingValuePolicy”](#contractchartmissingvaluepolicy) ```ts type ContractChartMissingValuePolicy = "gap" | "zero" | "connect"; ``` ### ContractChartModernFormatting [Section titled “ContractChartModernFormatting”](#contractchartmodernformatting) ```ts interface ContractChartModernFormatting { histogram?: ContractChartHistogramSettings | null; waterfall?: ContractChartWaterfallSettings | null; funnel?: ContractChartFunnelSettings | null; boxWhisker?: ContractChartBoxWhiskerSettings | null; hierarchy?: ContractChartHierarchySettings | null; geography?: ContractChartGeographySettings | null; readonly seriesIdentities: ReadonlyArray<{ seriesIndex: number; uniqueId: string; }>; } ``` ### ContractChartPayload [Section titled “ContractChartPayload”](#contractchartpayload) ```ts interface ContractChartPayload { status: ContractChartStatus; chartType?: ContractChartType | null; stackMode?: ContractChartStackMode | null; title?: string | null; categoryAxisTitle?: string | null; valueAxisTitle?: string | null; stylePreset?: ContractChartStylePreset | null; chartStyleGalleryId?: string | null; chartColorPaletteId?: string | null; legendPosition?: ContractChartLegendPosition | null; chartAreaFillColor?: string | null; chartAreaLineColor?: string | null; plotAreaFillColor?: string | null; plotAreaLineColor?: string | null; seriesFillColor?: string | null; firstDataPointFillColor?: string | null; showDataLabels?: boolean | null; dataLabelNumberFormat?: string | null; valueAxisLineColor?: string | null; valueAxisMinimum?: number | null; valueAxisMaximum?: number | null; valueAxisNumberFormat?: string | null; showGridlines?: boolean | null; showAxes?: boolean | null; showTrendline?: boolean | null; showErrorBars?: boolean | null; showSecondaryAxis?: boolean | null; emptyCellBehavior?: "gaps" | "zero" | "connect" | null; pivotSourceName?: string | null; pivotLayoutBounds?: ContractSheetObjectBounds | null; formatting?: ContractChartFormatting | null; series: ContractChartSeries[]; } ``` ### ContractChartPointFormatting [Section titled “ContractChartPointFormatting”](#contractchartpointformatting) ```ts interface ContractChartPointFormatting { pointIndex: number; style: ContractChartShapeStyle; marker?: ContractChartMarkerFormatting | null; } ``` ### ContractChartQuartileMethod [Section titled “ContractChartQuartileMethod”](#contractchartquartilemethod) ```ts type ContractChartQuartileMethod = "inclusive" | "exclusive"; ``` ### ContractChartSeries [Section titled “ContractChartSeries”](#contractchartseries) ```ts interface ContractChartSeries { name?: string | null; nameRef?: string | null; categoryRef?: string | null; valueRef?: string | null; categories: string[]; categoryHierarchy?: string[][]; values: number[]; } ``` ### ContractChartSeriesErrorBarCapability [Section titled “ContractChartSeriesErrorBarCapability”](#contractchartserieserrorbarcapability) ```ts interface ContractChartSeriesErrorBarCapability { seriesIndex: number; directions: ContractChartErrorBarDirection[]; kinds: ContractChartErrorBarKind[]; reason?: ContractChartCapabilityRefusal | null; } ``` ### ContractChartSeriesFormatting [Section titled “ContractChartSeriesFormatting”](#contractchartseriesformatting) ```ts interface ContractChartSeriesFormatting { seriesIndex: number; chartType?: ContractChartSeriesType | null; secondaryAxis: boolean; stockRole?: ContractChartStockSeriesRole | null; xRange?: string | null; yRange?: string | null; bubbleSizeRange?: string | null; categoryRange?: string | null; valueRange?: string | null; readonly bubblePoints?: ContractChartBubblePointIdentity[]; style: ContractChartShapeStyle; marker?: ContractChartMarkerFormatting | null; pointOverrides: ContractChartPointFormatting[]; trendlines: ContractChartTrendlineFormatting[]; errorBars: ContractChartErrorBarsFormatting[]; } ``` ### ContractChartSeriesType [Section titled “ContractChartSeriesType”](#contractchartseriestype) ```ts type ContractChartSeriesType = "clustered-column" | "line" | "area"; ``` ### ContractChartShapeStyle [Section titled “ContractChartShapeStyle”](#contractchartshapestyle) ```ts interface ContractChartShapeStyle { fillColor?: string | null; lineColor?: string | null; lineWidthPt?: number | null; lineDash?: ContractChartLineDash | null; fillThemeSlot?: number | null; lineThemeSlot?: number | null; } ``` ### ContractChartSheetOrientation [Section titled “ContractChartSheetOrientation”](#contractchartsheetorientation) ```ts type ContractChartSheetOrientation = "portrait" | "landscape"; ``` ### ContractChartSheetPageMargins [Section titled “ContractChartSheetPageMargins”](#contractchartsheetpagemargins) ```ts interface ContractChartSheetPageMargins { left: number; right: number; top: number; bottom: number; header: number; footer: number; } ``` ### ContractChartSheetPrintPreview [Section titled “ContractChartSheetPrintPreview”](#contractchartsheetprintpreview) ```ts interface ContractChartSheetPrintPreview { sheetKey: string; pageCount: number; pageWidthPoints: number; pageHeightPoints: number; contentWidthPoints: number; contentHeightPoints: number; scale: number; orientation: ContractChartSheetOrientation; printArea: boolean; } ``` ### ContractChartSheetPrintSettings [Section titled “ContractChartSheetPrintSettings”](#contractchartsheetprintsettings) ```ts interface ContractChartSheetPrintSettings { paperSize: number; orientation: ContractChartSheetOrientation; scale: number; margins: ContractChartSheetPageMargins; oddHeader?: string | null; oddFooter?: string | null; printArea: boolean; } ``` ### ContractChartStackMode [Section titled “ContractChartStackMode”](#contractchartstackmode) ```ts type ContractChartStackMode = "none" | "stacked" | "percentStacked"; ``` ### ContractChartStatus [Section titled “ContractChartStatus”](#contractchartstatus) ```ts type ContractChartStatus = | "live-readonly" | "unsupported-chart-type" | "missing-cache" | "invalid-payload"; ``` ### ContractChartStockSeriesRole [Section titled “ContractChartStockSeriesRole”](#contractchartstockseriesrole) ```ts type ContractChartStockSeriesRole = "volume" | "open" | "high" | "low" | "close"; ``` ### ContractChartStylePreset [Section titled “ContractChartStylePreset”](#contractchartstylepreset) ```ts type ContractChartStylePreset = "default" | "muted" | "monochrome" | "colorful" | "clean"; ``` ### ContractChartSurfaceFormatting [Section titled “ContractChartSurfaceFormatting”](#contractchartsurfaceformatting) ```ts interface ContractChartSurfaceFormatting { view3D: ContractChartSurfaceView3D; backWall: ContractChartShapeStyle; sideWall: ContractChartShapeStyle; floor: ContractChartShapeStyle; } ``` ### ContractChartSurfaceView3D [Section titled “ContractChartSurfaceView3D”](#contractchartsurfaceview3d) ```ts interface ContractChartSurfaceView3D { rotation: number; elevation: number; perspective: number; } ``` ### ContractChartTemplateSelection [Section titled “ContractChartTemplateSelection”](#contractcharttemplateselection) ```ts interface ContractChartTemplateSelection { templateId: string; source: ContractChartTemplateSource; chartStyleId: number; colorStyleId: number; theme: ContractChartThemeReference; } ``` ### ContractChartTemplateSource [Section titled “ContractChartTemplateSource”](#contractcharttemplatesource) ```ts type ContractChartTemplateSource = "built-in" | "crtx"; ``` ### ContractChartThemeColorSlot [Section titled “ContractChartThemeColorSlot”](#contractchartthemecolorslot) ```ts type ContractChartThemeColorSlot = | "dark1" | "light1" | "dark2" | "light2" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6" | "hyperlink" | "followed-hyperlink"; ``` ### ContractChartThemeReference [Section titled “ContractChartThemeReference”](#contractchartthemereference) ```ts interface ContractChartThemeReference { themeId: string; colorSlot: ContractChartThemeColorSlot; } ``` ### ContractChartTrendlineFacts [Section titled “ContractChartTrendlineFacts”](#contractcharttrendlinefacts) ```ts interface ContractChartTrendlineFacts { equation?: string | null; rSquared?: number | null; coefficients: number[]; movingAveragePoints: ContractChartTrendlinePoint[]; sourcePointCount: number; } ``` ### ContractChartTrendlineFormatting [Section titled “ContractChartTrendlineFormatting”](#contractcharttrendlineformatting) ```ts interface ContractChartTrendlineFormatting { trendlineIndex: number; kind: ContractChartTrendlineKind; name?: string | null; polynomialOrder?: number | null; movingAveragePeriod?: number | null; displayEquation: boolean; displayRSquared: boolean; readonly facts?: ContractChartTrendlineFacts | null; } ``` ### ContractChartTrendlineKind [Section titled “ContractChartTrendlineKind”](#contractcharttrendlinekind) ```ts type ContractChartTrendlineKind = "linear" | "exponential" | "logarithmic" | "polynomial" | "moving-average"; ``` ### ContractChartTrendlinePoint [Section titled “ContractChartTrendlinePoint”](#contractcharttrendlinepoint) ```ts interface ContractChartTrendlinePoint { x: number; y: number; } ``` ### ContractChartType [Section titled “ContractChartType”](#contractcharttype) ```ts type ContractChartType = | "column" | "bar" | "line" | "area" | "pie" | "doughnut" | "scatter" | "combo" | "radar" | "map" | "waterfall" | "funnel" | "histogram" | "bubble" | "pareto" | "treemap" | "sunburst" | "stock" | "boxwhisker" | "scatter-smooth" | "scatter-smooth-line" | "scatter-straight" | "scatter-straight-line" | "radar-markers" | "radar-filled" | "surface" | "area-column" | "stock-hlc" | "stacked-column" | "percent-stacked-column" | "stacked-bar" | "percent-stacked-bar" | "stacked-line" | "percent-stacked-line" | "stacked-area" | "percent-stacked-area"; ``` ### ContractChartWaterfallPoint [Section titled “ContractChartWaterfallPoint”](#contractchartwaterfallpoint) ```ts interface ContractChartWaterfallPoint { readonly pointIndex: number; readonly value: number; readonly runningTotal: number; readonly isTotal: boolean; } ``` ### ContractChartWaterfallSettings [Section titled “ContractChartWaterfallSettings”](#contractchartwaterfallsettings) ```ts interface ContractChartWaterfallSettings { totalPointIndices: number[]; showConnectorLines: boolean; readonly points: ContractChartWaterfallPoint[]; } ``` ### ContractDataAnalysisChartPlan [Section titled “ContractDataAnalysisChartPlan”](#contractdataanalysischartplan) ```ts interface ContractDataAnalysisChartPlan { available: boolean; lifecycle: "create" | "remove"; chartType: "column" | "line"; title: string; categoryRange: CellRange; valueRange: CellRange; } ``` ### ContractDrawingObjectAction [Section titled “ContractDrawingObjectAction”](#contractdrawingobjectaction) ```ts type ContractDrawingObjectAction = | { kind: "replace-text-paragraphs"; sheetId: string; objectStableId: string; text: string; paragraphs: ContractTextParagraph[]; } | { kind: "create"; sheetId: string; creation: ContractOpenDocumentObjectCreation; } | { kind: "command"; sheetId: string; objectStableIds: string[]; primaryStableId?: string | null; command: ContractObjectSelectionPaneCommand; geometryAnchor?: ContractObjectAnchor | null; groupId?: string | null; orderedStableIds?: string[]; memberStableIds?: string[]; }; ``` ### ContractDrawingObjectImageCrop [Section titled “ContractDrawingObjectImageCrop”](#contractdrawingobjectimagecrop) ```ts interface ContractDrawingObjectImageCrop { leftPct: number; topPct: number; rightPct: number; bottomPct: number; } ``` ### ContractDrawingTextEditSemantics [Section titled “ContractDrawingTextEditSemantics”](#contractdrawingtexteditsemantics) ```ts interface ContractDrawingTextEditSemantics { sheetId: string; objectId: string; text: string; paragraphs: ContractTextParagraph[]; verticalAlign?: ContractTextVerticalAlign | null; wrapText?: boolean | null; rotationDegrees?: number | null; marginsCm: [number | null, number | null, number | null, number | null]; } ``` ### ContractImagePayload [Section titled “ContractImagePayload”](#contractimagepayload) ```ts interface ContractImagePayload { mimeType: string; dataUrl: string; widthPx?: number | null; heightPx?: number | null; byteCount?: number | null; editingStatus?: "live-supported" | "unsupported" | "malformed" | "oversized" | null; editingError?: string | null; svgText?: string | null; svgTextOriginal?: string | null; } ``` ### ContractOpenDocumentChartSeries [Section titled “ContractOpenDocumentChartSeries”](#contractopendocumentchartseries) ```ts interface ContractOpenDocumentChartSeries { name: string; categoryFormula: string; valueFormula: string; categoryCache: string[]; valueCache: number[]; } ``` ### ContractSparklineAction [Section titled “ContractSparklineAction”](#contractsparklineaction) ```ts type ContractSparklineAction = | { kind: "inventory" } | { kind: "create"; sheetPath: string; sourceRange: CellRange; targetRow: number; targetCol: number; sparklineType: ContractSparklineType; style: ContractSparklineStyle; flags?: ContractSparklineFlags; seriesColor?: string; negativeColor?: string; } | { kind: "createGroup"; sheetPath: string; sparklineType: ContractSparklineType; style: ContractSparklineStyle; flags?: ContractSparklineFlags; seriesColor?: string; negativeColor?: string; members: Array<{ sourceRange: CellRange; targetRow: number; targetCol: number }>; } | { kind: "modify"; stableId: string; sourceRange?: CellRange | null; sparklineType?: ContractSparklineType | null; style?: ContractSparklineStyle | null; flags?: ContractSparklineFlags | null; seriesColor?: string; negativeColor?: string; } | { kind: "delete"; stableId: string }; ``` ### ContractSparklineFlags [Section titled “ContractSparklineFlags”](#contractsparklineflags) ```ts interface ContractSparklineFlags { showMarkers?: boolean; showAxis?: boolean; showHighPoint?: boolean; showLowPoint?: boolean; showFirstPoint?: boolean; showLastPoint?: boolean; showNegativePoints?: boolean; } ``` ### ContractSparklinePlanMode [Section titled “ContractSparklinePlanMode”](#contractsparklineplanmode) ```ts type ContractSparklinePlanMode = "inventory" | "preview" | "apply"; ``` ### ContractSparklineProjectionEntry [Section titled “ContractSparklineProjectionEntry”](#contractsparklineprojectionentry) ```ts interface ContractSparklineProjectionEntry { stableId: string; sheetPath: string; sourceRef: string; targetRef: string; targetRow: number; targetCol: number; sparklineType: ContractSparklineType; style: ContractSparklineStyle; flags: Required; renderText: string; values: Array; seriesColor?: string; negativeColor?: string; groupId?: string; } ``` ### ContractSparklineStyle [Section titled “ContractSparklineStyle”](#contractsparklinestyle) ```ts type ContractSparklineStyle = "default" | "accent" | "calm"; ``` ### ContractSparklineType [Section titled “ContractSparklineType”](#contractsparklinetype) ```ts type ContractSparklineType = "line" | "column" | "winLoss"; ``` ### ContractXlsxChartCreationPatch [Section titled “ContractXlsxChartCreationPatch”](#contractxlsxchartcreationpatch) ```ts interface ContractXlsxChartCreationPatch { activeSheetPath: string; sheetName: string; objectId?: string | null; objectName?: string | null; zOrder?: number | null; chartType: ContractChartType; stackMode?: ContractChartStackMode | null; title?: string | null; categoryAxisTitle?: string | null; valueAxisTitle?: string | null; stylePreset?: ContractChartStylePreset | null; chartStyleGalleryId?: string | null; chartColorPaletteId?: string | null; legendPosition?: ContractChartLegendPosition | null; chartAreaFillColor?: string | null; chartAreaLineColor?: string | null; plotAreaFillColor?: string | null; plotAreaLineColor?: string | null; seriesFillColor?: string | null; firstDataPointFillColor?: string | null; showDataLabels?: boolean | null; dataLabelNumberFormat?: string | null; valueAxisLineColor?: string | null; valueAxisMinimum?: number | null; valueAxisMaximum?: number | null; valueAxisNumberFormat?: string | null; showGridlines?: boolean | null; showAxes?: boolean | null; showTrendline?: boolean | null; showErrorBars?: boolean | null; showSecondaryAxis?: boolean | null; emptyCellBehavior?: "gaps" | "zero" | "connect" | null; pivotSourceName?: string | null; from: ContractObjectAnchorCell; to: ContractObjectAnchorCell; series: ContractChartSeries[]; } ``` ### ContractXlsxChartMutationPatch [Section titled “ContractXlsxChartMutationPatch”](#contractxlsxchartmutationpatch) ```ts interface ContractXlsxChartMutationPatch { activeSheetPath: string; objectId: string; relId: string; chartType: ContractChartType; stackMode?: ContractChartStackMode | null; title?: string | null; categoryAxisTitle?: string | null; valueAxisTitle?: string | null; stylePreset?: ContractChartStylePreset | null; chartStyleGalleryId?: string | null; chartColorPaletteId?: string | null; legendPosition?: ContractChartLegendPosition | null; showDataLabels?: boolean | null; dataLabelNumberFormat?: string | null; valueAxisMinimum?: number | null; valueAxisMaximum?: number | null; valueAxisNumberFormat?: string | null; showGridlines?: boolean | null; showAxes?: boolean | null; showSecondaryAxis?: boolean | null; emptyCellBehavior?: "gaps" | "zero" | "connect" | null; refreshCaches?: boolean | null; series: ContractChartSeries[]; } ``` ### ContractXlsxChartObjectMovePatch [Section titled “ContractXlsxChartObjectMovePatch”](#contractxlsxchartobjectmovepatch) ```ts interface ContractXlsxChartObjectMovePatch { activeSheetPath: string; objectId: string; relId: string; from: ContractObjectAnchorCell; ext: ContractObjectExtent; } ``` ### ContractXlsxChartSeriesUpdatePatch [Section titled “ContractXlsxChartSeriesUpdatePatch”](#contractxlsxchartseriesupdatepatch) ```ts interface ContractXlsxChartSeriesUpdatePatch { activeSheetPath: string; objectId: string; relId: string; seriesIndex: number; nameRef?: string | null; nameLiteral?: string | null; categoryAxisTitle?: string | null; valueAxisTitle?: string | null; categoryRef: string; valueRef: string; categories?: string[] | null; values?: number[] | null; } ``` ### ContractXlsxDrawingImageCreationPatch [Section titled “ContractXlsxDrawingImageCreationPatch”](#contractxlsxdrawingimagecreationpatch) ```ts interface ContractXlsxDrawingImageCreationPatch { activeSheetPath: string; sheetName: string; objectId: string; objectName?: string | null; mimeType: "image/png" | "image/jpeg"; dataUrl: string; from: ContractObjectAnchorCell; ext: ContractObjectExtent; altText?: string | null; linkedSourceRange?: string | null; svgText?: string | null; } ``` ### ContractXlsxDrawingObjectDeletionPatch [Section titled “ContractXlsxDrawingObjectDeletionPatch”](#contractxlsxdrawingobjectdeletionpatch) ```ts interface ContractXlsxDrawingObjectDeletionPatch { activeSheetPath: string; objectId: string; objectFamily: "chart" | "image"; relId: string; } ``` ### ContractXlsxDrawingObjectGroupMemberPatch [Section titled “ContractXlsxDrawingObjectGroupMemberPatch”](#contractxlsxdrawingobjectgroupmemberpatch) ```ts interface ContractXlsxDrawingObjectGroupMemberPatch { objectId: string; objectFamily: "chart" | "image"; relId: string; } ``` ### ContractXlsxDrawingObjectGroupPatch [Section titled “ContractXlsxDrawingObjectGroupPatch”](#contractxlsxdrawingobjectgrouppatch) ```ts interface ContractXlsxDrawingObjectGroupPatch { activeSheetPath: string; groupId: string; groupName?: string | null; members: ContractXlsxDrawingObjectGroupMemberPatch[]; } ``` ### ContractXlsxDrawingObjectImageTransformPatch [Section titled “ContractXlsxDrawingObjectImageTransformPatch”](#contractxlsxdrawingobjectimagetransformpatch) ```ts interface ContractXlsxDrawingObjectImageTransformPatch { activeSheetPath: string; objectId: string; objectFamily: "image"; relId: string; rotationDeg?: number | null; imageCrop?: ContractDrawingObjectImageCrop | null; flipH?: boolean | null; flipV?: boolean | null; hidden?: boolean | null; } ``` ### ContractXlsxDrawingObjectMetadataPatch [Section titled “ContractXlsxDrawingObjectMetadataPatch”](#contractxlsxdrawingobjectmetadatapatch) ```ts interface ContractXlsxDrawingObjectMetadataPatch { activeSheetPath: string; objectId: string; objectFamily: "chart" | "image"; relId: string; objectName?: string | null; altText?: string | null; title?: string | null; description?: string | null; decorative?: boolean | null; hidden?: boolean | null; printObject?: boolean | null; locksWithSheet?: boolean | null; } ``` ### ContractXlsxDrawingObjectMovePatch [Section titled “ContractXlsxDrawingObjectMovePatch”](#contractxlsxdrawingobjectmovepatch) ```ts interface ContractXlsxDrawingObjectMovePatch { activeSheetPath: string; objectId: string; objectFamily: "chart" | "image"; relId: string; from: ContractObjectAnchorCell; ext: ContractObjectExtent; } ``` ### ContractXlsxDrawingObjectUngroupPatch [Section titled “ContractXlsxDrawingObjectUngroupPatch”](#contractxlsxdrawingobjectungrouppatch) ```ts interface ContractXlsxDrawingObjectUngroupPatch { activeSheetPath: string; groupId: string; } ``` ### ContractXlsxDrawingObjectZOrderPatch [Section titled “ContractXlsxDrawingObjectZOrderPatch”](#contractxlsxdrawingobjectzorderpatch) ```ts interface ContractXlsxDrawingObjectZOrderPatch { activeSheetPath: string; objectId: string; objectFamily: "chart" | "image"; relId: string; action: "forward" | "backward" | "front" | "back"; } ``` ### ContractXlsxShapeObjectPatch [Section titled “ContractXlsxShapeObjectPatch”](#contractxlsxshapeobjectpatch) ```ts interface ContractXlsxShapeObjectPatch { objectId: string; objectName?: string | null; altText?: string | null; hidden?: boolean | null; prst: string; savePrst?: string | null; from: ContractObjectAnchorCell; to?: ContractObjectAnchorCell | null; ext: ContractObjectExtent; zOrder?: number | null; fillHex?: string | null; fillOpacity?: number | null; gradientFill?: boolean | null; gradientAngle?: number | null; gradientColor1?: string | null; gradientColor2?: string | null; lineHex?: string | null; strokeOnly?: boolean | null; lineWidthEmu?: number | null; rotationDegrees?: number | null; textRotationDegrees?: number | null; adj?: number | null; isLine?: boolean | null; flipH?: boolean | null; flipV?: boolean | null; headEnd?: string | null; tailEnd?: string | null; shadowPreset?: string | null; shadowColor?: string | null; shadowOpacity?: number | null; shadowBlur?: number | null; shadowAngle?: number | null; shadowDist?: number | null; glowColor?: string | null; glowSize?: number | null; glowOpacity?: number | null; softEdges?: number | null; reflectionOpacity?: number | null; reflectionBlur?: number | null; reflectionDistance?: number | null; reflectionSize?: number | null; textOutlineHex?: string | null; textFillType?: string | null; textFillOpacity?: number | null; textOutlineType?: string | null; textOutlineOpacity?: number | null; textOutlineWidth?: number | null; textShadow?: boolean | null; textShadowColor?: string | null; textShadowOpacity?: number | null; textShadowBlur?: number | null; textShadowAngle?: number | null; textShadowDist?: number | null; textGlowColor?: string | null; textGlowSize?: number | null; textGlowOpacity?: number | null; textSoftEdges?: number | null; bevelTopPreset?: string | null; bevelTopWidth?: number | null; bevelTopHeight?: number | null; bevelBottomPreset?: string | null; bevelBottomWidth?: number | null; bevelBottomHeight?: number | null; depthColor?: string | null; depth?: number | null; contourColor?: string | null; contourWidth?: number | null; material?: string | null; lightingRig?: string | null; lightingAngle?: number | null; cameraPreset?: string | null; rotationX?: number | null; rotationY?: number | null; rotationZ?: number | null; perspective?: number | null; wrapText?: boolean | null; overflowText?: boolean | null; autofit?: string | null; textDirection?: string | null; textMarginLeft?: number | null; textMarginRight?: number | null; textMarginTop?: number | null; textMarginBottom?: number | null; underline?: boolean | null; stCxnObjectId?: string | null; stCxnIdx?: number | null; endCxnObjectId?: string | null; endCxnIdx?: number | null; nativeNvId?: number | null; text?: string | null; paragraphs?: ContractTextParagraph[] | null; fontFamily?: string | null; fontSize?: number | null; bold?: boolean | null; italic?: boolean | null; textColor?: string | null; horizontalAlign?: ContractTextHorizontalAlign | null; verticalAlign?: ContractTextVerticalAlign | null; freeformPoints?: ReadonlyArray<{ x: number; y: number; c1x?: number | null; c1y?: number | null; c2x?: number | null; c2y?: number | null; }> | null; isClosed?: boolean | null; rawAnchorXml?: string | null; geometryEdited?: boolean | null; adjustments?: ReadonlyArray<{ name: string; val: number }> | null; strokeDash?: string | null; } ``` ### ContractXlsxShapeSheetPatch [Section titled “ContractXlsxShapeSheetPatch”](#contractxlsxshapesheetpatch) ```ts interface ContractXlsxShapeSheetPatch { activeSheetPath: string; objects: ContractXlsxShapeObjectPatch[]; } ``` # Types: general and utility > Compute Contract type definitions — everything that doesn't belong to a single topic: transport, refusals, shared enumerations. Names: 171. Definitions of the names from the “TypeScript type” column on the operation pages. Other dictionary topics: [session, workbook, and sheets](/reference/sumsheet/types-session/) · [cells and ranges](/reference/sumsheet/types-cells/) · [formulas and calculation](/reference/sumsheet/types-formulas/) · [formatting](/reference/sumsheet/types-format/) · [data and sheet objects](/reference/sumsheet/types-data/) · [pivot tables](/reference/sumsheet/types-pivot/) · [charts and graphics](/reference/sumsheet/types-charts/) · [printing and page layout](/reference/sumsheet/types-print/) · [Power Query](/reference/sumsheet/types-powerquery/) · [VBA and macros](/reference/sumsheet/types-vba/) · [protection and review](/reference/sumsheet/types-protection/) · **general and utility**. Types on this page — 171 * [`ComputeBackendKind`](#computebackendkind) * [`ContractCreatedDocumentObject`](#contractcreateddocumentobject) * [`ContractCurrentSourceSaveReadiness`](#contractcurrentsourcesavereadiness) * [`ContractCurrentSourceSaveReadinessScope`](#contractcurrentsourcesavereadinessscope) * [`ContractCustomViewApplyTransaction`](#contractcustomviewapplytransaction) * [`ContractCustomViewDefinition`](#contractcustomviewdefinition) * [`ContractCustomViewSnapshot`](#contractcustomviewsnapshot) * [`ContractCustomViewsIntent`](#contractcustomviewsintent) * [`ContractCustomViewsResult`](#contractcustomviewsresult) * [`ContractCustomViewsStatus`](#contractcustomviewsstatus) * [`ContractDataAnalysisAction`](#contractdataanalysisaction) * [`ContractDataAnalysisDestination`](#contractdataanalysisdestination) * [`ContractDataAnalysisRandomDistribution`](#contractdataanalysisrandomdistribution) * [`ContractDataAnalysisSamplingMethod`](#contractdataanalysissamplingmethod) * [`ContractDataAnalysisTool`](#contractdataanalysistool) * [`ContractDataCleanupAction`](#contractdatacleanupaction) * [`ContractDataCleanupIntent`](#contractdatacleanupintent) * [`ContractDataCleanupPreviewValue`](#contractdatacleanuppreviewvalue) * [`ContractDelimitedInterpretation`](#contractdelimitedinterpretation) * [`ContractDelimitedLineEnding`](#contractdelimitedlineending) * [`ContractDelimitedLocale`](#contractdelimitedlocale) * [`ContractDelimitedOpenDelimiter`](#contractdelimitedopendelimiter) * [`ContractDelimitedOpenLayout`](#contractdelimitedopenlayout) * [`ContractDelimitedOpenOptions`](#contractdelimitedopenoptions) * [`ContractDelimitedQuotePolicy`](#contractdelimitedquotepolicy) * [`ContractDelimitedSaveDelimiter`](#contractdelimitedsavedelimiter) * [`ContractDelimitedSaveEncoding`](#contractdelimitedsaveencoding) * [`ContractDelimitedSaveOptions`](#contractdelimitedsaveoptions) * [`ContractDirectionPlaceholderKind`](#contractdirectionplaceholderkind) * [`ContractDocumentPropertiesIntent`](#contractdocumentpropertiesintent) * [`ContractDocumentPropertiesResult`](#contractdocumentpropertiesresult) * [`ContractDocumentPropertyMutation`](#contractdocumentpropertymutation) * [`ContractDocumentPropertyRecord`](#contractdocumentpropertyrecord) * [`ContractDocumentPropertyScope`](#contractdocumentpropertyscope) * [`ContractDocumentPropertyStatistic`](#contractdocumentpropertystatistic) * [`ContractDocumentPropertyValue`](#contractdocumentpropertyvalue) * [`ContractEntityConversionDisposition`](#contractentityconversiondisposition) * [`ContractEntityConversionRefusal`](#contractentityconversionrefusal) * [`ContractEntityConversionRefusalCode`](#contractentityconversionrefusalcode) * [`ContractEntityDataTypeKind`](#contractentitydatatypekind) * [`ContractEntityFieldValue`](#contractentityfieldvalue) * [`ContractEntityProviderIdentity`](#contractentityprovideridentity) * [`ContractEntityResolutionState`](#contractentityresolutionstate) * [`ContractErrorCode`](#contracterrorcode) * [`ContractFidelityClass`](#contractfidelityclass) * [`ContractFileRecoveryAction`](#contractfilerecoveryaction) * [`ContractFileRecoveryActionKind`](#contractfilerecoveryactionkind) * [`ContractFileRecoveryBounds`](#contractfilerecoverybounds) * [`ContractFileRecoveryDiagnostic`](#contractfilerecoverydiagnostic) * [`ContractFileRecoveryDiagnosticCode`](#contractfilerecoverydiagnosticcode) * [`ContractFileRecoveryMode`](#contractfilerecoverymode) * [`ContractFileRecoveryPlan`](#contractfilerecoveryplan) * [`ContractFileRecoveryPlanStatus`](#contractfilerecoveryplanstatus) * [`ContractFileRecoveryPublication`](#contractfilerecoverypublication) * [`ContractFileRecoverySeverity`](#contractfilerecoveryseverity) * [`ContractFormControlInteraction`](#contractformcontrolinteraction) * [`ContractFormControlKind`](#contractformcontrolkind) * [`ContractFormControlView`](#contractformcontrolview) * [`ContractFormControlsAction`](#contractformcontrolsaction) * [`ContractHyperlinkMetadataEntry`](#contracthyperlinkmetadataentry) * [`ContractHyperlinkMetadataProjection`](#contracthyperlinkmetadataprojection) * [`ContractLegacyNotePayload`](#contractlegacynotepayload) * [`ContractLegacyNotePayloadSource`](#contractlegacynotepayloadsource) * [`ContractLinkedPicturePayload`](#contractlinkedpicturepayload) * [`ContractNavigationEdgeDirection`](#contractnavigationedgedirection) * [`ContractObjectAnchor`](#contractobjectanchor) * [`ContractObjectAnchorKind`](#contractobjectanchorkind) * [`ContractObjectAnchorOrigin`](#contractobjectanchororigin) * [`ContractObjectExtent`](#contractobjectextent) * [`ContractObjectFamilyStatusPlaceholder`](#contractobjectfamilystatusplaceholder) * [`ContractObjectPlaceholderFamily`](#contractobjectplaceholderfamily) * [`ContractObjectPlaceholderPresence`](#contractobjectplaceholderpresence) * [`ContractObjectPlaceholderScope`](#contractobjectplaceholderscope) * [`ContractObjectPlaceholderStatus`](#contractobjectplaceholderstatus) * [`ContractObjectSelectionPaneCommand`](#contractobjectselectionpanecommand) * [`ContractObjectSelectionPanePackageCommand`](#contractobjectselectionpanepackagecommand) * [`ContractOpenDocumentObjectCreation`](#contractopendocumentobjectcreation) * [`ContractParallelRecalcInstrumentation`](#contractparallelrecalcinstrumentation) * [`ContractParamEdge`](#contractparamedge) * [`ContractParamValueRepr`](#contractparamvaluerepr) * [`ContractParameterDTO`](#contractparameterdto) * [`ContractParameterKind`](#contractparameterkind) * [`ContractPasteMode`](#contractpastemode) * [`ContractPersistedParamOptionsBinding`](#contractpersistedparamoptionsbinding) * [`ContractPreviewDataBar`](#contractpreviewdatabar) * [`ContractPreviewGradientStop`](#contractpreviewgradientstop) * [`ContractPreviewHorizontalAlign`](#contractpreviewhorizontalalign) * [`ContractPreviewHyperlink`](#contractpreviewhyperlink) * [`ContractPreviewUnderlineKind`](#contractpreviewunderlinekind) * [`ContractPreviewValueKind`](#contractpreviewvaluekind) * [`ContractPreviewVerticalAlign`](#contractpreviewverticalalign) * [`ContractRecalcRequiredReason`](#contractrecalcrequiredreason) * [`ContractReplaceEdit`](#contractreplaceedit) * [`ContractSaveKind`](#contractsavekind) * [`ContractSmartArtPayload`](#contractsmartartpayload) * [`ContractSmartArtRenderStatus`](#contractsmartartrenderstatus) * [`ContractSourceTrustAction`](#contractsourcetrustaction) * [`ContractSourceTrustAuthority`](#contractsourcetrustauthority) * [`ContractSourceTrustDecision`](#contractsourcetrustdecision) * [`ContractSourceTrustDirectoryIdentity`](#contractsourcetrustdirectoryidentity) * [`ContractSourceTrustDocumentGrant`](#contractsourcetrustdocumentgrant) * [`ContractSourceTrustFileState`](#contractsourcetrustfilestate) * [`ContractSourceTrustGrantBinding`](#contractsourcetrustgrantbinding) * [`ContractSourceTrustLocationGrant`](#contractsourcetrustlocationgrant) * [`ContractSourceTrustMode`](#contractsourcetrustmode) * [`ContractSourceTrustObservation`](#contractsourcetrustobservation) * [`ContractSourceTrustProvenance`](#contractsourcetrustprovenance) * [`ContractSourceTrustReason`](#contractsourcetrustreason) * [`ContractSourceTrustStoreState`](#contractsourcetruststorestate) * [`ContractStructuredReferenceTrustMetadata`](#contractstructuredreferencetrustmetadata) * [`ContractTrustCenterPolicy`](#contracttrustcenterpolicy) * [`ContractTrustCenterPolicyState`](#contracttrustcenterpolicystate) * [`ContractWhatIfAction`](#contractwhatifaction) * [`ContractWhatIfValue`](#contractwhatifvalue) * [`ContractWordArtPayload`](#contractwordartpayload) * [`ContractWordArtRenderStatus`](#contractwordartrenderstatus) * [`ContractWritingModePlaceholder`](#contractwritingmodeplaceholder) * [`ContractXlsbDirtySaveProfile`](#contractxlsbdirtysaveprofile) * [`ContractXlsxDataViewStatePatch`](#contractxlsxdataviewstatepatch) * [`ContractXlsxDataViewStateViewPatch`](#contractxlsxdataviewstateviewpatch) * [`ContractXlsxDelimitedDataConnectionDeletePatch`](#contractxlsxdelimiteddataconnectiondeletepatch) * [`ContractXlsxDelimitedDataConnectionPatch`](#contractxlsxdelimiteddataconnectionpatch) * [`ContractXlsxLegacyNoteMutationPatch`](#contractxlsxlegacynotemutationpatch) * [`ContractXlsxSavePatch`](#contractxlsxsavepatch) * [`ContractXlsxWorksheetViewPatch`](#contractxlsxworksheetviewpatch) * [`FileIdentityDescriptor`](#fileidentitydescriptor) * [`FileKindDescriptor`](#filekinddescriptor) * [`FileRefreshDescriptor`](#filerefreshdescriptor) * [`FileSourceDescriptor`](#filesourcedescriptor) * [`FoldExplainPlan`](#foldexplainplan) * [`FoldExplainRemote`](#foldexplainremote) * [`FoldExplainRemoteOptions`](#foldexplainremoteoptions) * [`FoldExplainStage`](#foldexplainstage) * [`FoldPlacement`](#foldplacement) * [`FolderNavigatorEntryWire`](#foldernavigatorentrywire) * [`FolderNavigatorFileDiagnosticWire`](#foldernavigatorfilediagnosticwire) * [`FolderNavigatorOutcome`](#foldernavigatoroutcome) * [`FolderSourceDescriptor`](#foldersourcedescriptor) * [`FoldingVerdict`](#foldingverdict) * [`InspectorAstNode`](#inspectorastnode) * [`InspectorBinding`](#inspectorbinding) * [`InspectorBuiltinRef`](#inspectorbuiltinref) * [`InspectorDiagnostic`](#inspectordiagnostic) * [`InspectorLineage`](#inspectorlineage) * [`InspectorOutcome`](#inspectoroutcome) * [`LookupIndexHandleInfo`](#lookupindexhandleinfo) * [`LookupIndexMode`](#lookupindexmode) * [`MExpressionOutcome`](#mexpressionoutcome) * [`MWireAstNode`](#mwireastnode) * [`MWireDiagnostic`](#mwirediagnostic) * [`MWireError`](#mwireerror) * [`MWireField`](#mwirefield) * [`MWireFunctionType`](#mwirefunctiontype) * [`MWireListType`](#mwirelisttype) * [`MWireMetadataField`](#mwiremetadatafield) * [`MWireMetadataRecord`](#mwiremetadatarecord) * [`MWirePosition`](#mwireposition) * [`MWireRecordType`](#mwirerecordtype) * [`MWireSpan`](#mwirespan) * [`MWireType`](#mwiretype) * [`MWireTypeField`](#mwiretypefield) * [`MWireValue`](#mwirevalue) * [`MWireValueVariant`](#mwirevaluevariant) * [`RequestedBackendField`](#requestedbackendfield) * [`SourceGridDescriptor`](#sourcegriddescriptor) * [`SourceRequestDescriptor`](#sourcerequestdescriptor) * [`StepMutation`](#stepmutation) * [`StepMutationOutcome`](#stepmutationoutcome) * [`StepMutationResult`](#stepmutationresult) * [`WebSourceResolverEntry`](#websourceresolverentry) * [`WebSourceTestAllowlist`](#websourcetestallowlist) ### ComputeBackendKind [Section titled “ComputeBackendKind”](#computebackendkind) ```ts type ComputeBackendKind = "wasm" | "native-desktop" | "service-host"; ``` ### ContractCreatedDocumentObject [Section titled “ContractCreatedDocumentObject”](#contractcreateddocumentobject) ```ts interface ContractCreatedDocumentObject { stableId: string; nonVisualId: number; sheetPath: string; drawingPath: string; family: "image" | "shape" | "text-box" | "chart" | "pivot-table"; name: string; anchor: ContractObjectAnchor; relationshipId?: string | null; } ``` ### ContractCurrentSourceSaveReadiness [Section titled “ContractCurrentSourceSaveReadiness”](#contractcurrentsourcesavereadiness) ```ts interface ContractCurrentSourceSaveReadiness { scope: ContractCurrentSourceSaveReadinessScope; failureCode?: string | null; failureMessage?: string | null; failureDetails?: string | null; } ``` ### ContractCurrentSourceSaveReadinessScope [Section titled “ContractCurrentSourceSaveReadinessScope”](#contractcurrentsourcesavereadinessscope) ```ts type ContractCurrentSourceSaveReadinessScope = (typeof CONTRACT_CURRENT_SOURCE_SAVE_READINESS_SCOPE_IDS)[number]; ``` ### ContractCustomViewApplyTransaction [Section titled “ContractCustomViewApplyTransaction”](#contractcustomviewapplytransaction) ```ts interface ContractCustomViewApplyTransaction { transactionId: string; viewId: string; windowId: string; registryRevision: number; previousWindow?: ContractCustomViewWindowSnapshot; nextWindow: ContractCustomViewWindowSnapshot; sheetStates: ContractCustomViewSheetSnapshot[]; includePrintSettings: boolean; includeHiddenRowCol: boolean; workbookChanged: boolean; contentFingerprintBefore: string; contentFingerprintAfter: string; } ``` ### ContractCustomViewDefinition [Section titled “ContractCustomViewDefinition”](#contractcustomviewdefinition) ```ts interface ContractCustomViewDefinition { id: string; name: string; includePrintSettings: boolean; includeHiddenRowCol: boolean; snapshot: ContractCustomViewSnapshot; } ``` ### ContractCustomViewSnapshot [Section titled “ContractCustomViewSnapshot”](#contractcustomviewsnapshot) ```ts interface ContractCustomViewSnapshot { window: ContractCustomViewWindowSnapshot; sheets: ContractCustomViewSheetSnapshot[]; } ``` ### ContractCustomViewsIntent [Section titled “ContractCustomViewsIntent”](#contractcustomviewsintent) ```ts type ContractCustomViewsIntent = | { action: "list"; windowId: string } | { action: "add"; windowId: string; name: string; window: ContractCustomViewWindowSnapshot; includePrintSettings: boolean; includeHiddenRowCol: boolean; expectedRegistryRevision?: number; expectedRevision?: number; readOnly?: boolean; } | { action: "show"; windowId: string; viewId: string; expectedRegistryRevision?: number; expectedRevision?: number; readOnly?: boolean; } | { action: "delete"; windowId: string; viewId: string; expectedRegistryRevision?: number; expectedRevision?: number; readOnly?: boolean; }; ``` ### ContractCustomViewsResult [Section titled “ContractCustomViewsResult”](#contractcustomviewsresult) ```ts interface ContractCustomViewsResult { status: ContractCustomViewsStatus; registryRevision: number; views: ContractCustomViewDefinition[]; activeViewId?: string; applyTransaction?: ContractCustomViewApplyTransaction; reason?: string; workbookChanged: boolean; workbookHistory?: ContractWorkbookHistoryProjection; } ``` ### ContractCustomViewsStatus [Section titled “ContractCustomViewsStatus”](#contractcustomviewsstatus) ```ts type ContractCustomViewsStatus = "listed" | "added" | "shown" | "deleted" | "undone" | "redone" | "blocked"; ``` ### ContractDataAnalysisAction [Section titled “ContractDataAnalysisAction”](#contractdataanalysisaction) ```ts type ContractDataAnalysisAction = | { action: "preview"; analysis: ContractDataAnalysisTool; } | { action: "run"; analysis: ContractDataAnalysisTool; destination: ContractDataAnalysisDestination; } | { action: "undo" } | { action: "redo" } | { action: "cancel" }; ``` ### ContractDataAnalysisDestination [Section titled “ContractDataAnalysisDestination”](#contractdataanalysisdestination) ```ts type ContractDataAnalysisDestination = | { mode: "existing_range"; anchor: CellRange } | { mode: "new_worksheet"; name?: string | null } | { mode: "new_workbook"; name?: string | null }; ``` ### ContractDataAnalysisRandomDistribution [Section titled “ContractDataAnalysisRandomDistribution”](#contractdataanalysisrandomdistribution) ```ts type ContractDataAnalysisRandomDistribution = | { distribution: "uniform"; lowerBound: number; upperBound: number } | { distribution: "normal"; mean: number; standardDeviation: number } | { distribution: "bernoulli"; probability: number } | { distribution: "binomial"; numberOfTrials: number; probability: number } | { distribution: "poisson"; lambda: number } | { distribution: "patterned"; fromValue: number; toValue: number; step: number; repeatEach: number; repeatSequence: number; } | { distribution: "discrete"; valueProbabilityRange: CellRange }; ``` ### ContractDataAnalysisSamplingMethod [Section titled “ContractDataAnalysisSamplingMethod”](#contractdataanalysissamplingmethod) ```ts type ContractDataAnalysisSamplingMethod = | { method: "periodic"; period: number } | { method: "random"; sampleCount: number }; ``` ### ContractDataAnalysisTool [Section titled “ContractDataAnalysisTool”](#contractdataanalysistool) ```ts type ContractDataAnalysisTool = | { tool: "analyze_insights"; inputRange: CellRange; question?: string; insertion?: ContractAnalyzeInsightsInsertion; selectedInsightId?: string | null; locale?: string | null; expectedRevision?: number | null; requestGeneration?: number | null; } | { tool: "forecast_sheet"; timelineRange: CellRange; valuesRange: CellRange; forecastEnd?: string; seasonality?: number; confidenceLevel?: number; dataCompletion?: 0 | 1; aggregation?: number; labels?: boolean; includeStatistics?: boolean; chartType?: "line" | "column"; locale?: string | null; expectedRevision?: number | null; requestGeneration?: number | null; } | { tool: "regression"; yRange: CellRange; xRange: CellRange; labels?: boolean; constantIsZero?: boolean; confidenceLevel?: number; residuals?: boolean; standardizedResiduals?: boolean; predictedValues?: boolean; } | { tool: "descriptive_statistics"; inputRange: CellRange; groupedBy?: ContractDataAnalysisGrouping; labels?: boolean; summaryStatistics?: boolean; confidenceLevelForMean?: number | null; } | { tool: "correlation" | "covariance"; inputRange: CellRange; groupedBy?: ContractDataAnalysisGrouping; labels?: boolean; } | { tool: "histogram"; inputRange: CellRange; binRange: CellRange; labels?: boolean; cumulativePercentage?: boolean; pareto?: boolean; chartOutput?: boolean; } | { tool: "moving_average"; inputRange: CellRange; interval: number; labels?: boolean; standardErrors?: boolean; } | { tool: "anova_single_factor"; inputRange: CellRange; groupedBy?: ContractDataAnalysisGrouping; labels?: boolean; alpha?: number; } | { tool: | "anova_two_factor_without_replication" | "anova_two_factor_with_replication"; inputRange: CellRange; rowsPerSample?: number; labels?: boolean; alpha?: number; } | { tool: | "t_test_paired_two_sample_for_means" | "t_test_two_sample_equal_variances" | "t_test_two_sample_unequal_variances"; variable1Range: CellRange; variable2Range: CellRange; labels?: boolean; hypothesizedMeanDifference?: number; alpha?: number; } | { tool: "z_test_two_sample_for_means"; variable1Range: CellRange; variable2Range: CellRange; knownVariance1: number; knownVariance2: number; labels?: boolean; hypothesizedMeanDifference?: number; alpha?: number; } | { tool: "f_test_two_sample_for_variances"; variable1Range: CellRange; variable2Range: CellRange; labels?: boolean; alpha?: number; } | { tool: "exponential_smoothing"; inputRange: CellRange; groupedBy?: ContractDataAnalysisGrouping; labels?: boolean; dampingFactor: number; standardErrors?: boolean; chartOutput?: boolean; } | { tool: "fourier_analysis"; inputRange: CellRange; labels?: boolean; inverse?: boolean; } | { tool: "random_number_generation"; numberOfVariables: number; numberOfRandomNumbers: number; distribution: ContractDataAnalysisRandomDistribution; randomSeed?: number | null; } | { tool: "rank_and_percentile"; inputRange: CellRange; groupedBy?: ContractDataAnalysisGrouping; labels?: boolean; } | { tool: "sampling"; inputRange: CellRange; labels?: boolean; sampling: ContractDataAnalysisSamplingMethod; }; ``` ### ContractDataCleanupAction [Section titled “ContractDataCleanupAction”](#contractdatacleanupaction) ```ts type ContractDataCleanupAction = "preview" | "apply"; ``` ### ContractDataCleanupIntent [Section titled “ContractDataCleanupIntent”](#contractdatacleanupintent) ```ts type ContractDataCleanupIntent = | { kind: "text_to_columns_delimited"; source: CellRange; destinationRow?: number | null; destinationCol?: number | null; delimiter: string; textQualifier?: boolean; columnFormats?: ContractTextToColumnsColumnFormat[]; decimalSeparator?: string | null; thousandsSeparator?: string | null; overwriteDestination?: boolean; } | { kind: "text_to_columns_fixed_width"; source: CellRange; destinationRow?: number | null; destinationCol?: number | null; breakLines: number[]; columnFormats?: ContractTextToColumnsColumnFormat[]; decimalSeparator?: string | null; thousandsSeparator?: string | null; overwriteDestination?: boolean; } | { kind: "text_to_columns_delimited_advanced"; source: CellRange; destinationRow?: number | null; destinationCol?: number | null; delimiter: string; textQualifier?: boolean; columnFormats?: ContractTextToColumnsColumnFormat[]; overwriteDestination?: boolean; advancedOptions: ContractTextToColumnsAdvancedOptions; } | { kind: "text_to_columns_fixed_width_advanced"; source: CellRange; destinationRow?: number | null; destinationCol?: number | null; breakLines: number[]; columnFormats?: ContractTextToColumnsColumnFormat[]; overwriteDestination?: boolean; advancedOptions: ContractTextToColumnsAdvancedOptions; } | { kind: "remove_duplicates"; source: CellRange; headerPolicy?: ContractRemoveDuplicatesHeaderPolicy; keyColumns?: number[]; tableName?: string | null; } | { kind: "remove_duplicates_copy"; source: CellRange; destinationRow: number; destinationCol: number; headerPolicy?: ContractRemoveDuplicatesHeaderPolicy; keyColumns?: number[]; tableName?: string | null; }; ``` ### ContractDataCleanupPreviewValue [Section titled “ContractDataCleanupPreviewValue”](#contractdatacleanuppreviewvalue) ```ts interface ContractDataCleanupPreviewValue { kind: "blank" | "empty_string" | "boolean" | "date" | "number" | "error" | "text"; value: string; } ``` ### ContractDelimitedInterpretation [Section titled “ContractDelimitedInterpretation”](#contractdelimitedinterpretation) ```ts type ContractDelimitedInterpretation = (typeof CONTRACT_DELIMITED_INTERPRETATION_IDS)[number]; ``` ### ContractDelimitedLineEnding [Section titled “ContractDelimitedLineEnding”](#contractdelimitedlineending) ```ts type ContractDelimitedLineEnding = (typeof CONTRACT_DELIMITED_LINE_ENDING_IDS)[number]; ``` ### ContractDelimitedLocale [Section titled “ContractDelimitedLocale”](#contractdelimitedlocale) ```ts type ContractDelimitedLocale = string; ``` ### ContractDelimitedOpenDelimiter [Section titled “ContractDelimitedOpenDelimiter”](#contractdelimitedopendelimiter) ```ts type ContractDelimitedOpenDelimiter = ContractDelimitedSaveDelimiter; ``` ### ContractDelimitedOpenLayout [Section titled “ContractDelimitedOpenLayout”](#contractdelimitedopenlayout) ```ts type ContractDelimitedOpenLayout = (typeof CONTRACT_DELIMITED_OPEN_LAYOUT_IDS)[number]; ``` ### ContractDelimitedOpenOptions [Section titled “ContractDelimitedOpenOptions”](#contractdelimitedopenoptions) ```ts interface ContractDelimitedOpenOptions { layout?: ContractDelimitedOpenLayout | null; fixedWidthBreaks?: number[] | null; delimiter?: ContractDelimitedOpenDelimiter | null; customDelimiter?: string | null; delimiterSet?: string | null; textQualifier?: ContractDelimitedTextQualifier | null; consecutiveDelimitersAsOne?: boolean | null; encoding?: ContractDelimitedSaveEncoding | null; interpretation?: ContractDelimitedInterpretation | null; locale?: ContractDelimitedLocale | null; decimalSeparator?: string | null; thousandsSeparator?: string | null; columnFormats?: ContractDelimitedColumnFormat[] | null; startRow?: number | null; } ``` ### ContractDelimitedQuotePolicy [Section titled “ContractDelimitedQuotePolicy”](#contractdelimitedquotepolicy) ```ts type ContractDelimitedQuotePolicy = (typeof CONTRACT_DELIMITED_QUOTE_POLICY_IDS)[number]; ``` ### ContractDelimitedSaveDelimiter [Section titled “ContractDelimitedSaveDelimiter”](#contractdelimitedsavedelimiter) ```ts type ContractDelimitedSaveDelimiter = (typeof CONTRACT_DELIMITED_SAVE_DELIMITER_IDS)[number]; ``` ### ContractDelimitedSaveEncoding [Section titled “ContractDelimitedSaveEncoding”](#contractdelimitedsaveencoding) ```ts type ContractDelimitedSaveEncoding = (typeof CONTRACT_DELIMITED_SAVE_ENCODING_IDS)[number]; ``` ### ContractDelimitedSaveOptions [Section titled “ContractDelimitedSaveOptions”](#contractdelimitedsaveoptions) ```ts interface ContractDelimitedSaveOptions { delimiter?: ContractDelimitedSaveDelimiter | null; customDelimiter?: string | null; encoding?: ContractDelimitedSaveEncoding | null; quotePolicy?: ContractDelimitedQuotePolicy | null; lineEnding?: ContractDelimitedLineEnding | null; formattingLossConfirmed?: boolean; } ``` ### ContractDirectionPlaceholderKind [Section titled “ContractDirectionPlaceholderKind”](#contractdirectionplaceholderkind) ```ts type ContractDirectionPlaceholderKind = "default-ltr-session-placeholder"; ``` ### ContractDocumentPropertiesIntent [Section titled “ContractDocumentPropertiesIntent”](#contractdocumentpropertiesintent) ```ts type ContractDocumentPropertiesIntent = | { action: "list" } | { action: "apply"; expectedRevision?: number | null; mutations: ContractDocumentPropertyMutation[]; readOnly?: boolean; protected?: boolean; } | { action: "undo" | "redo"; expectedRevision: number; readOnly?: boolean; protected?: boolean; }; ``` ### ContractDocumentPropertiesResult [Section titled “ContractDocumentPropertiesResult”](#contractdocumentpropertiesresult) ```ts interface ContractDocumentPropertiesResult { status: "listed" | "applied" | "undone" | "redone" | "unchanged"; didChange: boolean; hasUnsavedSessionEdits: boolean; revision: number; undoAvailable: boolean; redoAvailable: boolean; capability: ContractDocumentPropertiesCapability; reasonCode?: string | null; core: ContractDocumentPropertyRecord[]; extended: ContractDocumentPropertyRecord[]; custom: ContractDocumentPropertyRecord[]; statistics: ContractDocumentPropertyStatistic[]; } ``` ### ContractDocumentPropertyMutation [Section titled “ContractDocumentPropertyMutation”](#contractdocumentpropertymutation) ```ts type ContractDocumentPropertyMutation = | { kind: "set_known"; propertyId: string; value: ContractDocumentPropertyValue | null; } | { kind: "upsert_custom"; propertyId?: string | null; name: string; value: Exclude; } | { kind: "delete_custom"; propertyId: string }; ``` ### ContractDocumentPropertyRecord [Section titled “ContractDocumentPropertyRecord”](#contractdocumentpropertyrecord) ```ts interface ContractDocumentPropertyRecord { propertyId: string; scope: ContractDocumentPropertyScope; name: string; editable: boolean; value: ContractDocumentPropertyValue | null; } ``` ### ContractDocumentPropertyScope [Section titled “ContractDocumentPropertyScope”](#contractdocumentpropertyscope) ```ts type ContractDocumentPropertyScope = "core" | "extended" | "custom"; ``` ### ContractDocumentPropertyStatistic [Section titled “ContractDocumentPropertyStatistic”](#contractdocumentpropertystatistic) ```ts interface ContractDocumentPropertyStatistic { statisticId: string; value: number; } ``` ### ContractDocumentPropertyValue [Section titled “ContractDocumentPropertyValue”](#contractdocumentpropertyvalue) ```ts type ContractDocumentPropertyValue = | { kind: "text"; value: string } | { kind: "integer"; decimal: string } | { kind: "real"; value: number } | { kind: "boolean"; value: boolean } | { kind: "date_time"; utc: string } | { kind: "opaque"; typeName: string }; ``` ### ContractEntityConversionDisposition [Section titled “ContractEntityConversionDisposition”](#contractentityconversiondisposition) ```ts type ContractEntityConversionDisposition = "resolved" | "refused"; ``` ### ContractEntityConversionRefusal [Section titled “ContractEntityConversionRefusal”](#contractentityconversionrefusal) ```ts interface ContractEntityConversionRefusal { code: ContractEntityConversionRefusalCode; message: string; } ``` ### ContractEntityConversionRefusalCode [Section titled “ContractEntityConversionRefusalCode”](#contractentityconversionrefusalcode) ```ts type ContractEntityConversionRefusalCode = "entity-provider-unavailable"; ``` ### ContractEntityDataTypeKind [Section titled “ContractEntityDataTypeKind”](#contractentitydatatypekind) ```ts type ContractEntityDataTypeKind = "stocks" | "currencies" | "geography"; ``` ### ContractEntityFieldValue [Section titled “ContractEntityFieldValue”](#contractentityfieldvalue) ```ts interface ContractEntityFieldValue { fieldId: string; label: string; displayValue: string; } ``` ### ContractEntityProviderIdentity [Section titled “ContractEntityProviderIdentity”](#contractentityprovideridentity) ```ts interface ContractEntityProviderIdentity { providerId: string; attribution: string; } ``` ### ContractEntityResolutionState [Section titled “ContractEntityResolutionState”](#contractentityresolutionstate) ```ts type ContractEntityResolutionState = "resolved" | "unresolved" | "stale"; ``` ### ContractErrorCode [Section titled “ContractErrorCode”](#contracterrorcode) ```ts type ContractErrorCode = "DIV0" | "NA" | string; ``` ### ContractFidelityClass [Section titled “ContractFidelityClass”](#contractfidelityclass) ```ts type ContractFidelityClass = (typeof CONTRACT_FIDELITY_CLASS_IDS)[number]; ``` ### ContractFileRecoveryAction [Section titled “ContractFileRecoveryAction”](#contractfilerecoveryaction) ```ts interface ContractFileRecoveryAction { kind: ContractFileRecoveryActionKind; part: string; relationshipId?: string; message: string; } ``` ### ContractFileRecoveryActionKind [Section titled “ContractFileRecoveryActionKind”](#contractfilerecoveryactionkind) ```ts type ContractFileRecoveryActionKind = | "rebuild_content_types" | "synthesize_root_relationships" | "drop_missing_relationship" | "deduplicate_relationships" | "remove_calc_chain" | "synthesize_styles" | "rebuild_shared_strings" | "normalize_sheet_ids" | "repair_worksheet"; ``` ### ContractFileRecoveryBounds [Section titled “ContractFileRecoveryBounds”](#contractfilerecoverybounds) ```ts interface ContractFileRecoveryBounds { maxArchiveBytes: number; maxEntryCount: number; maxPartBytes: number; maxTotalUncompressedBytes: number; maxXmlBytes: number; maxCompressionRatio: number; maxPlanActions: number; maxSheets: number; maxSalvagedCellsPerSheet: number; } ``` ### ContractFileRecoveryDiagnostic [Section titled “ContractFileRecoveryDiagnostic”](#contractfilerecoverydiagnostic) ```ts interface ContractFileRecoveryDiagnostic { code: ContractFileRecoveryDiagnosticCode; severity: ContractFileRecoverySeverity; part: string; message: string; } ``` ### ContractFileRecoveryDiagnosticCode [Section titled “ContractFileRecoveryDiagnosticCode”](#contractfilerecoverydiagnosticcode) ```ts type ContractFileRecoveryDiagnosticCode = | "zip_path_traversal" | "zip_duplicate_entry" | "zip_bomb_limit" | "zip_malformed" | "xml_oversized" | "unsafe_xml_construct" | "macro_or_active_content" | "digital_signature" | "external_relationship" | "ambiguous_topology" | "missing_content_types" | "malformed_content_types" | "missing_root_relationships" | "malformed_relationships" | "duplicate_relationship_id" | "missing_relationship_target" | "duplicate_sheet_id" | "missing_optional_part" | "malformed_optional_part" | "malformed_worksheet" | "salvage_limit" | "no_repair_needed"; ``` ### ContractFileRecoveryMode [Section titled “ContractFileRecoveryMode”](#contractfilerecoverymode) ```ts type ContractFileRecoveryMode = "repair" | "extract_data"; ``` ### ContractFileRecoveryPlan [Section titled “ContractFileRecoveryPlan”](#contractfilerecoveryplan) ```ts interface ContractFileRecoveryPlan { planId: string; sourceSha256: string; sourceByteCount: number; status: ContractFileRecoveryPlanStatus; canRepair: boolean; canExtractData: boolean; diagnostics: ContractFileRecoveryDiagnostic[]; actions: ContractFileRecoveryAction[]; bounds: ContractFileRecoveryBounds; } ``` ### ContractFileRecoveryPlanStatus [Section titled “ContractFileRecoveryPlanStatus”](#contractfilerecoveryplanstatus) ```ts type ContractFileRecoveryPlanStatus = "repairable" | "extract_only" | "blocked" | "no_repair_needed"; ``` ### ContractFileRecoveryPublication [Section titled “ContractFileRecoveryPublication”](#contractfilerecoverypublication) ```ts interface ContractFileRecoveryPublication { planId: string; sourceSha256: string; outputSha256: string; outputByteCount: number; outputPath: string; mode: ContractFileRecoveryMode; actionCount: number; } ``` ### ContractFileRecoverySeverity [Section titled “ContractFileRecoverySeverity”](#contractfilerecoveryseverity) ```ts type ContractFileRecoverySeverity = "info" | "warning" | "error" | "blocked"; ``` ### ContractFormControlInteraction [Section titled “ContractFormControlInteraction”](#contractformcontrolinteraction) ```ts type ContractFormControlInteraction = | "toggle" | "select-index" | "increment" | "decrement" | "page-increment" | "page-decrement" | "set-value"; ``` ### ContractFormControlKind [Section titled “ContractFormControlKind”](#contractformcontrolkind) ```ts type ContractFormControlKind = | "check-box" | "option-button" | "list-box" | "combo-box" | "spin-button" | "scroll-bar"; ``` ### ContractFormControlView [Section titled “ContractFormControlView”](#contractformcontrolview) ```ts interface ContractFormControlView { stableId: string; sheetKey: string; sheetName: string; kind: ContractFormControlKind; name: string; anchor: ContractObjectAnchor; linkedCell?: string | null; inputRange?: string | null; optionGroup?: string | null; selectedIndex?: number | null; inputCount: number; checked?: boolean | null; value: number; min: number; max: number; step: number; pageStep: number; visible: boolean; locked: boolean; printObject: boolean; revision: number; authored: boolean; } ``` ### ContractFormControlsAction [Section titled “ContractFormControlsAction”](#contractformcontrolsaction) ```ts type ContractFormControlsAction = | { action: "list" } | { action: "create"; kind: ContractFormControlKind; sheetKey: string; name: string; anchor: ContractObjectAnchor; linkedCell?: string | null; inputRange?: string | null; optionGroup?: string | null; min?: number; max?: number; step?: number; pageStep?: number; } | { action: "update_properties"; stableId: string; expectedRevision: number; name: string; linkedCell?: string | null; inputRange?: string | null; optionGroup?: string | null; min: number; max: number; step: number; pageStep: number; } | { action: "interact"; stableId: string; expectedRevision: number; interaction: ContractFormControlInteraction; value?: number | null; } | { action: "set_geometry"; stableId: string; expectedRevision: number; anchor: ContractObjectAnchor; } | { action: "set_visibility"; stableId: string; expectedRevision: number; visible: boolean; } | { action: "set_flags"; stableId: string; expectedRevision: number; locked: boolean; printObject: boolean; } | { action: "undo" } | { action: "redo" }; ``` ### ContractHyperlinkMetadataEntry [Section titled “ContractHyperlinkMetadataEntry”](#contracthyperlinkmetadataentry) ```ts interface ContractHyperlinkMetadataEntry { stableId: string; sheetName: string; sheetPath: string; row: number; col: number; target: string; location?: string | null; display?: string | null; tooltip?: string | null; targetMode?: string | null; } ``` ### ContractHyperlinkMetadataProjection [Section titled “ContractHyperlinkMetadataProjection”](#contracthyperlinkmetadataprojection) ```ts interface ContractHyperlinkMetadataProjection { scope: "active-sheet" | "workbook"; source: "rust-authoritative-hyperlink-model"; activeSheetPath: string; hyperlinkCount: number; hyperlinks: ContractHyperlinkMetadataEntry[]; } ``` ### ContractLegacyNotePayload [Section titled “ContractLegacyNotePayload”](#contractlegacynotepayload) ```ts interface ContractLegacyNotePayload { source: ContractLegacyNotePayloadSource; cellRef: string; annotationId?: string | null; author?: string | null; visible?: boolean | null; text: string; richTextRuns?: ContractCommentRichTextRun[] | null; } ``` ### ContractLegacyNotePayloadSource [Section titled “ContractLegacyNotePayloadSource”](#contractlegacynotepayloadsource) ```ts type ContractLegacyNotePayloadSource = "legacy-comments-vml"; ``` ### ContractLinkedPicturePayload [Section titled “ContractLinkedPicturePayload”](#contractlinkedpicturepayload) ```ts interface ContractLinkedPicturePayload { sourceRange: string; sourceSheetKey?: string | null; mode?: "bounded-camera-tool" | string | null; } ``` ### ContractNavigationEdgeDirection [Section titled “ContractNavigationEdgeDirection”](#contractnavigationedgedirection) ```ts type ContractNavigationEdgeDirection = "up" | "down" | "left" | "right"; ``` ### ContractObjectAnchor [Section titled “ContractObjectAnchor”](#contractobjectanchor) ```ts interface ContractObjectAnchor { kind: ContractObjectAnchorKind; placement?: ContractObjectAnchorKind | null; from?: ContractObjectAnchorCell | null; to?: ContractObjectAnchorCell | null; origin?: ContractObjectAnchorOrigin | null; ext?: ContractObjectExtent | null; groupRel?: { x: number; y: number; w: number; h: number; xEmu?: number; yEmu?: number; cxEmu?: number; cyEmu?: number; } | null; } ``` ### ContractObjectAnchorKind [Section titled “ContractObjectAnchorKind”](#contractobjectanchorkind) ```ts type ContractObjectAnchorKind = "two-cell" | "one-cell" | "absolute"; ``` ### ContractObjectAnchorOrigin [Section titled “ContractObjectAnchorOrigin”](#contractobjectanchororigin) ```ts interface ContractObjectAnchorOrigin { xEmu: number; yEmu: number; } ``` ### ContractObjectExtent [Section titled “ContractObjectExtent”](#contractobjectextent) ```ts interface ContractObjectExtent { cxEmu: number; cyEmu: number; } ``` ### ContractObjectFamilyStatusPlaceholder [Section titled “ContractObjectFamilyStatusPlaceholder”](#contractobjectfamilystatusplaceholder) ```ts interface ContractObjectFamilyStatusPlaceholder { family: ContractObjectPlaceholderFamily; presence: ContractObjectPlaceholderPresence; status: ContractObjectPlaceholderStatus; } ``` ### ContractObjectPlaceholderFamily [Section titled “ContractObjectPlaceholderFamily”](#contractobjectplaceholderfamily) ```ts type ContractObjectPlaceholderFamily = "comments-notes"; ``` ### ContractObjectPlaceholderPresence [Section titled “ContractObjectPlaceholderPresence”](#contractobjectplaceholderpresence) ```ts type ContractObjectPlaceholderPresence = "present"; ``` ### ContractObjectPlaceholderScope [Section titled “ContractObjectPlaceholderScope”](#contractobjectplaceholderscope) ```ts type ContractObjectPlaceholderScope = "active-sheet"; ``` ### ContractObjectPlaceholderStatus [Section titled “ContractObjectPlaceholderStatus”](#contractobjectplaceholderstatus) ```ts type ContractObjectPlaceholderStatus = "legacy-vml-preserved-only"; ``` ### ContractObjectSelectionPaneCommand [Section titled “ContractObjectSelectionPaneCommand”](#contractobjectselectionpanecommand) ```ts type ContractObjectSelectionPaneCommand = | { kind: "rename"; name: string } | { kind: "set-accessibility"; title: string | null; description: string | null; decorative: boolean; } | { kind: "set-visibility"; visible: boolean } | { kind: "set-print-object"; printObject: boolean } | { kind: "set-chart-format"; formatting: ContractChartFormatting } | { kind: "arrange"; action: "front" | "back" | "forward" | "backward" } | { kind: "align"; action: "left" | "center" | "right" | "top" | "middle" | "bottom" } | { kind: "distribute"; action: "horizontally" | "vertically" } | { kind: "group"; groupId: string } | { kind: "ungroup" } | { kind: "regroup" } | { kind: "geometry"; x: number | null; y: number | null; width: number | null; height: number | null; aspectLocked: boolean | null; } | { kind: "rotate"; deltaDeg: number } | { kind: "flip"; action: "horizontal" | "vertical" } | { kind: "crop"; crop: { leftPct: number; topPct: number; rightPct: number; bottomPct: number; }; } | { kind: "fit-picture" } | { kind: "fill-picture" } | { kind: "reset-picture" } | { kind: "replace-picture"; media: { mimeType: "image/png" | "image/jpeg" | "image/gif"; dataBase64: string; byteCount: number; widthPx: number; heightPx: number; sha256: string; }; } | { kind: "delete" } | { kind: "copy-within-workbook"; newStableId: string; newNonVisualId: string; newName: string; rowDelta: number; colDelta: number; }; ``` ### ContractObjectSelectionPanePackageCommand [Section titled “ContractObjectSelectionPanePackageCommand”](#contractobjectselectionpanepackagecommand) ```ts interface ContractObjectSelectionPanePackageCommand { sheetId: string; objectStableIds: string[]; primaryStableId?: string | null; expectedRevision: number; command: ContractObjectSelectionPaneCommand; geometryAnchor?: ContractObjectAnchor | null; groupId?: string | null; orderedStableIds?: string[]; memberStableIds?: string[]; } ``` ### ContractOpenDocumentObjectCreation [Section titled “ContractOpenDocumentObjectCreation”](#contractopendocumentobjectcreation) ```ts type ContractOpenDocumentObjectCreation = | { family: "image"; name: string; description?: string; mimeType: "image/png" | "image/jpeg" | "image/gif"; dataBase64: string; sha256: string; linkedSourceRange?: string | null; replacementRange?: ContractOpenDocumentReplacementRange | null; anchor: ContractObjectAnchor; } | { family: "shape"; name: string; preset: "rect" | "roundRect" | "ellipse"; text?: string; fillRgb: string; lineRgb: string; anchor: ContractObjectAnchor; } | { family: "text-box"; name: string; text?: string; fillRgb: string; lineRgb: string; anchor: ContractObjectAnchor; } | { family: "chart"; name: string; title?: string; chartType: "column" | "bar" | "line"; series: ContractOpenDocumentChartSeries[]; anchor: ContractObjectAnchor; } | { family: "geometry-update"; stableId: string; name: string; objectFamily: "image" | "shape" | "text-box" | "chart"; anchor: ContractObjectAnchor; } | { family: "pivot-table"; name: string; ref: string; sourceSheetName: string; sourceTableName: string; sourceRef: string; rowField: string; columnField: string; valueField: string; summaryFunction: "sum"; }; ``` ### ContractParallelRecalcInstrumentation [Section titled “ContractParallelRecalcInstrumentation”](#contractparallelrecalcinstrumentation) ```ts interface ContractParallelRecalcInstrumentation { requestedWorkerCount: number; usedWorkerCount: number; readyFrontierCount: number; parallelFrontierCount: number; evaluatedComponentCount: number; parallelComponentCount: number; serializedComponentCount: number; sccComponentCount: number; volatileBoundaryCount: number; dynamicBoundaryCount: number; externalBoundaryCount: number; maximumConcurrentWorkers: number; cancelledFrontierCount: number; supersededFrontierCount: number; scheduleHash: string; } ``` ### ContractParamEdge [Section titled “ContractParamEdge”](#contractparamedge) ```ts interface ContractParamEdge { queryStableId: string; paramId: string; } ``` ### ContractParamValueRepr [Section titled “ContractParamValueRepr”](#contractparamvaluerepr) ```ts interface ContractParamValueRepr { kind: ContractParameterKind; canonicalM: string; } ``` ### ContractParameterDTO [Section titled “ContractParameterDTO”](#contractparameterdto) ```ts interface ContractParameterDTO { id: string; name: string; kind: ContractParameterKind; currentValue: ContractParamValueRepr; required: boolean; allowedValues?: ContractParamValueRepr[] | null; numericRange?: ContractParameterNumericRange | null; } ``` ### ContractParameterKind [Section titled “ContractParameterKind”](#contractparameterkind) ```ts type ContractParameterKind = "text" | "number" | "logical" | "date" | "null"; ``` ### ContractPasteMode [Section titled “ContractPasteMode”](#contractpastemode) ```ts type ContractPasteMode = "all" | "values" | "formulas" | "formats"; ``` ### ContractPersistedParamOptionsBinding [Section titled “ContractPersistedParamOptionsBinding”](#contractpersistedparamoptionsbinding) ```ts interface ContractPersistedParamOptionsBinding { delimiterParam?: string | null; headerParam?: string | null; rowCountParam?: string | null; filterLiteralParam?: string | null; filterColumn?: string | null; } ``` ### ContractPreviewDataBar [Section titled “ContractPreviewDataBar”](#contractpreviewdatabar) ```ts interface ContractPreviewDataBar { color: string; ratio: number; } ``` ### ContractPreviewGradientStop [Section titled “ContractPreviewGradientStop”](#contractpreviewgradientstop) ```ts interface ContractPreviewGradientStop { position: number; color: string; } ``` ### ContractPreviewHorizontalAlign [Section titled “ContractPreviewHorizontalAlign”](#contractpreviewhorizontalalign) ```ts type ContractPreviewHorizontalAlign = | "left" | "center" | "right" | "fill" | "justify" | "centerAcrossSelection" | "distributed"; ``` ### ContractPreviewHyperlink [Section titled “ContractPreviewHyperlink”](#contractpreviewhyperlink) ```ts interface ContractPreviewHyperlink { target: string; location?: string | null; display?: string | null; tooltip?: string | null; targetMode?: string | null; } ``` ### ContractPreviewUnderlineKind [Section titled “ContractPreviewUnderlineKind”](#contractpreviewunderlinekind) ```ts type ContractPreviewUnderlineKind = "single" | "double" | "singleAccounting" | "doubleAccounting"; ``` ### ContractPreviewValueKind [Section titled “ContractPreviewValueKind”](#contractpreviewvaluekind) ```ts type ContractPreviewValueKind = "displayText" | "emptyString" | "boolean" | "error"; ``` ### ContractPreviewVerticalAlign [Section titled “ContractPreviewVerticalAlign”](#contractpreviewverticalalign) ```ts type ContractPreviewVerticalAlign = "top" | "center" | "bottom" | "justify" | "distributed"; ``` ### ContractRecalcRequiredReason [Section titled “ContractRecalcRequiredReason”](#contractrecalcrequiredreason) ```ts type ContractRecalcRequiredReason = | "source_cell_changed" | "sheet_lifecycle_changed" | "unsupported_dependency" | "volatile_formula" | "manual_calc_mode" | "imported_cache_without_trust_evidence" | "calc_chain_missing_or_advisory_only" | "external_workbook_not_loaded" | "external_link_missing" | "external_link_policy_blocked" | "external_ref_shape_unsupported" | "external_cached_value_without_freshness_evidence"; ``` ### ContractReplaceEdit [Section titled “ContractReplaceEdit”](#contractreplaceedit) ```ts interface ContractReplaceEdit { cellKey: string; sheetName: string; address: string; oldValue: string; newValue: string; } ``` ### ContractSaveKind [Section titled “ContractSaveKind”](#contractsavekind) ```ts type ContractSaveKind = (typeof CONTRACT_SAVE_KIND_IDS)[number]; ``` ### ContractSmartArtPayload [Section titled “ContractSmartArtPayload”](#contractsmartartpayload) ```ts interface ContractSmartArtPayload { status: ContractSmartArtRenderStatus; layout?: string | null; nodes: Array<{ id: string; text: string }>; themeReferences: string[]; } ``` ### ContractSmartArtRenderStatus [Section titled “ContractSmartArtRenderStatus”](#contractsmartartrenderstatus) ```ts type ContractSmartArtRenderStatus = "live-supported" | "unsupported-layout" | "broken-topology"; ``` ### ContractSourceTrustAction [Section titled “ContractSourceTrustAction”](#contractsourcetrustaction) ```ts type ContractSourceTrustAction = | "evaluate_open" | "view" | "edit" | "paste" | "fill" | "refresh" | "macros" | "ole" | "active_x" | "save_original" | "save_copy" | "enable_editing" | "trust_document" | "external_links" | "data_connections"; ``` ### ContractSourceTrustAuthority [Section titled “ContractSourceTrustAuthority”](#contractsourcetrustauthority) ```ts type ContractSourceTrustAuthority = | "none" | "local_source" | "session_grant" | "editing_session" | "trusted_location" | "trusted_document" | "trust_center_policy"; ``` ### ContractSourceTrustDecision [Section titled “ContractSourceTrustDecision”](#contractsourcetrustdecision) ```ts interface ContractSourceTrustDecision { mode: ContractSourceTrustMode; authority: ContractSourceTrustAuthority; reason?: ContractSourceTrustReason; action: ContractSourceTrustAction; allowed: boolean; mutationAllowed: boolean; grant?: ContractSourceTrustGrantBinding; session?: ContractSourceTrustSessionBinding; matchedGrantId?: string; trustStoreState: ContractSourceTrustStoreState; trustStoreRevision: number; trustStoreHash: string; allowedActions: ContractSourceTrustAction[]; blockedActions: ContractSourceTrustAction[]; policy: ContractTrustCenterPolicy; policyState: ContractTrustCenterPolicyState; audit: ContractTrustCenterAuditEntry; } ``` ### ContractSourceTrustDirectoryIdentity [Section titled “ContractSourceTrustDirectoryIdentity”](#contractsourcetrustdirectoryidentity) ```ts interface ContractSourceTrustDirectoryIdentity { deviceId: string; fileId: string; } ``` ### ContractSourceTrustDocumentGrant [Section titled “ContractSourceTrustDocumentGrant”](#contractsourcetrustdocumentgrant) ```ts interface ContractSourceTrustDocumentGrant { grantId: string; sourceIdentity: string; byteSha256: string; revisionToken: string; } ``` ### ContractSourceTrustFileState [Section titled “ContractSourceTrustFileState”](#contractsourcetrustfilestate) ```ts type ContractSourceTrustFileState = | "current" | "read_only" | "missing" | "moved" | "symlink" | "corrupt" | "zero_byte" | "stale_revision" | "identity_changed"; ``` ### ContractSourceTrustGrantBinding [Section titled “ContractSourceTrustGrantBinding”](#contractsourcetrustgrantbinding) ```ts interface ContractSourceTrustGrantBinding { sourceIdentity: string; byteSha256: string; revisionToken: string; } ``` ### ContractSourceTrustLocationGrant [Section titled “ContractSourceTrustLocationGrant”](#contractsourcetrustlocationgrant) ```ts interface ContractSourceTrustLocationGrant { grantId: string; directoryIdentity: ContractSourceTrustDirectoryIdentity; includeSubfolders: boolean; } ``` ### ContractSourceTrustMode [Section titled “ContractSourceTrustMode”](#contractsourcetrustmode) ```ts type ContractSourceTrustMode = "trusted_edit" | "protected_view" | "read_only" | "blocked"; ``` ### ContractSourceTrustObservation [Section titled “ContractSourceTrustObservation”](#contractsourcetrustobservation) ```ts interface ContractSourceTrustObservation { sourceIdentity: string; byteSha256: string; revisionToken: string; provenance: ContractSourceTrustProvenance; fileState: ContractSourceTrustFileState; parentDirectories?: ContractSourceTrustDirectoryIdentity[]; locationGrants?: ContractSourceTrustLocationGrant[]; documentGrants?: ContractSourceTrustDocumentGrant[]; trustStoreState?: ContractSourceTrustStoreState; trustStoreRevision?: number; trustStoreHash?: string; policyState?: ContractTrustCenterPolicyState; policy?: ContractTrustCenterPolicy; } ``` ### ContractSourceTrustProvenance [Section titled “ContractSourceTrustProvenance”](#contractsourcetrustprovenance) ```ts type ContractSourceTrustProvenance = "local_trusted" | "downloaded" | "quarantined" | "recovery" | "unknown"; ``` ### ContractSourceTrustReason [Section titled “ContractSourceTrustReason”](#contractsourcetrustreason) ```ts type ContractSourceTrustReason = | "downloaded_source_untrusted" | "quarantined_source_untrusted" | "recovery_source_requires_trust" | "unknown_source_untrusted" | "explicit_grant_required" | "source_read_only" | "source_missing" | "source_moved" | "source_symlink" | "source_corrupt" | "source_zero_byte" | "source_stale_revision" | "source_identity_changed" | "source_external_replacement_observed" | "grant_source_identity_mismatch" | "grant_byte_hash_mismatch" | "grant_revision_mismatch" | "action_blocked_by_mode" | "trust_policy_malformed" | "trust_policy_permission_denied" | "trust_policy_concurrent_writer" | "trust_policy_stale_response" | "trust_policy_unavailable" | "vba_execution_unavailable" | "active_content_execution_unavailable" | "external_links_policy_blocked" | "data_connections_policy_blocked" | "protected_view_policy_disabled" | "trusted_locations_policy_disabled" | "source_trust_allowed" | "external_links_manual_policy_allowed" | "data_connections_manual_policy_allowed"; ``` ### ContractSourceTrustStoreState [Section titled “ContractSourceTrustStoreState”](#contractsourcetruststorestate) ```ts type ContractSourceTrustStoreState = | "current" | "permission_denied" | "corrupt" | "concurrent_writer" | "stale_response" | "unavailable"; ``` ### ContractStructuredReferenceTrustMetadata [Section titled “ContractStructuredReferenceTrustMetadata”](#contractstructuredreferencetrustmetadata) ```ts interface ContractStructuredReferenceTrustMetadata { label: string; tableName?: string | null; shape: string; columnName?: string | null; targetSheetKey?: string | null; targetRange?: string | null; resolutionState: string; } ``` ### ContractTrustCenterPolicy [Section titled “ContractTrustCenterPolicy”](#contracttrustcenterpolicy) ```ts interface ContractTrustCenterPolicy { schemaVersion: 1; macroPolicy: ContractTrustCenterMacroPolicy; externalLinksPolicy: ContractTrustCenterExternalPolicy; dataConnectionsPolicy: ContractTrustCenterExternalPolicy; trustedLocationsEnabled: boolean; protectDownloaded: boolean; protectQuarantined: boolean; protectRecovery: boolean; protectUnknown: boolean; } ``` ### ContractTrustCenterPolicyState [Section titled “ContractTrustCenterPolicyState”](#contracttrustcenterpolicystate) ```ts type ContractTrustCenterPolicyState = | "current" | "malformed" | "permission_denied" | "concurrent_writer" | "stale_response" | "unavailable"; ``` ### ContractWhatIfAction [Section titled “ContractWhatIfAction”](#contractwhatifaction) ```ts type ContractWhatIfAction = | ({ action: "goal_seek_preview" } & GoalSeekFields) | ({ action: "goal_seek_apply"; previewToken: string } & GoalSeekFields) | { action: "cancel"; previewToken: string } | { action: "scenario_list"; sheetKey: string } | { action: "scenario_merge"; sourceSheetKey: string; targetSheetKey: string; expectedWorkbookRevision?: number | null; readOnly?: boolean; } | { action: "scenario_summary"; sheetKey: string; resultCells?: ContractWhatIfCellRef[]; reportKind?: "summary" | "pivot_table"; reportLocale?: string; expectedWorkbookRevision?: number | null; readOnly?: boolean; } | { action: "scenario_upsert"; sheetKey: string; name: string; comment?: string | null; locked?: boolean; hidden?: boolean; inputs: ContractWhatIfScenarioInput[]; expectedWorkbookRevision?: number | null; readOnly?: boolean; } | { action: "scenario_delete"; sheetKey: string; name: string; expectedWorkbookRevision?: number | null; readOnly?: boolean; } | { action: "scenario_show"; sheetKey: string; name: string; expectedWorkbookRevision?: number | null; readOnly?: boolean; } | ({ action: "data_table_preview" } & DataTableFields) | ({ action: "data_table_apply"; previewToken: string } & DataTableFields); ``` ### ContractWhatIfValue [Section titled “ContractWhatIfValue”](#contractwhatifvalue) ```ts type ContractWhatIfValue = | { kind: "blank" } | { kind: "empty_string" } | { kind: "number"; value: number } | { kind: "text"; value: string } | { kind: "boolean"; value: boolean } | { kind: "error"; value: string }; ``` ### ContractWordArtPayload [Section titled “ContractWordArtPayload”](#contractwordartpayload) ```ts interface ContractWordArtPayload { status: ContractWordArtRenderStatus; textTransform: string; themeReferences: string[]; } ``` ### ContractWordArtRenderStatus [Section titled “ContractWordArtRenderStatus”](#contractwordartrenderstatus) ```ts type ContractWordArtRenderStatus = "live-supported" | "unsupported-transform"; ``` ### ContractWritingModePlaceholder [Section titled “ContractWritingModePlaceholder”](#contractwritingmodeplaceholder) ```ts type ContractWritingModePlaceholder = "horizontal-tb"; ``` ### ContractXlsbDirtySaveProfile [Section titled “ContractXlsbDirtySaveProfile”](#contractxlsbdirtysaveprofile) ```ts type ContractXlsbDirtySaveProfile = (typeof CONTRACT_XLSB_DIRTY_SAVE_PROFILE_IDS)[number]; ``` ### ContractXlsxDataViewStatePatch [Section titled “ContractXlsxDataViewStatePatch”](#contractxlsxdataviewstatepatch) ```ts interface ContractXlsxDataViewStatePatch { activeSheetPath: string; activeViewId?: "A" | "B" | "none" | null; views: ContractXlsxDataViewStateViewPatch[]; source?: "fastsheet-data-view-manager-v1" | string | null; } ``` ### ContractXlsxDataViewStateViewPatch [Section titled “ContractXlsxDataViewStateViewPatch”](#contractxlsxdataviewstateviewpatch) ```ts interface ContractXlsxDataViewStateViewPatch { viewId: "A" | "B"; selectedRangeLabel: string; filterRegion?: string | null; sortKey?: "amount" | "score" | "none" | null; sortDescending?: boolean | null; active?: boolean | null; status?: string | null; } ``` ### ContractXlsxDelimitedDataConnectionDeletePatch [Section titled “ContractXlsxDelimitedDataConnectionDeletePatch”](#contractxlsxdelimiteddataconnectiondeletepatch) ```ts interface ContractXlsxDelimitedDataConnectionDeletePatch { sourcePath: string; targetSheetPath: string; targetRef?: string | null; targetTableName?: string | null; } ``` ### ContractXlsxDelimitedDataConnectionPatch [Section titled “ContractXlsxDelimitedDataConnectionPatch”](#contractxlsxdelimiteddataconnectionpatch) ```ts interface ContractXlsxDelimitedDataConnectionPatch { kind?: | "text-csv-connection" | "web-csv-connection" | "database-json-query" | "power-query-transform" | string | null; name?: string | null; sourcePath: string; sourceUri?: string | null; fileName?: string | null; loadKind?: "table" | "connection-only" | string | null; layout?: ContractDelimitedOpenLayout | null; fixedWidthBreaks?: number[] | null; delimiters?: string[] | null; customDelimiter?: string | null; textQualifier?: ContractDelimitedTextQualifier | null; consecutiveDelimitersAsOne?: boolean | null; delimiter?: string | null; encoding?: ContractDelimitedSaveEncoding | null; interpretation?: ContractDelimitedInterpretation | null; locale?: ContractDelimitedLocale | null; decimalSeparator?: string | null; thousandsSeparator?: string | null; columnRules?: ContractXlsxDelimitedColumnRulePatch[] | null; importStartRow?: number | null; header?: "auto" | "present" | "absent" | null; destination?: "selected-anchor" | "new-sheet" | null; destinationAnchor?: string | null; targetSheetPath: string; targetRef: string; targetTableName?: string | null; tablePath?: string | null; startRow: number; startCol: number; rowCount: number; columnCount: number; delimiterLabel?: string | null; query?: string | null; sourceRange?: string | null; transform?: string | null; refreshOnOpen?: boolean | null; importedAt?: string | null; refreshedAt?: string | null; refreshState?: "imported" | "refreshed" | string | null; } ``` ### ContractXlsxLegacyNoteMutationPatch [Section titled “ContractXlsxLegacyNoteMutationPatch”](#contractxlsxlegacynotemutationpatch) ```ts interface ContractXlsxLegacyNoteMutationPatch { activeSheetPath: string; cellRef: string; action: "upsert" | "delete"; annotationId?: string | null; text?: string | null; author?: string | null; visible?: boolean | null; richTextRuns?: ContractCommentRichTextRun[] | null; } ``` ### ContractXlsxSavePatch [Section titled “ContractXlsxSavePatch”](#contractxlsxsavepatch) ```ts interface ContractXlsxSavePatch { objectSelectionPaneCommands?: ContractObjectSelectionPanePackageCommand[] | null; workbookAccessibilityFixes?: ContractWorkbookAccessibilityPackageFix[] | null; fileSharingReadOnlyRecommended?: boolean | null; dataValidationListRules?: ContractXlsxDataValidationListRulePatch[] | null; dataValidationRules?: ContractXlsxDataValidationRulePatch[] | null; dataValidationClearRules?: ContractXlsxDataValidationClearRulePatch[] | null; dataValidationMessageRules?: ContractXlsxDataValidationMessageRulePatch[] | null; chartCreations?: ContractXlsxChartCreationPatch[] | null; drawingImageCreations?: ContractXlsxDrawingImageCreationPatch[] | null; sheetBackground?: ContractXlsxSheetBackgroundPatch | null; chartObjectMoves?: ContractXlsxChartObjectMovePatch[] | null; drawingObjectMoves?: ContractXlsxDrawingObjectMovePatch[] | null; drawingObjectDeletions?: ContractXlsxDrawingObjectDeletionPatch[] | null; drawingObjectMetadataUpdates?: ContractXlsxDrawingObjectMetadataPatch[] | null; drawingObjectZOrderUpdates?: ContractXlsxDrawingObjectZOrderPatch[] | null; drawingObjectImageTransforms?: ContractXlsxDrawingObjectImageTransformPatch[] | null; drawingObjectGroups?: ContractXlsxDrawingObjectGroupPatch[] | null; drawingObjectUngroups?: ContractXlsxDrawingObjectUngroupPatch[] | null; textBoxSheets?: ContractXlsxTextBoxSheetPatch[] | null; shapeSheets?: ContractXlsxShapeSheetPatch[] | null; chartSeriesUpdates?: ContractXlsxChartSeriesUpdatePatch[] | null; chartMutations?: ContractXlsxChartMutationPatch[] | null; workbookActiveSheets?: ContractXlsxWorkbookActiveSheetPatch[] | null; workbookViewSelections?: ContractXlsxWorkbookViewSelectionPatch[] | null; dataViewStates?: ContractXlsxDataViewStatePatch[] | null; delimitedDataConnections?: ContractXlsxDelimitedDataConnectionPatch[] | null; delimitedDataConnectionDeletes?: ContractXlsxDelimitedDataConnectionDeletePatch[] | null; worksheetViews?: ContractXlsxWorksheetViewPatch[] | null; worksheetPrintOptions?: ContractXlsxWorksheetPrintOptionsPatch[] | null; worksheetPageSetups?: ContractXlsxWorksheetPageSetupPatch[] | null; worksheetHeaderFooters?: ContractXlsxWorksheetHeaderFooterPatch[] | null; worksheetHeaderFooterClears?: ContractXlsxWorksheetHeaderFooterClearPatch[] | null; worksheetPageBreaks?: ContractXlsxWorksheetPageBreakPatch[] | null; worksheetPageBreakResets?: ContractXlsxWorksheetPageBreakResetPatch[] | null; definedNames?: ContractXlsxDefinedNamePatch[] | null; definedNameDeletes?: ContractXlsxDefinedNameDeletePatch[] | null; printAreas?: ContractXlsxPrintAreaPatch[] | null; printAreaClears?: ContractXlsxPrintAreaClearPatch[] | null; printAreaAdds?: ContractXlsxPrintAreaPatch[] | null; printTitles?: ContractXlsxPrintTitlesPatch[] | null; printTitleClears?: ContractXlsxPrintTitlesClearPatch[] | null; workbookTheme?: ContractXlsxWorkbookThemePatch | null; workbookThemeColors?: ContractXlsxWorkbookThemeColorsPatch | null; rowOutlineGroups?: ContractXlsxRowOutlineGroupPatch[] | null; rowOutlineUngroups?: ContractXlsxRowOutlineUngroupPatch[] | null; rowOutlineRanges?: ContractXlsxRowOutlineRangePatch[] | null; columnOutlineGroups?: ContractXlsxColumnOutlineGroupPatch[] | null; columnOutlineUngroups?: ContractXlsxColumnOutlineUngroupPatch[] | null; columnOutlineRanges?: ContractXlsxColumnOutlineRangePatch[] | null; cellShifts?: ContractXlsxCellShiftPatch[] | null; cellCopies?: ContractXlsxCellCopyPatch[] | null; cellFormatPatches?: ContractXlsxCellFormatPatch[] | null; trackTransfers?: ContractXlsxTrackTransferPatch[] | null; sheetFormats?: ContractXlsxSheetFormatPatch[] | null; richTextRunUpdates?: ContractXlsxRichTextRunPatch[] | null; legacyNoteMutations?: ContractXlsxLegacyNoteMutationPatch[] | null; threadedCommentMutations?: ContractXlsxThreadedCommentMutationPatch[] | null; pivotTableCreations?: ContractXlsxPivotTableCreationPatch[] | null; pivotTableDeletions?: ContractXlsxPivotTableDeletionPatch[] | null; pivotTableRefreshes?: ContractXlsxPivotTableRefreshPatch[] | null; pivotTableValueSummaries?: ContractXlsxPivotTableValueSummaryPatch[] | null; pivotTableShowValuesAs?: ContractXlsxPivotTableShowValuesAsPatch[] | null; pivotTableFieldSorts?: ContractXlsxPivotTableFieldSortPatch[] | null; pivotTableFieldFilters?: ContractXlsxPivotTableFieldFilterPatch[] | null; pivotTableClearFilters?: ContractXlsxPivotTableClearFiltersPatch[] | null; pivotTableClearAll?: ContractXlsxPivotTableClearAllPatch[] | null; pivotTableMoves?: ContractXlsxPivotTableMovePatch[] | null; pivotTableFieldRemovals?: ContractXlsxPivotTableFieldRemovalPatch[] | null; pivotTableFieldMoves?: ContractXlsxPivotTableFieldMovePatch[] | null; pivotTableFieldAdditions?: ContractXlsxPivotTableFieldAdditionPatch[] | null; pivotTableValueFieldAdditions?: ContractXlsxPivotTableValueFieldAdditionPatch[] | null; pivotTableCalculatedFields?: ContractXlsxPivotTableCalculatedFieldPatch[] | null; pivotTableItemGroups?: ContractXlsxPivotTableItemGroupPatch[] | null; pivotTableSourceChanges?: ContractXlsxPivotTableSourceChangePatch[] | null; pivotTableItemDetails?: ContractXlsxPivotTableItemDetailPatch[] | null; pivotTableReportLayouts?: ContractXlsxPivotTableReportLayoutPatch[] | null; pivotTableStyles?: ContractXlsxPivotTableStylePatch[] | null; pivotTableFieldSettings?: ContractXlsxPivotTableFieldSettingsPatch[] | null; workbookProtection?: ContractXlsxWorkbookProtectionPatch | null; } ``` ### ContractXlsxWorksheetViewPatch [Section titled “ContractXlsxWorksheetViewPatch”](#contractxlsxworksheetviewpatch) ```ts interface ContractXlsxWorksheetViewPatch { activeSheetPath: string; gridLinesVisible?: boolean | null; headingsVisible?: boolean | null; workbookViewMode?: "normal" | "page-layout" | "page-break-preview" | null; scrollTopLeftCell?: string | null; zoomScale?: number | null; sheetViews?: ContractWorkbookNamedView[] | null; sheetViewActiveId?: string | null; customViews?: ContractWorkbookNamedView[] | null; customViewActiveId?: string | null; } ``` ### FileIdentityDescriptor [Section titled “FileIdentityDescriptor”](#fileidentitydescriptor) ```ts interface FileIdentityDescriptor { canonicalPath: string; byteLen: number; contentStamp: string; } ``` ### FileKindDescriptor [Section titled “FileKindDescriptor”](#filekinddescriptor) ```ts type FileKindDescriptor = "csv" | "workbook"; ``` ### FileRefreshDescriptor [Section titled “FileRefreshDescriptor”](#filerefreshdescriptor) ```ts interface FileRefreshDescriptor { savedIdentity: FileIdentityDescriptor; } ``` ### FileSourceDescriptor [Section titled “FileSourceDescriptor”](#filesourcedescriptor) ```ts interface FileSourceDescriptor { workbookId: string; queryId: string; fileKind: FileKindDescriptor; pickPath: string; selector?: WorkbookSelectorDescriptor; maxBytes?: number; expectedIdentity?: FileIdentityDescriptor; refresh?: FileRefreshDescriptor; revoked?: boolean; } ``` ### FoldExplainPlan [Section titled “FoldExplainPlan”](#foldexplainplan) ```ts interface FoldExplainPlan { stages: FoldExplainStage[]; foldBoundaryIndex: number; remote?: FoldExplainRemote; planHash: string; nativeSql?: string; } ``` ### FoldExplainRemote [Section titled “FoldExplainRemote”](#foldexplainremote) ```ts interface FoldExplainRemote { transport: "odata"; options: FoldExplainRemoteOptions; } ``` ### FoldExplainRemoteOptions [Section titled “FoldExplainRemoteOptions”](#foldexplainremoteoptions) ```ts interface FoldExplainRemoteOptions { select?: string; filter?: string; orderby?: string; top?: number; skip?: number; } ``` ### FoldExplainStage [Section titled “FoldExplainStage”](#foldexplainstage) ```ts interface FoldExplainStage { op: string; placement: FoldPlacement; reason?: string; detail: string; } ``` ### FoldPlacement [Section titled “FoldPlacement”](#foldplacement) ```ts type FoldPlacement = "folded" | "local-remainder" | "blocked"; ``` ### FolderNavigatorEntryWire [Section titled “FolderNavigatorEntryWire”](#foldernavigatorentrywire) ```ts interface FolderNavigatorEntryWire { id: string; name: string; extension: string; size: number; fingerprint: number; } ``` ### FolderNavigatorFileDiagnosticWire [Section titled “FolderNavigatorFileDiagnosticWire”](#foldernavigatorfilediagnosticwire) ```ts interface FolderNavigatorFileDiagnosticWire { file_id: string; reason_code: string; } ``` ### FolderNavigatorOutcome [Section titled “FolderNavigatorOutcome”](#foldernavigatoroutcome) ```ts type FolderNavigatorOutcome = | { status: "entries"; entries: FolderNavigatorEntryWire[] } | { status: "preview"; table: Extract< ContractPowerQueryTransformOutcome, { status: "evaluated" } >; } | { status: "combined"; table: Extract< ContractPowerQueryTransformOutcome, { status: "evaluated" } >; diagnostics: FolderNavigatorFileDiagnosticWire[]; } | { status: "refresh_plan"; added: string[]; changed: string[]; deleted: string[]; restored: string[]; unchanged_count: number; lineage_json: string; digest: number; } | { status: "package_ledger_digest"; digest: number } | { status: "blocked"; reason: string; detail: string }; ``` ### FolderSourceDescriptor [Section titled “FolderSourceDescriptor”](#foldersourcedescriptor) ```ts interface FolderSourceDescriptor { workbookId: string; queryId: string; rootPath: string; includeGlob?: string; excludeGlob?: string; recursive?: boolean; maxFiles?: number; maxTotalBytes?: number; revoked?: boolean; } ``` ### FoldingVerdict [Section titled “FoldingVerdict”](#foldingverdict) ```ts interface FoldingVerdict { state: "folded" | "partially-folded" | "local"; viewNativeQueryEnabled: boolean; nativeQuery?: FoldingNativeQuery; } ``` ### InspectorAstNode [Section titled “InspectorAstNode”](#inspectorastnode) ```ts interface InspectorAstNode { nodeId: number; kind: string; detail?: string; span: MWireSpan; sourceSlice: string; children: InspectorAstNode[]; } ``` ### InspectorBinding [Section titled “InspectorBinding”](#inspectorbinding) ```ts interface InspectorBinding { name: string; span: MWireSpan; scopeDepth: number; shadowsOuter: boolean; isClosureCaptured: boolean; references: string[]; kind: string; } ``` ### InspectorBuiltinRef [Section titled “InspectorBuiltinRef”](#inspectorbuiltinref) ```ts interface InspectorBuiltinRef { name: string; isRegistered: boolean; migrationClass: string; } ``` ### InspectorDiagnostic [Section titled “InspectorDiagnostic”](#inspectordiagnostic) ```ts interface InspectorDiagnostic { phase: string; severity: string; code: string; message: string; span: MWireSpan; astNodeId?: number; } ``` ### InspectorLineage [Section titled “InspectorLineage”](#inspectorlineage) ```ts interface InspectorLineage { referencedBuiltins: InspectorBuiltinRef[]; referencedIdentifiers: string[]; capability: string; } ``` ### InspectorOutcome [Section titled “InspectorOutcome”](#inspectoroutcome) ```ts interface InspectorOutcome { status: string; value?: MWireValue; error?: MWireError; valueKind?: string; } ``` ### LookupIndexHandleInfo [Section titled “LookupIndexHandleInfo”](#lookupindexhandleinfo) ```ts interface LookupIndexHandleInfo { handle: number; mode: LookupIndexMode; range: CellRange; rowCount: number; colCount: number; } ``` ### LookupIndexMode [Section titled “LookupIndexMode”](#lookupindexmode) ```ts type LookupIndexMode = "table-first-column" | "one-dimensional-scan"; ``` ### MExpressionOutcome [Section titled “MExpressionOutcome”](#mexpressionoutcome) ```ts type MExpressionOutcome = | { status: "ok"; value: MWireValue; diagnostics: MWireDiagnostic[]; ast?: MWireAstNode; } | { status: "diagnostics"; diagnostics: MWireDiagnostic[]; ast?: MWireAstNode; } | { status: "eval-error"; error: MWireError; diagnostics: MWireDiagnostic[]; ast?: MWireAstNode; }; ``` ### MWireAstNode [Section titled “MWireAstNode”](#mwireastnode) ```ts interface MWireAstNode { kind: string; detail?: string; span: MWireSpan; children: MWireAstNode[]; } ``` ### MWireDiagnostic [Section titled “MWireDiagnostic”](#mwirediagnostic) ```ts interface MWireDiagnostic { phase: "lex" | "parse" | "bind" | "eval"; severity: "error" | "warning"; code: string; message: string; span: MWireSpan; } ``` ### MWireError [Section titled “MWireError”](#mwireerror) ```ts interface MWireError { reason: string; message: string; span: MWireSpan; } ``` ### MWireField [Section titled “MWireField”](#mwirefield) ```ts interface MWireField { name: string; value: MWireValue; } ``` ### MWireFunctionType [Section titled “MWireFunctionType”](#mwirefunctiontype) ```ts interface MWireFunctionType { required: MWireType[]; optional: MWireType[]; returns: MWireType; } ``` ### MWireListType [Section titled “MWireListType”](#mwirelisttype) ```ts interface MWireListType { item: MWireType; } ``` ### MWireMetadataField [Section titled “MWireMetadataField”](#mwiremetadatafield) ```ts interface MWireMetadataField { name: string; value: MWireValue; } ``` ### MWireMetadataRecord [Section titled “MWireMetadataRecord”](#mwiremetadatarecord) ```ts interface MWireMetadataRecord { fields: MWireMetadataField[]; } ``` ### MWirePosition [Section titled “MWirePosition”](#mwireposition) ```ts interface MWirePosition { line: number; column: number; } ``` ### MWireRecordType [Section titled “MWireRecordType”](#mwirerecordtype) ```ts interface MWireRecordType { fields: MWireTypeField[]; open: boolean; } ``` ### MWireSpan [Section titled “MWireSpan”](#mwirespan) ```ts interface MWireSpan { startByte: number; endByte: number; start: MWirePosition; end: MWirePosition; } ``` ### MWireType [Section titled “MWireType”](#mwiretype) ```ts interface MWireType { kind: "type"; name: MWireTypeName; nullable: boolean; display: string; record?: MWireRecordType; table?: MWireTableRowType; function?: MWireFunctionType; list?: MWireListType; } ``` ### MWireTypeField [Section titled “MWireTypeField”](#mwiretypefield) ```ts interface MWireTypeField { name: string; optional: boolean; type: MWireType; } ``` ### MWireValue [Section titled “MWireValue”](#mwirevalue) ```ts type MWireValue = MWireValueVariant & { meta?: MWireMetadataRecord; }; ``` ### MWireValueVariant [Section titled “MWireValueVariant”](#mwirevaluevariant) ```ts type MWireValueVariant = | { kind: "null" } | { kind: "logical"; value: boolean } | { kind: "number"; value: string; isInteger: boolean } | { kind: "text"; value: string } | { kind: "list"; items: MWireValue[] } | { kind: "record"; fields: MWireField[] } | { kind: "function"; builtinName?: string; isClosure: boolean } | { kind: "error"; reason: string; message: string; span: MWireSpan } | { kind: "table"; columns: string[]; rows: MWireValue[][]; schema: MWireTableSchema; } | MWireType | { kind: "integer"; value: string } | { kind: "date"; year: number; month: number; day: number } | { kind: "datetime"; year: number; month: number; day: number; hour: number; minute: number; second: number; nano: number; } | { kind: "datetimezone"; year: number; month: number; day: number; hour: number; minute: number; second: number; nano: number; offsetMinutes: number; } | { kind: "time"; hour: number; minute: number; second: number; nano: number } | { kind: "duration"; negative: boolean; days: number; hours: number; minutes: number; seconds: number; nano: number; } | { kind: "binary"; byteLength: number; base64: string }; ``` ### RequestedBackendField [Section titled “RequestedBackendField”](#requestedbackendfield) ```ts interface RequestedBackendField { requestedBackend?: ComputeBackendKind | null; } ``` ### SourceGridDescriptor [Section titled “SourceGridDescriptor”](#sourcegriddescriptor) ```ts interface SourceGridDescriptor { rows: SourceCellDescriptor[][]; } ``` ### SourceRequestDescriptor [Section titled “SourceRequestDescriptor”](#sourcerequestdescriptor) ```ts interface SourceRequestDescriptor { sheetName: string; sheetExists: boolean; rangeRows: number; rangeColumns: number; promoteHeaders: boolean; } ``` ### StepMutation [Section titled “StepMutation”](#stepmutation) ```ts type StepMutation = | { kind: "insert"; afterStepId?: string; displayName: string; canonicalM: string; } | { kind: "edit"; stepId: string; canonicalM: string; } | { kind: "delete"; stepId: string; } | { kind: "rename"; stepId: string; newName: string; } | { kind: "reorder"; stepId: string; targetIndex: number; }; ``` ### StepMutationOutcome [Section titled “StepMutationOutcome”](#stepmutationoutcome) ```ts interface StepMutationOutcome { status: "ok" | "blocked"; steps: AppliedStep[]; selectedStepId?: string; reason?: string; detail?: string; } ``` ### StepMutationResult [Section titled “StepMutationResult”](#stepmutationresult) ```ts interface StepMutationResult { projection: AppliedStepsProjection; outcome: StepMutationOutcome; } ``` ### WebSourceResolverEntry [Section titled “WebSourceResolverEntry”](#websourceresolverentry) ```ts interface WebSourceResolverEntry { host: string; ips: string[]; } ``` ### WebSourceTestAllowlist [Section titled “WebSourceTestAllowlist”](#websourcetestallowlist) ```ts interface WebSourceTestAllowlist { allowHttp?: boolean; extraAllowedHosts?: string[]; extraAllowedPorts?: number[]; resolver?: WebSourceResolverEntry[]; } ``` # Types: data and sheet objects > Compute Contract type definitions — filters, tables, data validation, slicers, import, and analysis. Names: 77. Definitions of the names from the “TypeScript type” column on the operation pages. Other dictionary topics: [session, workbook, and sheets](/reference/sumsheet/types-session/) · [cells and ranges](/reference/sumsheet/types-cells/) · [formulas and calculation](/reference/sumsheet/types-formulas/) · [formatting](/reference/sumsheet/types-format/) · **data and sheet objects** · [pivot tables](/reference/sumsheet/types-pivot/) · [charts and graphics](/reference/sumsheet/types-charts/) · [printing and page layout](/reference/sumsheet/types-print/) · [Power Query](/reference/sumsheet/types-powerquery/) · [VBA and macros](/reference/sumsheet/types-vba/) · [protection and review](/reference/sumsheet/types-protection/) · [general and utility](/reference/sumsheet/types-common/). Types on this page — 77 * [`ContractAdvancedFilterAction`](#contractadvancedfilteraction) * [`ContractAdvancedFilterProjectedCell`](#contractadvancedfilterprojectedcell) * [`ContractAnalyzeInsightCard`](#contractanalyzeinsightcard) * [`ContractAnalyzeInsightKind`](#contractanalyzeinsightkind) * [`ContractAnalyzeInsightsInsertion`](#contractanalyzeinsightsinsertion) * [`ContractAnalyzeInsightsPlan`](#contractanalyzeinsightsplan) * [`ContractAutoFilterDateGroupMetadata`](#contractautofilterdategroupmetadata) * [`ContractConsolidateFunction`](#contractconsolidatefunction) * [`ContractConsolidationMutation`](#contractconsolidationmutation) * [`ContractCustomViewFilterSnapshot`](#contractcustomviewfiltersnapshot) * [`ContractCustomViewFilterTargetKind`](#contractcustomviewfiltertargetkind) * [`ContractCustomViewOutlineAxis`](#contractcustomviewoutlineaxis) * [`ContractDataAnalysisGrouping`](#contractdataanalysisgrouping) * [`ContractDataValidationContinuation`](#contractdatavalidationcontinuation) * [`ContractDataValidationDecision`](#contractdatavalidationdecision) * [`ContractDataValidationMetadata`](#contractdatavalidationmetadata) * [`ContractDataValidationRawInput`](#contractdatavalidationrawinput) * [`ContractDataValidationRule`](#contractdatavalidationrule) * [`ContractDataValidationRuleIntent`](#contractdatavalidationruleintent) * [`ContractDataValidationVerdict`](#contractdatavalidationverdict) * [`ContractDataValidationVerdictKind`](#contractdatavalidationverdictkind) * [`ContractDelimitedImportDestination`](#contractdelimitedimportdestination) * [`ContractDelimitedImportDestinationKind`](#contractdelimitedimportdestinationkind) * [`ContractDelimitedTextQualifier`](#contractdelimitedtextqualifier) * [`ContractExternalRangeEntry`](#contractexternalrangeentry) * [`ContractExternalRangeIdentity`](#contractexternalrangeidentity) * [`ContractExternalRangeProperties`](#contractexternalrangeproperties) * [`ContractExternalReferenceTrustMetadata`](#contractexternalreferencetrustmetadata) * [`ContractOutlineAxis`](#contractoutlineaxis) * [`ContractOutlineSubtotalAction`](#contractoutlinesubtotalaction) * [`ContractOutlineSubtotalState`](#contractoutlinesubtotalstate) * [`ContractRangeFilterAction`](#contractrangefilteraction) * [`ContractRangeFilterDateGroup`](#contractrangefilterdategroup) * [`ContractRangeFilterNumberOp`](#contractrangefilternumberop) * [`ContractRangeFilterPredicate`](#contractrangefilterpredicate) * [`ContractRangeFilterRelativePeriod`](#contractrangefilterrelativeperiod) * [`ContractRangeFilterTextOp`](#contractrangefiltertextop) * [`ContractRichTextRun`](#contractrichtextrun) * [`ContractSlicerItem`](#contractsliceritem) * [`ContractSlicerPayload`](#contractslicerpayload) * [`ContractSlicerStatus`](#contractslicerstatus) * [`ContractSlicerTimelineAction`](#contractslicertimelineaction) * [`ContractSlicerTimelineControlKind`](#contractslicertimelinecontrolkind) * [`ContractSlicerTimelineControlView`](#contractslicertimelinecontrolview) * [`ContractSlicerTimelineLevel`](#contractslicertimelinelevel) * [`ContractSlicerTimelineSortOrder`](#contractslicertimelinesortorder) * [`ContractSlicerTimelineSource`](#contractslicertimelinesource) * [`ContractSlicerTimelineTargetView`](#contractslicertimelinetargetview) * [`ContractSubtotalAggregate`](#contractsubtotalaggregate) * [`ContractSubtotalOptions`](#contractsubtotaloptions) * [`ContractTableFilterMetadata`](#contracttablefiltermetadata) * [`ContractTableHyperlinkAction`](#contracttablehyperlinkaction) * [`ContractTableLifecycleAction`](#contracttablelifecycleaction) * [`ContractTableMetadataEntry`](#contracttablemetadataentry) * [`ContractTableMetadataProjection`](#contracttablemetadataprojection) * [`ContractTableModelMutation`](#contracttablemodelmutation) * [`ContractTableSortMetadata`](#contracttablesortmetadata) * [`ContractTextHorizontalAlign`](#contracttexthorizontalalign) * [`ContractTextParagraph`](#contracttextparagraph) * [`ContractTextPayload`](#contracttextpayload) * [`ContractTextPayloadStatus`](#contracttextpayloadstatus) * [`ContractTextRun`](#contracttextrun) * [`ContractTextVerticalAlign`](#contracttextverticalalign) * [`ContractTrustCenterExternalPolicy`](#contracttrustcenterexternalpolicy) * [`ContractWorksheetAutoFilterMetadata`](#contractworksheetautofiltermetadata) * [`ContractXlsxDataValidationClearRulePatch`](#contractxlsxdatavalidationclearrulepatch) * [`ContractXlsxDataValidationListRulePatch`](#contractxlsxdatavalidationlistrulepatch) * [`ContractXlsxDataValidationMessageRulePatch`](#contractxlsxdatavalidationmessagerulepatch) * [`ContractXlsxDataValidationRulePatch`](#contractxlsxdatavalidationrulepatch) * [`ContractXlsxRichTextRunPatch`](#contractxlsxrichtextrunpatch) * [`ContractXlsxTextBoxObjectPatch`](#contractxlsxtextboxobjectpatch) * [`MWireTableSchema`](#mwiretableschema) * [`ProductTableRangeLoadToOutcome`](#producttablerangeloadtooutcome) * [`ProductTableRangeRefreshOutcome`](#producttablerangerefreshoutcome) * [`TableRangeOutputPlacement`](#tablerangeoutputplacement) * [`TableRangeSelector`](#tablerangeselector) * [`TableRangeSourceIdentity`](#tablerangesourceidentity) ### ContractAdvancedFilterAction [Section titled “ContractAdvancedFilterAction”](#contractadvancedfilteraction) ```ts type ContractAdvancedFilterAction = "filter_in_place" | "copy_to_range"; ``` ### ContractAdvancedFilterProjectedCell [Section titled “ContractAdvancedFilterProjectedCell”](#contractadvancedfilterprojectedcell) ```ts interface ContractAdvancedFilterProjectedCell { row: number; col: number; value: string; valueKind?: string | null; } ``` ### ContractAnalyzeInsightCard [Section titled “ContractAnalyzeInsightCard”](#contractanalyzeinsightcard) ```ts interface ContractAnalyzeInsightCard { stableId: string; kind: ContractAnalyzeInsightKind; titleCode: string; summary: string; score: number; insertion: ContractAnalyzeInsightsInsertion; chartType?: string | null; insertable: boolean; } ``` ### ContractAnalyzeInsightKind [Section titled “ContractAnalyzeInsightKind”](#contractanalyzeinsightkind) ```ts type ContractAnalyzeInsightKind = | "summary" | "trend" | "outliers" | "grouping" | "correlation" | "suitable_chart"; ``` ### ContractAnalyzeInsightsInsertion [Section titled “ContractAnalyzeInsightsInsertion”](#contractanalyzeinsightsinsertion) ```ts type ContractAnalyzeInsightsInsertion = "table" | "chart" | "pivot_table"; ``` ### ContractAnalyzeInsightsPlan [Section titled “ContractAnalyzeInsightsPlan”](#contractanalyzeinsightsplan) ```ts interface ContractAnalyzeInsightsPlan { generation: number; sourceRange: CellRange; dateSystem: "1900" | "1904" | string; hasHeaders: boolean; visibleRowCount: number; hiddenRowCount: number; numericCount: number; textCount: number; dateCount: number; blankCount: number; formulaCount: number; errorCount: number; deterministicHash: string; suggestedInsertion: ContractAnalyzeInsightsInsertion; insights: ContractAnalyzeInsightCard[]; warnings: string[]; } ``` ### ContractAutoFilterDateGroupMetadata [Section titled “ContractAutoFilterDateGroupMetadata”](#contractautofilterdategroupmetadata) ```ts interface ContractAutoFilterDateGroupMetadata { year?: number | null; month?: number | null; day?: number | null; hour?: number | null; minute?: number | null; second?: number | null; dateTimeGrouping: string; } ``` ### ContractConsolidateFunction [Section titled “ContractConsolidateFunction”](#contractconsolidatefunction) ```ts type ContractConsolidateFunction = | "sum" | "count" | "average" | "max" | "min" | "product" | "countNumbers" | "stdDev" | "stdDevp" | "var" | "varp"; ``` ### ContractConsolidationMutation [Section titled “ContractConsolidationMutation”](#contractconsolidationmutation) ```ts interface ContractConsolidationMutation { operation: "apply_cell_edits"; subsetId: string; session: ContractSubsetSessionInfo; supportedSubset: string; formulaTrustSnapshot?: ContractFormulaTrustSnapshot | null; delta: DeltaSummary; editedKeys: string[]; changedKeys: string[]; dirtyCellCount: number; sheetProtected: boolean; conditionalFormattingRules?: ContractConditionalRule[]; currentSourceSaveReadiness?: ContractCurrentSourceSaveReadiness | null; activeSheet: ContractActiveSheetMeta; geometry: ContractGeometrySubset; recalcNeeded: boolean; viewport: ViewportWindow; previewCells: ContractPreviewCell[]; tableMetadata?: ContractTableMetadataProjection | null; workbookTableMetadata?: ContractTableMetadataProjection | null; workbookHistory: ContractWorkbookHistoryProjection; } ``` ### ContractCustomViewFilterSnapshot [Section titled “ContractCustomViewFilterSnapshot”](#contractcustomviewfiltersnapshot) ```ts interface ContractCustomViewFilterSnapshot { sheetKey: string; targetKind: ContractCustomViewFilterTargetKind; targetId: string; stateXml?: string; } ``` ### ContractCustomViewFilterTargetKind [Section titled “ContractCustomViewFilterTargetKind”](#contractcustomviewfiltertargetkind) ```ts type ContractCustomViewFilterTargetKind = "worksheet" | "table"; ``` ### ContractCustomViewOutlineAxis [Section titled “ContractCustomViewOutlineAxis”](#contractcustomviewoutlineaxis) ```ts type ContractCustomViewOutlineAxis = "row" | "column"; ``` ### ContractDataAnalysisGrouping [Section titled “ContractDataAnalysisGrouping”](#contractdataanalysisgrouping) ```ts type ContractDataAnalysisGrouping = "columns" | "rows"; ``` ### ContractDataValidationContinuation [Section titled “ContractDataValidationContinuation”](#contractdatavalidationcontinuation) ```ts interface ContractDataValidationContinuation { token: string; decision: ContractDataValidationDecision; } ``` ### ContractDataValidationDecision [Section titled “ContractDataValidationDecision”](#contractdatavalidationdecision) ```ts type ContractDataValidationDecision = "retry" | "cancel" | "yes" | "no" | "ok"; ``` ### ContractDataValidationMetadata [Section titled “ContractDataValidationMetadata”](#contractdatavalidationmetadata) ```ts interface ContractDataValidationMetadata { rules: ContractDataValidationRule[]; } ``` ### ContractDataValidationRawInput [Section titled “ContractDataValidationRawInput”](#contractdatavalidationrawinput) ```ts interface ContractDataValidationRawInput { sheetKey: string; row: number; col: number; input: string; locale?: string | null; candidateEdit?: CellInputEdit | null; } ``` ### ContractDataValidationRule [Section titled “ContractDataValidationRule”](#contractdatavalidationrule) ```ts interface ContractDataValidationRule { activeSheetPath: string; sqref: string; type: | "none" | "whole" | "decimal" | "date" | "time" | "textLength" | "custom" | "list"; formula1?: string | null; formula2?: string | null; operator?: string | null; allowBlank?: boolean | null; inCellDropdown?: boolean | null; showInputMessage?: boolean | null; showErrorMessage?: boolean | null; promptTitle?: string | null; prompt?: string | null; errorTitle?: string | null; error?: string | null; errorStyle?: string | null; } ``` ### ContractDataValidationRuleIntent [Section titled “ContractDataValidationRuleIntent”](#contractdatavalidationruleintent) ```ts interface ContractDataValidationRuleIntent { sqref: string; type: | "none" | "whole" | "decimal" | "date" | "time" | "textLength" | "custom" | "list"; operator?: | "between" | "notBetween" | "equal" | "notEqual" | "greaterThan" | "lessThan" | "greaterThanOrEqual" | "lessThanOrEqual" | null; formula1?: string | null; formula2?: string | null; allowBlank?: boolean | null; inCellDropdown?: boolean | null; showInputMessage?: boolean | null; promptTitle?: string | null; prompt?: string | null; showErrorMessage?: boolean | null; errorStyle?: "stop" | "warning" | "information" | null; errorTitle?: string | null; error?: string | null; } ``` ### ContractDataValidationVerdict [Section titled “ContractDataValidationVerdict”](#contractdatavalidationverdict) ```ts interface ContractDataValidationVerdict { sheetKey: string; row: number; col: number; kind: ContractDataValidationVerdictKind; code: string; rule?: ContractDataValidationRule | null; errorStyle?: "stop" | "warning" | "information" | null; errorTitle?: string | null; error?: string | null; } ``` ### ContractDataValidationVerdictKind [Section titled “ContractDataValidationVerdictKind”](#contractdatavalidationverdictkind) ```ts type ContractDataValidationVerdictKind = "accepted" | "rejected" | "decision-required"; ``` ### ContractDelimitedImportDestination [Section titled “ContractDelimitedImportDestination”](#contractdelimitedimportdestination) ```ts interface ContractDelimitedImportDestination { kind: ContractDelimitedImportDestinationKind; sheetKey?: string | null; sheetName?: string | null; } ``` ### ContractDelimitedImportDestinationKind [Section titled “ContractDelimitedImportDestinationKind”](#contractdelimitedimportdestinationkind) ```ts type ContractDelimitedImportDestinationKind = "existing-worksheet" | "new-worksheet"; ``` ### ContractDelimitedTextQualifier [Section titled “ContractDelimitedTextQualifier”](#contractdelimitedtextqualifier) ```ts type ContractDelimitedTextQualifier = (typeof CONTRACT_DELIMITED_TEXT_QUALIFIER_IDS)[number]; ``` ### ContractExternalRangeEntry [Section titled “ContractExternalRangeEntry”](#contractexternalrangeentry) ```ts interface ContractExternalRangeEntry { identity: ContractExternalRangeIdentity; properties: ContractExternalRangeProperties; readOnlyFields?: string[]; } ``` ### ContractExternalRangeIdentity [Section titled “ContractExternalRangeIdentity”](#contractexternalrangeidentity) ```ts interface ContractExternalRangeIdentity { name: string; queryTablePart: string; connectionId: string; } ``` ### ContractExternalRangeProperties [Section titled “ContractExternalRangeProperties”](#contractexternalrangeproperties) ```ts interface ContractExternalRangeProperties { name: string; saveData: boolean; savePassword: boolean; refreshOnFileOpen: boolean; textFilePromptOnRefresh: boolean; rowNumbers: boolean; fieldNames: boolean; tablesOnlyFromHtml: boolean; adjustColumnWidth: boolean; refreshStyle: | "insert-delete-cells" | "insert-entire-rows" | "overwrite-existing-cells"; fillAdjacentFormulas: boolean; hasAutoformat: boolean; enableRefresh: boolean; backgroundQuery: boolean; } ``` ### ContractExternalReferenceTrustMetadata [Section titled “ContractExternalReferenceTrustMetadata”](#contractexternalreferencetrustmetadata) ```ts interface ContractExternalReferenceTrustMetadata { label: string; workbookName?: string | null; targetSheetName?: string | null; targetAddress?: string | null; resolutionState: string; reason?: string | null; cachedDisplayValue?: string | null; } ``` ### ContractOutlineAxis [Section titled “ContractOutlineAxis”](#contractoutlineaxis) ```ts type ContractOutlineAxis = "row" | "column"; ``` ### ContractOutlineSubtotalAction [Section titled “ContractOutlineSubtotalAction”](#contractoutlinesubtotalaction) ```ts type ContractOutlineSubtotalAction = | "read_state" | "group" | "ungroup" | "collapse" | "expand" | "show_level" | "auto_outline" | "clear_outline" | "subtotal" | "remove_all"; ``` ### ContractOutlineSubtotalState [Section titled “ContractOutlineSubtotalState”](#contractoutlinesubtotalstate) ```ts interface ContractOutlineSubtotalState { rowLevels: ContractOutlineTrackState[]; columnLevels: ContractOutlineTrackState[]; maxRowLevel: number; maxColumnLevel: number; summaryBelow: boolean; subtotalFormulaKeys: string[]; } ``` ### ContractRangeFilterAction [Section titled “ContractRangeFilterAction”](#contractrangefilteraction) ```ts type ContractRangeFilterAction = "apply" | "clear_column" | "clear_all" | "reapply"; ``` ### ContractRangeFilterDateGroup [Section titled “ContractRangeFilterDateGroup”](#contractrangefilterdategroup) ```ts interface ContractRangeFilterDateGroup { dateTimeGrouping: "year" | "month" | "day" | "hour" | "minute" | "second"; year?: number | null; month?: number | null; day?: number | null; hour?: number | null; minute?: number | null; second?: number | null; } ``` ### ContractRangeFilterNumberOp [Section titled “ContractRangeFilterNumberOp”](#contractrangefilternumberop) ```ts type ContractRangeFilterNumberOp = "eq" | "ne" | "gt" | "ge" | "lt" | "le" | "between"; ``` ### ContractRangeFilterPredicate [Section titled “ContractRangeFilterPredicate”](#contractrangefilterpredicate) ```ts type ContractRangeFilterPredicate = | { kind: "values"; values: string[] } | { kind: "date_groups"; groups: ContractRangeFilterDateGroup[] } | { kind: "compound"; and?: boolean; predicates: ContractRangeFilterPredicate[]; } | { kind: "number"; op: ContractRangeFilterNumberOp; value: string; value2?: string | null; } | { kind: "top_n"; bottom?: boolean; percent?: boolean; count: number } | { kind: "text"; op: ContractRangeFilterTextOp; value: string } | { kind: "average"; below?: boolean } | { kind: "relative_period"; period: ContractRangeFilterRelativePeriod }; ``` ### ContractRangeFilterRelativePeriod [Section titled “ContractRangeFilterRelativePeriod”](#contractrangefilterrelativeperiod) ```ts type ContractRangeFilterRelativePeriod = | "tomorrow" | "today" | "yesterday" | "next-week" | "this-week" | "last-week" | "next-month" | "this-month" | "last-month" | "next-quarter" | "this-quarter" | "last-quarter" | "next-year" | "this-year" | "last-year" | "year-to-date" | "all-dates-in-the-period"; ``` ### ContractRangeFilterTextOp [Section titled “ContractRangeFilterTextOp”](#contractrangefiltertextop) ```ts type ContractRangeFilterTextOp = | "equals" | "not_equals" | "contains" | "not_contains" | "begins_with" | "not_begins_with" | "ends_with" | "not_ends_with"; ``` ### ContractRichTextRun [Section titled “ContractRichTextRun”](#contractrichtextrun) ```ts interface ContractRichTextRun { index: number; text: string; bold?: boolean; italic?: boolean; underline?: boolean; fontVerticalAlign?: ContractPreviewFontVerticalAlign | null; } ``` ### ContractSlicerItem [Section titled “ContractSlicerItem”](#contractsliceritem) ```ts interface ContractSlicerItem { label: string; selected?: boolean; noData?: boolean; } ``` ### ContractSlicerPayload [Section titled “ContractSlicerPayload”](#contractslicerpayload) ```ts interface ContractSlicerPayload { status: ContractSlicerStatus; name: string; caption?: string | null; cacheName?: string | null; sourceField?: string | null; pivotTableNames?: string[]; columnCount?: number | null; rowHeightEmu?: number | null; style?: string | null; showCaption: boolean; items?: ContractSlicerItem[]; itemCount: number; selectedCount: number; } ``` ### ContractSlicerStatus [Section titled “ContractSlicerStatus”](#contractslicerstatus) ```ts type ContractSlicerStatus = "live-readonly" | "missing-items"; ``` ### ContractSlicerTimelineAction [Section titled “ContractSlicerTimelineAction”](#contractslicertimelineaction) ```ts type ContractSlicerTimelineAction = | { action: "list" } | { action: "create"; kind: ContractSlicerTimelineControlKind; source: ContractSlicerTimelineSource; fieldName: string; name?: string | null; caption?: string | null; anchorSheet: string; connections: string[]; } | { action: "set_selection"; controlId: string; selectedItems: string[]; timelineStart?: string | null; timelineEnd?: string | null; } | { action: "clear"; controlId: string } | { action: "set_sort"; controlId: string; sortOrder: ContractSlicerTimelineSortOrder; } | { action: "set_timeline_level"; controlId: string; level: ContractSlicerTimelineLevel; } | { action: "set_connections"; controlId: string; connections: string[] } | { action: "list_filter_connections"; pivotCacheId: string; pivotTableName: string; } | { action: "apply_filter_connections"; pivotCacheId: string; pivotTableName: string; connectedControlIds: string[]; } | { action: "rename"; controlId: string; name: string; caption: string } | { action: "delete"; controlId: string } | { action: "start_refresh_current"; controlId: string } | { action: "refresh_status"; controlId: string; generation?: number | null; advance: boolean; } | { action: "cancel_refresh"; controlId: string; generation: number } | { action: "undo" } | { action: "redo" }; ``` ### ContractSlicerTimelineControlKind [Section titled “ContractSlicerTimelineControlKind”](#contractslicertimelinecontrolkind) ```ts type ContractSlicerTimelineControlKind = "slicer" | "timeline"; ``` ### ContractSlicerTimelineControlView [Section titled “ContractSlicerTimelineControlView”](#contractslicertimelinecontrolview) ```ts interface ContractSlicerTimelineControlView { id: string; cacheId: string; name: string; caption: string; kind: ContractSlicerTimelineControlKind; source: ContractSlicerTimelineSource; fieldName: string; anchorSheet: string; selectedItems: string[]; availableItems: string[]; sortOrder: ContractSlicerTimelineSortOrder; timelineLevel?: ContractSlicerTimelineLevel | null; timelineStart?: string | null; timelineEnd?: string | null; connections: string[]; stableUid: string; stableCacheUid: string; cacheGeneration: number; latestRequestGeneration: number; matchedRowCount: number; } ``` ### ContractSlicerTimelineLevel [Section titled “ContractSlicerTimelineLevel”](#contractslicertimelinelevel) ```ts type ContractSlicerTimelineLevel = "years" | "quarters" | "months" | "days"; ``` ### ContractSlicerTimelineSortOrder [Section titled “ContractSlicerTimelineSortOrder”](#contractslicertimelinesortorder) ```ts type ContractSlicerTimelineSortOrder = "ascending" | "descending" | "source"; ``` ### ContractSlicerTimelineSource [Section titled “ContractSlicerTimelineSource”](#contractslicertimelinesource) ```ts type ContractSlicerTimelineSource = | { kind: "table"; tableName: string; sheetKey: string } | { kind: "pivot"; pivotCacheId: string; pivotTableNames: string[]; fieldValues: string[]; }; ``` ### ContractSlicerTimelineTargetView [Section titled “ContractSlicerTimelineTargetView”](#contractslicertimelinetargetview) ```ts interface ContractSlicerTimelineTargetView { pivotCacheId: string; pivotTableName: string; cacheGeneration: number; matchedRowCount: number; } ``` ### ContractSubtotalAggregate [Section titled “ContractSubtotalAggregate”](#contractsubtotalaggregate) ```ts type ContractSubtotalAggregate = "sum" | "count" | "counta" | "average" | "min" | "max" | "product"; ``` ### ContractSubtotalOptions [Section titled “ContractSubtotalOptions”](#contractsubtotaloptions) ```ts interface ContractSubtotalOptions { groupByCol: number; targetCols: number[]; aggregate: ContractSubtotalAggregate; replaceCurrent?: boolean; summaryBelow?: boolean; pageBreakBetweenGroups?: boolean; } ``` ### ContractTableFilterMetadata [Section titled “ContractTableFilterMetadata”](#contracttablefiltermetadata) ```ts interface ContractTableFilterMetadata { colId: number; values: string[]; operator?: string | null; criteria?: string | null; criteria2?: string | null; operator2?: string | null; criteriaJoin?: string | null; kind?: string | null; blank?: boolean | null; calendarType?: string | null; dateGroups?: ContractAutoFilterDateGroupMetadata[]; hiddenButton?: boolean | null; showButton?: boolean | null; } ``` ### ContractTableHyperlinkAction [Section titled “ContractTableHyperlinkAction”](#contracttablehyperlinkaction) ```ts type ContractTableHyperlinkAction = | { action: "table"; mutation: ContractTableModelMutation; } | { action: "upsert_hyperlink"; sheetKey: string; row: number; col: number; stableId?: string | null; target: string; location?: string | null; display?: string | null; tooltip?: string | null; targetMode?: string | null; cellText?: string | null; } | { action: "delete_hyperlink"; sheetKey: string; row: number; col: number; stableId?: string | null; } | { action: "cancel"; sheetKey: string; }; ``` ### ContractTableLifecycleAction [Section titled “ContractTableLifecycleAction”](#contracttablelifecycleaction) ```ts type ContractTableLifecycleAction = | "insert" | "rename" | "style" | "filter_metadata" | "refresh" | "convert_to_range" | "delete"; ``` ### ContractTableMetadataEntry [Section titled “ContractTableMetadataEntry”](#contracttablemetadataentry) ```ts interface ContractTableMetadataEntry { stableId: string; id: string | null; name: string | null; displayName: string | null; ref: string; tablePath?: string | null; sheetName: string; sheetPath: string; headerRowCount: number; totalsRowCount: number; totalsRowShown: boolean; tableStyleName: string | null; showFirstColumn: boolean; showLastColumn: boolean; showRowStripes: boolean; showColumnStripes: boolean; filterButtonVisible: boolean; activeFilterColumnIds: number[]; activeFilters: ContractTableFilterMetadata[]; activeSortState?: ContractTableSortMetadata | null; columns: ContractTableColumnMetadata[]; } ``` ### ContractTableMetadataProjection [Section titled “ContractTableMetadataProjection”](#contracttablemetadataprojection) ```ts interface ContractTableMetadataProjection { scope: "active-sheet" | "workbook"; source: "rust-authoritative-table-model"; activeSheetPath: string; tableCount: number; tables: ContractTableMetadataEntry[]; note: string; } ``` ### ContractTableModelMutation [Section titled “ContractTableModelMutation”](#contracttablemodelmutation) ```ts type ContractTableModelMutation = | { action: "table_lifecycle"; lifecycleAction: ContractTableLifecycleAction; stableId?: string | null; tablePath?: string | null; tableName?: string | null; table?: ContractTableMetadataEntry | null; edits?: CellInputEdit[]; } | { action: "set_total_row"; stableId?: string | null; tablePath?: string | null; tableName?: string | null; enabled: boolean; totals?: ContractTableTotalColumn[]; } | { action: "resize"; stableId?: string | null; tablePath?: string | null; tableName?: string | null; ref: string; } | { action: "set_total_formula"; stableId?: string | null; tablePath?: string | null; tableName?: string | null; columnName: string; formula: string; }; ``` ### ContractTableSortMetadata [Section titled “ContractTableSortMetadata”](#contracttablesortmetadata) ```ts interface ContractTableSortMetadata { ref: string; columnRef: string; colId: number; descending: boolean; caseSensitive: boolean; columnSort: boolean; } ``` ### ContractTextHorizontalAlign [Section titled “ContractTextHorizontalAlign”](#contracttexthorizontalalign) ```ts type ContractTextHorizontalAlign = "left" | "center" | "right"; ``` ### ContractTextParagraph [Section titled “ContractTextParagraph”](#contracttextparagraph) ```ts interface ContractTextParagraph { runs: ContractTextRun[]; horizontalAlign?: ContractTextHorizontalAlign | null; rtl?: boolean | null; bullet?: string | null; level?: number | null; preservedPropertiesXml?: string | null; } ``` ### ContractTextPayload [Section titled “ContractTextPayload”](#contracttextpayload) ```ts interface ContractTextPayload { status: ContractTextPayloadStatus; text: string; fontFamily?: string | null; paragraphs?: ContractTextParagraph[] | null; fontSize?: number | null; bold?: boolean | null; italic?: boolean | null; color?: string | null; colorThemeSlot?: number | null; colorThemeLumMod?: number | null; colorThemeLumOff?: number | null; colorThemeTint?: number | null; colorThemeShade?: number | null; fillOpacity?: number | null; fillType?: "solid" | "none" | string | null; outlineColor?: string | null; outlineOpacity?: number | null; outlineWidth?: number | null; outlineType?: "solid" | "none" | string | null; shadow?: boolean | null; shadowColor?: string | null; shadowOpacity?: number | null; shadowBlur?: number | null; shadowAngle?: number | null; shadowDist?: number | null; glowColor?: string | null; glowSize?: number | null; glowOpacity?: number | null; softEdges?: number | null; wrapText?: boolean | null; overflowText?: boolean | null; autofit?: "none" | "shrink" | "resize" | string | null; textDirection?: "horizontal" | "rotate90" | "rotate270" | "stacked" | string | null; textMarginLeft?: number | null; textMarginRight?: number | null; textMarginTop?: number | null; textMarginBottom?: number | null; horizontalAlign?: ContractTextHorizontalAlign | null; verticalAlign?: ContractTextVerticalAlign | null; rotationDegrees?: number | null; rtl?: boolean | null; } ``` ### ContractTextPayloadStatus [Section titled “ContractTextPayloadStatus”](#contracttextpayloadstatus) ```ts type ContractTextPayloadStatus = "live-editable"; ``` ### ContractTextRun [Section titled “ContractTextRun”](#contracttextrun) ```ts interface ContractTextRun { text: string; fontFamily?: string | null; fontSize?: number | null; bold?: boolean | null; italic?: boolean | null; color?: string | null; language?: string | null; rtl?: boolean | null; hyperlink?: string | null; hyperlinkRelationshipId?: string | null; preservedPropertiesXml?: string | null; } ``` ### ContractTextVerticalAlign [Section titled “ContractTextVerticalAlign”](#contracttextverticalalign) ```ts type ContractTextVerticalAlign = "top" | "middle" | "bottom"; ``` ### ContractTrustCenterExternalPolicy [Section titled “ContractTrustCenterExternalPolicy”](#contracttrustcenterexternalpolicy) ```ts type ContractTrustCenterExternalPolicy = "manual_only" | "block_all"; ``` ### ContractWorksheetAutoFilterMetadata [Section titled “ContractWorksheetAutoFilterMetadata”](#contractworksheetautofiltermetadata) ```ts interface ContractWorksheetAutoFilterMetadata { scope: "active-sheet"; source: "rust-authoritative-worksheet-auto-filter-model"; activeSheetPath: string; ref: string; activeFilterColumnIds: number[]; activeFilters: ContractTableFilterMetadata[]; filterMode?: boolean | null; } ``` ### ContractXlsxDataValidationClearRulePatch [Section titled “ContractXlsxDataValidationClearRulePatch”](#contractxlsxdatavalidationclearrulepatch) ```ts interface ContractXlsxDataValidationClearRulePatch { activeSheetPath: string; cellRef: string; } ``` ### ContractXlsxDataValidationListRulePatch [Section titled “ContractXlsxDataValidationListRulePatch”](#contractxlsxdatavalidationlistrulepatch) ```ts interface ContractXlsxDataValidationListRulePatch { activeSheetPath: string; sqref: string; formula1: string; literalListValues: string[]; sourceLabel?: string | null; targetLabel?: string | null; } ``` ### ContractXlsxDataValidationMessageRulePatch [Section titled “ContractXlsxDataValidationMessageRulePatch”](#contractxlsxdatavalidationmessagerulepatch) ```ts interface ContractXlsxDataValidationMessageRulePatch { activeSheetPath: string; cellRef: string; promptTitle?: string | null; prompt?: string | null; showInputMessage?: boolean | null; errorTitle?: string | null; error?: string | null; errorStyle?: string | null; showErrorMessage?: boolean | null; } ``` ### ContractXlsxDataValidationRulePatch [Section titled “ContractXlsxDataValidationRulePatch”](#contractxlsxdatavalidationrulepatch) ```ts interface ContractXlsxDataValidationRulePatch { activeSheetPath: string; sqref: string; type: "whole" | "date" | "textLength" | "custom" | "list"; formula1: string; formula2?: string | null; operator?: | "between" | "notBetween" | "equal" | "notEqual" | "greaterThan" | "lessThan" | "greaterThanOrEqual" | "lessThanOrEqual" | null; allowBlank?: boolean | null; inCellDropdown?: boolean | null; showInputMessage?: boolean | null; showErrorMessage?: boolean | null; } ``` ### ContractXlsxRichTextRunPatch [Section titled “ContractXlsxRichTextRunPatch”](#contractxlsxrichtextrunpatch) ```ts interface ContractXlsxRichTextRunPatch { activeSheetPath: string; cellRef: string; runIndex: number; text?: string | null; bold?: boolean | null; italic?: boolean | null; underline?: boolean | null; } ``` ### ContractXlsxTextBoxObjectPatch [Section titled “ContractXlsxTextBoxObjectPatch”](#contractxlsxtextboxobjectpatch) ```ts interface ContractXlsxTextBoxObjectPatch { objectId: string; objectName?: string | null; hidden?: boolean | null; from: ContractObjectAnchorCell; ext: ContractObjectExtent; zOrder?: number | null; text: string; paragraphs?: ContractTextParagraph[] | null; fontFamily?: string | null; fontSize?: number | null; bold?: boolean | null; italic?: boolean | null; underline?: boolean | null; color?: string | null; textFillType?: string | null; textFillOpacity?: number | null; textOutlineHex?: string | null; textOutlineType?: string | null; textOutlineOpacity?: number | null; textOutlineWidth?: number | null; textShadow?: boolean | null; textShadowColor?: string | null; textShadowOpacity?: number | null; textShadowBlur?: number | null; textShadowAngle?: number | null; textShadowDist?: number | null; textGlowColor?: string | null; textGlowSize?: number | null; textGlowOpacity?: number | null; textSoftEdges?: number | null; wrapText?: boolean | null; overflowText?: boolean | null; autofit?: string | null; textDirection?: string | null; textMarginLeft?: number | null; textMarginRight?: number | null; textMarginTop?: number | null; textMarginBottom?: number | null; horizontalAlign?: ContractTextHorizontalAlign | null; verticalAlign?: ContractTextVerticalAlign | null; rotationDegrees?: number | null; rtl?: boolean | null; rawAnchorXml?: string | null; } ``` ### MWireTableSchema [Section titled “MWireTableSchema”](#mwiretableschema) ```ts interface MWireTableSchema { columnTypes: string[]; } ``` ### ProductTableRangeLoadToOutcome [Section titled “ProductTableRangeLoadToOutcome”](#producttablerangeloadtooutcome) ```ts interface ProductTableRangeLoadToOutcome { placed: boolean; loadPlan?: PowerQueryLoadPlan; persistedQuery?: unknown; blockReason?: string; blockDetail?: string; } ``` ### ProductTableRangeRefreshOutcome [Section titled “ProductTableRangeRefreshOutcome”](#producttablerangerefreshoutcome) ```ts interface ProductTableRangeRefreshOutcome { generation: number; phase: "queued" | "running" | "ready" | "finished" | "cancelled" | "blocked"; completed: number; total: number; deniedReason?: string; deniedMessage?: string; outcomes: ProductTableRangeRefreshQueryOutcome[]; } ``` ### TableRangeOutputPlacement [Section titled “TableRangeOutputPlacement”](#tablerangeoutputplacement) ```ts type TableRangeOutputPlacement = | { kind: "new-sheet"; name: string; sheetKey: string } | { kind: "current-anchor"; sheetKey: string } | { kind: "existing-range"; sheetKey: string; anchor: CellAnchor } | { kind: "connection-only" }; ``` ### TableRangeSelector [Section titled “TableRangeSelector”](#tablerangeselector) ```ts type TableRangeSelector = { kind: "table"; tableName: string } | { kind: "range"; rangeRef: string }; ``` ### TableRangeSourceIdentity [Section titled “TableRangeSourceIdentity”](#tablerangesourceidentity) ```ts interface TableRangeSourceIdentity { workbookScope: string; sheetName: string; selector: TableRangeSelector; } ``` # Types: formatting > Compute Contract type definitions — styles, fonts, themes, borders, conditional formatting, rows and columns. Names: 70. Definitions of the names from the “TypeScript type” column on the operation pages. Other dictionary topics: [session, workbook, and sheets](/reference/sumsheet/types-session/) · [cells and ranges](/reference/sumsheet/types-cells/) · [formulas and calculation](/reference/sumsheet/types-formulas/) · **formatting** · [data and sheet objects](/reference/sumsheet/types-data/) · [pivot tables](/reference/sumsheet/types-pivot/) · [charts and graphics](/reference/sumsheet/types-charts/) · [printing and page layout](/reference/sumsheet/types-print/) · [Power Query](/reference/sumsheet/types-powerquery/) · [VBA and macros](/reference/sumsheet/types-vba/) · [protection and review](/reference/sumsheet/types-protection/) · [general and utility](/reference/sumsheet/types-common/). Types on this page — 70 * [`ColumnProfile`](#columnprofile) * [`ColumnValueFrequency`](#columnvaluefrequency) * [`ContractApplyThemeFontsPatch`](#contractapplythemefontspatch) * [`ContractCellStyleDefinition`](#contractcellstyledefinition) * [`ContractCellStyleFormatting`](#contractcellstyleformatting) * [`ContractCellStyleMutation`](#contractcellstylemutation) * [`ContractCellStylesManagerAction`](#contractcellstylesmanageraction) * [`ContractCellStylesManagerAuthority`](#contractcellstylesmanagerauthority) * [`ContractColumnWidth`](#contractcolumnwidth) * [`ContractConditionalComparison`](#contractconditionalcomparison) * [`ContractConditionalFormattingManagerAction`](#contractconditionalformattingmanageraction) * [`ContractConditionalFormattingManagerAuthority`](#contractconditionalformattingmanagerauthority) * [`ContractConditionalFormattingOpaqueRule`](#contractconditionalformattingopaquerule) * [`ContractConditionalPopulationKind`](#contractconditionalpopulationkind) * [`ContractConditionalRange`](#contractconditionalrange) * [`ContractConditionalRankDirection`](#contractconditionalrankdirection) * [`ContractConditionalRule`](#contractconditionalrule) * [`ContractConditionalRuleKind`](#contractconditionalrulekind) * [`ContractConditionalRuleVisual`](#contractconditionalrulevisual) * [`ContractConditionalScalar`](#contractconditionalscalar) * [`ContractDataCleanupPreviewRow`](#contractdatacleanuppreviewrow) * [`ContractDataCleanupRowSpan`](#contractdatacleanuprowspan) * [`ContractDelimitedColumnFormat`](#contractdelimitedcolumnformat) * [`ContractFileFormat`](#contractfileformat) * [`ContractFormatCapabilities`](#contractformatcapabilities) * [`ContractMergeCellsMode`](#contractmergecellsmode) * [`ContractNormalStyleFont`](#contractnormalstylefont) * [`ContractPreviewBorderSide`](#contractpreviewborderside) * [`ContractPreviewBorderStyle`](#contractpreviewborderstyle) * [`ContractPreviewBorders`](#contractpreviewborders) * [`ContractPreviewConditionalFillKind`](#contractpreviewconditionalfillkind) * [`ContractPreviewConditionalIcon`](#contractpreviewconditionalicon) * [`ContractPreviewFontVerticalAlign`](#contractpreviewfontverticalalign) * [`ContractPreviewFormatting`](#contractpreviewformatting) * [`ContractPreviewGradientFill`](#contractpreviewgradientfill) * [`ContractPreviewPatternFill`](#contractpreviewpatternfill) * [`ContractPreviewPatternFillKind`](#contractpreviewpatternfillkind) * [`ContractRangeFilterColumnCriteria`](#contractrangefiltercolumncriteria) * [`ContractRowHeight`](#contractrowheight) * [`ContractTableColumnMetadata`](#contracttablecolumnmetadata) * [`ContractTableStyleDefinition`](#contracttablestyledefinition) * [`ContractTableStyleElementDefinition`](#contracttablestyleelementdefinition) * [`ContractTableStyleMutation`](#contracttablestylemutation) * [`ContractTableStyleOptions`](#contracttablestyleoptions) * [`ContractTableStylesManagerAction`](#contracttablestylesmanageraction) * [`ContractTableStylesManagerAuthority`](#contracttablestylesmanagerauthority) * [`ContractTableTotalColumn`](#contracttabletotalcolumn) * [`ContractTextToColumnsAdvancedOptions`](#contracttexttocolumnsadvancedoptions) * [`ContractTextToColumnsColumnFormat`](#contracttexttocolumnscolumnformat) * [`ContractXlsxCellFormatPatch`](#contractxlsxcellformatpatch) * [`ContractXlsxColumnOutlineGroupPatch`](#contractxlsxcolumnoutlinegrouppatch) * [`ContractXlsxColumnOutlineRangePatch`](#contractxlsxcolumnoutlinerangepatch) * [`ContractXlsxColumnOutlineUngroupPatch`](#contractxlsxcolumnoutlineungrouppatch) * [`ContractXlsxDelimitedColumnRulePatch`](#contractxlsxdelimitedcolumnrulepatch) * [`ContractXlsxRowOutlineGroupPatch`](#contractxlsxrowoutlinegrouppatch) * [`ContractXlsxRowOutlineRangePatch`](#contractxlsxrowoutlinerangepatch) * [`ContractXlsxRowOutlineUngroupPatch`](#contractxlsxrowoutlineungrouppatch) * [`FlashFillCandidateView`](#flashfillcandidateview) * [`FlashFillExample`](#flashfillexample) * [`FlashFillInference`](#flashfillinference) * [`FlashFillMode`](#flashfillmode) * [`FlashFillPreviewCell`](#flashfillpreviewcell) * [`FlashFillRefusalContext`](#flashfillrefusalcontext) * [`FlashFillTargetRow`](#flashfilltargetrow) * [`FlashFillValue`](#flashfillvalue) * [`FlashFillValueKind`](#flashfillvaluekind) * [`MWireTableRowType`](#mwiretablerowtype) * [`SortRangeRowsDirection`](#sortrangerowsdirection) * [`SortRangeRowsLevel`](#sortrangerowslevel) * [`SortRangeRowsNumericTextMode`](#sortrangerowsnumerictextmode) ### ColumnProfile [Section titled “ColumnProfile”](#columnprofile) ```ts interface ColumnProfile { name: string; typeName: ContractPowerQueryCellKind | "mixed" | "null"; nullCount: number; errorCount: number; emptyCount: number; validCount: number; distinctCount: number; distinctCapped: boolean; distribution: ColumnValueFrequency[]; validRatio: number; errorRatio: number; emptyRatio: number; } ``` ### ColumnValueFrequency [Section titled “ColumnValueFrequency”](#columnvaluefrequency) ```ts interface ColumnValueFrequency { value: string; kind: ContractPowerQueryCellKind; count: number; } ``` ### ContractApplyThemeFontsPatch [Section titled “ContractApplyThemeFontsPatch”](#contractapplythemefontspatch) ```ts interface ContractApplyThemeFontsPatch { majorTypeface: string; minorTypeface: string; } ``` ### ContractCellStyleDefinition [Section titled “ContractCellStyleDefinition”](#contractcellstyledefinition) ```ts interface ContractCellStyleDefinition { identity: string; name: string; builtIn: boolean; builtinId?: number | null; editable: boolean; deletable: boolean; duplicable: boolean; category: string; formatting: ContractCellStyleFormatting; xfId: number; applicationStyleIndex: number; usageCount: number; opaque: boolean; rawXmlDigest: string; } ``` ### ContractCellStyleFormatting [Section titled “ContractCellStyleFormatting”](#contractcellstyleformatting) ```ts type ContractCellStyleFormatting = Omit< ContractPreviewFormatting, "dataBar" | "conditionalIcon" | "conditionalFillKind" >; ``` ### ContractCellStyleMutation [Section titled “ContractCellStyleMutation”](#contractcellstylemutation) ```ts type ContractCellStyleMutation = | { kind: "create"; draftIdentity: string; name: string; basedOnIdentity?: string | null; formatting?: ContractCellStyleFormatting | null; } | { kind: "modify"; identity: string; name: string; formatting: ContractCellStyleFormatting; expectedRawXmlDigest: string; } | { kind: "duplicate"; identity: string; draftIdentity: string; name: string; } | { kind: "delete"; identity: string; expectedRawXmlDigest: string; }; ``` ### ContractCellStylesManagerAction [Section titled “ContractCellStylesManagerAction”](#contractcellstylesmanageraction) ```ts type ContractCellStylesManagerAction = | { action: "inspect" } | { action: "commit"; mutations: ContractCellStyleMutation[]; expectedOpaqueStyleIdentities?: string[]; } | { action: "applyStyle"; identity: string; target: CellRange } | { action: "mergeFromWorkbook"; sourceSubsetId: string; identities?: string[]; }; ``` ### ContractCellStylesManagerAuthority [Section titled “ContractCellStylesManagerAuthority”](#contractcellstylesmanagerauthority) ```ts interface ContractCellStylesManagerAuthority { canApply: boolean; readOnly: boolean; protected: boolean; sourceKindLive: boolean; refusalCode?: string | null; } ``` ### ContractColumnWidth [Section titled “ContractColumnWidth”](#contractcolumnwidth) ```ts interface ContractColumnWidth { col: number; width: number; } ``` ### ContractConditionalComparison [Section titled “ContractConditionalComparison”](#contractconditionalcomparison) ```ts type ContractConditionalComparison = "greaterThan" | "lessThan" | "equalTo"; ``` ### ContractConditionalFormattingManagerAction [Section titled “ContractConditionalFormattingManagerAction”](#contractconditionalformattingmanageraction) ```ts type ContractConditionalFormattingManagerAction = | { action: "inspect" } | { action: "apply"; rules: ContractConditionalRule[]; expectedOpaqueRuleIdentities?: string[]; }; ``` ### ContractConditionalFormattingManagerAuthority [Section titled “ContractConditionalFormattingManagerAuthority”](#contractconditionalformattingmanagerauthority) ```ts interface ContractConditionalFormattingManagerAuthority { canApply: boolean; readOnly: boolean; protected: boolean; sourceKindLive: boolean; refusalCode?: string | null; } ``` ### ContractConditionalFormattingOpaqueRule [Section titled “ContractConditionalFormattingOpaqueRule”](#contractconditionalformattingopaquerule) ```ts interface ContractConditionalFormattingOpaqueRule { identity: string; ruleType: string; priority: number; stopIfTrue: boolean; appliesTo: string; formulas: string[]; rawXmlDigest: string; editable: false; refusalCode: "conditional-formatting-opaque-rule-read-only" | string; } ``` ### ContractConditionalPopulationKind [Section titled “ContractConditionalPopulationKind”](#contractconditionalpopulationkind) ```ts type ContractConditionalPopulationKind = "duplicate" | "unique"; ``` ### ContractConditionalRange [Section titled “ContractConditionalRange”](#contractconditionalrange) ```ts interface ContractConditionalRange { rowStart: number; rowEnd: number; colStart: number; colEnd: number; } ``` ### ContractConditionalRankDirection [Section titled “ContractConditionalRankDirection”](#contractconditionalrankdirection) ```ts type ContractConditionalRankDirection = "top" | "bottom"; ``` ### ContractConditionalRule [Section titled “ContractConditionalRule”](#contractconditionalrule) ```ts interface ContractConditionalRule { id: string; priority: number; stopIfTrue: boolean; appliesTo: ContractConditionalRange[]; kind: ContractConditionalRuleKind; visual: ContractConditionalRuleVisual; pivotScope?: ContractPivotConditionalRuleScope | null; } ``` ### ContractConditionalRuleKind [Section titled “ContractConditionalRuleKind”](#contractconditionalrulekind) ```ts type ContractConditionalRuleKind = | { type: "compare"; operator: ContractConditionalComparison; operand: ContractConditionalScalar; } | { type: "between"; lower: ContractConditionalScalar; upper: ContractConditionalScalar; } | { type: "textContains"; value: string } | { type: "population"; value: ContractConditionalPopulationKind } | { type: "rank"; direction: ContractConditionalRankDirection; amount: number; percent: boolean; } | { type: "average"; above: boolean } | { type: "twoColorScale" } | { type: "threeColorScale" } | { type: "dataBar" } | { type: "iconSet" } | { type: "formula"; value: string }; ``` ### ContractConditionalRuleVisual [Section titled “ContractConditionalRuleVisual”](#contractconditionalrulevisual) ```ts interface ContractConditionalRuleVisual { dxfId?: number | null; fillColor?: string | null; fontColor?: string | null; bold: boolean; dataBarColor?: string | null; colorScaleColors: string[]; iconSet?: string | null; } ``` ### ContractConditionalScalar [Section titled “ContractConditionalScalar”](#contractconditionalscalar) ```ts type ContractConditionalScalar = | { kind: "blank" } | { kind: "emptyString" } | { kind: "number"; value: number } | { kind: "text"; value: string } | { kind: "boolean"; value: boolean } | { kind: "error"; value: string }; ``` ### ContractDataCleanupPreviewRow [Section titled “ContractDataCleanupPreviewRow”](#contractdatacleanuppreviewrow) ```ts interface ContractDataCleanupPreviewRow { sourceRow: number; values: ContractDataCleanupPreviewValue[]; duplicate?: boolean; } ``` ### ContractDataCleanupRowSpan [Section titled “ContractDataCleanupRowSpan”](#contractdatacleanuprowspan) ```ts interface ContractDataCleanupRowSpan { rowStart: number; rowEnd: number; } ``` ### ContractDelimitedColumnFormat [Section titled “ContractDelimitedColumnFormat”](#contractdelimitedcolumnformat) ```ts interface ContractDelimitedColumnFormat { sourceIndex: number; format: ContractTextToColumnsColumnFormat; } ``` ### ContractFileFormat [Section titled “ContractFileFormat”](#contractfileformat) ```ts type ContractFileFormat = (typeof CONTRACT_FILE_FORMAT_IDS)[number]; ``` ### ContractFormatCapabilities [Section titled “ContractFormatCapabilities”](#contractformatcapabilities) ```ts interface ContractFormatCapabilities { fileFormat: ContractFileFormat; containerFamily: ContractContainerFamily; openCapability: ContractCapabilityLevel; editCapability: ContractCapabilityLevel; saveCapability: ContractSaveCapability; saveKind: ContractSaveKind; fidelityClass: ContractFidelityClass; nonGoals: ContractFormatNonGoal[]; } ``` ### ContractMergeCellsMode [Section titled “ContractMergeCellsMode”](#contractmergecellsmode) ```ts type ContractMergeCellsMode = "merge" | "merge-and-center" | "merge-across"; ``` ### ContractNormalStyleFont [Section titled “ContractNormalStyleFont”](#contractnormalstylefont) ```ts interface ContractNormalStyleFont { family: string; explicitFamily: string | null; themeScheme: string | null; sizePoints: number; bold: boolean; italic: boolean; } ``` ### ContractPreviewBorderSide [Section titled “ContractPreviewBorderSide”](#contractpreviewborderside) ```ts interface ContractPreviewBorderSide { style: ContractPreviewBorderStyle; color?: string | null; } ``` ### ContractPreviewBorderStyle [Section titled “ContractPreviewBorderStyle”](#contractpreviewborderstyle) ```ts type ContractPreviewBorderStyle = | "thin" | "hair" | "dotted" | "dashed" | "dashDot" | "dashDotDot" | "medium" | "mediumDashed" | "mediumDashDot" | "mediumDashDotDot" | "slantDashDot" | "thick" | "double"; ``` ### ContractPreviewBorders [Section titled “ContractPreviewBorders”](#contractpreviewborders) ```ts interface ContractPreviewBorders { left?: ContractPreviewBorderSide | null; right?: ContractPreviewBorderSide | null; top?: ContractPreviewBorderSide | null; bottom?: ContractPreviewBorderSide | null; diagonalUp?: ContractPreviewBorderSide | null; diagonalDown?: ContractPreviewBorderSide | null; } ``` ### ContractPreviewConditionalFillKind [Section titled “ContractPreviewConditionalFillKind”](#contractpreviewconditionalfillkind) ```ts type ContractPreviewConditionalFillKind = "cellIs" | "containsText" | "colorScale"; ``` ### ContractPreviewConditionalIcon [Section titled “ContractPreviewConditionalIcon”](#contractpreviewconditionalicon) ```ts interface ContractPreviewConditionalIcon { glyph: string; color: string; label?: string | null; } ``` ### ContractPreviewFontVerticalAlign [Section titled “ContractPreviewFontVerticalAlign”](#contractpreviewfontverticalalign) ```ts type ContractPreviewFontVerticalAlign = "baseline" | "superscript" | "subscript"; ``` ### ContractPreviewFormatting [Section titled “ContractPreviewFormatting”](#contractpreviewformatting) ```ts interface ContractPreviewFormatting { fillColor?: string | null; gradientFill?: ContractPreviewGradientFill | null; patternFill?: ContractPreviewPatternFill | null; dataBar?: ContractPreviewDataBar | null; conditionalIcon?: ContractPreviewConditionalIcon | null; conditionalFillKind?: ContractPreviewConditionalFillKind | null; numberFormat?: string | null; fontColor?: string | null; fontFamily?: string | null; fontSize?: number | null; bold?: boolean; italic?: boolean; fontVerticalAlign?: ContractPreviewFontVerticalAlign | null; underlineKind?: ContractPreviewUnderlineKind | null; underline?: boolean; strike?: boolean; horizontalAlign?: ContractPreviewHorizontalAlign | null; verticalAlign?: ContractPreviewVerticalAlign | null; wrapText?: boolean; shrinkToFit?: boolean; textRotation?: number | null; indent?: number | null; borders?: ContractPreviewBorders | null; locked?: boolean | null; hidden?: boolean | null; } ``` ### ContractPreviewGradientFill [Section titled “ContractPreviewGradientFill”](#contractpreviewgradientfill) ```ts interface ContractPreviewGradientFill { degree?: number | null; stops: ContractPreviewGradientStop[]; } ``` ### ContractPreviewPatternFill [Section titled “ContractPreviewPatternFill”](#contractpreviewpatternfill) ```ts interface ContractPreviewPatternFill { kind: ContractPreviewPatternFillKind; fgColor?: string | null; bgColor?: string | null; } ``` ### ContractPreviewPatternFillKind [Section titled “ContractPreviewPatternFillKind”](#contractpreviewpatternfillkind) ```ts type ContractPreviewPatternFillKind = | "solid" | "darkGray" | "mediumGray" | "lightGray" | "gray125" | "gray0625" | "darkHorizontal" | "darkVertical" | "darkDown" | "darkUp" | "darkGrid" | "darkTrellis" | "lightHorizontal" | "lightVertical" | "lightDown" | "lightUp" | "lightGrid" | "lightTrellis"; ``` ### ContractRangeFilterColumnCriteria [Section titled “ContractRangeFilterColumnCriteria”](#contractrangefiltercolumncriteria) ```ts type ContractRangeFilterColumnCriteria = { column: number; } & ContractRangeFilterPredicate; ``` ### ContractRowHeight [Section titled “ContractRowHeight”](#contractrowheight) ```ts interface ContractRowHeight { row: number; height: number; } ``` ### ContractTableColumnMetadata [Section titled “ContractTableColumnMetadata”](#contracttablecolumnmetadata) ```ts interface ContractTableColumnMetadata { id: number | null; name: string; dataRange?: string | null; calculatedColumnFormula?: string | null; totalsRowFunction?: string | null; totalsRowFormula?: string | null; } ``` ### ContractTableStyleDefinition [Section titled “ContractTableStyleDefinition”](#contracttablestyledefinition) ```ts interface ContractTableStyleDefinition { identity: string; name: string; builtIn: boolean; category: "light" | "medium" | "dark" | "custom" | string; displayOrder: number; isDefault: boolean; supported: boolean; opaque: boolean; editable: boolean; deletable: boolean; duplicable: boolean; appliedTableCount: number; elements: ContractTableStyleElementDefinition[]; rawXmlDigest: string; } ``` ### ContractTableStyleElementDefinition [Section titled “ContractTableStyleElementDefinition”](#contracttablestyleelementdefinition) ```ts interface ContractTableStyleElementDefinition { elementType: string; stripeSize?: number | null; dxfId?: number | null; formatting?: ContractCellStyleFormatting | null; opaque: boolean; rawXmlDigest: string; } ``` ### ContractTableStyleMutation [Section titled “ContractTableStyleMutation”](#contracttablestylemutation) ```ts type ContractTableStyleMutation = | { kind: "create"; draftIdentity: string; name: string; basedOnIdentity?: string | null; elements?: ContractTableStyleElementDefinition[] } | { kind: "modify"; identity: string; name: string; elements: ContractTableStyleElementDefinition[]; expectedRawXmlDigest: string } | { kind: "duplicate"; identity: string; draftIdentity: string; name: string } | { kind: "delete"; identity: string; expectedRawXmlDigest: string } | { kind: "setDefault"; identity: string }; ``` ### ContractTableStyleOptions [Section titled “ContractTableStyleOptions”](#contracttablestyleoptions) ```ts interface ContractTableStyleOptions { showHeaderRow: boolean; showTotalRow: boolean; showFirstColumn: boolean; showLastColumn: boolean; showRowStripes: boolean; showColumnStripes: boolean; } ``` ### ContractTableStylesManagerAction [Section titled “ContractTableStylesManagerAction”](#contracttablestylesmanageraction) ```ts type ContractTableStylesManagerAction = | { action: "inspect"; tableStableId?: string | null } | { action: "commit"; mutations: ContractTableStyleMutation[]; expectedOpaqueStyleIdentities?: string[] } | { action: "applyStyle"; tableStableId: string; identity: string; options: ContractTableStyleOptions }; ``` ### ContractTableStylesManagerAuthority [Section titled “ContractTableStylesManagerAuthority”](#contracttablestylesmanagerauthority) ```ts interface ContractTableStylesManagerAuthority { canApply: boolean; readOnly: boolean; protected: boolean; sourceKindLive: boolean; tableMissing: boolean; refusalCode?: string | null; } ``` ### ContractTableTotalColumn [Section titled “ContractTableTotalColumn”](#contracttabletotalcolumn) ```ts interface ContractTableTotalColumn { columnName: string; function?: string | null; formula?: string | null; label?: string | null; } ``` ### ContractTextToColumnsAdvancedOptions [Section titled “ContractTextToColumnsAdvancedOptions”](#contracttexttocolumnsadvancedoptions) ```ts interface ContractTextToColumnsAdvancedOptions { decimalSeparator?: string | null; thousandsSeparator?: string | null; } ``` ### ContractTextToColumnsColumnFormat [Section titled “ContractTextToColumnsColumnFormat”](#contracttexttocolumnscolumnformat) ```ts type ContractTextToColumnsColumnFormat = "general" | "text" | "skip" | "date_mdy" | "date_dmy" | "date_ymd"; ``` ### ContractXlsxCellFormatPatch [Section titled “ContractXlsxCellFormatPatch”](#contractxlsxcellformatpatch) ```ts interface ContractXlsxCellFormatPatch { activeSheetPath: string; cellRef: string; fillColor?: string | null; patternFill?: ContractPreviewPatternFill | null; fontColor?: string | null; fontFamily?: string | null; fontSize?: number | null; numberFormat?: string | null; bold?: boolean | null; italic?: boolean | null; fontVerticalAlign?: ContractPreviewFontVerticalAlign | null; underline?: boolean | null; strike?: boolean | null; horizontalAlign?: string | null; verticalAlign?: string | null; wrapText?: boolean | null; shrinkToFit?: boolean | null; locked?: boolean | null; hidden?: boolean | null; borders?: ContractPreviewBorders | null; textRotation?: number | null; borderPreset?: string | null; diagonalUp?: boolean | null; diagonalDown?: boolean | null; } ``` ### ContractXlsxColumnOutlineGroupPatch [Section titled “ContractXlsxColumnOutlineGroupPatch”](#contractxlsxcolumnoutlinegrouppatch) ```ts interface ContractXlsxColumnOutlineGroupPatch { activeSheetPath: string; colStart: number; colEnd: number; outlineLevel?: number | null; hidden?: boolean | null; } ``` ### ContractXlsxColumnOutlineRangePatch [Section titled “ContractXlsxColumnOutlineRangePatch”](#contractxlsxcolumnoutlinerangepatch) ```ts interface ContractXlsxColumnOutlineRangePatch { activeSheetPath: string; colStart: number; colEnd: number; outlineLevel?: number | null; hidden?: boolean | null; summaryBelow?: boolean | null; summaryRight?: boolean | null; } ``` ### ContractXlsxColumnOutlineUngroupPatch [Section titled “ContractXlsxColumnOutlineUngroupPatch”](#contractxlsxcolumnoutlineungrouppatch) ```ts interface ContractXlsxColumnOutlineUngroupPatch { activeSheetPath: string; colStart: number; colEnd: number; } ``` ### ContractXlsxDelimitedColumnRulePatch [Section titled “ContractXlsxDelimitedColumnRulePatch”](#contractxlsxdelimitedcolumnrulepatch) ```ts interface ContractXlsxDelimitedColumnRulePatch { sourceIndex: number; type: "auto" | "general" | "text" | "date" | "skip"; dateOrder?: "mdy" | "dmy" | "ymd" | null; } ``` ### ContractXlsxRowOutlineGroupPatch [Section titled “ContractXlsxRowOutlineGroupPatch”](#contractxlsxrowoutlinegrouppatch) ```ts interface ContractXlsxRowOutlineGroupPatch { activeSheetPath: string; rowStart: number; rowEnd: number; outlineLevel?: number | null; hidden?: boolean | null; } ``` ### ContractXlsxRowOutlineRangePatch [Section titled “ContractXlsxRowOutlineRangePatch”](#contractxlsxrowoutlinerangepatch) ```ts interface ContractXlsxRowOutlineRangePatch { activeSheetPath: string; rowStart: number; rowEnd: number; outlineLevel?: number | null; hidden?: boolean | null; summaryBelow?: boolean | null; summaryRight?: boolean | null; } ``` ### ContractXlsxRowOutlineUngroupPatch [Section titled “ContractXlsxRowOutlineUngroupPatch”](#contractxlsxrowoutlineungrouppatch) ```ts interface ContractXlsxRowOutlineUngroupPatch { activeSheetPath: string; rowStart: number; rowEnd: number; } ``` ### FlashFillCandidateView [Section titled “FlashFillCandidateView”](#flashfillcandidateview) ```ts interface FlashFillCandidateView { id: string; label: string; pattern: Record } ``` ### FlashFillExample [Section titled “FlashFillExample”](#flashfillexample) ```ts interface FlashFillExample { sources: FlashFillValue[]; output: FlashFillValue } ``` ### FlashFillInference [Section titled “FlashFillInference”](#flashfillinference) ```ts interface FlashFillInference { candidates: FlashFillCandidateView[]; selectedCandidateId?: string | null; ambiguous: boolean; previews: FlashFillPreviewCell[]; deterministicHash: string; } ``` ### FlashFillMode [Section titled “FlashFillMode”](#flashfillmode) ```ts type FlashFillMode = "infer" | "preview" | "apply"; ``` ### FlashFillPreviewCell [Section titled “FlashFillPreviewCell”](#flashfillpreviewcell) ```ts interface FlashFillPreviewCell { sheetKey: string; row: number; col: number; value: FlashFillValue; skipped: boolean; } ``` ### FlashFillRefusalContext [Section titled “FlashFillRefusalContext”](#flashfillrefusalcontext) ```ts interface FlashFillRefusalContext { readOnly?: boolean; protected?: boolean; tableBoundary?: boolean; spill?: boolean; merged?: boolean; cancelled?: boolean; } ``` ### FlashFillTargetRow [Section titled “FlashFillTargetRow”](#flashfilltargetrow) ```ts interface FlashFillTargetRow { sheetKey: string; row: number; col: number; sources: FlashFillValue[]; targetHasFormula?: boolean; targetIsNonblank?: boolean; filteredOut?: boolean; } ``` ### FlashFillValue [Section titled “FlashFillValue”](#flashfillvalue) ```ts interface FlashFillValue { kind: FlashFillValueKind; text: string } ``` ### FlashFillValueKind [Section titled “FlashFillValueKind”](#flashfillvaluekind) ```ts type FlashFillValueKind = | "blank" | "empty-string" | "text" | "number" | "date" | "time" | "error" | "formula"; ``` ### MWireTableRowType [Section titled “MWireTableRowType”](#mwiretablerowtype) ```ts interface MWireTableRowType { columns: MWireTypeField[]; } ``` ### SortRangeRowsDirection [Section titled “SortRangeRowsDirection”](#sortrangerowsdirection) ```ts type SortRangeRowsDirection = "ascending" | "descending"; ``` ### SortRangeRowsLevel [Section titled “SortRangeRowsLevel”](#sortrangerowslevel) ```ts interface SortRangeRowsLevel { col: number; direction: SortRangeRowsDirection; customOrder?: string[]; } ``` ### SortRangeRowsNumericTextMode [Section titled “SortRangeRowsNumericTextMode”](#sortrangerowsnumerictextmode) ```ts type SortRangeRowsNumericTextMode = "as_text" | "as_number"; ``` # Types: formulas and calculation > Compute Contract type definitions — recalculation, dependencies, auditing, names, and what-if analysis. Names: 69. Definitions of the names from the “TypeScript type” column on the operation pages. Other dictionary topics: [session, workbook, and sheets](/reference/sumsheet/types-session/) · [cells and ranges](/reference/sumsheet/types-cells/) · **formulas and calculation** · [formatting](/reference/sumsheet/types-format/) · [data and sheet objects](/reference/sumsheet/types-data/) · [pivot tables](/reference/sumsheet/types-pivot/) · [charts and graphics](/reference/sumsheet/types-charts/) · [printing and page layout](/reference/sumsheet/types-print/) · [Power Query](/reference/sumsheet/types-powerquery/) · [VBA and macros](/reference/sumsheet/types-vba/) · [protection and review](/reference/sumsheet/types-protection/) · [general and utility](/reference/sumsheet/types-common/). Types on this page — 69 * [`ContractArrayFormulaTrustMetadata`](#contractarrayformulatrustmetadata) * [`ContractCalcChainTrustMetadata`](#contractcalcchaintrustmetadata) * [`ContractCalculationCommandState`](#contractcalculationcommandstate) * [`ContractCalculationCommandStates`](#contractcalculationcommandstates) * [`ContractCalculationDataTablePolicy`](#contractcalculationdatatablepolicy) * [`ContractCalculationOptionsHistoryAction`](#contractcalculationoptionshistoryaction) * [`ContractCalculationPolicySnapshot`](#contractcalculationpolicysnapshot) * [`ContractCalculationPropertiesSnapshot`](#contractcalculationpropertiessnapshot) * [`ContractCalculationScope`](#contractcalculationscope) * [`ContractCalculationStatus`](#contractcalculationstatus) * [`ContractCalculationTrust`](#contractcalculationtrust) * [`ContractCalculationTrustState`](#contractcalculationtruststate) * [`ContractDataCleanupAudit`](#contractdatacleanupaudit) * [`ContractDefinedNameKind`](#contractdefinednamekind) * [`ContractDefinedNameReferenceBase`](#contractdefinednamereferencebase) * [`ContractDefinedNameScope`](#contractdefinednamescope) * [`ContractDefinedNameSelectionEdges`](#contractdefinednameselectionedges) * [`ContractDefinedNameTrustMetadata`](#contractdefinednametrustmetadata) * [`ContractDefinedNameValue`](#contractdefinednamevalue) * [`ContractDefinedNameView`](#contractdefinednameview) * [`ContractDefinedNamesIntent`](#contractdefinednamesintent) * [`ContractDefinedNamesResult`](#contractdefinednamesresult) * [`ContractDependencyGraphSnapshot`](#contractdependencygraphsnapshot) * [`ContractFormatNonGoal`](#contractformatnongoal) * [`ContractFormulaAuditActions`](#contractformulaauditactions) * [`ContractFormulaAuditCellProjection`](#contractformulaauditcellprojection) * [`ContractFormulaAuditCounts`](#contractformulaauditcounts) * [`ContractFormulaAuditFinding`](#contractformulaauditfinding) * [`ContractFormulaAuditFindingKind`](#contractformulaauditfindingkind) * [`ContractFormulaAuditFix`](#contractformulaauditfix) * [`ContractFormulaAuditFixKind`](#contractformulaauditfixkind) * [`ContractFormulaAuditOutcome`](#contractformulaauditoutcome) * [`ContractFormulaAuditWatchAction`](#contractformulaauditwatchaction) * [`ContractFormulaAuditWatchRow`](#contractformulaauditwatchrow) * [`ContractFormulaAuditingStatePersistence`](#contractformulaauditingstatepersistence) * [`ContractFormulaBuilderArgument`](#contractformulabuilderargument) * [`ContractFormulaBuilderArgumentKind`](#contractformulabuilderargumentkind) * [`ContractFormulaBuilderAvailability`](#contractformulabuilderavailability) * [`ContractFormulaBuilderCatalog`](#contractformulabuildercatalog) * [`ContractFormulaBuilderFunction`](#contractformulabuilderfunction) * [`ContractFormulaCachedValueFreshness`](#contractformulacachedvaluefreshness) * [`ContractFormulaEvaluationAction`](#contractformulaevaluationaction) * [`ContractFormulaEvaluationActions`](#contractformulaevaluationactions) * [`ContractFormulaEvaluationDiagnostic`](#contractformulaevaluationdiagnostic) * [`ContractFormulaEvaluationOutcome`](#contractformulaevaluationoutcome) * [`ContractFormulaEvaluationSourceSpan`](#contractformulaevaluationsourcespan) * [`ContractFormulaEvaluationStackFrame`](#contractformulaevaluationstackframe) * [`ContractFormulaEvaluationStep`](#contractformulaevaluationstep) * [`ContractFormulaEvaluationTrust`](#contractformulaevaluationtrust) * [`ContractFormulaEvaluationValue`](#contractformulaevaluationvalue) * [`ContractFormulaTraceDirection`](#contractformulatracedirection) * [`ContractFormulaTraceEdge`](#contractformulatraceedge) * [`ContractFormulaTraceEdgeStatus`](#contractformulatraceedgestatus) * [`ContractFormulaTrustCell`](#contractformulatrustcell) * [`ContractFormulaTrustSnapshot`](#contractformulatrustsnapshot) * [`ContractFormulaTrustTotals`](#contractformulatrusttotals) * [`ContractIterativeCalculationOutcome`](#contractiterativecalculationoutcome) * [`ContractIterativeCalculationSettings`](#contractiterativecalculationsettings) * [`ContractIterativeCalculationStatus`](#contractiterativecalculationstatus) * [`ContractSharedFormulaTrustMetadata`](#contractsharedformulatrustmetadata) * [`ContractTrustCenterAuditCategory`](#contracttrustcenterauditcategory) * [`ContractTrustCenterAuditEntry`](#contracttrustcenterauditentry) * [`ContractWhatIfScenarioInput`](#contractwhatifscenarioinput) * [`ContractWhatIfScenarioView`](#contractwhatifscenarioview) * [`ContractXlsxDefinedNameDeletePatch`](#contractxlsxdefinednamedeletepatch) * [`ContractXlsxDefinedNamePatch`](#contractxlsxdefinednamepatch) * [`ContractXlsxDefinedNameScope`](#contractxlsxdefinednamescope) * [`ContractXlsxDefinedNameValueKind`](#contractxlsxdefinednamevaluekind) * [`MWireTypeName`](#mwiretypename) ### ContractArrayFormulaTrustMetadata [Section titled “ContractArrayFormulaTrustMetadata”](#contractarrayformulatrustmetadata) ```ts interface ContractArrayFormulaTrustMetadata { kind: "legacy_array_formula" | "dynamic_array_formula" | string; role: "anchor" | "follower" | string; refRange?: string | null; formulaTextAvailable: boolean; } ``` ### ContractCalcChainTrustMetadata [Section titled “ContractCalcChainTrustMetadata”](#contractcalcchaintrustmetadata) ```ts interface ContractCalcChainTrustMetadata { order: number; cellRef: string; sheetId?: string | null; } ``` ### ContractCalculationCommandState [Section titled “ContractCalculationCommandState”](#contractcalculationcommandstate) ```ts interface ContractCalculationCommandState { enabled: boolean; active: boolean; reasonCode?: string | null; } ``` ### ContractCalculationCommandStates [Section titled “ContractCalculationCommandStates”](#contractcalculationcommandstates) ```ts interface ContractCalculationCommandStates { automatic: ContractCalculationCommandState; automaticExceptDataTables: ContractCalculationCommandState; manual: ContractCalculationCommandState; calculateNow: ContractCalculationCommandState; calculateSheet: ContractCalculationCommandState; } ``` ### ContractCalculationDataTablePolicy [Section titled “ContractCalculationDataTablePolicy”](#contractcalculationdatatablepolicy) ```ts type ContractCalculationDataTablePolicy = "excluded_unsupported"; ``` ### ContractCalculationOptionsHistoryAction [Section titled “ContractCalculationOptionsHistoryAction”](#contractcalculationoptionshistoryaction) ```ts type ContractCalculationOptionsHistoryAction = "set" | "undo" | "redo"; ``` ### ContractCalculationPolicySnapshot [Section titled “ContractCalculationPolicySnapshot”](#contractcalculationpolicysnapshot) ```ts interface ContractCalculationPolicySnapshot { status: ContractCalculationStatus; calculationMode: ContractWorkbookCalculationMode; dataTablePolicy: ContractCalculationDataTablePolicy; recalcNeeded: boolean; supportedFormulaCount: number; dirtyFormulaCount: number; staleCachedFormulaCount: number; unsupportedFormulaCount: number; commandStates: ContractCalculationCommandStates; note: string; } ``` ### ContractCalculationPropertiesSnapshot [Section titled “ContractCalculationPropertiesSnapshot”](#contractcalculationpropertiessnapshot) ```ts interface ContractCalculationPropertiesSnapshot { calculationMode: ContractWorkbookCalculationMode; recalculateBeforeSave?: boolean | null; fullCalculationOnLoad?: boolean | null; forceFullCalculation?: boolean | null; iterativeSettings: ContractIterativeCalculationSettings; calculationId?: number | null; calculationCompleted?: boolean | null; fullPrecision?: boolean | null; } ``` ### ContractCalculationScope [Section titled “ContractCalculationScope”](#contractcalculationscope) ```ts type ContractCalculationScope = { kind: "workbook" } | { kind: "sheet"; sheetKey: string }; ``` ### ContractCalculationStatus [Section titled “ContractCalculationStatus”](#contractcalculationstatus) ```ts type ContractCalculationStatus = "clean" | "dirty" | "calculating" | "canceled" | "blocked" | "unsupported"; ``` ### ContractCalculationTrust [Section titled “ContractCalculationTrust”](#contractcalculationtrust) ```ts interface ContractCalculationTrust { state: ContractCalculationTrustState; formulaText: string; cachedDisplayValue: string | null; workbookCalcMode: ContractWorkbookCalculationMode; cachedValueFreshness: ContractFormulaCachedValueFreshness; recalcRequiredReasons: ContractRecalcRequiredReason[]; directPrecedentKeys: string[]; unsupportedReferences: string[]; spillObstructionKind?: | "occupied_cell" | "out_of_bounds" | "merged_range" | "table" | "protected_cell" | string | null; spillObstructionCellKey?: string | null; spillObstructionDetail?: string | null; structuredReferences?: ContractStructuredReferenceTrustMetadata[]; externalReferences?: Array< | ContractExternalWorkbookReferenceTrustMetadata | ContractExternalReferenceTrustMetadata >; note: string; } ``` ### ContractCalculationTrustState [Section titled “ContractCalculationTrustState”](#contractcalculationtruststate) ```ts type ContractCalculationTrustState = | "live_calculated" | "imported_cached" | "dirty_recalc_needed" | "stale_cache_recalc_required" | "unsupported_function" | "unsupported_reference_shape" | "unsupported_shared_formula_shape" | "unsupported_array_shape" | "unsupported_dynamic_array_shape" | "unsupported_defined_name_shape" | "unsupported_structured_ref_shape" | "unsupported_shape" | "depends_on_unsupported" | "volatile_boundary" | "external_cached_unresolved" | "external_link_missing" | "external_link_blocked" | "external_ref_unsupported_shape" | "external_ref_cached_stale" | "depends_on_external_unresolved"; ``` ### ContractDataCleanupAudit [Section titled “ContractDataCleanupAudit”](#contractdatacleanupaudit) ```ts interface ContractDataCleanupAudit { schemaVersion: 1; operationKind: "text_to_columns" | "remove_duplicates" | "remove_duplicates_copy"; mutationMode: "in_place" | "copy_output"; sourceRange: CellRange; outputRange: CellRange; sourceRowCount: number; sourceColCount: number; resultRowCount: number; resultColCount: number; duplicateCount: number; remainingCount: number; headerRowCount: number; totalsRowCount: number; plannedChangeCount: number; duplicateRowSpans: ContractDataCleanupRowSpan[]; cellPayloadPolicy: string; coordinateArtifactPolicy: string; } ``` ### ContractDefinedNameKind [Section titled “ContractDefinedNameKind”](#contractdefinednamekind) ```ts type ContractDefinedNameKind = "range" | "constant" | "formula" | "lambda" | "invalid"; ``` ### ContractDefinedNameReferenceBase [Section titled “ContractDefinedNameReferenceBase”](#contractdefinednamereferencebase) ```ts interface ContractDefinedNameReferenceBase { sheetKey: string; row: number; col: number; } ``` ### ContractDefinedNameScope [Section titled “ContractDefinedNameScope”](#contractdefinednamescope) ```ts type ContractDefinedNameScope = "workbook" | "sheet"; ``` ### ContractDefinedNameSelectionEdges [Section titled “ContractDefinedNameSelectionEdges”](#contractdefinednameselectionedges) ```ts interface ContractDefinedNameSelectionEdges { top?: boolean; left?: boolean; bottom?: boolean; right?: boolean; } ``` ### ContractDefinedNameTrustMetadata [Section titled “ContractDefinedNameTrustMetadata”](#contractdefinednametrustmetadata) ```ts interface ContractDefinedNameTrustMetadata { name: string; scope: string; shape: string; targetSheetKey?: string | null; targetRange?: string | null; resolutionState: string; } ``` ### ContractDefinedNameValue [Section titled “ContractDefinedNameValue”](#contractdefinednamevalue) ```ts interface ContractDefinedNameValue { name: string; scope: string; ownerSheetKey?: string | null; value: string; ok: boolean; error?: string | null; } ``` ### ContractDefinedNameView [Section titled “ContractDefinedNameView”](#contractdefinednameview) ```ts interface ContractDefinedNameView { identity: string; name: string; scope: ContractDefinedNameScope; localSheetId?: number | null; scopeSheetKey?: string | null; scopeSheetName?: string | null; refersTo: string; comment?: string | null; kind: ContractDefinedNameKind; hidden: boolean; editable: boolean; editBlockReason?: string | null; resolvedRange?: CellRange | null; resolvedValue?: string | null; valueError?: string | null; visibleOnActiveSheet: boolean; shadowedOnActiveSheet: boolean; } ``` ### ContractDefinedNamesIntent [Section titled “ContractDefinedNamesIntent”](#contractdefinednamesintent) ```ts type ContractDefinedNamesIntent = | { action: "list"; activeSheetKey?: string | null } | ({ action: "create"; name: string; refersTo: string; relativeTo?: ContractDefinedNameReferenceBase | null; scope: ContractDefinedNameScope; scopeSheetKey?: string | null; comment?: string | null; } & DefinedNamesMutationGuard) | ({ action: "update"; previousName: string; previousScope: ContractDefinedNameScope; previousScopeSheetKey?: string | null; name: string; refersTo: string; relativeTo?: ContractDefinedNameReferenceBase | null; scope: ContractDefinedNameScope; scopeSheetKey?: string | null; comment?: string | null; } & DefinedNamesMutationGuard) | ({ action: "delete"; name: string; scope: ContractDefinedNameScope; scopeSheetKey?: string | null; } & DefinedNamesMutationGuard) | ({ action: "create_from_selection"; selection: CellRange; edges: ContractDefinedNameSelectionEdges; scope: ContractDefinedNameScope; } & DefinedNamesMutationGuard) | ({ action: "define_selection"; name: string; selection: CellRange; scope: ContractDefinedNameScope; } & DefinedNamesMutationGuard) | ({ action: "undo" } & DefinedNamesMutationGuard) | ({ action: "redo" } & DefinedNamesMutationGuard); ``` ### ContractDefinedNamesResult [Section titled “ContractDefinedNamesResult”](#contractdefinednamesresult) ```ts interface ContractDefinedNamesResult { status: | "listed" | "created" | "updated" | "deleted" | "created_from_selection" | "undone" | "redone"; revision: number; entries: ContractDefinedNameView[]; undoDepth: number; redoDepth: number; mutatedCount: number; activeSheetKey?: string | null; } ``` ### ContractDependencyGraphSnapshot [Section titled “ContractDependencyGraphSnapshot”](#contractdependencygraphsnapshot) ```ts interface ContractDependencyGraphSnapshot { queryNodes: string[]; queryEdges: ContractQueryDependencyEdge[]; paramNodes: string[]; paramEdges: ContractParamEdge[]; topoOrder?: string[] | null; topoBlockedReason?: string | null; } ``` ### ContractFormatNonGoal [Section titled “ContractFormatNonGoal”](#contractformatnongoal) ```ts type ContractFormatNonGoal = (typeof CONTRACT_FORMAT_NON_GOAL_IDS)[number]; ``` ### ContractFormulaAuditActions [Section titled “ContractFormulaAuditActions”](#contractformulaauditactions) ```ts interface ContractFormulaAuditActions { ignoreError: boolean; restoreIgnored: boolean; applyFix: boolean; resetIgnored: boolean; addWatch: boolean; removeWatch: boolean; clearWatches: boolean; } ``` ### ContractFormulaAuditCellProjection [Section titled “ContractFormulaAuditCellProjection”](#contractformulaauditcellprojection) ```ts interface ContractFormulaAuditCellProjection { workbookId?: string; workbookSessionId?: string; cellKey: string; sheetKey: string; sheetName: string; sheetOrder: number; row: number; col: number; address: string; formula: string | null; formulaHidden: boolean; value: ContractFormulaEvaluationValue; valueType: string; errorCode: string | null; calculationState: ContractCalculationTrustState; workbookCalcMode: ContractWorkbookCalculationMode; cachedValueFreshness: ContractFormulaCachedValueFreshness; recalcRequiredReasons: ContractRecalcRequiredReason[]; spillRole: "owner" | "follower" | "none"; spillOwnerKey: string | null; navigationTargetKey: string; } ``` ### ContractFormulaAuditCounts [Section titled “ContractFormulaAuditCounts”](#contractformulaauditcounts) ```ts interface ContractFormulaAuditCounts { findings: number; ignored: number; watches: number; } ``` ### ContractFormulaAuditFinding [Section titled “ContractFormulaAuditFinding”](#contractformulaauditfinding) ```ts interface ContractFormulaAuditFinding { identity?: string; revision?: number; kind: ContractFormulaAuditFindingKind; ignored: boolean; nativeIgnoredFlag: string; explanationCode: string; relatedKeys: string[]; safeFix?: ContractFormulaAuditFix; cell: ContractFormulaAuditCellProjection; } ``` ### ContractFormulaAuditFindingKind [Section titled “ContractFormulaAuditFindingKind”](#contractformulaauditfindingkind) ```ts type ContractFormulaAuditFindingKind = | "div0" | "na" | "value" | "ref" | "name" | "num" | "circular_reference" | "inconsistent_formula" | "omitted_adjacent_cell" | "number_stored_as_text" | "stale_dependency" | "unsupported_formula_boundary"; ``` ### ContractFormulaAuditFix [Section titled “ContractFormulaAuditFix”](#contractformulaauditfix) ```ts interface ContractFormulaAuditFix { kind: ContractFormulaAuditFixKind; labelCode: string; replacementPreview: string; } ``` ### ContractFormulaAuditFixKind [Section titled “ContractFormulaAuditFixKind”](#contractformulaauditfixkind) ```ts type ContractFormulaAuditFixKind = | "convert_number_stored_as_text" | "copy_consistent_formula" | "extend_adjacent_range"; ``` ### ContractFormulaAuditOutcome [Section titled “ContractFormulaAuditOutcome”](#contractformulaauditoutcome) ```ts type ContractFormulaAuditOutcome = "ready" | "mutated" | "stale" | "blocked" | "unavailable"; ``` ### ContractFormulaAuditWatchAction [Section titled “ContractFormulaAuditWatchAction”](#contractformulaauditwatchaction) ```ts type ContractFormulaAuditWatchAction = | "read" | "ignore_error" | "restore_ignored" | "apply_fix" | "reset_ignored" | "add_watch" | "remove_watch" | "clear_watches"; ``` ### ContractFormulaAuditWatchRow [Section titled “ContractFormulaAuditWatchRow”](#contractformulaauditwatchrow) ```ts interface ContractFormulaAuditWatchRow { revision: number; cell: ContractFormulaAuditCellProjection; } ``` ### ContractFormulaAuditingStatePersistence [Section titled “ContractFormulaAuditingStatePersistence”](#contractformulaauditingstatepersistence) ```ts type ContractFormulaAuditingStatePersistence = "workbook_persistent" | "window_transient"; ``` ### ContractFormulaBuilderArgument [Section titled “ContractFormulaBuilderArgument”](#contractformulabuilderargument) ```ts interface ContractFormulaBuilderArgument { id: string; localizedName: string; description: string; kind: ContractFormulaBuilderArgumentKind; required: boolean; repeating: boolean; repeatGroupSize?: number; } ``` ### ContractFormulaBuilderArgumentKind [Section titled “ContractFormulaBuilderArgumentKind”](#contractformulabuilderargumentkind) ```ts type ContractFormulaBuilderArgumentKind = "scalar" | "range" | "multi-range" | "enum"; ``` ### ContractFormulaBuilderAvailability [Section titled “ContractFormulaBuilderAvailability”](#contractformulabuilderavailability) ```ts type ContractFormulaBuilderAvailability = "live" | "unsupported"; ``` ### ContractFormulaBuilderCatalog [Section titled “ContractFormulaBuilderCatalog”](#contractformulabuildercatalog) ```ts interface ContractFormulaBuilderCatalog { schemaVersion: number; locale: string; semanticOwner: "rust"; functions: ContractFormulaBuilderFunction[]; } ``` ### ContractFormulaBuilderFunction [Section titled “ContractFormulaBuilderFunction”](#contractformulabuilderfunction) ```ts interface ContractFormulaBuilderFunction { identity: string; canonicalName: string; localizedName: string; localizedDescription: string; category: string; availability: ContractFormulaBuilderAvailability; arguments: ContractFormulaBuilderArgument[]; } ``` ### ContractFormulaCachedValueFreshness [Section titled “ContractFormulaCachedValueFreshness”](#contractformulacachedvaluefreshness) ```ts type ContractFormulaCachedValueFreshness = | "live_calculated" | "imported_cached" | "dirty_recalc_needed" | "stale_cache_recalc_required" | "no_cached_value"; ``` ### ContractFormulaEvaluationAction [Section titled “ContractFormulaEvaluationAction”](#contractformulaevaluationaction) ```ts type ContractFormulaEvaluationAction = "start" | "evaluate" | "step_in" | "step_out" | "restart" | "close"; ``` ### ContractFormulaEvaluationActions [Section titled “ContractFormulaEvaluationActions”](#contractformulaevaluationactions) ```ts interface ContractFormulaEvaluationActions { evaluate: boolean; stepIn: boolean; stepOut: boolean; restart: boolean; close: boolean; } ``` ### ContractFormulaEvaluationDiagnostic [Section titled “ContractFormulaEvaluationDiagnostic”](#contractformulaevaluationdiagnostic) ```ts interface ContractFormulaEvaluationDiagnostic { kind: | "typed_error" | "circular" | "manual" | "unsupported" | "stale" | "cancelled" | string; code: string; message: string; cellKey?: string | null; sourceSpan?: ContractFormulaEvaluationSourceSpan | null; path: string[]; } ``` ### ContractFormulaEvaluationOutcome [Section titled “ContractFormulaEvaluationOutcome”](#contractformulaevaluationoutcome) ```ts type ContractFormulaEvaluationOutcome = | "ready" | "complete" | "closed" | "stale" | "manual_pending" | "circular" | "unavailable"; ``` ### ContractFormulaEvaluationSourceSpan [Section titled “ContractFormulaEvaluationSourceSpan”](#contractformulaevaluationsourcespan) ```ts interface ContractFormulaEvaluationSourceSpan { utf8ByteStart: number; utf8ByteEnd: number; utf16Start: number; utf16End: number; sourceSlice: string; } ``` ### ContractFormulaEvaluationStackFrame [Section titled “ContractFormulaEvaluationStackFrame”](#contractformulaevaluationstackframe) ```ts interface ContractFormulaEvaluationStackFrame { frameId: string; parentFrameId?: string | null; cellKey: string; formulaSource: string; callSiteSpan?: ContractFormulaEvaluationSourceSpan | null; depth: number; } ``` ### ContractFormulaEvaluationStep [Section titled “ContractFormulaEvaluationStep”](#contractformulaevaluationstep) ```ts interface ContractFormulaEvaluationStep { stepId: string; ordinal: number; parentStepId?: string | null; depth: number; sourceSpan: ContractFormulaEvaluationSourceSpan; canonicalExpression: string; substitutedExpression: string; value: ContractFormulaEvaluationValue; trust: ContractFormulaEvaluationTrust; referenceTargetKey?: string | null; } ``` ### ContractFormulaEvaluationTrust [Section titled “ContractFormulaEvaluationTrust”](#contractformulaevaluationtrust) ```ts interface ContractFormulaEvaluationTrust { calculationState: ContractCalculationTrustState | string; workbookCalculationMode: ContractWorkbookCalculationMode; cachedValueFreshness: ContractFormulaCachedValueFreshness | string; recalcRequiredReasons: string[]; volatileContextId?: string | null; cyclePath: string[]; spillRole: "owner" | "follower" | "none"; spillOwnerKey?: string | null; diagnosticOnly: boolean; } ``` ### ContractFormulaEvaluationValue [Section titled “ContractFormulaEvaluationValue”](#contractformulaevaluationvalue) ```ts type ContractFormulaEvaluationValue = | { kind: "blank"; displayText: string } | { kind: "empty_string"; displayText: string } | { kind: "number"; value: number; displayText: string } | { kind: "boolean"; value: boolean; displayText: string } | { kind: "text"; value: string; displayText: string } | { kind: "computed_text"; value: string; displayText: string } | { kind: "live_error"; code: string; displayText: string } | { kind: "imported_error"; code: string; displayText: string } | { kind: "array"; rowCount: number; colCount: number; values: ContractFormulaEvaluationValue[]; displayText: string; } | { kind: "unavailable"; reason: string; displayText: string }; ``` ### ContractFormulaTraceDirection [Section titled “ContractFormulaTraceDirection”](#contractformulatracedirection) ```ts type ContractFormulaTraceDirection = "precedent" | "dependent"; ``` ### ContractFormulaTraceEdge [Section titled “ContractFormulaTraceEdge”](#contractformulatraceedge) ```ts interface ContractFormulaTraceEdge { edgeId: string; direction: ContractFormulaTraceDirection; depth: number; sourceKey: string; targetKey: string; status: ContractFormulaTraceEdgeStatus; crossSheet: boolean; referenceText?: string | null; } ``` ### ContractFormulaTraceEdgeStatus [Section titled “ContractFormulaTraceEdgeStatus”](#contractformulatraceedgestatus) ```ts type ContractFormulaTraceEdgeStatus = | "resolved" | "cycle" | "missing_or_deleted_reference" | "unsupported_boundary"; ``` ### ContractFormulaTrustCell [Section titled “ContractFormulaTrustCell”](#contractformulatrustcell) ```ts interface ContractFormulaTrustCell { cellKey: string; sheetKey: string; row: number; col: number; rawFormula: string; cachedValue?: string | null; publishedResultType?: "blank" | "emptyString" | "number" | "logical" | "text" | "error" | null; supportedStatus: FormulaSubsetStatus; unsupportedReason?: string | null; spillObstructionKind?: | "occupied_cell" | "out_of_bounds" | "merged_range" | "table" | "protected_cell" | string | null; spillObstructionCellKey?: string | null; spillObstructionDetail?: string | null; referenceShapes: string[]; sharedFormula?: ContractSharedFormulaTrustMetadata | null; calcChain?: ContractCalcChainTrustMetadata | null; arrayFormula?: ContractArrayFormulaTrustMetadata | null; arrayDynamicShapes: string[]; definedNames: ContractDefinedNameTrustMetadata[]; structuredReferences: ContractStructuredReferenceTrustMetadata[]; externalReferences: ContractExternalWorkbookReferenceTrustMetadata[]; directDependenciesWhenKnown: string[]; directDependenciesTruncated?: boolean; calculationState: ContractCalculationTrustState; workbookCalcMode: ContractWorkbookCalculationMode; cachedValueFreshness: ContractFormulaCachedValueFreshness; recalcRequiredReasons: ContractRecalcRequiredReason[]; } ``` ### ContractFormulaTrustSnapshot [Section titled “ContractFormulaTrustSnapshot”](#contractformulatrustsnapshot) ```ts interface ContractFormulaTrustSnapshot { scope: string; supportedSubset: string; workbookCalcMode: ContractWorkbookCalculationMode; workbookCalcOnSave?: boolean | null; iterativeCalculationEnabled: boolean; iterativeCalculationMaximumIterations: number; iterativeCalculationMaximumChange: string; iterativeCalculationOutcomes: ContractIterativeCalculationOutcome[]; parallelRecalc: ContractParallelRecalcInstrumentation; calculationPolicy: ContractCalculationPolicySnapshot; formulaCellsWindow?: ContractFormulaTrustCellsWindow | null; formulaCellTotals?: ContractFormulaTrustTotals | null; formulaCells: ContractFormulaTrustCell[]; } ``` ### ContractFormulaTrustTotals [Section titled “ContractFormulaTrustTotals”](#contractformulatrusttotals) ```ts interface ContractFormulaTrustTotals { formulaCellCount: number; supportedFormulaCellCount: number; referenceValuedFormulaCellCount: number; } ``` ### ContractIterativeCalculationOutcome [Section titled “ContractIterativeCalculationOutcome”](#contractiterativecalculationoutcome) ```ts interface ContractIterativeCalculationOutcome { cellKeys: string[]; status: ContractIterativeCalculationStatus; iterations: number; maximumIterations: number; maximumChange: string; lastMaximumChange: string; errorCode?: string | null; } ``` ### ContractIterativeCalculationSettings [Section titled “ContractIterativeCalculationSettings”](#contractiterativecalculationsettings) ```ts interface ContractIterativeCalculationSettings { enabled: boolean; maximumIterations: number; maximumChange: number; } ``` ### ContractIterativeCalculationStatus [Section titled “ContractIterativeCalculationStatus”](#contractiterativecalculationstatus) ```ts type ContractIterativeCalculationStatus = "converged" | "non_converged" | "iteration_disabled" | "unsupported"; ``` ### ContractSharedFormulaTrustMetadata [Section titled “ContractSharedFormulaTrustMetadata”](#contractsharedformulatrustmetadata) ```ts interface ContractSharedFormulaTrustMetadata { role: string; sharedIndex: string; anchorCellKey?: string | null; refRange?: string | null; expandedFromAnchor: boolean; formulaTextAvailable: boolean; } ``` ### ContractTrustCenterAuditCategory [Section titled “ContractTrustCenterAuditCategory”](#contracttrustcenterauditcategory) ```ts type ContractTrustCenterAuditCategory = | "source_trust" | "macros" | "external_links" | "data_connections" | "trusted_locations" | "protected_files"; ``` ### ContractTrustCenterAuditEntry [Section titled “ContractTrustCenterAuditEntry”](#contracttrustcenterauditentry) ```ts interface ContractTrustCenterAuditEntry { schemaVersion: 1; category: ContractTrustCenterAuditCategory; action: ContractSourceTrustAction; allowed: boolean; reasonCode: ContractSourceTrustReason; policyState: ContractTrustCenterPolicyState; trustStoreRevision: number; trustStoreHash: string; } ``` ### ContractWhatIfScenarioInput [Section titled “ContractWhatIfScenarioInput”](#contractwhatifscenarioinput) ```ts interface ContractWhatIfScenarioInput { cell: ContractWhatIfCellRef; value: ContractWhatIfValue; } ``` ### ContractWhatIfScenarioView [Section titled “ContractWhatIfScenarioView”](#contractwhatifscenarioview) ```ts interface ContractWhatIfScenarioView { stableId: string; name: string; comment?: string | null; locked: boolean; hidden: boolean; permissions: { readable: boolean; showable: boolean; editable: boolean; deletable: boolean; }; inputs: ContractWhatIfScenarioInput[]; } ``` ### ContractXlsxDefinedNameDeletePatch [Section titled “ContractXlsxDefinedNameDeletePatch”](#contractxlsxdefinednamedeletepatch) ```ts interface ContractXlsxDefinedNameDeletePatch { name: string; scope?: ContractXlsxDefinedNameScope | null; activeSheetPath?: string | null; scopeSheetPath?: string | null; localSheetId?: number | null; } ``` ### ContractXlsxDefinedNamePatch [Section titled “ContractXlsxDefinedNamePatch”](#contractxlsxdefinednamepatch) ```ts interface ContractXlsxDefinedNamePatch { name: string; activeSheetPath: string; ref?: string | null; refersTo?: string | null; scope?: ContractXlsxDefinedNameScope | null; scopeSheetPath?: string | null; scopeSheetName?: string | null; localSheetId?: number | null; valueKind?: ContractXlsxDefinedNameValueKind | null; comment?: string | null; } ``` ### ContractXlsxDefinedNameScope [Section titled “ContractXlsxDefinedNameScope”](#contractxlsxdefinednamescope) ```ts type ContractXlsxDefinedNameScope = "workbook" | "sheet"; ``` ### ContractXlsxDefinedNameValueKind [Section titled “ContractXlsxDefinedNameValueKind”](#contractxlsxdefinednamevaluekind) ```ts type ContractXlsxDefinedNameValueKind = "range" | "number" | "text" | "formula" | "logical" | "date" | "error"; ``` ### MWireTypeName [Section titled “MWireTypeName”](#mwiretypename) ```ts type MWireTypeName = | "any" | "null" | "logical" | "number" | "text" | "date" | "integer" | "datetime" | "datetimezone" | "time" | "duration" | "binary" | "list" | "record" | "table" | "function" | "type"; ``` # Types: pivot tables > Compute Contract type definitions — cache, fields, layout, grouping, and value settings. Names: 125. Definitions of the names from the “TypeScript type” column on the operation pages. Other dictionary topics: [session, workbook, and sheets](/reference/sumsheet/types-session/) · [cells and ranges](/reference/sumsheet/types-cells/) · [formulas and calculation](/reference/sumsheet/types-formulas/) · [formatting](/reference/sumsheet/types-format/) · [data and sheet objects](/reference/sumsheet/types-data/) · **pivot tables** · [charts and graphics](/reference/sumsheet/types-charts/) · [printing and page layout](/reference/sumsheet/types-print/) · [Power Query](/reference/sumsheet/types-powerquery/) · [VBA and macros](/reference/sumsheet/types-vba/) · [protection and review](/reference/sumsheet/types-protection/) · [general and utility](/reference/sumsheet/types-common/). Types on this page — 125 * [`ContractPivotCacheOptionsAction`](#contractpivotcacheoptionsaction) * [`ContractPivotCacheOptionsSettings`](#contractpivotcacheoptionssettings) * [`ContractPivotCacheOptionsView`](#contractpivotcacheoptionsview) * [`ContractPivotCacheSource`](#contractpivotcachesource) * [`ContractPivotCalculatedCacheView`](#contractpivotcalculatedcacheview) * [`ContractPivotCalculatedFieldView`](#contractpivotcalculatedfieldview) * [`ContractPivotCalculatedFieldsAction`](#contractpivotcalculatedfieldsaction) * [`ContractPivotCalculatedItemAxis`](#contractpivotcalculateditemaxis) * [`ContractPivotCalculatedItemFieldView`](#contractpivotcalculateditemfieldview) * [`ContractPivotCalculatedItemView`](#contractpivotcalculateditemview) * [`ContractPivotCalculatedItemsAction`](#contractpivotcalculateditemsaction) * [`ContractPivotCalculatedSourceFieldView`](#contractpivotcalculatedsourcefieldview) * [`ContractPivotCalculatedSummaryFunction`](#contractpivotcalculatedsummaryfunction) * [`ContractPivotCalculationMoveDirection`](#contractpivotcalculationmovedirection) * [`ContractPivotConditionalArea`](#contractpivotconditionalarea) * [`ContractPivotConditionalCellIdentity`](#contractpivotconditionalcellidentity) * [`ContractPivotConditionalItemIdentity`](#contractpivotconditionalitemidentity) * [`ContractPivotConditionalRuleScope`](#contractpivotconditionalrulescope) * [`ContractPivotConditionalScope`](#contractpivotconditionalscope) * [`ContractPivotConnectionPropertiesView`](#contractpivotconnectionpropertiesview) * [`ContractPivotConnectionPropertyView`](#contractpivotconnectionpropertyview) * [`ContractPivotConsolidationPageFieldMode`](#contractpivotconsolidationpagefieldmode) * [`ContractPivotConsolidationRangeInput`](#contractpivotconsolidationrangeinput) * [`ContractPivotConsolidationRangeView`](#contractpivotconsolidationrangeview) * [`ContractPivotCopyCacheOwnership`](#contractpivotcopycacheownership) * [`ContractPivotDataModelOlapInventory`](#contractpivotdatamodelolapinventory) * [`ContractPivotDataModelOlapReadonlyAction`](#contractpivotdatamodelolapreadonlyaction) * [`ContractPivotDateGroupPeriod`](#contractpivotdategroupperiod) * [`ContractPivotDeletedItemsRetention`](#contractpivotdeleteditemsretention) * [`ContractPivotDetailCellRef`](#contractpivotdetailcellref) * [`ContractPivotDetailContextView`](#contractpivotdetailcontextview) * [`ContractPivotDetailLineageView`](#contractpivotdetaillineageview) * [`ContractPivotExpandedItemView`](#contractpivotexpandeditemview) * [`ContractPivotFieldAggregation`](#contractpivotfieldaggregation) * [`ContractPivotFieldArea`](#contractpivotfieldarea) * [`ContractPivotFieldListAuthoringAction`](#contractpivotfieldlistauthoringaction) * [`ContractPivotFieldListFieldView`](#contractpivotfieldlistfieldview) * [`ContractPivotFieldListView`](#contractpivotfieldlistview) * [`ContractPivotFieldMutation`](#contractpivotfieldmutation) * [`ContractPivotFilter`](#contractpivotfilter) * [`ContractPivotFilterConnectionView`](#contractpivotfilterconnectionview) * [`ContractPivotFilterOperator`](#contractpivotfilteroperator) * [`ContractPivotGetPivotDataView`](#contractpivotgetpivotdataview) * [`ContractPivotGroupView`](#contractpivotgroupview) * [`ContractPivotGroupingCacheView`](#contractpivotgroupingcacheview) * [`ContractPivotGroupingDrilldownAction`](#contractpivotgroupingdrilldownaction) * [`ContractPivotGroupingItemKey`](#contractpivotgroupingitemkey) * [`ContractPivotGroupingItemView`](#contractpivotgroupingitemview) * [`ContractPivotHierarchyNodeView`](#contractpivothierarchynodeview) * [`ContractPivotLayoutFormatAction`](#contractpivotlayoutformataction) * [`ContractPivotLayoutFormatOptions`](#contractpivotlayoutformatoptions) * [`ContractPivotLayoutFormatView`](#contractpivotlayoutformatview) * [`ContractPivotMoveCopyAction`](#contractpivotmovecopyaction) * [`ContractPivotMoveCopyDestination`](#contractpivotmovecopydestination) * [`ContractPivotMoveCopySheetView`](#contractpivotmovecopysheetview) * [`ContractPivotMoveCopyView`](#contractpivotmovecopyview) * [`ContractPivotMultipleConsolidationView`](#contractpivotmultipleconsolidationview) * [`ContractPivotPageBreakAfter`](#contractpivotpagebreakafter) * [`ContractPivotPrintAreaState`](#contractpivotprintareastate) * [`ContractPivotPrintPreviewProjection`](#contractpivotprintpreviewprojection) * [`ContractPivotRankDirection`](#contractpivotrankdirection) * [`ContractPivotReadonlyCache`](#contractpivotreadonlycache) * [`ContractPivotReadonlyCapability`](#contractpivotreadonlycapability) * [`ContractPivotReadonlyCapabilityState`](#contractpivotreadonlycapabilitystate) * [`ContractPivotReadonlyConnection`](#contractpivotreadonlyconnection) * [`ContractPivotReadonlyEntityKind`](#contractpivotreadonlyentitykind) * [`ContractPivotReadonlyField`](#contractpivotreadonlyfield) * [`ContractPivotReadonlyMutationKind`](#contractpivotreadonlymutationkind) * [`ContractPivotReadonlyNamedItem`](#contractpivotreadonlynameditem) * [`ContractPivotReadonlyOpaquePart`](#contractpivotreadonlyopaquepart) * [`ContractPivotReadonlyRelationship`](#contractpivotreadonlyrelationship) * [`ContractPivotReadonlySourceKind`](#contractpivotreadonlysourcekind) * [`ContractPivotReadonlyTable`](#contractpivotreadonlytable) * [`ContractPivotRefreshState`](#contractpivotrefreshstate) * [`ContractPivotRefreshStatusView`](#contractpivotrefreshstatusview) * [`ContractPivotReportFilterFieldView`](#contractpivotreportfilterfieldview) * [`ContractPivotReportFilterItemView`](#contractpivotreportfilteritemview) * [`ContractPivotReportFilterPageView`](#contractpivotreportfilterpageview) * [`ContractPivotReportFilterPagesAction`](#contractpivotreportfilterpagesaction) * [`ContractPivotReportFilterSelection`](#contractpivotreportfilterselection) * [`ContractPivotReportFilterView`](#contractpivotreportfilterview) * [`ContractPivotReportLayout`](#contractpivotreportlayout) * [`ContractPivotShowValuesAs`](#contractpivotshowvaluesas) * [`ContractPivotSortFilterAction`](#contractpivotsortfilteraction) * [`ContractPivotSortFilterItemView`](#contractpivotsortfilteritemview) * [`ContractPivotSortFilterSettings`](#contractpivotsortfiltersettings) * [`ContractPivotSortFilterView`](#contractpivotsortfilterview) * [`ContractPivotSortMode`](#contractpivotsortmode) * [`ContractPivotSubtotalPosition`](#contractpivotsubtotalposition) * [`ContractPivotTopMode`](#contractpivottopmode) * [`ContractPivotTopUnit`](#contractpivottopunit) * [`ContractPivotValueBaseFieldView`](#contractpivotvaluebasefieldview) * [`ContractPivotValueBaseItemView`](#contractpivotvaluebaseitemview) * [`ContractPivotValueCellView`](#contractpivotvaluecellview) * [`ContractPivotValueFieldSettings`](#contractpivotvaluefieldsettings) * [`ContractPivotValueFieldSettingsAction`](#contractpivotvaluefieldsettingsaction) * [`ContractPivotValueFieldSettingsView`](#contractpivotvaluefieldsettingsview) * [`ContractPivotValueFieldView`](#contractpivotvaluefieldview) * [`ContractPivotValueSummaryFunction`](#contractpivotvaluesummaryfunction) * [`ContractXlsxPivotCalculatedFieldMaterialization`](#contractxlsxpivotcalculatedfieldmaterialization) * [`ContractXlsxPivotCalculatedPresentationMaterialization`](#contractxlsxpivotcalculatedpresentationmaterialization) * [`ContractXlsxPivotCalculatedStateMaterialization`](#contractxlsxpivotcalculatedstatematerialization) * [`ContractXlsxPivotTableCalculatedFieldPatch`](#contractxlsxpivottablecalculatedfieldpatch) * [`ContractXlsxPivotTableClearAllPatch`](#contractxlsxpivottableclearallpatch) * [`ContractXlsxPivotTableClearFiltersPatch`](#contractxlsxpivottableclearfilterspatch) * [`ContractXlsxPivotTableCreationPatch`](#contractxlsxpivottablecreationpatch) * [`ContractXlsxPivotTableDeletionPatch`](#contractxlsxpivottabledeletionpatch) * [`ContractXlsxPivotTableFieldAdditionPatch`](#contractxlsxpivottablefieldadditionpatch) * [`ContractXlsxPivotTableFieldFilterPatch`](#contractxlsxpivottablefieldfilterpatch) * [`ContractXlsxPivotTableFieldMovePatch`](#contractxlsxpivottablefieldmovepatch) * [`ContractXlsxPivotTableFieldRemovalPatch`](#contractxlsxpivottablefieldremovalpatch) * [`ContractXlsxPivotTableFieldSettingsPatch`](#contractxlsxpivottablefieldsettingspatch) * [`ContractXlsxPivotTableFieldSortPatch`](#contractxlsxpivottablefieldsortpatch) * [`ContractXlsxPivotTableItemDetailPatch`](#contractxlsxpivottableitemdetailpatch) * [`ContractXlsxPivotTableItemGroupPatch`](#contractxlsxpivottableitemgrouppatch) * [`ContractXlsxPivotTableMovePatch`](#contractxlsxpivottablemovepatch) * [`ContractXlsxPivotTableRefreshPatch`](#contractxlsxpivottablerefreshpatch) * [`ContractXlsxPivotTableReportLayoutPatch`](#contractxlsxpivottablereportlayoutpatch) * [`ContractXlsxPivotTableShowValuesAsPatch`](#contractxlsxpivottableshowvaluesaspatch) * [`ContractXlsxPivotTableSourceChangePatch`](#contractxlsxpivottablesourcechangepatch) * [`ContractXlsxPivotTableStylePatch`](#contractxlsxpivottablestylepatch) * [`ContractXlsxPivotTableValueFieldAdditionPatch`](#contractxlsxpivottablevaluefieldadditionpatch) * [`ContractXlsxPivotTableValueSummaryPatch`](#contractxlsxpivottablevaluesummarypatch) * [`ContractXlsxPivotValueCellMaterialization`](#contractxlsxpivotvaluecellmaterialization) * [`ContractXlsxPivotValueFieldMaterialization`](#contractxlsxpivotvaluefieldmaterialization) ### ContractPivotCacheOptionsAction [Section titled “ContractPivotCacheOptionsAction”](#contractpivotcacheoptionsaction) ```ts type ContractPivotCacheOptionsAction = | { action: "list"; cacheId?: string | null; pivotTableName?: string | null } | { action: "apply"; cacheId: string; pivotTableName: string; settings: ContractPivotCacheOptionsSettings; expectedCacheGeneration?: number | null; expectedCohortPivotNames?: string[]; } | { action: "refresh_current"; cacheId: string; expectedCacheGeneration?: number | null; } | { action: "start_refresh_current"; cacheId: string; expectedCacheGeneration?: number | null; } | { action: "start_refresh_all" } | { action: "refresh_status"; generation?: number | null; advance?: boolean } | { action: "cancel_refresh"; generation: number } | { action: "connection_properties"; cacheId: string; pivotTableName: string } | { action: "change_source"; cacheId: string; pivotTableName: string; source: ContractPivotCacheSource; expectedCacheGeneration?: number | null; expectedCohortPivotNames?: string[]; } | { action: "create_consolidation"; pivotTableName: string; destinationSheetPath: string; destinationAnchor: string; ranges: ContractPivotConsolidationRangeInput[]; pageFieldMode: ContractPivotConsolidationPageFieldMode; pageFieldNames?: string[]; } | { action: "apply_consolidation"; cacheId: string; pivotTableName: string; ranges: ContractPivotConsolidationRangeInput[]; pageFieldMode: ContractPivotConsolidationPageFieldMode; pageFieldNames?: string[]; expectedCacheGeneration?: number | null; } | { action: "refresh_consolidation"; cacheId: string; expectedCacheGeneration?: number | null; } | { action: "refresh_all" } | { action: "cancel" } | { action: "undo" } | { action: "redo" }; ``` ### ContractPivotCacheOptionsSettings [Section titled “ContractPivotCacheOptionsSettings”](#contractpivotcacheoptionssettings) ```ts interface ContractPivotCacheOptionsSettings { refreshDataOnOpen: boolean; saveSourceData: boolean; enableShowDetails: boolean; preserveFormatting?: boolean | null; autofitColumnsOnUpdate?: boolean | null; showItemsWithNoDataOnRows?: boolean | null; showItemsWithNoDataOnColumns?: boolean | null; showEmptyCells?: boolean | null; emptyDisplayValue?: string | null; showErrorValues?: boolean | null; errorDisplayValue?: string | null; classicLayout?: boolean | null; mergeAndCenterLabels?: boolean | null; printExpandCollapseButtons?: boolean | null; repeatItemLabels?: boolean | null; altTextTitle?: string | null; altTextDescription?: string | null; retainDeletedItems: ContractPivotDeletedItemsRetention; retainedItemLimit?: number | null; } ``` ### ContractPivotCacheOptionsView [Section titled “ContractPivotCacheOptionsView”](#contractpivotcacheoptionsview) ```ts interface ContractPivotCacheOptionsView { cacheId: string; cacheGeneration: number; pivotTableName: string; pivotTablePath: string; sheetPath: string; cohortPivotNames: string[]; retainedDeletedItemCount: number; refreshStatus: string; refresh: ContractPivotRefreshStatusView; connection: ContractPivotConnectionPropertiesView; settings: ContractPivotCacheOptionsSettings; hasRowFields: boolean; hasColumnFields: boolean; stale: boolean; readOnly: boolean; protected: boolean; sourceAvailable: boolean; source: ContractPivotCacheSource; multipleConsolidation?: ContractPivotMultipleConsolidationView | null; unsupportedReason?: string | null; } ``` ### ContractPivotCacheSource [Section titled “ContractPivotCacheSource”](#contractpivotcachesource) ```ts type ContractPivotCacheSource = | { kind: "table"; tableName: string } | { kind: "range"; sheetName: string; reference: string } | { kind: "multiple_ranges"; ranges: ContractPivotConsolidationRangeInput[]; pageFieldMode: ContractPivotConsolidationPageFieldMode; pageFieldNames?: string[]; }; ``` ### ContractPivotCalculatedCacheView [Section titled “ContractPivotCalculatedCacheView”](#contractpivotcalculatedcacheview) ```ts interface ContractPivotCalculatedCacheView { cacheId: string; cacheIdentity: string; pivotTableNames: string[]; sourceFields: ContractPivotCalculatedSourceFieldView[]; refreshGeneration: number; refreshedRowCount: number; stale: boolean; readOnly: boolean; protected: boolean; } ``` ### ContractPivotCalculatedFieldView [Section titled “ContractPivotCalculatedFieldView”](#contractpivotcalculatedfieldview) ```ts interface ContractPivotCalculatedFieldView { id: string; cacheId: string; name: string; formula: string; summaryFunction: ContractPivotCalculatedSummaryFunction; dependencies: string[]; creationOrdinal: number; refreshGeneration: number; lastValue?: number | null; lastError?: string | null; rowErrorCount: number; } ``` ### ContractPivotCalculatedFieldsAction [Section titled “ContractPivotCalculatedFieldsAction”](#contractpivotcalculatedfieldsaction) ```ts type ContractPivotCalculatedFieldsAction = | { action: "list"; cacheId?: string | null; pivotTableName?: string } | { action: "register_pending"; cacheId: string; sourceSheet: string; sourceRef: string; sourceFields: string[]; pivotTableName: string; pivotTableSheetPath: string; outputRef: string; rowFields: string[]; columnFields: string[]; } | { action: "create"; cacheId: string; pivotTableName?: string; name: string; formula: string; summaryFunction: ContractPivotCalculatedSummaryFunction; } | { action: "edit"; cacheId: string; pivotTableName?: string; fieldId: string; name: string; formula: string; summaryFunction: ContractPivotCalculatedSummaryFunction; } | { action: "delete"; cacheId: string; fieldId: string } | { action: "reorder"; cacheId: string; fieldId: string; direction: ContractPivotCalculationMoveDirection; expectedRefreshGeneration: number; } | { action: "refresh_current"; cacheId: string } | { action: "refresh_all" } | { action: "rename_source_field"; cacheId: string; fieldOrdinal: number; name: string; } | { action: "rename_pivot_table"; cacheId: string; oldName: string; newName: string; } | { action: "undo" } | { action: "redo" }; ``` ### ContractPivotCalculatedItemAxis [Section titled “ContractPivotCalculatedItemAxis”](#contractpivotcalculateditemaxis) ```ts type ContractPivotCalculatedItemAxis = "row" | "column"; ``` ### ContractPivotCalculatedItemFieldView [Section titled “ContractPivotCalculatedItemFieldView”](#contractpivotcalculateditemfieldview) ```ts interface ContractPivotCalculatedItemFieldView { cacheId: string; fieldOrdinal: number; fieldName: string; axes: ContractPivotCalculatedItemAxis[]; memberNames: string[]; stale: boolean; readOnly: boolean; protected: boolean; } ``` ### ContractPivotCalculatedItemView [Section titled “ContractPivotCalculatedItemView”](#contractpivotcalculateditemview) ```ts interface ContractPivotCalculatedItemView { id: string; cacheId: string; fieldOrdinal: number; fieldName: string; axis: ContractPivotCalculatedItemAxis; name: string; formula: string; dependencies: string[]; creationOrdinal: number; refreshGeneration: number; lastCountValue?: number | null; lastError?: string | null; pivotTableNames: string[]; } ``` ### ContractPivotCalculatedItemsAction [Section titled “ContractPivotCalculatedItemsAction”](#contractpivotcalculateditemsaction) ```ts type ContractPivotCalculatedItemsAction = | { action: "list"; cacheId?: string | null; fieldOrdinal?: number | null; pivotTableName?: string | null; } | { action: "create"; cacheId: string; fieldOrdinal: number; axis: ContractPivotCalculatedItemAxis; pivotTableName?: string | null; name: string; formula: string; } | { action: "edit"; cacheId: string; itemId: string; name: string; formula: string; } | { action: "delete"; cacheId: string; itemId: string } | { action: "reorder"; cacheId: string; itemId: string; direction: ContractPivotCalculationMoveDirection; expectedRefreshGeneration: number; } | { action: "refresh_current"; cacheId: string } | { action: "refresh_all" } | { action: "rename_source_field"; cacheId: string; fieldOrdinal: number; name: string; } | { action: "rename_pivot_table"; cacheId: string; oldName: string; newName: string; } | { action: "undo" } | { action: "redo" }; ``` ### ContractPivotCalculatedSourceFieldView [Section titled “ContractPivotCalculatedSourceFieldView”](#contractpivotcalculatedsourcefieldview) ```ts interface ContractPivotCalculatedSourceFieldView { ordinal: number; name: string; scalarKind: string; referenceText: string; } ``` ### ContractPivotCalculatedSummaryFunction [Section titled “ContractPivotCalculatedSummaryFunction”](#contractpivotcalculatedsummaryfunction) ```ts type ContractPivotCalculatedSummaryFunction = "sum" | "count" | "average"; ``` ### ContractPivotCalculationMoveDirection [Section titled “ContractPivotCalculationMoveDirection”](#contractpivotcalculationmovedirection) ```ts type ContractPivotCalculationMoveDirection = "up" | "down"; ``` ### ContractPivotConditionalArea [Section titled “ContractPivotConditionalArea”](#contractpivotconditionalarea) ```ts type ContractPivotConditionalArea = "data" | "subtotal" | "rowGrandTotal" | "columnGrandTotal" | "grandTotal"; ``` ### ContractPivotConditionalCellIdentity [Section titled “ContractPivotConditionalCellIdentity”](#contractpivotconditionalcellidentity) ```ts interface ContractPivotConditionalCellIdentity { dataFieldIndex?: number | null; rowItems: ContractPivotConditionalItemIdentity[]; columnItems: ContractPivotConditionalItemIdentity[]; area: ContractPivotConditionalArea; } ``` ### ContractPivotConditionalItemIdentity [Section titled “ContractPivotConditionalItemIdentity”](#contractpivotconditionalitemidentity) ```ts interface ContractPivotConditionalItemIdentity { fieldOrdinal: number; itemId: string; } ``` ### ContractPivotConditionalRuleScope [Section titled “ContractPivotConditionalRuleScope”](#contractpivotconditionalrulescope) ```ts interface ContractPivotConditionalRuleScope { cacheId: string; pivotTableName: string; expectedGeneration: number; scope: ContractPivotConditionalScope; } ``` ### ContractPivotConditionalScope [Section titled “ContractPivotConditionalScope”](#contractpivotconditionalscope) ```ts type ContractPivotConditionalScope = | { type: "selectedCells"; cells: ContractPivotConditionalCellIdentity[] } | { type: "valueField"; dataFieldIndex: number } | { type: "fieldCombination"; dataFieldIndex?: number | null; rowItems: ContractPivotConditionalItemIdentity[]; columnItems: ContractPivotConditionalItemIdentity[]; includeSubtotals: boolean; includeGrandTotals: boolean; } | { type: "area"; area: ContractPivotConditionalArea }; ``` ### ContractPivotConnectionPropertiesView [Section titled “ContractPivotConnectionPropertiesView”](#contractpivotconnectionpropertiesview) ```ts interface ContractPivotConnectionPropertiesView { identity: string; sourceKind: string; properties: ContractPivotConnectionPropertyView[]; } ``` ### ContractPivotConnectionPropertyView [Section titled “ContractPivotConnectionPropertyView”](#contractpivotconnectionpropertyview) ```ts interface ContractPivotConnectionPropertyView { key: string; value: string; applicable: boolean; editable: boolean; disabledReasonCode?: string | null; disabledReasonDetail?: string | null; } ``` ### ContractPivotConsolidationPageFieldMode [Section titled “ContractPivotConsolidationPageFieldMode”](#contractpivotconsolidationpagefieldmode) ```ts type ContractPivotConsolidationPageFieldMode = "automatic" | "manual"; ``` ### ContractPivotConsolidationRangeInput [Section titled “ContractPivotConsolidationRangeInput”](#contractpivotconsolidationrangeinput) ```ts interface ContractPivotConsolidationRangeInput { stableId?: string | null; sheetName: string; reference: string; pageItems?: string[]; } ``` ### ContractPivotConsolidationRangeView [Section titled “ContractPivotConsolidationRangeView”](#contractpivotconsolidationrangeview) ```ts interface ContractPivotConsolidationRangeView { stableId: string; sheetName: string; sheetPath: string; reference: string; pageItems: string[]; valueCount: number; } ``` ### ContractPivotCopyCacheOwnership [Section titled “ContractPivotCopyCacheOwnership”](#contractpivotcopycacheownership) ```ts type ContractPivotCopyCacheOwnership = "share_source_cache" | "independent_cache"; ``` ### ContractPivotDataModelOlapInventory [Section titled “ContractPivotDataModelOlapInventory”](#contractpivotdatamodelolapinventory) ```ts interface ContractPivotDataModelOlapInventory { connections: ContractPivotReadonlyConnection[]; pivotTables: ContractPivotReadonlyTable[]; cacheDefinitions: ContractPivotReadonlyCache[]; modelParts: ContractPivotReadonlyOpaquePart[]; slicerParts: ContractPivotReadonlyOpaquePart[]; unknownParts: ContractPivotReadonlyOpaquePart[]; signatureParts: ContractPivotReadonlyOpaquePart[]; relationships: ContractPivotReadonlyRelationship[]; unknownExtensionUris: string[]; entityCount: number; } ``` ### ContractPivotDataModelOlapReadonlyAction [Section titled “ContractPivotDataModelOlapReadonlyAction”](#contractpivotdatamodelolapreadonlyaction) ```ts type ContractPivotDataModelOlapReadonlyAction = | { action: "inspect"; pivotTablePath?: string | null } | { action: "filter"; pivotTablePath: string } | { action: "edit"; pivotTablePath: string } | { action: "refresh"; pivotTablePath: string } | { action: "drillthrough"; pivotTablePath: string } | { action: "select"; entityStableId: string } | { action: "navigate"; entityStableId: string } | { action: "mutate"; entityStableId?: string | null; mutation: ContractPivotReadonlyMutationKind; }; ``` ### ContractPivotDateGroupPeriod [Section titled “ContractPivotDateGroupPeriod”](#contractpivotdategroupperiod) ```ts type ContractPivotDateGroupPeriod = "years" | "quarters" | "months" | "days"; ``` ### ContractPivotDeletedItemsRetention [Section titled “ContractPivotDeletedItemsRetention”](#contractpivotdeleteditemsretention) ```ts type ContractPivotDeletedItemsRetention = "automatic" | "none" | "maximum"; ``` ### ContractPivotDetailCellRef [Section titled “ContractPivotDetailCellRef”](#contractpivotdetailcellref) ```ts interface ContractPivotDetailCellRef { sheetPath: string; row: number; col: number; } ``` ### ContractPivotDetailContextView [Section titled “ContractPivotDetailContextView”](#contractpivotdetailcontextview) ```ts interface ContractPivotDetailContextView { cacheIdentity: string; cacheGeneration: number; showDetailsEnabled: boolean; rowItems: ContractPivotGroupingItemKey[]; columnItems: ContractPivotGroupingItemKey[]; filterItems: ContractPivotGroupingItemKey[]; } ``` ### ContractPivotDetailLineageView [Section titled “ContractPivotDetailLineageView”](#contractpivotdetaillineageview) ```ts interface ContractPivotDetailLineageView { id: string; pivotTableName: string; cacheId: string; cacheGeneration: number; sourceSheet: string; sourceRef: string; detailSheetName: string; detailSheetPath: string; selectedRowCount: number; rowItems: ContractPivotGroupingItemKey[]; columnItems: ContractPivotGroupingItemKey[]; filterItems: ContractPivotGroupingItemKey[]; } ``` ### ContractPivotExpandedItemView [Section titled “ContractPivotExpandedItemView”](#contractpivotexpandeditemview) ```ts interface ContractPivotExpandedItemView { cacheId: string; pivotTableName: string; fieldOrdinal: number; itemId: string; expanded: boolean; } ``` ### ContractPivotFieldAggregation [Section titled “ContractPivotFieldAggregation”](#contractpivotfieldaggregation) ```ts type ContractPivotFieldAggregation = | "sum" | "count" | "average" | "max" | "min" | "product" | "count_numbers" | "std_dev" | "variance"; ``` ### ContractPivotFieldArea [Section titled “ContractPivotFieldArea”](#contractpivotfieldarea) ```ts type ContractPivotFieldArea = "filters" | "columns" | "rows" | "values"; ``` ### ContractPivotFieldListAuthoringAction [Section titled “ContractPivotFieldListAuthoringAction”](#contractpivotfieldlistauthoringaction) ```ts type ContractPivotFieldListAuthoringAction = | { action: "list"; cacheId?: string | null; pivotTableName?: string | null } | { action: "mutate"; cacheId: string; pivotTableName: string; expectedPivotTablePath: string; expectedCacheIdentity: string; expectedCacheGeneration: number; expectedLayoutRevision: number; deferLayoutUpdate: boolean; mutations: ContractPivotFieldMutation[]; } | { action: "apply_deferred"; cacheId: string; pivotTableName: string; expectedPivotTablePath: string; expectedCacheIdentity: string; expectedCacheGeneration: number; expectedLayoutRevision: number; } | { action: "cancel_deferred"; cacheId: string; pivotTableName: string; expectedPivotTablePath: string; expectedCacheIdentity: string; expectedCacheGeneration: number; expectedLayoutRevision: number; } | { action: "undo" } | { action: "redo" }; ``` ### ContractPivotFieldListFieldView [Section titled “ContractPivotFieldListFieldView”](#contractpivotfieldlistfieldview) ```ts interface ContractPivotFieldListFieldView { ordinal: number; name: string; scalarKind: string; calculated: boolean; hasCalculatedItems: boolean; } ``` ### ContractPivotFieldListView [Section titled “ContractPivotFieldListView”](#contractpivotfieldlistview) ```ts interface ContractPivotFieldListView { cacheId: string; cacheIdentity: string; cacheGeneration: number; pivotTableName: string; pivotTablePath: string; sheetPath: string; layoutRevision: number; fields: ContractPivotFieldListFieldView[]; sourceRecords: string[][]; sourceRecordsTruncated: boolean; filters: number[]; columns: number[]; rows: number[]; values: ContractPivotValueFieldView[]; valueCells: ContractPivotValueCellView[]; deferred: boolean; stale: boolean; readOnly: boolean; protected: boolean; unsupportedReason?: string | null; } ``` ### ContractPivotFieldMutation [Section titled “ContractPivotFieldMutation”](#contractpivotfieldmutation) ```ts type ContractPivotFieldMutation = | { kind: "add"; fieldOrdinal: number; targetArea: ContractPivotFieldArea; targetIndex?: number | null; aggregation?: ContractPivotFieldAggregation | null; } | { kind: "remove"; area: ContractPivotFieldArea; fieldOrdinal?: number | null; occurrenceId?: string | null; } | { kind: "move"; fromArea: ContractPivotFieldArea; toArea: ContractPivotFieldArea; fieldOrdinal?: number | null; occurrenceId?: string | null; targetIndex: number; } | { kind: "reorder"; area: ContractPivotFieldArea; fieldOrdinal?: number | null; occurrenceId?: string | null; targetIndex: number; } | { kind: "duplicate_value"; occurrenceId: string; targetIndex?: number | null; } | { kind: "set_aggregation"; occurrenceId: string; aggregation: ContractPivotFieldAggregation; }; ``` ### ContractPivotFilter [Section titled “ContractPivotFilter”](#contractpivotfilter) ```ts type ContractPivotFilter = | { family: "label"; operator: ContractPivotFilterOperator; first: string; second?: string | null; } | { family: "value"; operator: ContractPivotFilterOperator; first: number; second?: number | null; dataFieldIndex: number; } | { family: "date"; operator: ContractPivotFilterOperator; first: number; second?: number | null; } | { family: "top"; mode: ContractPivotTopMode; unit: ContractPivotTopUnit; amount: number; dataFieldIndex: number; }; ``` ### ContractPivotFilterConnectionView [Section titled “ContractPivotFilterConnectionView”](#contractpivotfilterconnectionview) ```ts interface ContractPivotFilterConnectionView { controlId: string; caption: string; name: string; sheetName: string; kind: ContractSlicerTimelineControlKind; connected: boolean; } ``` ### ContractPivotFilterOperator [Section titled “ContractPivotFilterOperator”](#contractpivotfilteroperator) ```ts type ContractPivotFilterOperator = "equals" | "contains" | "begins_with" | "between"; ``` ### ContractPivotGetPivotDataView [Section titled “ContractPivotGetPivotDataView”](#contractpivotgetpivotdataview) ```ts interface ContractPivotGetPivotDataView { formula: string; cacheIdentity: string; cacheGeneration: number; pivotTableName: string; pivotTablePath: string; sheetPath: string; dataFieldIndex: number; valueFieldOrdinal: number; valueFieldCaption: string; rowItems: ContractPivotGroupingItemKey[]; columnItems: ContractPivotGroupingItemKey[]; filterItems: ContractPivotGroupingItemKey[]; area: | "data" | "subtotal" | "row_grand_total" | "column_grand_total" | "grand_total"; } ``` ### ContractPivotGroupView [Section titled “ContractPivotGroupView”](#contractpivotgroupview) ```ts interface ContractPivotGroupView { id: string; cacheId: string; fieldOrdinal: number; kind: string; caption: string; itemIds: string[]; start?: number | null; end?: number | null; by?: number | null; datePeriods: ContractPivotDateGroupPeriod[]; datePeriod?: ContractPivotDateGroupPeriod | null; dayInterval?: number | null; } ``` ### ContractPivotGroupingCacheView [Section titled “ContractPivotGroupingCacheView”](#contractpivotgroupingcacheview) ```ts interface ContractPivotGroupingCacheView { cacheId: string; cacheIdentity: string; generation: number; pivotTableNames: string[]; refreshedRowCount: number; stale: boolean; readOnly: boolean; protected: boolean; unsupportedReason?: string | null; } ``` ### ContractPivotGroupingDrilldownAction [Section titled “ContractPivotGroupingDrilldownAction”](#contractpivotgroupingdrilldownaction) ```ts type ContractPivotGroupingDrilldownAction = | { action: "list"; cacheId?: string | null; pivotTableName?: string | null; detailCell?: ContractPivotDetailCellRef | null; } | { action: "author_get_pivot_data"; detailCell: ContractPivotDetailCellRef } | { action: "group_numeric"; cacheId: string; fieldOrdinal: number; start: number; end: number; by: number; } | { action: "group_date"; cacheId: string; fieldOrdinal: number; periods: ContractPivotDateGroupPeriod[]; dayInterval?: number | null; } | { action: "group_manual"; cacheId: string; fieldOrdinal: number; itemIds: string[]; caption: string; } | { action: "ungroup"; cacheId: string; fieldOrdinal: number; groupId?: string | null; } | { action: "set_expanded"; cacheId: string; pivotTableName: string; fieldOrdinal: number; itemId: string; expanded: boolean; } | { action: "set_hierarchy_expanded"; cacheId: string; pivotTableName: string; axis: "row" | "column"; itemPath: ContractPivotGroupingItemKey[]; expanded: boolean; expectedCacheIdentity: string; expectedCacheGeneration: number; expectedHierarchyRevision: number; requestGeneration: number; } | { action: "set_hierarchy_field_expanded"; cacheId: string; pivotTableName: string; axis: "row" | "column"; fieldOrdinal: number; expanded: boolean; expectedCacheIdentity: string; expectedCacheGeneration: number; expectedHierarchyRevision: number; requestGeneration: number; } | { action: "show_details"; cacheId: string; pivotTableName: string; expectedCacheIdentity?: string | null; expectedCacheGeneration?: number | null; rowItems?: ContractPivotGroupingItemKey[]; columnItems?: ContractPivotGroupingItemKey[]; filterItems?: ContractPivotGroupingItemKey[]; } | { action: "refresh_current"; cacheId: string } | { action: "refresh_all" } | { action: "undo" } | { action: "redo" }; ``` ### ContractPivotGroupingItemKey [Section titled “ContractPivotGroupingItemKey”](#contractpivotgroupingitemkey) ```ts interface ContractPivotGroupingItemKey { fieldOrdinal: number; itemId: string; } ``` ### ContractPivotGroupingItemView [Section titled “ContractPivotGroupingItemView”](#contractpivotgroupingitemview) ```ts interface ContractPivotGroupingItemView { id: string; cacheId: string; fieldOrdinal: number; fieldName: string; label: string; scalarKind: string; retired: boolean; groupId?: string | null; groupIds: string[]; } ``` ### ContractPivotHierarchyNodeView [Section titled “ContractPivotHierarchyNodeView”](#contractpivothierarchynodeview) ```ts interface ContractPivotHierarchyNodeView { cacheId: string; pivotTableName: string; cacheIdentity: string; cacheGeneration: number; hierarchyRevision: number; pathId: string; axis: "row" | "column"; level: number; itemPath: ContractPivotGroupingItemKey[]; parentPath: ContractPivotGroupingItemKey[]; fieldOrdinal: number; itemId: string; label: string; targetCell: ContractPivotDetailCellRef; hasChildren: boolean; expanded: boolean; visible: boolean; calculatedItem: boolean; nextLevelFieldOrdinal?: number | null; } ``` ### ContractPivotLayoutFormatAction [Section titled “ContractPivotLayoutFormatAction”](#contractpivotlayoutformataction) ```ts type ContractPivotLayoutFormatAction = | { action: "list"; cacheId?: string | null; pivotTableName?: string | null } | { action: "apply"; cacheId: string; pivotTableName: string; options: ContractPivotLayoutFormatOptions; } | { action: "cancel"; cacheId: string; pivotTableName: string } | { action: "refresh_current"; cacheId: string } | { action: "refresh_all" } | { action: "undo" } | { action: "redo" }; ``` ### ContractPivotLayoutFormatOptions [Section titled “ContractPivotLayoutFormatOptions”](#contractpivotlayoutformatoptions) ```ts interface ContractPivotLayoutFormatOptions { reportLayout: ContractPivotReportLayout; repeatItemLabels: boolean; insertBlankRows: boolean; pageBreakAfter: ContractPivotPageBreakAfter; printTitles: boolean; repeatHeaders: boolean; subtotals: ContractPivotSubtotalPosition; rowGrandTotals: boolean; columnGrandTotals: boolean; fieldHeaders: boolean; showEmpty: boolean; emptyCaption: string; showError: boolean; errorCaption: string; preserveFormatting: boolean; styleName: string; } ``` ### ContractPivotLayoutFormatView [Section titled “ContractPivotLayoutFormatView”](#contractpivotlayoutformatview) ```ts interface ContractPivotLayoutFormatView { cacheId: string; cacheGeneration: number; pivotTableName: string; pivotTablePath: string; sheetPath: string; rowFieldOrdinals: number[]; options: ContractPivotLayoutFormatOptions; printPreview: ContractPivotPrintPreviewProjection; stale: boolean; readOnly: boolean; protected: boolean; unsupportedReason?: string | null; } ``` ### ContractPivotMoveCopyAction [Section titled “ContractPivotMoveCopyAction”](#contractpivotmovecopyaction) ```ts type ContractPivotMoveCopyAction = | { action: "list"; cacheId?: string | null; pivotTableName?: string | null } | { action: "move"; cacheId: string; pivotTableName: string; expectedGeneration: number; destination: ContractPivotMoveCopyDestination; } | { action: "copy"; cacheId: string; pivotTableName: string; expectedGeneration: number; destination: ContractPivotMoveCopyDestination; cacheOwnership: ContractPivotCopyCacheOwnership; } | { action: "cross_workbook_copy"; cacheId: string; pivotTableName: string; targetSubsetId: string; destination: ContractPivotMoveCopyDestination; } | { action: "cancel" } | { action: "undo" } | { action: "redo" }; ``` ### ContractPivotMoveCopyDestination [Section titled “ContractPivotMoveCopyDestination”](#contractpivotmovecopydestination) ```ts type ContractPivotMoveCopyDestination = | { kind: "existing_sheet"; sheetPath: string; anchor: string } | { kind: "new_sheet"; sheetName: string; anchor: string }; ``` ### ContractPivotMoveCopySheetView [Section titled “ContractPivotMoveCopySheetView”](#contractpivotmovecopysheetview) ```ts interface ContractPivotMoveCopySheetView { sheetName: string; sheetPath: string; loaded: boolean; protected: boolean; } ``` ### ContractPivotMoveCopyView [Section titled “ContractPivotMoveCopyView”](#contractpivotmovecopyview) ```ts interface ContractPivotMoveCopyView { cacheId: string; cacheGeneration: number; pivotTableName: string; pivotTablePath: string; sheetName: string; sheetPath: string; outputRef: string; cohortPivotNames: string[]; cacheOwnership: ContractPivotCopyCacheOwnership; stale: boolean; readOnly: boolean; protected: boolean; unsupportedReason?: string | null; } ``` ### ContractPivotMultipleConsolidationView [Section titled “ContractPivotMultipleConsolidationView”](#contractpivotmultipleconsolidationview) ```ts interface ContractPivotMultipleConsolidationView { pageFieldMode: ContractPivotConsolidationPageFieldMode; pageFieldNames: string[]; ranges: ContractPivotConsolidationRangeView[]; recordCount: number; } ``` ### ContractPivotPageBreakAfter [Section titled “ContractPivotPageBreakAfter”](#contractpivotpagebreakafter) ```ts type ContractPivotPageBreakAfter = "none" | "item" | "cohort"; ``` ### ContractPivotPrintAreaState [Section titled “ContractPivotPrintAreaState”](#contractpivotprintareastate) ```ts type ContractPivotPrintAreaState = "none" | "disjoint" | "contains_pivot"; ``` ### ContractPivotPrintPreviewProjection [Section titled “ContractPivotPrintPreviewProjection”](#contractpivotprintpreviewprojection) ```ts interface ContractPivotPrintPreviewProjection { outputRef: string; printAreaState: ContractPivotPrintAreaState; fitToPage: boolean; fitToWidth: number; fitToHeight: number; worksheetScalePercent: number; effectiveScalePercent: number; pagesAcross: number; pagesDown: number; pageCount: number; rowBreaks: ContractPageBreakLine[]; columnBreaks: ContractPageBreakLine[]; repeatsFieldTitles: boolean; repeatsItemHeaders: boolean; } ``` ### ContractPivotRankDirection [Section titled “ContractPivotRankDirection”](#contractpivotrankdirection) ```ts type ContractPivotRankDirection = "small_to_large" | "large_to_small"; ``` ### ContractPivotReadonlyCache [Section titled “ContractPivotReadonlyCache”](#contractpivotreadonlycache) ```ts interface ContractPivotReadonlyCache { partPath: string; connectionId: string | null; sourceKind: ContractPivotReadonlySourceKind; recordCount: number | null; extensionUris: string[]; hierarchies: ContractPivotReadonlyNamedItem[]; measures: ContractPivotReadonlyNamedItem[]; kpis: ContractPivotReadonlyNamedItem[]; namedSets: ContractPivotReadonlyNamedItem[]; cubeFields: ContractPivotReadonlyNamedItem[]; } ``` ### ContractPivotReadonlyCapability [Section titled “ContractPivotReadonlyCapability”](#contractpivotreadonlycapability) ```ts interface ContractPivotReadonlyCapability { command: string; state: ContractPivotReadonlyCapabilityState; available: boolean; reasonCode: string | null; } ``` ### ContractPivotReadonlyCapabilityState [Section titled “ContractPivotReadonlyCapabilityState”](#contractpivotreadonlycapabilitystate) ```ts type ContractPivotReadonlyCapabilityState = "live" | "disabled" | "blocked"; ``` ### ContractPivotReadonlyConnection [Section titled “ContractPivotReadonlyConnection”](#contractpivotreadonlyconnection) ```ts interface ContractPivotReadonlyConnection { stableId: string; id: string; name: string; connectionType: number | null; sourceKind: ContractPivotReadonlySourceKind; credentialsPresent: boolean; capabilities: ContractPivotReadonlyCapability[]; } ``` ### ContractPivotReadonlyEntityKind [Section titled “ContractPivotReadonlyEntityKind”](#contractpivotreadonlyentitykind) ```ts type ContractPivotReadonlyEntityKind = | "measure" | "kpi" | "named_set" | "cube_field" | "hierarchy" | "calculated_member"; ``` ### ContractPivotReadonlyField [Section titled “ContractPivotReadonlyField”](#contractpivotreadonlyfield) ```ts interface ContractPivotReadonlyField { stableId: string; name: string; caption: string; hierarchyIndex: number | null; capabilities: ContractPivotReadonlyCapability[]; } ``` ### ContractPivotReadonlyMutationKind [Section titled “ContractPivotReadonlyMutationKind”](#contractpivotreadonlymutationkind) ```ts type ContractPivotReadonlyMutationKind = "create" | "edit" | "rename" | "delete" | "author" | "evaluate"; ``` ### ContractPivotReadonlyNamedItem [Section titled “ContractPivotReadonlyNamedItem”](#contractpivotreadonlynameditem) ```ts interface ContractPivotReadonlyNamedItem { stableId: string; ownerPath: string; entityKind: ContractPivotReadonlyEntityKind; ordinal: number; name: string; caption: string; expressionPresent: boolean; capabilities: ContractPivotReadonlyCapability[]; } ``` ### ContractPivotReadonlyOpaquePart [Section titled “ContractPivotReadonlyOpaquePart”](#contractpivotreadonlyopaquepart) ```ts interface ContractPivotReadonlyOpaquePart { path: string; byteCount: number; sha256: string; } ``` ### ContractPivotReadonlyRelationship [Section titled “ContractPivotReadonlyRelationship”](#contractpivotreadonlyrelationship) ```ts interface ContractPivotReadonlyRelationship { sourcePath: string; relationshipId: string; relationshipType: string; target: string; external: boolean; } ``` ### ContractPivotReadonlySourceKind [Section titled “ContractPivotReadonlySourceKind”](#contractpivotreadonlysourcekind) ```ts type ContractPivotReadonlySourceKind = "data_model" | "olap"; ``` ### ContractPivotReadonlyTable [Section titled “ContractPivotReadonlyTable”](#contractpivotreadonlytable) ```ts interface ContractPivotReadonlyTable { partPath: string; name: string; cacheId: string | null; sourceKind: ContractPivotReadonlySourceKind; hierarchies: ContractPivotReadonlyNamedItem[]; measures: ContractPivotReadonlyNamedItem[]; kpis: ContractPivotReadonlyNamedItem[]; namedSets: ContractPivotReadonlyNamedItem[]; cubeFields: ContractPivotReadonlyNamedItem[]; calculatedMembers: ContractPivotReadonlyNamedItem[]; fields: ContractPivotReadonlyField[]; capabilities: ContractPivotReadonlyCapability[]; } ``` ### ContractPivotRefreshState [Section titled “ContractPivotRefreshState”](#contractpivotrefreshstate) ```ts type ContractPivotRefreshState = "idle" | "queued" | "running" | "cancelling" | "committed" | "failed"; ``` ### ContractPivotRefreshStatusView [Section titled “ContractPivotRefreshStatusView”](#contractpivotrefreshstatusview) ```ts interface ContractPivotRefreshStatusView { generation: number; state: ContractPivotRefreshState; target: string; cacheIds: string[]; cohortPivotNames: string[]; completedUnits: number; totalUnits: number; progressPercent: number; canCancel: boolean; lastErrorCode?: string | null; lastErrorDetail?: string | null; } ``` ### ContractPivotReportFilterFieldView [Section titled “ContractPivotReportFilterFieldView”](#contractpivotreportfilterfieldview) ```ts interface ContractPivotReportFilterFieldView { fieldOrdinal: number; caption: string; allSelected: boolean; selectedItemIds: string[]; items: ContractPivotReportFilterItemView[]; } ``` ### ContractPivotReportFilterItemView [Section titled “ContractPivotReportFilterItemView”](#contractpivotreportfilteritemview) ```ts interface ContractPivotReportFilterItemView { itemId: string; label: string; scalarKind: string; retired: boolean; selected: boolean; } ``` ### ContractPivotReportFilterPageView [Section titled “ContractPivotReportFilterPageView”](#contractpivotreportfilterpageview) ```ts interface ContractPivotReportFilterPageView { sheetName: string; sheetPath: string; pivotTableName: string; pivotTablePath: string; selections: ContractPivotReportFilterSelection[]; } ``` ### ContractPivotReportFilterPagesAction [Section titled “ContractPivotReportFilterPagesAction”](#contractpivotreportfilterpagesaction) ```ts type ContractPivotReportFilterPagesAction = | { action: "list"; cacheId?: string | null; pivotTableName?: string | null } | { action: "apply"; cacheId: string; pivotTableName: string; expectedGeneration: number; selections: ContractPivotReportFilterSelection[]; } | { action: "show_report_filter_pages"; cacheId: string; pivotTableName: string; expectedGeneration: number; fieldOrdinals: number[]; } | { action: "refresh_current"; cacheId: string } | { action: "refresh_all" } | { action: "cancel" } | { action: "undo" } | { action: "redo" }; ``` ### ContractPivotReportFilterSelection [Section titled “ContractPivotReportFilterSelection”](#contractpivotreportfilterselection) ```ts interface ContractPivotReportFilterSelection { fieldOrdinal: number; selectedItemIds: string[]; } ``` ### ContractPivotReportFilterView [Section titled “ContractPivotReportFilterView”](#contractpivotreportfilterview) ```ts interface ContractPivotReportFilterView { cacheId: string; cacheGeneration: number; pivotTableName: string; pivotTablePath: string; sheetPath: string; cohortPivotNames: string[]; fields: ContractPivotReportFilterFieldView[]; stale: boolean; readOnly: boolean; protected: boolean; unsupportedReason?: string | null; } ``` ### ContractPivotReportLayout [Section titled “ContractPivotReportLayout”](#contractpivotreportlayout) ```ts type ContractPivotReportLayout = "compact" | "outline" | "tabular"; ``` ### ContractPivotShowValuesAs [Section titled “ContractPivotShowValuesAs”](#contractpivotshowvaluesas) ```ts type ContractPivotShowValuesAs = | "normal" | "percent_grand_total" | "percent_row_total" | "percent_column_total" | "percent_parent_row_total" | "percent_parent_column_total" | "percent_parent_total" | "difference_from" | "percent_difference_from" | "running_total" | "percent_running_total" | "rank_small_to_large" | "rank_large_to_small" | "index"; ``` ### ContractPivotSortFilterAction [Section titled “ContractPivotSortFilterAction”](#contractpivotsortfilteraction) ```ts type ContractPivotSortFilterAction = | { action: "list"; cacheId?: string | null; pivotTableName?: string | null; fieldOrdinal?: number | null; } | { action: "apply"; cacheId: string; pivotTableName: string; expectedGeneration: number; settings: ContractPivotSortFilterSettings; } | { action: "clear"; cacheId: string; pivotTableName: string; expectedGeneration: number; fieldOrdinal?: number | null; } | { action: "reapply"; cacheId: string; pivotTableName: string; expectedGeneration: number; } | { action: "refresh_current"; cacheId: string } | { action: "refresh_all" } | { action: "undo" } | { action: "redo" }; ``` ### ContractPivotSortFilterItemView [Section titled “ContractPivotSortFilterItemView”](#contractpivotsortfilteritemview) ```ts interface ContractPivotSortFilterItemView { itemId: string; label: string; scalarKind: string; retired: boolean; visible: boolean; aggregate?: number | null; rank?: number | null; } ``` ### ContractPivotSortFilterSettings [Section titled “ContractPivotSortFilterSettings”](#contractpivotsortfiltersettings) ```ts interface ContractPivotSortFilterSettings { fieldOrdinal: number; sort: ContractPivotSortMode; filters: ContractPivotFilter[]; selectedItemIds?: string[] | null; includeNewItems: boolean; rankDirection: ContractPivotRankDirection; } ``` ### ContractPivotSortFilterView [Section titled “ContractPivotSortFilterView”](#contractpivotsortfilterview) ```ts interface ContractPivotSortFilterView { cacheId: string; cacheGeneration: number; pivotTableName: string; pivotTablePath: string; sheetPath: string; fieldCaption: string; fieldAxis: "row" | "column" | "report" | "other"; settings: ContractPivotSortFilterSettings; orderedItemIds: string[]; visibleItemIds: string[]; items: ContractPivotSortFilterItemView[]; stale: boolean; readOnly: boolean; protected: boolean; unsupportedReason?: string | null; } ``` ### ContractPivotSortMode [Section titled “ContractPivotSortMode”](#contractpivotsortmode) ```ts type ContractPivotSortMode = | { kind: "manual"; itemIds: string[] } | { kind: "label_ascending" } | { kind: "label_descending" } | { kind: "value_ascending"; dataFieldIndex: number } | { kind: "value_descending"; dataFieldIndex: number } | { kind: "custom_list"; values: string[] }; ``` ### ContractPivotSubtotalPosition [Section titled “ContractPivotSubtotalPosition”](#contractpivotsubtotalposition) ```ts type ContractPivotSubtotalPosition = "off" | "top" | "bottom"; ``` ### ContractPivotTopMode [Section titled “ContractPivotTopMode”](#contractpivottopmode) ```ts type ContractPivotTopMode = "top" | "bottom"; ``` ### ContractPivotTopUnit [Section titled “ContractPivotTopUnit”](#contractpivottopunit) ```ts type ContractPivotTopUnit = "items" | "percent" | "sum"; ``` ### ContractPivotValueBaseFieldView [Section titled “ContractPivotValueBaseFieldView”](#contractpivotvaluebasefieldview) ```ts interface ContractPivotValueBaseFieldView { ordinal: number; caption: string; items: ContractPivotValueBaseItemView[]; } ``` ### ContractPivotValueBaseItemView [Section titled “ContractPivotValueBaseItemView”](#contractpivotvaluebaseitemview) ```ts interface ContractPivotValueBaseItemView { id: string; index: number; label: string; retired: boolean; } ``` ### ContractPivotValueCellView [Section titled “ContractPivotValueCellView”](#contractpivotvaluecellview) ```ts interface ContractPivotValueCellView { occurrenceId: string; rowItems: string[]; columnItems: string[]; display: string; } ``` ### ContractPivotValueFieldSettings [Section titled “ContractPivotValueFieldSettings”](#contractpivotvaluefieldsettings) ```ts interface ContractPivotValueFieldSettings { fieldOrdinal: number; dataFieldIndex: number; fieldCaption: string; customCaption: string; summaryFunction: ContractPivotValueSummaryFunction; showValuesAs: ContractPivotShowValuesAs; baseFieldOrdinal?: number | null; baseItemId?: string | null; baseItemIndex?: number | null; numberFormatId: number; } ``` ### ContractPivotValueFieldSettingsAction [Section titled “ContractPivotValueFieldSettingsAction”](#contractpivotvaluefieldsettingsaction) ```ts type ContractPivotValueFieldSettingsAction = | { action: "list"; cacheId?: string | null; pivotTableName?: string | null } | { action: "apply"; cacheId: string; pivotTableName: string; settings: ContractPivotValueFieldSettings; } | { action: "refresh_current"; cacheId: string } | { action: "refresh_all" } | { action: "undo" } | { action: "redo" }; ``` ### ContractPivotValueFieldSettingsView [Section titled “ContractPivotValueFieldSettingsView”](#contractpivotvaluefieldsettingsview) ```ts interface ContractPivotValueFieldSettingsView { cacheId: string; cacheGeneration: number; pivotTableName: string; pivotTablePath: string; sheetPath: string; settings: ContractPivotValueFieldSettings; baseFields: ContractPivotValueBaseFieldView[]; stale: boolean; readOnly: boolean; protected: boolean; unsupportedReason?: string | null; } ``` ### ContractPivotValueFieldView [Section titled “ContractPivotValueFieldView”](#contractpivotvaluefieldview) ```ts interface ContractPivotValueFieldView { occurrenceId: string; fieldOrdinal: number; caption: string; aggregation: ContractPivotFieldAggregation; } ``` ### ContractPivotValueSummaryFunction [Section titled “ContractPivotValueSummaryFunction”](#contractpivotvaluesummaryfunction) ```ts type ContractPivotValueSummaryFunction = | "sum" | "count" | "average" | "max" | "min" | "product" | "count_numbers" | "std_dev" | "variance"; ``` ### ContractXlsxPivotCalculatedFieldMaterialization [Section titled “ContractXlsxPivotCalculatedFieldMaterialization”](#contractxlsxpivotcalculatedfieldmaterialization) ```ts interface ContractXlsxPivotCalculatedFieldMaterialization { name: string; formula: string; summaryFunction: "sum" | "count" | "average" | "min" | "max"; } ``` ### ContractXlsxPivotCalculatedPresentationMaterialization [Section titled “ContractXlsxPivotCalculatedPresentationMaterialization”](#contractxlsxpivotcalculatedpresentationmaterialization) ```ts interface ContractXlsxPivotCalculatedPresentationMaterialization { columnLabelsCaption: string; rowLabelsCaption: string; grandTotalCaption: string; columnWidths: ContractColumnWidth[]; } ``` ### ContractXlsxPivotCalculatedStateMaterialization [Section titled “ContractXlsxPivotCalculatedStateMaterialization”](#contractxlsxpivotcalculatedstatematerialization) ```ts interface ContractXlsxPivotCalculatedStateMaterialization { calculatedFields: ContractXlsxPivotCalculatedFieldMaterialization[]; values: ContractXlsxPivotValueFieldMaterialization[]; valueCells: ContractXlsxPivotValueCellMaterialization[]; presentation?: ContractXlsxPivotCalculatedPresentationMaterialization | null; } ``` ### ContractXlsxPivotTableCalculatedFieldPatch [Section titled “ContractXlsxPivotTableCalculatedFieldPatch”](#contractxlsxpivottablecalculatedfieldpatch) ```ts interface ContractXlsxPivotTableCalculatedFieldPatch { activeSheetPath: string; pivotTablePath: string; ref: string; fieldName: "RevenuePerUnit"; formula: "'Revenue'/'Units'"; summaryFunction: "sum"; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableClearAllPatch [Section titled “ContractXlsxPivotTableClearAllPatch”](#contractxlsxpivottableclearallpatch) ```ts interface ContractXlsxPivotTableClearAllPatch { activeSheetPath: string; pivotTablePath: string; ref: string; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableClearFiltersPatch [Section titled “ContractXlsxPivotTableClearFiltersPatch”](#contractxlsxpivottableclearfilterspatch) ```ts interface ContractXlsxPivotTableClearFiltersPatch { activeSheetPath: string; pivotTablePath: string; ref: string; fieldName?: string | null; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableCreationPatch [Section titled “ContractXlsxPivotTableCreationPatch”](#contractxlsxpivottablecreationpatch) ```ts interface ContractXlsxPivotTableCreationPatch { activeSheetPath: string; ref: string; name?: string | null; sourceSheetName: string; sourceTableName?: string | null; sourceRef?: string | null; rowField: string; columnField: string; valueField: string; summaryFunction: "sum" | "count" | "average" | "min" | "max"; layout?: "compact" | "outline" | "tabular" | null; subtotals?: "automatic" | "none" | "top" | "bottom" | null; rowGrandTotals?: boolean | null; columnGrandTotals?: boolean | null; showDrill?: boolean | null; showHeaders?: boolean | null; newName?: string | null; printDrill?: boolean | null; showDataTips?: boolean | null; classicLayout?: boolean | null; showError?: boolean | null; errorCaption?: string | null; showMissing?: boolean | null; missingCaption?: string | null; itemPrintTitles?: boolean | null; fieldPrintTitles?: boolean | null; multipleFieldFilters?: boolean | null; useAutoFormatting?: boolean | null; preserveFormatting?: boolean | null; mergeItem?: boolean | null; indent?: number | null; pageOverThenDown?: boolean | null; pageWrap?: number | null; customListSort?: boolean | null; saveData?: boolean | null; enableDrill?: boolean | null; refreshOnLoad?: boolean | null; missingItemsLimit?: "automatic" | "maximum" | null; altText?: string | null; altTextSummary?: string | null; styleName?: "PivotStyleMedium9" | null; showRowHeaders?: boolean | null; showColumnHeaders?: boolean | null; showRowStripes?: boolean | null; showColumnStripes?: boolean | null; shareCacheFromPivotName?: string | null; calculatedState?: ContractXlsxPivotCalculatedStateMaterialization | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableDeletionPatch [Section titled “ContractXlsxPivotTableDeletionPatch”](#contractxlsxpivottabledeletionpatch) ```ts interface ContractXlsxPivotTableDeletionPatch { activeSheetPath: string; pivotTablePath: string; ref: string; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableFieldAdditionPatch [Section titled “ContractXlsxPivotTableFieldAdditionPatch”](#contractxlsxpivottablefieldadditionpatch) ```ts interface ContractXlsxPivotTableFieldAdditionPatch { activeSheetPath: string; pivotTablePath: string; ref: string; fieldName: string; targetArea: "columns" | "rows" | "filters"; targetIndex?: number | null; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableFieldFilterPatch [Section titled “ContractXlsxPivotTableFieldFilterPatch”](#contractxlsxpivottablefieldfilterpatch) ```ts interface ContractXlsxPivotTableFieldFilterPatch { activeSheetPath: string; pivotTablePath: string; ref: string; fieldName: string; hiddenItems: string[]; filterKind?: "item" | "label" | "value" | null; operator?: | "equals" | "notEquals" | "beginsWith" | "contains" | "greaterThan" | "greaterThanOrEqual" | "lessThan" | "lessThanOrEqual" | null; operand?: string | number | null; valueFieldName?: string | null; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableFieldMovePatch [Section titled “ContractXlsxPivotTableFieldMovePatch”](#contractxlsxpivottablefieldmovepatch) ```ts interface ContractXlsxPivotTableFieldMovePatch { activeSheetPath: string; pivotTablePath: string; ref: string; fieldName: string; fromArea: "filters" | "columns" | "rows" | "values"; toArea: "filters" | "columns" | "rows" | "values"; targetIndex?: number | null; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableFieldRemovalPatch [Section titled “ContractXlsxPivotTableFieldRemovalPatch”](#contractxlsxpivottablefieldremovalpatch) ```ts interface ContractXlsxPivotTableFieldRemovalPatch { activeSheetPath: string; pivotTablePath: string; ref: string; fieldName: string; fromArea?: "filters" | "columns" | "rows" | "values" | null; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableFieldSettingsPatch [Section titled “ContractXlsxPivotTableFieldSettingsPatch”](#contractxlsxpivottablefieldsettingspatch) ```ts interface ContractXlsxPivotTableFieldSettingsPatch { activeSheetPath: string; pivotTablePath: string; ref: string; fieldName: string; setting: "showAllItems" | "fieldSettings"; customName?: string | null; subtotals?: "automatic" | "custom" | "none" | null; customSubtotals?: Array<"sum" | "count" | "average" | "max" | "min"> | null; showAllItems?: boolean | null; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableFieldSortPatch [Section titled “ContractXlsxPivotTableFieldSortPatch”](#contractxlsxpivottablefieldsortpatch) ```ts interface ContractXlsxPivotTableFieldSortPatch { activeSheetPath: string; pivotTablePath: string; ref: string; fieldName: string; direction: "ascending" | "descending"; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableItemDetailPatch [Section titled “ContractXlsxPivotTableItemDetailPatch”](#contractxlsxpivottableitemdetailpatch) ```ts interface ContractXlsxPivotTableItemDetailPatch { activeSheetPath: string; pivotTablePath: string; ref: string; fieldName: string; itemLabel: string; expanded: boolean; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableItemGroupPatch [Section titled “ContractXlsxPivotTableItemGroupPatch”](#contractxlsxpivottableitemgrouppatch) ```ts interface ContractXlsxPivotTableItemGroupPatch { activeSheetPath: string; pivotTablePath: string; ref: string; fieldName: string; action: "group" | "ungroup"; groupingKind?: "numeric" | "date" | null; startNumber?: number | null; endNumber?: number | null; interval?: number | null; datePeriods?: Array<"month" | "quarter" | "year"> | null; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableMovePatch [Section titled “ContractXlsxPivotTableMovePatch”](#contractxlsxpivottablemovepatch) ```ts interface ContractXlsxPivotTableMovePatch { activeSheetPath: string; destinationSheetPath: string; pivotTablePath: string; ref: string; destinationRef: string; destinationSheetName?: string | null; createDestinationSheet?: boolean | null; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableRefreshPatch [Section titled “ContractXlsxPivotTableRefreshPatch”](#contractxlsxpivottablerefreshpatch) ```ts interface ContractXlsxPivotTableRefreshPatch { activeSheetPath: string; pivotTablePath: string; ref: string; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableReportLayoutPatch [Section titled “ContractXlsxPivotTableReportLayoutPatch”](#contractxlsxpivottablereportlayoutpatch) ```ts interface ContractXlsxPivotTableReportLayoutPatch { activeSheetPath: string; pivotTablePath: string; ref: string; layout?: "compact" | "outline" | "tabular" | null; subtotals?: "automatic" | "none" | "top" | "bottom" | null; rowGrandTotals?: boolean | null; columnGrandTotals?: boolean | null; showDrill?: boolean | null; showHeaders?: boolean | null; newName?: string | null; printDrill?: boolean | null; showDataTips?: boolean | null; classicLayout?: boolean | null; showError?: boolean | null; errorCaption?: string | null; showMissing?: boolean | null; missingCaption?: string | null; itemPrintTitles?: boolean | null; fieldPrintTitles?: boolean | null; multipleFieldFilters?: boolean | null; useAutoFormatting?: boolean | null; preserveFormatting?: boolean | null; mergeItem?: boolean | null; indent?: number | null; pageOverThenDown?: boolean | null; pageWrap?: number | null; customListSort?: boolean | null; saveData?: boolean | null; enableDrill?: boolean | null; refreshOnLoad?: boolean | null; missingItemsLimit?: "automatic" | "maximum" | null; altText?: string | null; altTextSummary?: string | null; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableShowValuesAsPatch [Section titled “ContractXlsxPivotTableShowValuesAsPatch”](#contractxlsxpivottableshowvaluesaspatch) ```ts interface ContractXlsxPivotTableShowValuesAsPatch { activeSheetPath: string; pivotTablePath: string; ref: string; mode: "percentOfTotal" | "percentOfRow" | "runningTotal"; baseFieldName?: string | null; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableSourceChangePatch [Section titled “ContractXlsxPivotTableSourceChangePatch”](#contractxlsxpivottablesourcechangepatch) ```ts interface ContractXlsxPivotTableSourceChangePatch { activeSheetPath: string; pivotTablePath: string; ref: string; sourceSheetName: string; sourceRef: string; sourceTableName?: string | null; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableStylePatch [Section titled “ContractXlsxPivotTableStylePatch”](#contractxlsxpivottablestylepatch) ```ts interface ContractXlsxPivotTableStylePatch { activeSheetPath: string; pivotTablePath: string; ref: string; styleName?: "PivotStyleMedium9" | null; showRowHeaders?: boolean | null; showColumnHeaders?: boolean | null; showRowStripes?: boolean | null; showColumnStripes?: boolean | null; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableValueFieldAdditionPatch [Section titled “ContractXlsxPivotTableValueFieldAdditionPatch”](#contractxlsxpivottablevaluefieldadditionpatch) ```ts interface ContractXlsxPivotTableValueFieldAdditionPatch { activeSheetPath: string; pivotTablePath: string; ref: string; fieldName: string; summaryFunction: "sum" | "count" | "average" | "min" | "max"; targetIndex?: number | null; customName?: string | null; numberFormatCode?: string | null; name?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotTableValueSummaryPatch [Section titled “ContractXlsxPivotTableValueSummaryPatch”](#contractxlsxpivottablevaluesummarypatch) ```ts interface ContractXlsxPivotTableValueSummaryPatch { activeSheetPath: string; pivotTablePath: string; ref: string; summaryFunction: "sum" | "count" | "average" | "min" | "max"; name?: string | null; customName?: string | null; runtimeOwner?: "rust" | null; } ``` ### ContractXlsxPivotValueCellMaterialization [Section titled “ContractXlsxPivotValueCellMaterialization”](#contractxlsxpivotvaluecellmaterialization) ```ts interface ContractXlsxPivotValueCellMaterialization { occurrenceId: string; rowItems: string[]; columnItems: string[]; numericValue?: string | null; } ``` ### ContractXlsxPivotValueFieldMaterialization [Section titled “ContractXlsxPivotValueFieldMaterialization”](#contractxlsxpivotvaluefieldmaterialization) ```ts interface ContractXlsxPivotValueFieldMaterialization { occurrenceId: string; fieldName: string; caption: string; summaryFunction: "sum" | "count" | "average" | "min" | "max"; } ``` # Types: Power Query > Compute Contract type definitions — queries, steps, connectors, source privacy, and mashups. Names: 86. Definitions of the names from the “TypeScript type” column on the operation pages. Other dictionary topics: [session, workbook, and sheets](/reference/sumsheet/types-session/) · [cells and ranges](/reference/sumsheet/types-cells/) · [formulas and calculation](/reference/sumsheet/types-formulas/) · [formatting](/reference/sumsheet/types-format/) · [data and sheet objects](/reference/sumsheet/types-data/) · [pivot tables](/reference/sumsheet/types-pivot/) · [charts and graphics](/reference/sumsheet/types-charts/) · [printing and page layout](/reference/sumsheet/types-print/) · **Power Query** · [VBA and macros](/reference/sumsheet/types-vba/) · [protection and review](/reference/sumsheet/types-protection/) · [general and utility](/reference/sumsheet/types-common/). Types on this page — 86 * [`AppliedStep`](#appliedstep) * [`AppliedStepsProjection`](#appliedstepsprojection) * [`ApprovedMacroDescriptor`](#approvedmacrodescriptor) * [`ApprovedMacroExecutionMode`](#approvedmacroexecutionmode) * [`ApprovedMacroScope`](#approvedmacroscope) * [`ApprovedODataFeedDescriptor`](#approvedodatafeeddescriptor) * [`ApprovedSourceDescriptor`](#approvedsourcedescriptor) * [`ApprovedWebConnectorDescriptor`](#approvedwebconnectordescriptor) * [`ApprovedWebConnectorHeader`](#approvedwebconnectorheader) * [`ApprovedWebSourceDescriptor`](#approvedwebsourcedescriptor) * [`ContractForeignMashupGroup`](#contractforeignmashupgroup) * [`ContractForeignMashupLoadDestination`](#contractforeignmashuploaddestination) * [`ContractForeignMashupProjection`](#contractforeignmashupprojection) * [`ContractForeignMashupQueryEntry`](#contractforeignmashupqueryentry) * [`ContractForeignMashupRefreshResult`](#contractforeignmashuprefreshresult) * [`ContractForeignMashupRefusal`](#contractforeignmashuprefusal) * [`ContractMashupWriteEdit`](#contractmashupwriteedit) * [`ContractMashupWriteResult`](#contractmashupwriteresult) * [`ContractPowerQueryCell`](#contractpowerquerycell) * [`ContractPowerQueryCellKind`](#contractpowerquerycellkind) * [`ContractPowerQueryTransformOutcome`](#contractpowerquerytransformoutcome) * [`ContractPrivacyInspectorIntent`](#contractprivacyinspectorintent) * [`ContractPrivacyInspectorResult`](#contractprivacyinspectorresult) * [`ContractQueryDependencyEdge`](#contractquerydependencyedge) * [`ContractRecomputedQueryStatus`](#contractrecomputedquerystatus) * [`FoldingNativeQuery`](#foldingnativequery) * [`ODataFeedCredential`](#odatafeedcredential) * [`ODataQueryOptions`](#odataqueryoptions) * [`PowerQueryInspectorSnapshot`](#powerqueryinspectorsnapshot) * [`PowerQueryLoadDestination`](#powerqueryloaddestination) * [`PowerQueryLoadMode`](#powerqueryloadmode) * [`PowerQueryLoadPlan`](#powerqueryloadplan) * [`PqDataSourceEntry`](#pqdatasourceentry) * [`PqDataSourceSettingsOutcome`](#pqdatasourcesettingsoutcome) * [`PqPostgresConnectorBounds`](#pqpostgresconnectorbounds) * [`PqPostgresDeniedWire`](#pqpostgresdeniedwire) * [`PqPostgresDialogDescriptor`](#pqpostgresdialogdescriptor) * [`PqPostgresInspectHint`](#pqpostgresinspecthint) * [`PqPostgresLanGrantWire`](#pqpostgreslangrantwire) * [`PqPostgresNavTableWire`](#pqpostgresnavtablewire) * [`PqPostgresNavigationItemWire`](#pqpostgresnavigationitemwire) * [`PqPostgresNavigationSchemaWire`](#pqpostgresnavigationschemawire) * [`PqPostgresPreviewTableRef`](#pqpostgrespreviewtableref) * [`PqPrivacyEvaluationInput`](#pqprivacyevaluationinput) * [`PqPrivacyGraphNode`](#pqprivacygraphnode) * [`PqPrivacyLevelAssignment`](#pqprivacylevelassignment) * [`PqPrivacyLevelListEntry`](#pqprivacylevellistentry) * [`PqPrivacyLevelWriteOutcome`](#pqprivacylevelwriteoutcome) * [`PqProductRibbonColumnPayload`](#pqproductribboncolumnpayload) * [`PqProductRibbonDenied`](#pqproductribbondenied) * [`PqProductRibbonQueryPayload`](#pqproductribbonquerypayload) * [`PqQueryGraphDiagnostic`](#pqquerygraphdiagnostic) * [`PqQueryGraphEdge`](#pqquerygraphedge) * [`PqQueryGraphExplain`](#pqquerygraphexplain) * [`PqQueryGraphNode`](#pqquerygraphnode) * [`PqQueryGraphNodePublication`](#pqquerygraphnodepublication) * [`PqQueryGraphPartitionSummary`](#pqquerygraphpartitionsummary) * [`PqQueryGraphRefreshOutcome`](#pqquerygraphrefreshoutcome) * [`PqQueryGraphSnapshot`](#pqquerygraphsnapshot) * [`PqScaleBackpressureState`](#pqscalebackpressurestate) * [`PqScaleBudget`](#pqscalebudget) * [`PqScaleDenied`](#pqscaledenied) * [`PqScaleDeniedReason`](#pqscaledeniedreason) * [`PqScaleProgressCancelPayload`](#pqscaleprogresscancelpayload) * [`PqScaleProgressOpenPayload`](#pqscaleprogressopenpayload) * [`PqScaleProgressPullPayload`](#pqscaleprogresspullpayload) * [`PqScaleProgressSnapshotPayload`](#pqscaleprogresssnapshotpayload) * [`PqScaleProgressStatus`](#pqscaleprogressstatus) * [`PqSourceScopeWire`](#pqsourcescopewire) * [`PqSqlServerDeniedWire`](#pqsqlserverdeniedwire) * [`PqSqlServerDescriptor`](#pqsqlserverdescriptor) * [`PqSqlServerNavigationItemWire`](#pqsqlservernavigationitemwire) * [`PqSqlServerTableRef`](#pqsqlservertableref) * [`PrivacyCapabilityState`](#privacycapabilitystate) * [`PrivacyCategory`](#privacycategory) * [`PrivacyCategorySummary`](#privacycategorysummary) * [`PrivacyFinding`](#privacyfinding) * [`PrivacyInventoryReport`](#privacyinventoryreport) * [`PrivacyMutationReport`](#privacymutationreport) * [`PrivacyRiskLevel`](#privacyrisklevel) * [`ProductTableRangeRefreshQueryOutcome`](#producttablerangerefreshqueryoutcome) * [`TableRangeQueryMutationPreview`](#tablerangequerymutationpreview) * [`TableRangeQueryPreview`](#tablerangequerypreview) * [`WebConnectorCacheRetryPolicy`](#webconnectorcacheretrypolicy) * [`WebConnectorCredentialMode`](#webconnectorcredentialmode) * [`WebConnectorCredentialScope`](#webconnectorcredentialscope) ### AppliedStep [Section titled “AppliedStep”](#appliedstep) ```ts interface AppliedStep { stepId: string; displayName: string; canonicalM: string; span: MWireSpan; inputs: string[]; kind: "source" | "transform" | "output"; astNodeId?: string; } ``` ### AppliedStepsProjection [Section titled “AppliedStepsProjection”](#appliedstepsprojection) ```ts interface AppliedStepsProjection { queryStableId: string; steps: AppliedStep[]; canonicalM: string; diagnostics: InspectorDiagnostic[]; foldExplainPlan?: FoldExplainPlan; } ``` ### ApprovedMacroDescriptor [Section titled “ApprovedMacroDescriptor”](#approvedmacrodescriptor) ```ts interface ApprovedMacroDescriptor { macroId: string; displayName: string; entrypoint: string; scope: ApprovedMacroScope; sourceLabel: string; sourceText: string; mode: ApprovedMacroExecutionMode; summary: string; effectRangeA1: string; limitations: string[]; } ``` ### ApprovedMacroExecutionMode [Section titled “ApprovedMacroExecutionMode”](#approvedmacroexecutionmode) ```ts type ApprovedMacroExecutionMode = "approved-demo"; ``` ### ApprovedMacroScope [Section titled “ApprovedMacroScope”](#approvedmacroscope) ```ts type ApprovedMacroScope = "workbook-local"; ``` ### ApprovedODataFeedDescriptor [Section titled “ApprovedODataFeedDescriptor”](#approvedodatafeeddescriptor) ```ts interface ApprovedODataFeedDescriptor { serviceUrl: string; approvedHeaders?: [string, string][]; timeoutMs: number; maxResponseBytes: number; maxPageCount: number; maxTotalRows: number; queryOptions?: ODataQueryOptions; credential: ODataFeedCredential; testAllowlist?: WebSourceTestAllowlist; } ``` ### ApprovedSourceDescriptor [Section titled “ApprovedSourceDescriptor”](#approvedsourcedescriptor) ```ts type ApprovedSourceDescriptor = | ({ kind: "workbook" } & WorkbookSourceDescriptor) | ({ kind: "file" } & FileSourceDescriptor) | ({ kind: "folder" } & FolderSourceDescriptor); ``` ### ApprovedWebConnectorDescriptor [Section titled “ApprovedWebConnectorDescriptor”](#approvedwebconnectordescriptor) ```ts interface ApprovedWebConnectorDescriptor { source: ApprovedWebSourceDescriptor; relativePath?: string; query?: ApprovedWebConnectorHeader[]; headers?: ApprovedWebConnectorHeader[]; cacheRetry?: WebConnectorCacheRetryPolicy; credentialMode?: WebConnectorCredentialMode; credentialScope?: WebConnectorCredentialScope; } ``` ### ApprovedWebConnectorHeader [Section titled “ApprovedWebConnectorHeader”](#approvedwebconnectorheader) ```ts interface ApprovedWebConnectorHeader { name: string; value: string; } ``` ### ApprovedWebSourceDescriptor [Section titled “ApprovedWebSourceDescriptor”](#approvedwebsourcedescriptor) ```ts interface ApprovedWebSourceDescriptor { url: string; workbookId: string; queryId?: string; timeoutMs?: number; revoked?: boolean; testAllowlist?: WebSourceTestAllowlist; } ``` ### ContractForeignMashupGroup [Section titled “ContractForeignMashupGroup”](#contractforeignmashupgroup) ```ts interface ContractForeignMashupGroup { id: string; name?: string; } ``` ### ContractForeignMashupLoadDestination [Section titled “ContractForeignMashupLoadDestination”](#contractforeignmashuploaddestination) ```ts type ContractForeignMashupLoadDestination = | { mode: "existing_sheet"; sheetName: string; anchor: string } | { mode: "new_sheet"; sheetName: string } | { mode: "connection_only" }; ``` ### ContractForeignMashupProjection [Section titled “ContractForeignMashupProjection”](#contractforeignmashupprojection) ```ts interface ContractForeignMashupProjection { readOnly: boolean; revision: number; refused?: ContractForeignMashupRefusal; queries: ContractForeignMashupQueryEntry[]; groups: ContractForeignMashupGroup[]; connections: ContractWorkbookConnectionEntry[]; loadLinks: ContractWorkbookConnectionLoadLink[]; sourceScopes?: PqSourceScopeWire[]; unknownElements: string[]; sectionName?: string; sectionDeclarationCount: number; sectionHasErrors: boolean; hasConfig: boolean; } ``` ### ContractForeignMashupQueryEntry [Section titled “ContractForeignMashupQueryEntry”](#contractforeignmashupqueryentry) ```ts interface ContractForeignMashupQueryEntry { identity: string; name: string; dependencyIdentities?: string[]; stableGuid?: string; itemPath?: string; queryGroupId?: string; isPrivate?: boolean; loadEnabled?: boolean; loadObjectType?: string; loadToDataModel?: boolean; resultType?: string; expressionParseOk?: boolean; expressionPreview?: string; expressionSha256?: string; previewSanitized: boolean; hasSectionDeclaration: boolean; } ``` ### ContractForeignMashupRefreshResult [Section titled “ContractForeignMashupRefreshResult”](#contractforeignmashuprefreshresult) ```ts interface ContractForeignMashupRefreshResult { status: string; revision: number; generation: number; queryIdentity: string; valueKind?: string; rowCount?: number; columnCount?: number; packageHash?: string; code?: string; detail?: string; } ``` ### ContractForeignMashupRefusal [Section titled “ContractForeignMashupRefusal”](#contractforeignmashuprefusal) ```ts interface ContractForeignMashupRefusal { code: string; detail: string; } ``` ### ContractMashupWriteEdit [Section titled “ContractMashupWriteEdit”](#contractmashupwriteedit) ```ts type ContractMashupWriteEdit = | { kind: "replace_expression"; query: string; newExpression: string } | { kind: "rename_query"; query: string; newName: string } | { kind: "delete_query"; query: string } | { kind: "duplicate_query"; query: string; newName: string } | { kind: "reference_query"; query: string; newName: string } | { kind: "load_to"; query: string; destination: ContractForeignMashupLoadDestination; } | { kind: "create_connection"; sourceSubsetId: string; name: string; destination: ContractWorkbookConnectionDestination; refreshOnOpen?: boolean; } | { kind: "edit_connection"; connection: string; sourceSubsetId?: string; name?: string; destination?: ContractWorkbookConnectionDestination; refreshOnOpen?: boolean; } | { kind: "rename_connection"; connection: string; newName: string } | { kind: "delete_connection"; connection: string } | { kind: "duplicate_connection"; connection: string; newName: string } | { kind: "reference_connection"; connection: string; newName: string }; ``` ### ContractMashupWriteResult [Section titled “ContractMashupWriteResult”](#contractmashupwriteresult) ```ts interface ContractMashupWriteResult { status: string; revision: number; envelopeHash?: string; code?: string; detail?: string; } ``` ### ContractPowerQueryCell [Section titled “ContractPowerQueryCell”](#contractpowerquerycell) ```ts interface ContractPowerQueryCell { kind: ContractPowerQueryCellKind; text?: string; number?: number; integer?: number; logical?: boolean; date?: string; errorSourceText?: string; errorTargetType?: string; } ``` ### ContractPowerQueryCellKind [Section titled “ContractPowerQueryCellKind”](#contractpowerquerycellkind) ```ts type ContractPowerQueryCellKind = "null" | "text" | "number" | "integer" | "logical" | "date" | "error"; ``` ### ContractPowerQueryTransformOutcome [Section titled “ContractPowerQueryTransformOutcome”](#contractpowerquerytransformoutcome) ```ts type ContractPowerQueryTransformOutcome = | { status: "evaluated"; sourceId: string; mSource: string; supportedSubset: string; columns: string[]; rows: ContractPowerQueryCell[][]; cellErrorCount: number; } | { status: "blocked"; sourceId: string; mSource: string; reason: string; detail: string; }; ``` ### ContractPrivacyInspectorIntent [Section titled “ContractPrivacyInspectorIntent”](#contractprivacyinspectorintent) ```ts type ContractPrivacyInspectorIntent = | { action: "scan" } | { action: "remove_to_copy"; destinationUri: string; selectedCategories: PrivacyCategory[]; expectedSourceSha256: string; }; ``` ### ContractPrivacyInspectorResult [Section titled “ContractPrivacyInspectorResult”](#contractprivacyinspectorresult) ```ts type ContractPrivacyInspectorResult = | { status: "scanned"; inspection: PrivacyInventoryReport } | { status: "removed_to_copy"; sanitization: PrivacyMutationReport }; ``` ### ContractQueryDependencyEdge [Section titled “ContractQueryDependencyEdge”](#contractquerydependencyedge) ```ts interface ContractQueryDependencyEdge { dependentStableId: string; upstreamStableId: string; } ``` ### ContractRecomputedQueryStatus [Section titled “ContractRecomputedQueryStatus”](#contractrecomputedquerystatus) ```ts interface ContractRecomputedQueryStatus { queryStableId: string; recomputed: boolean; } ``` ### FoldingNativeQuery [Section titled “FoldingNativeQuery”](#foldingnativequery) ```ts interface FoldingNativeQuery { transport: "odata" | "sql" | string; text: string; } ``` ### ODataFeedCredential [Section titled “ODataFeedCredential”](#odatafeedcredential) ```ts interface ODataFeedCredential { mode?: WebConnectorCredentialMode; scope: WebConnectorCredentialScope; } ``` ### ODataQueryOptions [Section titled “ODataQueryOptions”](#odataqueryoptions) ```ts interface ODataQueryOptions { select?: string[]; filter?: string; top?: number; } ``` ### PowerQueryInspectorSnapshot [Section titled “PowerQueryInspectorSnapshot”](#powerqueryinspectorsnapshot) ```ts interface PowerQueryInspectorSnapshot { source: string; ast?: InspectorAstNode; bindings: InspectorBinding[]; outcome: InspectorOutcome; diagnostics: InspectorDiagnostic[]; lineage: InspectorLineage; foldExplainPlan?: FoldExplainPlan; foldingVerdict: FoldingVerdict; } ``` ### PowerQueryLoadDestination [Section titled “PowerQueryLoadDestination”](#powerqueryloaddestination) ```ts interface PowerQueryLoadDestination { mode: PowerQueryLoadMode; sheetName?: string; sheet_name?: string; anchor?: CellAnchor; } ``` ### PowerQueryLoadMode [Section titled “PowerQueryLoadMode”](#powerqueryloadmode) ```ts type PowerQueryLoadMode = "new-sheet" | "current-anchor" | "existing-range" | "connection-only"; ``` ### PowerQueryLoadPlan [Section titled “PowerQueryLoadPlan”](#powerqueryloadplan) ```ts interface PowerQueryLoadPlan { requests: ComputeRequest[]; outputRect: CellRect; sheetKey: string; staleClearCount: number; createdSheet: boolean; } ``` ### PqDataSourceEntry [Section titled “PqDataSourceEntry”](#pqdatasourceentry) ```ts interface PqDataSourceEntry { scopeId: string; scopeKind: "workbook" | "file" | "folder" | "web" | "odata" | "database"; queryCount: number; pathChangeable: boolean; } ``` ### PqDataSourceSettingsOutcome [Section titled “PqDataSourceSettingsOutcome”](#pqdatasourcesettingsoutcome) ```ts interface PqDataSourceSettingsOutcome { action: string; requestedScopeId: string; scopeId?: string; accepted: boolean; reason?: string; workbookChanged: boolean; } ``` ### PqPostgresConnectorBounds [Section titled “PqPostgresConnectorBounds”](#pqpostgresconnectorbounds) ```ts interface PqPostgresConnectorBounds { maxPreviewRows?: number; maxTotalRows?: number; statementTimeoutMs?: number; } ``` ### PqPostgresDeniedWire [Section titled “PqPostgresDeniedWire”](#pqpostgresdeniedwire) ```ts interface PqPostgresDeniedWire { reason: string; message: string; } ``` ### PqPostgresDialogDescriptor [Section titled “PqPostgresDialogDescriptor”](#pqpostgresdialogdescriptor) ```ts interface PqPostgresDialogDescriptor { providerId?: "postgres"; host: string; port: number; database: string; credentialMode?: "stored" | "anonymous"; credentialScope?: WebConnectorCredentialScope; options?: Record; bounds?: PqPostgresConnectorBounds; revoked?: boolean; } ``` ### PqPostgresInspectHint [Section titled “PqPostgresInspectHint”](#pqpostgresinspecthint) ```ts interface PqPostgresInspectHint { canonicalM: string; descriptorJson: string; schema?: string; item?: string; } ``` ### PqPostgresLanGrantWire [Section titled “PqPostgresLanGrantWire”](#pqpostgreslangrantwire) ```ts interface PqPostgresLanGrantWire { scopeOrigin: string; allowPrivateNetwork: boolean; } ``` ### PqPostgresNavTableWire [Section titled “PqPostgresNavTableWire”](#pqpostgresnavtablewire) ```ts interface PqPostgresNavTableWire { schema: string; name: string; kind: string; } ``` ### PqPostgresNavigationItemWire [Section titled “PqPostgresNavigationItemWire”](#pqpostgresnavigationitemwire) ```ts interface PqPostgresNavigationItemWire { name: string; kind: string; } ``` ### PqPostgresNavigationSchemaWire [Section titled “PqPostgresNavigationSchemaWire”](#pqpostgresnavigationschemawire) ```ts interface PqPostgresNavigationSchemaWire { name: string; items: PqPostgresNavigationItemWire[]; } ``` ### PqPostgresPreviewTableRef [Section titled “PqPostgresPreviewTableRef”](#pqpostgrespreviewtableref) ```ts interface PqPostgresPreviewTableRef { schema: string; table: string; } ``` ### PqPrivacyEvaluationInput [Section titled “PqPrivacyEvaluationInput”](#pqprivacyevaluationinput) ```ts interface PqPrivacyEvaluationInput { rootQueryId: string; graph?: PqPrivacyGraphNode[]; levels?: PqPrivacyLevelAssignment[]; } ``` ### PqPrivacyGraphNode [Section titled “PqPrivacyGraphNode”](#pqprivacygraphnode) ```ts interface PqPrivacyGraphNode { queryId: string; references?: string[]; parameters?: string[]; dynamicSource?: boolean; directScopes?: PqSourceScopeWire[]; } ``` ### PqPrivacyLevelAssignment [Section titled “PqPrivacyLevelAssignment”](#pqprivacylevelassignment) ```ts interface PqPrivacyLevelAssignment { canonicalScope: string; level: string; invalid?: boolean; } ``` ### PqPrivacyLevelListEntry [Section titled “PqPrivacyLevelListEntry”](#pqprivacylevellistentry) ```ts interface PqPrivacyLevelListEntry { scopeId: string; scopeKind: "workbook" | "file" | "folder" | "web" | "odata" | "unknown"; displayResource: string; level: string; origin: "user-store" | "workbook-declared" | "effective"; reason?: string; } ``` ### PqPrivacyLevelWriteOutcome [Section titled “PqPrivacyLevelWriteOutcome”](#pqprivacylevelwriteoutcome) ```ts interface PqPrivacyLevelWriteOutcome { canonicalScope: string; level?: string; scopeId?: string; accepted: boolean; reason?: string; } ``` ### PqProductRibbonColumnPayload [Section titled “PqProductRibbonColumnPayload”](#pqproductribboncolumnpayload) ```ts interface PqProductRibbonColumnPayload { name: string; inferredType: string; } ``` ### PqProductRibbonDenied [Section titled “PqProductRibbonDenied”](#pqproductribbondenied) ```ts interface PqProductRibbonDenied { reason: string; message: string; } ``` ### PqProductRibbonQueryPayload [Section titled “PqProductRibbonQueryPayload”](#pqproductribbonquerypayload) ```ts interface PqProductRibbonQueryPayload { queryId: string; sheetName: string; selectorKind: "table" | "range"; selectorName: string; columns: PqProductRibbonColumnPayload[]; totalRows: number; sampledRows: number; truncated: boolean; stepCount: number; canonicalM: string; editorAvailable: boolean; loaded: boolean; loadedQueryStableId?: string; } ``` ### PqQueryGraphDiagnostic [Section titled “PqQueryGraphDiagnostic”](#pqquerygraphdiagnostic) ```ts interface PqQueryGraphDiagnostic { code: string; nodes: string[]; message: string; } ``` ### PqQueryGraphEdge [Section titled “PqQueryGraphEdge”](#pqquerygraphedge) ```ts interface PqQueryGraphEdge { from: string; to: string; kind: "query-ref" | "parameter-ref" | "source-read" | string; } ``` ### PqQueryGraphExplain [Section titled “PqQueryGraphExplain”](#pqquerygraphexplain) ```ts interface PqQueryGraphExplain { query_stable_id: string; display_name: string; dependencies: string[]; plan_availability: string; fold_explain_plan?: FoldExplainPlan; folding_verdict: FoldingVerdict; partition_summary?: PqQueryGraphPartitionSummary; diagnostics: PqQueryGraphDiagnostic[]; postgres_inspect_hint?: PqPostgresInspectHint; } ``` ### PqQueryGraphNode [Section titled “PqQueryGraphNode”](#pqquerygraphnode) ```ts interface PqQueryGraphNode { id: string; kind: "query" | "parameter" | "source" | string; display_name: string; status: string; generation: number; diagnostic_code?: string; } ``` ### PqQueryGraphNodePublication [Section titled “PqQueryGraphNodePublication”](#pqquerygraphnodepublication) ```ts interface PqQueryGraphNodePublication { query_stable_id: string; load_plan?: PowerQueryLoadPlan; refresh_outcome: unknown; persisted_query?: unknown; } ``` ### PqQueryGraphPartitionSummary [Section titled “PqQueryGraphPartitionSummary”](#pqquerygraphpartitionsummary) ```ts interface PqQueryGraphPartitionSummary { transitive_query_ids: string[]; transitive_scope_ids: string[]; } ``` ### PqQueryGraphRefreshOutcome [Section titled “PqQueryGraphRefreshOutcome”](#pqquerygraphrefreshoutcome) ```ts interface PqQueryGraphRefreshOutcome { generation: number; workbook_revision?: number; states: Record; diagnostics: PqQueryGraphDiagnostic[]; node_reasons?: Record; } ``` ### PqQueryGraphSnapshot [Section titled “PqQueryGraphSnapshot”](#pqquerygraphsnapshot) ```ts interface PqQueryGraphSnapshot { schema_version: number; workbook_revision?: number; nodes: PqQueryGraphNode[]; edges: PqQueryGraphEdge[]; diagnostics: PqQueryGraphDiagnostic[]; } ``` ### PqScaleBackpressureState [Section titled “PqScaleBackpressureState”](#pqscalebackpressurestate) ```ts type PqScaleBackpressureState = { state: "ready" } | { state: "throttled"; retryAfterMs: number }; ``` ### PqScaleBudget [Section titled “PqScaleBudget”](#pqscalebudget) ```ts interface PqScaleBudget { maxRows: number; maxResultBytes: number; maxRowBytes: number; maxSpillBytes: number; maxBatchRows: number; timeBudgetMs: number; } ``` ### PqScaleDenied [Section titled “PqScaleDenied”](#pqscaledenied) ```ts interface PqScaleDenied { reason: PqScaleDeniedReason; message: string; } ``` ### PqScaleDeniedReason [Section titled “PqScaleDeniedReason”](#pqscaledeniedreason) ```ts type PqScaleDeniedReason = | "row-budget-exceeded" | "byte-budget-exceeded" | "oversized-row" | "time-budget-exceeded" | "spill-cap-exceeded" | "cancelled" | "superseded" | "firewall-blocked" | "unsupported"; ``` ### PqScaleProgressCancelPayload [Section titled “PqScaleProgressCancelPayload”](#pqscaleprogresscancelpayload) ```ts interface PqScaleProgressCancelPayload { cancelled: boolean; } ``` ### PqScaleProgressOpenPayload [Section titled “PqScaleProgressOpenPayload”](#pqscaleprogressopenpayload) ```ts interface PqScaleProgressOpenPayload { sessionId: string; rowsTotal: number; budget: PqScaleBudget; } ``` ### PqScaleProgressPullPayload [Section titled “PqScaleProgressPullPayload”](#pqscaleprogresspullpayload) ```ts interface PqScaleProgressPullPayload { status: PqScaleProgressStatus; rowsInBatch: number; rowsEmitted: number; rowsTotal: number; bytesEmitted: number; backpressure: PqScaleBackpressureState; elapsedMs: number; batchesPulled: number; denied?: PqScaleDenied; } ``` ### PqScaleProgressSnapshotPayload [Section titled “PqScaleProgressSnapshotPayload”](#pqscaleprogresssnapshotpayload) ```ts interface PqScaleProgressSnapshotPayload { status: PqScaleProgressStatus; rowsEmitted: number; rowsTotal: number; bytesEmitted: number; backpressure: PqScaleBackpressureState; elapsedMs: number; batchesPulled: number; denied?: PqScaleDenied; } ``` ### PqScaleProgressStatus [Section titled “PqScaleProgressStatus”](#pqscaleprogressstatus) ```ts type PqScaleProgressStatus = "batch" | "done" | "denied"; ``` ### PqSourceScopeWire [Section titled “PqSourceScopeWire”](#pqsourcescopewire) ```ts type PqSourceScopeWire = | { kind: "workbook"; workbookStableId: string } | { kind: "file"; path: string } | { kind: "folder"; root: string } | { kind: "web"; origin: string } | { kind: "odata"; serviceOrigin: string } | { kind: "database"; resource: string }; ``` ### PqSqlServerDeniedWire [Section titled “PqSqlServerDeniedWire”](#pqsqlserverdeniedwire) ```ts interface PqSqlServerDeniedWire { reason: string; message: string; } ``` ### PqSqlServerDescriptor [Section titled “PqSqlServerDescriptor”](#pqsqlserverdescriptor) ```ts interface PqSqlServerDescriptor { host: string; port?: number; database: string; user: string; credentialScope: string; timeoutMs?: number; revoked?: boolean; } ``` ### PqSqlServerNavigationItemWire [Section titled “PqSqlServerNavigationItemWire”](#pqsqlservernavigationitemwire) ```ts interface PqSqlServerNavigationItemWire { schema: string; name: string; kind: string; } ``` ### PqSqlServerTableRef [Section titled “PqSqlServerTableRef”](#pqsqlservertableref) ```ts interface PqSqlServerTableRef { schema: string; table: string; } ``` ### PrivacyCapabilityState [Section titled “PrivacyCapabilityState”](#privacycapabilitystate) ```ts type PrivacyCapabilityState = "remove_live" | "detect_only" | "blocked"; ``` ### PrivacyCategory [Section titled “PrivacyCategory”](#privacycategory) ```ts type PrivacyCategory = | "core_properties" | "app_properties" | "custom_properties" | "custom_xml" | "thumbnail" | "document_server_metadata" | "comments_notes" | "hidden_sheets" | "hidden_rows_columns" | "external_links" | "custom_views" | "drawings"; ``` ### PrivacyCategorySummary [Section titled “PrivacyCategorySummary”](#privacycategorysummary) ```ts interface PrivacyCategorySummary { category: PrivacyCategory; findingCount: number; capabilityState: PrivacyCapabilityState; reasonCodes: string[]; } ``` ### PrivacyFinding [Section titled “PrivacyFinding”](#privacyfinding) ```ts interface PrivacyFinding { category: PrivacyCategory; reasonCode: string; count: number; riskLevel: PrivacyRiskLevel; } ``` ### PrivacyInventoryReport [Section titled “PrivacyInventoryReport”](#privacyinventoryreport) ```ts interface PrivacyInventoryReport { schemaVersion: number; sourceSha256: string; signedPackage: boolean; totalFindingCount: number; findings: PrivacyFinding[]; categories: PrivacyCategorySummary[]; packageReasonCodes: string[]; } ``` ### PrivacyMutationReport [Section titled “PrivacyMutationReport”](#privacymutationreport) ```ts interface PrivacyMutationReport { schemaVersion: number; sourceSha256: string; outputSha256: string; removedCategories: PrivacyCategory[]; removedPartCount: number; modifiedPartCount: number; after: PrivacyInventoryReport; } ``` ### PrivacyRiskLevel [Section titled “PrivacyRiskLevel”](#privacyrisklevel) ```ts type PrivacyRiskLevel = "high" | "medium" | "low" | "none"; ``` ### ProductTableRangeRefreshQueryOutcome [Section titled “ProductTableRangeRefreshQueryOutcome”](#producttablerangerefreshqueryoutcome) ```ts interface ProductTableRangeRefreshQueryOutcome { queryStableId: string; status: "refreshed" | "blocked" | "skipped"; loadPlan?: PowerQueryLoadPlan; persistedQuery?: unknown; reason?: string; detail?: string; } ``` ### TableRangeQueryMutationPreview [Section titled “TableRangeQueryMutationPreview”](#tablerangequerymutationpreview) ```ts interface TableRangeQueryMutationPreview { mutation: StepMutationResult; preview: TableRangeQueryPreview; } ``` ### TableRangeQueryPreview [Section titled “TableRangeQueryPreview”](#tablerangequerypreview) ```ts interface TableRangeQueryPreview { outcome: MExpressionOutcome; totalRows?: number; sampledRows?: number; truncated: boolean; } ``` ### WebConnectorCacheRetryPolicy [Section titled “WebConnectorCacheRetryPolicy”](#webconnectorcacheretrypolicy) ```ts interface WebConnectorCacheRetryPolicy { cacheEnabled?: boolean; maxRetries?: number; } ``` ### WebConnectorCredentialMode [Section titled “WebConnectorCredentialMode”](#webconnectorcredentialmode) ```ts type WebConnectorCredentialMode = "anonymous" | "webApi"; ``` ### WebConnectorCredentialScope [Section titled “WebConnectorCredentialScope”](#webconnectorcredentialscope) ```ts interface WebConnectorCredentialScope { origin: string; queryId?: string; } ``` # Types: printing and page layout > Compute Contract type definitions — page setup, margins, headers and footers, and breaks. Names: 26. Definitions of the names from the “TypeScript type” column on the operation pages. Other dictionary topics: [session, workbook, and sheets](/reference/sumsheet/types-session/) · [cells and ranges](/reference/sumsheet/types-cells/) · [formulas and calculation](/reference/sumsheet/types-formulas/) · [formatting](/reference/sumsheet/types-format/) · [data and sheet objects](/reference/sumsheet/types-data/) · [pivot tables](/reference/sumsheet/types-pivot/) · [charts and graphics](/reference/sumsheet/types-charts/) · **printing and page layout** · [Power Query](/reference/sumsheet/types-powerquery/) · [VBA and macros](/reference/sumsheet/types-vba/) · [protection and review](/reference/sumsheet/types-protection/) · [general and utility](/reference/sumsheet/types-common/). **Types on this page — 26** * [`ContractPageBreakAreaBounds`](#contractpagebreakareabounds) * [`ContractPageBreakAreaProjection`](#contractpagebreakareaprojection) * [`ContractPageBreakKind`](#contractpagebreakkind) * [`ContractPageBreakLine`](#contractpagebreakline) * [`ContractPageBreakPageSetup`](#contractpagebreakpagesetup) * [`ContractRemoveDuplicatesHeaderPolicy`](#contractremoveduplicatesheaderpolicy) * [`ContractWorksheetPageAxisRange`](#contractworksheetpageaxisrange) * [`ContractWorksheetPageBreakAxis`](#contractworksheetpagebreakaxis) * [`ContractWorksheetPageBreakIntent`](#contractworksheetpagebreakintent) * [`ContractWorksheetPageMargins`](#contractworksheetpagemargins) * [`ContractWorksheetPageOrder`](#contractworksheetpageorder) * [`ContractWorksheetPageOrientation`](#contractworksheetpageorientation) * [`ContractWorksheetPageScaleMode`](#contractworksheetpagescalemode) * [`ContractWorksheetPageSetup`](#contractworksheetpagesetup) * [`ContractWorksheetPrintArea`](#contractworksheetprintarea) * [`ContractXlsxPrintAreaClearPatch`](#contractxlsxprintareaclearpatch) * [`ContractXlsxPrintAreaPatch`](#contractxlsxprintareapatch) * [`ContractXlsxPrintTitlesClearPatch`](#contractxlsxprinttitlesclearpatch) * [`ContractXlsxPrintTitlesPatch`](#contractxlsxprinttitlespatch) * [`ContractXlsxWorksheetHeaderFooterClearPatch`](#contractxlsxworksheetheaderfooterclearpatch) * [`ContractXlsxWorksheetHeaderFooterPatch`](#contractxlsxworksheetheaderfooterpatch) * [`ContractXlsxWorksheetPageBreakPatch`](#contractxlsxworksheetpagebreakpatch) * [`ContractXlsxWorksheetPageBreakResetPatch`](#contractxlsxworksheetpagebreakresetpatch) * [`ContractXlsxWorksheetPageSetupPatch`](#contractxlsxworksheetpagesetuppatch) * [`ContractXlsxWorksheetPrintOptionsPatch`](#contractxlsxworksheetprintoptionspatch) * [`SortRangeRowsHeaderMode`](#sortrangerowsheadermode) ### ContractPageBreakAreaBounds [Section titled “ContractPageBreakAreaBounds”](#contractpagebreakareabounds) ```ts interface ContractPageBreakAreaBounds { rowStart: number; rowEnd: number; colStart: number; colEnd: number; } ``` ### ContractPageBreakAreaProjection [Section titled “ContractPageBreakAreaProjection”](#contractpagebreakareaprojection) ```ts interface ContractPageBreakAreaProjection { bounds: ContractPageBreakAreaBounds; rowBreaks: ContractPageBreakLine[]; colBreaks: ContractPageBreakLine[]; pagesAcross: number; pagesDown: number; pageCount: number; } ``` ### ContractPageBreakKind [Section titled “ContractPageBreakKind”](#contractpagebreakkind) ```ts type ContractPageBreakKind = "manual" | "automatic"; ``` ### ContractPageBreakLine [Section titled “ContractPageBreakLine”](#contractpagebreakline) ```ts interface ContractPageBreakLine { position: number; kind: ContractPageBreakKind; } ``` ### ContractPageBreakPageSetup [Section titled “ContractPageBreakPageSetup”](#contractpagebreakpagesetup) ```ts interface ContractPageBreakPageSetup { paperSize: number; orientationLandscape: boolean; scale: number; marginLeftIn: number; marginRightIn: number; marginTopIn: number; marginBottomIn: number; } ``` ### ContractRemoveDuplicatesHeaderPolicy [Section titled “ContractRemoveDuplicatesHeaderPolicy”](#contractremoveduplicatesheaderpolicy) ```ts type ContractRemoveDuplicatesHeaderPolicy = "auto" | "present" | "absent"; ``` ### ContractWorksheetPageAxisRange [Section titled “ContractWorksheetPageAxisRange”](#contractworksheetpageaxisrange) ```ts interface ContractWorksheetPageAxisRange { start: number; end: number; } ``` ### ContractWorksheetPageBreakAxis [Section titled “ContractWorksheetPageBreakAxis”](#contractworksheetpagebreakaxis) ```ts type ContractWorksheetPageBreakAxis = "row" | "column"; ``` ### ContractWorksheetPageBreakIntent [Section titled “ContractWorksheetPageBreakIntent”](#contractworksheetpagebreakintent) ```ts type ContractWorksheetPageBreakIntent = | { action: "insert-at-cell"; rowPosition?: number | null; colPosition?: number | null; } | { action: "remove-at-cell"; rowPosition?: number | null; colPosition?: number | null; } | { action: "insert"; axis: ContractWorksheetPageBreakAxis; position: number } | { action: "remove"; axis: ContractWorksheetPageBreakAxis; position: number } | { action: "move"; axis: ContractWorksheetPageBreakAxis; fromPosition: number; toPosition: number; } | { action: "reset-all" }; ``` ### ContractWorksheetPageMargins [Section titled “ContractWorksheetPageMargins”](#contractworksheetpagemargins) ```ts interface ContractWorksheetPageMargins { left: number; right: number; top: number; bottom: number; header: number; footer: number; } ``` ### ContractWorksheetPageOrder [Section titled “ContractWorksheetPageOrder”](#contractworksheetpageorder) ```ts type ContractWorksheetPageOrder = "downThenOver" | "overThenDown"; ``` ### ContractWorksheetPageOrientation [Section titled “ContractWorksheetPageOrientation”](#contractworksheetpageorientation) ```ts type ContractWorksheetPageOrientation = "portrait" | "landscape"; ``` ### ContractWorksheetPageScaleMode [Section titled “ContractWorksheetPageScaleMode”](#contractworksheetpagescalemode) ```ts type ContractWorksheetPageScaleMode = "adjust" | "fit"; ``` ### ContractWorksheetPageSetup [Section titled “ContractWorksheetPageSetup”](#contractworksheetpagesetup) ```ts interface ContractWorksheetPageSetup { orientation: ContractWorksheetPageOrientation; paperSize: number; scaleMode: ContractWorksheetPageScaleMode; scaleDraft: string; fitToWidth: number; fitToHeight: number; margins: ContractWorksheetPageMargins; printGridLines: boolean; printHeadings: boolean; printArea?: ContractWorksheetPrintArea | null; printTitleRows?: ContractWorksheetPageAxisRange | null; printTitleColumns?: ContractWorksheetPageAxisRange | null; oddHeader?: string; oddFooter?: string; pageOrder?: ContractWorksheetPageOrder; } ``` ### ContractWorksheetPrintArea [Section titled “ContractWorksheetPrintArea”](#contractworksheetprintarea) ```ts interface ContractWorksheetPrintArea { rowStart: number; rowEnd: number; colStart: number; colEnd: number; } ``` ### ContractXlsxPrintAreaClearPatch [Section titled “ContractXlsxPrintAreaClearPatch”](#contractxlsxprintareaclearpatch) ```ts interface ContractXlsxPrintAreaClearPatch { activeSheetPath: string; } ``` ### ContractXlsxPrintAreaPatch [Section titled “ContractXlsxPrintAreaPatch”](#contractxlsxprintareapatch) ```ts interface ContractXlsxPrintAreaPatch { activeSheetPath: string; ref: string; } ``` ### ContractXlsxPrintTitlesClearPatch [Section titled “ContractXlsxPrintTitlesClearPatch”](#contractxlsxprinttitlesclearpatch) ```ts interface ContractXlsxPrintTitlesClearPatch { activeSheetPath: string; } ``` ### ContractXlsxPrintTitlesPatch [Section titled “ContractXlsxPrintTitlesPatch”](#contractxlsxprinttitlespatch) ```ts interface ContractXlsxPrintTitlesPatch { activeSheetPath: string; rowStart: number; rowEnd: number; } ``` ### ContractXlsxWorksheetHeaderFooterClearPatch [Section titled “ContractXlsxWorksheetHeaderFooterClearPatch”](#contractxlsxworksheetheaderfooterclearpatch) ```ts interface ContractXlsxWorksheetHeaderFooterClearPatch { activeSheetPath: string; } ``` ### ContractXlsxWorksheetHeaderFooterPatch [Section titled “ContractXlsxWorksheetHeaderFooterPatch”](#contractxlsxworksheetheaderfooterpatch) ```ts interface ContractXlsxWorksheetHeaderFooterPatch { activeSheetPath: string; oddHeader?: string | null; oddFooter?: string | null; } ``` ### ContractXlsxWorksheetPageBreakPatch [Section titled “ContractXlsxWorksheetPageBreakPatch”](#contractxlsxworksheetpagebreakpatch) ```ts interface ContractXlsxWorksheetPageBreakPatch { activeSheetPath: string; rowBreakId?: number | null; columnBreakId?: number | null; } ``` ### ContractXlsxWorksheetPageBreakResetPatch [Section titled “ContractXlsxWorksheetPageBreakResetPatch”](#contractxlsxworksheetpagebreakresetpatch) ```ts interface ContractXlsxWorksheetPageBreakResetPatch { activeSheetPath: string; } ``` ### ContractXlsxWorksheetPageSetupPatch [Section titled “ContractXlsxWorksheetPageSetupPatch”](#contractxlsxworksheetpagesetuppatch) ```ts interface ContractXlsxWorksheetPageSetupPatch { activeSheetPath: string; orientation?: "portrait" | "landscape" | null; paperSize?: number | null; scale?: number | null; fitToWidth?: number | null; fitToHeight?: number | null; pageMargins?: { left: number; right: number; top: number; bottom: number; header: number; footer: number; } | null; } ``` ### ContractXlsxWorksheetPrintOptionsPatch [Section titled “ContractXlsxWorksheetPrintOptionsPatch”](#contractxlsxworksheetprintoptionspatch) ```ts interface ContractXlsxWorksheetPrintOptionsPatch { activeSheetPath: string; gridLines?: boolean | null; headings?: boolean | null; } ``` ### SortRangeRowsHeaderMode [Section titled “SortRangeRowsHeaderMode”](#sortrangerowsheadermode) ```ts type SortRangeRowsHeaderMode = "auto" | "present" | "absent"; ``` # Types: protection and review > Compute Contract type definitions — protection, permissions, comments, tracked changes, and signatures. Names: 65. Definitions of the names from the “TypeScript type” column on the operation pages. Other dictionary topics: [session, workbook, and sheets](/reference/sumsheet/types-session/) · [cells and ranges](/reference/sumsheet/types-cells/) · [formulas and calculation](/reference/sumsheet/types-formulas/) · [formatting](/reference/sumsheet/types-format/) · [data and sheet objects](/reference/sumsheet/types-data/) · [pivot tables](/reference/sumsheet/types-pivot/) · [charts and graphics](/reference/sumsheet/types-charts/) · [printing and page layout](/reference/sumsheet/types-print/) · [Power Query](/reference/sumsheet/types-powerquery/) · [VBA and macros](/reference/sumsheet/types-vba/) · **protection and review** · [general and utility](/reference/sumsheet/types-common/). Types on this page — 65 * [`ContractCommentRichTextRun`](#contractcommentrichtextrun) * [`ContractCustomViewOutlineTrack`](#contractcustomviewoutlinetrack) * [`ContractOutlineTrackState`](#contractoutlinetrackstate) * [`ContractProtectedRangeAccessKind`](#contractprotectedrangeaccesskind) * [`ContractProtectedRangeView`](#contractprotectedrangeview) * [`ContractProtectedRangesIntent`](#contractprotectedrangesintent) * [`ContractProtectedRangesResult`](#contractprotectedrangesresult) * [`ContractProtectionAuditCategory`](#contractprotectionauditcategory) * [`ContractProtectionAuditFinding`](#contractprotectionauditfinding) * [`ContractProtectionAuditFindingKind`](#contractprotectionauditfindingkind) * [`ContractProtectionAuditIntent`](#contractprotectionauditintent) * [`ContractProtectionAuditNavigationTarget`](#contractprotectionauditnavigationtarget) * [`ContractProtectionAuditRemediation`](#contractprotectionauditremediation) * [`ContractProtectionAuditRemediationKind`](#contractprotectionauditremediationkind) * [`ContractProtectionAuditResult`](#contractprotectionauditresult) * [`ContractProtectionAuditSeverity`](#contractprotectionauditseverity) * [`ContractProtectionAuditStatus`](#contractprotectionauditstatus) * [`ContractProtectionSheetAuditState`](#contractprotectionsheetauditstate) * [`ContractProtectionWorkbookAuditState`](#contractprotectionworkbookauditstate) * [`ContractReviewAnchorCellMapping`](#contractreviewanchorcellmapping) * [`ContractReviewAnchorTransform`](#contractreviewanchortransform) * [`ContractReviewAnnotation`](#contractreviewannotation) * [`ContractReviewAnnotationKind`](#contractreviewannotationkind) * [`ContractReviewAnnotationSupportState`](#contractreviewannotationsupportstate) * [`ContractReviewAnnotationsIntent`](#contractreviewannotationsintent) * [`ContractReviewAnnotationsResult`](#contractreviewannotationsresult) * [`ContractReviewAnnotationsSnapshot`](#contractreviewannotationssnapshot) * [`ContractReviewAnnotationsState`](#contractreviewannotationsstate) * [`ContractReviewAnnotationsStatus`](#contractreviewannotationsstatus) * [`ContractReviewInkDeleteScope`](#contractreviewinkdeletescope) * [`ContractReviewInkIdentityLedgerEntry`](#contractreviewinkidentityledgerentry) * [`ContractReviewInkPreservedPart`](#contractreviewinkpreservedpart) * [`ContractReviewInkProjectionItem`](#contractreviewinkprojectionitem) * [`ContractReviewPerson`](#contractreviewperson) * [`ContractReviewReply`](#contractreviewreply) * [`ContractReviewTask`](#contractreviewtask) * [`ContractReviewTaskDeliveryScope`](#contractreviewtaskdeliveryscope) * [`ContractReviewTaskStatus`](#contractreviewtaskstatus) * [`ContractSheetProtectionAllowedAction`](#contractsheetprotectionallowedaction) * [`ContractSheetProtectionSessionAction`](#contractsheetprotectionsessionaction) * [`ContractThreadedCommentPayload`](#contractthreadedcommentpayload) * [`ContractThreadedCommentPayloadSource`](#contractthreadedcommentpayloadsource) * [`ContractThreadedCommentReplyPayload`](#contractthreadedcommentreplypayload) * [`ContractThreadedCommentTaskAssignment`](#contractthreadedcommenttaskassignment) * [`ContractTrackAxis`](#contracttrackaxis) * [`ContractTrackStructureAction`](#contracttrackstructureaction) * [`ContractTrackVisibilityOwner`](#contracttrackvisibilityowner) * [`ContractWorkbookProtectionIntent`](#contractworkbookprotectionintent) * [`ContractWorkbookProtectionResult`](#contractworkbookprotectionresult) * [`ContractXlsxThreadedCommentMutationPatch`](#contractxlsxthreadedcommentmutationpatch) * [`ContractXlsxThreadedCommentReplyPatch`](#contractxlsxthreadedcommentreplypatch) * [`ContractXlsxTrackTransferAxis`](#contractxlsxtracktransferaxis) * [`ContractXlsxTrackTransferMode`](#contractxlsxtracktransfermode) * [`ContractXlsxTrackTransferPatch`](#contractxlsxtracktransferpatch) * [`ContractXlsxWorkbookProtectionPatch`](#contractxlsxworkbookprotectionpatch) * [`OpcSignatureInventory`](#opcsignatureinventory) * [`OpcSignatureRecord`](#opcsignaturerecord) * [`SignatureAlgorithmKind`](#signaturealgorithmkind) * [`SignatureAlgorithmRecord`](#signaturealgorithmrecord) * [`SignatureAlgorithmSupport`](#signaturealgorithmsupport) * [`SignatureCertificateMetadata`](#signaturecertificatemetadata) * [`SignatureDigestState`](#signaturedigeststate) * [`SignatureTargetKind`](#signaturetargetkind) * [`SignatureTrustState`](#signaturetruststate) * [`SignedReferenceRecord`](#signedreferencerecord) ### ContractCommentRichTextRun [Section titled “ContractCommentRichTextRun”](#contractcommentrichtextrun) ```ts interface ContractCommentRichTextRun { text: string; fontFamily?: string | null; fontSize?: string | null; bold?: boolean | null; italic?: boolean | null; color?: string | null; language?: string | null; rtl?: boolean | null; } ``` ### ContractCustomViewOutlineTrack [Section titled “ContractCustomViewOutlineTrack”](#contractcustomviewoutlinetrack) ```ts interface ContractCustomViewOutlineTrack { axis: ContractCustomViewOutlineAxis; index: number; level: number; collapsed: boolean; } ``` ### ContractOutlineTrackState [Section titled “ContractOutlineTrackState”](#contractoutlinetrackstate) ```ts interface ContractOutlineTrackState { index: number; level: number; hidden: boolean; collapsed: boolean; } ``` ### ContractProtectedRangeAccessKind [Section titled “ContractProtectedRangeAccessKind”](#contractprotectedrangeaccesskind) ```ts type ContractProtectedRangeAccessKind = | "open" | "password" | "domain_permission" | "irm" | "unsupported_algorithm" | "invalid_verifier"; ``` ### ContractProtectedRangeView [Section titled “ContractProtectedRangeView”](#contractprotectedrangeview) ```ts interface ContractProtectedRangeView { id: string; sheetKey: string; sheetName: string; name: string; sqref: string; accessKind: ContractProtectedRangeAccessKind; supported: boolean; unlocked: boolean; unsupportedCode?: string | null; } ``` ### ContractProtectedRangesIntent [Section titled “ContractProtectedRangesIntent”](#contractprotectedrangesintent) ```ts type ContractProtectedRangesIntent = | { action: "list"; sheetKey: string } | ({ action: "create"; sheetKey: string; name: string; sqref: string; password?: string | null; } & ProtectedRangesMutationGuard) | ({ action: "update"; sheetKey: string; rangeId: string; name: string; sqref: string; clearPassword?: boolean; password?: string | null; } & ProtectedRangesMutationGuard) | ({ action: "rename"; sheetKey: string; rangeId: string; name: string; } & ProtectedRangesMutationGuard) | ({ action: "delete"; sheetKey: string; rangeId: string; } & ProtectedRangesMutationGuard) | { action: "unlock"; sheetKey: string; rangeId: string; password: string; expectedRevision?: number | null; } | { action: "lock"; sheetKey: string; rangeId: string; expectedRevision?: number | null; } | { action: "reset"; sheetKey?: string | null; expectedRevision?: number | null; } | ({ action: "undo" } & ProtectedRangesMutationGuard) | ({ action: "redo" } & ProtectedRangesMutationGuard); ``` ### ContractProtectedRangesResult [Section titled “ContractProtectedRangesResult”](#contractprotectedrangesresult) ```ts interface ContractProtectedRangesResult { status: | "listed" | "applied" | "unlocked" | "locked" | "reset" | "undone" | "redone"; revision: number; sheetKey: string; sheetName: string; entries: ContractProtectedRangeView[]; unlockedCount: number; undoDepth: number; redoDepth: number; mutatedCount: number; } ``` ### ContractProtectionAuditCategory [Section titled “ContractProtectionAuditCategory”](#contractprotectionauditcategory) ```ts type ContractProtectionAuditCategory = "workbook" | "sheet" | "cell" | "protected-range"; ``` ### ContractProtectionAuditFinding [Section titled “ContractProtectionAuditFinding”](#contractprotectionauditfinding) ```ts interface ContractProtectionAuditFinding { stableId: string; kind: ContractProtectionAuditFindingKind; category: ContractProtectionAuditCategory; severity: ContractProtectionAuditSeverity; reasonCode: string; sheetId?: string | null; sheetName?: string | null; locationLabel: string; navigationTarget: ContractProtectionAuditNavigationTarget; observedRevision: number; remediations?: ContractProtectionAuditRemediation[]; } ``` ### ContractProtectionAuditFindingKind [Section titled “ContractProtectionAuditFindingKind”](#contractprotectionauditfindingkind) ```ts type ContractProtectionAuditFindingKind = | "malformed-workbook-protection" | "unsupported-workbook-protection" | "malformed-sheet-protection" | "unsupported-sheet-protection-verifier" | "invalid-sheet-protection-verifier" | "malformed-protected-ranges" | "unsupported-protected-range" | "invalid-protected-range-verifier" | "non-canonical-protected-range-sqref" | "protected-ranges-inactive" | "hidden-cell-ineffective" | "hidden-non-formula-cell" | "missing-cell-style" | "session-authority-active" | "stale-session-authority"; ``` ### ContractProtectionAuditIntent [Section titled “ContractProtectionAuditIntent”](#contractprotectionauditintent) ```ts type ContractProtectionAuditIntent = | { action: "scan" } | { action: "apply"; findingId: string; remediation: ContractProtectionAuditRemediationKind; } | { action: "fix_all" } | { action: "undo" } | { action: "redo" }; ``` ### ContractProtectionAuditNavigationTarget [Section titled “ContractProtectionAuditNavigationTarget”](#contractprotectionauditnavigationtarget) ```ts type ContractProtectionAuditNavigationTarget = | { kind: "workbook" } | { kind: "sheet"; sheetId: string } | { kind: "cell"; sheetId: string; row: number; col: number; cellRef: string } | { kind: "protected-range"; sheetId: string; rangeId: string; sqref: string; }; ``` ### ContractProtectionAuditRemediation [Section titled “ContractProtectionAuditRemediation”](#contractprotectionauditremediation) ```ts interface ContractProtectionAuditRemediation { kind: ContractProtectionAuditRemediationKind; fixAllEligible: boolean; } ``` ### ContractProtectionAuditRemediationKind [Section titled “ContractProtectionAuditRemediationKind”](#contractprotectionauditremediationkind) ```ts type ContractProtectionAuditRemediationKind = "normalize-protected-range-sqref" | "revoke-session-authority"; ``` ### ContractProtectionAuditResult [Section titled “ContractProtectionAuditResult”](#contractprotectionauditresult) ```ts interface ContractProtectionAuditResult { requestId: string; generation: number; revision: number; status: ContractProtectionAuditStatus; reason?: string | null; workbook: ContractProtectionWorkbookAuditState; sheets: ContractProtectionSheetAuditState[]; totalFindingCount: number; returnedFindingCount: number; truncated: boolean; undoDepth: number; redoDepth: number; mutatedCount: number; packageMutated: boolean; findings: ContractProtectionAuditFinding[]; } ``` ### ContractProtectionAuditSeverity [Section titled “ContractProtectionAuditSeverity”](#contractprotectionauditseverity) ```ts type ContractProtectionAuditSeverity = "error" | "warning" | "info"; ``` ### ContractProtectionAuditStatus [Section titled “ContractProtectionAuditStatus”](#contractprotectionauditstatus) ```ts type ContractProtectionAuditStatus = "scanned" | "mutated" | "undone" | "redone" | "blocked"; ``` ### ContractProtectionSheetAuditState [Section titled “ContractProtectionSheetAuditState”](#contractprotectionsheetauditstate) ```ts interface ContractProtectionSheetAuditState { sheetId: string; sheetName: string; packageProtected: boolean; effectiveProtected: boolean; sessionUnlocked: boolean; allowedActions: string[]; presentCellCount: number; lockedCellCount: number; unlockedCellCount: number; hiddenCellCount: number; hiddenFormulaCellCount: number; malformedStyleReferenceCount: number; protectedRangeCount: number; unlockedProtectedRangeCount: number; overlapPairCount: number; } ``` ### ContractProtectionWorkbookAuditState [Section titled “ContractProtectionWorkbookAuditState”](#contractprotectionworkbookauditstate) ```ts interface ContractProtectionWorkbookAuditState { packageProtected: boolean; lockStructure: boolean; lockWindows: boolean; effectiveStructureLocked: boolean; effectiveWindowsLocked: boolean; sessionUnlocked: boolean; supported: boolean; stateCode?: string | null; } ``` ### ContractReviewAnchorCellMapping [Section titled “ContractReviewAnchorCellMapping”](#contractreviewanchorcellmapping) ```ts interface ContractReviewAnchorCellMapping { from: string; to: string; } ``` ### ContractReviewAnchorTransform [Section titled “ContractReviewAnchorTransform”](#contractreviewanchortransform) ```ts type ContractReviewAnchorTransform = | { kind: "copy_cells"; mappings: ContractReviewAnchorCellMapping[] } | { kind: "fill_cells"; mappings: ContractReviewAnchorCellMapping[] } | { kind: "move_cells"; mappings: ContractReviewAnchorCellMapping[] } | { kind: "insert_rows"; at: number; count: number } | { kind: "delete_rows"; at: number; count: number } | { kind: "insert_columns"; at: number; count: number } | { kind: "delete_columns"; at: number; count: number } | { kind: "reorder_rows"; mappings: ContractReviewAnchorCellMapping[] } | { kind: "filter_rows" } | { kind: "rename_sheet"; newSheetId: string } | { kind: "copy_sheet"; newSheetId: string } | { kind: "delete_sheet" }; ``` ### ContractReviewAnnotation [Section titled “ContractReviewAnnotation”](#contractreviewannotation) ```ts interface ContractReviewAnnotation { annotationId: string; kind: ContractReviewAnnotationKind; supportState: ContractReviewAnnotationSupportState; sheetId: string; cellRef: string; personId: string; author: string; text: string; paragraphs?: ContractTextParagraph[]; createdAt: string; modifiedAt: string; visible?: boolean; resolved?: boolean; replies?: ContractReviewReply[]; task?: ContractReviewTask | null; preservedMentionsXml?: string[]; } ``` ### ContractReviewAnnotationKind [Section titled “ContractReviewAnnotationKind”](#contractreviewannotationkind) ```ts type ContractReviewAnnotationKind = "legacy-note" | "threaded-comment"; ``` ### ContractReviewAnnotationSupportState [Section titled “ContractReviewAnnotationSupportState”](#contractreviewannotationsupportstate) ```ts type ContractReviewAnnotationSupportState = "live" | "unsupported-preserved"; ``` ### ContractReviewAnnotationsIntent [Section titled “ContractReviewAnnotationsIntent”](#contractreviewannotationsintent) ```ts type ContractReviewAnnotationsIntent = | { action: "list" } | { action: "upsert"; kind: ContractReviewAnnotationKind; cellRef: string; text: string; author: string; annotationId?: string; visible?: boolean; paragraphs?: ContractTextParagraph[]; } | { action: "delete"; annotationId: string } | { action: "reply"; annotationId: string; text: string; author: string } | { action: "delete_reply"; annotationId: string; replyId: string } | { action: "set_resolved"; annotationId: string; resolved: boolean } | { action: "set_task"; annotationId: string; title: string; assignee: string; } | { action: "set_task_completed"; annotationId: string; completed: boolean } | { action: "remove_task"; annotationId: string } | { action: "set_note_visibility"; annotationId: string; visible: boolean } | { action: "show_all_notes"; visible: boolean } | { action: "transform_anchors"; transform: ContractReviewAnchorTransform } | { action: "undo" } | { action: "redo" }; ``` ### ContractReviewAnnotationsResult [Section titled “ContractReviewAnnotationsResult”](#contractreviewannotationsresult) ```ts interface ContractReviewAnnotationsResult { requestId: string; generation: number; status: ContractReviewAnnotationsStatus; state: ContractReviewAnnotationsState; reason?: string; } ``` ### ContractReviewAnnotationsSnapshot [Section titled “ContractReviewAnnotationsSnapshot”](#contractreviewannotationssnapshot) ```ts interface ContractReviewAnnotationsSnapshot { sheetId: string; persons: ContractReviewPerson[]; annotations: ContractReviewAnnotation[]; } ``` ### ContractReviewAnnotationsState [Section titled “ContractReviewAnnotationsState”](#contractreviewannotationsstate) ```ts interface ContractReviewAnnotationsState { workbookId: string; revision: number; generation: number; undoStack: ContractReviewAnnotationsSnapshot[]; redoStack: ContractReviewAnnotationsSnapshot[]; } ``` ### ContractReviewAnnotationsStatus [Section titled “ContractReviewAnnotationsStatus”](#contractreviewannotationsstatus) ```ts type ContractReviewAnnotationsStatus = "listed" | "mutated" | "undone" | "redone" | "blocked"; ``` ### ContractReviewInkDeleteScope [Section titled “ContractReviewInkDeleteScope”](#contractreviewinkdeletescope) ```ts type ContractReviewInkDeleteScope = "sheet" | "workbook"; ``` ### ContractReviewInkIdentityLedgerEntry [Section titled “ContractReviewInkIdentityLedgerEntry”](#contractreviewinkidentityledgerentry) ```ts interface ContractReviewInkIdentityLedgerEntry { stableId: string; sheetPath: string; drawingPath: string; nonVisualId: string; relationshipIds: string[]; removedParts: string[]; } ``` ### ContractReviewInkPreservedPart [Section titled “ContractReviewInkPreservedPart”](#contractreviewinkpreservedpart) ```ts interface ContractReviewInkPreservedPart { partName: string; sha256: string; } ``` ### ContractReviewInkProjectionItem [Section titled “ContractReviewInkProjectionItem”](#contractreviewinkprojectionitem) ```ts interface ContractReviewInkProjectionItem { stableId: string; objectId: string; sheetPath: string; name: string; presenceStatus: ContractWorkbookObjectPresenceStatus; supportState: ContractWorkbookObjectSupportState; anchor: ContractObjectAnchor; inkXml: string; } ``` ### ContractReviewPerson [Section titled “ContractReviewPerson”](#contractreviewperson) ```ts interface ContractReviewPerson { personId: string; displayName: string; } ``` ### ContractReviewReply [Section titled “ContractReviewReply”](#contractreviewreply) ```ts interface ContractReviewReply { replyId: string; personId: string; author: string; text: string; createdAt: string; modifiedAt: string; } ``` ### ContractReviewTask [Section titled “ContractReviewTask”](#contractreviewtask) ```ts interface ContractReviewTask { taskId: string; title: string; assignee: string; status: ContractReviewTaskStatus; deliveryScope: ContractReviewTaskDeliveryScope; createdAt: string; modifiedAt: string; } ``` ### ContractReviewTaskDeliveryScope [Section titled “ContractReviewTaskDeliveryScope”](#contractreviewtaskdeliveryscope) ```ts type ContractReviewTaskDeliveryScope = "workbook-local-no-external-delivery"; ``` ### ContractReviewTaskStatus [Section titled “ContractReviewTaskStatus”](#contractreviewtaskstatus) ```ts type ContractReviewTaskStatus = "open" | "completed"; ``` ### ContractSheetProtectionAllowedAction [Section titled “ContractSheetProtectionAllowedAction”](#contractsheetprotectionallowedaction) ```ts type ContractSheetProtectionAllowedAction = | "selectLockedCells" | "selectUnlockedCells" | "formatCells" | "formatColumns" | "formatRows" | "insertColumns" | "insertRows" | "insertHyperlinks" | "deleteColumns" | "deleteRows" | "sort" | "autoFilter" | "pivotTables" | "editObjects" | "editScenarios"; ``` ### ContractSheetProtectionSessionAction [Section titled “ContractSheetProtectionSessionAction”](#contractsheetprotectionsessionaction) ```ts type ContractSheetProtectionSessionAction = "status" | "unlock" | "lock"; ``` ### ContractThreadedCommentPayload [Section titled “ContractThreadedCommentPayload”](#contractthreadedcommentpayload) ```ts interface ContractThreadedCommentPayload { source: ContractThreadedCommentPayloadSource; cellRef: string; author?: string | null; text: string; commentId?: string | null; personId?: string | null; createdAt?: string | null; modifiedAt?: string | null; resolved?: boolean; replies?: ContractThreadedCommentReplyPayload[] | null; taskAssignment?: ContractThreadedCommentTaskAssignment | null; preservedMentionsXml?: string[] | null; } ``` ### ContractThreadedCommentPayloadSource [Section titled “ContractThreadedCommentPayloadSource”](#contractthreadedcommentpayloadsource) ```ts type ContractThreadedCommentPayloadSource = "threaded-comments"; ``` ### ContractThreadedCommentReplyPayload [Section titled “ContractThreadedCommentReplyPayload”](#contractthreadedcommentreplypayload) ```ts interface ContractThreadedCommentReplyPayload { text: string; author?: string | null; replyId?: string | null; personId?: string | null; createdAt?: string | null; modifiedAt?: string | null; } ``` ### ContractThreadedCommentTaskAssignment [Section titled “ContractThreadedCommentTaskAssignment”](#contractthreadedcommenttaskassignment) ```ts interface ContractThreadedCommentTaskAssignment { source: | "f1-workbook-local-task-extension" | "f1-workbook-local-task-extension-malformed" | "f1-bounded-task-marker"; assignee: string; status: "open" | "completed" | "assigned" | ""; taskId?: string | null; title?: string | null; deliveryScope?: ContractReviewTaskDeliveryScope | null; createdAt?: string | null; modifiedAt?: string | null; } ``` ### ContractTrackAxis [Section titled “ContractTrackAxis”](#contracttrackaxis) ```ts type ContractTrackAxis = "row" | "column"; ``` ### ContractTrackStructureAction [Section titled “ContractTrackStructureAction”](#contracttrackstructureaction) ```ts type ContractTrackStructureAction = "insert" | "delete"; ``` ### ContractTrackVisibilityOwner [Section titled “ContractTrackVisibilityOwner”](#contracttrackvisibilityowner) ```ts type ContractTrackVisibilityOwner = "manual" | "filter"; ``` ### ContractWorkbookProtectionIntent [Section titled “ContractWorkbookProtectionIntent”](#contractworkbookprotectionintent) ```ts type ContractWorkbookProtectionIntent = | { action: "status" } | ({ action: "protect"; lockStructure: boolean; lockWindows: boolean; password?: string | null; } & WorkbookProtectionMutationGuard) | { action: "unlock"; password: string; expectedRevision?: number | null } | { action: "lock"; expectedRevision?: number | null } | { action: "reset" } | ({ action: "unprotect"; password?: string | null; } & WorkbookProtectionMutationGuard) | ({ action: "undo" } & WorkbookProtectionMutationGuard) | ({ action: "redo" } & WorkbookProtectionMutationGuard); ``` ### ContractWorkbookProtectionResult [Section titled “ContractWorkbookProtectionResult”](#contractworkbookprotectionresult) ```ts interface ContractWorkbookProtectionResult { status: | "status" | "protected" | "unlocked" | "locked" | "reset" | "unprotected" | "undone" | "redone"; revision: number; lockStructure: boolean; lockWindows: boolean; effectiveStructureLocked: boolean; effectiveWindowsLocked: boolean; passwordProtected: boolean; sessionUnlocked: boolean; supported: boolean; unsupportedCode?: string | null; undoDepth: number; redoDepth: number; mutatedCount: number; } ``` ### ContractXlsxThreadedCommentMutationPatch [Section titled “ContractXlsxThreadedCommentMutationPatch”](#contractxlsxthreadedcommentmutationpatch) ```ts interface ContractXlsxThreadedCommentMutationPatch { activeSheetPath: string; cellRef: string; action: "upsert" | "delete" | "reply" | "resolve" | "reopen" | "assign-task"; text?: string | null; author?: string | null; commentId?: string | null; personId?: string | null; createdAt?: string | null; modifiedAt?: string | null; resolved?: boolean | null; replyId?: string | null; replies?: ContractXlsxThreadedCommentReplyPatch[] | null; task?: ContractReviewTask | null; assignee?: string | null; } ``` ### ContractXlsxThreadedCommentReplyPatch [Section titled “ContractXlsxThreadedCommentReplyPatch”](#contractxlsxthreadedcommentreplypatch) ```ts interface ContractXlsxThreadedCommentReplyPatch { text: string; author?: string | null; replyId?: string | null; personId?: string | null; createdAt?: string | null; modifiedAt?: string | null; } ``` ### ContractXlsxTrackTransferAxis [Section titled “ContractXlsxTrackTransferAxis”](#contractxlsxtracktransferaxis) ```ts type ContractXlsxTrackTransferAxis = "row" | "column"; ``` ### ContractXlsxTrackTransferMode [Section titled “ContractXlsxTrackTransferMode”](#contractxlsxtracktransfermode) ```ts type ContractXlsxTrackTransferMode = "move" | "copy"; ``` ### ContractXlsxTrackTransferPatch [Section titled “ContractXlsxTrackTransferPatch”](#contractxlsxtracktransferpatch) ```ts interface ContractXlsxTrackTransferPatch { activeSheetPath: string; axis: ContractXlsxTrackTransferAxis; sourceStart: number; sourceEnd: number; targetStart: number; mode: ContractXlsxTrackTransferMode; } ``` ### ContractXlsxWorkbookProtectionPatch [Section titled “ContractXlsxWorkbookProtectionPatch”](#contractxlsxworkbookprotectionpatch) ```ts interface ContractXlsxWorkbookProtectionPatch { lockStructure?: boolean | null; lockWindows?: boolean | null; workbookPassword?: string | null; workbookAlgorithmName?: string | null; workbookHashValue?: string | null; workbookSaltValue?: string | null; workbookSpinCount?: number | string | null; } ``` ### OpcSignatureInventory [Section titled “OpcSignatureInventory”](#opcsignatureinventory) ```ts interface OpcSignatureInventory { schemaVersion: 1; signed: boolean; states: SignatureTrustState[]; originCount: number; signatureCount: number; signedPartCount: number; signedRelationshipCount: number; validDigestCount: number; invalidDigestCount: number; unsupportedDigestCount: number; malformed: boolean; errorCode?: string; trustProviderChecked: false; sourceBytesUnchanged: boolean; signatures: OpcSignatureRecord[]; } ``` ### OpcSignatureRecord [Section titled “OpcSignatureRecord”](#opcsignaturerecord) ```ts interface OpcSignatureRecord { signatureId: string; originId: string; partName: string; states: SignatureTrustState[]; algorithms: SignatureAlgorithmRecord[]; references: SignedReferenceRecord[]; certificates: SignatureCertificateMetadata[]; signatureValueVerified: false; certificateChainValidated: false; xadesOpaque: boolean; opaquePreserved: boolean; } ``` ### SignatureAlgorithmKind [Section titled “SignatureAlgorithmKind”](#signaturealgorithmkind) ```ts type SignatureAlgorithmKind = "digest" | "signature" | "canonicalization" | "transform"; ``` ### SignatureAlgorithmRecord [Section titled “SignatureAlgorithmRecord”](#signaturealgorithmrecord) ```ts interface SignatureAlgorithmRecord { kind: SignatureAlgorithmKind; uri: string; support: SignatureAlgorithmSupport; } ``` ### SignatureAlgorithmSupport [Section titled “SignatureAlgorithmSupport”](#signaturealgorithmsupport) ```ts type SignatureAlgorithmSupport = "supported" | "recognized-unverified" | "unsupported"; ``` ### SignatureCertificateMetadata [Section titled “SignatureCertificateMetadata”](#signaturecertificatemetadata) ```ts interface SignatureCertificateMetadata { fingerprintSha256: string; serialHex: string; subject: string; issuer: string; notBeforeUtc: string; notAfterUtc: string; expired: boolean; selfSigned: boolean; chainValidated: false; } ``` ### SignatureDigestState [Section titled “SignatureDigestState”](#signaturedigeststate) ```ts type SignatureDigestState = "valid" | "invalid" | "unsupported" | "not-checked"; ``` ### SignatureTargetKind [Section titled “SignatureTargetKind”](#signaturetargetkind) ```ts type SignatureTargetKind = | "part" | "relationship-set" | "same-document-object" | "external" | "malformed"; ``` ### SignatureTrustState [Section titled “SignatureTrustState”](#signaturetruststate) ```ts type SignatureTrustState = | "unsigned" | "trusted" | "untrusted" | "expired" | "invalid" | "modified" | "unsupported" | "malformed"; ``` ### SignedReferenceRecord [Section titled “SignedReferenceRecord”](#signedreferencerecord) ```ts interface SignedReferenceRecord { targetId: string; target: string; targetKind: SignatureTargetKind; digestMethod: string; digestState: SignatureDigestState; transformCount: number; } ``` # Types: session, workbook, and sheets > Compute Contract type definitions — workbook subset, revisions, viewport, properties, and compatibility. Names: 120. Definitions of the names from the “TypeScript type” column on the operation pages. Other dictionary topics: **session, workbook, and sheets** · [cells and ranges](/reference/sumsheet/types-cells/) · [formulas and calculation](/reference/sumsheet/types-formulas/) · [formatting](/reference/sumsheet/types-format/) · [data and sheet objects](/reference/sumsheet/types-data/) · [pivot tables](/reference/sumsheet/types-pivot/) · [charts and graphics](/reference/sumsheet/types-charts/) · [printing and page layout](/reference/sumsheet/types-print/) · [Power Query](/reference/sumsheet/types-powerquery/) · [VBA and macros](/reference/sumsheet/types-vba/) · [protection and review](/reference/sumsheet/types-protection/) · [general and utility](/reference/sumsheet/types-common/). Types on this page — 120 * [`CompatibilityCategory`](#compatibilitycategory) * [`CompatibilityFinding`](#compatibilityfinding) * [`CompatibilityFindingGroup`](#compatibilityfindinggroup) * [`CompatibilityInventoryReport`](#compatibilityinventoryreport) * [`CompatibilityLocation`](#compatibilitylocation) * [`CompatibilityRedactedReport`](#compatibilityredactedreport) * [`CompatibilitySeverity`](#compatibilityseverity) * [`CompatibilityTarget`](#compatibilitytarget) * [`ContractActiveSheetMeta`](#contractactivesheetmeta) * [`ContractCapabilityLevel`](#contractcapabilitylevel) * [`ContractContainerFamily`](#contractcontainerfamily) * [`ContractCurrentSubsetSaveRoute`](#contractcurrentsubsetsaveroute) * [`ContractCustomViewSheetSnapshot`](#contractcustomviewsheetsnapshot) * [`ContractCustomViewWindowSnapshot`](#contractcustomviewwindowsnapshot) * [`ContractDirectionPlaceholderSubset`](#contractdirectionplaceholdersubset) * [`ContractDocumentPropertiesCapability`](#contractdocumentpropertiescapability) * [`ContractExternalWorkbookReferenceTrustMetadata`](#contractexternalworkbookreferencetrustmetadata) * [`ContractFillAcrossSheetsMode`](#contractfillacrosssheetsmode) * [`ContractForecastSheetPlan`](#contractforecastsheetplan) * [`ContractForecastSheetPreviewRow`](#contractforecastsheetpreviewrow) * [`ContractFormulaTrustCellsWindow`](#contractformulatrustcellswindow) * [`ContractFreezePaneSubset`](#contractfreezepanesubset) * [`ContractGeometrySubset`](#contractgeometrysubset) * [`ContractLayoutMetricsSubset`](#contractlayoutmetricssubset) * [`ContractObjectStatusPlaceholderSubset`](#contractobjectstatusplaceholdersubset) * [`ContractSaveCapability`](#contractsavecapability) * [`ContractSessionDirection`](#contractsessiondirection) * [`ContractSheetBackgroundProjection`](#contractsheetbackgroundprojection) * [`ContractSheetKind`](#contractsheetkind) * [`ContractSheetObject`](#contractsheetobject) * [`ContractSheetObjectBounds`](#contractsheetobjectbounds) * [`ContractSheetObjectFamily`](#contractsheetobjectfamily) * [`ContractSheetObjectMutationAction`](#contractsheetobjectmutationaction) * [`ContractSheetObjectMutationIntent`](#contractsheetobjectmutationintent) * [`ContractSheetObjectPreservedSupportFamily`](#contractsheetobjectpreservedsupportfamily) * [`ContractSheetObjectStatus`](#contractsheetobjectstatus) * [`ContractSheetVisibilityState`](#contractsheetvisibilitystate) * [`ContractSourceTrustSessionBinding`](#contractsourcetrustsessionbinding) * [`ContractSubsetSessionInfo`](#contractsubsetsessioninfo) * [`ContractViewportReadiness`](#contractviewportreadiness) * [`ContractViewportReadinessState`](#contractviewportreadinessstate) * [`ContractWorkbookAccessibilityIntent`](#contractworkbookaccessibilityintent) * [`ContractWorkbookAccessibilityIssue`](#contractworkbookaccessibilityissue) * [`ContractWorkbookAccessibilityIssueKind`](#contractworkbookaccessibilityissuekind) * [`ContractWorkbookAccessibilityLocation`](#contractworkbookaccessibilitylocation) * [`ContractWorkbookAccessibilityNavigationTarget`](#contractworkbookaccessibilitynavigationtarget) * [`ContractWorkbookAccessibilityPackageFix`](#contractworkbookaccessibilitypackagefix) * [`ContractWorkbookAccessibilityRemediation`](#contractworkbookaccessibilityremediation) * [`ContractWorkbookAccessibilityRemediationKind`](#contractworkbookaccessibilityremediationkind) * [`ContractWorkbookAccessibilityResult`](#contractworkbookaccessibilityresult) * [`ContractWorkbookAccessibilitySeverity`](#contractworkbookaccessibilityseverity) * [`ContractWorkbookAccessibilityStatus`](#contractworkbookaccessibilitystatus) * [`ContractWorkbookCalculationMode`](#contractworkbookcalculationmode) * [`ContractWorkbookConnectionDestination`](#contractworkbookconnectiondestination) * [`ContractWorkbookConnectionEntry`](#contractworkbookconnectionentry) * [`ContractWorkbookConnectionLoadLink`](#contractworkbookconnectionloadlink) * [`ContractWorkbookConnectionsProjection`](#contractworkbookconnectionsprojection) * [`ContractWorkbookHistoryActiveSheetProjection`](#contractworkbookhistoryactivesheetprojection) * [`ContractWorkbookHistoryDirection`](#contractworkbookhistorydirection) * [`ContractWorkbookHistoryOwner`](#contractworkbookhistoryowner) * [`ContractWorkbookHistoryProjection`](#contractworkbookhistoryprojection) * [`ContractWorkbookLinkCachedValueTruth`](#contractworkbooklinkcachedvaluetruth) * [`ContractWorkbookLinkInventoryEntry`](#contractworkbooklinkinventoryentry) * [`ContractWorkbookLinkSourceKind`](#contractworkbooklinksourcekind) * [`ContractWorkbookLinkState`](#contractworkbooklinkstate) * [`ContractWorkbookLinkStructuredTable`](#contractworkbooklinkstructuredtable) * [`ContractWorkbookLinksIntent`](#contractworkbooklinksintent) * [`ContractWorkbookLinksResult`](#contractworkbooklinksresult) * [`ContractWorkbookLinksStatus`](#contractworkbooklinksstatus) * [`ContractWorkbookNamedView`](#contractworkbooknamedview) * [`ContractWorkbookNamedViewSnapshot`](#contractworkbooknamedviewsnapshot) * [`ContractWorkbookObjectAnchorState`](#contractworkbookobjectanchorstate) * [`ContractWorkbookObjectInventoryEntry`](#contractworkbookobjectinventoryentry) * [`ContractWorkbookObjectMutationCapabilities`](#contractworkbookobjectmutationcapabilities) * [`ContractWorkbookObjectPresenceStatus`](#contractworkbookobjectpresencestatus) * [`ContractWorkbookObjectRelationship`](#contractworkbookobjectrelationship) * [`ContractWorkbookObjectSupportState`](#contractworkbookobjectsupportstate) * [`ContractWorkbookObjectTargetState`](#contractworkbookobjecttargetstate) * [`ContractWorkbookObjectType`](#contractworkbookobjecttype) * [`ContractWorkbookReadiness`](#contractworkbookreadiness) * [`ContractWorkbookReadinessPhase`](#contractworkbookreadinessphase) * [`ContractWorkbookReadinessPhaseState`](#contractworkbookreadinessphasestate) * [`ContractWorkbookRevisionCellState`](#contractworkbookrevisioncellstate) * [`ContractWorkbookRevisionCellSummary`](#contractworkbookrevisioncellsummary) * [`ContractWorkbookRevisionConflict`](#contractworkbookrevisionconflict) * [`ContractWorkbookRevisionConflictKind`](#contractworkbookrevisionconflictkind) * [`ContractWorkbookRevisionDelta`](#contractworkbookrevisiondelta) * [`ContractWorkbookRevisionMergeOutcome`](#contractworkbookrevisionmergeoutcome) * [`ContractWorkbookRevisionMutation`](#contractworkbookrevisionmutation) * [`ContractWorkbookRevisionUnsupportedMutationKind`](#contractworkbookrevisionunsupportedmutationkind) * [`ContractWorkbookSheetMeta`](#contractworkbooksheetmeta) * [`ContractWorkbookThemeColorScheme`](#contractworkbookthemecolorscheme) * [`ContractWorkbookThemeFontsProjection`](#contractworkbookthemefontsprojection) * [`ContractWorkbookWindowCommandState`](#contractworkbookwindowcommandstate) * [`ContractWorkbookWindowSessionAction`](#contractworkbookwindowsessionaction) * [`ContractWorkbookWindowSessionIdentity`](#contractworkbookwindowsessionidentity) * [`ContractWorkbookWindowSessionProjection`](#contractworkbookwindowsessionprojection) * [`ContractWorkbookWindowViewProjection`](#contractworkbookwindowviewprojection) * [`ContractWorkbookWindowViewState`](#contractworkbookwindowviewstate) * [`ContractXlsxSheetBackgroundPatch`](#contractxlsxsheetbackgroundpatch) * [`ContractXlsxSheetFormatPatch`](#contractxlsxsheetformatpatch) * [`ContractXlsxTextBoxSheetPatch`](#contractxlsxtextboxsheetpatch) * [`ContractXlsxWorkbookActiveSheetPatch`](#contractxlsxworkbookactivesheetpatch) * [`ContractXlsxWorkbookThemeColorsPatch`](#contractxlsxworkbookthemecolorspatch) * [`ContractXlsxWorkbookThemePatch`](#contractxlsxworkbookthemepatch) * [`ContractXlsxWorkbookViewSelectionPatch`](#contractxlsxworkbookviewselectionpatch) * [`EditorSessionStamp`](#editorsessionstamp) * [`FormulaSubsetStatus`](#formulasubsetstatus) * [`OpenWorkbookSubsetProjectionPayload`](#openworkbooksubsetprojectionpayload) * [`SubsetSessionMode`](#subsetsessionmode) * [`ViewportWindow`](#viewportwindow) * [`WorkbookIdentityDescriptor`](#workbookidentitydescriptor) * [`WorkbookSelectorDescriptor`](#workbookselectordescriptor) * [`WorkbookSourceDescriptor`](#workbooksourcedescriptor) * [`WorkbookVersionByteProvenance`](#workbookversionbyteprovenance) * [`WorkbookVersionCategoryDiff`](#workbookversioncategorydiff) * [`WorkbookVersionCategorySupport`](#workbookversioncategorysupport) * [`WorkbookVersionCompareStatus`](#workbookversioncomparestatus) * [`WorkbookVersionFormat`](#workbookversionformat) * [`WorkbookVersionStructuralDiff`](#workbookversionstructuraldiff) ### CompatibilityCategory [Section titled “CompatibilityCategory”](#compatibilitycategory) ```ts type CompatibilityCategory = | "workbook_structure" | "formulas_calculation" | "formatting_layout" | "objects_media" | "data_connections" | "metadata_package"; ``` ### CompatibilityFinding [Section titled “CompatibilityFinding”](#compatibilityfinding) ```ts interface CompatibilityFinding { stableId: string; target: CompatibilityTarget; severity: CompatibilitySeverity; category: CompatibilityCategory; reasonCode: string; count: number; location: CompatibilityLocation; } ``` ### CompatibilityFindingGroup [Section titled “CompatibilityFindingGroup”](#compatibilityfindinggroup) ```ts interface CompatibilityFindingGroup { severity: CompatibilitySeverity; category: CompatibilityCategory; findingCount: number; } ``` ### CompatibilityInventoryReport [Section titled “CompatibilityInventoryReport”](#compatibilityinventoryreport) ```ts interface CompatibilityInventoryReport { schemaVersion: number; status: "scanned" | "blocked"; reasonCode: string; sourceFormat: string; selectedTarget: CompatibilityTarget; availableTargets: CompatibilityTarget[]; totalFindingCount: number; returnedFindingCount: number; truncated: boolean; signedPackage: boolean; readOnly: boolean; copyAllowed: boolean; reportFingerprint: string; findings: CompatibilityFinding[]; groups: CompatibilityFindingGroup[]; redactedReport: CompatibilityRedactedReport; } ``` ### CompatibilityLocation [Section titled “CompatibilityLocation”](#compatibilitylocation) ```ts type CompatibilityLocation = | { kind: "package" } | { kind: "sheet"; sheetKey: string; sheetName: string } | { kind: "cell"; sheetKey: string; sheetName: string; cellRef: string; row: number; col: number; } | { kind: "object"; sheetKey: string; sheetName: string; stableId: string; label: string; }; ``` ### CompatibilityRedactedReport [Section titled “CompatibilityRedactedReport”](#compatibilityredactedreport) ```ts interface CompatibilityRedactedReport { schemaVersion: number; target: CompatibilityTarget; reportFingerprint: string; totalFindingCount: number; returnedFindingCount: number; truncated: boolean; reasonCodes: string[]; stableFindingIds: string[]; groups: CompatibilityFindingGroup[]; } ``` ### CompatibilitySeverity [Section titled “CompatibilitySeverity”](#compatibilityseverity) ```ts type CompatibilitySeverity = "error" | "warning" | "info"; ``` ### CompatibilityTarget [Section titled “CompatibilityTarget”](#compatibilitytarget) ```ts type CompatibilityTarget = "xlsx" | "xls" | "csv" | "ods"; ``` ### ContractActiveSheetMeta [Section titled “ContractActiveSheetMeta”](#contractactivesheetmeta) ```ts interface ContractActiveSheetMeta { index: number; name: string; path: string; autoFilterRef?: string; } ``` ### ContractCapabilityLevel [Section titled “ContractCapabilityLevel”](#contractcapabilitylevel) ```ts type ContractCapabilityLevel = (typeof CONTRACT_CAPABILITY_LEVEL_IDS)[number]; ``` ### ContractContainerFamily [Section titled “ContractContainerFamily”](#contractcontainerfamily) ```ts type ContractContainerFamily = (typeof CONTRACT_CONTAINER_FAMILY_IDS)[number]; ``` ### ContractCurrentSubsetSaveRoute [Section titled “ContractCurrentSubsetSaveRoute”](#contractcurrentsubsetsaveroute) ```ts type ContractCurrentSubsetSaveRoute = (typeof CONTRACT_CURRENT_SUBSET_SAVE_ROUTE_IDS)[number]; ``` ### ContractCustomViewSheetSnapshot [Section titled “ContractCustomViewSheetSnapshot”](#contractcustomviewsheetsnapshot) ```ts interface ContractCustomViewSheetSnapshot { sheetKey: string; hiddenRows: number[]; hiddenColumns: number[]; filters: ContractCustomViewFilterSnapshot[]; outline: ContractCustomViewOutlineTrack[]; workbookViewMode?: "normal" | "page-layout" | "page-break-preview"; gridLinesVisible?: boolean; headingsVisible?: boolean; printOptionsXml?: string; pageMarginsXml?: string; pageSetupXml?: string; rowBreaksXml?: string; columnBreaksXml?: string; headerFooterXml?: string; } ``` ### ContractCustomViewWindowSnapshot [Section titled “ContractCustomViewWindowSnapshot”](#contractcustomviewwindowsnapshot) ```ts interface ContractCustomViewWindowSnapshot { activeSheetKey: string; activeCell: string; selection: string; scrollTopLeftCell: string; zoomScale: number; paneMode: "none" | "frozen" | "split"; freezePane?: ContractFreezePaneSubset; } ``` ### ContractDirectionPlaceholderSubset [Section titled “ContractDirectionPlaceholderSubset”](#contractdirectionplaceholdersubset) ```ts interface ContractDirectionPlaceholderSubset { kind: ContractDirectionPlaceholderKind; workbookDirection: ContractSessionDirection; activeSheetDirection: ContractSessionDirection; writingMode: ContractWritingModePlaceholder; } ``` ### ContractDocumentPropertiesCapability [Section titled “ContractDocumentPropertiesCapability”](#contractdocumentpropertiescapability) ```ts type ContractDocumentPropertiesCapability = "edit_live" | "save_copy_only" | "blocked"; ``` ### ContractExternalWorkbookReferenceTrustMetadata [Section titled “ContractExternalWorkbookReferenceTrustMetadata”](#contractexternalworkbookreferencetrustmetadata) ```ts interface ContractExternalWorkbookReferenceTrustMetadata { label: string; externalWorkbookIdentity: string; sheetName?: string | null; referenceText: string; shape: string; resolutionState: string; } ``` ### ContractFillAcrossSheetsMode [Section titled “ContractFillAcrossSheetsMode”](#contractfillacrosssheetsmode) ```ts type ContractFillAcrossSheetsMode = "all" | "contents" | "formats"; ``` ### ContractForecastSheetPlan [Section titled “ContractForecastSheetPlan”](#contractforecastsheetplan) ```ts interface ContractForecastSheetPlan { generation: number; sourcePointCount: number; normalizedPointCount: number; forecastPointCount: number; missingPointCount: number; duplicatePointCount: number; step: number; forecastEnd: number; seasonality: number; confidenceLevel: number; dateSystem: string; outputSheetName: string; tableStableId: string; chartStableId: string; chartType: "line" | "column"; previewTruncated: boolean; rows: ContractForecastSheetPreviewRow[]; warnings: string[]; } ``` ### ContractForecastSheetPreviewRow [Section titled “ContractForecastSheetPreviewRow”](#contractforecastsheetpreviewrow) ```ts interface ContractForecastSheetPreviewRow { timeline: number; actual?: number | null; forecast?: number | null; lowerConfidenceBound?: number | null; upperConfidenceBound?: number | null; } ``` ### ContractFormulaTrustCellsWindow [Section titled “ContractFormulaTrustCellsWindow”](#contractformulatrustcellswindow) ```ts interface ContractFormulaTrustCellsWindow { sheetKey: string; top: number; left: number; rows: number; cols: number; } ``` ### ContractFreezePaneSubset [Section titled “ContractFreezePaneSubset”](#contractfreezepanesubset) ```ts interface ContractFreezePaneSubset { topLeftCell?: string; xSplit?: number; ySplit?: number; } ``` ### ContractGeometrySubset [Section titled “ContractGeometrySubset”](#contractgeometrysubset) ```ts interface ContractGeometrySubset { usedRange: string; usedRangeProvenance?: | "worksheet-dimension" | "indexed-cell-extent" | "delimited-record-index" | "parsed-cell-extent" | "session-recalculation"; usedRangeFinality?: "provisional" | "final"; maxRow: number; maxCol: number; presentCellCount: number; } ``` ### ContractLayoutMetricsSubset [Section titled “ContractLayoutMetricsSubset”](#contractlayoutmetricssubset) ```ts interface ContractLayoutMetricsSubset { normalStyleFont?: ContractNormalStyleFont | null; rowHeights: ContractRowHeight[]; recalculateRowHeights?: number[]; columnWidths: ContractColumnWidth[]; defaultRowHeight?: number | null; defaultColumnWidth?: number | null; baseColumnWidth?: number | null; hiddenRows?: number[]; manualHiddenRows?: number[]; filterHiddenRows?: number[]; hiddenColumns?: number[]; merges?: string[]; freezePane?: ContractFreezePaneSubset; gridLinesVisible?: boolean | null; showFormulas?: boolean | null; headingsVisible?: boolean | null; workbookViewMode?: "normal" | "page-layout" | "page-break-preview" | null; scrollTopLeftCell?: string | null; zoomScale?: number | null; activeCell?: string | null; selection?: string | null; selectionPane?: "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | null; sheetViews?: ContractWorkbookNamedView[] | null; sheetViewActiveId?: string | null; customViews?: ContractWorkbookNamedView[] | null; customViewActiveId?: string | null; } ``` ### ContractObjectStatusPlaceholderSubset [Section titled “ContractObjectStatusPlaceholderSubset”](#contractobjectstatusplaceholdersubset) ```ts interface ContractObjectStatusPlaceholderSubset { scope: ContractObjectPlaceholderScope; families: ContractObjectFamilyStatusPlaceholder[]; } ``` ### ContractSaveCapability [Section titled “ContractSaveCapability”](#contractsavecapability) ```ts type ContractSaveCapability = (typeof CONTRACT_SAVE_CAPABILITY_IDS)[number]; ``` ### ContractSessionDirection [Section titled “ContractSessionDirection”](#contractsessiondirection) ```ts type ContractSessionDirection = "ltr"; ``` ### ContractSheetBackgroundProjection [Section titled “ContractSheetBackgroundProjection”](#contractsheetbackgroundprojection) ```ts interface ContractSheetBackgroundProjection { mimeType: "image/png" | "image/jpeg" | "image/gif"; dataUrl: string; } ``` ### ContractSheetKind [Section titled “ContractSheetKind”](#contractsheetkind) ```ts type ContractSheetKind = "worksheet" | "chartSheet"; ``` ### ContractSheetObject [Section titled “ContractSheetObject”](#contractsheetobject) ```ts interface ContractSheetObject { id: string; stableId?: string; name?: string | null; altText?: string | null; title?: string | null; description?: string | null; decorative?: boolean; family: ContractSheetObjectFamily; status: ContractSheetObjectStatus; preservedSupportFamily?: ContractSheetObjectPreservedSupportFamily | null; renderMode?: string | null; bounds?: ContractSheetObjectBounds; anchor: ContractObjectAnchor; relTarget?: string | null; targetMode?: string | null; payloadRef: string; zOrder: number; readingOrder?: number; visible?: boolean; locked?: boolean; printObject?: boolean; locksWithSheet?: boolean; groupId?: string | null; parentGroupId?: string | null; groupDepth?: number; rotationDeg?: number | null; imageFlipH?: boolean; imageFlipV?: boolean; aspectLocked?: boolean; imageCrop?: ContractDrawingObjectImageCrop | null; imagePayload?: ContractImagePayload | null; graphicKind?: "svg" | null; linkedPicturePayload?: ContractLinkedPicturePayload | null; chartPayload?: ContractChartPayload | null; legacyNotePayload?: ContractLegacyNotePayload | null; threadedCommentPayload?: ContractThreadedCommentPayload | null; textPayload?: ContractTextPayload | null; smartArtPayload?: ContractSmartArtPayload | null; wordArtPayload?: ContractWordArtPayload | null; slicerPayload?: ContractSlicerPayload | null; groupMembers?: ContractSheetObject[] | null; presetGeometry?: string | null; shapePayload?: { prst: string; fill?: string | null; fillThemeSlot?: number | null; fillThemeLumMod?: number | null; fillThemeLumOff?: number | null; fillThemeTint?: number | null; fillThemeShade?: number | null; stroke?: string | null; strokeThemeSlot?: number | null; strokeThemeLumMod?: number | null; strokeThemeLumOff?: number | null; strokeThemeTint?: number | null; strokeThemeShade?: number | null; adjust?: number | null; sourceId?: string | number | null; sourceAnchor?: string | null; targetId?: string | number | null; targetAnchor?: string | null; flipH?: boolean; flipV?: boolean; routePoints?: number[] | null; lineKind?: "line" | "arrow" | "doubleArrow"; lineWidthEmu?: number | null; rawAnchorXml?: string | null; adjustments?: ReadonlyArray<{ name: string; val: number }> | null; strokeDash?: string | null; isManagedShape?: boolean; originalNvId?: number | null; freeformPoints?: ReadonlyArray<{ x: number; y: number; c1x?: number | null; c1y?: number | null; c2x?: number | null; c2y?: number | null; }> | null; isClosed?: boolean | null; fillOpacity?: number | null; strokeWidth?: number | null; strokeOpacity?: number | null; strokeCap?: string | null; strokeJoin?: string | null; shadowColor?: string | null; shadowBlur?: number | null; shadowAngle?: number | null; shadowDist?: number | null; shadowOpacity?: number | null; glowColor?: string | null; glowSize?: number | null; glowOpacity?: number | null; softEdges?: number | null; reflectionOpacity?: number | null; reflectionBlur?: number | null; reflectionDistance?: number | null; reflectionSize?: number | null; bevelTopPreset?: string | null; bevelTopWidth?: number | null; bevelTopHeight?: number | null; bevelBottomPreset?: string | null; bevelBottomWidth?: number | null; bevelBottomHeight?: number | null; depthColor?: string | null; depth?: number | null; contourColor?: string | null; contourWidth?: number | null; material?: string | null; lightingRig?: string | null; lightingAngle?: number | null; cameraPreset?: string | null; rotationX?: number | null; rotationY?: number | null; rotationZ?: number | null; perspective?: number | null; gradientFill?: boolean | null; gradientAngle?: number | null; gradientColor1?: string | null; gradientColor2?: string | null; arrowBeginType?: string | null; arrowBeginSize?: string | null; arrowBeginLength?: string | null; arrowBeginWidth?: string | null; arrowEndType?: string | null; arrowEndSize?: string | null; arrowEndLength?: string | null; arrowEndWidth?: string | null; strokeCompound?: string | null; headEnd?: string | null; tailEnd?: string | null; } | null; } ``` ### ContractSheetObjectBounds [Section titled “ContractSheetObjectBounds”](#contractsheetobjectbounds) ```ts interface ContractSheetObjectBounds { x: number; y: number; width: number; height: number; } ``` ### ContractSheetObjectFamily [Section titled “ContractSheetObjectFamily”](#contractsheetobjectfamily) ```ts type ContractSheetObjectFamily = "chart" | "image" | "shape" | "media" | "comments-notes"; ``` ### ContractSheetObjectMutationAction [Section titled “ContractSheetObjectMutationAction”](#contractsheetobjectmutationaction) ```ts type ContractSheetObjectMutationAction = "create" | "edit" | "move" | "resize" | "delete"; ``` ### ContractSheetObjectMutationIntent [Section titled “ContractSheetObjectMutationIntent”](#contractsheetobjectmutationintent) ```ts interface ContractSheetObjectMutationIntent { sheetId: string; action: ContractSheetObjectMutationAction; stableId?: string | null; } ``` ### ContractSheetObjectPreservedSupportFamily [Section titled “ContractSheetObjectPreservedSupportFamily”](#contractsheetobjectpreservedsupportfamily) ```ts type ContractSheetObjectPreservedSupportFamily = | "smart-art" | "ink" | "embedded-ole" | "embedded-package" | "media-placeholder" | "control-placeholder" | "active-x-control" | "form-control" | "audio" | "video" | "unknown"; ``` ### ContractSheetObjectStatus [Section titled “ContractSheetObjectStatus”](#contractsheetobjectstatus) ```ts type ContractSheetObjectStatus = | "cataloged" | "placeholder" | "broken-rel" | "external-target" | "unsupported"; ``` ### ContractSheetVisibilityState [Section titled “ContractSheetVisibilityState”](#contractsheetvisibilitystate) ```ts type ContractSheetVisibilityState = "visible" | "hidden" | "veryHidden"; ``` ### ContractSourceTrustSessionBinding [Section titled “ContractSourceTrustSessionBinding”](#contractsourcetrustsessionbinding) ```ts interface ContractSourceTrustSessionBinding { sourceIdentity: string; authority: Exclude; } ``` ### ContractSubsetSessionInfo [Section titled “ContractSubsetSessionInfo”](#contractsubsetsessioninfo) ```ts interface ContractSubsetSessionInfo { mode: SubsetSessionMode; reusableWithinProcess: boolean; reusableAcrossProcessLaunches: boolean; note: string; } ``` ### ContractViewportReadiness [Section titled “ContractViewportReadiness”](#contractviewportreadiness) ```ts interface ContractViewportReadiness { schemaVersion: 1; state: ContractViewportReadinessState; subsetId: string; generation: number; terminal: boolean; retryOnTransition: boolean; projectionPublished: boolean; detail: string; } ``` ### ContractViewportReadinessState [Section titled “ContractViewportReadinessState”](#contractviewportreadinessstate) ```ts type ContractViewportReadinessState = "ready" | "deferred" | "cancelled" | "superseded" | "failed"; ``` ### ContractWorkbookAccessibilityIntent [Section titled “ContractWorkbookAccessibilityIntent”](#contractworkbookaccessibilityintent) ```ts type ContractWorkbookAccessibilityIntent = | { action: "scan" } | { action: "apply"; issueId: string; remediation: ContractWorkbookAccessibilityRemediationKind; value?: string; } | { action: "fix_all" } | { action: "undo" } | { action: "redo" }; ``` ### ContractWorkbookAccessibilityIssue [Section titled “ContractWorkbookAccessibilityIssue”](#contractworkbookaccessibilityissue) ```ts interface ContractWorkbookAccessibilityIssue { stableId: string; kind: ContractWorkbookAccessibilityIssueKind; severity: ContractWorkbookAccessibilitySeverity; location: ContractWorkbookAccessibilityLocation; explanationCode: string; navigationTarget: ContractWorkbookAccessibilityNavigationTarget; observedRevision: number; remediations?: ContractWorkbookAccessibilityRemediation[]; } ``` ### ContractWorkbookAccessibilityIssueKind [Section titled “ContractWorkbookAccessibilityIssueKind”](#contractworkbookaccessibilityissuekind) ```ts type ContractWorkbookAccessibilityIssueKind = | "missing-object-alt-text" | "weak-object-alt-text" | "decorative-object" | "decorative-metadata-conflict" | "low-text-fill-contrast" | "merged-cell-hazard" | "blank-table-header" | "duplicate-table-header" | "ambiguous-hyperlink-text" | "hidden-sheet-with-content" | "empty-sheet-name" | "inaccessible-comment-authorship" | "inaccessible-note-authorship" | "chart-title-gap" | "chart-description-gap" | "non-text-content"; ``` ### ContractWorkbookAccessibilityLocation [Section titled “ContractWorkbookAccessibilityLocation”](#contractworkbookaccessibilitylocation) ```ts interface ContractWorkbookAccessibilityLocation { sheetId: string; sheetName: string; label: string; cellRef?: string; objectStableId?: string; tableName?: string; } ``` ### ContractWorkbookAccessibilityNavigationTarget [Section titled “ContractWorkbookAccessibilityNavigationTarget”](#contractworkbookaccessibilitynavigationtarget) ```ts type ContractWorkbookAccessibilityNavigationTarget = | { kind: "cell"; sheetId: string; row: number; col: number; cellRef: string } | { kind: "object"; sheetId: string; stableId: string } | { kind: "sheet"; sheetId: string } | { kind: "table-header"; sheetId: string; tableName: string; columnIndex: number; cellRef: string; }; ``` ### ContractWorkbookAccessibilityPackageFix [Section titled “ContractWorkbookAccessibilityPackageFix”](#contractworkbookaccessibilitypackagefix) ```ts type ContractWorkbookAccessibilityPackageFix = | { action: "set-object-accessibility"; sheetId: string; stableId: string; title?: string; description?: string; decorative: boolean; } | { action: "set-chart-title"; sheetId: string; stableId: string; chartPath: string; title: string; } | { action: "set-table-header"; sheetId: string; tableName: string; columnIndex: number; value: string; } | { action: "set-hyperlink-text"; sheetId: string; row: number; col: number; value: string; } | { action: "set-sheet-state"; sheetId: string; name?: string; visibility?: ContractSheetVisibilityState; }; ``` ### ContractWorkbookAccessibilityRemediation [Section titled “ContractWorkbookAccessibilityRemediation”](#contractworkbookaccessibilityremediation) ```ts interface ContractWorkbookAccessibilityRemediation { kind: ContractWorkbookAccessibilityRemediationKind; requiresValue: boolean; defaultValue?: string; fixAllEligible: boolean; } ``` ### ContractWorkbookAccessibilityRemediationKind [Section titled “ContractWorkbookAccessibilityRemediationKind”](#contractworkbookaccessibilityremediationkind) ```ts type ContractWorkbookAccessibilityRemediationKind = | "set-object-alt-text" | "mark-object-decorative" | "repair-table-header" | "add-chart-title" | "add-chart-description" | "rename-hyperlink-text" | "rename-sheet" | "unhide-sheet"; ``` ### ContractWorkbookAccessibilityResult [Section titled “ContractWorkbookAccessibilityResult”](#contractworkbookaccessibilityresult) ```ts interface ContractWorkbookAccessibilityResult { requestId: string; generation: number; revision: number; status: ContractWorkbookAccessibilityStatus; reason?: string; totalIssueCount: number; returnedIssueCount: number; truncated: boolean; undoDepth: number; redoDepth: number; issues: ContractWorkbookAccessibilityIssue[]; approvedPackageFixes?: ContractWorkbookAccessibilityPackageFix[]; } ``` ### ContractWorkbookAccessibilitySeverity [Section titled “ContractWorkbookAccessibilitySeverity”](#contractworkbookaccessibilityseverity) ```ts type ContractWorkbookAccessibilitySeverity = "error" | "warning" | "info"; ``` ### ContractWorkbookAccessibilityStatus [Section titled “ContractWorkbookAccessibilityStatus”](#contractworkbookaccessibilitystatus) ```ts type ContractWorkbookAccessibilityStatus = "scanned" | "mutated" | "undone" | "redone" | "blocked"; ``` ### ContractWorkbookCalculationMode [Section titled “ContractWorkbookCalculationMode”](#contractworkbookcalculationmode) ```ts type ContractWorkbookCalculationMode = "automatic" | "automatic_except_data_tables" | "manual" | "unknown"; ``` ### ContractWorkbookConnectionDestination [Section titled “ContractWorkbookConnectionDestination”](#contractworkbookconnectiondestination) ```ts type ContractWorkbookConnectionDestination = | { mode: "connection_only" } | { mode: "existing_sheet"; sheetName: string; anchor: string } | { mode: "new_sheet"; sheetName: string }; ``` ### ContractWorkbookConnectionEntry [Section titled “ContractWorkbookConnectionEntry”](#contractworkbookconnectionentry) ```ts interface ContractWorkbookConnectionEntry { identity: string; id: string; ownerQueryIdentity?: string | null; name?: string | null; description?: string | null; connectionTypeCode?: string | null; refreshedVersion?: string | null; backgroundRefresh?: boolean | null; saveData?: boolean | null; provider?: string | null; queryLocation?: string | null; command?: string | null; connectionStringWhollyRedacted: boolean; sourceKind: string; loadDestination: string; refreshState: string; packageOwner: string; packageParts: string[]; legacyReadOnly: boolean; } ``` ### ContractWorkbookConnectionLoadLink [Section titled “ContractWorkbookConnectionLoadLink”](#contractworkbookconnectionloadlink) ```ts interface ContractWorkbookConnectionLoadLink { identity: string; connectionId: string; queryIdentity?: string | null; connectionName?: string | null; queryLocation?: string | null; queryTableName?: string | null; queryTablePart?: string | null; } ``` ### ContractWorkbookConnectionsProjection [Section titled “ContractWorkbookConnectionsProjection”](#contractworkbookconnectionsprojection) ```ts interface ContractWorkbookConnectionsProjection { scope: string; source: string; connectionCount: number; connections: ContractWorkbookConnectionEntry[]; loadLinks: ContractWorkbookConnectionLoadLink[]; note: string; } ``` ### ContractWorkbookHistoryActiveSheetProjection [Section titled “ContractWorkbookHistoryActiveSheetProjection”](#contractworkbookhistoryactivesheetprojection) ```ts interface ContractWorkbookHistoryActiveSheetProjection { activeSheet: ContractActiveSheetMeta; workbookSheets: ContractWorkbookSheetMeta[]; geometry: ContractGeometrySubset; viewport: ViewportWindow; previewCells: ContractPreviewCell[]; layoutMetrics?: ContractLayoutMetricsSubset; } ``` ### ContractWorkbookHistoryDirection [Section titled “ContractWorkbookHistoryDirection”](#contractworkbookhistorydirection) ```ts type ContractWorkbookHistoryDirection = "undo" | "redo"; ``` ### ContractWorkbookHistoryOwner [Section titled “ContractWorkbookHistoryOwner”](#contractworkbookhistoryowner) ```ts type ContractWorkbookHistoryOwner = | "cell" | "range" | "revision_merge" | "defined_names" | "sheet_lifecycle" | "review_annotations" | "table_lifecycle" | "drawing_objects" | "sparklines" | "scenarios" | "custom_views" | "theme_colors" | "fill_across_sheets" | "calculation_properties"; ``` ### ContractWorkbookHistoryProjection [Section titled “ContractWorkbookHistoryProjection”](#contractworkbookhistoryprojection) ```ts interface ContractWorkbookHistoryProjection { owner?: ContractWorkbookHistoryOwner | null; undoDepth: number; redoDepth: number; revision: number; } ``` ### ContractWorkbookLinkCachedValueTruth [Section titled “ContractWorkbookLinkCachedValueTruth”](#contractworkbooklinkcachedvaluetruth) ```ts type ContractWorkbookLinkCachedValueTruth = "imported_cache" | "refreshed" | "frozen_value" | "unavailable"; ``` ### ContractWorkbookLinkInventoryEntry [Section titled “ContractWorkbookLinkInventoryEntry”](#contractworkbooklinkinventoryentry) ```ts interface ContractWorkbookLinkInventoryEntry { id: string; displayName: string; sourceKind: ContractWorkbookLinkSourceKind; state: ContractWorkbookLinkState; cachedValueTruth: ContractWorkbookLinkCachedValueTruth; formulaCellCount: number; definedNameCount: number; cachedCellCount: number; structuredTables: ContractWorkbookLinkStructuredTable[]; sourceRevision?: string; canUpdate: boolean; canChangeSource: boolean; canOpenSource: boolean; canBreakLink: boolean; } ``` ### ContractWorkbookLinkSourceKind [Section titled “ContractWorkbookLinkSourceKind”](#contractworkbooklinksourcekind) ```ts type ContractWorkbookLinkSourceKind = "local" | "network" | "cloud" | "unknown"; ``` ### ContractWorkbookLinkState [Section titled “ContractWorkbookLinkState”](#contractworkbooklinkstate) ```ts type ContractWorkbookLinkState = | "cached" | "trusted" | "current" | "missing" | "moved" | "corrupt" | "blocked" | "broken"; ``` ### ContractWorkbookLinkStructuredTable [Section titled “ContractWorkbookLinkStructuredTable”](#contractworkbooklinkstructuredtable) ```ts interface ContractWorkbookLinkStructuredTable { workbookIdentity: string; sheetName: string; tableName: string; columnNames: string[]; totalsRowPresent: boolean; } ``` ### ContractWorkbookLinksIntent [Section titled “ContractWorkbookLinksIntent”](#contractworkbooklinksintent) ```ts type ContractWorkbookLinksIntent = | { action: "list" } | { action: "startup_decision"; trustLocalSources: boolean; expectedRevision: number; } | { action: "update_values"; linkIds?: string[]; expectedRevision: number } | { action: "change_source"; linkId: string; sourceUri: string; expectedRevision: number; } | { action: "open_source"; linkId: string; expectedRevision: number } | { action: "break_link"; linkIds?: string[]; expectedRevision: number } | { action: "undo"; expectedRevision: number } | { action: "redo"; expectedRevision: number }; ``` ### ContractWorkbookLinksResult [Section titled “ContractWorkbookLinksResult”](#contractworkbooklinksresult) ```ts interface ContractWorkbookLinksResult { status: ContractWorkbookLinksStatus; revision: number; links: ContractWorkbookLinkInventoryEntry[]; transactionId?: string; openSourceUri?: string; reason?: string; } ``` ### ContractWorkbookLinksStatus [Section titled “ContractWorkbookLinksStatus”](#contractworkbooklinksstatus) ```ts type ContractWorkbookLinksStatus = | "listed" | "trust_applied" | "updated" | "source_changed" | "source_opened" | "links_broken" | "undone" | "redone" | "blocked"; ``` ### ContractWorkbookNamedView [Section titled “ContractWorkbookNamedView”](#contractworkbooknamedview) ```ts interface ContractWorkbookNamedView { id: string; name: string; snapshot: ContractWorkbookNamedViewSnapshot; } ``` ### ContractWorkbookNamedViewSnapshot [Section titled “ContractWorkbookNamedViewSnapshot”](#contractworkbooknamedviewsnapshot) ```ts interface ContractWorkbookNamedViewSnapshot { workbookViewMode?: "normal" | "page-layout" | "page-break-preview" | null; gridLinesVisible?: boolean | null; headingsVisible?: boolean | null; formulaBarVisible?: boolean | null; rulerVisible?: boolean | null; zoomScale?: number | null; windowCount?: number | null; windowActive?: number | null; windowArranged?: boolean | null; windowSideBySide?: boolean | null; windowSynchronousScrolling?: boolean | null; } ``` ### ContractWorkbookObjectAnchorState [Section titled “ContractWorkbookObjectAnchorState”](#contractworkbookobjectanchorstate) ```ts type ContractWorkbookObjectAnchorState = "resolved" | "unavailable" | "broken"; ``` ### ContractWorkbookObjectInventoryEntry [Section titled “ContractWorkbookObjectInventoryEntry”](#contractworkbookobjectinventoryentry) ```ts interface ContractWorkbookObjectInventoryEntry { stableId: string; objectId: string; sheetIndex: number; sheetName: string; sheetPath: string; objectType: ContractWorkbookObjectType; name: string; title?: string | null; description?: string | null; altText?: string | null; decorative: boolean; supportState: ContractWorkbookObjectSupportState; presenceStatus: ContractWorkbookObjectPresenceStatus; targetState: ContractWorkbookObjectTargetState; editable: boolean; navigable: boolean; mutationCapabilities: ContractWorkbookObjectMutationCapabilities; anchorState: ContractWorkbookObjectAnchorState; anchor: ContractObjectAnchor; relationships: ContractWorkbookObjectRelationship[]; zOrder: number; readingOrder: number; visible: boolean; locked: boolean; printObject: boolean; locksWithSheet: boolean; groupId?: string | null; parentGroupId?: string | null; groupDepth: number; cellRef?: string | null; formControl?: ContractFormControlView | null; smartArtPayload?: ContractSmartArtPayload | null; wordArtPayload?: ContractWordArtPayload | null; } ``` ### ContractWorkbookObjectMutationCapabilities [Section titled “ContractWorkbookObjectMutationCapabilities”](#contractworkbookobjectmutationcapabilities) ```ts interface ContractWorkbookObjectMutationCapabilities { moveObject: boolean; copyObject: boolean; deleteObject: boolean; rename: boolean; visibility: boolean; accessibility: boolean; print: boolean; } ``` ### ContractWorkbookObjectPresenceStatus [Section titled “ContractWorkbookObjectPresenceStatus”](#contractworkbookobjectpresencestatus) ```ts type ContractWorkbookObjectPresenceStatus = "present" | "selected" | "hidden" | "locked" | "unsupported" | "error"; ``` ### ContractWorkbookObjectRelationship [Section titled “ContractWorkbookObjectRelationship”](#contractworkbookobjectrelationship) ```ts interface ContractWorkbookObjectRelationship { id: string; relationshipType: string; ownerPart: string; target: string; targetMode?: string | null; targetState: ContractWorkbookObjectTargetState; } ``` ### ContractWorkbookObjectSupportState [Section titled “ContractWorkbookObjectSupportState”](#contractworkbookobjectsupportstate) ```ts type ContractWorkbookObjectSupportState = "live" | "stale" | "broken" | "unsupported"; ``` ### ContractWorkbookObjectTargetState [Section titled “ContractWorkbookObjectTargetState”](#contractworkbookobjecttargetstate) ```ts type ContractWorkbookObjectTargetState = "resolved" | "broken" | "orphan" | "external" | "unsupported"; ``` ### ContractWorkbookObjectType [Section titled “ContractWorkbookObjectType”](#contractworkbookobjecttype) ```ts type ContractWorkbookObjectType = | "chart" | "picture" | "shape" | "text-box" | "connector" | "group" | "comment" | "note" | "smart-art" | "word-art" | "ink" | "embedded-ole" | "embedded-package" | "active-x-control" | "form-control" | "audio" | "video" | "media" | "control" | "slicer" | "unknown"; ``` ### ContractWorkbookReadiness [Section titled “ContractWorkbookReadiness”](#contractworkbookreadiness) ```ts interface ContractWorkbookReadiness { schemaVersion: 1; generation: number; packageOpened: ContractWorkbookReadinessPhase; activeSheetKnown: ContractWorkbookReadinessPhase; firstViewportReady: ContractWorkbookReadinessPhase; editingReady: ContractWorkbookReadinessPhase; backgroundIndexing: ContractWorkbookReadinessPhase; fullyIndexed: ContractWorkbookReadinessPhase; deferredRegionCount: number; deferredRecalc: boolean; } ``` ### ContractWorkbookReadinessPhase [Section titled “ContractWorkbookReadinessPhase”](#contractworkbookreadinessphase) ```ts interface ContractWorkbookReadinessPhase { state: ContractWorkbookReadinessPhaseState; terminal: boolean; detail: string; } ``` ### ContractWorkbookReadinessPhaseState [Section titled “ContractWorkbookReadinessPhaseState”](#contractworkbookreadinessphasestate) ```ts type ContractWorkbookReadinessPhaseState = "pending" | "running" | "ready" | "failed" | "cancelled" | "not_required"; ``` ### ContractWorkbookRevisionCellState [Section titled “ContractWorkbookRevisionCellState”](#contractworkbookrevisioncellstate) ```ts type ContractWorkbookRevisionCellState = | { kind: "absent" } | { kind: "blank" } | { kind: "empty-string" } | { kind: "number"; value: string } | { kind: "boolean"; value: boolean } | { kind: "text"; value: string } | { kind: "formula"; formula: string } | { kind: "error"; code: string }; ``` ### ContractWorkbookRevisionCellSummary [Section titled “ContractWorkbookRevisionCellSummary”](#contractworkbookrevisioncellsummary) ```ts interface ContractWorkbookRevisionCellSummary { kind: string; detail: string; } ``` ### ContractWorkbookRevisionConflict [Section titled “ContractWorkbookRevisionConflict”](#contractworkbookrevisionconflict) ```ts interface ContractWorkbookRevisionConflict { sheetKey: string; row?: number | null; col?: number | null; address: string; kind: ContractWorkbookRevisionConflictKind; base: ContractWorkbookRevisionCellSummary; local: ContractWorkbookRevisionCellSummary; incoming: ContractWorkbookRevisionCellSummary; } ``` ### ContractWorkbookRevisionConflictKind [Section titled “ContractWorkbookRevisionConflictKind”](#contractworkbookrevisionconflictkind) ```ts type ContractWorkbookRevisionConflictKind = | "concurrent-edit" | "formula-value" | "edit-clear" | "unsupported-mutation" | "base-mismatch" | "missing-sheet" | "local-state-mismatch"; ``` ### ContractWorkbookRevisionDelta [Section titled “ContractWorkbookRevisionDelta”](#contractworkbookrevisiondelta) ```ts interface ContractWorkbookRevisionDelta { editionId: string; baseRevision: number; revision: number; mutations: ContractWorkbookRevisionMutation[]; } ``` ### ContractWorkbookRevisionMergeOutcome [Section titled “ContractWorkbookRevisionMergeOutcome”](#contractworkbookrevisionmergeoutcome) ```ts type ContractWorkbookRevisionMergeOutcome = "merged" | "conflicts" | "already-applied"; ``` ### ContractWorkbookRevisionMutation [Section titled “ContractWorkbookRevisionMutation”](#contractworkbookrevisionmutation) ```ts type ContractWorkbookRevisionMutation = | { mutationKind: "cell"; sheetKey: string; row: number; col: number; base: ContractWorkbookRevisionCellState; value: ContractWorkbookRevisionCellState; } | { mutationKind: "unsupported"; sheetKey: string; row?: number | null; col?: number | null; kind: ContractWorkbookRevisionUnsupportedMutationKind; }; ``` ### ContractWorkbookRevisionUnsupportedMutationKind [Section titled “ContractWorkbookRevisionUnsupportedMutationKind”](#contractworkbookrevisionunsupportedmutationkind) ```ts type ContractWorkbookRevisionUnsupportedMutationKind = | "sheet-lifecycle" | "defined-name" | "formatting" | "range-structure" | "table" | "data-validation" | "protection" | "object" | "workbook-metadata" | "external-data" | "power-query" | "vba" | "package-publication" | "unknown"; ``` ### ContractWorkbookSheetMeta [Section titled “ContractWorkbookSheetMeta”](#contractworkbooksheetmeta) ```ts interface ContractWorkbookSheetMeta { index: number; name: string; path: string; kind?: ContractSheetKind; visibilityState?: ContractSheetVisibilityState; tabColorRgb?: string | null; codeName?: string | null; sheetProtected?: boolean | null; sheetProtectionAllowedActions?: ContractSheetProtectionAllowedAction[] | null; rightToLeft?: boolean | null; usedRange?: string | null; usedRangeDirty?: boolean | null; sheetBackground?: ContractSheetBackgroundProjection | null; nonEmptyCellCount?: number | null; formulaCellCount?: number | null; isPqOutputSheet?: boolean; } ``` ### ContractWorkbookThemeColorScheme [Section titled “ContractWorkbookThemeColorScheme”](#contractworkbookthemecolorscheme) ```ts interface ContractWorkbookThemeColorScheme { name: string; dk1: string; lt1: string; dk2: string; lt2: string; accent1: string; accent2: string; accent3: string; accent4: string; accent5: string; accent6: string; hlink: string; folHlink: string; } ``` ### ContractWorkbookThemeFontsProjection [Section titled “ContractWorkbookThemeFontsProjection”](#contractworkbookthemefontsprojection) ```ts interface ContractWorkbookThemeFontsProjection { major: string; minor: string; } ``` ### ContractWorkbookWindowCommandState [Section titled “ContractWorkbookWindowCommandState”](#contractworkbookwindowcommandstate) ```ts interface ContractWorkbookWindowCommandState { commandId: string; enabled: boolean; active: boolean; } ``` ### ContractWorkbookWindowSessionAction [Section titled “ContractWorkbookWindowSessionAction”](#contractworkbookwindowsessionaction) ```ts type ContractWorkbookWindowSessionAction = | { action: "register_window"; shellWindowHandle: string; visible: boolean; focused: boolean; view: ContractWorkbookWindowViewState; } | { action: "state"; windowId?: string | null } | { action: "activate_window"; windowId: string; focus: string } | { action: "update_view"; windowId: string; view: ContractWorkbookWindowViewState; } | { action: "set_show_formulas"; windowId: string; enabled: boolean } | { action: "record_activity"; windowId: string; recordHistory?: boolean; clipboardTransferReady?: boolean; } | { action: "set_visibility"; windowId: string; visible: boolean } | { action: "arrange"; windowId: string } | { action: "set_side_by_side"; windowId: string; enabled: boolean } | { action: "set_synchronous_scrolling"; windowId: string; enabled: boolean } | { action: "close_window"; windowId: string }; ``` ### ContractWorkbookWindowSessionIdentity [Section titled “ContractWorkbookWindowSessionIdentity”](#contractworkbookwindowsessionidentity) ```ts interface ContractWorkbookWindowSessionIdentity { workbookId: string; sessionId: string; subsetId: string; } ``` ### ContractWorkbookWindowSessionProjection [Section titled “ContractWorkbookWindowSessionProjection”](#contractworkbookwindowsessionprojection) ```ts interface ContractWorkbookWindowSessionProjection { identity: ContractWorkbookWindowSessionIdentity; activeWorkbookId: string; activeSessionId: string; currentWindowId: string; activeWindowId: string; viewCount: number; arranged: boolean; sideBySide: boolean; synchronousScrolling: boolean; dirty: boolean; windows: ContractWorkbookWindowViewProjection[]; commandStates: ContractWorkbookWindowCommandState[]; } ``` ### ContractWorkbookWindowViewProjection [Section titled “ContractWorkbookWindowViewProjection”](#contractworkbookwindowviewprojection) ```ts interface ContractWorkbookWindowViewProjection { windowId: string; shellWindowHandle: string; visible: boolean; focused: boolean; view: ContractWorkbookWindowViewState; historyUndoDepth: number; historyRedoDepth: number; clipboardTransferReady: boolean; } ``` ### ContractWorkbookWindowViewState [Section titled “ContractWorkbookWindowViewState”](#contractworkbookwindowviewstate) ```ts interface ContractWorkbookWindowViewState { activeSheetKey: string; activeCell: string; selection: string; focus: string; viewport: ViewportWindow; showFormulas?: boolean; showFormulasPersistence?: ContractFormulaAuditingStatePersistence; } ``` ### ContractXlsxSheetBackgroundPatch [Section titled “ContractXlsxSheetBackgroundPatch”](#contractxlsxsheetbackgroundpatch) ```ts interface ContractXlsxSheetBackgroundPatch { activeSheetPath: string; sheetName?: string | null; mimeType?: "image/png" | "image/jpeg" | "image/gif" | null; dataUrl?: string | null; fileName?: string | null; remove?: boolean | null; } ``` ### ContractXlsxSheetFormatPatch [Section titled “ContractXlsxSheetFormatPatch”](#contractxlsxsheetformatpatch) ```ts interface ContractXlsxSheetFormatPatch { activeSheetPath: string; defaultRowHeight?: number | null; defaultColWidth?: number | null; baseColWidth?: number | null; customHeight?: boolean | null; } ``` ### ContractXlsxTextBoxSheetPatch [Section titled “ContractXlsxTextBoxSheetPatch”](#contractxlsxtextboxsheetpatch) ```ts interface ContractXlsxTextBoxSheetPatch { activeSheetPath: string; objects: ContractXlsxTextBoxObjectPatch[]; } ``` ### ContractXlsxWorkbookActiveSheetPatch [Section titled “ContractXlsxWorkbookActiveSheetPatch”](#contractxlsxworkbookactivesheetpatch) ```ts interface ContractXlsxWorkbookActiveSheetPatch { activeSheetPath: string; } ``` ### ContractXlsxWorkbookThemeColorsPatch [Section titled “ContractXlsxWorkbookThemeColorsPatch”](#contractxlsxworkbookthemecolorspatch) ```ts interface ContractXlsxWorkbookThemeColorsPatch { colorSetId: string; } ``` ### ContractXlsxWorkbookThemePatch [Section titled “ContractXlsxWorkbookThemePatch”](#contractxlsxworkbookthemepatch) ```ts interface ContractXlsxWorkbookThemePatch { presetId: string; } ``` ### ContractXlsxWorkbookViewSelectionPatch [Section titled “ContractXlsxWorkbookViewSelectionPatch”](#contractxlsxworkbookviewselectionpatch) ```ts interface ContractXlsxWorkbookViewSelectionPatch { activeSheetPath: string; activeCell: string; sqref: string; pane?: string | null; } ``` ### EditorSessionStamp [Section titled “EditorSessionStamp”](#editorsessionstamp) ```ts interface EditorSessionStamp { editorSessionId: string; generation: number; } ``` ### FormulaSubsetStatus [Section titled “FormulaSubsetStatus”](#formulasubsetstatus) ```ts type FormulaSubsetStatus = "supported" | "unsupported" | "not-formula"; ``` ### OpenWorkbookSubsetProjectionPayload [Section titled “OpenWorkbookSubsetProjectionPayload”](#openworkbooksubsetprojectionpayload) ```ts interface OpenWorkbookSubsetProjectionPayload { operation: "open_workbook_subset"; subsetId: string; sheetCount: number; session: ContractSubsetSessionInfo; readiness: ContractWorkbookReadiness; formatCapabilities?: ContractFormatCapabilities | null; xlsbDirtySaveProfile?: ContractXlsbDirtySaveProfile | null; activeSheet: ContractActiveSheetMeta; workbookSheets?: ContractWorkbookSheetMeta[]; themeFonts?: ContractWorkbookThemeFontsProjection | null; tableMetadata?: ContractTableMetadataProjection | null; workbookTableMetadata?: ContractTableMetadataProjection | null; workbookConnections?: ContractWorkbookConnectionsProjection | null; worksheetAutoFilterMetadata?: ContractWorksheetAutoFilterMetadata | null; directionPlaceholder?: ContractDirectionPlaceholderSubset | null; objectStatusPlaceholder?: ContractObjectStatusPlaceholderSubset | null; surfaceObjects?: ContractSheetObject[] | null; objectInventory?: ContractWorkbookObjectInventoryEntry[] | null; inkProjection?: ContractReviewInkProjectionItem[] | null; geometry: ContractGeometrySubset; recalcNeeded: boolean; viewport: ViewportWindow; previewCells: ContractPreviewCell[]; conditionalFormattingRules?: ContractConditionalRule[]; dataValidationMetadata?: ContractDataValidationMetadata; frozenBandCells?: ContractPreviewCell[]; bodyMergeAnchorCells?: ContractPreviewCell[]; bodyTextOverflowAnchorCells?: ContractPreviewCell[]; layoutMetrics?: ContractLayoutMetricsSubset | null; formulaTrustSnapshot?: ContractFormulaTrustSnapshot | null; themeColorPalette?: string[]; viewportReadiness?: ContractViewportReadiness; } ``` ### SubsetSessionMode [Section titled “SubsetSessionMode”](#subsetsessionmode) ```ts type SubsetSessionMode = "transient-non-reusable" | "process-reusable" | "persistent"; ``` ### ViewportWindow [Section titled “ViewportWindow”](#viewportwindow) ```ts interface ViewportWindow { top: number; left: number; rows: number; cols: number; } ``` ### WorkbookIdentityDescriptor [Section titled “WorkbookIdentityDescriptor”](#workbookidentitydescriptor) ```ts type WorkbookIdentityDescriptor = | { kind: "sheet"; name: string } | { kind: "table"; name: string } | { kind: "named"; name: string }; ``` ### WorkbookSelectorDescriptor [Section titled “WorkbookSelectorDescriptor”](#workbookselectordescriptor) ```ts type WorkbookSelectorDescriptor = | { kind: "sheet"; name: string } | { kind: "table"; name: string } | { kind: "named-range"; name: string }; ``` ### WorkbookSourceDescriptor [Section titled “WorkbookSourceDescriptor”](#workbooksourcedescriptor) ```ts interface WorkbookSourceDescriptor { workbookId: string; queryId?: string; source: WorkbookIdentityDescriptor; request: SourceRequestDescriptor; grid: SourceGridDescriptor; revoked?: boolean; } ``` ### WorkbookVersionByteProvenance [Section titled “WorkbookVersionByteProvenance”](#workbookversionbyteprovenance) ```ts interface WorkbookVersionByteProvenance { format: WorkbookVersionFormat; byteLength: number; sha256: string; readOnly: boolean; macroEnabled: boolean; signaturePresent: boolean; } ``` ### WorkbookVersionCategoryDiff [Section titled “WorkbookVersionCategoryDiff”](#workbookversioncategorydiff) ```ts interface WorkbookVersionCategoryDiff { category: | "values" | "formulas" | "styles" | "comments" | "sheets" | "names" | "tables" | "pivots" | "drawings" | "relationships"; support: WorkbookVersionCategorySupport; currentCount: number; versionCount: number; addedCount: number; removedCount: number; changedCount: number; currentFingerprint: string; versionFingerprint: string; reasonCode: string; truncated: boolean; } ``` ### WorkbookVersionCategorySupport [Section titled “WorkbookVersionCategorySupport”](#workbookversioncategorysupport) ```ts type WorkbookVersionCategorySupport = "compared" | "detect_only" | "unsupported" | "blocked"; ``` ### WorkbookVersionCompareStatus [Section titled “WorkbookVersionCompareStatus”](#workbookversioncomparestatus) ```ts type WorkbookVersionCompareStatus = "identical" | "different" | "blocked"; ``` ### WorkbookVersionFormat [Section titled “WorkbookVersionFormat”](#workbookversionformat) ```ts type WorkbookVersionFormat = "xlsx" | "xlsm" | "xltm" | "csv" | "ods"; ``` ### WorkbookVersionStructuralDiff [Section titled “WorkbookVersionStructuralDiff”](#workbookversionstructuraldiff) ```ts interface WorkbookVersionStructuralDiff { schemaVersion: 1; status: WorkbookVersionCompareStatus; current: WorkbookVersionByteProvenance; version: WorkbookVersionByteProvenance; categories: WorkbookVersionCategoryDiff[]; changedCategoryCount: number; detectOnlyCategoryCount: number; unsupportedCategoryCount: number; blockedReasonCode?: string | null; redactionProfile: "stable-hashes-counts-reason-codes-only-v1"; } ``` # Types: VBA and macros > Compute Contract type definitions — the project, running, trust, and the list of approved macros. Names: 36. Definitions of the names from the “TypeScript type” column on the operation pages. Other dictionary topics: [session, workbook, and sheets](/reference/sumsheet/types-session/) · [cells and ranges](/reference/sumsheet/types-cells/) · [formulas and calculation](/reference/sumsheet/types-formulas/) · [formatting](/reference/sumsheet/types-format/) · [data and sheet objects](/reference/sumsheet/types-data/) · [pivot tables](/reference/sumsheet/types-pivot/) · [charts and graphics](/reference/sumsheet/types-charts/) · [printing and page layout](/reference/sumsheet/types-print/) · [Power Query](/reference/sumsheet/types-powerquery/) · **VBA and macros** · [protection and review](/reference/sumsheet/types-protection/) · [general and utility](/reference/sumsheet/types-common/). Types on this page — 36 * [`ContractMacroTrustIntent`](#contractmacrotrustintent) * [`ContractMacroTrustInventoryCounts`](#contractmacrotrustinventorycounts) * [`ContractMacroTrustProvenance`](#contractmacrotrustprovenance) * [`ContractMacroTrustResult`](#contractmacrotrustresult) * [`ContractMacroTrustState`](#contractmacrotruststate) * [`ContractTrustCenterMacroPolicy`](#contracttrustcentermacropolicy) * [`VbaBlockerSourceSpan`](#vbablockersourcespan) * [`VbaCapabilityBlocker`](#vbacapabilityblocker) * [`VbaCapabilityBlockerKind`](#vbacapabilityblockerkind) * [`VbaEntrypointDescriptor`](#vbaentrypointdescriptor) * [`VbaExecutionOutcome`](#vbaexecutionoutcome) * [`VbaExecutionOutcomeKind`](#vbaexecutionoutcomekind) * [`VbaExecutionPlan`](#vbaexecutionplan) * [`VbaExecutionRoute`](#vbaexecutionroute) * [`VbaExecutionSessionId`](#vbaexecutionsessionid) * [`VbaMacroKind`](#vbamacrokind) * [`VbaMacroVisibility`](#vbamacrovisibility) * [`VbaModuleCapability`](#vbamodulecapability) * [`VbaModuleKind`](#vbamodulekind) * [`VbaMutationPreview`](#vbamutationpreview) * [`VbaMutationPreviewCell`](#vbamutationpreviewcell) * [`VbaProjectBlockerTally`](#vbaprojectblockertally) * [`VbaProjectCapabilitySummary`](#vbaprojectcapabilitysummary) * [`VbaProjectInspection`](#vbaprojectinspection) * [`VbaProjectReference`](#vbaprojectreference) * [`VbaScheduledMacro`](#vbascheduledmacro) * [`VbaStructuralChange`](#vbastructuralchange) * [`VbaStructuralChangeOperation`](#vbastructuralchangeoperation) * [`VbaStructuralPreview`](#vbastructuralpreview) * [`VbaSuppliedAnswer`](#vbasuppliedanswer) * [`VbaSystemFacts`](#vbasystemfacts) * [`VbaUserForm`](#vbauserform) * [`VbaUserFormAction`](#vbauserformaction) * [`VbaUserFormField`](#vbauserformfield) * [`VbaUserFormFieldKind`](#vbauserformfieldkind) * [`VbaUserFormUnsupportedControl`](#vbauserformunsupportedcontrol) ### ContractMacroTrustIntent [Section titled “ContractMacroTrustIntent”](#contractmacrotrustintent) ```ts type ContractMacroTrustIntent = | { action: "inspect" } | { action: "inspect_signatures" } | { action: "keep_macros" } | { action: "remove_macros_from_copy"; destinationUri: string } | { action: "save_signature_copy"; destinationUri: string } | { action: "remove_signatures" } | { action: "cancel" }; ``` ### ContractMacroTrustInventoryCounts [Section titled “ContractMacroTrustInventoryCounts”](#contractmacrotrustinventorycounts) ```ts interface ContractMacroTrustInventoryCounts { packageParts: number; vbaProjects: number; vbaRelationships: number; signatureParts: number; customUiParts: number; activeXParts: number; oleParts: number; formControlParts?: number; externalLinkParts?: number; externalRelationships?: number; } ``` ### ContractMacroTrustProvenance [Section titled “ContractMacroTrustProvenance”](#contractmacrotrustprovenance) ```ts type ContractMacroTrustProvenance = "package-inventory" | "protected-view-policy" | "trusted-location-policy"; ``` ### ContractMacroTrustResult [Section titled “ContractMacroTrustResult”](#contractmacrotrustresult) ```ts interface ContractMacroTrustResult { states: ContractMacroTrustState[]; counts: ContractMacroTrustInventoryCounts; cryptographicSignatureValidated: false; vbaRuntimeAvailable: false; packageFormat?: ContractFileFormat; trustProvenance?: ContractMacroTrustProvenance[]; opaquePreservationVerified?: boolean; sourceBytesUnchanged: boolean; copied: boolean; outputByteCount: number; removedPartCount: number; removedRelationshipCount: number; macroFreeRemainderCount?: number; sourceMutated?: boolean; signatureInventory?: OpcSignatureInventory; reasonCode?: string; } ``` ### ContractMacroTrustState [Section titled “ContractMacroTrustState”](#contractmacrotruststate) ```ts type ContractMacroTrustState = | "macro-present" | "signature-part-present" | "unsigned" | "modified-after-signature-risk" | "malformed" | "blocked-by-protected-view" | "blocked-by-trusted-location" | "unsupported"; ``` ### ContractTrustCenterMacroPolicy [Section titled “ContractTrustCenterMacroPolicy”](#contracttrustcentermacropolicy) ```ts type ContractTrustCenterMacroPolicy = "block_with_notification" | "block_without_notification"; ``` ### VbaBlockerSourceSpan [Section titled “VbaBlockerSourceSpan”](#vbablockersourcespan) ```ts interface VbaBlockerSourceSpan { line: number; column: number; length: number; offset: number; } ``` ### VbaCapabilityBlocker [Section titled “VbaCapabilityBlocker”](#vbacapabilityblocker) ```ts interface VbaCapabilityBlocker { kind: VbaCapabilityBlockerKind; detail: string; evidence: string; sourceSpan: VbaBlockerSourceSpan | null; module: string; procedure: string | null; } ``` ### VbaCapabilityBlockerKind [Section titled “VbaCapabilityBlockerKind”](#vbacapabilityblockerkind) ```ts type VbaCapabilityBlockerKind = | "external-automation" | "event-or-document-module" | "language-pending" | "host-member-pending" | "unparsed" | "run-declaration-pending" | "excel-compile-error"; ``` ### VbaEntrypointDescriptor [Section titled “VbaEntrypointDescriptor”](#vbaentrypointdescriptor) ```ts interface VbaEntrypointDescriptor { entrypoint: string; module: string; procedure: string; kind: VbaMacroKind; visibility: VbaMacroVisibility; userRunnable: boolean; route: VbaExecutionRoute; nativeClaim: boolean; nativeLowerable: number; blockers: VbaCapabilityBlocker[]; } ``` ### VbaExecutionOutcome [Section titled “VbaExecutionOutcome”](#vbaexecutionoutcome) ```ts interface VbaExecutionOutcome { kind: VbaExecutionOutcomeKind; stop: string | null; detail: string; rolledBack: boolean; progress?: { phase: "pending" | "running" | "finished"; steps: number; instructionBudget: number; cancellationRequested: boolean; }; } ``` ### VbaExecutionOutcomeKind [Section titled “VbaExecutionOutcomeKind”](#vbaexecutionoutcomekind) ```ts type VbaExecutionOutcomeKind = | "running" | "completed" | "refused-by-capability" | "unknown-entrypoint" | "unresolved-code-module" | "runtime-error" | "runtime-stopped"; ``` ### VbaExecutionPlan [Section titled “VbaExecutionPlan”](#vbaexecutionplan) ```ts interface VbaExecutionPlan { planId: string; planHash: string; entrypoint: string; route: VbaExecutionRoute | null; mayRunNatively: boolean; blockers: VbaCapabilityBlocker[]; instructionBudget: number; steps: null; } ``` ### VbaExecutionRoute [Section titled “VbaExecutionRoute”](#vbaexecutionroute) ```ts type VbaExecutionRoute = "native" | "excel-bridge" | "excel-bridge-legacy" | "preserve-only"; ``` ### VbaExecutionSessionId [Section titled “VbaExecutionSessionId”](#vbaexecutionsessionid) ```ts type VbaExecutionSessionId = string; ``` ### VbaMacroKind [Section titled “VbaMacroKind”](#vbamacrokind) ```ts type VbaMacroKind = "sub" | "function" | "property-get" | "property-let" | "property-set"; ``` ### VbaMacroVisibility [Section titled “VbaMacroVisibility”](#vbamacrovisibility) ```ts type VbaMacroVisibility = "public" | "private" | "friend"; ``` ### VbaModuleCapability [Section titled “VbaModuleCapability”](#vbamodulecapability) ```ts interface VbaModuleCapability { name: string; kind: VbaModuleKind; supportedLines: number; unsupportedLines: number; syntaxErrorLines: number; entrypointCount: number; } ``` ### VbaModuleKind [Section titled “VbaModuleKind”](#vbamodulekind) ```ts type VbaModuleKind = "standard" | "document" | "class" | "form" | "unknown"; ``` ### VbaMutationPreview [Section titled “VbaMutationPreview”](#vbamutationpreview) ```ts interface VbaMutationPreview { cells: VbaMutationPreviewCell[]; structural: VbaStructuralPreview; structureTouched: boolean; sessionStateTouched: boolean; } ``` ### VbaMutationPreviewCell [Section titled “VbaMutationPreviewCell”](#vbamutationpreviewcell) ```ts interface VbaMutationPreviewCell { sheet: string; row: number; col: number; beforeDisplayText: string | null; afterDisplayText: string | null; beforeFormula: string | null; afterFormula: string | null; } ``` ### VbaProjectBlockerTally [Section titled “VbaProjectBlockerTally”](#vbaprojectblockertally) ```ts interface VbaProjectBlockerTally { kind: VbaCapabilityBlockerKind; macros: number; } ``` ### VbaProjectCapabilitySummary [Section titled “VbaProjectCapabilitySummary”](#vbaprojectcapabilitysummary) ```ts interface VbaProjectCapabilitySummary { modules: number; macros: number; nativeCandidates: number; excelBridge: number; excelBridgeLegacy: number; preserveOnly: number; userRunnable: number; userRunnableNative: number; nativeCandidateRatio: number; topBlockers: VbaProjectBlockerTally[]; } ``` ### VbaProjectInspection [Section titled “VbaProjectInspection”](#vbaprojectinspection) ```ts interface VbaProjectInspection { capabilityContractVersion: number; sourceLabel: string; projectName: string | null; codePage: number; modules: VbaModuleCapability[]; references: VbaProjectReference[]; entrypoints: VbaEntrypointDescriptor[]; userForms: VbaUserForm[]; summary: VbaProjectCapabilitySummary; } ``` ### VbaProjectReference [Section titled “VbaProjectReference”](#vbaprojectreference) ```ts interface VbaProjectReference { key: string; value: string; } ``` ### VbaScheduledMacro [Section titled “VbaScheduledMacro”](#vbascheduledmacro) ```ts interface VbaScheduledMacro { earliestTimeSerial: number; procedure: string; latestTimeSerial?: number; schedule: boolean; } ``` ### VbaStructuralChange [Section titled “VbaStructuralChange”](#vbastructuralchange) ```ts interface VbaStructuralChange { operation: VbaStructuralChangeOperation; sheet: string | null; description: string; } ``` ### VbaStructuralChangeOperation [Section titled “VbaStructuralChangeOperation”](#vbastructuralchangeoperation) ```ts type VbaStructuralChangeOperation = | "sheet-added" | "sheet-renamed" | "sheet-deleted" | "cells-inserted" | "cells-deleted" | "name-defined" | "save-as-staged"; ``` ### VbaStructuralPreview [Section titled “VbaStructuralPreview”](#vbastructuralpreview) ```ts type VbaStructuralPreview = | { state: "none" } | { state: "listed"; changes: VbaStructuralChange[] } | { state: "incomplete"; named: VbaStructuralChange[] }; ``` ### VbaSuppliedAnswer [Section titled “VbaSuppliedAnswer”](#vbasuppliedanswer) ```ts interface VbaSuppliedAnswer { kind: string; prompt?: string; value: string; } ``` ### VbaSystemFacts [Section titled “VbaSystemFacts”](#vbasystemfacts) ```ts interface VbaSystemFacts { operatingSystem: string; userLibraryPath: string; } ``` ### VbaUserForm [Section titled “VbaUserForm”](#vbauserform) ```ts interface VbaUserForm { name: string; title: string; fields: VbaUserFormField[]; actions: VbaUserFormAction[]; unsupportedControls: VbaUserFormUnsupportedControl[]; importError: string | null; } ``` ### VbaUserFormAction [Section titled “VbaUserFormAction”](#vbauserformaction) ```ts interface VbaUserFormAction { id: string; label: string; kind: "submit" | "cancel" | "custom"; requiresConfirmation: boolean; } ``` ### VbaUserFormField [Section titled “VbaUserFormField”](#vbauserformfield) ```ts interface VbaUserFormField { id: string; label: string; kind: VbaUserFormFieldKind; required: boolean; choices: string[]; default: string | null; group: string | null; } ``` ### VbaUserFormFieldKind [Section titled “VbaUserFormFieldKind”](#vbauserformfieldkind) ```ts type VbaUserFormFieldKind = | "text" | "number" | "date" | "boolean" | "choice" | "multi_choice" | "range_picker" | "file_picker"; ``` ### VbaUserFormUnsupportedControl [Section titled “VbaUserFormUnsupportedControl”](#vbauserformunsupportedcontrol) ```ts interface VbaUserFormUnsupportedControl { name: string; controlType: string; } ``` # VBA and macros > Project inspection, planning and running, status, cancellation and rollback, macro trust, and the approved list. Operations on this page: 12. Project inspection, planning and running, status, cancellation and rollback, macro trust, and the approved list. Terms are in the [glossary](/start/glossary/). A macro never runs in the workbook itself: the core runs it on a copy, shows a preview of the changed cells, and carries the result over only after confirmation; the commit can be rolled back. External objects that a macro creates through `CreateObject` go through the core’s broker: everything is denied by default, a person grants the needed classes for a single run (`externalObjectGrants` in `plan_vba_execution` and `start_vba_execution`), and every call goes into the log—whether it was executed or rejected. Inspection works everywhere; running doesn’t Inspecting the project, listing entry points, and planning and previewing edits are all just parsing, and that runs in any build. Actually running a macro is done by the automation provider, and it isn’t compiled into every build: the desktop and server processor have it; the browser build and the mobile core don’t. Where it’s absent, the run operations refuse the same way for any workbook — with the code `automation-provider-unavailable`, before the file is even read. This is a property of the build, not of the launch mode or the workbook. **Operations on this page — 12** * [`cancel_vba_execution`](#cancel_vba_execution) * [`commit_vba_execution`](#commit_vba_execution) * [`get_vba_execution_status`](#get_vba_execution_status) * [`inspect_vba_project`](#inspect_vba_project) * [`list_approved_macros`](#list_approved_macros) * [`list_vba_entrypoints`](#list_vba_entrypoints) * [`macro_trust_lifecycle`](#macro_trust_lifecycle) * [`plan_vba_execution`](#plan_vba_execution) * [`preview_vba_mutations`](#preview_vba_mutations) * [`rollback_vba_execution`](#rollback_vba_execution) * [`run_approved_macro`](#run_approved_macro) * [`start_vba_execution`](#start_vba_execution) ## cancel\_vba\_execution [Section titled “cancel\_vba\_execution”](#cancel_vba_execution) Cancels a VBA run. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"cancel_vba_execution"` | yes | | `subsetId` | string | yes | | `sessionId` | [VbaExecutionSessionId](/reference/sumsheet/types-vba/#vbaexecutionsessionid) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · cancel\_vba\_execution** | Field | TypeScript type | Req. | | ----------- | ----------------------------------------------------------------------------- | ---- | | operation | `"cancel_vba_execution"` | yes | | `subsetId` | string | yes | | `sessionId` | [VbaExecutionSessionId](/reference/sumsheet/types-vba/#vbaexecutionsessionid) | yes | | outcome | [VbaExecutionOutcome](/reference/sumsheet/types-vba/#vbaexecutionoutcome) | yes | **Minimal JSON template** ```json { "operation": "cancel_vba_execution", "subsetId": "", "sessionId": "", "requestedBackend": "native-desktop" } ``` ## commit\_vba\_execution [Section titled “commit\_vba\_execution”](#commit_vba_execution) Commits a VBA run. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"commit_vba_execution"` | yes | | `subsetId` | string | yes | | `sessionId` | [VbaExecutionSessionId](/reference/sumsheet/types-vba/#vbaexecutionsessionid) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · commit\_vba\_execution** | Field | TypeScript type | Req. | | ----------- | ----------------------------------------------------------------------------- | ---- | | operation | `"commit_vba_execution"` | yes | | `subsetId` | string | yes | | `sessionId` | [VbaExecutionSessionId](/reference/sumsheet/types-vba/#vbaexecutionsessionid) | yes | | committed | [VbaMutationPreview](/reference/sumsheet/types-vba/#vbamutationpreview) | yes | **Minimal JSON template** ```json { "operation": "commit_vba_execution", "subsetId": "", "sessionId": "", "requestedBackend": "native-desktop" } ``` ## get\_vba\_execution\_status [Section titled “get\_vba\_execution\_status”](#get_vba_execution_status) Gets the state of a VBA run. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"get_vba_execution_status"` | yes | | `subsetId` | string | yes | | `sessionId` | [VbaExecutionSessionId](/reference/sumsheet/types-vba/#vbaexecutionsessionid) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · get\_vba\_execution\_status** | Field | TypeScript type | Req. | | ----------- | ----------------------------------------------------------------------------- | ---- | | operation | `"get_vba_execution_status"` | yes | | `subsetId` | string | yes | | `sessionId` | [VbaExecutionSessionId](/reference/sumsheet/types-vba/#vbaexecutionsessionid) | yes | | outcome | [VbaExecutionOutcome](/reference/sumsheet/types-vba/#vbaexecutionoutcome) | yes | **Minimal JSON template** ```json { "operation": "get_vba_execution_status", "subsetId": "", "sessionId": "", "requestedBackend": "native-desktop" } ``` ## inspect\_vba\_project [Section titled “inspect\_vba\_project”](#inspect_vba_project) Inspects a VBA project. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"inspect_vba_project"` | yes | | `subsetId` | string | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · inspect\_vba\_project** | Field | TypeScript type | Req. | | ---------- | --------------------------------------------------------------------------- | ---- | | operation | `"inspect_vba_project"` | yes | | `subsetId` | string | yes | | inspection | [VbaProjectInspection](/reference/sumsheet/types-vba/#vbaprojectinspection) | yes | **Minimal JSON template** ```json { "operation": "inspect_vba_project", "subsetId": "", "requestedBackend": "native-desktop" } ``` ## list\_approved\_macros [Section titled “list\_approved\_macros”](#list_approved_macros) Returns the list of approved macros. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"list_approved_macros"` | yes | | `subsetId` | string | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · list\_approved\_macros** | Field | TypeScript type | Req. | Note from the contract | | ------------ | ------------------------------------------------------------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | operation | `"list_approved_macros"` | yes | | | `subsetId` | string | yes | | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | | macros | [ApprovedMacroDescriptor](/reference/sumsheet/types-powerquery/#approvedmacrodescriptor)\[] | yes | | | `policyNote` | string | yes | Explains why the list came out the way it did. An empty list means one of two things, and this field tells them apart: either the workbook has no readable VBA project — there’s nothing to run — or the project exists, but none of its procedures made it onto the allowed list. What’s actually in the workbook is answered by the `list_vba_entrypoints` and `plan_vba_execution` operations. | **Minimal JSON template** ```json { "operation": "list_approved_macros", "subsetId": "", "requestedBackend": "native-desktop" } ``` ## list\_vba\_entrypoints [Section titled “list\_vba\_entrypoints”](#list_vba_entrypoints) Returns the list of VBA entry points. **Request** | Field | TypeScript type | Req. | Note from the contract | | ------------------ | ---------------------------------------------------------------------------------- | ---- | --------------------------------------------------------- | | operation | `"list_vba_entrypoints"` | yes | | | `subsetId` | string | yes | | | `userRunnableOnly` | boolean | no | Only the macros the user sees in Excel’s “Macros” dialog. | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | | **Response on success · list\_vba\_entrypoints** | Field | TypeScript type | Req. | Note from the contract | | -------------------- | ------------------------------------------------------------------------------------ | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | operation | `"list_vba_entrypoints"` | yes | | | `subsetId` | string | yes | | | entrypoints | [VbaEntrypointDescriptor](/reference/sumsheet/types-vba/#vbaentrypointdescriptor)\[] | yes | The procedures included in the response: either every parsed procedure in the project, or, with `userRunnableOnly`, only the ones visible in the “Macros” dialog. This list’s length depends on the request and says nothing about the workbook itself; the two fields below exist for that. | | `userRunnable` | number | yes | How many macros the user could run from the “Macros” dialog, and how many of them the core runs directly. These are properties of the workbook itself: they’re not recomputed from the returned list, so narrowing the list doesn’t lower these numbers. `inspect_vba_project` returns the same values. | | `userRunnableNative` | number | yes | | **Minimal JSON template** ```json { "operation": "list_vba_entrypoints", "subsetId": "", "requestedBackend": "native-desktop" } ``` ## macro\_trust\_lifecycle [Section titled “macro\_trust\_lifecycle”](#macro_trust_lifecycle) Macro trust within the session — what lives in Excel’s “Trust Center”. **Request** | Field | TypeScript type | Req. | | ---------------------------- | ----------------------------------------------------------------------------------- | ---- | | operation | `"macro_trust_lifecycle"` | yes | | `subsetId` | string | yes | | intent | [ContractMacroTrustIntent](/reference/sumsheet/types-vba/#contractmacrotrustintent) | yes | | `readOnly` | boolean | no | | `protectedView` | boolean | no | | `trustedLocation` | boolean | no | | `modifiedAfterSignatureRisk` | boolean | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · macro\_trust\_lifecycle** | Field | TypeScript type | Req. | | ---------- | ----------------------------------------------------------------------------------------- | ---- | | operation | `"macro_trust_lifecycle"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | result | [ContractMacroTrustResult](/reference/sumsheet/types-vba/#contractmacrotrustresult) | yes | **Minimal JSON template** ```json { "operation": "macro_trust_lifecycle", "subsetId": "", "intent": "", "requestedBackend": "native-desktop" } ``` ## plan\_vba\_execution [Section titled “plan\_vba\_execution”](#plan_vba_execution) Plans a VBA run. **Request** | Field | TypeScript type | Req. | Note from the contract | | ------------------- | ---------------------------------------------------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------ | | operation | `"plan_vba_execution"` | yes | | | `subsetId` | string | yes | | | entrypoint | string | yes | A name of the form `Module.Procedure` — the only way to address an entry point. | | `activeSheet` | string | yes | | | `instructionBudget` | number | no | The instruction-count limit for a single run. Without this field, the session’s default value is used. | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | | **Response on success · plan\_vba\_execution** | Field | TypeScript type | Req. | | ---------- | ------------------------------------------------------------------- | ---- | | operation | `"plan_vba_execution"` | yes | | `subsetId` | string | yes | | plan | [VbaExecutionPlan](/reference/sumsheet/types-vba/#vbaexecutionplan) | yes | **Minimal JSON template** ```json { "operation": "plan_vba_execution", "subsetId": "", "entrypoint": "", "activeSheet": "", "requestedBackend": "native-desktop" } ``` ## preview\_vba\_mutations [Section titled “preview\_vba\_mutations”](#preview_vba_mutations) Builds a preview: edits from VBA. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"preview_vba_mutations"` | yes | | `subsetId` | string | yes | | `sessionId` | [VbaExecutionSessionId](/reference/sumsheet/types-vba/#vbaexecutionsessionid) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · preview\_vba\_mutations** | Field | TypeScript type | Req. | | ----------- | ----------------------------------------------------------------------------- | ---- | | operation | `"preview_vba_mutations"` | yes | | `subsetId` | string | yes | | `sessionId` | [VbaExecutionSessionId](/reference/sumsheet/types-vba/#vbaexecutionsessionid) | yes | | preview | [VbaMutationPreview](/reference/sumsheet/types-vba/#vbamutationpreview) | yes | **Minimal JSON template** ```json { "operation": "preview_vba_mutations", "subsetId": "", "sessionId": "", "requestedBackend": "native-desktop" } ``` ## rollback\_vba\_execution [Section titled “rollback\_vba\_execution”](#rollback_vba_execution) Rolls back a VBA run. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"rollback_vba_execution"` | yes | | `subsetId` | string | yes | | `sessionId` | [VbaExecutionSessionId](/reference/sumsheet/types-vba/#vbaexecutionsessionid) | yes | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · rollback\_vba\_execution** | Field | TypeScript type | Req. | Note from the contract | | --------------- | ----------------------------------------------------------------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | operation | `"rollback_vba_execution"` | yes | | | `subsetId` | string | yes | | | `sessionId` | [VbaExecutionSessionId](/reference/sumsheet/types-vba/#vbaexecutionsessionid) | yes | | | `restoredCells` | number | yes | How many cells were restored to their previous values on rollback. Zero is a perfectly valid answer: a run that changed no cells at all rolls back the same way as one that changed a thousand. | **Minimal JSON template** ```json { "operation": "rollback_vba_execution", "subsetId": "", "sessionId": "", "requestedBackend": "native-desktop" } ``` ## run\_approved\_macro [Section titled “run\_approved\_macro”](#run_approved_macro) Runs an approved macro. **Request** | Field | TypeScript type | Req. | | ------------------ | ---------------------------------------------------------------------------------- | ---- | | operation | `"run_approved_macro"` | yes | | `subsetId` | string | yes | | `macroId` | string | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) \| null | no | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | **Response on success · run\_approved\_macro** | Field | TypeScript type | Req. | | ------------------- | ----------------------------------------------------------------------------------------- | ---- | | operation | `"run_approved_macro"` | yes | | `subsetId` | string | yes | | session | [ContractSubsetSessionInfo](/reference/sumsheet/types-session/#contractsubsetsessioninfo) | yes | | macro | [ApprovedMacroDescriptor](/reference/sumsheet/types-powerquery/#approvedmacrodescriptor) | yes | | delta | [DeltaSummary](/reference/sumsheet/types-cells/#deltasummary) | yes | | `changedKeys` | string\[] | yes | | `highlightCellKeys` | string\[] | yes | | `statusMessage` | string | yes | | `activeSheet` | [ContractActiveSheetMeta](/reference/sumsheet/types-session/#contractactivesheetmeta) | yes | | geometry | [ContractGeometrySubset](/reference/sumsheet/types-session/#contractgeometrysubset) | yes | | `recalcNeeded` | boolean | yes | | viewport | [ViewportWindow](/reference/sumsheet/types-session/#viewportwindow) | yes | | `previewCells` | [ContractPreviewCell](/reference/sumsheet/types-cells/#contractpreviewcell)\[] | yes | **Minimal JSON template** ```json { "operation": "run_approved_macro", "subsetId": "", "macroId": "", "requestedBackend": "native-desktop" } ``` ## start\_vba\_execution [Section titled “start\_vba\_execution”](#start_vba_execution) Starts a VBA run. **Request** | Field | TypeScript type | Req. | Note from the contract | | ------------------- | ---------------------------------------------------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | operation | `"start_vba_execution"` | yes | | | `subsetId` | string | yes | | | entrypoint | string | yes | | | `activeSheet` | string | yes | | | `instructionBudget` | number | no | | | `shownPlanId` | string | no | The identifier of the plan you showed the user before running it. Without this field, the request is planned and run right away — as before. With it, one extra check is added: the plan described by the request must match the one shown, or the refusal `automation-plan-stale` comes back. This field is exactly what gives the shown plan any meaning: without it, you could show the user one set of run conditions and submit a different one, and the contract would never notice. | | `requestedBackend` | [ComputeBackendKind](/reference/sumsheet/types-common/#computebackendkind) \| null | no | | **Response on success · start\_vba\_execution** | Field | TypeScript type | Req. | Note from the contract | | ----------- | ----------------------------------------------------------------------------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | operation | `"start_vba_execution"` | yes | | | `subsetId` | string | yes | | | `sessionId` | [VbaExecutionSessionId](/reference/sumsheet/types-vba/#vbaexecutionsessionid) | yes | Always present in the response, even when there’s nothing to roll back after the run. The identifier is issued before the run and names it regardless; if there’s nothing to roll back, `rollback_vba_execution` honestly responds with `automation-session-unknown`. | | outcome | [VbaExecutionOutcome](/reference/sumsheet/types-vba/#vbaexecutionoutcome) | yes | Right after launch, `running`. Later status requests return either progress or the run’s outcome. | **Minimal JSON template** ```json { "operation": "start_vba_execution", "subsetId": "", "entrypoint": "", "activeSheet": "", "requestedBackend": "native-desktop" } ``` # AI tools and MCP > Two SumOffice MCP servers — for the documentation and for your file — llms.txt and the "Ask the documentation" widget for Claude, Cursor, VS Code and ChatGPT. The main SumOffice MCP server works with your file: the agent opens a document or workbook in a private editor cabin, reads it the way the engine does, proposes an edit and applies it after you say yes. It is described in [section 1](#1-product-mcp-server). The second server is about the documentation. The reference is large — 41 session commands, 321 SumDoc shell methods, 487 request and response types and 208 SumSheet contract operations — and neither a person nor an assistant needs to keep it in their head. That is why the site offers its content in three machine-readable forms: [section 2](#2-documentation-mcp-server), [llms.txt](#3-llmstxt) and the widget on every page. ## 1. Product MCP server [Section titled “1. Product MCP server”](#1-product-mcp-server) This server works not with the documentation but with your document or workbook. The agent opens the file in a private editor cabin on the viewing server, reads it the way the engine does — formulas, macros, Power Query, paragraphs, comments — proposes an edit, applies it after you say yes and hands back a copy that Word and Excel open without a repair dialog. The original is never changed. ### Connect in one minute [Section titled “Connect in one minute”](#connect-in-one-minute) Address: `https://view.sumoffice.com/mcp`, streamable HTTP. Any MCP client works; no account, no key. Each session gets its own cabin; files and copies are deleted after 24 hours. claude\_desktop\_config.json ```json { "mcpServers": { "office": { "command": "npx", "args": ["-y", "mcp-remote", "https://view.sumoffice.com/mcp"] } } } ``` Claude Code: ```bash claude mcp add --transport http office https://view.sumoffice.com/mcp ``` Cursor and other clients connect the same URL as a remote server. **Local files.** The same server is available as the Docker image `hissih/sumoffice-mcp` (linux/amd64 and arm64). It runs on your side, accepts a path inside the mounted folder, and opens the file itself in a sandbox on the server, just like the remote variant: ```json { "mcpServers": { "office-agent": { "command": "docker", "args": ["run", "-i", "--rm", "-v", "/path/to/files:/work", "hissih/sumoffice-mcp"] } } } ``` Then — `document_open_file` with `path: "/work/report.xlsm"`. | Step | Tools | | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Open | `document_open_file` — your file by `url`, as `base64` with a `name` or, in the Docker image, by `path`: .docx, .doc, .odt, .xlsx, .xlsm, .xlsb, .xls, .ods, up to 50 MB. `document_open` — a demo file by name, to try it out. | | Read a workbook | `sheet_describe` (sheets, used ranges, revision), `sheet_read` (values and formulas of a range), `sheet_find`; `macro_list`, `macro_read_source`, `macro_plan` — the VBA project: entry points, routes, obstacles, nothing is run; `query_list`, `query_explain` — Power Query steps and where they load to; `workbook_inspect` — the whole workbook model in one call. | | Read a document | `document_describe`, `document_read` (paragraphs in a window), `document_find`, `document_comments` (comments and tracked changes). | | Change | `sheet_propose_edits` → `sheet_apply`: up to 20 cells, the engine first shows what will change, whether errors will appear and whether input numbers get overwritten. `document_propose_replacement` → `document_apply`: new text for one paragraph, with “before — after” and checks. Nothing changes before the `apply` call; a proposal against an outdated revision is rejected, not applied silently. | | Collect | `document_save_copy` — the changed file as a link valid for 24 hours; a workbook with macros comes back as .xlsm with the VBA project untouched. `document_export_pdf` — the document as laid out by the engine, as a PDF with the page count. | The same cycle — look, propose, wait for permission, apply — is available in the agent panel inside the editor; how it works and why the refusal comes before the change — [VBA, Power Query and agents](/platform/automation/). Boundaries set on purpose One file per session; the session closes after 10 minutes of silence; up to five simultaneous sessions per server. Cell edits are values and formulas in a rectangular window; a paragraph edit replaces its text and keeps the formatting. The server does not write to your original, does not run macros and does not refresh queries: the agent reads and plans them, and running them on a copy so far lives only in the editor’s agent panel. Need the same server inside your network, next to your files — [contact us](/start/contact/). ## 2. Documentation MCP server [Section titled “2. Documentation MCP server”](#2-documentation-mcp-server) The documentation site runs its own [MCP](https://modelcontextprotocol.io) server at `/mcp` — not to be confused with the product server above: this one answers questions about the documentation and does not work with your file. Tools: | Tool | Arguments | What it returns | | ------------- | ------------------------------- | ------------------------------------------------------------------------------------- | | `search_docs` | `query` | Up to five most relevant pages with URL, description and an excerpt around the match. | | `get_doc` | `path` — page identifier or URL | The full text of the page in markdown. | | `list_docs` | — | All pages with titles and descriptions. | The tool catalog in machine-readable form: `/mcp-schema.json`. ### Claude Code [Section titled “Claude Code”](#claude-code) ```bash claude mcp add --transport http fastoffice-docs https://docs.sumoffice.com/mcp ``` ### Cursor [Section titled “Cursor”](#cursor) .cursor/mcp.json ```json { "mcpServers": { "fastoffice-docs": { "url": "https://docs.sumoffice.com/mcp" } } } ``` ### VS Code [Section titled “VS Code”](#vs-code) .vscode/mcp.json ```json { "servers": { "fastoffice-docs": { "type": "http", "url": "https://docs.sumoffice.com/mcp" } } } ``` ### Clients that only speak stdio [Section titled “Clients that only speak stdio”](#clients-that-only-speak-stdio) ```json { "mcpServers": { "fastoffice-docs": { "command": "npx", "args": ["mcp-remote", "https://docs.sumoffice.com/mcp"] } } } ``` Why this matters An assistant connected to the MCP server stops guessing command names and request fields. Instead of an “approximately like this” call to `apply_cell_edits`, it gets the actual field table from the [cells reference](/reference/sumsheet/cells/) — together with a link to the source page. ## 3. llms.txt [Section titled “3. llms.txt”](#3-llmstxt) For tools that work with text dumps, the site publishes six files. All of them are generated at build time from the same content as the site and open by direct link. | File | What is inside | | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | [`/llms.txt`](/llms.txt) | The table of contents: links to the other files with descriptions. The entry point. | | [`/llms-full.txt`](/llms-full.txt) | The whole documentation in one file, about 2.9 MB. | | [`/llms-small.txt`](/llms-small.txt) | The same material without the reference field tables, about 2.2 MB. That is still a lot: if the model has a small context, take a topical set below instead. | | [`/_llms-txt/a4-reference.txt`](/_llms-txt/a4-reference.txt) | The SumDoc reference only: Session Protocol, `window.fastdocShell`, DTOs, events. | | [`/_llms-txt/f1-reference.txt`](/_llms-txt/f1-reference.txt) | The SumSheet reference only: Compute Contract, 208 operations. | | [`/_llms-txt/platform-overview.txt`](/_llms-txt/platform-overview.txt) | The product part: white-label delivery, security, the pilot. | Why topical sets The whole documentation takes about three megabytes — a noticeable share of a context window. If the question is only about SumSheet operations, it is cheaper and more precise to load the single `f1-reference.txt` (about 820 KB) than the whole documentation. ## 4. The chat assistant on the site [Section titled “4. The chat assistant on the site”](#4-the-chat-assistant-on-the-site) The button in the bottom-right corner opens a chat about the documentation. It is a full conversation: you can refine as you go without repeating the context. The answer streams in, and the conversation is kept in the browser until your next visit. Under every answer is a list of sources. Check them: the answer is worded by a model, and it may be inaccurate. Answers are built from the documentation only The assistant answers solely on the basis of the pages of this site. If the documentation does not have what you need, it says so instead of inventing a command or field name. If answers are switched off — no model key is set or the quota has run out — the chat shows the sections it found, with links. ## 5. The “Open in…” buttons on pages [Section titled “5. The “Open in…” buttons on pages”](#5-the-open-in-buttons-on-pages) The header of every documentation page has an actions menu: copy the page as markdown or open its content in ChatGPT or Claude. This lets you ask about one specific page without connecting MCP. ## What to choose [Section titled “What to choose”](#what-to-choose) | Task | Tool | | ---------------------------------------------------- | ------------------------------------------ | | Writing integration code in an IDE with an assistant | The MCP server for the documentation | | The agent has to read or fix my file | The MCP server for the product | | A one-off question about the open page | The “Open in…” button | | Quickly find where something is described | The “Ask” widget or site search | | Loading the documentation into my own pipeline | `/llms-full.txt` or `/mcp/docs-index.json` | # Early access request > The request form for the SumDoc and SumSheet beta program: early builds, a direct line to the team and a say in priorities. You can download the current build right now without asking anyone: SumDoc and SumSheet for macOS (Apple Silicon and Intel), Windows, and Linux are on [dl.layers.md](https://dl.layers.md/sumoffice/sumdoc/release/latest/) together with checksums — [how to verify SumDoc](/sumdoc/install/) and [SumSheet](/sumsheet/install/). Early access isn’t for that. It is about something else: you get builds before the public release and a direct channel to the team, bypassing the general support queue — so your feedback makes it into the release rather than onto a list for later. What is expected in return: open your real documents in a new build from time to time and report discrepancies. Participation is free; no contract is required. [Early access request for SumDoc and SumSheet](https://app.sumoffice.com/p/fastdocs/forms/c17aa083-1d75-48e8-bb7c-a372ff0651da) If the form did not open or is awkward to fill in inside the frame — [open it as a separate page ↗](https://app.sumoffice.com/p/fastdocs/forms/c17aa083-1d75-48e8-bb7c-a372ff0651da). You can also simply write to [](mailto:hello@sumoffice.com?subject=%D0%B1%D0%B5%D1%82%D0%B0) with “beta” in the subject. ## What happens next [Section titled “What happens next”](#what-happens-next) We answer a request by email within one business day: we send the build, a short description of what already works in it and what is still rough. If you need verification on your own documents as part of your workflow, rather than a trial of the build — that is a pilot: it is structured differently, goes in stages, and fixes the terms in advance. What exactly is verified there — [Pilot and acceptance](/platform/pilot/). Other ways to get in touch are on the [Contact us](/start/contact/) page. # Contact us > How to request a pilot, join the beta and ask a question about embedding SumDoc or SumSheet. Write to **** — the shared address for every request below. The team that builds SumDoc and SumSheet answers — within one business day. The supplier of SumDoc and SumSheet is \[\[var:legal.entity]]. Company details and trademarks are on the [legal information page](https://sumoffice.com/legal.html); personal data processing is in the [privacy policy](https://sumoffice.com/app-privacy). Files you send for a check or a pilot are used only to run them through the engine, are not passed to third parties, and are deleted on your request to the same address. ## Request a pilot [Section titled “Request a pilot”](#request-a-pilot) A pilot is not a presentation but a check on your documents: you open your file inside your application, edit it, save it and reopen it. What exactly is checked and how long it takes is described on the [Pilot and acceptance](/platform/pilot/) page. To get straight to business, it helps to state up front: * which product you need — SumDoc (DOCX documents), SumSheet (XLSX spreadsheets) or both; * what your application is built on — desktop, web or server-side processing; * which operating systems must be supported; * what the user must be able to do inside the document; * whether there are perimeter restrictions: an air-gapped network, data storage requirements; * volume — how many documents and how many installations; * timeline — when you want to start the pilot. Attach a representative document without confidential data — this is the fastest way to start. We run it through the engine and reply with what opens, what saves without loss, and what will need further work — before any commitments. The cost depends on which application embeds the engine and how it is delivered. Describe that — and within one business day you will get a written proposal; no call is needed for this. ## Beta program [Section titled “Beta program”](#beta-program) The SumDoc and SumSheet builds are openly available — [installing SumDoc](/sumdoc/install/) and [installing SumSheet](/sumsheet/install/) — no request is needed for that. If you are ready to try builds before the general release and send your remarks, leave a request — [the form on the next page](/start/beta/), three fields. An email with **beta** in the subject works too — [an email with the subject filled in](mailto:hello@sumoffice.com?subject=%D0%B1%D0%B5%D1%82%D0%B0). Participation is free. In return we ask for feedback: what did not open, what opened incorrectly, what was missing. What participation gives: * early access to SumDoc and SumSheet builds before the public release; * a say in priorities — feedback from beta participants is taken up before anything else; * a direct channel to the team without the general support queue. What is expected from a participant: open your real documents in a new build from time to time and report discrepancies. No formal obligations or contract are required. ## Technical question [Section titled “Technical question”](#technical-question) If you are already reading the reference and something specific does not add up — a command, an operation, a field, behavior on error — write to the same address and include: * which product, build version and operating system; * what you called and what you expected to get; * what you got instead, including the full error text. For spreadsheets that is the operation name and the `code` from the response; documents have no code — include the `error` line and the command name, and if an edit is involved, also `result.mutation.result_kind`: it arrives even when the envelope is successful; * one full request line and one full response line; * the smallest anonymized file that shows the problem; * whether it reproduces in a new process. Before writing, it is worth looking at the troubleshooting pages — [for SumDoc](/sumdoc/diagnostics/) and [for SumSheet](/sumsheet/diagnostics/): some cases are already covered there, along with what exactly to check. ## An error in the documentation [Section titled “An error in the documentation”](#an-error-in-the-documentation) Found an inaccuracy, a cut-off sentence or a link to nowhere on this site? Write to the same address with **documentation** in the subject — [email with a ready subject](mailto:hello@sumoffice.com?subject=documentation) — and give the page address. It helps more than it seems. # Embed into a desktop application > First steps for a program on a computer — an accounting system, an ERP, an industry platform: what to put alongside it, what to start, and what to send so that a document opens, changes, and saves. Your product is a program installed on people’s computers: an accounting system, an industry platform, an ERP add-on, a document management system. Today, to fix a contract, the user exports the file, opens it in someone else’s editor and uploads it back — and along the way versions, permissions and the trail of who changed what are lost. After these steps, the document opens inside your program, and you know about every change: the file never leaves your system, and every edit passes through it. ## How it works, in a nutshell [Section titled “How it works, in a nutshell”](#how-it-works-in-a-nutshell) A **separate process** runs alongside your program — the document processor, that is, another program on the same machine. Your program sends it a job and gets a response, as in an exchange with any external system. You don’t need to embed libraries into your code, and the language your product is written in doesn’t matter. If you have a team that has built an exchange with an external system, this path is familiar to them. ## Three steps [Section titled “Three steps”](#three-steps) This section is for whoever will do the integration. If you’re deciding rather than integrating, it’s enough to know: one file from the delivery is placed next to your program and started, and from then on a document is opened, edited, and saved with three jobs. 1. **Put the core next to your program.** It’s a single executable from the delivery — the document processor. No installer, no dependencies. Builds for macOS (Apple Silicon and Intel), Windows (x64 and arm64) and Linux (x86-64) are openly available, with checksums alongside; where the core is inside them is in [Installation and verification](/sumdoc/install/). From here on we call it `$CLI`. 2. **Start it as a child process.** One command, and it waits for tasks. Its first line says that it is ready. ```bash "$CLI" serve ``` The reply is a readiness line; from it your program knows it can start working: ```json {"ready": true, "schema": "fastdoc.session-serve.v1"} ``` 3. **Send three lines.** Open the document, change it, save it. Each gets exactly one line in reply: ```json {"id":"1","cmd":"open","path":"/path/contract.docx"} {"id":"2","cmd":"mutate","operation_kind":"insert-text","paragraph_index":0,"offset":0,"text":"Hello. "} {"id":"3","cmd":"save","path":"/path/contract-new.docx"} ``` The replies look like this: ```json {"id":"1","ok":true} {"id":"2","ok":true} {"id":"3","ok":true} ``` A new file with the edit appears on disk. This is not a made-up example: exactly this exchange was run on an installed SumDoc while preparing this page. ## What to know right away [Section titled “What to know right away”](#what-to-know-right-away) **A refusal comes before the change, not after.** If the operation isn’t supported or the document is protected, you get a response with the reason, and the file stays as it was. There’s no such thing as a half-written document: the file is written in one atomic action. **Starting, stopping, and restarting are on your side.** The processor lives as long as your program does; when you close the window, close it too. **For developers.** The `id` field is returned in the response — you use it to match the job and the response in your logs. The processor answers strictly in order, in the sequence the jobs arrived, so a long operation delays everything sent after it. If you need parallelism, start a second process. ## Show a document without the editor [Section titled “Show a document without the editor”](#show-a-document-without-the-editor) When a document only needs to be viewed — in a report, in an email, on a machine without your program — no editor is needed at all: ```bash "$CLI" render contract.docx -o contract.html ``` The result is a single HTML file: it opens with a double-click in any browser, with no server or network, for viewing only. The pages look the same as in the editor, and whatever isn’t drawn is honestly marked. ## If you need to show the editor itself [Section titled “If you need to show the editor itself”](#if-you-need-to-show-the-editor-itself) The three jobs above change the document without any screen — that’s enough for reports, templates, and batch processing. When the user needs to **see** the document and edit it by hand, you have two paths: A window inside your program Your application opens the surface address in the system web view — and gets a ready-made editor inside its own window. [Embedding the surface](/sumdoc/embedding/) A separate editor window The simplest option for a first trial: the editor opens in its own window, and your program hands it the file and collects the result. [Starting the surface](/sumdoc/surface/) ## The same for spreadsheets [Section titled “The same for spreadsheets”](#the-same-for-spreadsheets) Excel spreadsheets work the same way: their own processor runs alongside, and the exchange uses the same kind of jobs. What differs is the program name, the set of jobs, and one thing in the exchange itself: a workbook with external data sources can ask your program a question back — the processor has no network of its own, so it turns to you for data. Documents never do that, so the exchange for spreadsheets is written separately — [A separate core process next to the application](/sumsheet/native/). If computing has to happen on a server rather than on the user’s computer, the same processor works there too: [The processor on a server](/sumsheet/server/). ## Further on, when the simple path is not enough [Section titled “Further on, when the simple path is not enough”](#further-on-when-the-simple-path-is-not-enough) | What you want to do | Where to look | | --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | Build a contract from a template and fill in data from your database | [What SumDoc can do with a document](/sumdoc/capabilities/) | | Export the finished document to PDF, including with embedded fonts | [Printing and publishing](/sumdoc/capabilities/#printing-and-output) | | Check how a third-party file is protected and which macros it has, without running them | [File security](/sumdoc/capabilities/#file-security) | | Recalculate a workbook, build a pivot table, refresh a data query | [Capability map next to Excel](/sumsheet/atlas/) | | Understand what comes in a reply and how to read a refusal | [Request and response objects](/sumdoc/envelope/) | | The exact names of all calls, with fields | [SumDoc reference](/reference/sumdoc/overview/), [SumSheet reference](/reference/sumsheet/overview/) | [Embed into a web application](/start/web/)If your product lives in the browser: the editor opens right on your page. [Embed into a mobile application](/start/mobile/)What is possible on a phone and a tablet today and what is not yet — honestly and without promises. # Glossary > Platform terms in plain words: core, session contract, operations contract, capability profile, explicit refusal, preservation of the unsupported, white-label delivery. Terms that appear throughout the documentation. | Term | Meaning | | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SumDoc core, the Rust core | The part of SumDoc that owns the document: it reads the DOCX file, computes the page layout and writes changes back to the file. | | SumSheet core, the Rust core | The part of SumSheet that owns the workbook: formulas, cell storage, edit history and writing the file; there is no second owner—the screen only shows and asks. | | Editor surface, Web Surface | The editor page shown in a browser or in a web view inside an application; for SumDoc this is a trial surface—it shows and edits the first paragraph and sends the application five events, while the full editor comes as the [web host](/sumdoc/webhost/) or the desktop app. | | Surface Host, the surface service | A small program on the same machine where the document is open: it serves the surface page and holds one session, and cannot be reached from outside. | | `fastdoc`, `fastsheet` in names | The internal names of SumDoc and SumSheet before they were renamed: they remain in code, events and settings so as not to break existing embeddings. | | Your application, the host application | The application the editor is embedded into; it owns the brand, user sign-in, storage and workflows. | | Application adapter | Your code between the application and the editor: it starts the core, passes commands and parses responses, and never touches the file itself. | | Evaluation Kit | A ready-made set for a first trial—examples, sample documents and the expected result of each step—so that your engineer opens their own document in 30–60 minutes. | | Mashup, query set | A set of Power Query queries inside a workbook; a “foreign” one was built in Excel or another program: SumSheet reads it, refreshes it and writes it back without losing what it doesn’t understand. | | DTO, data transfer object | A description of the shape of a request or response: which fields exist, what type they are and which are required. | | OEM, white-label embedding | A delivery where the user sees your interface and your name, not ours; an “OEM profile” is the set of events and settings for such a delivery. | | Smoke run | A short automated check that the program starts and opens a document; such routes are not needed in embedding and are marked separately in the reference. | | LTS, long-term support | A version for which fixes and security updates are released for an agreed period, not just until the next release. | | Single sign-on, SSO | The user signs in to the editor with the same account as your product: your system verifies them, and the editor receives only the name, role and permissions. | | Session contract, Rust Session Protocol | The list of what your application can say to the SumDoc editor and what it will hear back; it has a version and never changes silently—[all commands](/reference/sumdoc/session-protocol/). | | JSONL session | The simplest way to talk to the core: your program sends a line with a task and receives a line with a response, one complete JSON message per line. | | Standard input and output, stdin and stdout | The two streams through which a running program receives tasks and responds; a JSONL session works over them and needs no network port of its own. | | Token | A random string the core creates at startup, without which its port cannot be connected to; on the next start it will be different unless you set it yourself—[for developers](/reference/sumdoc/transport/). | | Local address, 127.0.0.1 | The address of the machine itself: a port on it cannot be reached from outside, even from your own network. | | Policy enforcement point | A known-in-advance moment when the editor asks your application whether it may continue—before a command, before saving, before sending data out; the rules remain yours. | | Agent | A program that works with the document in place of a person, by the same path as the interface, so its actions are visible, verifiable and undoable; it cannot edit the file behind the editor’s back. | | Operations contract, Compute Contract | The only path to an SumSheet workbook for the interface, automation and adapters; all operations are in the [reference](/reference/sumsheet/overview/), 206 of them are accepted by the core of the latest release, and acceptance is measured against it. | | Capability profile | A named list of what is included in your delivery: features, platforms, formats, operations and limits; the promise is defined by it, not by general words. | | Capability matrix | A table where each capability is verified by format, environment, action and markup preservation: the profile says what is in the delivery, the matrix says what of it has been verified and on what. | | Explicit refusal | A response with a code and a reason that arrives **before** the document changes: an operation won’t fail silently and won’t half-corrupt the file—[how to read a response](/sumdoc/envelope/). | | Preservation of the unsupported | Parts of the file the editor doesn’t understand end up in the saved file unchanged or are honestly flagged—this is what sets an editor apart from a converter, which loses everything unfamiliar. | | White-label delivery | The editor ships under your name and in your interface; what is customized is the shell, not the meaning of the document. | | Within the described boundaries | Exactly what has been done and verified is listed; beyond the boundary a capability refuses predictably, with a clear reason, rather than breaking. | | Bounded | About SumSheet operations with `bounded` in their name: they work only with the part of the workbook you requested; not to be confused with the row above—that one is about a capability’s readiness, this one is about a piece of the workbook. | | Workbook session, workbook subset, subset, `subsetId` | A workbook open in SumSheet and its number, passed to all subsequent operations on it: the session lives only inside the running process, and a macro in the workbook itself may prevent closing it—[how a session works](/sumsheet/session/), [what happens on close](/reference/sumsheet/session/#close_workbook_subset). | | Viewport, visible area | A rectangular area of the sheet the core sends to the screen; moving it is not an edit and doesn’t enter the history. Both names appear on the pages and mean the same thing—[for developers](/reference/sumsheet/session/#synchronize_workbook_viewport). | | Revision, `revision`, `expectedRevision` | The workbook state number that grows with every edit: if you pass the last number you saw in a request and the workbook has changed since, the request is rejected **before** the change—protection against editing from two places at once. In SumSheet the field is optional: without it the edit is applied unconditionally—[How the API session works](/sumsheet/session/). | | Power Query, M expression | A mechanism for fetching and transforming data from external sources step by step, compatible with the mechanism of the same name in Microsoft Excel. | | Writeback | Transferring changes from the document model back into the DOCX or XLSX file; parts the edit didn’t touch are carried over unchanged, and the core does this, not the interface. | | Projection | A slice of state the core sends to the interface: exactly what the current screen needs, not the whole document or workbook. | | Sparse workbook state | Only filled cells and explicitly set formats are kept in memory, so a sheet with a million rows takes no memory for empty rows; on open, the active sheet is loaded first. | | Headless, working without an interface | A mode where the core works without a screen: it receives commands and returns data or a finished file—this is how it’s used on a server and in batch processing. | | Dirty, unsaved changes | The state where the document has edits that are not yet in the saved file; the application usually shows this and asks for confirmation before closing the window. | | Cold reopen | Opening a saved file again, in a new process, to verify that everything the editor showed made it into the file: the edit, the history, the formatting and the unsupported parts. | | Acceptance | A pre-agreed set of documents and actions on which the integration is verified: not “we support DOCX” but “on these files these operations give this result”. | | Privacy level | The privacy level of a data source in Power Query: it prevents mixing a private source with an external one in the same query, so that data doesn’t leak. | # How to read this documentation > Which sections the site consists of, where to start depending on your role, and what all the numbers and claims are based on. The documentation is split into four levels — from the big picture for an executive to the reference for a developer. You don’t need to read it all in order: pick your section and your route. ## Structure [Section titled “Structure”](#structure) | Section | For whom | Contents | | --------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [Platform](/platform/story/) | Executive, product, presales, procurement, security team | Why this instead of someone else’s office suite, what you get, what is delivered, customizing under your brand, parity with Word and Excel, security, the pilot, and commercial terms. | | [SumDoc](/sumdoc/overview/) | Architects and integrators of the document part | How the document editor works, how to install it, run it, and embed it in your application. | | [SumSheet](/sumsheet/overview/) | Architects and integrators of the spreadsheet part | How the spreadsheet editor works, where it runs, how to install and embed it. | | [SumDoc reference](/reference/sumdoc/overview/) | Developers | All session commands (41), editor window methods (321), events and data types (487) — with fields. | | [SumSheet reference](/reference/sumsheet/overview/) | Developers | All contract operations (208) by area, with request and response fields. | ## Reading paths [Section titled “Reading paths”](#reading-paths) **See it with your own eyes without installing anything.** [Document editor](/sumdoc/demo/) → [spreadsheet with a cost estimate](/sumsheet/demo/) → [twenty-three embedding examples](/sumsheet/examples/) and [a project for documents](/sumdoc/examples/). Both editors open right on the page and work for real: you can edit a paragraph in the document and change numbers in the estimate. The code of each example is shown right there. **An evaluation in one evening.** [What SumOffice is](/start/intro/) → [What you get](/platform/story/) → [Feature parity](/platform/parity/) → [Pilot and acceptance](/platform/pilot/). **A technical prototype with SumDoc.** [Installing SumDoc](/sumdoc/install/) → [Quick start](/sumdoc/quickstart/) → [Request and response objects](/sumdoc/envelope/) → [Session commands](/reference/sumdoc/session-protocol/). **A technical prototype with SumSheet.** [Installing SumSheet](/sumsheet/install/) → [Quick start: the first project](/sumsheet/quickstart/) → [How the API session works](/sumsheet/session/) → [Compute Contract reference](/reference/sumsheet/overview/). **Designing an SumDoc integration.** [Architecture](/sumdoc/architecture/) → [Lifecycle](/sumdoc/lifecycle/) → [Host API](/sumdoc/host-api/) → [the interaction contract](/sumdoc/interaction/) → [What to fix before integrating](/sumdoc/status/#what-to-lock-in-before-integration-begins). The two pages in the middle describe an interface that is still being proposed rather than working: they are what the shape of the future contract is agreed on. What is available today — [Readiness and boundaries](/sumdoc/status/). **Designing an SumSheet integration.** [Architecture: four layers](/sumsheet/architecture/) → [What happens from opening to saving](/sumsheet/lifecycle/) → [Runtimes](/sumsheet/environments/) → [Integrating into an application](/sumsheet/integration/) → [Readiness checklist](/sumsheet/checklist/). **A security review.** [Platform security](/platform/security/) → [SumDoc responsibility and security](/sumdoc/responsibility/) → [Risks and boundaries](/platform/risks/). Status of the material The documentation describes the verified foundation of the product. The exact set of calls and commands, availability commitments, the license, and the final capability profile are fixed by the appendices to the pilot and the agreement. ## What the documentation is based on [Section titled “What the documentation is based on”](#what-the-documentation-is-based-on) The documentation is assembled from the specifications of both products and checked against their source code. Every number, command name, refusal code, and capability boundary is verified against the code before every change. If the documentation diverges from the product, the edit goes no further. When the site is built, the checks run again — on a machine where there is no source code. There it is verified that the pages match their generator, that all links lead to existing pages, and that no internal material has made it into the public text. Command names are checked against a list taken from the delivery itself, and the number of operations against a list taken from the release’s core. If a check fails, there is no deployment. This does not apply to the comparison with Excel: it relies on official Microsoft documentation, and the sources are named right on the page [Capability map next to Excel](/sumsheet/atlas/). The through line The product and the business perimeter belong to you, and SumOffice is responsible for what happens to the document and the workbook inside. The boundary between them is narrow, verifiable, and fixed by the contract. # What SumOffice is > An office platform you embed in your product: SumDoc for Word documents and SumSheet for Excel spreadsheets — under your name and inside your perimeter. **SumOffice** is an office platform you embed in your product. Your users open and edit Word documents and Excel spreadsheets inside your application, under your name. Files never leave for someone else’s office suite or someone else’s cloud. The platform consists of two engines and a shared embedding model: | Engine | Files | What it gives | Documentation | | ------------ | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | | **SumDoc** | DOCX | A ready-made document editor: opens a Word file, shows pages, lets you edit, saves and reopens. In the browser, the full editor opens on your domain. There is also a lightweight surface for trying out embedding — it can do less. | [SumDoc section](/sumdoc/overview/) | | **SumSheet** | XLSX | A ready-made spreadsheet editor: grid, formulas, edit history, import and saving. Large workbooks open because only what’s needed is kept in memory. It can calculate both on your server and right in the user’s browser — with no server at all. | [SumSheet section](/sumsheet/overview/) | A third editor — for presentations — is in development; the public beta is planned for December 2026. It can’t be downloaded yet, and PPTX compatibility, platforms, and speed are not promised. The main formula The input is your product, your brand, and your documents. The output is a Word and Excel editor inside your product, under your name: editing DOCX and XLSX, saving, automation, agent work, a security boundary, and a verifiable list of capabilities. Part of the list is already public: [13 spreadsheet formats](/reference/sumsheet/formats/) and [what you can do with each file type in documents](/sumdoc/overview/#which-files-it-works-with). What exactly is promised SumOffice doesn’t copy Microsoft Office in full and doesn’t promise to be better than it. The promise is different: **on your documents and your operations, the editor does the same as Word and Excel**, and this is verified at acceptance. On top of that — what Office doesn’t have: the editor lives inside your product, under your control, with saving, automation, and verifiable acceptance. More — [Feature parity](/platform/parity/). ## Three things worth understanding right away [Section titled “Three things worth understanding right away”](#three-things-worth-understanding-right-away) 1. **Who owns what.** You own the product, the brand, user sign-in, storage, and the business process. SumOffice is responsible for what happens to the document inside. The boundary between them is narrow and fixed by the contract — see [Customizing under your brand](/platform/white-label/). 2. **A document has one owner — the core.** The document model, formulas, history, and file writing live in the platform’s core. The screen only shows the document and passes to the core what the user wants; it doesn’t write the file itself. 3. **A refusal is better than silent corruption.** If an operation can’t be performed, the answer with the reason arrives **before** the file changes. There is no such thing as a half-corrupted file. For developers — [how to read an SumDoc response](/sumdoc/envelope/) and [how an SumSheet response is structured](/sumsheet/session/). ## Where to start [Section titled “Where to start”](#where-to-start) If you don’t know where to start, see [how to read this documentation](/start/how-to-read/): it has routes by role. | Role | First page | | -------------------------------------- | ------------------------------------------------------------------------------------------------- | | Executive, product, presales | [What you get](/platform/story/) | | Architect | [SumDoc architecture](/sumdoc/architecture/) and [SumSheet architecture](/sumsheet/architecture/) | | Integrator | [SumDoc quick start](/sumdoc/quickstart/) or [SumSheet quick start](/sumsheet/quickstart/) | | Security team | [Security and operations](/platform/security/) | | An AI assistant reading on your behalf | [AI tools and MCP](/start/ai/) | | An agent that edits your file | [Product MCP server](/start/ai/#1-product-mcp-server) | # Add the editor without a programmer > A document and spreadsheet editor on your site, in your desktop program and on your phone. Tell Claude what you need and it will do it. No programmer required. § 01 · the promise A Word and Excel editor inside your product — on the site, in the desktop program and on the phone. You don’t need to be a programmer and you don’t need to wait for anyone. Copy the task, hand it to Claude—and in half an hour look at a working editor with your own document. ![The SumDoc editor with an open contract inside a page](/examples/sumoffice/a4-demo.png) This is not a mock-up: the same editor is open right on this site —[try it yourself](/sumdoc/demo/). 1. **Copy the task**it is ready, below 2. **Hand it to Claude**it reads our documentation itself 3. **See the editor**with your document § 02 · integration ## Choose what you are integrating into [Section titled “Choose what you are integrating into”](#choose-what-you-are-integrating-into) ### Into a website [Section titled “Into a website”](#into-a-website) Your product lives in the browser. The editor opens right on the page — the user goes nowhere, the file stays with you. Task for Claude — copy it whole ```text Connect to the MCP server https://docs.sumoffice.com/mcp and, following the page "Embed into a web application", set up the document editor on a test page for me. I am not a programmer: explain step by step in plain words and ask if you need anything from me. ``` [What happens step by step →](/start/web/) ### Into a desktop program [Section titled “Into a desktop program”](#into-a-desktop-program) An accounting system, an industry platform, an ERP add-on. The editor opens inside your program, and you know about every change. Task for Claude — copy it whole ```text Connect to the MCP server https://docs.sumoffice.com/mcp and, following the page "Embed into a desktop application", show me how to open, change and save a document from my program. I am not a programmer: make a small example that I can simply run and see the result. ``` [What happens step by step →](/start/desktop/) ### Into a mobile application [Section titled “Into a mobile application”](#into-a-mobile-application) Phone and tablet. For viewing there’s a ready-made kit for Android and iOS—the same one used in our store apps. For editing from a phone, your server computes the document and your app shows the screen. Task for Claude — copy it whole ```text Connect to the MCP server https://docs.sumoffice.com/mcp and, following the page "Embed into a mobile application", explain which parts of the mobile path work today and which do not yet, and build me a small test application so that I can see the editor on my phone. ``` [What happens step by step →](/start/mobile/) If Claude is not at hand ChatGPT, Cursor and other assistants understand the same tasks — the address `https://docs.sumoffice.com/mcp` is shared. How to connect yours — [AI tools and MCP](/start/ai/). § 03 · verification ## What you will see [Section titled “What you will see”](#what-you-will-see) Not a screen recording and not a picture: both programs open right here, in the browser, with no installation. Only you see your edits. A contract in the SumDoc editor Headings, lists, a table with deadlines and an amount. Edit a paragraph and see what the editor looks like inside a third-party application. [Open the live editor →](/sumdoc/demo/) An estimate in the SumSheet spreadsheet Formulas, shares, two totals. Change a quantity or a price—the totals recalculate on their own. [Open the live spreadsheet →](/sumsheet/demo/) § 04 · capabilities ## What the editor can do [Section titled “What the editor can do”](#what-the-editor-can-do) Short and to the point — what documents are opened for in the first place. | What you need | Documents | Spreadsheets | | -------------------------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------- | | Open and save without loss | DOCX, as well as ODT, RTF, HTML, plain text, EPUB, FB2 | 13 formats: XLSX, XLSB, XLSM, ODS, CSV and others | | Format | headings, lists, headers and footers, watermarks, tables, pictures and shapes | width and height, merging, themes, conditional formatting | | Assemble a document | table of contents, list of figures, bibliography, fields and references | pivot tables, subtotals, filters | | Work together | comments, tracked changes, comparing and merging versions | sheet and range protection, review | | Compute | — | formulas, recalculation, dependency tracing, Power Query | | Publish | printing, PDF, including with embedded fonts | printing, page layout, export | | Inspect a third-party file | the macros it contains without running them, how it is protected, readiness for archival PDF/A | macros, protection, compatibility | The full maps — [what SumDoc can do with a document](/sumdoc/capabilities/) and [the map next to Excel](/sumsheet/atlas/). § 05 · the agent ## An agent within the document’s rules [Section titled “An agent within the document’s rules”](#an-agent-within-the-documents-rules) An AI assistant that “knows how to work with Excel” usually clicks around the interface or writes to the file behind the editor’s back. Then nobody knows what exactly changed, and it can’t be undone in one move. Here the agent takes the same path as a person: the same actions, the same edit history, the same save. 1. looked 2. made a plan 3. showed the exact changes 4. waited for permission 5. applied as a whole 6. verified A refusal arrives **before** the file changes, and what was applied is undone in one action—not cell by cell, but all at once. Details—[VBA, Power Query and agents](/platform/automation/). § 06 · origins ## Thank you, Microsoft [Section titled “Thank you, Microsoft”](#thank-you-microsoft) In 1985 Excel showed that complex calculations could become part of everyday work. Word and Excel taught whole industries to work with documents, and business still runs on these formats — including your contracts and estimates. We do not want to cross out that path. We want the work it made possible to continue where Office itself cannot be: inside someone else’s application, on a server, in an automated process. **Your system used to be embedded into Excel. Now the Excel class is embedded into your system.** About trademarks SumOffice is an independent product, not affiliated with or endorsed by Microsoft. Microsoft, Word, Excel, VBA and Power Query are trademarks of their respective owners. § 07 · why it is fast ## Why the assistant gets it done in half an hour [Section titled “Why the assistant gets it done in half an hour”](#why-the-assistant-gets-it-done-in-half-an-hour) Documents have **41 commands**, spreadsheets have **208 operations**, of which **206** are accepted by the core of the latest release. Each of these numbers is taken from installed builds, not copied from plans, and is checked twice: on our side against the products’ source code, and when the site is published against lists taken from the delivery itself. If even one diverges, the site isn’t published. That’s why the assistant gets it done in half an hour: it reads not marketing but a description that matches the program. [Download SumDoc](/sumdoc/install/)Builds for macOS (Apple Silicon and Intel), Windows and Linux are openly available, with checksums alongside. [Download SumSheet](/sumsheet/install/)The same systems and the same checksum verification; the release directory also contains the web host image. [Why your company needs this](/platform/replace-office/)What changes when the office suite is inside your product rather than next to it. # Embed into a mobile application > What exists today for the phone and the tablet: ready-made apps in the stores, a viewing kit for embedding and a server path for editing — step by step and without promises that nothing can back up. The SumDoc and SumSheet mobile apps are released: for iPhone and iPad — [SumDoc](https://apps.apple.com/app/id6807049845) and [SumSheet](https://apps.apple.com/app/id6807049725) in the App Store, for Android — [SumDoc](https://play.google.com/store/apps/details?id=com.sumoffice.sumdoc) and [SumSheet](https://play.google.com/store/apps/details?id=com.sumoffice.sumsheet) in Google Play. They are built the same way as described below: the editor screen inside an ordinary application. For your own application you have three paths. To show a document — the ready-made viewing kit (view SDK) for Android and iOS: the same engine and the same page as in the store apps, under the same version number. To let people edit from a phone — your server computes the document and your application shows the screen; this path works today. To edit right in the application, without a server — a separate delivery, which is agreed with the team. ## What exists today [Section titled “What exists today”](#what-exists-today) | Path | Documents (SumDoc) | Spreadsheets (SumSheet) | | --------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | | Ready-made app | App Store and Google Play. | App Store and Google Play. | | Viewing, the core inside your application | View SDK: Android (arm64-v8a) and iOS 16 and newer. | View SDK: Android (arm64-v8a) and iOS 16 and newer. | | Editing, the core on the server, your screens | Works. | Works. | | Editing, the core inside your application | A separate delivery, by agreement. | A separate delivery, by agreement. | The viewing kit is connected in three actions: add it to the project, show it in a web view, pass the file. Archives, checksums, the instructions and speed measurements are on the [viewing kit page](https://sumoffice.com/developers.html#mobile). What each of the paths costs — [Phone and tablet](/sumsheet/mobile/) and [where SumDoc is deployed](/sumdoc/deployment/). ## Editing from a phone through your server [Section titled “Editing from a phone through your server”](#editing-from-a-phone-through-your-server) The idea is simple: the phone does not compute the document, it shows it. The heavy work is done by the same core, but on your server — where it has memory and where you control it. For the business this means: the file and the edit history never leave your server, and the mobile application stays yours. The steps below are for whoever will do the wiring. 1. **Put the core on your server.** The same executable as for the desktop path. How it runs as a service — [The processor on a server](/sumsheet/server/) for spreadsheets, [The editor in the browser](/sumdoc/webhost/) for documents. 2. **Set up three addresses on your side.** This is your ordinary API, nothing special: ```plaintext POST /workbooks → open a document, return a session id POST /workbooks/{id}/commands → perform an action POST /workbooks/{id}/save → collect the finished file ``` This is how the mobile application talks to the core. Outward you hand out your own session id and never show the core’s internal names to the client. 3. **Show the document on the phone screen.** Two ways, and both are yours: * **a web view inside the application** — then the editor shell draws the screen, and you do not need to build an interface; * **your own screens in Swift or Kotlin** — then you draw everything yourself and ask the core only for the content. 4. **Take a narrow scenario for the first pilot.** Not “all of Excel in your pocket” but one clear task: open a workbook → find and change the needed range → save. Such a pilot can be completed and shows the real cost of the work. ## What to expect from a phone and what not to [Section titled “What to expect from a phone and what not to”](#what-to-expect-from-a-phone-and-what-not-to) * **Less memory.** A large workbook has to be held in an even smaller portion than on a computer. * **The system may evict the application from memory** while it is in the background — together with the open document. So you need checkpoints and session recovery. * **A finger is not a mouse.** Selection, the on-screen keyboard, gestures, a compact ribbon and dialogs for a narrow screen are separate work, and it is yours. * **iOS and Android differ** in files, “Share”, offline operation and permissions. Advice that will save you a quarter For the first mobile pilot, take a **tablet** and a web view — that is how our store apps are built too. A full mobile interface at the level of Excel on your own screens should be counted as a separate product, not as the next step of this one. ## How the core works on a phone [Section titled “How the core works on a phone”](#how-the-core-works-on-a-phone) The store apps and the viewing kit run the same core as on a computer, so the set of operations on the phone is not separate and will not drift from the desktop one. For developers: the mobile core has one door — a request and a response as JSON strings, and the session lives between calls; it is exposed through a C interface on iOS and JNI on Android, while the browser uses a different bridge — [Phone and tablet](/sumsheet/mobile/). Where each of these is heading — [What comes next](/platform/roadmap/) and [Risks and honest boundaries](/platform/risks/). ## Next [Section titled “Next”](#next) See what it looks like The live examples open in the phone browser just as they do on a computer. [Editor](/sumdoc/demo/) · [Spreadsheet](/sumsheet/demo/) Understand the cost What you will have to do and what the contract fixes before work starts. [Pilot and acceptance](/platform/pilot/) [Embed into a web application](/start/web/)The same server path, but for the browser — and there it takes one evening. [Embed into a desktop application](/start/desktop/)If you also have a desktop program: the core runs next to it as a separate process. # Embed into a web application > First steps for a product that lives in the browser: what to take from the delivery, what to run on your side, what to put on the page — and what screen the user will see. A user of your product has a page with a list of files. Today they click “download” and leave for someone else’s program. After these steps, they will click “edit” and stay with you: the document opens right on the page, under your name, and the file never leaves your server. For the business, this means file permissions and versions stay in your system, and the user doesn’t switch between products. For the development team — the four steps described below. ## What you need to have [Section titled “What you need to have”](#what-you-need-to-have) Three things, and you almost certainly already have two of them. | What is needed | What it means in plain words | | --------------------------------- | ------------------------------------------------------------------------------------------------------------- | | A page with a list of files | The one that currently has “download”. It will get an “edit” button. | | A “who is signed in” address | Your server answers which user has come. That is your account area — it already exists. | | A “give me file number N” address | Your server hands the document itself to whoever has the right. That is your storage — it already exists too. | The editor has no accounts of its own and never will: it asks your system who has come and trusts its answer. Passwords, roles, and permissions remain yours. ## Four steps [Section titled “Four steps”](#four-steps) This section is for whoever will do the wiring. If you decide rather than wire, it’s enough to know: the editor is installed on your server as one ready-made image, and one frame is added to the page. 1. **Take the image.** The server editor ships as a ready-made Docker image: inside are the shell, the core of the same version, and everything they need; Linux x86-64, 2 GB of memory plus about 250 MB per open document. The image is in the `webhost/` folder of the release catalog — the same place as the [SumDoc builds](/sumdoc/install/) — and loads without internet access: ```bash docker load -i SumDoc--webhost-docker.tar.gz ``` 2. **Run it on your side.** One command on your server. It starts a service that listens only on the local address — it can’t be reached from outside. ```bash docker run -d --name fastdoc-webhost --restart unless-stopped \ -p 127.0.0.1:8090:8090 \ -v /srv/fastdoc-cabins:/data/cabins \ hissih/sumdoc-webhost \ --base-path /fastdoc --max-cabins 12 --idle-min 20 \ --auth-url 'https://your-host/api/me' \ --attach-url 'https://your-host/api/files/{id}/content' ``` The last two addresses are your “who is signed in” and “give me the file”. The service knows nothing else about your system. Working copies of documents live in the `/data/cabins` volume and survive an image update. Next to the archive in the release catalog is an installation guide, and inside the image is `doctor`, a check of your host against the contract. Without Docker, the service starts from the delivery archive with the same sandbox manager, only the path to the core and the dependency directory are set by hand — [Editor in the browser](/sumdoc/webhost/). 3. **Route it through your server.** An ordinary nginx proxy with one mandatory condition: **the WebSocket upgrade must go through**. Without it the editor cannot reach the core and shows an empty space. A ready sample configuration is in the delivery. The editor must open over https and **on the same domain** as your application. Otherwise the browser will not give it your cookies, and the user will see “sign-in required” instead of the document. 4. **Put the frame on the page.** Four lines where the “download” link is now: ```html ``` In place of `document-id`, substitute the file number from your own database — the one you already know. ## What the user will see [Section titled “What the user will see”](#what-the-user-will-see) They click “edit” and stay on your site. The editor opens with their document: the ribbon, pages, cursor, everything as in the familiar program. They edit a paragraph, click “save” — and the file returns to your storage as a new version. You can see what this looks like right now without installing anything: the [live editor example](/sumdoc/demo/) and the [live spreadsheet example](/sumsheet/demo/) are working programs, not screenshots. The same server editor is already embedded in \[\[var:workspace.name]] — our workspace for teams, which is also installed on your side as a Docker image. You can see it working without installing anything: sign in to the [public \[\[var:workspace.name\]\] node](https://app.layers.md) (free), create a page, drag a .docx or .xlsx into it and open it — these are the same images described above, connected to the workspace’s own “who is signed in” and “give me the file” addresses. The one thing everyone trips over The saved file arrives as `multipart/form-data` — a single part named `file`. Your handler must **parse** the multipart body, not write it to a file as is. If you write it as is, documents will be corrupted after every save — silently, without a single error in the log. This is not a hypothetical danger: the sample host in the delivery itself tripped over it. ## The same for spreadsheets [Section titled “The same for spreadsheets”](#the-same-for-spreadsheets) For Excel spreadsheets, the path is the same in spirit: the screen works in the browser, your server does the calculation. For developers — the spreadsheet web host image is in the `webhost/` folder of the SumSheet release catalog (`SumSheet--webhost-docker.tar.gz`); the launch is the same, only the image is `hissih/sumsheet-webhost` and the port is 8092: [The processor on the server](/sumsheet/server/) and [SumSheet runtimes](/sumsheet/environments/). There is also a second path that documents don’t have: **spreadsheets can calculate right in the browser**, on the user’s device. Then your server serves only the page and the file, and there is nothing to install or update on the server. What this gives and what it costs — [The core in the browser](/sumsheet/wasm/). One caveat about the second path: workbooks that fetch data from the network themselves — from databases or over `https` — are not calculated in the browser. Such workbooks are calculated by your server, via the first path. ## Further on, when the simple path is not enough [Section titled “Further on, when the simple path is not enough”](#further-on-when-the-simple-path-is-not-enough) The first steps answer the question “how to open and save”. Then the harder tasks begin, and each has its own page. | What you want to do | Where to look | | -------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | Build a document from a template: headings, tables, headers and footers, a table of contents | [What SumDoc can do with a document](/sumdoc/capabilities/) | | Merge edits from several people, accept or reject tracked changes | [Working on a contract together](/sumdoc/capabilities/#collaborative-work-on-a-contract) | | Send one document to a list of recipients from a CSV | [Printing and publishing](/sumdoc/capabilities/#printing-and-output) | | Compute a workbook: formulas, pivot tables, data queries | [Capability map next to Excel](/sumsheet/atlas/) | | Understand what happens on which click, and add your own menu | [Responding to clicks](/sumsheet/interaction/) | | The exact names of all calls, with fields | [SumDoc reference](/reference/sumdoc/overview/), [SumSheet reference](/reference/sumsheet/overview/) | Verify in 15 minutes The core responds, your document is opened and saved — before any embedding. [SumDoc quick start](/sumdoc/quickstart/) Understand how it works Who owns what, where the boundaries run, and why the page has no copy of the document of its own. [The editor in the browser](/sumdoc/webhost/) [Embed into a desktop application](/start/desktop/)If your product is a program on a computer rather than a website: an ERP, an accounting system, your own shell. # Architecture: objects and relationships > The solution's seven objects, the boundary of responsibility between the Rust core and the editor surface, and the rule for deciding who owns an operation. The solution consists of seven objects, and each has one responsibility. Two boundaries matter for you: what stays in your application and what passes to SumDoc. Everything about the window, brand, permissions, and storage is yours. Everything inside the open document is SumDoc’s. ```plaintext [User / agent] | action v [Your product: brand, permissions, card, process] | embed, open, save, receive events v [Surface] <--> [Bridge to the application and the session contract] | typed commands v [Rust core] model → layout → scene → write to file | v [DOCX bytes and storage] ``` | Object | What it does | Owner | | -------------------------------- | ----------------------------------------------------------------------- | ------------------------------------- | | Your application | The product window, brand, permissions, document card, and workflow. | You | | The editor surface (Web Surface) | The ribbon, pages, input, selection, dialogs, and response to actions. | SumDoc, customizable under your brand | | Bridge to the application | Connects your application and the editor; holds no document of its own. | The shared boundary | | Document session | The lifecycle of one document and its revisions. | SumDoc contract | | The Rust core | Reads, models, computes, validates, and writes the document. | SumDoc | | Storage | The source file, versions, retention periods, and an access log. | You | | Capability profile | The available features and limits of a specific delivery. | Agreed | The simplifying rule One document — one main session. The surface shows the document and sends intents; the core decides whether an operation is allowed and what the saved file will become. ## Why two parts [Section titled “Why two parts”](#why-two-parts) The core and the surface solve different problems and are joined by a narrow contract. This isn’t duplication: there’s no second document engine in JavaScript. The core owns the document: it parses the DOCX, keeps its model and revision, computes the layout, checks every command — permissions, protection, an outdated revision — and writes the file. To every command it responds with a result, a warning, or an explicit refusal with a reason. The surface shows the pages and turns a click, gesture, or input into a command for the core. It manages focus, language, theme, and reading mode, and sends events to your application. It doesn’t write the file and doesn’t stand in for the document. ### Why Rust [Section titled “Why Rust”](#why-rust) A document is more than visible text. Inside a DOCX are relationships, styles, sections, tables, headers and footers, review data, and objects. Writing this back without loss needs a single owner of meaning, strict types, and the same core for the desktop, server, and mobile variants. ### Why Web [Section titled “Why Web”](#why-web) The same surface embeds in any web view — on a computer, in a browser, on a phone. You don’t need to rewrite the editor for every platform, and the product’s look stays yours. The boundary test If an action changes the document’s meaning or what ends up in the file, the core decides. If an action changes only how it’s shown and how you interact with it, the surface and your application handle it. ## Next [Section titled “Next”](#next) * What happens from opening the document to saving it — [Lifecycle](/sumdoc/lifecycle/). * What the product does with the document — the [capability map](/sumdoc/capabilities/). * Where it embeds: computer, browser, server, phone — [Platforms and deployment](/sumdoc/deployment/). * Your first call on your own machine — [Quick start](/sumdoc/quickstart/). # What SumDoc can do with a document > A capability map of the document side by task: text and tables, formatting and headers/footers, fields and tables of contents, review, mail merge, printing, and protection — with the calls that do it. Comparing editors by the number of buttons is pointless, and “we support DOCX” promises nothing. Below is a map by the tasks a document is opened for in the first place: what SumDoc does and, for developers, with which call. The list is taken from the processor itself, not from plans: the `--help` text lists 105 one-shot commands, and together with the 41 session commands that’s what the processor says about itself. If all you need is a “can it or not” answer, read the first column of the tables. The second column is for whoever will be wiring it up. The help text isn’t everything The processor parses more than it shows: the `--help` text lists 105 commands, and besides those it accepts another 31 commands that didn’t make it into the help text, plus three service routes for checking the build. Some of the unlisted ones are working commands — charts (`chart-docx`), editing images and shapes (`edit-image-object`, `move-drawing-object`, `group-drawing-objects`), equations (`insert-equation-object`), quick parts (`quick-parts-docx`), structured find and replace (`apply-structured-find-replace-docx`), filling form fields and content controls (`apply-forms-fields-business-docx`, `apply-content-controls-docx`), editing and deleting footnotes (`manage-note-docx`), planning and previewing a macro run and the trust registry for macro projects (`plan-vba`, `preview-vba`, `macro-trust`). You can call them, but there are no promises about them: they’re not shown in the help text, they’re not part of the capability profile, and they can change without notice. Plan your integration around what’s named below. ## Formats and calls [Section titled “Formats and calls”](#formats-and-calls) Which formats open and save, and what gets lost along the way, is stated on the overview page — [which files it works with](/sumdoc/overview/#which-files-it-works-with). Here are the calls that do it. DOCX is opened, edited, and saved by a session (`mutate`, `save`); the other formats are served by one-shot calls. | Format | How it’s done | | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | DOCM — DOCX with macros | The same session as DOCX; `save-docx-as` refuses to downgrade `.docm` to `.docx`. Macros: `inspect-vba`, `list-vba`, `run-vba` | | DOC — Word 97–2003 | `import-doc`; the `--preflight` flag lists in advance what will be lost and writes nothing | | PDF | `export-pdf`, `export-pdf-embedded` | | ODT | `import-odt`, `export-odt`; an editable copy — `create-editable-odt-copy`, `mutate-editable-odt-copy` | | RTF | `import-rtf`, `export-rtf` | | HTML | `import-html`, `export-html` | | Plain text | `import-txt`, `export-txt` | | EPUB | `import-epub`, `export-epub` | | FB2 | `import-fb2`, `export-fb2` | | XODT — flat ODT | `import-xodt`, `export-xodt` | | A whole file or a folder | `convert-doc`; `convert-doc-batch` with the extension specified and, when needed, walking nested folders | | Viewing without an editor: DOCX to a single HTML file | `render` | | Archival PDF/A-1b | `preflight-pdfa-1b` checks readiness and honestly reports that export is still closed; `validate-pdfa-1b` runs the check through an external program that you specify yourself | ## While the document is open [Section titled “While the document is open”](#while-the-document-is-open) A session does this: you open the file, work, save. For developers, the details are in [request and response objects](/sumdoc/envelope/). | Task | How it’s done | | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | | Text editing: insertion, deletion, line breaks, merging paragraphs | `mutate` with the edit kind | | Selection and its position | `set-selection` | | Undo and redo | `undo`, `redo` | | The document’s semantic model, layout, pages | `model`, `compose`, `paginate` | | Comments, tracked changes, styles | the `review` and `style` projections | | Trial edit: apply on a copy of the session, show the person “before → after”, then apply by number | `propose`, `commit-proposal` | | Macros of the open document: inspect, draw up a run plan, execute on a snapshot and show the difference, record the trust decision, commit the edits | `vba-inspect`, `vba-plan`, `vba-preview`, `vba-trust`, `vba-commit`, `vba-document-event` | | Save and checkpoint | `save`, `save-checkpoint` | | A snapshot to a separate file without clearing the unsaved flag | `snapshot-checkpoint` | ## Document formatting [Section titled “Document formatting”](#document-formatting) | Task | How it’s done | | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | Headers and footers: create, link to the previous section, unlink, edit, remove | `header-footer-action-docx` | | Sections: page orientation, margins, paper size | `section-page-setup-action-docx` | | A watermark with a choice of text, font, and size, plus other formatting | `design-tools-docx` | | Tables: copying and pasting cell content, working with a range of rows and columns | `table-docx` | | Lists and checking them | `lists-proof-docx` | | Images, shapes, and text boxes: inserting, replacing an image, editing text inside a shape, size, style, and alignment | nine calls, including `insert-image-object`, `insert-shape-object`, `replace-image-media`, `resize-drawing-object`, `distribute-drawing-objects` | ## Fields, tables of contents, indexes [Section titled “Fields, tables of contents, indexes”](#fields-tables-of-contents-indexes) | Task | How it’s done | | ---------------------------------------------- | ---------------------------------------------------------------- | | Table of contents: update or remove | `update-toc-docx`, `remove-toc-docx` | | List of figures by caption | `update-table-of-figures-docx` | | Bibliography and citation style | `apply-bibliography-command-docx`, `set-bibliography-style-docx` | | Index and table of authorities | `apply-index-authorities-command-docx` | | Fields: hyperlinks, codes and results, locking | `field-tools-docx` | ## Collaborative work on a contract [Section titled “Collaborative work on a contract”](#collaborative-work-on-a-contract) There are two kinds of work here. Sequential: compare versions, merge edits, discuss in comments, accept or reject tracked changes. And simultaneous — in the browser, several people can edit a document at once: other people’s input is visible as they type, with the author’s name and color, each person has their own undo, and the one who opened the document first writes to the file ([how it works](/sumdoc/webhost/#two-people-in-one-document)). For developers: on the session side these are four commands for the collaborative editing manager — `apply-concurrent-text-transaction`, `note-operation-order`, `note-operation-baseline`, `note-tracked-revision-range`; your own wrapper doesn’t need them. | Task | How it’s done | | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- | | Compare two versions and get a document with tracked changes | `review-compare-combine-docx --mode compare` | | Merge edits from several reviewers | `review-compare-combine-docx --mode combine` | | Comments: add, reply, resolve; accept or reject an edit | `review-docx` with `--insert-comment`, `--reply-comment`, `--resolve-comment`, `--accept-change`, `--reject-change` | | Tracked-changes recording state | `track-revisions-state` | | Spell check | `proofing-docx` | | Mail merge from a CSV recipient list | `mail-merge-business-docx` | ## Printing and output [Section titled “Printing and output”](#printing-and-output) | Task | How it’s done | | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | | Printing with a choice of pages, odd or even, order, and how tracked changes are shown | `print-docx` | | Checking the print set and device profiles | `validate-print-bundle`, `validate-print-devices` | | Exporting to PDF, including with embedded fonts | `export-pdf`, `export-pdf-embedded` | | Viewing without an editor: DOCX to a single self-contained HTML file | `render` | | The other formats — DOCM, ODT, RTF, HTML, plain text, EPUB, FB2, plus partial import of DOC (Word 97–2003) | [what you can do with which file](/sumdoc/overview/#which-files-it-works-with) | ## File security [Section titled “File security”](#file-security) | Task | How it’s done | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | | Inspect a macro project without running it: `inspect-vba` says whether there’s a project and shows the printable strings from it; `list-vba` parses the project for real — modules, procedures, and the source text when needed | `inspect-vba`, `list-vba` | | Run a macro behind a guard: every entry point requires explicit permission (`--allow`), without it there’s a refusal, and that’s the default state; external objects are allowed by name (`--grant`); the user’s file isn’t overwritten, changed paragraphs go to a copy (`--out`) — and only if the paragraph count matched; the moment of the run and the answers to dialogs are set in advance (`--now`, `--answer`). `open-vba` raises a document event the same way — open, new, close | `run-vba`, `open-vba` | | Find out what protects the document | `inspect-protection` | | Check readiness for archival PDF/A-1b | `preflight-pdfa-1b` | ## What is preserved as is [Section titled “What is preserved as is”](#what-is-preserved-as-is) The parts of the file that the editor doesn’t parse are carried over to the saved file unchanged; what it does parse is saved by the rules of the format. Verified on real documents: * content controls of every kind — text, checkbox, drop-down list, combo box, date, picture, repeating section — and protected forms: the allowed ranges are respected, a wrong password puts the document into read-only mode; `inspect-protection` shows what the file is protected with; * right-to-left writing; * embedded OLE objects — preserved whole and never executed; * footnotes and endnotes; * document properties and settings; * embedded HTML fragments (`altChunk`) — as an opaque block, without conversion. Where the boundaries stand is in [Readiness and boundaries](/sumdoc/status/). How to read this map This lists what’s called from outside and therefore gets tested against your files. It’s not a promise of full parity with Word: [Readiness and boundaries](/sumdoc/status/) says where the boundaries stand today, and [Risks](/platform/risks/) says what’s still open. For developers: a full description of every session call with its parameters is in the [reference](/reference/sumdoc/overview/); further on the document side — [how to get the document structure](/sumdoc/document-structure/), [hit testing by coordinate](/sumdoc/hit-test/), and [integration recipes](/sumdoc/recipes/). What changed from version to version — [version history](/sumdoc/changelog/). For spreadsheets, the same thing is collected in the [capability map next to Excel](/sumsheet/atlas/). # SumDoc version history > What was added, changed, and fixed in SumDoc from version to version. Each line below is a change visible in the product itself. Versions run from newest to oldest. The top entry can be ahead of what’s actually deployed: the changelog grows as the release comes together, and deployment is a separate step. Which version is available right now is shown in the release catalog, linked from the installation page. The version number is made up of the year, the quarter, and the patch number within the quarter: in `2026.3.4`, that’s the fourth patch to the third-quarter 2026 release. The patch count restarts every quarter, so `2026.3.19` is followed by `2026.4.0`, not `2026.3.20`. Downloadable filenames add one more part to the number — a running build number, for example `2026.3.4.25`. It doesn’t affect version comparison and exists to distinguish files of the same version built at different times. Release candidates and test builds carry a suffix: `2026.4.0-rc1`, `2026.4.0-beta1`. The application checks the installed version against what the update channel offers, and prompts you to update when a newer one comes out. You can check manually with the “Check for Updates…” menu item. Total releases: 64, counted from the `2023.2` quarter. ## 2026.3 releases [Section titled “2026.3 releases”](#20263-releases) ### 2026.3.19 [Section titled “2026.3.19”](#2026319) **Added** * Ctrl+Backspace and Ctrl+Delete delete a whole word. * Text marked up by tracked changes is now inserted through the common editing path. **Changed** * Saving to ODT now carries over table cell and row properties, table geometry, vertical cell merging, fractional width percentages, page breaks, spell-check-exempt ranges, and character position and kerning. * The search result navigation arrows are removed from the title bar; Shift+Enter now goes back through results. * The Home ribbon now matches the design. **Fixed** * Character scale and paragraph indent now apply inside table cells too. * An explicitly set row height no longer carries over to an adjacent table. * Repeated spaces are preserved when text wraps inside a cell. * Lists inside table cells no longer disappear when an ODT is reopened. * A case change now reaches the file instead of staying on screen only. * Paragraph shading now draws as a single band instead of two. ### 2026.3.18 [Section titled “2026.3.18”](#2026318) **Added** * Dense, medium-sized documents now render in parts: a page appears without waiting for the rest of the document. **Fixed** * Embedded images and objects now survive splitting and merging paragraphs, saving, and reopening. * Bookmarks now survive undoing a paragraph split and the save that follows. * Editing right-to-left paragraphs now sets a checkpoint, and it can be undone. * A refusal on open now shows on top of the file window instead of hiding behind it. * The “File changed on disk” dialog now matches the look of the other dialogs. * Accepted formatting now draws underneath a live selection instead of over it. ### 2026.3.17 [Section titled “2026.3.17”](#2026317) **Added** * Jumping back to the last edit point. * Navigating search results and cycling through floating objects from the keyboard. * Changing the case of selected text with Shift+F3 and through the “Change Case” gallery. * Ctrl+Z right after an autocorrect now undoes only the autocorrect, not the typed word. * A date field now deletes as a single unit; the text around it survives typing, deletion, and undo. * Editing the recipient list during a mail merge. **Changed** * Saving to ODT now carries over text color, colored underline, strikethrough, highlight color, ALL CAPS and small caps, subscript and superscript, and combinations of styles. * Opening EPUB and FB2 now skips images and parses tables instead of refusing the whole file. * Endnotes now go at the end of the document and at the end of the section. **Fixed** * A new document is now created with a single font size: letters no longer jump, and the first typed characters no longer disappear. * A line no longer changes height while you type. ### 2026.3.16 [Section titled “2026.3.16”](#2026316) **Added** * Inserting merge fields now goes through the common editing path; mail merge now runs on the common file-handling mechanism. * Saving to EPUB and FB2 now carries over footnotes and endnotes as a separate section, headings, numbered lists, images, and link addresses. * Saving to HTML, RTF, and EPUB now carries over multi-column layout, section vertical alignment, the starting page number, and header/footer margins. **Changed** * Word compound fields and the time field are now recalculated when the document opens. * The tracked-change timestamp now follows the latest edit, as in Word. **Fixed** * Deleting a footnote with tracked changes on now marks it instead of silently cutting it. * A selection refusal is now explained in plain language. * Select All in a document with an empty body no longer crashes. ### 2026.3.15 [Section titled “2026.3.15”](#2026315) **Fixed** * Inserting inside marked-up text and typing at the edge of a deletion with tracked changes on. * Comments on a range inside table cells now split the same way as in Word. * Long comments now paginate and no longer run off the page. * Enter over a selection now behaves as in Word. * Quickly replacing a table cell’s content, and undoing typed non-Latin text in a cell. * Disabled buttons no longer respond to clicks. ### 2026.3.14 [Section titled “2026.3.14”](#2026314) **Fixed** * A comment on a range now survives saving, splitting a paragraph, and editing next to it. * Rapid Enter presses no longer build up a lag or stall rendering. * Typing right after a bookmark, editing an empty paragraph, and formatting across a page break. * The insert menu, the object gallery, and the font color palette no longer pass clicks through to the document underneath. * An edit now survives reopening the same file. ### 2026.3.13 [Section titled “2026.3.13”](#2026313) **Added** * Saving to HTML, RTF, ODT, EPUB, and FB2 now carries over formatting: paragraph alignment, indents and spacing, text color and highlight color, letter spacing, ALL CAPS and small caps, subscript and superscript, outline, shadow, and raised and embossed text. * Tables in these formats now keep column and table width, row height, cell borders and shading, and vertical alignment. **Fixed** * Dotted, dashed, and wavy underlines are now legible at 100% zoom and draw in their own style instead of as a solid line. ### 2026.3.12 [Section titled “2026.3.12”](#2026312) **Added** * Inserting the date as an updatable field: the field now survives saving and updates when the document opens. * The list button can now remove a list, as in Word. **Changed** * With tracked changes on, inserting and deleting table rows and columns, section properties, page margins, and text replacement are now marked too; a tracked change in a cell is now signed with the reviewer’s name. * A reply to a comment now has its own identity: deleting a comment now removes its entries as a whole, and deleting the original comment no longer leaves a reply orphaned. * A comment now has a permanent number and a timestamp. * A paper shadow now appears under the page instead of a drawn frame. **Fixed** * A false unsaved-changes warning is removed. * The document’s font no longer visibly swaps out at startup. * The window no longer changes width on every render. * The “Automatic” font color value now clears the color without interrupting editing. * A numbered list now gets all nine levels, and Tab moves to the next one. ### 2026.3.11 [Section titled “2026.3.11”](#2026311) **Added** * With tracked changes on, style, font, color, size, ALL CAPS, strikethrough, highlight color, paragraph alignment, indent and spacing, paragraph style, and shading are now all marked. * A tracked change now carries two timestamps: local and universal. **Changed** * One formatting command now produces one tracked change, not several. **Fixed** * Accepting a deleted paragraph mark now merges paragraphs the same way as in Word. * Pages in long documents now lay out as in Word: a numbering level no longer overrides the indent set by the style. * Symbol font characters now recover as ordinary text. * Small caps and paragraph borders now reach the header and footer. ### 2026.3.10 [Section titled “2026.3.10”](#2026310) **Added** * Track changes mode: typing now both enters text and marks it, as in Word; a tracked change’s signature now carries the user’s name and the real time. * The “Recipe” template and content cards on the start screen. **Changed** * Navigation keyboard shortcuts no longer depend on the keyboard layout. * The advanced find-and-replace dialog and the navigation panel are now translated. * A header or footer now wraps by word using the font’s real metrics. **Fixed** * The “Track Changes” button no longer scrolls the document off screen. * The font size buttons now see a selection made from the keyboard. * Pasting over an entire selected paragraph. * A list in a new document no longer blocks saving. * A silently dropped character during tracked changes is now replaced with a named refusal. * Typing in a paragraph with a form field, and in a paragraph with a tab, is no longer blocked. ### 2026.3.9 [Section titled “2026.3.9”](#202639) **Added** * The “Go To” dialog now follows Word’s keyboard shortcuts: it closes with Escape and doesn’t depend on the keyboard layout. * Jumping to the previous and next page. * Inserting an emoji the same way Word does it. **Changed** * Rendering is faster: redundant recalculations on every redraw are removed. * A checkpoint now keeps the footnote reference, and a paragraph with a footnote stays editable. **Fixed** * Drag selection now snaps to whole words, as in Word. * A resolved comment no longer highlights the text; a comment card now grows to fit its text. * Bold for complex scripts no longer makes Latin text bold too. * Toggling formatting now works when the caret sits inside a word. * PageUp scrolls the screen again. * Typing in a wrapping paragraph no longer draws text over text. * Inserting a symbol from the dialog no longer breaks undo or the caret position. * The “Add Caption” dialog now closes with Escape regardless of focus. ### 2026.3.8 [Section titled “2026.3.8”](#202638) **Added** * Jumping to the start and end of the document. * Paragraph shading with a color picker, including a custom color. **Fixed** * Pasting from the clipboard now actually pastes instead of just reporting success. * Cut now removes the text instead of only copying it. * Deleting a selection no longer erases twice as much as was selected. * Shift-click now extends the selection instead of collapsing it. * macOS caret-movement shortcuts now reach the document. * Tab now works both at the start of a paragraph and in the middle of text. * The reason for a refusal now reaches the person instead of silence or a generic message. * The screen reader no longer announces “unavailable” for a working button. * Two documents with hyphenation or comments no longer get written into one shared file. * A chart now draws axes and category labels. ### 2026.3.7 [Section titled “2026.3.7”](#202637) **Added** * Comments on the document canvas: margin cards, replies, scrolling through long threads, a “Like” mark. * Table properties as in Word: borders and shading, text wrapping, position on the page, alt text, converting a table to text, and sort settings. **Fixed** * The comment reply field now supports Enter, paste, copy, cut, and “Select All”. * A reply draft is no longer lost when you switch windows. * A single core refusal no longer locks formatting for the rest of the session. * A multilevel list no longer breaks other actions. * The “File changed on disk” warning no longer pops up for a document no one touched. * Edit buttons are now disabled where the document can’t be edited. * Strikethrough and highlight color now work everywhere bold does. ### 2026.3.6 [Section titled “2026.3.6”](#202636) **Added** * The support assistant: a ticket now opens right from the conversation, together with the document being discussed, with a choice of what goes into the report. **Changed** * The first render of large documents is now time-bounded. * Undo in an open session now runs on a persistent path and survives a restart. **Fixed** * A list created in a new document now reaches the file. * The reasons a table action is unavailable are now stated in words. * A ticket from the form now goes out together with the document. ### 2026.3.5 [Section titled “2026.3.5”](#202635) **Added** * Jumping to the next and previous word with a keyboard shortcut. * A soft hyphen with Word’s standard keyboard shortcut. * Changing the case of selected text. **Changed** * A soft hyphen and a non-breaking hyphen now write to disk as the same elements Word writes. * Lists, highlight color, and strikethrough now go through the common editing path. **Fixed** * The application’s own write to the file no longer looks like an outside edit. ### 2026.3.4 [Section titled “2026.3.4”](#202634) **Added** * A non-breaking hyphen with Word’s standard keyboard shortcut. * Jumping to the end of the visible line, as in Word. **Changed** * Paragraph shading and borders now go through the common editing path. **Fixed** * Updating on macOS now shows download progress, can be triggered from the menu, and speaks six languages. * A page number field in a header or footer no longer disables editing the document. * The error message now shows plain language, not internal text. ### 2026.3.3 [Section titled “2026.3.3”](#202633) **Added** * Contacting support now works in every installation of the product. **Fixed** * Column width distribution now works even where a cell’s width isn’t set, and no longer changes the table when applied again. * Clicking a wrapped line now places the caret exactly where Word does. * The Linux package no longer conflicts with SumSheet on the same machine. ### 2026.3.2 [Section titled “2026.3.2”](#202632) **Changed** * Undo and redo are now a single history: table actions, cell text direction, and subscript and superscript now go through the same path as the rest of editing. * An edit spanning several paragraphs is now undone as a whole, not in pieces. **Fixed** * Redoing a structural table change now restores exactly what was undone. ### 2026.3.1 [Section titled “2026.3.1”](#202631) **Added** * The application icon in every size, for every screen. **Changed** * The release description now reaches the update channel together with the update itself. ### 2026.3.0 [Section titled “2026.3.0”](#202630) The first release of the line. Below is what the product entered it with. **Added** * Opening DOCX documents and editing directly in the open file. * Saving to the same file: writing it whole or not writing at all, a backup of the previous version, and recovery after a crash. * Plain-language refusals on a conflict with a change on disk, and on a read-only file. * Page layout and printing. * Tables, including drawing a table with the mouse. * Undo and redo. * Typing and moving the caret by Word’s rules: word boundaries, line boundaries, moving between pages. * A line break and a non-breaking space with the standard keyboard shortcuts. * Page settings. * Automatic application updates. * Contacting support right from the application. **Changed** * Typing responsiveness in large documents is about eight times faster. ## 2026.2 releases [Section titled “2026.2 releases”](#20262-releases) ### 2026.2.14 [Section titled “2026.2.14”](#2026214) **Changed** * Opening a dense document no longer waits for the whole file to parse: the first page appears immediately, and the rest load as you scroll. * Memory use stays flatter when working with a document several hundred pages long: parsed pages the reader hasn’t reached yet are freed. **Fixed** * The cursor no longer jumps to the start when background layout catches up with the edit point. ### 2026.2.13 [Section titled “2026.2.13”](#2026213) **Added** * Autosave with recovery after a crash: the next startup offers to return to unsaved work. **Fixed** * The recovery copy is written whole or not at all — no half-written file is left behind. ### 2026.2.12 [Section titled “2026.2.12”](#2026212) **Added** * Spell check for Russian and English, honoring ranges marked as exempt from checking. ### 2026.2.11 [Section titled “2026.2.11”](#2026211) **Changed** * Printing and PDF export now use the same layout as the screen, so pagination matches. **Fixed** * First-page headers and footers no longer carry over to the rest of the pages when a separate look is set for them. ### 2026.2.10 [Section titled “2026.2.10”](#2026210) **Added** * Merging with a data source: substituting fields and previewing the result page by page before writing the file. ## 2026.1 releases [Section titled “2026.1 releases”](#20261-releases) ### 2026.1.9 [Section titled “2026.1.9”](#202619) **Added** * Reading and writing ODT: text, paragraphs, styles, tables, and lists. **Changed** * The file format is now detected from its content, not just its extension. ### 2026.1.8 [Section titled “2026.1.8”](#202618) **Added** * Tracked changes: edits are marked with their author, and can be accepted or rejected one at a time. ### 2026.1.7 [Section titled “2026.1.7”](#202617) **Added** * Comments on a selected range of text, with threaded replies. **Fixed** * A comment’s anchor now survives splitting and merging paragraphs. ### 2026.1.6 [Section titled “2026.1.6”](#202616) **Changed** * Undo and redo now keep a single history for the whole document, not a separate one per edit type. ## 2025.4 releases [Section titled “2025.4 releases”](#20254-releases) ### 2025.4.8 [Section titled “2025.4.8”](#202548) **Added** * A ready-made editor surface you can open in a browser or embed in your own window. ### 2025.4.7 [Section titled “2025.4.7”](#202547) **Added** * The same contract over WebSocket: the process picks a free port on the local interface itself and issues a one-time pass. ### 2025.4.6 [Section titled “2025.4.6”](#202546) **Changed** * A refusal now arrives before the document changes, not after: a stale revision or an unsupported operation is refused entirely. ### 2025.4.5 [Section titled “2025.4.5”](#202545) **Added** * White-label styling: theme, interface language, read-only mode. ### 2025.4.4 [Section titled “2025.4.4”](#202544) **Added** * A persistent session: the document stays open between commands, and state isn’t rebuilt on every call. ## 2025.3 releases [Section titled “2025.3 releases”](#20253-releases) ### 2025.3.7 [Section titled “2025.3.7”](#202537) **Added** * Typed text editing with a check on the expected document and selection revision. ### 2025.3.6 [Section titled “2025.3.6”](#202536) **Added** * A snapshot of the document as an object tree: paragraphs, formatting runs, tables, images. ### 2025.3.5 [Section titled “2025.3.5”](#202535) **Changed** * A position in the document is now addressed by a stable node identifier, not a sequence number that shifted with every edit. ### 2025.3.4 [Section titled “2025.3.4”](#202534) **Added** * One-off commands on a file with no interface launch — for batch processing. ## 2025.2 releases [Section titled “2025.2 releases”](#20252-releases) ### 2025.2.6 [Section titled “2025.2.6”](#202526) **Added** * Find and replace across the document, with case sensitivity and whole-word matching. ### 2025.2.5 [Section titled “2025.2.5”](#202525) **Added** * Paragraph and character styles: applying, editing, and creating your own. **Fixed** * A style change now reaches the file instead of staying on screen. ### 2025.2.4 [Section titled “2025.2.4”](#202524) **Added** * Multilevel lists with numbering that continues through the whole document. ### 2025.2.3 [Section titled “2025.2.3”](#202523) **Fixed** * Space before and after a paragraph no longer doubles up at a page boundary. ## 2025.1 releases [Section titled “2025.1 releases”](#20251-releases) ### 2025.1.5 [Section titled “2025.1.5”](#202515) **Added** * Headers and footers, including a separate look for the first page and for even pages. ### 2025.1.4 [Section titled “2025.1.4”](#202514) **Added** * Page and section breaks; page settings are set per section. ### 2025.1.3 [Section titled “2025.1.3”](#202513) **Changed** * Line layout now accounts for kerning and character scale. ### 2025.1.2 [Section titled “2025.1.2”](#202512) **Fixed** * Word wrap no longer breaks a non-breaking space or hyphen. ## 2024.4 releases [Section titled “2024.4 releases”](#20244-releases) ### 2024.4.4 [Section titled “2024.4.4”](#202444) **Added** * Images in text: inserting, replacing, sizing, and text wrapping. ### 2024.4.3 [Section titled “2024.4.3”](#202443) **Added** * Merging and splitting table cells. **Fixed** * Column widths in percent are no longer rounded to whole numbers. ### 2024.4.2 [Section titled “2024.4.2”](#202442) **Added** * Cell borders and shading, repeating the header row on every page. ### 2024.4.1 [Section titled “2024.4.1”](#202441) **Fixed** * A table starting at the end of a page now moves whole to the next one if it fits. ## 2024.3 releases [Section titled “2024.3 releases”](#20243-releases) ### 2024.3.3 [Section titled “2024.3.3”](#202433) **Added** * Tables: reading, displaying, and editing cell content. ### 2024.3.2 [Section titled “2024.3.2”](#202432) **Changed** * Markup the editor doesn’t understand is preserved unchanged and written back to the file on save. ### 2024.3.1 [Section titled “2024.3.1”](#202431) **Fixed** * Reopening a saved file now gives back the same document, not an approximate match. ## 2024.2 releases [Section titled “2024.2 releases”](#20242-releases) ### 2024.2.3 [Section titled “2024.2.3”](#202423) **Added** * Writing DOCX: the assembled package opens in third-party editors. ### 2024.2.2 [Section titled “2024.2.2”](#202422) **Changed** * The file is written whole to a temporary file and replaces the original in a single action — an interruption never leaves a corrupted document. ### 2024.2.1 [Section titled “2024.2.1”](#202421) **Fixed** * The order of parts inside the package no longer changes on every save. ## 2024.1 releases [Section titled “2024.1 releases”](#20241-releases) ### 2024.1.2 [Section titled “2024.1.2”](#202412) **Added** * Text editing: typing, deleting, splitting, and merging paragraphs. ### 2024.1.1 [Section titled “2024.1.1”](#202411) **Added** * Selection with the mouse and keyboard, moving the cursor by word and by line. ## 2023.4 releases [Section titled “2023.4 releases”](#20234-releases) ### 2023.4.2 [Section titled “2023.4.2”](#202342) **Added** * Displaying pages with margins, indents, and paragraph alignment. ### 2023.4.1 [Section titled “2023.4.1”](#202341) **Changed** * Line and page breaking is now computed in the core, not in the interface. ## 2023.3 releases [Section titled “2023.3 releases”](#20233-releases) ### 2023.3.1 [Section titled “2023.3.1”](#202331) **Added** * Font styles and sizes, text color and highlight color. ### 2023.3.0 [Section titled “2023.3.0”](#202330) **Added** * Displaying the document’s content while preserving paragraph structure. ## 2023.2 releases [Section titled “2023.2 releases”](#20232-releases) ### 2023.2.1 [Section titled “2023.2.1”](#202321) **Changed** * Parsing the document package is now moved into the Rust core. ### 2023.2.0 [Section titled “2023.2.0”](#202320) **Added** * Reading DOCX: package parts, the relationships between them, the text flow. ## Before switching to quarterly numbering [Section titled “Before switching to quarterly numbering”](#before-switching-to-quarterly-numbering) The earliest builds shipped under a different kind of number and went out as alpha — for demonstration, not for production use. There’s no separate changelog for them: back then, the product changed faster than versions were released. # Live example: editor in the browser > A working SumDoc editor right on the documentation page, and the whole small project that connects it: the page, the frame code, and the host. Below is a real SumDoc editor, the same one you get in the delivery, with an ordinary contract: headings, lists, a table with dates and amounts. When the demo environment is up, you can use it right here: the document opens in your own sandbox, only you see your edits, they’re never saved anywhere, and the next visitor gets the original document. When the demo environment is down, a snapshot of the same editor sits in its place, and the frame says so underneath. ![The SumDoc editor with an open contract](/examples/sumoffice/a4-demo.png)[The SumDoc editor with an open contract](https://view.sumoffice.com/view/wild-horse/?entry=look) Full screen[open in a new tab ↗](https://view.sumoffice.com/view/wild-horse/?entry=look)A real small project: the frame above runs exactly the files shown below, from `examples/a4-embed` ## What this example consists of [Section titled “What this example consists of”](#what-this-example-consists-of) The frame above runs the same editor and the same embedding method, but the environment is hosted by us: our demo service feeds it the document. To get the same thing working for you, you need three things — a page with a spot for the frame, the connection code, and your server with two endpoints. That’s exactly what’s shown below: a whole project that runs on its own, not excerpts from one. ## Where it’s easy to get this wrong [Section titled “Where it’s easy to get this wrong”](#where-its-easy-to-get-this-wrong) Edits arrive at your side as `multipart/form-data` — a single part named `file`. You must parse the body. If you write the raw request body into the document, form boilerplate lines get glued to the start of the file, and the document stops opening — silently, with no error in the log. The telltale sign of this on unpacking is “extra bytes at beginning”. We’ve been caught by this ourselves, so the parsing in the example is spelled out in full, not reduced to a library call. ## How this example differs from a production embedding [Section titled “How this example differs from a production embedding”](#how-this-example-differs-from-a-production-embedding) | What | In this example | In your application | | ----------------------------- | ----------------------------------------------- | ------------------------------------------------------ | | Who the user is | A guest: one identity for every visitor | Your signed-in user | | Where the document comes from | The same demo file every time | Your file by ID | | Where the edits go | Nowhere: the save is accepted and never written | Into your storage, through your own API | | Permissions | Not checked | You check them, including again while the session runs | | The `/fastdoc/` proxy | Done by the same process, for brevity | Usually an nginx rule | Everything else matches: the same editor, the same core, the same embedding method. ## Next [Section titled “Next”](#next) * How to connect it yourself, in three steps, with the required conditions — [Editor in the browser](/sumdoc/webhost/). * Where the boundaries of responsibility lie — [Responsibility and security](/sumdoc/responsibility/). * Other ways to deploy SumDoc — [Platforms and deployment](/sumdoc/deployment/). # Platforms and deployment > Six ways to deploy SumDoc and what's proven for each: desktop app, ready-made build, headless server, browser, Android, and iOS. *Only the way of deployment changes. The document itself and the contract with it stay in the Rust core — the same one on every platform.* | Profile | How it works | What’s proven today | | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Inside the desktop app | Your application starts the editor service, opens its address in the system web view, and receives events. | In the macOS web view (WKWebView), the full cycle has been completed: document ready → unsaved changes appeared → saved → reopened. An adapter is provided for the Windows web view (WebView2). | | Ready-made app | The SumDoc desktop app (an Electron shell) is delivered as a whole. | The most complete feature set for the user. This application’s internal channels don’t become a public interface. | | Headless server | Your service manages the core session and is responsible for storage itself; no interface is needed. | The processor works. Serving many clients at once, access checks, quotas, and fault tolerance are a separate job. | | Browser | The browser gets the same editor as in the desktop app, inside your page on your domain. The core on the server computes the document: a separate process is started for every user — [Editor in the browser](/sumdoc/webhost/). | Only the page code and rendering go to the browser. SumDoc has no browser build of the core, and this path doesn’t need one. | | Android | The core is attached to your application as a library (through JNI) and runs under Android WebView. | The ready-made SumDoc app for Android is published in [Google Play](https://play.google.com/store/apps/details?id=com.sumoffice.sumdoc). For embedding into your own application, a free viewing kit (view SDK) is built from the same build, with the same version number: the core library, the page, and the bridge; viewing only. Editing inside your application is licensed separately, per application. | | iOS | The core is attached to your application as a library (from Swift) and runs under WKWebView. | The ready-made SumDoc app for iPhone and iPad is published in the [App Store](https://apps.apple.com/app/id6807049845), and for macOS in the [Mac App Store](https://apps.apple.com/us/app/id6808759135); the minimum iOS version is 16. The viewing kit for embedding (xcframework, the page, and the bridge) ships with every store build under the same version number. | ## Server variant [Section titled “Server variant”](#server-variant) ```plaintext [Client: browser or phone] → [Your service: sign-in, storage, audit] | commands and events v [SumDoc session adapter] | v [Rust core] ``` Important The SumDoc core as a processor never calls any cloud on our side. Only the ready-made desktop app has outbound traffic — that’s the support channel described in [security](/platform/security/). If your service faces the internet and serves several clients at once, security, quotas, process isolation, observability, and availability commitments are agreed separately. ## Where to read more [Section titled “Where to read more”](#where-to-read-more) * The editor inside a web application, with nothing for the user to install — [Editor in the browser](/sumdoc/webhost/). * For developers: embedding the surface in a WebView or iframe — [Embedding Surface](/sumdoc/embedding/), starting it — [Web Surface](/sumdoc/surface/). * What’s available inside the desktop app window and why it isn’t a public SDK — [Internal objects of the application window](/sumdoc/electron/). * Managing a session from a headless service — [The same contract over WebSocket](/sumdoc/websocket/). * The overall picture of deployment modes for both products — [Embedding modes](/platform/deployment/). # Diagnostics and checklist > What to check if the first run doesn't work: six typical symptoms and a ten-step checklist before you go live. If the first run isn’t working, find the symptom in the table: next to it is exactly what to check. | Symptom | What to check | | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Application not found | Installation path: `/Applications/SumDoc.app` on macOS, `C:\Program Files\SumDoc` on Windows (the folder could have been changed during installation), `/opt/SumDoc` on Linux — if you installed a `deb` or `rpm` package. The `AppImage` delivery has no installation folder: the files sit inside the image itself, and you can extract them with `./SumDoc-….AppImage --appimage-extract`, then look in `squashfs-root/resources/`. Also check that you downloaded the build for your architecture | | The processor doesn’t start | The application package is corrupted or wasn’t copied in full. On macOS and Linux, check that the file has execute permission | | The response has `ok: false` | Read the `error`, `cmd`, and `id` fields: they say which command was refused and why. Check the file path and the operation’s fields | | The file didn’t change | First, check `result.mutation.result_kind` in the response to the edit: only `applied` changed the document, while the envelope stays `ok: true` for `invalid-request`, `invalid-target`, `not-found`, and `deferred` too ([how to read the response](/sumdoc/envelope/)). Next, check whether you’re saving to a new path; what the revision and the unsaved-changes flag show; read the result again with the `model-docx` command | | The surface disconnected | If you got an `unmounted` event you didn’t ask for, check whether you mounted a second surface: there’s only one per page, and a second `mount` unmounts the first ([what the surface accepts and what it drops](/sumdoc/embedding/)). Otherwise, check a page reload, the pass, the local interface port, the child process lifecycle, and reconnection after a drop | | `window.fastdocShell` is undefined | The code is running outside the SumDoc application’s own window — those objects aren’t there. For embedding, use the external contract: JSON-line exchange, WebSocket, or the surface | ## First integration checklist [Section titled “First integration checklist”](#first-integration-checklist) 1. Find the installed application and `fastdoc-cli` inside it — paths for all three systems are given in [Installation and verification](/sumdoc/install/). 2. On macOS and Linux, check that `fastdoc-cli` has the executable flag set; Windows has no such flag. 3. `ping` → `ok: true`, `pong: true`. 4. `open` with `document_id` given. 5. `model` — save the original text for comparison. 6. An edit with `transaction_order: 1`. 7. Save to a new `output.docx`. 8. Read `output.docx` again with the same processor. 9. Open `output.docx` in SumDoc and see the change. 10. `shutdown` and end the process. Minimal integration is up If both JSON-line exchange and WebSocket exchange work, the saved DOCX reads back from disk, and SumDoc shows the change on screen — minimal integration is up. The next step: choose the set of operations you need and lock them into a separate, versioned contract schema. ## What to attach to your request [Section titled “What to attach to your request”](#what-to-attach-to-your-request) If the table above didn’t find the cause, write to . Triage is faster when the message already has: * the SumDoc build version and the system where you see this; * the command name (`cmd`) and the full refusal text (`error`), together with the request `id`; * one request line and one response line as they are, not paraphrased; * the smallest anonymized DOCX that reproduces it; * whether it reproduces in a new process — after `shutdown` and a fresh start. ## Where to look next [Section titled “Where to look next”](#where-to-look-next) * The request and response format, including fields that may be absent — [Request and response objects](/sumdoc/envelope/). * The full list of commands with parameters — the [Session Protocol reference](/reference/sumdoc/session-protocol/). * Transport refusal codes and text — [SumDoc transport and message format](/reference/sumdoc/transport/). * Behavior after a dropped connection — [Embedding Surface](/sumdoc/embedding/). # Document structure: how to get it > Architecture and boundaries of responsibility, the path of one user action, the semantic model, and the current Rust Session API for reading it. ## Architecture and boundaries of responsibility [Section titled “Architecture and boundaries of responsibility”](#architecture-and-boundaries-of-responsibility) The data path is the same — in the desktop app, in the system web view, and when running headless: | Layer | What it does | What it doesn’t do | | -------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | | Your application | Window, brand, sign-in, storage, workflows and their lifecycle | Doesn’t own the document’s model or its layout | | The editor surface (Web Surface) | Canvas, ribbon, input, showing menus, delivering events | Doesn’t edit DOCX directly | | Application adapter | Starting the process, parsing the greeting line with the address, exchange over JSON or WebSocket, window events | Doesn’t parse the document’s markup | | Document session | Commands, selection, history, model and layout projections, saving | Doesn’t give arbitrary access to the page’s markup | | The Rust core | The OOXML package, the document’s meaning, layout, writing back to the file | Doesn’t depend on the shell’s styling | | The DOCX file | What gets saved and reopened | Is never replaced by an HTML snapshot | ### The path of one user action [Section titled “The path of one user action”](#the-path-of-one-user-action) * **Pointer event.** The surface receives the coordinates of a click, right-click, or double-click. * **Hit-testing.** The coordinate is mapped to a page, line, and caret position, and then to a document object. * **Gathering context.** The object itself, the selection, its parents in the document structure, the revision number, and the list of allowed commands are collected. * **Interface decision.** SumDoc and your side assemble the context menu — the document doesn’t change at this point. * **Typed command.** The chosen item turns into a command with the expected revision given. * **Changing the document.** The core checks the revision and permissions, changes the model, and returns confirmation with the new revision. * **Redraw and save.** The projections update; saving writes a DOCX that reopens with the same model. The main rule for extending it You can add any behavior around the processor, but you can’t create a second source of truth for the document — in the DOM, in JavaScript state, or in manually edited OOXML. ## How to get the document structure [Section titled “How to get the document structure”](#how-to-get-the-document-structure) The term “document structure” is ambiguous. SumDoc splits it into five views, so you request only what you actually need. | View | Command | Purpose | Sample data | | ----------------- | -------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------- | | Semantic model | `model`, `model-docx` | Paragraphs, formatting runs, tables, references to styles and numbering, support markers | `body.blocks[]`, `paragraph_index`, `text`, `runs[]` | | Layout | `compose`, `paginate` | Sections, pages, lines, breaks, geometry | `page_index`, line boundaries, page order | | Scene | `print`, `print-window`, `print-delta` | Pages ready to render, and drawing primitives | page scenes and their fingerprints | | Review and styles | `review`, `style` | Comments, tracked changes, style resolution | the review and style projections | | Edit state | `status`, `set-selection` | Revision, whether there are unsaved changes, undo and redo, selection, and view state | `accepted_revision`, `selection_revision` | ### Example: the semantic model [Section titled “Example: the semantic model”](#example-the-semantic-model) ```bash # $CLI — path to the processor, see "Installation and verification" "$CLI" model-docx /data/contract.docx --format json ``` ```json { "model_version": "fastdoc-d1-document-model-v1", "block_count": 1, "paragraph_count": 1, "body": {"blocks": [{ "kind": "paragraph", "block_index": 0, "text": "SumDoc basic paragraph.", "style_ref": null, "numbering_ref": null, "runs": [{ "run_index": 0, "text": "SumDoc basic paragraph.", "direct_format": {"bold": null, "italic": null} }] }]} } ``` What counts as a stable reference Three fields in the example are empty, and that’s not about anything being unfinished. `style_ref` is a reference to a named paragraph style, and it’s empty as long as the paragraph isn’t styled that way; `numbering_ref` is a binding to numbering, empty outside a list; `direct_format` holds direct formatting on top of the style, and its fields stay empty until something is set manually. The paragraph in the example has no style, no list, and no manual formatting — hence three `null`s in a row. A paragraph index is convenient for simple commands, but extensions need a stable node identifier together with the revision number: the index shifts with any edit earlier in the document. A public addressing scheme deserves its own agreement, and you shouldn’t expose internal selectors or markup nodes. ## How to start a session today and read the document [Section titled “How to start a session today and read the document”](#how-to-start-a-session-today-and-read-the-document) ### JSONL session: exchange over standard input and output [Section titled “JSONL session: exchange over standard input and output”](#jsonl-session-exchange-over-standard-input-and-output) The process prints the first readiness line with the `fastdoc.session-serve.v1` schema. After that, every input line is a JSON request, and every output line is its response, tied together by identifier. ```json {"id":"open-1","cmd":"open", "path":"/data/contract.docx","document_id":"contract-42"} {"id":"model-1","cmd":"model"} {"id":"pages-1","cmd":"paginate"} {"id":"review-1","cmd":"review"} {"id":"state-1","cmd":"status"} ``` ```json { "id": "model-1", "ok": true, "cmd": "model", "elapsed_ms": 2, "result": { "model_version": "...", "body": { "blocks": [] } } } ``` ### WebSocket on a local address [Section titled “WebSocket on a local address”](#websocket-on-a-local-address) ```bash "$CLI" serve --ws 0 # stdout: {"schema":"fastdoc.session-ws-bootstrap.v1", # "host":"127.0.0.1","port":49172,"token":"..."} ``` * Binding is 127.0.0.1 only. Port 0 is chosen automatically. * The token is a 256-bit secret from the system’s source of randomness. Don’t write it to logs or pass it to analytics. * The commands are the same. JSON-line exchange and WebSocket exchange go through the same session and the same request schema. Recommendation for the first pilot Start with a separate core process and JSON-line exchange or a local WebSocket: it’s a verifiable boundary that doesn’t depend on your application’s language. Calling the core directly in-process can be locked in later, without mixing internal types into the public interface. ## Next [Section titled “Next”](#next) * Resolving an object from a coordinate — [Hit-testing](/sumdoc/hit-test/). * What else the processor does — the [capability map](/sumdoc/capabilities/). # Internal objects of the SumDoc application window > What's available inside the desktop SumDoc window, why you'd need it, and why the window's internal contract is not a public interface. Trust boundary These objects exist only inside the SumDoc application’s own window. They won’t be there in Safari, Chrome, in your `iframe`, or on an arbitrary domain. For embedding, use JSON-line exchange, WebSocket, or the editor surface. And only inside the **document** window. The application’s utility windows — the problem report, the assistant — have their own narrow sets of calls, and they deliberately don’t reuse the document window’s common set: such a window needs a handful of calls and nothing from the editor surface. Looking for `fastdocShell` there is pointless. ::: | Object | Purpose | Example methods | | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- | | `window.fastdocShell` | Document, editor commands, state, save, menu | `getState()`, `getCurrentDocumentTruth()`, `openDocxPath()`, `onStateChanged()` | | `window.a4Update` | Application updates | `status()`, `check()`, `start()`, `dismiss()`, `reveal()`, `openNotes()`, `onState()` | | `window.a4Help` | Version and support | `version()`, `reportProblem()`, `supportBundle()`, `checkUpdates()`, `reportBadge()`, `onReportBadge()` | | `window.a4Vizor` | Notes on the window’s built-in log: it lives in the tab’s memory for about a minute and only leaves together with the problem report | `onNote()` | ## Examples inside the application’s own window [Section titled “Examples inside the application’s own window”](#examples-inside-the-applications-own-window) ```ts const state = await window.fastdocShell.getState(); const truth = await window.fastdocShell.getCurrentDocumentTruth(); const version = await window.a4Help.version(); const stopState = window.fastdocShell.onStateChanged((next) => { console.log("document state", next); }); const stopUpdate = window.a4Update.onState((next) => { console.log("update state", next); }); await window.a4Update.check(); // Be sure to unsubscribe when the component unmounts. stopState(); stopUpdate(); ``` ## How to choose the right API [Section titled “How to choose the right API”](#how-to-choose-the-right-api) * Writing your own desktop app or a server-side wrapper — use `fastdoc-cli serve` with JSON-line exchange. * A shell built on web technologies that needs asynchronous exchange — use `serve --ws 0`. * Need to demonstrate embedding on the user’s machine — use the `surface` command with a WebView window or `iframe`; editing in this surface is limited to the first paragraph. * Your product lives in the browser and the core must run on the server — see [editor in the browser](/sumdoc/webhost/). * Modifying the SumDoc application itself — the window’s internal contract, by separate agreement. # Embedding Surface > How to embed the editor surface in your application: iframe and WebView, mounting and unmounting, subscribing to events, reconnection, and a production setup. The surface starts locally and opens at the address from bootstrap. This page is about embedding it in your application. The surface edits only the first paragraph You can’t embed it as a full editor: it declares open, editing **the first paragraph**, save, and events. This is a verifiable demonstration of the path, not an editor for end users — see [Starting Web Surface](/sumdoc/surface/). The full browser editor is the [web host](/sumdoc/webhost/). Two different ways through iframe This describes embedding a surface that runs **alongside your application** — on the same machine as the user: a desktop program starts Surface Host and opens its address in its own window. If your product lives in the browser and the core must run **on the server**, you need a different path — [Editor in the browser](/sumdoc/webhost/). There, the user installs nothing, and a separate process starts on the server for every open document. Start with the demo first If Surface hasn’t run yet, start with [launching it](/sumdoc/surface/): it walks through the full path from installation to a saved file. ## How to start the surface [Section titled “How to start the surface”](#how-to-start-the-surface) ```bash # $CLI — path to the processor, see "Installation and verification" "$CLI" surface --port 0 \ --doc /data/input.docx --save /data/output.docx # first line of stdout: fastdoc.surface-host-bootstrap.v1 # open the address from bootstrap.url in WKWebView, WebView2, or a browser ``` ## Mount the surface and remove it [Section titled “Mount the surface and remove it”](#mount-the-surface-and-remove-it) What the surface accepts quietly, and what it quietly drops Only names starting with `--fastdoc-` get into `cssVariables`, and only string values: `"16px"` gets through, `16` doesn’t. The surface skips everything else with no error and no warning. The list of what it understands is on the [Customizing under your brand](/platform/white-label/) page. The `locale` field is strict too: if you pass something other than a string, or nothing at all, the surface’s language becomes English. And `theme` is matched letter for letter against the word `dark`: only that value makes the surface dark. `"Dark"`, `"DARK"`, `true`, and any other value silently give you light — there’s no “looks like dark” check here. The `theme` parameter in the page address follows the same rule. `readOnly` here disables input in the surface itself — it disables the edit field and the save button. This is not document protection: commands sent directly over the session don’t obey it. A core-level block is the document’s own protection mode, which refuses any editing command. There’s only one surface per page. A second `mount` call doesn’t start a second surface — it first unmounts the first one, silently for the caller, though the host gets an `unmounted` event it didn’t ask for. You can’t put two documents side by side on one page this way: you need two pages, each with its own surface. For the same reason, `window.fastdocSurface.unmount()` removes whichever surface is currently alive — not “yours”, but the only one. And one exception instead of a silent skip: if `mount`’s first argument isn’t a page node, the call throws `TypeError`. Here the surface doesn’t forgive — unlike the settings above. ```ts const handle = window.fastdocSurface.mount(container, { theme: "light", locale: "ru", readOnly: false, cssVariables: { "--fastdoc-accent": "#2f5bff" } }); // when the tab or document closes handle.unmount(); ``` ## How to receive events [Section titled “How to receive events”](#how-to-receive-events) ```js window.addEventListener("fastdoc-host-event", (event) => { const message = event.detail; if (message.schema !== "fastdoc.surface-host-event.v1") return; switch (message.type) { case "ready": console.log(message.documentPath); break; case "dirty": setUnsavedBadge(message.dirty); break; case "saved": console.log(message.path, message.byteCount); break; case "error": showError(message.operation, message.message); break; case "unmounted": releasePartnerResources(); break; } }); ``` | Environment | Where it occurs | Event channel | | --------------------------- | ----------------- | ------------------------------------------------------- | | WKWebView, WebKitGTK | macOS, iOS, Linux | a message handler named `fastdocHost` | | WebView2 | Windows | `window.chrome.webview`, the `WebMessageReceived` event | | A plain browser, no wrapper | everywhere | the DOM event `fastdoc-host-event` | You don’t need to choose a channel: the surface sends every event to all three at once. The host listens on whichever one it has and knows nothing about the rest. Honest status of Surface Host Today this is a portable surface with a limited set: you can mount it in your window and unmount it again, and it emits `ready`, `dirty`, `saved`, `error`, and `unmounted` events. That’s enough to prove the embedding boundary, but there’s no full external interface yet to every editor feature or to extending the context menu. ## Embedding [Section titled “Embedding”](#embedding) ```html ``` The surface reports its states — `ready`, `dirty`, `saved`, `error`, and `unmounted` — through the `fastdoc-host-event` window event. That’s enough to know what’s happening with the document, but not enough to control it: for full access to the model and the whole set of operations, work in parallel through JSON-line exchange or WebSocket. Known behavior of the current build During testing, one long-idle connection dropped, and the page reported that it had lost the connection to the surface. Reloading the page and saving right after worked without loss. In a production setup, plan for a connection liveness check, automatic reconnection, and a visible status indicator — so people know whether their edits are being saved. ## What to plan for in a production setup [Section titled “What to plan for in a production setup”](#what-to-plan-for-in-a-production-setup) The surface starts on a random free port, not a predetermined one: a busy port and connections from elsewhere to it are one more way to disrupt operation. The pass is issued anew for every session and must not end up in web server logs together with the page address. After a drop, the connection recovers, but an edit is never blindly retried: first confirm it wasn’t applied before the drop, or the document will get it twice. Saving first writes a new copy, and only by the user’s explicit decision does it replace the original file. After a disconnect and after a save **After a dropped connection**, don’t blindly retry the last edit: first read the document’s current state. The connection could have dropped after the edit was already applied, and retrying would duplicate it. **After the `saved` event**, reopen the saved DOCX and confirm the change is there. This is a cheap check that catches any mismatch between what the surface showed and what landed on disk. **Show the operator the session state** — connecting, ready, unsaved edits, saving, saved, error. People need to see whether it’s safe to close the window right now. ## Exact names [Section titled “Exact names”](#exact-names) Event names, schemas, the global object, and startup parameters are collected in the [browser surface interface](/reference/sumdoc/surface-api/) reference. Take them from there: on this page they’re given as examples and may lag behind. # Request and response objects > The minimal command sequence, required and recommended request fields, the response format, and error handling. Every message is a plain JSON object. You choose the `id` field, and the core returns it unchanged. That lets you match responses to requests even when working in parallel. ## Minimal sequence [Section titled “Minimal sequence”](#minimal-sequence) ```json {"id":"ping-1","cmd":"ping"} {"id":"open-1","cmd":"open","path":"/absolute/input.docx","document_id":"my-document"} {"id":"model-1","cmd":"model"} {"id":"insert-1","cmd":"mutate","operation_kind":"insert-text","paragraph_index":0,"offset":0,"text":"Hello from the API. ","document_id":"my-document","transaction_order":1,"transition_kind":"api-insert"} {"id":"save-1","cmd":"save","path":"/absolute/output.docx"} {"id":"shutdown-1","cmd":"shutdown"} ``` ## Required and recommended fields [Section titled “Required and recommended fields”](#required-and-recommended-fields) | Field | Purpose | Rule | | ------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `id` | Request/response correlation | Optional. Any JSON value — a string, a number. Returned unchanged, so it should be unique among requests whose response hasn’t arrived yet | | `cmd` | Session command name | One of the names listed in the `supported_commands` field of the greeting message | | `path` | Input or output file | Absolute path only | | `document_id` | Stable document identity | Pass it in `open` and in edits. It determines how strictly the order is checked — see the box below | | `transaction_order` | Order of changes | Increases monotonically: 1, 2, 3… | | `transition_kind` | Reason or transition type | A short diagnostic label | | `operation_kind` | Semantic operation | Required for `mutate`. For example, `insert-text` | | `paragraph_index` | The paragraph number the edit applies to | Required for `mutate`. Zero-based numbering | | `offset` | The edit’s position within the paragraph | Optional, defaults to `0`. Counted in characters, not bytes or UTF-16 units | | `text` | The text to insert | Needed by every kind that inserts something. Without it, the insertion does nothing | | `delete_count` | How many characters to delete | Optional, defaults to `0` — so a delete without this field successfully deletes nothing. Needed by `delete-text` and `replace-text` | ## Response format [Section titled “Response format”](#response-format) Success: ```json {"id":"ping-1","ok":true,"cmd":"ping","elapsed_ms":0,"result":{"pong":true}} ``` Refusal: ```json {"id":"bad-1","ok":false,"cmd":"mutate","elapsed_ms":0,"error":"..."} ``` Error handling The response arriving doesn’t mean the command succeeded: those are different things. Always check `ok === true`; when it’s `false`, log `id`, `cmd`, and `error` in your integration log. `error` is a reason in words, not a code: don’t branch your handling on it, the wording changes along with the message. Distinguish cases by command and by outcome, and show the text itself to the user and write it to the log. A stable list of errors is one of the things [locked in before integration begins](/sumdoc/status/). If you’re also embedding spreadsheets, don’t carry over the habit from SumSheet: there, a refusal has a separate `code` field; here it doesn’t. For `mutate`, `ok` alone isn’t enough. An edit the core didn’t accept — say, with an unknown `operation_kind` — still returns `ok: true`, and the outcome is named in the `result.mutation.result_kind` field. Check it too: otherwise an unaccepted edit will look successful, the document will stay unchanged, and you won’t find out. The rule is simple: **only `applied` changed the document**. Every other outcome means it didn’t, and they differ only in the reason. | Outcome | What happened | | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `applied` | The edit was applied. This is the only case where the document changed. | | `invalid-request` | The request itself is invalid: an unknown operation kind, inconsistent fields. | | `invalid-target` | The request is understood, but points to the wrong place — that edit can’t be made at that address. | | `not-found` | What was referenced isn’t in the document. | | `deferred` | The operation’s condition wasn’t unambiguously satisfied — for example, it needed exactly one matching field, but found a different number of them. The core doesn’t treat this as a request error and changes nothing. | Checking for equality with `applied` is more reliable than enumerating refusals: there are more than two outcomes, and comparing against just `invalid-request` will miss the other three. Response contents | Field | When it’s present | What it means | | ----------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `id` | always | The request’s tag, returned unchanged. Equal to `null` if the request didn’t carry one or couldn’t be parsed. | | `ok` | always | `true` — the command succeeded, `false` — it was refused. | | `cmd` | almost always | The command name. Absent from the response to `shutdown` and on a request parse error — in that case, the command name is unknown. | | `elapsed_ms` | almost always | Processing time. Absent from the response to `shutdown`. | | `result` | when `ok: true` | The command’s result. | | `error` | when `ok: false` | A string with the reason for the refusal. | | `result.mutation.result_kind` | in the response to `mutate` | The edit’s outcome. Only `applied` changed the document; `invalid-request`, `invalid-target`, `not-found`, and `deferred` mean it didn’t. The envelope still stays `ok: true`. | | `shutdown` | in the response to `shutdown` | `true`. A sign the session is closing: no fields other than `id` and `ok` arrive in this response. | When parsing a response, don’t treat `cmd` and `elapsed_ms` as required: they’re absent on session shutdown and on an unparsed request. Edit order isn’t always checked How strict the check is depends on whether you named the document when opening it. **With `document_id`.** Every edit must carry a `transaction_order` equal to the previous one plus one. Skip a number or repeat one, and you’ll get the refusal “out-of-order history transaction: expected 2, received 1”, and the document won’t change. If an edit’s `document_id` doesn’t match the one from open, you get a different refusal: “stale document identity: expected …, received …”. **Without `document_id`.** The order isn’t checked at all: `0` is replaced with the next number in sequence, and any other number is accepted as is. A mismatch between your count and the core’s history will go unnoticed. Hence the advice to name the document when opening it: strict checking is what turns desync into an explicit refusal instead of a silent mismatch. The operation\_kind values Paragraph text editing accepts eight kinds: `insert-text` and `delete-text`, their tracked-changes variants `insert-text-tracked` and `delete-text-tracked`, `split-paragraph` and `merge-with-next` for splitting and joining paragraphs, `insert-line-break` and `delete-line-break` for line breaks. The `replace-text` kind is accepted too: the core splits it itself into a delete and an insert — as one history entry, not two. It’s the only one that responds to an incomplete request with an envelope refusal rather than an edit outcome: without `delete_count` or without `text` you’ll get `ok: false` with the reason “replace-text requires a non-empty delete range and insertion”. The other kinds respond `ok: true` in the same situation and change nothing. Formatting a selection uses the same requests with different kinds: `set-bold`, `set-italic`, `set-underline`, `set-font-family`, `set-font-size`, `set-font-color`, `set-text-highlight`, `set-strikethrough`, and other character properties. For complex changes, the `apply-text-transaction` command is meant to replace `mutate` — see [Typed edit types](/reference/sumdoc/typed-dto/). # SumDoc examples > Working projects: exactly what you need to write to embed the document editor in your application. An example is not a code excerpt — it’s a whole small project: a page, a connection, and a host with two addresses. The full code is shown on the page, file by file. * [![](/examples/sumoffice/a4-demo.png)Live example: editor in the browsera working SumDoc editor right on the page, and the whole project that connects it](/sumdoc/demo/) ## Next [Section titled “Next”](#next) * How to connect it yourself, in three steps, with the required conditions — [Editor in the browser](/sumdoc/webhost/). * What the system consists of — [Architecture](/sumdoc/architecture/). * What you can call today — the [SumDoc reference](/reference/sumdoc/overview/). # Where to start the pilot > What to give your three specialists so they can decide — go or no-go: a reading order, five questions for the first meeting, and the signs of a successful pilot. ## How to embed a working example in 30 minutes [Section titled “How to embed a working example in 30 minutes”](#how-to-embed-a-working-example-in-30-minutes) *The goal of the first run isn’t production use. The goal is simpler: open your own document inside your own application, change it, receive events, and confirm the saved file is correct.* | Time | Action | Expected result | | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 0–5 min | Take the editor surface and any document of yours; choose which window you’ll show it in. | Three things are known: the program itself, the source document, and a separate file for the result. | | 5–10 min | Start the surface on a free local port. | You get back the page address, a one-time pass to it, and a schema name with a version number — there’s no separate version field in the startup line, the number is in the name itself. | | 10–15 min | Create a web view window and open this address in it. | The editor loads inside your window. | | 15–20 min | Attach a message handler for the editor. | The `ready` event arrives — you can show that the document is open. | | 20–25 min | Edit the first paragraph and save. The first one specifically: the surface shows and edits a single paragraph — this is an embedding trial, not an editor ([what it includes](/sumdoc/embedding/)). | The `dirty` and `saved` events arrive, and the result file appears. | | 25–30 min | Reopen the saved file and stop the surface. | The edit is there; the subscriptions, connection, and process are closed and left nothing behind. | ### What starts the surface [Section titled “What starts the surface”](#what-starts-the-surface) ```bash # $CLI — path to the processor, see "Installation and verification" "$CLI" surface --port 0 \ --doc /absolute/input.docx \ --save /absolute/output.docx ``` ### The call sequence on the host side [Section titled “The call sequence on the host side”](#the-call-sequence-on-the-host-side) ```plaintext bootstrap = startSurface(input, output) webview.onMessage(event => handleA4Event(event)) webview.open(bootstrap.url) waitFor('ready') // the user edits the document waitFor('dirty'); requestSave(); waitFor('saved') webview.close(); stopSurface() ``` What “30 minutes” means An embedding path without Electron — through the system web-view component — exists and is documented; a pre-assembled evaluation kit (Evaluation Kit) is issued for it — the same one mentioned below and explained in the [glossary](/start/glossary/). A public developer kit, single sign-on, a storage adapter, and your brand’s styling rules are separate work after the pilot. ## What to give three specialists so they can decide — go or no-go [Section titled “What to give three specialists so they can decide — go or no-go”](#what-to-give-three-specialists-so-they-can-decide--go-or-no-go) *First the big picture and a live example. Then the internals, the session contract, and commercial terms.* ### Recommended reading order [Section titled “Recommended reading order”](#recommended-reading-order) 1. The [SumDoc — what it is](/sumdoc/overview/) section and the pages next to it: objects and relationships, the Rust/Web split, deployment options, and the [quick start](/sumdoc/quickstart/). 2. **The architecture specification** — a separate delivery document (see [What is delivered](/platform/delivery/)): protocol, lifecycle, security, versioning, deployment, and acceptance for production use. 3. **The Evaluation Kit** — a separate delivery artifact (see [What is delivered](/platform/delivery/)): Surface Host, host examples, three DOCX files, schemas and types, known limitations, and a quick start. 4. **The capability matrix** — what’s proven for your chosen platform and on your real documents. 5. **The pilot plan** — a single “open → edit → event → save → reopen” route, with the conditions under which it’s judged successful. ### Five questions for the first meeting [Section titled “Five questions for the first meeting”](#five-questions-for-the-first-meeting) 1. Where does the editor need to run: on Windows or macOS workstations, in the browser, on phones, or as a service on your servers? 2. How does your application hand over the document, and where should it receive the new version? 3. Which ten user actions are mandatory in the first pilot? 4. What documents, and what sizes, do you actually work with? 5. What’s mandatory for single sign-on, audit, network, updates, long-term version support, and data residency? ### Criteria for a successful first pilot [Section titled “Criteria for a successful first pilot”](#criteria-for-a-successful-first-pilot) Ready for the next conversation The editor opened inside your product; a user changed a real document; your application received the `ready`, `dirty`, and `saved` events; the saved file reopened; permissions, versions, and audit stayed on your side; after closing, no hanging processes or subscriptions were left behind. ### What to read after this page [Section titled “What to read after this page”](#what-to-read-after-this-page) The SumDoc embeddable editor’s architecture specification is a detailed document for architects and engineers — the one you move on to once you’ve worked through the product’s basic model. It’s issued together with the evaluation kit; on the site the same topics are broken out by part: [how the editor works](/sumdoc/architecture/), [session lifecycle](/sumdoc/lifecycle/), [session contract](/reference/sumdoc/session-protocol/), [deployment options](/sumdoc/deployment/), and [security](/platform/security/). ### What’s described here, and what’s set separately [Section titled “What’s described here, and what’s set separately”](#whats-described-here-and-whats-set-separately) This describes the product’s proven architectural foundation. The public developer kit, the command list, availability commitments, the license, and the final capability profile are fixed in separate appendices to the pilot and the contract. ## Suggested next step [Section titled “Suggested next step”](#suggested-next-step) * 60–90 minutes: agree on one real document which objects are addressable, which events arrive, and what shows up in the context menu. * Lock in the interaction contract version and the pilot’s capability profile. * Build one end-to-end example: right-click on a table cell → your context menu → a typed edit → save and reopen. * After acceptance, extend the list of supported objects in pieces, rather than promising the whole Word feature set in one statement. # Hit-testing by coordinate, selection, and document edits > Translating a click coordinate into a document position, a simple point edit with save, and the preferred typed transaction. ## Coordinate → document position [Section titled “Coordinate → document position”](#coordinate--document-position) Coordinate units The `hit-test-docx` command takes `--x` and `--y` in thousandths of a pixel. The value `100000` in the example below is 100 px, not one hundred thousand. ::: ```bash # $CLI — path to the processor, see "Installation and verification" "$CLI" hit-test-docx /data/contract.docx \ --x 100000 --y 100000 --format json ``` ```json { "model_version": "fastdoc-d6-hit-test-snapshot-v2", "hit_test_mode": "body-line-boxes-line-edge-caret-only", "result_kind": "body-line-hit", "page_index": 0, "paragraph_index": 0, "paragraph_location": "word/document.xml:body.block[0]", "line_index": 0, "caret_slot_index": 1, "line_scene_x_milli_px": 96000, "line_scene_y_milli_px": 96000 } ``` What this call can and can’t do The command responds along lines of the main text and returns the caret position within the line — that’s what `body-line-boxes-line-edge-caret-only` means in the `hit_test_mode` field. It doesn’t distinguish tables, text boxes, or graphic objects: a click on a table cell returns a position in the line, not the cell itself. There is no hit-test command in a persistent session at all — this call is separate, one-off, and needs no open session. The desktop app can do more: hit-testing into text and into a table cell. These modes aren’t exposed yet — before opening them up, we need to define which kinds of objects the embedding application is allowed to touch. ::: ## Simple point edit and save [Section titled “Simple point edit and save”](#simple-point-edit-and-save) The `mutate` command addresses a location by paragraph number and offset within it — hence “point edit”: the edit lands exactly at the named spot and goes no further. It checks nothing: if the document changed between the read and the edit, the edit lands at the old coordinates. It suits scenarios with a single session where nothing happens between the read and the write. ```json {"id":"edit-1","cmd":"mutate", "operation_kind":"insert-text","paragraph_index":0, "offset":7,"text":"SumDoc "} {"id":"save-1","cmd":"save","path":"/data/contract-edited.docx"} ``` ## The preferred typed transaction [Section titled “The preferred typed transaction”](#the-preferred-typed-transaction) The `apply-text-transaction` command carries the request, document, session, and view identifiers, together with the expected document and selection revisions. The core checks them before applying the change: if the document or selection has moved on, the request is refused entirely, not applied halfway. That’s why this path is preferred for integration — see [Typed edit types](/reference/sumdoc/typed-dto/). ```json { "id": "tx-1", "cmd": "apply-text-transaction", "request": { "request_id": "req-8", "document_id": "contract-42", "session_id": "session-1", "view_id": "canvas-1", "expected_revision": 42, "expected_selection_revision": 17, "command": {"type":"insert_text", "at":{"story_id":"body", "node_id":"paragraph:body.block[0]", "utf16_offset":7,"affinity":"downstream"}, "text":"SumDoc "} } } ``` # Host API: commands, events, and agents > The minimal stable contract for a pilot: lifecycle, save, view, state queries and commands; the ready, dirty, saved, and error events; the agent route. A contract for the pilot, not the current API Below is the contract proposed for locking in with you before the pilot. Of the listed methods, only `mount` and `unmount` exist in the SumDoc surface today; the other names are up for agreement, not ready-made calls. What works now: [Rust Session Protocol](/reference/sumdoc/session-protocol/) — 41 document session commands, and the [Surface interface in the browser](/reference/sumdoc/surface-api/) — mounting the surface and host events. *Embedding needs a small, stable contract, not access to hundreds of the desktop app’s internal channels.* ## Minimal Host API for a pilot [Section titled “Minimal Host API for a pilot”](#minimal-host-api-for-a-pilot) | Group | Examples | Why you need it | | ------------- | -------------------------------------------------- | --------------------------------------------------------------- | | Lifecycle | `mount`, `unmount`, `open`, `close` | Create a session and close it cleanly. | | Save | `save`, `saveAs`, `checkpoint` | Return a confirmed result to your storage. | | View | `focus`, `setReadOnly`, `setLocale`, `setTheme` | Fit the surface into your application’s environment. | | State queries | `getVersion`, `getCapabilities`, `getStatus` | Find out the contract version and which features are available. | | Commands | Editing, formatting, undo and redo, review actions | Apply only permitted changes. | ## Events your application receives [Section titled “Events your application receives”](#events-your-application-receives) * **`ready`** — the document is parsed and the surface is ready to accept agreed actions. * **`dirty`** — a change was accepted, and an unsaved revision has appeared. * **`saved`** — the write is complete, and you can register the result as a version on your side. * **`error`** — the operation failed; you get a code and a description of the cause that contains no document content. * **`unmounted`** — the surface was removed from your window; after this, the session no longer responds. ## Agents and automation [Section titled “Agents and automation”](#agents-and-automation) An agent shouldn’t impersonate a user by clicking. The order is different: open a session, find out the available capabilities, request a bounded slice of the document, find a stable reference to the needed spot, propose a point edit, apply it with the expected revision given, check the result, save, and reopen the file. Every step of this route can be logged, constrained by rules, and repeated — none of that is possible with clicks on the screen. Office.js and VBA These are familiar examples of events and automation from Microsoft, but not the way to embed SumDoc. In SumDoc, VBA macros run as separate calls behind a guard, not as a channel for controlling the editor, and full compatibility with Office automation is not promised: it is more reliable to work through typed commands, events, and policy enforcement points. # Installation and verification > Where the Rust processor fastdoc-cli lives inside an installed SumDoc, how to verify the build, and which integration routes are available. SumDoc is a ready-made application for macOS, Windows, and Linux. The package ships the native fastdoc-cli executable alongside the interface. For embedding, this is an external document processor: you can run it from your own desktop app, a server-side wrapper, or a local web host. ## Download and verify [Section titled “Download and verify”](#download-and-verify) The current build is published on [dl.layers.md](https://dl.layers.md/sumoffice/sumdoc/release/latest/). The release directory is split by system: the `macos/`, `windows/`, `linux/` and `webhost/` (web host image) folders, with only `manifest.json` — the version number and release notes — at the root. Each folder has its own `SHA256SUMS`, the list of checksums for its files. Verify the download before installing: ```bash base=https://dl.layers.md/sumoffice/sumdoc/release/latest/macos curl -fsSLO $base/SHA256SUMS # take the filename with the version number from the same list curl -fLO $base/$(awk '/arm64.dmg$/ {print $2; exit}' SHA256SUMS) shasum -a 256 -c SHA256SUMS --ignore-missing ``` For Windows use the `windows/` folder and the `arm64.msi` or `x64.msi` name pattern, for Linux the `linux/` folder and `amd64.deb`; compute the checksum with your system tools: `Get-FileHash` in PowerShell, `sha256sum -c` on Linux. The `arm64.dmg` pattern is for Apple Silicon Macs; for Intel Macs the same folder holds `x64.dmg`. Both architectures are published for Windows, x86-64 only for Linux. Part of the Linux delivery is signed separately: `.asc` files sit next to the `deb` and `AppImage` in the `linux/` folder, along with the public key that verifies the signature. The `rpm` package has no detached signature in the release directory — for it, checksum verification remains. ```bash base=https://dl.layers.md/sumoffice/sumdoc/release/latest/linux curl -fsSLO $base/SHA256SUMS curl -fsSLO $base/fastoffices-signing-key.asc gpg --import fastoffices-signing-key.asc curl -fsSLO $base/$(awk '/amd64.deb.asc$/ {print $2; exit}' SHA256SUMS) gpg --verify SumDoc-*-amd64.deb.asc SumDoc-*-amd64.deb ``` The key comes from the same server as the package, so by itself it proves nothing: whoever swaps one can swap the other. Check the fingerprint — it should be: ```plaintext 5587 733B DD0A 0CA5 36D7 4D13 C5BD DF05 B96C DB10 ``` `gpg --fingerprint dev@layers.md` shows it after import. The key carries the name `FastOffice A4 Signing Key ` — the development team’s working address, not a delivery mailbox; that’s expected. A fingerprint obtained through a different channel — from us by email or in person — is what makes this a real check. On macOS and Windows the signature is checked by the system itself during installation: the platform signature applies there, not this one. The macOS image is signed with a Developer ID certificate and notarized by Apple—`spctl` answers `accepted, source=Notarized Developer ID`. For SumDoc both delivery variants are notarized, the `.dmg` image and the app from the `.zip` archive: take either. (For SumSheet the signature is checked on the app inside the image, not on the image itself—its installation page says so.) The certificate carries the legal entity’s name, not the product name: `Developer ID Application: HEALTH INFORMATIC SECURITY SYSTEM SL (K58GV7E7X4)`. That’s expected — check it against the team identifier, `K58GV7E7X4`. The SumDoc installers for Windows carry no digital signature in the current release: the system will show an unknown publisher warning. Verify such a file with the checksum from `SHA256SUMS`—there is one for it. The SumSheet installer for Windows is signed with the test certificate `FastOffice Test Signing (DEVELOPMENT ONLY)` with no trusted root—the warning will appear there too, and the reliable check is the same, by checksum. * macOS ```bash CLI="/Applications/SumDoc.app/Contents/Resources/runtime/native/fastdoc-cli" test -x "$CLI" && echo "processor found" # Show the available one-off commands "$CLI" --help | head -n 20 ``` * Windows ```powershell $CLI = "C:\Program Files\SumDoc\resources\runtime\native\fastdoc-cli.exe" if (Test-Path $CLI) { "processor found" } # Show the available one-off commands & $CLI --help | Select-Object -First 20 ``` * Linux ```bash CLI="/opt/SumDoc/resources/runtime/native/fastdoc-cli" test -x "$CLI" && echo "processor found" # Show the available one-off commands "$CLI" --help | head -n 20 ``` This is the path for `deb` and `rpm` packages. The `AppImage` delivery runs without installation and has no folder — extract the image and take the processor from inside it: ```bash ./SumDoc-….AppImage --appimage-extract CLI="$PWD/squashfs-root/resources/runtime/native/fastdoc-cli" ``` Expected result The terminal prints “processor found”, followed by the start of the command list. If the application is installed in a different folder, replace the path in the first line: everything after the installation folder is the same across systems — `resources/runtime/native`. ## External integration architecture [Section titled “External integration architecture”](#external-integration-architecture) **Your shell** → **a JSONL or WebSocket session** → **`fastdoc-cli`** → **DOCX and the document model** | Route | When to use it | Transport | Readiness | | ---------------- | ------------------------------------------------- | -------------------------------- | -------------------------------------------------------------------------------------- | | JSONL session | First prototype, a desktop or server-side wrapper | stdin and stdout | Ready; a good place to start | | WebSocket | A web or desktop shell with asynchronous requests | `ws://127.0.0.1` and a pass | Ready | | Web Surface | See embedding on a live document | HTTP and the session’s WebSocket | Works, but editing is limited to the first paragraph; a page reload needs reconnection | | One-off call | Batch operations and automation | process arguments and JSON | Ready | | Electron preload | Only inside SumDoc’s own window | contextBridge and IPC | An internal contract, not intended for embedding | ## Viewing without installation [Section titled “Viewing without installation”](#viewing-without-installation) To only show a document, you do not need the whole app. The processor has a `render` command: one DOCX is turned into one self-contained HTML file that opens in any browser straight from disk—no server, no network, viewing only: ```bash "$CLI" render report.docx -o report.html ``` The same command is available as a separate executable, `sumdoc`, which is downloaded from the site without installing the app. Inside is the same core as `fastdoc-cli`; only the command surface is narrowed. The build is published for macOS on Apple Silicon; builds for Linux and Windows are in preparation. The checksum sits next to it—the same address with `.sha256`: ```bash curl -LO https://sumoffice.com/dl/sumdoc && chmod +x sumdoc ./sumdoc render report.docx -o report.html ``` A known limitation of the viewer: on long text without page breaks it may render fewer pages than the layout has. ## What’s next [Section titled “What’s next”](#whats-next) The processor is in place — from here there are three paths, depending on what you need to verify first. * **Confirm the API responds.** [Quick start](/sumdoc/quickstart/): open a DOCX, edit a paragraph with a command, and save the result. * **See embedding live.** [Starting Web Surface](/sumdoc/surface/): the surface opens in the browser on top of the same processor. Editing in it is limited to the first paragraph — this is a demonstration of the path, not an editor. * **Understand the request format.** [Request and response objects](/sumdoc/envelope/), and the full list in the [command reference](/reference/sumdoc/session-protocol/). If something won’t start, begin with [diagnostics](/sumdoc/diagnostics/). # Interaction contract for a pilot > A stable reference to a place in the document, a minimal set of methods, and events, locked in before integration begins. This is a proposed contract, not the current API Below is the contract proposed for locking into a spec and versioning. Today’s surface exposes less: [Readiness and boundaries](/sumdoc/status/) says exactly what already works. It’s too early to write code against this page — it’s for agreeing on what the interface will become. ## Semantic goal [Section titled “Semantic goal”](#semantic-goal) Proposed contract The declarations below describe what the interface will become. You can’t call them today — see [what’s available now](/sumdoc/status/). For your application to say “what to do” instead of “where to click”, it needs a common addressing unit: a stable reference to a place in the document. `DocumentTarget` describes exactly that — the element kind, its identifier, and the revision in which that identifier is valid. This contract deliberately has no references to DOM nodes or coordinates: those change on redraw. ```ts export interface DocumentTarget { kind: "paragraph" | "run" | "table" | "tableCell" | "image" | "comment" | "field" | "header" | "footer" | "hostObject"; nodeId: string; // stable ID within the revision revision: number; ancestors: Array<{ kind: string; nodeId: string }>; capabilities: string[]; // read, editText, insertRow, openProperties... hostData?: { type: string; id: string }; } ``` ## Minimal set of session methods [Section titled “Minimal set of session methods”](#minimal-set-of-session-methods) Proposed contract This set is about the future too. Today the document is edited with [session commands](/reference/sumdoc/session-protocol/). A set of methods sufficient for a pilot: read the document’s state, resolve an object from a point, check whether a command is available, run a single command or a batch, save. Anything that changes the document returns confirmation with a new revision — that’s how you know the change was accepted. ```ts interface A4DocumentSession { getDocumentSnapshot(options?: { depth: "semantic" }): Promise; getProjection(request: ProjectionRequest): Promise; hitTest(point: PagePoint): Promise; getSelection(): Promise; getCommandState(target: DocumentTarget): Promise; execute(request: ExecuteRequest): Promise; executeBatch(request: AtomicBatchRequest): Promise; save(request: SaveRequest): Promise; } ``` ## Events [Section titled “Events”](#events) | Event | When it arrives | Required fields | | -------------------------- | ----------------------------------------------------------- | ------------------------------------------------- | | `selectionChanged` | The selection or caret position changed | selection, revision, source of the change | | `elementActivated` | A click, double-click, or keyboard activation | gesture kind, object, hit point, selection | | `contextMenuRequested` | Before showing the context menu | request identifier, object, point, built-in items | | `contentChanged` | A command changed the document | new revision, confirmation, which nodes changed | | `commandStateChanged` | A command became available or unavailable, its mark changed | object, new states | | dirtyChanged, saved, error | Changes, saving, and errors | revision, file path, or error description | ## Next [Section titled “Next”](#next) * How the surface embeds into your window — [Embedding Surface](/sumdoc/embedding/). * What arrives in the events — [Host API](/sumdoc/host-api/). # Document lifecycle > Seven steps from handing over the document to reopening it, and the interface's core objects: session, command, result envelope, event, capability profile, artifact. *Integration is built around the session, commands, revisions, and events, not around direct access to the editor’s internal markup.* 1. **Your application receives the document.** Your system verifies the user and passes the bytes of an allowed DOCX or a safe path to the file. 2. **SumDoc opens a session.** The core parses the file and builds the document model, the profile of available capabilities, and the first revision. 3. **The surface shows the document.** The user sees the pages and the available commands, and your application receives a readiness event. 4. **A command arrives.** It says what to do, where in the document, and which revision it expects. Nobody edits the file markup directly. 5. **The core applies or rejects.** On success, a new revision appears along with an unsaved-changes flag. A refusal doesn’t leave the document half-changed. 6. **Your application saves the result.** The core writes the changes to the file and returns the DOCX, and you create a version and a log entry. If the opened document carried a digital signature, editing and saving invalidate it — otherwise Word would later declare the file modified. The core warns about this on opening; for developers: the warning comes not as a response but as a line on the error stream. 7. **Reopening confirms.** The saved file is opened again in a new process — this proves the change reached the disk rather than staying on screen. ## Core API objects [Section titled “Core API objects”](#core-api-objects) | Object | Purpose | | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Session | The lifecycle of one open document, isolated from the others. | | Command, or intent | An action of a known kind: what to do, with what, and at which expected revision. | | Result envelope | Success or an explicit refusal with a reason, diagnostics, and an identifier that links the response to the request. There’s no separate warnings field here — unlike spreadsheets, where the response has `warnings`. | | Event | Readiness, unsaved changes, save, error, and other state changes. | | Capability profile | The list of available commands and limits — no defaults assumed. | | Artifact | DOCX bytes, a checkpoint, or diagnostics — everything your application manages. | How the result is published Saving doesn’t write over the existing file. First a temporary file is created alongside, its contents are flushed to disk, and only then does the temporary file take the target’s place in one step. An interrupted save doesn’t leave a half-written DOCX: the disk holds either the previous version or the new one in full. So the file appearing at the expected path is already a sign of a completed write; there’s no need to wait and check the size. Checkpoint saving takes one more step: before publishing, it compares the file against the state your application last saw, and refuses if something changed it from outside — another program, a second session, or sync. Someone else’s edit is never silently overwritten. ## Next [Section titled “Next”](#next) * How requests and responses work — [Request and response objects](/sumdoc/envelope/). * What the product does with the document — the [capability map](/sumdoc/capabilities/). * Today’s boundaries — [Readiness and boundaries](/sumdoc/status/). # SumDoc — what it is > An embeddable DOCX editor for document management systems: what SumDoc adds to your product, what stays on your side, and what it looks like for an end user. **SumDoc** is the document part of the SumOffice platform: a DOCX editor and document processor that embeds into your application. The document itself is read, changed, and written by the Rust core—the same core on every platform. In one sentence You keep your brand, users, storage, and processes, and SumDoc adds full document handling inside your product. *You don’t need to replace your product: a document processor and a ready-made user surface are added to it.* ## What your system already does [Section titled “What your system already does”](#what-your-system-already-does) The document card, users and roles, approval routes, versions, digital signatures, archiving, audit, integrations with your systems — transport, ERP, CRM — and retention rules all stay on your side. ## What SumDoc adds [Section titled “What SumDoc adds”](#what-sumdoc-adds) * **Open** — receive a DOCX from your system and open a managed document session. * **Show** — render the pages and give the user a familiar editing surface. * **Change** — accept the actions of a user or an agent as verifiable commands. Nobody edits the file directly. * **Save** — assemble a valid DOCX and return the file or a confirmed result back to your system. * **Report** — pass the document state to your application: ready, unsaved changes, saved, error. The main boundary SumDoc never owns the document card or the business process. It’s responsible for what’s inside the open document and how that content changes. ## What it looks like for an end user [Section titled “What it looks like for an end user”](#what-it-looks-like-for-an-end-user) The user opens the document from the familiar card. The editor appears inside the same window, under the same brand. The user edits the agreed elements, and on save the new version goes back into the existing storage and audit perimeter — with no manual export to a separate Word and back. See it live The editor runs right on the documentation page: [live example](/sumdoc/demo/). ## Which files it works with [Section titled “Which files it works with”](#which-files-it-works-with) The primary format is DOCX: it is opened, edited, and saved back in a single session. Other formats are converted to a document and back by separate processor calls. PDF is the only output-only format: you can save to it but cannot open from it. | Format | Open | Save | What to know | | ----------------------- | ------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | DOCX | Yes | Yes | The primary format: open, edit, and save in the same session. | | DOCM — DOCX with macros | Yes | Yes | Same as DOCX; the macro project is not lost on save. The processor refuses to downgrade `.docm` to `.docx` when saving under another name. | | DOC — Word 97–2003 | Partial | — | Only text and paragraph breaks are carried over; font styles, styles, tables, images, headers and footers, footnotes, fields, and tracked changes are not. You can find out in advance what will be lost without writing anything; the original `.doc` is not changed. | | PDF | — | Yes | Including with embedded fonts. | | ODT | Yes | Yes | An editable ODT copy is available too. | | RTF | Yes | Yes | A text interchange format between editors. | | HTML | Yes | Yes | A web page. | | Plain text | Yes | Yes | Text only, no formatting. | | EPUB | Yes | Yes | An e-book. | | FB2 | Yes | Yes | An e-book. | | XODT — flat ODT | Yes | Yes | A single XML file instead of a zip package. | Flat ODT is the same OpenDocument format, but as a single XML file instead of a zip package: convenient when the document lives in version control or is edited by an external tool. For spreadsheets, the same thing is called FODS. You can convert a single file or a whole directory at once—specifying the extension and, if needed, walking nested folders. For viewing without the editor, one DOCX is turned into one self-contained HTML file. It opens in any browser straight from disk, with no server and no network, and the layout is computed by the same core as in the editor. About PDF/A-1b — the archival storage format Export to regular PDF works, including with embedded fonts. Full PDF/A-1b is not yet promised: the document readiness check honestly reports that PDF/A export is still closed, and the result can be checked with an external program that you specify yourself. If the archival format is mandatory under your retention rules, that is a pilot condition, not a ready capability. For developers—which calls perform each row: [formats and calls](/sumdoc/capabilities/#formats-and-calls); the full list is in the [reference](/reference/sumdoc/overview/). For spreadsheets the same is collected as a matrix: [what you can do with each format](/reference/sumsheet/formats/). ## What else the processor does besides editing [Section titled “What else the processor does besides editing”](#what-else-the-processor-does-besides-editing) A document in progress is rarely just edited. Below are the tasks that cover the rest of the contract workflow; all of them are one-off, like format handling: they do not need an open session. | Task | What happens | | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Compare two versions | From the original and the changed file a third one is built, where the differences are shown as tracked changes with author and date. | | Merge reviewers’ edits | Edits from several files are merged into one document. | | Send a mail merge | A template and a CSV list of recipients produce a batch of finished documents; you can take only part of the list. | | Inspect macros without running them | The processor reports whether the file contains a macro project and shows the printable strings from it (the `inspect-vba` call). A separate call parses the project properly: it lists modules and procedures and, if needed, their source text. | | Run a macro behind a shield | The macro runs over the text of the open file, but the user’s file is never overwritten: changed paragraphs go to a copy. Without an explicit grant for each entry point the result is a refusal, and that is the default; calls to external objects are allowed by name. | | Check the file’s protection | Shows how the document is protected. | | Update the table of contents | Rebuilds the table of contents or the list of figures, or removes the table of contents. | This is only part of it: headers and footers, sections, watermarks, form fields, bibliography, printing, and mail merge are grouped by task on a separate page—[what SumDoc can do with a document](/sumdoc/capabilities/). The calls and their keys for developers are named there too. Terms that come up across every section — session, revision, projection, explicit refusal — are collected in the [glossary](/start/glossary/). ## Word-class inside your product [Section titled “Word-class inside your product”](#word-class-inside-your-product) Inside your window runs the same stack as in the ready-made SumDoc app: the editor surface, the document session, and the core. Your application is responsible for the window, brand, sign-in, storage, and processes; SumDoc for everything inside the open document. The service that serves the editor runs on the same machine and listens only on a local address—nothing is opened to the outside. What the parts are and who is responsible for what—[Architecture](/sumdoc/architecture/). ### What the user gets in the Word corridor [Section titled “What the user gets in the Word corridor”](#what-the-user-gets-in-the-word-corridor) * Opening agreed DOCX documents inside your application, with no separate SumDoc window. * Editing, pagination, saving, reopening, and confirming the document stayed itself. * The base set has the `ready`, `dirty`, `saved`, `error`, and `unmounted` events; for a delivery under your brand, selection, content, and command-state events are added to them. * Styling under your brand: theme, language, read-only mode, styling variables, and your own shell instead of ours. * Headless operation — for batch processing, services, pipelines, and agent actions. ### The boundary of an honest promise [Section titled “The boundary of an honest promise”](#the-boundary-of-an-honest-promise) * Opening a file does not mean saving it without loss. The capability profile records separately what is read, shown, edited, saved, and what is carried over unchanged—for each family of DOCX elements. * Full compatibility with Microsoft Word and Office.js is not included without a separate agreement. VBA macros run only behind a shield: with an explicit grant for each entry point and into a copy of the document—see [what SumDoc can do](/sumdoc/capabilities/#file-security). * Production delivery requires acceptance on each platform: save and reopen, lifecycle, security, and packaging. # Quick start: your first JSONL session > In 10–15 minutes: start fastdoc-cli, open a DOCX, edit the first paragraph with the mutate command, save the result, and verify it without a GUI. This is the shortest path from an installed SumDoc to a proven “command → model change → DOCX write → re-read” cycle. What you’ll have after 10–15 minutes The Rust process will respond to `ping` and report the `fastdoc.session-serve.v1` protocol; a DOCX will be opened, its first paragraph changed through the API and saved as a separate file; the result will open in SumDoc. What you need before you start The commands below run in the prepared `~/Desktop/SumDoc-API-first-run` folder. It comes, together with the `a4-api-demo.mjs` and `start-web-demo.sh` scripts, from the **Evaluation Kit** — a separate delivery artifact (see [What is delivered](/platform/delivery/)). It is not part of the SumDoc installer and cannot be downloaded from [dl.layers.md](https://dl.layers.md/sumoffice/sumdoc/release/latest/): request it from the vendor. **If you don’t have the Evaluation Kit yet**, an installed SumDoc is enough to follow the same path manually: `fastdoc-cli` lives inside the application (see [Installation and verification](/sumdoc/install/)), the request format is described in [Request and response objects](/sumdoc/envelope/), and the full list of commands is in the [reference](/reference/sumdoc/session-protocol/). SumSheet has an example of a fully written-out script: [verified script](/sumsheet/reference-script/). ## Your first real call: a JSONL session [Section titled “Your first real call: a JSONL session”](#your-first-real-call-a-jsonl-session) JSONL is the simplest contract for a first integration: one JSON request per stdin line, one JSON response per stdout line. Rust holds the open document’s state between commands. ### Setup [Section titled “Setup”](#setup) 1. Open a terminal. 2. Check Node.js with `node --version` — you need version 22 LTS or newer. 3. Go to the prepared folder on your desktop. 4. Run the demo client, passing explicit input and output file paths. * macOS ```bash cd ~/Desktop/SumDoc-API-first-run node --version node a4-api-demo.mjs \ "/Applications/SumDoc.app/Contents/Resources/app/fixtures/docx/simple_text.docx" \ "$PWD/api-demo-result.docx" ``` * Windows ```powershell cd $HOME\Desktop\SumDoc-API-first-run node --version node a4-api-demo.mjs ` "C:\Program Files\SumDoc\resources\app\fixtures\docx\simple_text.docx" ` "$PWD\api-demo-result.docx" ``` * Linux ```bash cd ~/Desktop/SumDoc-API-first-run node --version node a4-api-demo.mjs \ "/opt/SumDoc/resources/app/fixtures/docx/simple_text.docx" \ "$PWD/api-demo-result.docx" ``` ### What the script does [Section titled “What the script does”](#what-the-script-does) 1. Starts `fastdoc-cli serve` from the application package. 2. Reads the protocol greeting and the list of session commands (there are 41). 3. Sends `ping`, then `open` and `model`. 4. Uses the `mutate` command to insert the text “API DEMO:” at the start of the first paragraph. 5. Reads `status` and saves a copy with the `save` command. 6. Ends the process with the `shutdown` command. ### Actual output from a verified run [Section titled “Actual output from a verified run”](#actual-output-from-a-verified-run) ```plaintext Connected: fastdoc.session-serve.v1 Commands available: 28 Ping: true Session: rust-session-20320-1 Before: This is a sample word document. It has two pages, but no headers or footers. After: API DEMO: This is a sample word document. It has two pages, but no headers or footers. Revision: 1; dirty: true Saved: /Users/tester/Desktop/SumDoc-API-first-run/api-demo-result.docx ``` Success criteria Ping: true, revision=1, dirty=true, and a new api-demo-result.docx on disk. ## Open the result and see the change [Section titled “Open the result and see the change”](#open-the-result-and-see-the-change) * macOS ```bash open -a SumDoc ~/Desktop/SumDoc-API-first-run/api-demo-result.docx ``` * Windows ```powershell & "C:\Program Files\SumDoc\SumDoc.exe" "$HOME\Desktop\SumDoc-API-first-run\api-demo-result.docx" ``` * Linux ```bash /opt/SumDoc/a4 ~/Desktop/SumDoc-API-first-run/api-demo-result.docx ``` The prefix API DEMO: should appear at the start of the first paragraph. This confirms the full cycle: the command reached Rust, changed the document model, was written to DOCX, and was read back by the graphical editor. This path was proven exactly this way: on August 26, 2026, on an installed SumDoc, with that same prefix in the first paragraph. ### Verify the saved file without a GUI [Section titled “Verify the saved file without a GUI”](#verify-the-saved-file-without-a-gui) * macOS ```bash CLI="/Applications/SumDoc.app/Contents/Resources/runtime/native/fastdoc-cli" "$CLI" model-docx \ "$HOME/Desktop/SumDoc-API-first-run/api-demo-result.docx" \ --format json ``` * Windows ```powershell $CLI = "C:\Program Files\SumDoc\resources\runtime\native\fastdoc-cli.exe" & $CLI model-docx ` "$HOME\Desktop\SumDoc-API-first-run\api-demo-result.docx" ` --format json ``` * Linux ```bash CLI="/opt/SumDoc/resources/runtime/native/fastdoc-cli" "$CLI" model-docx \ "$HOME/Desktop/SumDoc-API-first-run/api-demo-result.docx" \ --format json ``` What to look for in the JSON In body.blocks, find the first object with kind=paragraph. Its text should start with API DEMO:. This is direct access to the document’s structure, not reading an image or a PDF. ## What’s next [Section titled “What’s next”](#whats-next) * Work through the request and response format — [Request and response objects](/sumdoc/envelope/). * The same commands, but over WebSocket — [The same contract over WebSocket](/sumdoc/websocket/). * Show the document to the user — [Starting Web Surface](/sumdoc/surface/), then [Embedding Surface](/sumdoc/embedding/). * The full list of session commands — the [reference](/reference/sumdoc/session-protocol/). * Something won’t start — [Diagnostics and checklist](/sumdoc/diagnostics/). # Integration recipes > Responding to a click and double-click, a context menu for a table cell, running an external command, and a full transport-system scenario from event to DOCX. This is a proposed API, not the current one The examples below show how responding to user actions is proposed to work: element events, context menu providers, and sending external commands. This API **doesn’t exist** in SumDoc’s current contract — you can’t write working code from these examples today. What is available now: [Rust Session Protocol](/reference/sumdoc/session-protocol/) — 41 document session commands, and the [Surface interface in the browser](/reference/sumdoc/surface-api/) — embedding the surface and host events. The shape of the future profile is described in the [interaction contract](/sumdoc/interaction/); it is fixed by agreement before integration starts. ## Examples: click, double-click, and menu [Section titled “Examples: click, double-click, and menu”](#examples-click-double-click-and-menu) This is a proposed API The code in this section shows the shape of the future profile. You can’t call it today — see [what’s available now](/reference/sumdoc/session-protocol/). ### How to respond to a click and double-click [Section titled “How to respond to a click and double-click”](#how-to-respond-to-a-click-and-double-click) ```js editor.interactions.on("elementActivated", async (event) => { const { gesture, target } = event; if (gesture === "click" && target.kind === "comment") { hostSidebar.openComment(target.nodeId); } if (gesture === "doubleClick" && target.hostData?.type === "shipment") { await hostApp.openShipment(target.hostData.id); } }); ``` ### Context menu for a table cell [Section titled “Context menu for a table cell”](#context-menu-for-a-table-cell) ```js editor.contextMenu.registerProvider("transport-suite", async (ctx) => { if (ctx.target.kind !== "tableCell") return []; return [ { id: "transport.openCargo", label: "Open cargo card", enabled: Boolean(ctx.target.hostData?.id) }, { id: "transport.bindRoute", label: "Bind to route", enabled: !ctx.readOnly }, { type: "separator" }, { id: "a4.table.insertRowBelow", label: "Insert row below", command: { type: "insert_table_row", position: "below" } } ]; }); ``` ### Running an external command [Section titled “Running an external command”](#running-an-external-command) ```js editor.commands.register("transport.bindRoute", async (ctx) => { const route = await hostUi.chooseRoute(); if (!route) return; return ctx.session.execute({ operationId: crypto.randomUUID(), expectedRevision: ctx.revision, target: ctx.target, command: { type: "replace_target_text", text: route.displayName } }); }); ``` Why the menu is declarative You return the item’s identifier, label, state, and typed command — the editor itself draws the menu and checks permissions. That way every item keeps the same behavior, translation, keyboard accessibility, and a single security check. You don’t need your own markup or your own scripts inside the canvas for this. ## Transport-system scenario from event to DOCX [Section titled “Transport-system scenario from event to DOCX”](#transport-system-scenario-from-event-to-docx) This is still a proposed API The scenario below shows the shape of the future profile in full — from the click to the finished DOCX. This API doesn’t exist in SumDoc’s current contract: see [what’s available today](/reference/sumdoc/session-protocol/). ### Step by step: a right-click on a cargo row [Section titled “Step by step: a right-click on a cargo row”](#step-by-step-a-right-click-on-a-cargo-row) * **The user right-clicks.** The surface translates the click coordinates into document page coordinates and asks the core what was hit. * **The core answers what’s under the pointer.** For example, a table cell: its stable identifier, row and column numbers, enclosing elements, and the revision number in which all this is valid. * **The editor asks your menu item providers**, passing them this context — and only this context, not a reference to a markup element. * **Your provider adds its own actions.** “Open cargo card” and “Bind to route” appear alongside the permitted built-in items. * **The user picks a route.** Your interface returns its identifier; the command to change the document is assembled separately — the choice in your system and the edit in the document stay separate actions. * **The core accepts the command or refuses it.** The expected revision and the list of allowed actions prevent an edit from being applied to a stale document or to an object it wasn’t meant for. * **The surface updates.** The `contentChanged` and `commandStateChanged` events bring the new revision number, and only the affected pages are redrawn, not the whole document. * **Saving and reopening confirm the result.** The document is saved as a separate file or published all at once, then read back — this verifies that what landed on disk is exactly what the user saw. ### What the passed context looks like [Section titled “What the passed context looks like”](#what-the-passed-context-looks-like) ```json { "schema": "a4.interaction-context.v1", "gesture": "contextMenu", "revision": 42, "readOnly": false, "target": { "kind": "tableCell", "nodeId": "body.block[18].row[2].cell[1]", "ancestors": [{"kind":"table","nodeId":"body.block[18]"}], "capabilities": ["read","editText","insertRow"], "hostData": {"type":"shipment","id":"SHP-009173"} }, "hit": {"pageIndex":3,"xMilliPx":412000,"yMilliPx":286000} } ``` ### What arrives on a stale revision [Section titled “What arrives on a stale revision”](#what-arrives-on-a-stale-revision) ```json { "ok": false, "error": { "code": "revision_conflict", "expectedRevision": 42, "actualRevision": 43, "retry": "refresh_target_and_command_state" } } ``` What a refusal looks like in the current contract The response format above is part of the proposed API. Today the session responds differently: the `error` field holds a string, not an object with a code. ```json {"id":"tx-1","ok":false,"cmd":"apply-text-transaction","elapsed_ms":1, "error":"stale revision: expected 43, received 42"} ``` Read this line from the core’s side: `expected` is the revision the document is currently on, `received` is the one that came in the request. So here the document has moved on to 43, while the command was built for 42. The response breakdown is described in [Request and response objects](/sumdoc/envelope/). # Responsibility and security > What's on you, what's on SumDoc, and what's agreed jointly; where you can customize under your brand, which shortcuts are forbidden, and how the minimal security model works. *A white-label delivery gives you freedom in design and process, but doesn’t let you keep a second version of the document — in JavaScript or in extension code.* | What you’re responsible for | What SumDoc is responsible for | Agreed jointly | | ------------------------------------------- | ------------------------------------------------------------------ | -------------------------------------------------------------------- | | Brand, navigation, document card | The Rust core: the model, layout, scene, writing to file | Capability profile and command set | | Users, sign-in, roles | Surface lifecycle and document events | Security requirements and logging | | Storage, versions, retention periods, audit | The supported part of the DOCX format | Formats, file sizes, the document set for acceptance | | Adjacent systems and processes | Explicit refusals and protection against edits on a stale revision | Packaging, updates, version support period, availability commitments | | Product distribution | Build provenance and contract version | Pilot process and support model | ## What you can change under your brand [Section titled “What you can change under your brand”](#what-you-can-change-under-your-brand) The name, logo, external navigation, theme, interface language, read-only mode, permitted styling variables, visibility of agreed commands, help, and your application’s industry-specific panels. ## Forbidden shortcuts [Section titled “Forbidden shortcuts”](#forbidden-shortcuts) * Writing directly to the document file from the surface. * Trying to change the document by editing what is drawn on the screen. * Passing off the desktop app’s internal channels as a public interface. * Accessing the network or reading files without a declared capability. * Writing passes, document content, or secrets to the log. * A silent workaround that changes the meaning of the result. ## Minimal security model [Section titled “Minimal security model”](#minimal-security-model) * The editor service listens only on the local address — it can’t be reached from outside. * Every launch creates a new random 256-bit pass on its own, and it is valid for exactly as long as the surface itself runs. You can set your own pass too — then rotating it on every launch and the strength of the value are on you: the core rejects only an empty string. * Documents don’t leave your perimeter until you connect an external service yourself. * An error arrives as an explicit refusal with a reason, and a change never leaves a half-written file. * The production delivery fixes checksums, the version, platform, and architecture, the vulnerability handling process, and the update rules. An honest promise The phrase “supports DOCX” isn’t enough: it promises nothing. Agree instead on a capability matrix, where for each “format and feature” pair it states what’s read, what’s written, what round-trips without loss, on which platforms, and with what limits. ## Next [Section titled “Next”](#next) * How this is verified before the contract — [Pilot and acceptance](/platform/pilot/). * What’s customizable under your brand — [Customizing under your brand](/platform/white-label/). # Readiness and boundaries > The boundary between what's built and what's for the pilot, a list of agreements to reach before starting, and a ready-made answer for an outside team. Below is the boundary between what works today and what’s locked in by the pilot contract. What the product does with the document by task — headers and footers, tables of contents, comparing versions, printing — is collected in the [capability map](/sumdoc/capabilities/). How to read “within the described limits” The capability works within the stated limits, and outside them it refuses predictably — never silently, never halfway. Exactly what’s inside the limits is given in the same table row. The term is explained in the [glossary](/start/glossary/). ## What’s available now, and what’s part of the pilot [Section titled “What’s available now, and what’s part of the pilot”](#whats-available-now-and-whats-part-of-the-pilot) | Capability | Status | How to use it, or under what condition | | ------------------------------------------------------- | ------------------------------------- | -------------------------------------------------------------------------------------------------- | | Semantic structure | Available | the `model` command in a session, or `model-docx` as a standalone call | | Layout, pages, scene | Available | `compose`, `paginate`, `print`, `print-window`, `print-delta` | | Review and styles | Available | the `review` and `style` projections | | Text editing | Available | `mutate` or `apply-text-transaction` | | Selection, history, save | Available | `set-selection`, undo and redo, `save` and checkpoints | | Standalone hit-testing | Within the described limits | The main text line, its edge, and the caret position; other object types are being added gradually | | Hit-testing into text and tables inside the application | Works, but isn’t part of the contract | Don’t call it directly: the route is internal and can change without notice | | Context menus for text and tables | Works, but isn’t part of the contract | Works inside the product; how to plug in your own menu isn’t locked in yet | | Surface Host events | Available in the described set | `ready`, `dirty`, `saved`, `error`, `unmounted` | | Selection, content, and command events | Locked in during the pilot | Needs agreement on the set, delivery order, retries, and lifecycle | | Your own context menu | Locked in during the pilot | A declarative list of items and typed command dispatch | | Directly editing the page markup or the file | Forbidden | Only through session commands and the core writing the file | ### What confirms it’s feasible [Section titled “What confirms it’s feasible”](#what-confirms-its-feasible) * **Hit-testing into text.** A click coordinate returns the page, line, position in the line, and the text itself. * **Hit-testing into a table cell.** Returns the page, block, row, and column, including nested tables. * **Context menus.** Separate routes serve text and tables. * **Double-click.** Text, tables, borders, and auto-fit width are all served. What of this becomes part of the contract What’s listed shows the mechanism works, but it isn’t a public interface yet. The contract carries stable addressing, event, and command schemas, versioning, and a capability matrix. ## What to lock in before integration begins [Section titled “What to lock in before integration begins”](#what-to-lock-in-before-integration-begins) ### Capability profile [Section titled “Capability profile”](#capability-profile) | Decision | What to lock in | | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | Which objects are addressable | Paragraph, formatting run, table, cell, image, comment, field, and your own objects | | Events | Click, double-click, context menu invocation, keyboard activation; delivery order and whether it can be canceled | | Menu contract | How long to wait for your side’s response, in what order items are merged, which identifiers are reserved, translation, icons, and separators | | Command contract | The expected revision, a replay-protection key, an atomic command batch, the confirmation contents, and the list of errors | | Save | Where to save, checkpoints, what to do on conflict, acceptance via the “saved — reopened” loop | | Security | The local access token, capability grants, what’s logged and what’s stripped from it, and the absence of shortcuts around the contract | | Versioning | Schema versions, the compatibility period, the process for retiring capabilities | | Platforms | Which profile is used in the first pilot: desktop, inside a WebView window, server, or mobile | ### Minimal set of acceptance checks [Section titled “Minimal set of acceptance checks”](#minimal-set-of-acceptance-checks) * Open a real document and get a semantic snapshot without losing the parts of the file the editor doesn’t parse: Word markup (OOXML) carries over to the new file as is. * A click on text and on a cell returns the right document object and selection. * A double-click performs the agreed action once and doesn’t change the document by itself. * The context menu changes depending on the object and the available capabilities, and opens from the keyboard. * A command with the current revision is applied; a command with a stale revision is refused with a message like “stale revision: expected 5, received 3”. * Undo and redo restore the result; saving and reopening confirm that the changes reached the file. * Closing releases the listeners, the WebSocket connection, and the core process — no hanging processes are left behind. ### What you’ll need on your side [Section titled “What you’ll need on your side”](#what-youll-need-on-your-side) * 5–10 real documents and a list of the elements that need actions. * A table of “element type → click → double-click → menu items → document command”. * Requirements for desktop, server, and embedded operation, offline use, storage, accounts, and audit. * A list of your objects and a way to tie them to document nodes — without a second file model on your side. # Starting Web Surface > Start the ready-made editor surface locally, open a DOCX in the browser, edit a paragraph, and save the result. What you need before you start The commands below run in the prepared `~/Desktop/SumDoc-API-first-run` folder. It comes, together with the `a4-api-demo.mjs` and `start-web-demo.sh` scripts, from the **Evaluation Kit** — a separate delivery artifact (see [What is delivered](/platform/delivery/)). It is not part of the SumDoc installer and cannot be downloaded from [dl.layers.md](https://dl.layers.md/sumoffice/sumdoc/release/latest/): request it from the vendor. **If you don’t have the Evaluation Kit yet**, an installed SumDoc is enough to follow the same path manually: `fastdoc-cli` lives inside the application (see [Installation and verification](/sumdoc/install/)), the request format is described in [Request and response objects](/sumdoc/envelope/), and the full list of commands is in the [reference](/reference/sumdoc/session-protocol/). SumSheet has an example of a fully written-out script: [verified script](/sumsheet/reference-script/). ::: Surface is a ready-made local editor page on top of the same Rust core. It’s the fastest way to see embedding in action: you start a local host and put its URL into a WebView or iframe. What the surface can do today It declares exactly four capabilities: open a document, edit **the first paragraph**, save, and emit events to your application. This is a verifiable demonstration of the “open → edit → save” path, not a full browser editor: arbitrary editing, selection, and the context menu aren’t exposed yet. The full browser editor is [a different path](/sumdoc/webhost/): the same desktop application runs there, while the core computes the document on the server. ::: The surface starts with a single processor command. The path to it depends on your system; the other arguments are the same: `--doc` — which document to open, `--save` — where to save (the same file by default). The `--doc` value below is the sample from the delivery itself — the same file the [quick start](/sumdoc/quickstart/) begins with. Any DOCX of yours works too: the surface opens whatever it’s given. * macOS ```bash CLI="/Applications/SumDoc.app/Contents/Resources/runtime/native/fastdoc-cli" DOC="/Applications/SumDoc.app/Contents/Resources/app/fixtures/docx/simple_text.docx" "$CLI" surface --doc "$DOC" \ --save ~/Desktop/api-demo-web-result.docx ``` * Windows ```powershell $CLI = "C:\Program Files\SumDoc\resources\runtime\native\fastdoc-cli.exe" $DOC = "C:\Program Files\SumDoc\resources\app\fixtures\docx\simple_text.docx" & $CLI surface --doc $DOC ` --save "$HOME\Desktop\api-demo-web-result.docx" ``` * Linux ```bash CLI="/opt/SumDoc/resources/runtime/native/fastdoc-cli" DOC="/opt/SumDoc/resources/app/fixtures/docx/simple_text.docx" "$CLI" surface --doc "$DOC" \ --save ~/Desktop/api-demo-web-result.docx ``` In response, the processor prints a JSON line with a ready-made address — open it in your browser. The address contains a one-time pass, so there’s nothing to substitute. The Evaluation Kit has a ready-made script for the same purpose, `start-web-demo.sh`; it runs the same command with a preset port and pass. 1. Wait for the document to load. 2. Place the cursor in the first paragraph and add text. 3. Click the **Save DOCX** button — it’s labeled in English, same as on the surface itself. 4. Check the file given in `--save`. 5. Stop the surface with Control+C in the same terminal window. The port and pass are new every run The system picks the default port, and the pass is generated anew on every run — so an address from someone else’s example won’t work. `fastdoc-cli` prints both values at startup as a single JSON line: ```json {"schema":"fastdoc.surface-host-bootstrap.v1","host":"127.0.0.1", "port":54321,"token":"…","url":"http://127.0.0.1:54321/?token=…", "document_path":"/absolute/input.docx", "save_path":"/absolute/output.docx","ready":true} ``` Take the ready-made `url` from this line — it already contains the required pass. Both paths come along with it: `document_path` — the opened document, `save_path` — where the save will go. Your application can show them to the user without having to remember what it passed on the command line itself. ::: ## What’s next [Section titled “What’s next”](#whats-next) The surface is up and running. Next: * embed it in your product — [Embedding Surface](/sumdoc/embedding/); * exact event names, schemas, and parameters — [Browser surface interface](/reference/sumdoc/surface-api/). # Editor in the browser: embedding through iframe > How to embed the SumDoc editor into a web application: a ready-made image, two endpoints on your API, three steps to a working editor, co-editing, and what happens inside. If your product lives in the browser, you can embed the editor with nothing for the user to install: the editor page opens inside your application, and the core computes the document on the server. How it’s delivered The web host is a ready-made Docker image: the sandbox manager, the editor shell, and a core of the same version inside. Linux x86-64; 2 GB of memory per server and about 250 MB per open document; no internet needed after installation. The image is not part of the desktop app installer. There are two ways to get it: * from the registry — `docker pull hissih/sumdoc-webhost:latest`; * as an archive for a network without internet — the `webhost/` folder of the [release catalog](https://dl.layers.md/sumoffice/sumdoc/release/latest/webhost/) holds `SumDoc--webhost-docker.tar.gz`, the `INSTALL.md` guide, and `SHA256SUMS`; load the image with `docker load`. Inside the image are the host contract (`HOST-CONTRACT.md`), a half-hour integration guide (`INTEGRATION-30MIN.md`), a sample host, and the `doctor` check, which verifies your host against the contract. Evaluation is free and has no time limit; see also [What is delivered](/platform/delivery/). See it before you read You can see what it looks like for the user right now: the [live example](/sumdoc/demo/) runs the editor on a documentation page. The same server-side editor runs in \[\[var:workspace.name]], our workspace for teams: sign in at \[\[var:workspace.url]] (free), create a page, drag a `.docx` in and open it — that’s the same image described here. This isn’t WebAssembly The core isn’t built for the browser. It runs on the server, and a separate process with its own document starts for every user. The browser gets ordinary page code and canvas rendering. So embedding isn’t connecting a module — it’s an ordinary `iframe` pointed at the editor’s address. ## What’s needed from your application [Section titled “What’s needed from your application”](#whats-needed-from-your-application) Two required endpoints on your API, and a third, optional one. If you already have accounts and files, both required ones already exist. | Endpoint | Why | What it must respond with | | ------------------------------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | “who am I” — `--auth-url` | Identify the user and the name that others in the document will see | Accepts the browser’s cookies or `Authorization` header as is; responds with 2xx and JSON with an `email` or `id` field (the name comes from `name`, `displayName` or `fullName`), otherwise 401 or 403 | | “file by ID” — `--attach-url` | Hand over the document and accept the edit | `GET …/{id}/content` returns the DOCX only to someone who has permission; a 302 to a signed link is allowed. The same endpoint with `/replace` instead of `/content` accepts the edit: `POST multipart/form-data`, part `file`. If the `GET` response carried the `X-Layers-Attachment-Version` header, the editor adds `?expectedVersion=N` when writing; on a version mismatch, respond 412 — someone else’s edit is not overwritten | | “create file” — `--create-url` *(optional)* | Open a copy for a second person | `POST` with the raw DOCX bytes; the file name goes in a request header, percent-encoded (sample below); the response is JSON with the `id` of the new file | A file creation request looks like this — the header carries the name, the body carries the DOCX itself: ```http POST /api/files HTTP/1.1 Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document X-FastDoc-Name: %D0%94%D0%BE%D0%B3%D0%BE%D0%B2%D0%BE%D1%80.docx ``` The editor has no database, accounts or passwords of its own: you know the users and the permissions. The full contract with sample responses for every call is `HOST-CONTRACT.md` inside the image; there’s also a sample host you can run it against. ## Three steps [Section titled “Three steps”](#three-steps) ### Start it [Section titled “Start it”](#start-it) The image starts with one command. The port is published only on the local address — your proxy exposes it to the outside (step 2). Sandboxes live in the `/data/cabins` volume and survive an image update. ```bash docker run -d --name sumdoc-webhost --restart unless-stopped \ -p 127.0.0.1:8090:8090 \ -v /srv/sumdoc-cabins:/data/cabins \ hissih/sumdoc-webhost:latest \ --base-path /sumdoc --max-cabins 12 --idle-min 20 \ --auth-url 'https://your-host/api/me' \ --attach-url 'https://your-host/api/files/{id}/content' ``` Check: `curl http://127.0.0.1:8090/sumdoc/health` responds with JSON containing `"status": "ok"` and `"skewMin": 0`. Zero means the shell and the core come from the same release; any other number means the image was built incorrectly. Before starting, it’s useful to check the environment’s readiness: `doctor` (`doctor.mjs` in the delivery) says in plain language what’s missing — the core, the template, a busy port, or the reachability of your endpoints. #### From the archive without Docker [Section titled “From the archive without Docker”](#from-the-archive-without-docker) The sandbox manager is a Node.js program, and you can run it without a container: from the unpacked image or from the web host delivery. It then listens only on the local address — you can’t connect to it from outside, even from your own network — and prints its readiness as the first line. ```bash FASTDOC_CLI_BIN="$CLI" \ WEBHOST_WS_DIR=/opt/fastdoc/webhost \ node webhost/cabin-manager.mjs \ --template /opt/fastdoc/blank.docx \ --docs-dir /opt/fastdoc/cabins \ --port 8090 \ --auth-url 'https://your-host/api/me' \ --attach-url 'https://your-host/api/files/{id}/content' ``` Two variables are required, and they behave differently. In the image both are already set; you only need to set them when starting manually. `FASTDOC_CLI_BIN` is the path to the processor: it’s the same `$CLI` as on the [Installation and verification](/sumdoc/install/) page. Without it, the manager starts and responds, but no sandbox opens: there’s nothing to start the core with. `WEBHOST_WS_DIR` is the folder that holds `node_modules/ws`: the manager loads the WebSocket library from there. It’s usually the same `webhost` folder it’s started from. Without this variable, the manager doesn’t start at all — it prints “WEBHOST\_WS\_DIR is not set” and exits immediately. If the folder is set but `node_modules/ws` isn’t in it, it crashes on the very first attempt to load the library. #### The editor’s title bar inside your page [Section titled “The editor’s title bar inside your page”](#the-editors-title-bar-inside-your-page) The third variable isn’t required, but almost everyone needs it: `WEBHOST_CHROME` (the `--chrome` flag offers the same choice) decides what to do with the window’s top bar — it’s left over from the desktop app and is usually superfluous on someone else’s page. | Value | What’s shown | | ------ | --------------------------------------------------------------------------------- | | `full` | The whole bar: document name, save, print, autosave. | | `slim` | The document name is hidden — it’s already in the browser tab — the buttons stay. | | `none` | No bar at all. | With `none`, saving disappears too The bar is removed entirely, and the save button goes with it — there’s currently no other way to save the document in web mode. Choose `none` only if your own page triggers the save from outside; otherwise take `slim`: the name goes away, the buttons stay. The default value is `none`, so set the title bar explicitly if you need it. The choice doesn’t affect the document’s geometry: the core computes the canvas, and it doesn’t change with the bar mode. #### Operational flags [Section titled “Operational flags”](#operational-flags) The manager’s other flags change not the look but the environment’s behavior under load. All of them have defaults, and you don’t have to change them — but it’s worth knowing them, because they affect both the user’s sign-in and their unsaved document. | Flag | Default | What it does | | -------------------------- | ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--warm` | `2` | How many sandboxes to keep ready in advance. Sign-in stops waiting on the process start and the document opening. The pool refills in the background after every one is handed out. | | `--warm-max` | four times `--warm`, but no less than eight | The warm-up ceiling, so the pool doesn’t grow without limit. | | `--idle-min` | `30` | How many minutes of idling before a sandbox shuts down. Anything the user hasn’t saved must be saved on your side by then. | | `--max-cabins` | `0` — computed from the machine | The limit on simultaneous sandboxes. At `0`, the manager takes half the machine’s memory and twice the core count, whichever is smaller, but no fewer than four and no more than sixty-four. | | `--access-recheck-min` | `5` | How often to recheck access permission with your API. Between checks, the sandbox lives on the previous answer: revoke access, and the person keeps editing the document until the next check. | | `--static-cache-mb` | `64` | The ceiling on the manager’s in-memory static asset cache. | | `--port` | `8090` | The manager’s port. | | `--template` | — | The empty DOCX that warmed-up sandboxes start from. | | `--entry` | none | A fallback pass: the address opens with it without your “who am I”. | | `--docs-dir` | — | The folder where the manager keeps working copies of documents, per sandbox. | | `--create-url` | none | Your “create file” endpoint; needed only when a second reader is given a copy of a document that’s in use. | | `--auth-url` | none | Your “who am I” endpoint. As long as it’s set, sign-in only goes through your permission check. | | `--attach-url` | none | Your “file by ID” endpoint. The sandbox downloads the attachment using the request’s own credentials: your host checks permissions, and if it doesn’t hand over the file, there’s no way in. The sandbox binds itself to the “identity and attachment” pair — you can’t slip in someone else’s document. | | `--base-path` | none | The subpath, if the service doesn’t live at the domain root, for example `/sumdoc`. The proxy passes the path as is; the manager strips the prefix itself. | | `--bind` | `127.0.0.1` or `WEBHOST_BIND` | The listening address. In the image it’s set to `0.0.0.0`: the loopback address inside a container is unreachable from outside. When starting manually, keep the loopback — the proxy exposes the service to the outside. | | `--public-url` | `http://127.0.0.1:` | The service’s external address, as WOPI storages see it and as used to set cookie attributes. | | `--ui-locale` | not set | The sandbox interface language: `ru`, `en` or `auto`. Without the flag, the original Russian. | | `--audit-log` | not written | The audit log file, one JSON line per event: open, refusal, save, version conflict, access revocation. Without the flag, no log is kept: a log with people’s identities is never started silently. | | `--secure-view` | off | Protected view for all sandboxes in the environment: the document can be read, but not printed or copied. The restriction lives in the sandbox server; the person can’t lift it. | | `--watermark` | none | The watermark text on printouts and in the exported PDF; `{кто}` inserts the name of the signed-in user. There’s no watermark on screen. | | `--prestart-max` | `3` | How many sandboxes with a document can be started in advance on a signal from the viewing page (`POST /prestart?doc=…`), so the editor is ready on click. Warm sandboxes don’t take slots away from people. | | `--prestart-ttl-s` | `60` | How many seconds without a signal from the page before a warm sandbox shuts down. | | `--prestart-origins` | none | The origins (CORS) allowed to send the prestart signal. | | `--window-min-pages` | `0` — off | From how many pages the document scene is sent to the browser as a window rather than in full: on long documents this cuts traffic and time to first display several times over. | | `--window-min-media-bytes` | `0` — off | The same by image weight: a document heavier than the threshold is handled as a window, and images are sent on demand. | | `--wopi-hosts` | none | A comma-separated allowlist of WOPI storages. Without the flag, WOPI is off. | | `--wopi-refresh-min` | `25` | How often to refresh the WOPI lock, in minutes. | `--entry` — a door around your authorization As long as `--auth-url` is set, there’s no fallback pass at all — and that’s the right default: otherwise anyone who reads a log with the random string would get in past your permission check. The pass only works if you set `--entry` explicitly. On a test bench without `--auth-url`, the manager creates one itself and prints it — that’s convenient there, but it shouldn’t happen in production. Two flags deserve a deliberate choice `--idle-min` decides the fate of unsaved work: the sandbox shuts down on idling, and you can’t count on the document waiting for a user who comes back. `--access-recheck-min` is the window during which revoked access is still honored; if your rules require instant revocation, set it lower. #### WOPI [Section titled “WOPI”](#wopi) The web host can also open files over the WOPI protocol — a second driver for the same door as “who am I” and “file by ID”. It’s enabled only by the `--wopi-hosts` flag with a list of allowed storages; without the list, any `WOPISrc` is rejected. The manager serves `/hosting/discovery` and `/hosting/capabilities`, calls CheckFileInfo, GetFile and PutFile, holds and refreshes the lock (Lock, RefreshLock, Unlock), signs requests with proof keys, and supports frame postMessage. The storage answers 409 to a second person on a locked file: there’s no co-editing over WOPI, it works only through the first driver. Verified against our own sample WOPI host; not certified against Nextcloud, SharePoint or ownCloud. ### Proxy it through your own server [Section titled “Proxy it through your own server”](#proxy-it-through-your-own-server) An ordinary reverse proxy with one required condition: **the switch to WebSocket must go through**. Without it, the editor can’t reach the core. A ready-made nginx sample is in the delivery, in the `examples` folder. Three things matter: passing the protocol-switch headers, passing your authorization cookies, and a long enough read timeout. Required conditions The editor must open **over https, on the same domain** as your application: otherwise the browser won’t hand it your authorization’s secure cookies, and the user will see “sign-in required”. ### Give the link [Section titled “Give the link”](#give-the-link) An “Edit” item appears next to the file in your interface: ```html ``` A user signed in to your application lands in the editor with their own document. Edits go back into your file through your own API. How the saved file arrives The edit arrives as `multipart/form-data` — a single part named `file`. Your handler must **parse** the multipart body, not write it to the file whole. Writing it whole corrupts the documents after every save — silently, with no errors in the log. The telltale sign: trying to open such a DOCX, the unpacker reports extra bytes at the start of the file. This isn’t hypothetical: the sample host in the delivery itself tripped on it. ## What happens under the hood [Section titled “What happens under the hood”](#what-happens-under-the-hood) * **Every user gets their own sandbox** — a separate process with its own document. Someone else’s document is never visible and can’t be slipped in. * **Permissions stay with you.** Don’t hand over the file, and the editor won’t open. And not just at sign-in: every few minutes, the editor asks again whether the person is still allowed to have the document they have open. Revoke access, and the sandbox shuts down, and the person sees your own response. * **Edits go out through your API** with the same user’s credentials. * **A write refusal is visible to the person.** If you respond with a permanent refusal — the session expired, or there’s no permission left — a bar appears at the top of the page: edits aren’t being saved right now, but the work isn’t lost. When writing succeeds again, the bar disappears. * **A sandbox shuts down after idling** and starts again on the next sign-in. You can keep some sandboxes warmed up in advance: then opening a new document takes a fraction of a second instead of waiting for the process to start. The environment’s state is visible at `/health`: the build version and the shell-to-core skew (`skewMin`), how many sandboxes are alive, and how many write refusals, version conflicts, co-editing sessions and copies there were in the last hour. ## What a user without sign-in sees [Section titled “What a user without sign-in sees”](#what-a-user-without-sign-in-sees) The editor has no accounts or passwords of its own: it takes identity from your application. So a request without your session gets refused, and the person sees a short explanation — “sign-in required, sign in and open the document again”. This isn’t an embedding bug, it’s normal behavior: if a signed-in user sees this, the cookies never reached the editor — check that it opens over https, on the same domain, and that the proxy passes the cookies. ## Two people in one document [Section titled “Two people in one document”](#two-people-in-one-document) A second person on a busy document is shown a choice of three buttons. **“Edit together”** — one file for two. Edits travel between sessions, the core computes the transfer, and everyone ends up with the same text; the other person’s input is visible immediately. Exactly one person writes to your storage — the holder, whoever opened the document first. The co-editor’s edits get there with the holder’s save, and if the holder leaves, writing passes to the co-editor. Two people writing to one file would silently lose each other’s work, hence the rule. **“Make my own copy”** — a separate file on your side, its own browser address, and a bar saying “this is your copy, the original file is being edited by another person right now”. This is what the third, optional endpoint — “create file” — is for. Don’t provide it, and there’s no such button; the other two work. The copy gets a meaningful name if your file endpoint sends the usual header with the name: then it’s called “Договор №42 (копия).docx” (“Contract No. 42 (copy).docx”) rather than after the creation date. **“View without changing”** — the same document, without editing. As soon as the holder’s edit reaches your storage, the viewer is told in words right in the tab that their copy is out of date, and the page rereads the fresh bytes. When the holder leaves and the document is released, the viewer is told too. A document counts as busy only while the holder’s page is alive, not while the network socket is intact: a hung tab must not lock the file for everyone else. Every 15 seconds the manager compares the session state fingerprints; a diverged session is reread from the holder’s state. How many times per hour the document was co-edited and how many times a copy was taken is visible in the same `/health`. ### Who’s nearby [Section titled “Who’s nearby”](#whos-nearby) The other person’s edits appear as they type, colored in their color, with the name your “who am I” returned above the caret. If they’re on another page, the header shows where they’re editing; a click takes you there. At the bottom right is a subtle badge: “Also in the document: Boris. Boris writes to the shared file; your edits will get there with his save”. Alone in the document — no badge. **Undo is your own.** Undo removes your edit, even if the other person typed ten letters over it: their letters stay. The manager reports who’s nearby at `GET /presence` (by the sandbox cookie): ```json { "schema": "fastdoc.webhost-presence.v1", "simultaneous_editing": true, "single_writer_role": "правит", "others": [ { "name": "Борис", "role": "правит", "present": true } ] } ``` | Field | What’s in it | | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `simultaneous_editing` | `true` — typing is simultaneous. | | `single_writer_role` | The role whose holder writes to the shared file. `правит` (editing) — the holder; `правит вместе` (editing together) — edits the same document but doesn’t write to the host; `смотрит` (viewing) — an observer. | | `others[]` | Only the people in this same document: `name` — the name from your host, with no addresses or sandbox numbers; `role`; `present` — the person is on the page right now, rather than gone and left the sandbox behind. | ## The window’s top bar [Section titled “The window’s top bar”](#the-windows-top-bar) In the desktop app, a window bar with the document name and buttons runs along the top. In the browser, the document name is already in the tab, so you’d get two headings stacked on top of each other. That’s why the bar’s look is configurable: | Value | What it does | Who it suits | | ---------------------------- | ----------------------------------------------- | ---------------------------------------------- | | `none` — the browser default | No bar, the ribbon starts right at the top | Everyone opening the editor in the browser | | `slim` | The bar is there, but without the document name | Anyone who wants its buttons close at hand | | `full` | Same as the desktop app | Anyone who needs the exact same look as before | Only visibility changes: the core computes the document’s geometry, and the page doesn’t shift. With the bar turned off, saving stays in the “File” tab. ## Verification [Section titled “Verification”](#verification) The delivery has three checks, and all of them run with a single command. | What to check | With what | | ------------------------------------------ | --------------------------------------------------- | | The environment’s readiness before startup | `doctor.mjs` | | Whether the whole embedding is correct | `acceptance.mjs` — prints an “expected / got” table | | Behavior under load | `load-test.mjs` — on your own live sessions | A zero in the acceptance check’s “mismatched” row means the embedding is done correctly. ## Next [Section titled “Next”](#next) * What embedding actually gives you and where the boundaries lie — [Responsibility and security](/sumdoc/responsibility/). * Other ways to deploy SumDoc — [Platforms and deployment](/sumdoc/deployment/). * The request format for the core — [Request and response objects](/sumdoc/envelope/). # The same contract over WebSocket > Starting fastdoc-cli with WebSocket on a local address, the connection sequence with the pass, the minimal client loop, and how it differs from JSON-line exchange. What you need before you start The commands below run in the prepared `~/Desktop/SumDoc-API-first-run` folder. It comes, together with the `a4-api-demo.mjs` and `start-web-demo.sh` scripts, from the **Evaluation Kit** — a separate delivery artifact (see [What is delivered](/platform/delivery/)). It is not part of the SumDoc installer and cannot be downloaded from [dl.layers.md](https://dl.layers.md/sumoffice/sumdoc/release/latest/): request it from the vendor. **If you don’t have the Evaluation Kit yet**, an installed SumDoc is enough to follow the same path manually: `fastdoc-cli` lives inside the application (see [Installation and verification](/sumdoc/install/)), the request format is described in [Request and response objects](/sumdoc/envelope/), and the full list of commands is in the [reference](/reference/sumdoc/session-protocol/). SumSheet has an example of a fully written-out script: [verified script](/sumsheet/reference-script/). ::: WebSocket is convenient when your product’s shell is already asynchronous and built on web technologies. The core picks a free local port itself and prints a single line with the connection address and a one-time pass. * macOS ```bash cd ~/Desktop/SumDoc-API-first-run node a4-websocket-demo.mjs ``` * Windows ```powershell cd $HOME\Desktop\SumDoc-API-first-run node a4-websocket-demo.mjs ``` * Linux ```bash cd ~/Desktop/SumDoc-API-first-run node a4-websocket-demo.mjs ``` ## Connection sequence [Section titled “Connection sequence”](#connection-sequence) 1. Start `fastdoc-cli serve --ws 0` as a child process. Zero means “any free port”. 2. Read the first line of stdout — it has `host`, `port`, `token`, and `schema`. 3. Connect to `ws://127.0.0.1:/?token=`, substituting the values from that line. 4. Wait for the session greeting with the `fastdoc.session-serve.v1` schema. 5. Send the same JSON objects as over JSONL. 6. When closing the application, send `shutdown` first, then close the socket and the child process. ## Actual result [Section titled “Actual result”](#actual-result) ```plaintext 1. WebSocket: ws://127.0.0.1:52601 2. Session protocol: fastdoc.session-serve.v1 3. Ping: true 4. Before: This is a sample word document. It has two pages, but no headers or footers. 5. After: WS API DEMO: This is a sample word document. It has two pages, but no headers or footers. 6. Saved: /Users/tester/Desktop/SumDoc-API-first-run/api-demo-websocket-result.docx 7. Reopened from disk: WS API DEMO: This is a sample word document. It has two pages, but no headers or footers. RESULT: PASS ``` Transport security Listen only on 127.0.0.1, use the issued token, don’t expose the port externally, and don’t pass a path to an arbitrary file without your own access check. ::: ## Minimal client loop [Section titled “Minimal client loop”](#minimal-client-loop) ```ts const child = spawn(cli, ["serve", "--ws", "0"]); const bootstrap = JSON.parse(await firstLine(child.stdout)); const ws = new WebSocket( `ws://${bootstrap.host}:${bootstrap.port}/?token=${bootstrap.token}` ); await new Promise(resolve => ws.addEventListener("open", resolve, { once: true })); ws.send(JSON.stringify({ id: "p1", cmd: "ping" })); ``` Frames are text-only The exchange uses text WebSocket frames: each request is one line of JSON, and each response arrives the same way. The session refuses a binary frame but doesn’t drop the connection: it responds with ```json {"id":null,"ok":false, "error":"session WebSocket requests must be UTF-8 text frames"} ``` and you can keep working on the same connection. Note the `id: null` — with this kind of refusal, the session doesn’t yet know which request the frame came from. ::: # Architecture: four layers and objects > One system of four layers of responsibility, the core's exact place, the list of objects, and the main relationships between them. The system is divided into four layers, each with its own owner. The last column is what matters for you: it says what a layer must not do—that’s where the boundaries run that must not be crossed when embedding. | Layer | Owner | Responsibility | Must never do | | ----------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | | Your application | You | Users, permissions, the document card, versions, audit, approval processes. Document management here is just one case: it could just as well be an accounting system or an industry platform. | Doesn’t need to know the internal structure of the XLSX file. | | The editor shell | Us, under your brand | Shows the editor, gathers the user’s intent, displays the response. | Never computes formulas and never changes the file itself. | | The operations contract | The shared boundary both of us are responsible for | Describes commands, results, refusals, revisions, and capabilities. | Doesn’t depend on exactly where the core runs. | | The Rust core | Us | The sole owner of the workbook’s meaning: computation, changes, history, saving. | Never manages the document card or your users. | ## Exactly where the core runs [Section titled “Exactly where the core runs”](#exactly-where-the-core-runs) The core is neither a server nor a screen. It’s a portable compute module: in the browser the same code runs inside the page (WebAssembly), in the desktop app or on a server—as an ordinary executable. The way it’s launched changes; the meaning of the workbook and the operations contract stay the same. * **The shell** — what the user sees, and the call sequence. * **Operations contract**—commands and responses of a known shape. * **The core** — a single model of the workbook and the operations on it. The architectural rule No second, small core must appear in the shell. If a button changes the document’s meaning, the operation must go through the operations contract and the real core. Otherwise the browser and server versions will start behaving differently. ## Objects and relationships [Section titled “Objects and relationships”](#objects-and-relationships) | Object | What it contains and knows | Lifecycle | | ------------------------------- | --------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Integration session | The document identifier, the user’s permissions, the product’s settings. | Created by your system when the editor opens. | | Workbook session | The open workbook, the current revision number, the edit history, the execution mode, and the save state. | Lives from open to close; separate from every other workbook. | | Workbook | Sheets, names, styles, settings, relationships, and the file’s utility parts. | Loaded from the file and changed only by the core. | | Sheet | Cells, rows and columns, tables, objects, and print settings. | Identified not by name but by an internal key: renaming the sheet doesn’t change the key. But when exporting to another format the keys are rebuilt, so you can’t store the key as a permanent identifier in your database—take it from the open response. | | Viewport | Only the visible part of the sheet, and information about it. | Changes on scrolling and zooming; it’s never the whole workbook. | | Operation, also known as intent | The action, its parameters, the expected revision number, and constraints. | One request through the operations contract. | | Result and event | The new state, exactly what changed, a warning or a refusal, and the data to display. | Arrive at the shell and your application after every operation. | | Saved file | The file’s content, its format, and information about the save. | Goes into your document management system as a new version. | ### Main relationships [Section titled “Main relationships”](#main-relationships) * **Integration session** creates and constrains → **workbook session** * **Workbook session** owns the state → **workbook, revision number, edit history** * **Workbook** hands outward only what’s needed → **viewport** * **Operation** checks the revision and changes → **workbook session** * **Save** creates → **the finished file → a new version in your system** Why this matters You’re not embedding “an Excel screen” — you’re embedding a clear set of objects. The screen can be replaced or reshaped to fit you; the workbook session, the operation, the revision, and the saved file stay the foundation you can rely on. ## Next [Section titled “Next”](#next) * What happens from opening the workbook to saving it — [Lifecycle](/sumsheet/lifecycle/). * What the core can do next to Excel — the [capability map](/sumsheet/atlas/). * Your first project — [Quick start](/sumsheet/quickstart/). # Capability map next to Excel > What in SumSheet is described by contract and verifiable, how it differs from Excel, and what we don't claim. SumSheet gets compared with a spreadsheet editor, and at that level all the contenders look the same: a grid, formulas, formats. The difference begins where the spreadsheet stops being a separate application and becomes part of someone else’s product. This page answers one question: of what you’re used to from Excel, what SumSheet has, what it has partially, and what it doesn’t have. How to read this page There’s no claim here that “we’re better”. Excel remains the benchmark for completeness of spreadsheet semantics: it has native Power Query, the M language, VBA, and an object model. What’s shown below is something else — which layers of SumSheet are described by contract, and are therefore verifiable against your own files. The marks in the table refer to the contract. The contract and a published release aren’t the same thing: some of the described operations haven’t made it into a build yet, and wherever that affects a row below, it says so directly in it. The full difference is in the [reference](/reference/sumsheet/overview/). **We write “no” about Excel only where there’s a source and a verification date.** Where there’s no solid source, it says “needs verification”: check for yourself, links are at the bottom of the page. ## Legend [Section titled “Legend”](#legend) | Mark | What it means | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ● | Yes: covered by operations of the published release and checked on every documentation build | | ◐ | Partial: the mechanism is ours, but it doesn’t replicate someone else’s one to one; the row says exactly how it differs | | ◇ | Not locked in: the mechanism works, but there’s no public set with stable names and versions for it yet — you can build on it, but you need to know that in advance | | — | No: no native equivalent was found in the official documentation | | ? | Needs verification: we don’t have a solid source yet | We don’t paint anything from “partial” or “not locked in” with the green “yes” mark. A dash means exactly what it says: no native capability was found in the official Microsoft documentation we studied. That’s not proof it can’t be added with an add-in. If you know a source that refutes any cell, write to us — we’ll correct it and update the date. ## Comparison by capability [Section titled “Comparison by capability”](#comparison-by-capability) | Capability | SumSheet | Excel | What’s behind it | | ------------------------------------------ | -------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Tables and formulas | ● | ● | The base level; by itself it doesn’t set one product apart from another. The substantive conversation starts with the list of functions, and SumSheet has one: the delivery includes a registry of 508 functions — one entry per name — and each records which section it belongs to, at which delivery stage it will work, and which checks cover it. It’s not a list of what’s supported: the number of functions verified against Excel by value is always smaller than the number of entries in the registry. Ask about your own stage; the [list](/reference/sumsheet/formulas/) is right there. | | Excel formats | ● | ● | SumSheet has a declared capability matrix and a rule for preserving what the editor doesn’t understand. | | Pivot tables | ● | ● | Eleven contract operations: calculated fields and items, grouping and drill-down, layout, filters and ranking, value field settings, report filter pages. The OLAP data model is available read-only. | | Conditional formatting | ● | ● | Rules are applied, changed, and moved between ranges by three contract operations; the core of the latest release accepts all three. | | Protecting the workbook, sheet, and ranges | ● | ● | Six operations: permissions on individual ranges, sheet protection, the workbook protection lifecycle, showing exactly what protects the file, and opening a password-protected workbook — by path and from passed bytes. | | Power Query | ◐ | ● | Connecting, transforming, merging, loading, and refreshing — within a declared subset. The contract doesn’t promise full parity with Excel: that’s stated in it as a separate line. | | The M language | ◐ | ● | Parsing and evaluation happen in the Rust core with its own function library. This is a subset of the language, not a full M runtime. | | Query dependencies and refresh | ● | ● | A dependency graph, cancellation, and preempting a stale refresh. | | Query privacy and credentials | ● | ● | Source privacy levels; secrets never end up in the workbook’s projections. | | Running VBA macros | ◐ | ● | A macro is never executed in the workbook itself: the core inspects the project, plans the run, executes the macro on a copy, shows a preview of the changed cells, and carries the result over only after confirmation; rollback is available. The macro is executed by SumSheet’s own runtime in Rust, in a declared subset of the language — the run plan says exactly what’s included ([VBA and macros](/reference/sumsheet/vba/)). | | The Excel object model | ● | ● | In SumSheet, the runtime is separate from the object model layer. | | Workbook and sheet events | ● | ● | The mechanisms differ; Excel’s event semantics have to be reproduced separately. | | Forms and the interaction model | ● | ● | In SumSheet, the model is semantic, not a pixel-for-pixel copy of Excel’s forms. | | COM, OLE, ActiveX, Win32 | ◐ | ● | In SumSheet this is a compatibility layer with explicit boundaries, not a general Windows environment. A real COM and Win32 (`Declare`) executor exists only in the Windows build. External objects that a macro requests (Scripting.Dictionary, VBScript.RegExp, MSXML, and others per the manifest) are served on every platform by the core’s broker: everything is denied by default, a person grants access to a specific object class and only for a single run, and every call is logged — executed or rejected. For developers: [how this is set in the run plan](/reference/sumsheet/vba/). | | Charts | ◐ | ● | The contract covers a chart sheet (creation, print settings, preview) and formatting a chart as a sheet object: template and family, title, legend, labels and data table, axes, series with markers, individual points, trendlines, error bars, and the 3D view of surface charts. Fill and line in the contract are solid color, width, and dash only: gradient, picture, texture, and pattern fills, as well as effects (reflection, glow, soft edges, bevel), are not declared by the contract. | | The editor in the browser | ◐ | ● | The core under WebAssembly and the bridge to it ship as SumSheet engine packages — that’s a delivery artifact, not a description. The set of operations is the same as in the desktop app; you build the shell for WebAssembly yourself. A ready-made editor in the browser exists by another route — the web host, where the core calculates on the server and the browser gets the same interface as the desktop app ([the server route](/sumsheet/server/)). | | Headless processing | ◐ | ◐ | The release core works without an interface: the command-line processor accepts the same contract operations, and that’s what the [live example](/sumsheet/demo/) calculates on. The server wrapper around it — queues, quotas, client isolation — you build yourself. | | Embedding and OEM | ◇ | ◐ | The operations contract and your own shell. Engine packages are delivered, and the [embedding examples](/sumsheet/examples/) are built on them, but the public developer kit still isn’t separated from the internal contract: names, versions, and compatibility rules aren’t locked in. | | Agents as engine clients | ◇ | ◐ | The sequence is explicitly described: inspect, propose, get permission, execute, verify. The release has support for it — an edit preview and a macro run plan among the core’s operations. What’s not locked in is the rest: an agent’s permissions, what goes into the audit, and the approval process — those are pilot territory. | ## What actually sets SumSheet apart [Section titled “What actually sets SumSheet apart”](#what-actually-sets-sumsheet-apart) ### Data preparation inside the spreadsheet [Section titled “Data preparation inside the spreadsheet”](#data-preparation-inside-the-spreadsheet) Power Query in SumSheet isn’t an add-in — it’s a part of the product with its own lifecycle: sources, a query editor with transformation steps, an M language engine, merging, loading the result, a dependency graph, refresh, privacy levels, and credentials. This isn’t “we can open files with queries”, it’s working with queries as objects of the workbook. ### Automation as compatibility layers [Section titled “Automation as compatibility layers”](#automation-as-compatibility-layers) SumSheet separates parsing the VBA language, the runtime, the Excel object model layer, events, the interaction model, and the boundaries of calling external objects. This lets you say, for any given scenario, what works natively, what works through compatibility, and what isn’t supported at all. The answer “we support VBA” means nothing without this breakdown. ### One semantic core for different environments [Section titled “One semantic core for different environments”](#one-semantic-core-for-different-environments) The desktop app, the browser through WebAssembly, the server wrapper, and agents all call the same operations contract. Spreadsheet semantics aren’t reimplemented for every environment from scratch — and that’s exactly how discrepancies arise, when the same workbook computes differently in different places. ### The agent is part of the contract [Section titled “The agent is part of the contract”](#the-agent-is-part-of-the-contract) An agent’s workflow: inspect a bounded state, propose a change, get permission, execute through the contract, verify the result. An agent never becomes a second owner of the document’s meaning, and it never clicks through the interface in place of a person. ## What we don’t claim [Section titled “What we don’t claim”](#what-we-dont-claim) These four claims shouldn’t be made, either in correspondence or in comparisons — they won’t hold up to scrutiny: * **“SumSheet is more complete than Excel.”** Excel remains the benchmark for its own semantics, and Power Query, the M language, VBA, and the object model are all native to it. * **“We support COM, ActiveX, and Win32.”** This layer in SumSheet is marked as compatibility, not a full Windows environment. * **“The server platform is ready.”** The web host and mobile apps are released, but the wrapper for load — queues, quotas, client isolation — is built separately; where the status is architectural, there’s no finished product. * **“Excel doesn’t have this.”** If the conclusion rests only on a capability’s absence from the public documentation, that’s not proof. ## Where to see the details [Section titled “Where to see the details”](#where-to-see-the-details) * How embedding works and what crosses the boundary — [Integrating into an application](/sumsheet/integration/). * Working in the browser — [The Web and WebAssembly variant](/sumsheet/wasm/). * The server scenario and its boundaries — [SumSheet as a server-side processor](/sumsheet/server/). * Strengths and honest tradeoffs — [Strengths and tradeoffs](/sumsheet/tradeoffs/). * The full list of operations — the [SumSheet reference](/reference/sumsheet/overview/). About dates and sources The comparison relies on official Microsoft documentation, checked on **August 30, 2026**. Excel keeps changing, so before making a decision based on this table, it’s worth double-checking the current data and running your own measurements on your own workbooks. ## How this table differs from a marketing one [Section titled “How this table differs from a marketing one”](#how-this-table-differs-from-a-marketing-one) **Where Excel is stronger, we say so.** A table where the other side looks bad at everything convinces no one and gets debunked in five minutes. Excel is a mature product with forty years of history, and wherever it does more, our column says “partial” or “contract”. **Our column is checked by a machine, not by an editor.** Behind every row marked “yes” are operations of the published release: their list is taken from the core itself, and the documentation build checks the text against it and fails if they diverge. So “yes” here isn’t an opinion. **The difference between “yes” and “contract” isn’t a formality.** The contract has 208 operations; the published release has 206. Everything that’s described but hasn’t made it into a build yet is marked “contract”, not with the green mark. ## More on the spreadsheet side [Section titled “More on the spreadsheet side”](#more-on-the-spreadsheet-side) * How the sheet responds to clicks, double-clicks, and menu invocation — [Responding to clicks and the context menu](/sumsheet/interaction/). * What the surface reports outward — [Surface events](/sumsheet/surface-events/). * Where the product is headed — [From concept to pilot](/sumsheet/roadmap/). * What changed from version to version — [SumSheet version history](/sumsheet/changelog/). ## Sources [Section titled “Sources”](#sources) * [Power Query](https://learn.microsoft.com/en-us/power-query/) * [The Power Query M language](https://learn.microsoft.com/en-us/powerquery-m/) * [Excel VBA](https://learn.microsoft.com/en-us/office/vba/api/overview/excel) * [Excel add-ins](https://learn.microsoft.com/en-us/office/dev/add-ins/excel/) # SumSheet version history > What was added, changed, and fixed in SumSheet from version to version. Each line below is a change visible in the product itself. Versions run from newest to oldest. The top entry can be ahead of what’s actually deployed: the changelog grows as the release comes together, and deployment is a separate step. Which version is available right now is shown in the release catalog, linked from the installation page. The version number is made up of the year, the quarter, and the patch number within the quarter: in `2026.3.4`, that’s the fourth patch to the third-quarter 2026 release. The patch count restarts every quarter, so `2026.3.19` is followed by `2026.4.0`, not `2026.3.20`. Downloadable filenames add one more part to the number — a running build number, for example `2026.3.4.25`. It doesn’t affect version comparison and exists to distinguish files of the same version built at different times. Release candidates and test builds carry a suffix: `2026.4.0-rc1`, `2026.4.0-beta1`. The application checks the installed version against what the update channel offers, and prompts you to update when a newer one comes out. You can check manually with the “Check for Updates…” menu item. Total releases: 61, counted from the `2023.2` quarter. ## 2026.3 releases [Section titled “2026.3 releases”](#20263-releases) ### 2026.3.18 [Section titled “2026.3.18”](#2026318) **Added** * A bridge to external applications: passing and returning arrays, including multidimensional and byte arrays; addressing an already-running application, a file, and an object by name; a full error code table; an empty reference as an argument. * Real-time data: a refresh cycle and a source manager that keeps a pool of servers by name and hands out topic subscriptions. Works only on Windows: the source connects through the system’s own mechanism, and it isn’t installed at all in the macOS and Linux builds. There, the `RTD` formula returns `#N/A` — the same as on Windows with no source server running. * A long operation now announces itself to the person in the status bar. * Macros: the sheet type is now reported accurately, and named ranges are read both by number and by name. **Changed** * Grid sharpness no longer depends on zoom. * The “General” format is now limited to fifteen significant digits, as in Excel. **Fixed** * The protected view banner now pushes the ribbon down instead of covering the content. * Template workbooks now carry the declared style table. * Old workbooks are now read more tolerantly of damaged sections. ### 2026.3.17 [Section titled “2026.3.17”](#2026317) **Added** * Objects embedded in the workbook: parsing, extracting content, the packaged file’s original name, and returning attachment edits back into the workbook. **Fixed** * A duplicated object no longer disappears on save. * “Format Painter” and the sort dialog now respond to Escape. * The ribbon menu now hands off control to the “Format Cells” dialog. ### 2026.3.16 [Section titled “2026.3.16”](#2026316) **Added** * Parsing macro user forms: control labels and values, radio button groups, and the hierarchy of frames and multi-page controls. * Carrying formats over from the clipboard through the core. * Dynamic arrays: spill range boundaries are now closed. **Fixed** * Canvas gestures are now measured from the canvas, not from the window frame. * The first readable frame no longer passes itself off as the finished grid. * The “d-mmm” date format is back in the format list. ### 2026.3.15 [Section titled “2026.3.15”](#2026315) **Added** * The workbook now opens in two steps: the visible part first, then the rest. **Changed** * The workbook’s date system is honored during calculation, on open, and on save; sheet functions compute using the workbook’s own date system. * Macros: the formatting function was rewritten piece by piece — parentheses, fractional parts, the scaling comma. **Fixed** * Data validation rules in tables are now saved in the workbook. * The crash recovery dialog now belongs to its own document. ### 2026.3.14 [Section titled “2026.3.14”](#2026314) **Added** * Macros: selecting a subset of an array, building an array from values, and looping through an array element by element. * The computation core now ships as part of the same release in two builds: a regular one and a browser one. **Changed** * The string comparison mode declared in a module now affects comparisons. * Macros that Excel wouldn’t compile no longer run. **Fixed** * In lookup functions, a mode given by a cell reference no longer gets overridden. * An ascending search now compares text case-insensitively, as in Excel. * The Linux package no longer conflicts with SumDoc on the same machine. ### 2026.3.13 [Section titled “2026.3.13”](#2026313) **Added** * Macros: Excel’s enumerations are now wired up in full — over two thousand named constants. * Password-protecting a sheet, “interface-only” mode, and the list of allowed actions. * Navigating to an address with positional arguments. **Changed** * Sorting large amounts of text now computes faster. * Reading a boolean value no longer allocates a string on every access. **Fixed** * Comparing a string with a boolean value from a cell no longer produces a type error. ### 2026.3.12 [Section titled “2026.3.12”](#2026312) **Added** * Macros: class modules — declaring the type, public fields as members, creating an object; line numbers; external procedure declarations and events; the pattern-comparison operator; date and time functions. * Sheet functions are now available to macros from a shared list — 366 names. **Fixed** * The table filter is back to matching Excel’s behavior. * The formula builder opens again. * The canvas image is now stable when zooming. ### 2026.3.11 [Section titled “2026.3.11”](#2026311) **Added** * Macros: splitting and joining strings, extracting from the left, right, and middle, trimming spaces, finding a substring, replacing, and converting a number to text. * The message box now actually shows up. * Running a macro from the product now opens an execution session; a running macro can be stopped, rolled back, and queried for status. * Writing to a multi-area range now reaches every area. **Changed** * Scrolling large workbooks now reuses projections that are already built. **Fixed** * The threshold for switching to exponential number notation now matches Excel. * The square root of a negative number now gives the same error as Excel. * The used range now accounts for any formatted empty cell. ### 2026.3.10 [Section titled “2026.3.10”](#2026310) **Added** * The data analysis package: smoothing, rank and percentile, Fourier transform, random number generation, sampling. * Scenarios: loading and merging data that lives outside the sheet. * Macros: a preview shows what a macro will change in the workbook before it runs; a macro’s result can be committed to the file; a macro doesn’t reach beyond the workbook without a declared permission. **Fixed** * Saving a workbook to bytes no longer locks it out of a later save. * Sorting again now keeps the undo and redo order intact. ### 2026.3.9 [Section titled “2026.3.9”](#202639) **Added** * The build number next to the version number. ### 2026.3.8 [Section titled “2026.3.8”](#202638) **Added** * The portable Windows archive is back under a clear name. **Changed** * Release notes are now just a human summary in Russian. **Fixed** * The “Data Tools” and “Text to Columns” buttons are now available the same way as in Excel. * A malformed formula is now refused instead of accepted silently. * A failure while building the release notes no longer stops the release itself. ### 2026.3.7 [Section titled “2026.3.7”](#202637) **Added** * Advanced filter. * Removing duplicates and data validation moved into the core; the table’s total row and calculated columns now match Excel’s behavior. * Creating graphic objects in an open workbook. * The package signature is now verified on the target system before installation; the macOS package for centralized deployment is notarized on par with the disk image. **Fixed** * The advanced filter no longer turns on the autofilter arrows. * The filter popup now addresses its own column. * The filter range now covers the whole data area, not just one column. * “Reapply” stays available for as long as the filter is in effect. * The theme catalog now ships in the package and loads in the installed application. * Internal translation keys are no longer shown to the person. ### 2026.3.6 [Section titled “2026.3.6”](#202636) **Added** * Macros: sheet functions and match lookups now respond through a shared source; reading sheet properties through a typed variable. **Changed** * The version shown inside the application no longer carries a candidate tag. **Fixed** * “Clear Filter” stays active as long as the list has unchecked boxes. * One gesture in the value list now performs one action. * Interacting with pivot tables is back to matching Excel’s behavior. * The update installer now launches through the system’s own tools. * The “Formulas” tab: visual glitches and focus-transition bugs are fixed. ### 2026.3.5 [Section titled “2026.3.5”](#202635) **Added** * The “Check for Updates…” menu item now responds to the person. * Macros: inserting cells, rows, and columns with a shift. **Fixed** * The filter value list no longer closes after every checkbox and after toggling auto-apply. * The filter menu now has one shared chevron instead of three different ones. * The “About” dialog now names the system accurately. * The filter arrow in the header is now a thin chevron. ### 2026.3.4 [Section titled “2026.3.4”](#202634) **Added** * Automatic updates on Windows and Linux. * The update storage address is now set by a setting; on failure, the download retries, with loop protection and a minimum-version threshold. **Fixed** * Applying a filter no longer removes the arrows from other columns. * Auto-apply has moved next to the buttons and no longer looks like a filter value. * The advanced filter button no longer spills past its group’s boundary. ### 2026.3.3 [Section titled “2026.3.3”](#202633) **Added** * The sort dialog now matches Excel: headers, buttons, “oldest to newest” options for dates, and sorting left to right. * The product’s windows now have their own frame with real buttons, including maximize to full screen. **Changed** * The “Data” tab now matches the design. **Fixed** * Sorting left to right now actually reorders the columns. * The sort dialog now shows the column that’s selected in it, and offers the correct order options for dates. * The sort warning no longer appears on a column with formulas. * The alphabet letters on the sort icons are now translated. * A dragged window now stays on screen. * The “Filter” button now draws arrows in the headers. * Macros: an invalid font size is now refused as a value; combining ranges is now accepted; a multi-area selection now acts on every area. ### 2026.3.2 [Section titled “2026.3.2”](#202632) **Added** * Rolling back an update if the new version failed to start. **Fixed** * The application no longer writes inside its own package — that used to break the signature. ### 2026.3.1 [Section titled “2026.3.1”](#202631) **Changed** * The line’s first service update. ### 2026.3.0 [Section titled “2026.3.0”](#202630) The first release of the line. Below is what the product entered it with. **Added** * Opening and saving XLSX workbooks. * The computation core: dependency-based recalculation, and partial recalculation of only what changed. * The formula language: arithmetic, references, and ranges; sums, averages, counts, minimum and maximum; date and time; text functions — length, extraction, search, replace, concatenation, case; value type checking; powers, roots, rounding, logarithms, trigonometry; statistics; looking up values in a table. * Processing and aggregating data with a query. * Working with data: sorting, filtering, data validation, removing duplicates, text to columns, pivot tables. * The function library, the formula builder, and formula auditing. * Macros: a dedicated engine runs procedures, class modules, custom types, enumerations, conditional compilation, and jumps; the workbook, sheet, and range object model; sheet and workbook protection; the clipboard; named ranges; selecting whole rows and columns; deleting rows with a shift; the print area. * Automatic application updates on macOS. ## 2026.2 releases [Section titled “2026.2 releases”](#20262-releases) ### 2026.2.13 [Section titled “2026.2.13”](#2026213) **Changed** * The workbook is held in memory sparsely: empty areas of the sheet take up no space, and a file with hundreds of thousands of rows opens without unfolding the whole grid. **Fixed** * Scrolling to the far edge of the sheet no longer recalculates the whole sheet. ### 2026.2.12 [Section titled “2026.2.12”](#2026212) **Added** * Assessing a workbook’s compatibility before opening: which of the file’s features are fully supported, and which only partially. ### 2026.2.11 [Section titled “2026.2.11”](#2026211) **Changed** * Recalculation now touches only dependent cells, not the whole sheet. ### 2026.2.10 [Section titled “2026.2.10”](#2026210) **Added** * Sheet and workbook protection: locked cells now refuse an edit with a clear refusal. ## 2026.1 releases [Section titled “2026.1 releases”](#20261-releases) ### 2026.1.9 [Section titled “2026.1.9”](#202619) **Added** * Automation as a transaction: a sequence of operations applies as a whole, or not at all. ### 2026.1.8 [Section titled “2026.1.8”](#202618) **Added** * Parsing VBA macros and reporting which constructs are supported. ### 2026.1.7 [Section titled “2026.1.7”](#202617) **Changed** * External data connections never run without the host’s explicit permission. ### 2026.1.6 [Section titled “2026.1.6”](#202616) **Fixed** * Undo and redo for range operations now record as a single history entry, not per cell. ## 2025.4 releases [Section titled “2025.4 releases”](#20254-releases) ### 2025.4.8 [Section titled “2025.4.8”](#202548) **Added** * A WebAssembly build: the same formula computation in the browser, with no separate JavaScript engine. ### 2025.4.7 [Section titled “2025.4.7”](#202547) **Added** * Service mode: processing workbooks on the server, headless. ### 2025.4.6 [Section titled “2025.4.6”](#202546) **Changed** * The boundary between the host and the core is described by a single typed operations contract. ### 2025.4.5 [Section titled “2025.4.5”](#202545) **Added** * Data window: only the sheet’s visible part is returned to the host, not the whole workbook. ## 2025.3 releases [Section titled “2025.3 releases”](#20253-releases) ### 2025.3.7 [Section titled “2025.3.7”](#202537) **Added** * A persistent workbook session: the state lives between calls. ### 2025.3.6 [Section titled “2025.3.6”](#202536) **Added** * An undo-and-redo history on the core’s side, shared across every way of editing. ### 2025.3.5 [Section titled “2025.3.5”](#202535) **Changed** * A sheet is now addressed by a stable key, not a name: renaming a sheet no longer breaks references. ### 2025.3.4 [Section titled “2025.3.4”](#202534) **Fixed** * Saving a workbook no longer loses computed formula values for programs that read them without recalculating. ## 2025.2 releases [Section titled “2025.2 releases”](#20252-releases) ### 2025.2.6 [Section titled “2025.2.6”](#202526) **Added** * Pivot tables: building, refreshing, and saving. ### 2025.2.5 [Section titled “2025.2.5”](#202525) **Added** * Charts: reading from the workbook, displaying, and writing back. ### 2025.2.4 [Section titled “2025.2.4”](#202524) **Fixed** * A chart’s range now survives inserting and deleting rows. ### 2025.2.3 [Section titled “2025.2.3”](#202523) **Added** * Conditional formatting by value and by formula. ## 2025.1 releases [Section titled “2025.1 releases”](#20251-releases) ### 2025.1.5 [Section titled “2025.1.5”](#202515) **Added** * Sorting and filters by column, including filtering by color. ### 2025.1.4 [Section titled “2025.1.4”](#202514) **Added** * Named ranges and using them in formulas. ### 2025.1.3 [Section titled “2025.1.3”](#202513) **Changed** * Formula errors now return as an error code, not an empty value. ### 2025.1.2 [Section titled “2025.1.2”](#202512) **Fixed** * A reference to another sheet no longer breaks when a formula is copied. ## 2024.4 releases [Section titled “2024.4 releases”](#20244-releases) ### 2024.4.4 [Section titled “2024.4.4”](#202444) **Added** * Number formats: dates, percentages, currency, thousands separators. ### 2024.4.3 [Section titled “2024.4.3”](#202443) **Added** * Merging cells, wrapping text, and cell alignment. ### 2024.4.2 [Section titled “2024.4.2”](#202442) **Fixed** * Column width and row height are now saved exactly, not rounded. ### 2024.4.1 [Section titled “2024.4.1”](#202441) **Fixed** * Repeated spaces inside a cell no longer collapse. ## 2024.3 releases [Section titled “2024.3 releases”](#20243-releases) ### 2024.3.3 [Section titled “2024.3.3”](#202433) **Added** * Writing XLSX: the assembled workbook opens in third-party programs. ### 2024.3.2 [Section titled “2024.3.2”](#202432) **Changed** * Parts of the workbook the editor doesn’t understand are preserved unchanged and written back to the file. ### 2024.3.1 [Section titled “2024.3.1”](#202431) **Changed** * The workbook is written to a temporary file and replaces the original in a single action. ## 2024.2 releases [Section titled “2024.2 releases”](#20242-releases) ### 2024.2.3 [Section titled “2024.2.3”](#202423) **Added** * Cell editing: entering values, text, and formulas. ### 2024.2.2 [Section titled “2024.2.2”](#202422) **Added** * Selecting a range with the mouse and keyboard. ### 2024.2.1 [Section titled “2024.2.1”](#202421) **Fixed** * Entering a number with a comma is recognized based on the interface language. ## 2024.1 releases [Section titled “2024.1 releases”](#20241-releases) ### 2024.1.2 [Section titled “2024.1.2”](#202412) **Added** * Computing formulas with references to cells and ranges, and detecting circular references. ### 2024.1.1 [Section titled “2024.1.1”](#202411) **Added** * The first set of built-in functions: arithmetic, sums, conditionals. ## 2023.4 releases [Section titled “2023.4 releases”](#20234-releases) ### 2023.4.2 [Section titled “2023.4.2”](#202342) **Added** * Displaying the grid with row and column headers, scrolling through a large sheet. ### 2023.4.1 [Section titled “2023.4.1”](#202341) **Changed** * Cell values are stored with types: number, text, date, boolean, error. ## 2023.3 releases [Section titled “2023.3 releases”](#20233-releases) ### 2023.3.1 [Section titled “2023.3.1”](#202331) **Added** * Reading several sheets of one workbook and switching between them. ### 2023.3.0 [Section titled “2023.3.0”](#202330) **Added** * Displaying the workbook’s content while preserving the sheet structure. ## 2023.2 releases [Section titled “2023.2 releases”](#20232-releases) ### 2023.2.1 [Section titled “2023.2.1”](#202321) **Changed** * Parsing the workbook is now moved into the Rust core. ### 2023.2.0 [Section titled “2023.2.0”](#202320) **Added** * Reading XLSX: package parts, shared strings, cell values. ## Before switching to quarterly numbering [Section titled “Before switching to quarterly numbering”](#before-switching-to-quarterly-numbering) The earliest builds shipped under a different kind of number and went out as alpha — for demonstration, not for production use. There’s no separate changelog for them: back then, the product changed faster than versions were released. # Readiness checklist > What must be done before you consider the integration ready for a pilot. * [ ] The archive was downloaded from [dl.layers.md](https://dl.layers.md/sumoffice/sumsheet/release/latest/), not received by email or from a third-party mirror. * [ ] The checksum of the downloaded file matched the one in `SHA256SUMS` from the same folder of the release directory. * [ ] The application’s signature is verified — using your own system’s method, as shown in the [Verifying the signature](/sumsheet/install/#verifying-the-signature-and-notarization) section. * [ ] The `compute_contract_cli` processor is found inside the installed application and runs. * [ ] The workbook opens with the `open_workbook_subset` call. * [ ] `subsetId` and the sheet key are taken from the response, not built on your own side. * [ ] Three cells are changed with a single `apply_cell_edits` operation, not three in a row: otherwise a refusal partway through leaves the workbook half-changed. A batch of edits never crosses from sheet to sheet — a mixed batch is refused entirely with `unsupported-cross-sheet-edit`, and edits for different sheets go out as separate requests ([apply\_cell\_edits](/reference/sumsheet/cells/#apply_cell_edits)). * [ ] `read_cell_details` returned the expected value — in the [quick start](/sumsheet/quickstart/), that’s 42 in cell C1. * [ ] Undo and redo run on the core’s history, not your own stack on your side. * [ ] The saved file is created and reopened by a different process — that’s how you verify a finished workbook landed on disk, not a half-baked one. * [ ] Refusals are parsed from the `ok` and `code` fields, and the interface never shows success when the operation was refused. * [ ] Warnings from `warnings` are read, not discarded: the operation may have turned out differently than expected. At least two cases are checked — `backendUsed` matches the engine you asked for, and formula numbers are shown after recalculation, not taken from whatever Excel last saved ([what warnings look like](/sumsheet/session/)). * [ ] If the workbook pulls data from outside — over `https`, from Postgres, or from SQL Server — the host answers the core’s counter-requests: the core has no network of its own, and it will wait indefinitely without a response. Verified with a request that actually reaches outside, not just reading the workbook from disk. * [ ] For the browser and server, a separate broker process and a list of allowed file addresses are in place. ## Check workbooks before the pilot [Section titled “Check workbooks before the pilot”](#check-workbooks-before-the-pilot) Before the pilot, you can check your corpus of workbooks without installing anything: on the public [check page](https://view.sumoffice.com/check/) or with the bot in Slack and Telegram (\[\[var:check.bot.telegram]]). It accepts `.xlsx`, `.xlsm`, `.xlsb`, `.xls`, `.xltm`, `.xltx`, and `.xlam` up to 50 MB; no account is needed. The report shows functions (how many the engine knows, the unknown ones as a list), pivot tables, Power Query, external links, and a route for every macro: **Native** — the engine takes on running it itself; **Migration** — waiting for further work, blockers are named; **Excel bridge** — stays in Excel by design; **Preserve only** — not classified and stored byte for byte. In the contract this is the `VbaExecutionRoute` field — `native`, `excel-bridge`, `excel-bridge-legacy`, and `preserve-only`: “Migration” on the report is the `excel-bridge` route, “Excel bridge” is `excel-bridge-legacy` ([VBA types](/reference/sumsheet/types-vba/)). Nothing from the workbook is run: the service reads it three times — the package structure, the function map, and the VBA project — and deletes it no later than 24 hours afterwards. The same service can be installed on your side next to the web host — [what exists](/sumsheet/server/). ## If a checklist item doesn’t check out [Section titled “If a checklist item doesn’t check out”](#if-a-checklist-item-doesnt-check-out) * Open or save isn’t working — [diagnostics](/sumsheet/diagnostics/). * The response contents or refusal code are unclear — [How the API session works](/sumsheet/session/). * You need an operation that’s not in the example — the [Compute Contract reference](/reference/sumsheet/overview/). * It’s about Web or server — [SumSheet as a server-side processor](/sumsheet/server/) and [The core in the browser through WebAssembly](/sumsheet/wasm/). # Live example: a budget spreadsheet > A working SumSheet spreadsheet right on the documentation page: formulas, shares, and both totals recalculate for real. Below is the same spreadsheet component you get in the delivery, with an ordinary budget: line items, quantities, prices, formulas, and shares. When the demo environment is up, you can use it right here: change a quantity or a price, and the row sums, “Total”, and “Due” recalculate on their own. The workbook opens in your own sandbox: only you see your edits, they’re never saved anywhere, and the next visitor gets the original budget. The demo environment is down right now — the spreadsheet itself still works. Check back later, or write to us: we'll show it live, on your own workbooks. [SumSheet with a sample budget open](https://view.sumoffice.com/view/workbook/?entry=look) Full screen[open in a new tab ↗](https://view.sumoffice.com/view/workbook/?entry=look)A real workbook, not a snapshot: the core computes the formulas in the “Amount” and “Share” columns, not the page markup ## What exactly is running here [Section titled “What exactly is running here”](#what-exactly-is-running-here) The frame above isn’t a browser build. It’s set up the same way as shown in [Runtime environments](/sumsheet/environments/): the shell runs in the browser, and a separate core process on our side holds the workbook; a persistent connection sits between them. Every visitor gets their own process and their own copy of the workbook, so other people’s edits never reach you, and yours never reach anyone else. That’s also where a visible trait comes from: recalculation isn’t instant, like a spreadsheet embedded in the page, but comes with network latency. That’s the cost of the scheme, not a trait of the core — in the desktop app and in the browser build, the same recalculation happens locally. ## What’s worth trying [Section titled “What’s worth trying”](#whats-worth-trying) * Change a quantity in the “Qty” column — the row sum, the share, and both totals recalculate. * Change the discount in `B13` — only the “Due” row changes. * Select cell `D11` and look at the formula bar: it shows `SUM`, not a hardcoded number. ## How this example differs from a production embedding [Section titled “How this example differs from a production embedding”](#how-this-example-differs-from-a-production-embedding) | What | In this example | In your application | | ----------------------------- | -------------------------------------------------------------- | ------------------------------------------------------ | | Who the user is | A guest: one identity for every visitor | Your signed-in user | | Where the workbook comes from | The same demo file every time | Your file by ID | | Where the edits go | Nowhere: the sandbox lives until it idles out, then it’s wiped | Into your storage, through your own API | | Permissions | Not checked | You check them, including again while the session runs | ## Next [Section titled “Next”](#next) * Individual capabilities one at a time, each its own small project — [SumSheet examples](/sumsheet/examples/). * Where the core computes in each environment — [Runtime environments](/sumsheet/environments/). * What your side needs for embedding — [Integrating into an application](/sumsheet/integration/). # Diagnostics > Typical first-run problems and how to pin them down. If the first run isn’t working, find your case in the table: next to it are the cause and what to check. | Symptom | Cause | Action | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | The program stays silent on startup | The wrong path, or the file doesn’t run | Confirm the file is at the given path and runs manually | | The request went out, there’s no response, the process is alive | The core asked a counter-question and is waiting for an answer — this happens with operations that need the network | Read the line it sent: it has a `kind` field. Answer with a line carrying the same `id`. The core has no timeout of its own — the `deadlineMs` in its line is addressed to you — so it will wait indefinitely without an answer. Closing the input stream ends the wait with a refusal, not a hang ([how the conversation works](/sumsheet/session/)) | | Opening returned `ok=false` — for an unparseable address, `invalid-source-uri` | An error in the file address, format, or access permissions | Pass the full file address, from the root — in Node.js, `pathToFileURL` from the `node:url` module gives you that; read `code` and `message` from the response | | A stale revision — `apply-cell-edits-stale-revision` | A different request already changed the workbook | Request a fresh projection with the new revision number and deliberately retry the operation | | The operation goes to the wrong sheet — `unknown-sheet-key` | A visible name was passed instead of the sheet key | Use `activeSheet.path` from the response to `open` | | The saved file didn’t appear — `invalid-destination-uri` | An invalid destination address, or no write permission | Check the absolute URI and the folder | | `subsetId` not found — `unknown-subset-session` | The core process was restarted and lost its open subsets | Call open\_workbook\_subset again | | A formula shows a stale value — the `cached-formula-preview` warning | The workbook was just opened in a new process | This is the value saved in the file; to get a fresh one, trigger a recalculation. The core already told you this: check `warnings` in the response to open | ## What to attach to your request [Section titled “What to attach to your request”](#what-to-attach-to-your-request) * the SumSheet version and the platform; * the sha512 checksum of the installer file — the one checked during installation; * the operation name (`operation`) and the refusal code (`code`); * the smallest anonymized XLSX workbook that reproduces it; * one JSON request line and one JSON response line; * whether it reproduces after a new process. Send what you’ve gathered to — that’s enough to start triage without a follow-up email asking for what’s missing. The response contents on a refusal — on the [How the API session works](/sumsheet/session/) page. # Embedding kit: structure, events, menu > A DOM-free access model, structural projections of the workbook, click and selection events, context-menu contributions, and commands instead of direct writes. There’s no public embedding kit yet Structural projections of the workbook, and handling clicks, double-clicks, object selection, and context menus inside SumSheet already work, but they stay internal interfaces of the product. Below is a description of what the public embedding kit (Embedding API) should become, not what you can call today. The contract itself has already shipped as a separate version: the list of events, refusal codes, the editor’s settings, and the object that controls it are all declared and don’t change arbitrarily. What’s missing is the other half — what implements this contract and ships to you as a package. So you can write code against the names and types ahead of time, but you can’t run it yet. Here are those refusal codes — all ten, from that very package: | Code | When it arrives | | ----------------------------- | ----------------------------------------------------------------------------------- | | `transport-unavailable` | The runtime didn’t come up, or the startup handshake failed. | | `transport-crashed` | The core died mid-session. This is the end: you’ll have to create the editor again. | | `document-open-failed` | The bytes or the address couldn’t be read, or it isn’t a workbook. | | `document-format-unsupported` | A format outside the declared list, or a blocked load path. | | `save-failed` | Writing failed. The document stays open, with unsaved changes. | | `host-persistence-failed` | Your own save handler refused. | | `invalid-selection` | `setSelection` got an unknown sheet or an unparseable A1-style range. | | `no-document` | The operation requires an open document, and there isn’t one. | | `editor-destroyed` | Calling the editor after `destroy()`. | | `contract-error` | The core returned a refusal not covered by the rows above. | This is a closed list — unlike the operations contract’s own codes, which have no closed list at all. There are eight events in the same package, and they’re a closed list too. The pilot page links here for their contents, so here they are: | Event | When it arrives | | ---------------- | ------------------------------------------------------------------------------------------------ | | `ready` | The editor is created and ready to accept calls. There’s no workbook yet. | | `opened` | The workbook is open: from this moment there’s something to edit and something to save. | | `dirty` | Unsaved changes appeared — a signal for your save button. | | `change` | The workbook’s content changed. Fires on every edit, unlike `dirty`, which marks the transition. | | `selection` | The selection changed: a different sheet, a different cell, or a different range. | | `save-requested` | The user asked to save. Your side does the saving — the core only reports the request. | | `closed` | The workbook is closed; the editor is still alive. | | `error` | Something failed; the code is from the table above. | The difference between `dirty` and `change` is worth noting: the first says something unsaved appeared, the second says the workbook changed yet again. You light up the save button on the first, and recompute your own panels on the second. The embedding contract also declares fewer formats than the core can handle: five — XLSX, XLSB, XLS, ODS, and CSV. The other eight from the [format matrix](/reference/sumsheet/formats/) — XLSM, XLTX, XLTM, FODS, SpreadsheetML 2003, TSV, TXT, and HTML — aren’t part of it, and a workbook in one of those formats gets the `document-format-unsupported` refusal. The gap is most visible with XLSM: the core reads and plans macros, but the embedded editor won’t accept such a workbook yet. What is available now: [Compute Contract](/reference/sumsheet/overview/)—the contract has 208 operations for reading and changing the workbook, 206 of which are accepted by the core of the latest release. Do not use DOM selectors, internal `CustomEvent`s, or the global `__f1…` entry points: they are not the contract and change without notice. | Status | Item | What it means | | ---------------------- | ----------------------------------- | ----------------------------------------------------------------------------------- | | Exists now | The operations contract in the core | Reading structure, cells, and objects, typed change operations. | | Exists now | Handling actions in the surface | Hit-testing, clicks and menu invocation, selection, and internal semantic events. | | Needs to be formalized | The public embedding kit | Stable methods and events, adding your own menu items, permissions, and versioning. | ## What API embedding needs [Section titled “What API embedding needs”](#what-api-embedding-needs) * **Read** — find out the workbook’s contents, the selection, a cell, an object. * **Events** — respond to user actions. * **Commands** — safely change the workbook. * **Interface extension** — add your own commands and menu items. ## Not the document’s DOM, but structural projections and commands [Section titled “Not the document’s DOM, but structural projections and commands”](#not-the-documents-dom-but-structural-projections-and-commands) The proposed kit You can’t call what’s described below today: the names and types are declared, but there’s no package yet that implements them. The spreadsheet in SumSheet isn’t laid out on the page as an element tree. It’s drawn on a canvas, and only the visible part of the workbook is held in memory — so the cell or object you need may not exist in the markup at all, even while the user sees it. You need to reach the logical structure through a set of calls. | Item | What it gives you | Where the data comes from | | --------------- | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | | WorkbookSession | The workbook and session identifiers, the revision, an unsaved-changes flag, the active sheet, and the available formats. | The core session. | | WorkbookInfo | Sheets with stable identifiers, their names, visibility, and which sheet is active. | A projection from the core. | | Selection | The sheet, the selected range, the active cell, and the identifiers of the selected objects. | Hit-testing in the surface, plus identifiers from the core. | | CellDetails | The stored value, the displayed value, the formula, the type, the format, input validation, a comment, and a link. | The `read_cell_details` operation. | | RangeSnapshot | A bounded range: values, formulas, styles, and related data. | A request to the core with the range’s boundaries stated explicitly. | | ObjectInventory | Shapes, charts, images, controls, their anchoring, stacking order, and available actions. | An object inventory from the file. | | ContextTarget | What’s under the pointer: a cell, a table, a chart, a shape, a header. | Semantic hit-testing. | ### The main rule [Section titled “The main rule”](#the-main-rule) Never keep live references What you get is a projection — a snapshot of the state with a stable identifier and a revision number. Don’t keep a markup node or a mutable workbook object on your side and write into it directly: by the next action, both the markup and the state will have already changed. Before every action, the identifier, the revision, the permissions, and whether the operation is available are all checked again. This is the proposed naming for the public calls — these names don’t exist in the current contract. ```ts const session = await F1.open({ mount, documentId, bytes, mode: "edit" }); const workbook = await session.getWorkbookInfo(); const selection = await session.getSelection(); const cell = await session.getCellDetails(selection.activeCell); ``` ## How to get sheets, a range, a table, and a graphic object [Section titled “How to get sheets, a range, a table, and a graphic object”](#how-to-get-sheets-a-range-a-table-and-a-graphic-object) The proposed kit The projections below are the shape of the future kit. What the core hands over already today is stated at the end of the section. | Task | Proposed call | What comes back | | -------------------------------- | ------------------------------- | ---------------------------------------------------------------------------------------------- | | Get the sheets | `session.getWorkbookInfo()` | The list of sheets, with identifiers, names, visibility, and order. | | Read a cell | `session.getCellDetails(...)` | The stored and displayed value, the formula, the type, the style, and related data. | | Read a range | `session.getRangeSnapshot(...)` | The values, formulas, and styles of the requested range — without the whole workbook. | | Look up a table | `session.getTableAt(...)` | The table’s identifier, its range, columns, filters, totals, and available actions. | | Get the objects | `session.getObjects(...)` | An object inventory with identifiers, types, anchoring, stacking order, and a mutability flag. | | Look up the object under a point | `session.hitTest(...)` | What’s under the pointer: the object kind and its stable identifier. | Example: find a chart and rename it through a command ```ts const objects = await session.getObjects({ sheetId }); const chart = objects.find(x => x.type === "chart"); if (chart?.capabilities.rename) { await session.execute({ operation: "renameObject", objectId: chart.stableId, name: "Shipping plan", expectedRevision: session.revision }); } ``` ### What the core’s projection already hands over now [Section titled “What the core’s projection already hands over now”](#what-the-cores-projection-already-hands-over-now) Opening the workbook already returns the active sheet, the list of sheets, the visible area, a cell preview, table details, and an object inventory. For every object, you get a stable identifier, the sheet, the type, the name, anchoring, relationships with other parts, stacking order, visibility, locking, and the list of allowed changes. For an individual cell, there’s the `read_cell_details` operation. Limit There shouldn’t be a “return the whole workbook tree” request. It unfolds the entire workbook into memory — the very thing the sparse model lets you avoid — and along the way exposes parts the reader of this request wasn’t supposed to see. Reading needs to be addressed and bounded. ## Clicks, selection, and object actions [Section titled “Clicks, selection, and object actions”](#clicks-selection-and-object-actions) The proposed kit The names and types below are declared by the contract, but you can’t call them today: there’s no package yet that implements them. What’s available now — the [Compute Contract](/reference/sumsheet/overview/). | Event | When it arrives | Main fields | | --------------------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- | | `selectionChanged` | The selection changed, and it’s confirmed. | the new and previous selection, the source of the change, the revision. | | `cellActivated` | A single click or tap made the cell active. | the cell reference, the range, the modifier keys pressed, the source. | | `cellDoubleClicked` | A double-click on a cell — after determining exactly what was hit. | the cell reference, the edit intent, the modifier keys. | | `objectSelected` | A shape, chart, image, or control is selected. | the stable identifier, the object type, anchoring, available actions. | | `objectDoubleClicked` | A double-click on a graphic object. | the object itself, the default action, the modifier keys. | | `contextMenuOpening` | A right-click, or a long-press on a phone. | the object under the pointer, the selection, the built-in menu items, available actions. | | `workbookChanged` | The core applied the change. | the new revision, which operation, what changed, an unsaved-changes flag. | | `operationRefused` | The core refused — before anything changed. | the refusal code and text, the object, the current revision. | Subscribing to semantic events ```ts const unsubscribe = session.on("cellDoubleClicked", async event => { const details = await session.getCellDetails(event.cellRef); hostPanel.open({ documentId, cell: details }); }); session.on("objectSelected", event => { propertiesPanel.show(event.target); }); // When closing the integration: unsubscribe(); ``` ### The gesture handling sequence [Section titled “The gesture handling sequence”](#the-gesture-handling-sequence) pointer or touch → hit-testing → selection confirmation → semantic event → default action Why not browser events The canvas can be recreated between clicks, and two clicks can land on different markup nodes — by browser events, this looks like two separate clicks, not a double-click. So the surface itself determines a double-click on the same object, not you, from browser events. ## How to change the menu depending on the selected element [Section titled “How to change the menu depending on the selected element”](#how-to-change-the-menu-depending-on-the-selected-element) The proposed kit This section is about the future kit too. Today the editor’s menu can’t be extended with your own items. You don’t search the markup for an internal menu element and insert a button into it. Instead, you register a menu item provider: before showing the menu, SumSheet determines what’s under the pointer and asks you for additional items. | ContextTarget.kind | Example context data | | ------------------------ | -------------------------------------------------------------------------------- | | cell / range | sheetId, address, valueType, formula, validation, comment, hyperlink, protected. | | table | tableId, name, range, columnId, totals/filter state, mutation capabilities. | | chart | objectId, chartType, source range, anchor, editable capabilities. | | shape / image | objectId, anchor, zOrder, groupId, metadata, supported mutations. | | rowHeader / columnHeader | track index, hidden state, size, protection. | | `sheetTab` | sheetId, name, visibility, active/grouped state. | | canvas | sheetId, pointer coordinates, no semantic object. | Example menu contribution for a table row ```ts session.contextMenu.registerProvider(async context => { if (context.target.kind !== "table") return []; return [{ id: "partner.open-shipment-card", label: "Open shipment card", icon: "external-link", enabled: Boolean(context.target.rowKey), group: "partner", order: 20, run: () => host.openCard(context.target.rowKey) }]; }); ``` ### Rules for extending the menu [Section titled “Rules for extending the menu”](#rules-for-extending-the-menu) * An item has its own name with your prefix, a translatable label, an optional icon, a group, its order within the group, and a rule for when it’s enabled or visible. * The item provider gets a safe snapshot of the context, not the internal markup and not the whole workbook. * Built-in commands stay SumSheet’s own; you add your own items and, in the agreed spots, replace the ones that are allowed. * If your item provider takes too long to think, the wait cuts off: the menu must never hang because of your back end. ## Commands instead of writing directly into the structure [Section titled “Commands instead of writing directly into the structure”](#commands-instead-of-writing-directly-into-the-structure) The proposed kit This too describes what the kit should become. Today, workbook edits go through contract operations — [how the session works](/sumsheet/session/). Every operation that changes the document goes through the operations contract in the core. That’s how behavior stays the same in the browser, in the desktop app, and on the server, and how the change history stays consistent. | Step | What happens | | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | 1. Assemble the intent | The operation name, a stable reference to the object or range, the parameters, and the expected revision. | | 2. Check access | Read-only mode, sheet protection, declared capabilities, the source file’s format, and the session’s rules. | | 3. Pass it to the core | The same contract — through the browser build, the desktop processor, or the server service. | | 4. Apply it whole | On success, the revision and the history change; on refusal, the workbook stays untouched — there’s no such thing as half an edit. | | 5. Hand back the result | A new projection and a workbook-change event — or a refusal event. | Example of an edit with revision checking ```ts const result = await session.execute({ operation: "setCellValue", target: { sheetId, row: 12, col: 4 }, value: { kind: "string", value: "Delivered" }, expectedRevision: session.revision }); if (!result.ok && result.code.endsWith("-stale-revision")) { await session.refreshProjection(); } ``` ### The forbidden model [Section titled “The forbidden model”](#the-forbidden-model) ```js // DON'T: this bypasses Rust, the history, and saving. document.querySelector("[data-cell='E13']").textContent = "Delivered"; session.workbook.sheets[0].cells[12][4].value = "Delivered"; ``` Undo and redo Editing the workbook creates exactly one entry in the core’s shared history. You don’t need to build your own undo stack on your side: the two histories will drift apart, and undo will start restoring a state the user never saw. # Runtime environments and the end-to-end scenario > What changes between the desktop app, the browser, and the server, and what stays the same; the full "open bytes → edit → return XLSX" path. ## What changes between environments [Section titled “What changes between environments”](#what-changes-between-environments) The SumSheet core runs in four environments. Only how a command reaches it changes; what it means and what the core answers is the same everywhere. | Environment | Where the core runs | How the user controls it | | ----------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | | Browser | Inside the page (WebAssembly). | Click, double-click, context menu, keyboard, selection. | | Desktop app | A separate process on the computer. | The same actions as in the browser. | | Phone and tablet | The mobile core is a library next to the app window ([Phone and tablet](/sumsheet/mobile/)); the app needs its own lifecycle. | Tap, double tap, and long press turn into the same actions. | | Server and agents | A core process on the server, with no interface. | No clicks: requests and commands; command, session, and change events go out. | A workbook checking service also lives next to the server core: it reads the workbook without executing anything and reports what in it will work — [check workbooks before the pilot](/sumsheet/checklist/#check-workbooks-before-the-pilot). One difference doesn’t fit in the table: **the core never goes to the network in any of these environments**. It has no encrypted connection (TLS), and for an `https` request or a connection to Postgres and SQL Server it asks whoever is nearby to go — with a question back, to which it waits for an answer. Hence the difference. In the desktop app there’s someone nearby to answer, and such operations work. On the server they work if whoever holds the process serves these questions: on its own, the process won’t go to the network. In the browser and on the phone there’s no one to answer, so network operations there honestly refuse — [codes and the reason](/reference/sumsheet/pq-connectors/). For the same reason, and in the same two environments, macros don’t run: they’re executed by a part of the core that exists in the desktop and server processor and is absent from the browser build and the mobile core. Project inspection, plan, and preview work everywhere — that’s parsing, not running ([more](/reference/sumsheet/vba/)). ### The semantic contract is the same [Section titled “The semantic contract is the same”](#the-semantic-contract-is-the-same) Selection, the context menu target, the operation, the revision, the result, and the saved file are all described the same way, regardless of how the transport is built. On a phone, a long-press turns into the same context-menu-opening event. On the server, there’s no mouse click, but an agent requests the same cell details and runs the same operation — with the same permissions and the same refusals. ### Environment-specific limits [Section titled “Environment-specific limits”](#environment-specific-limits) * In the browser, you can’t hand over the structure of a large workbook whole: every request is limited to a range. * On a phone, the session must survive the app being evicted from memory — through a checkpoint and reopening, not through a reference to WebView memory that’s already gone by then. * On the server, you need isolation between clients, quotas, task cancellation, and an action log. The delivery doesn’t include a ready-made server platform. * An agent is only allowed a pre-agreed list of requests and commands. Credentials and the raw text of Power Query queries and macros never make it into the events. ## For developers: the end-to-end scenario [Section titled “For developers: the end-to-end scenario”](#for-developers-the-end-to-end-scenario) Next is the same “open bytes → read → edit → return XLSX” path in code, first for a separate process, then for the browser. If you’re not going to write code, you can close the page here: where exactly the core runs in each environment — [in the browser](/sumsheet/wasm/), [as a separate process](/sumsheet/native/), [on the server](/sumsheet/server/). ## Open, read, edit, save [Section titled “Open, read, edit, save”](#open-read-edit-save) The example below uses the same protocol the build is verified with. Row and column indexes are zero-based. The `viewport` field limits the area that goes into the response, and `sourceBytesBase64` lets you pass the workbook as bytes — then the core doesn’t need access to your file system. Part 1: open the document and get its structure ```ts import { spawn } from "node:child_process"; import { readFile } from "node:fs/promises"; import readline from "node:readline"; // The path to the processor inside the installed application is in the // F1_CLI environment variable; where it lives on each system is shown on // the "Installing SumSheet" page. const cli = spawn(process.env.F1_CLI, ["--session"], { stdio: ["pipe", "pipe", "inherit"] }); const lines = readline.createInterface({ input: cli.stdout }); const iterator = lines[Symbol.asyncIterator](); const next = async () => JSON.parse((await iterator.next()).value); const ask = async request => { cli.stdin.write(JSON.stringify(request) + "\n"); return next(); }; const hello = await next(); if (hello.kind !== "compute_contract_cli_session_ready") throw new Error("SumSheet core handshake failed"); const bytes = await readFile("./demo.xlsx"); const viewport = { top: 0, left: 0, rows: 40, cols: 12 }; const opened = await ask({ operation: "open_workbook_subset_from_bytes", sourceName: "demo.xlsx", sourceBytesBase64: bytes.toString("base64"), viewport, requestedBackend: "native-desktop" }); if (!opened.ok) throw new Error(opened.code); const { subsetId, activeSheet, objectInventory = [] } = opened.payload; console.log(activeSheet, objectInventory); ``` ## Targeted edit and returning XLSX bytes [Section titled “Targeted edit and returning XLSX bytes”](#targeted-edit-and-returning-xlsx-bytes) Once the workbook is open, the `subsetId` field names its live session in the core, and every following request carries this identifier. A change request passes `expectedRevision`: if the revision is stale, the core refuses before making the edit, rather than applying it halfway. Part 2: addressed reading, an atomic edit, and saving ```ts const cell = await ask({ operation: "read_cell_details", subsetId, row: 0, col: 0, viewport, requestedBackend: "native-desktop" }); const edited = await ask({ operation: "apply_cell_edits", subsetId, edits: [{ inputKind: "text", sheetKey: activeSheet.path, row: 1, col: 1, input: "Delivered" }], expectedRevision: 0, viewport, requestedBackend: "native-desktop" }); if (!edited.ok) throw new Error(`${edited.code}: ${edited.message ?? ""}`); const saved = await ask({ operation: "save_workbook_subset_to_bytes", subsetId, preserveCachedValues: true, requestedBackend: "native-desktop" }); const output = Buffer.from(saved.payload.bytesBase64, "base64"); // Close the core: while the spawned process is alive, the program won't exit, // and the processor will keep hanging around after it ends. cli.stdin.end(); cli.kill(); ``` ## The same contract in the browser [Section titled “The same contract in the browser”](#the-same-contract-in-the-browser) ### What a call to the core from the browser looks like [Section titled “What a call to the core from the browser looks like”](#what-a-call-to-the-core-from-the-browser-looks-like) The session in the browser: the page’s own code handles delivery, and the core keeps the document’s meaning. The `fastsheet_bridge_wasm.js` module, next to the WebAssembly build of the core, is a separate delivery artifact: it ships as engine packages (see [What is delivered](/platform/delivery/)) and isn’t part of the desktop installer. The processor paths from the installation page don’t apply here: those point to a native executable, while this is a browser module. ```ts import init, { WasmComputeSession } from "./fastsheet_bridge_wasm.js"; await init(); const core = new WasmComputeSession(Date.now(), 0x362cafe); const dispatch = request => JSON.parse(core.dispatch(JSON.stringify(request))); const opened = dispatch({ operation: "open_workbook_subset_from_bytes", sourceName: file.name, sourceBytesBase64: await fileToBase64(file), viewport: { top: 0, left: 0, rows: 40, cols: 12 }, requestedBackend: "wasm" }); ``` #### What else the browser session can do [Section titled “What else the browser session can do”](#what-else-the-browser-session-can-do) Besides `dispatch`, the session has three more methods, and the first one is almost always needed. | Method | What it returns | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `contract_version()` | The operations contract version, as a string. There’s no greeting line in the browser, so this is the only way to check compatibility. | | `memory_telemetry()` | A JSON string about memory: how much is used right now, the peak of the last call, and the all-time peak. Diagnostics, not a contract operation. | | `thread_pool_telemetry()` | A JSON string about worker threads — if the build is multithreaded and the browser granted them. | | `simd_telemetry()` | A JSON string about vector computation: whether the module is built with SIMD and whether it responds with the check value. It shows which variant of the core loaded. | This is exactly where it’s worth watching memory: it’s most tightly constrained in the browser, and `memory_telemetry` also shows the peak of the last call — that’s how you see which operation is expensive. ### What to do with the current web shell [Section titled “What to do with the current web shell”](#what-to-do-with-the-current-web-shell) Today the shell already sends the internal `fastsheet:surface-object-selected` event and handles click, double-click, and context-menu invocation itself. For a pilot, it’s worth hiding these behind one entry point. Subscribing directly, as shown below, is fine in an internal build — but don’t count on it as a long-term interface. **An internal event bridge — it still needs to be turned into a stable set of calls:** ```js // INTERNAL / UNSTABLE: an adapter inside the SumSheet delivery. surface.addEventListener("fastsheet:surface-object-selected", event => { hostEvents.emit("objectSelected", { target: normalizeObjectTarget(event.detail), revision: currentRevision() }); }); surface.addEventListener("dblclick", event => { const target = semanticHitTest(event.clientX, event.clientY); hostEvents.emit("doubleClicked", { target }); }); surface.addEventListener("contextmenu", event => { event.preventDefault(); const target = semanticHitTest(event.clientX, event.clientY); openComposedMenu(target, hostMenuProviders); }); ``` The boundary of responsibility On the host’s side, you subscribe to objectSelected, doubleClicked, and contextMenuOpening, and what arrives is a ContextTarget. The internal event name, the canvas’s design, and the hit-test implementation are known only to SumSheet’s own code. ## Next [Section titled “Next”](#next) * Exactly where the core runs in each environment — [The core in the browser](/sumsheet/wasm/), [a separate process](/sumsheet/native/), [on the server](/sumsheet/server/). * What’s locked in before integration — the [Checklist](/sumsheet/checklist/). # SumSheet examples > Twenty-three small projects: from a minimal sheet to a million rows, collaborative work, and links between workbooks. Every example is a small working application, open right on the page: what the sheet can do and how it behaves inside someone else’s interface. The core does not compute in them — a stand-in does — so the numbers in the cells mean nothing: watch the behaviour. A real core with real recalculation is in the [live example](/sumsheet/demo/). It’s worth going through them in order: the first ones answer “how much do I need to write to get a sheet”, then come individual capabilities, and at the end, edge cases like a million rows and running without a screen. * [![](/examples/sumsheet/en/minimal.png)Minimal sheethow many lines it takes to get a working sheet](/sumsheet/examples/minimal/) * [![](/examples/sumsheet/en/ribbon.png)Sheet with the ribbonhow to add our ribbon if you need it](/sumsheet/examples/ribbon/) * [![](/examples/sumsheet/en/embedded.png)Embedding into a third-party pagewhat happens to the host page around the sheet: its font, background and scrolling](/sumsheet/examples/embedded/) * [![](/examples/sumsheet/en/stress.png)A million rowsthe cost of three gestures on a workbook at the limit — scrolling, fill-dragging and zooming: p50 and p95 frame times and calls to the core as numbers, not promises](/sumsheet/examples/stress/) * [![](/examples/sumsheet/en/crosshair.png)Crosshairhighlighting the row and column of the active cell: off by default, enabled with a property](/sumsheet/examples/crosshair/) * [![](/examples/sumsheet/en/read-only.png)Read-onlythe workbook is visible but cannot be edited: commands are grayed out with a reason rather than hidden, and editing never starts at all](/sumsheet/examples/read-only/) * [![](/examples/sumsheet/en/custom-headers.png)Custom headersthe integrator sets the row and column labels, and the header strip width is computed from that text](/sumsheet/examples/custom-headers/) * [![](/examples/sumsheet/en/no-headings.png)Sheet without header stripsthe strips are hidden with a single property, and the sheet itself takes the freed space](/sumsheet/examples/no-headings/) * [![](/examples/sumsheet/en/custom-menu.png)Custom menu itema third-party item in our menu: below the divider, under its owner’s name and with its own command — it cannot pass itself off as ours](/sumsheet/examples/custom-menu/) * [![](/examples/sumsheet/en/custom-shortcut.png)Custom keyboard shortcutthe third-party shortcut fires, while the ones taken by the sheet (Ctrl+D, Ctrl+R, F2, Shift+Space) stay with the sheet — the refusal is visible in words](/sumsheet/examples/custom-shortcut/) * [![](/examples/sumsheet/en/custom-locale.png)Custom languagea language that is not among our three is brought by the page owner: labels are translated, and anything untranslated falls back along a chain instead of disappearing](/sumsheet/examples/custom-locale/) * [![](/examples/sumsheet/en/open-bytes.png)Drop a workbook herea third-party document is opened from bytes: the shell carries the file, parsing stays behind the contract seam, and a refusal comes in the words of whoever opened it — on the showcase this is a stub that takes csv, tsv and txt and honestly refuses xlsx](/sumsheet/examples/open-bytes/) * [![](/examples/sumsheet/en/presence.png)Two people in one documenttwo frames side by side: move the selection in one and the other shows the remote cursor with a name; the screen says plainly that only windows of this browser are visible](/sumsheet/examples/presence/) * [![](/examples/sumsheet/en/driver.png)Assistants drive the sheetup to ten external participants, each in its own process: walking its own column, selecting a region and writing in a total — as intents through the same channel; a refusal of anything beyond that is visible both to it and to the person; if they were not started, the page says so](/sumsheet/examples/driver/) * [![](/examples/sumsheet/en/custom-event.png)Custom eventtwo outward extension points: onCommand delivers any intent of the surface (ours and third-party), onGesture the cost of a finished gesture as numbers](/sumsheet/examples/custom-event/) * [![](/examples/sumsheet/en/hyperlink.png)Hyperlinka link is a cell property: one core operation sets it together with the text, removes it leaving the text, and lists the links of the sheet itself](/sumsheet/examples/hyperlink/) * [![](/examples/sumsheet/en/find-replace.png)Find and replacesearch is one request, replace is two, and the first does not change the workbook: the core computes a plan of edits, and the same path as typing writes them](/sumsheet/examples/find-replace/) * [![](/examples/sumsheet/en/annotations.png)Notessix comment actions through one contract operation — list, create, delete, reply, undo, redo; the core names the text, the number, and the normalized address](/sumsheet/examples/annotations/) * [![](/examples/sumsheet/en/outline.png)Sheet outlineeight actions — one operation: the shell names the range, axis and action, and the core computes the levels and what to hide](/sumsheet/examples/outline/) * [![](/examples/sumsheet/en/page-breaks.png)Page layoutwhere a page break falls — the only SDK method that asks and changes nothing; printing itself is done by the host, and that is a boundary, not a gap](/sumsheet/examples/page-breaks/) * [![](/examples/sumsheet/en/protected-ranges.png)Allow editing rangessix of the ten intents the operation has: the password goes behind the contract seam and never comes back — only the protection method comes back](/sumsheet/examples/protected-ranges/) * [![](/examples/sumsheet/en/workbook-links.png)Workbook linksa formula computes from another workbook: the list of links, their state and the source address come from the core, and the window owner opens the workbook](/sumsheet/examples/workbook-links/) * [![](/examples/sumsheet/en/headless.png)Headlessa workbook is opened, edited and read from Node — without a single call to the DOM](/sumsheet/examples/headless/) ## Next [Section titled “Next”](#next) * How the sheet works inside — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Notes > Six comment actions through one contract operation — list, create, delete, reply, undo, redo; the core names the text, the number, and the normalized address. ![six comment actions through one contract operation — list, create, delete, reply, undo, redo; the core names the text, the number, and the normalized address](/examples/sumsheet/en/annotations.png)[six comment actions through one contract operation — list, create, delete, reply, undo, redo; the core names the text, the number, and the normalized address](/examples/sumsheet/en/app/projects/annotations/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/annotations/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Crosshair > Highlighting the row and column of the active cell: off by default, enabled with a property. ![highlighting the row and column of the active cell: off by default, enabled with a property](/examples/sumsheet/en/crosshair.png)[highlighting the row and column of the active cell: off by default, enabled with a property](/examples/sumsheet/en/app/projects/crosshair/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/crosshair/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Custom event > Two outward extension points: onCommand delivers any intent of the surface (ours and third-party), onGesture the cost of a finished gesture as numbers. ![two outward extension points: onCommand delivers any intent of the surface (ours and third-party), onGesture the cost of a finished gesture as numbers](/examples/sumsheet/en/custom-event.png)[two outward extension points: onCommand delivers any intent of the surface (ours and third-party), onGesture the cost of a finished gesture as numbers](/examples/sumsheet/en/app/projects/custom-event/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/custom-event/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Custom headers > The integrator sets the row and column labels, and the header strip width is computed from that text. ![the integrator sets the row and column labels, and the header strip width is computed from that text](/examples/sumsheet/en/custom-headers.png)[the integrator sets the row and column labels, and the header strip width is computed from that text](/examples/sumsheet/en/app/projects/custom-headers/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/custom-headers/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Custom language > A language that is not among our three is brought by the page owner: labels are translated, and anything untranslated falls back along a chain instead of disappearing. ![a language that is not among our three is brought by the page owner: labels are translated, and anything untranslated falls back along a chain instead of disappearing](/examples/sumsheet/en/custom-locale.png)[a language that is not among our three is brought by the page owner: labels are translated, and anything untranslated falls back along a chain instead of disappearing](/examples/sumsheet/en/app/projects/custom-locale/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/custom-locale/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Custom menu item > A third-party item in our menu: below the divider, under its owner's name and with its own command — it cannot pass itself off as ours. ![a third-party item in our menu: below the divider, under its owner's name and with its own command — it cannot pass itself off as ours](/examples/sumsheet/en/custom-menu.png)[a third-party item in our menu: below the divider, under its owner's name and with its own command — it cannot pass itself off as ours](/examples/sumsheet/en/app/projects/custom-menu/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/custom-menu/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Custom keyboard shortcut > A third-party shortcut fires, while the ones taken by the sheet (Ctrl+D, Ctrl+R, F2, Shift+Space) stay with the sheet — the refusal is visible in words. ![the third-party shortcut fires, while the ones taken by the sheet (Ctrl+D, Ctrl+R, F2, Shift+Space) stay with the sheet — the refusal is visible in words](/examples/sumsheet/en/custom-shortcut.png)[the third-party shortcut fires, while the ones taken by the sheet (Ctrl+D, Ctrl+R, F2, Shift+Space) stay with the sheet — the refusal is visible in words](/examples/sumsheet/en/app/projects/custom-shortcut/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/custom-shortcut/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Assistants drive the sheet > Up to ten external participants, each in its own process: walking its own column, selecting a region and writing in a total — as intents through the same channel; a refusal of anything beyond that is visible both to it and to the person; if they were not started, the page says so. ![up to ten external participants, each in its own process: walking its own column, selecting a region and writing in a total — as intents through the same channel; a refusal of anything beyond that is visible both to it and to the person; if they were not started, the page says so](/examples/sumsheet/en/driver.png)[up to ten external participants, each in its own process: walking its own column, selecting a region and writing in a total — as intents through the same channel; a refusal of anything beyond that is visible both to it and to the person; if they were not started, the page says so](/examples/sumsheet/en/app/projects/driver/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/driver/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Embedding into a third-party page > What happens to the host page around the sheet: its font, background and scrolling. ![what happens to the host page around the sheet: its font, background and scrolling](/examples/sumsheet/en/embedded.png)[what happens to the host page around the sheet: its font, background and scrolling](/examples/sumsheet/en/app/projects/embedded/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/embedded/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Find and replace > Search is one request, replace is two, and the first does not change the workbook: the core computes a plan of edits, and the same path as typing writes them. ![search is one request, replace is two, and the first does not change the workbook: the core computes a plan of edits, and the same path as typing writes them](/examples/sumsheet/en/find-replace.png)[search is one request, replace is two, and the first does not change the workbook: the core computes a plan of edits, and the same path as typing writes them](/examples/sumsheet/en/app/projects/find-replace/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/find-replace/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Headless > The workbook is opened, edited and read from Node — without a single call to the DOM. There’s nothing to show — and that’s the point of the example It runs without a screen: the workbook is opened, edited, and read from Node, with not a single call to the page. What’s worth looking at here is the code, not a picture. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Hyperlink > A link is a cell property: one core operation sets it together with the text, removes it leaving the text, and lists the links of the sheet itself. ![a link is a cell property: one core operation sets it together with the text, removes it leaving the text, and lists the links of the sheet itself](/examples/sumsheet/en/hyperlink.png)[a link is a cell property: one core operation sets it together with the text, removes it leaving the text, and lists the links of the sheet itself](/examples/sumsheet/en/app/projects/hyperlink/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/hyperlink/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Minimal sheet > How many lines it takes to get a working sheet. ![how many lines it takes to get a working sheet](/examples/sumsheet/en/minimal.png)[how many lines it takes to get a working sheet](/examples/sumsheet/en/app/projects/minimal/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/minimal/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Sheet without header strips > The strips are hidden with a single property, and the sheet itself takes the freed space. ![the strips are hidden with a single property, and the sheet itself takes the freed space](/examples/sumsheet/en/no-headings.png)[the strips are hidden with a single property, and the sheet itself takes the freed space](/examples/sumsheet/en/app/projects/no-headings/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/no-headings/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Drop a workbook here > A third-party document is opened from bytes: the shell carries the file, parsing stays behind the contract seam, and a refusal comes in the words of whoever opened it — on the showcase this is a stub that takes csv, tsv and txt and honestly refuses xlsx. ![a third-party document is opened from bytes: the shell carries the file, parsing stays behind the contract seam, and a refusal comes in the words of whoever opened it — on the showcase this is a stub that takes csv, tsv and txt and honestly refuses xlsx](/examples/sumsheet/en/open-bytes.png)[a third-party document is opened from bytes: the shell carries the file, parsing stays behind the contract seam, and a refusal comes in the words of whoever opened it — on the showcase this is a stub that takes csv, tsv and txt and honestly refuses xlsx](/examples/sumsheet/en/app/projects/open-bytes/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/open-bytes/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Sheet outline > Eight actions — one operation: the shell names the range, axis and action, and the core computes the levels and what to hide. ![eight actions — one operation: the shell names the range, axis and action, and the core computes the levels and what to hide](/examples/sumsheet/en/outline.png)[eight actions — one operation: the shell names the range, axis and action, and the core computes the levels and what to hide](/examples/sumsheet/en/app/projects/outline/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/outline/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Page layout > Where a page break falls — the only SDK method that asks and changes nothing; printing itself is done by the host, and that is a boundary, not a gap. ![where a page break falls — the only SDK method that asks and changes nothing; printing itself is done by the host, and that is a boundary, not a gap](/examples/sumsheet/en/page-breaks.png)[where a page break falls — the only SDK method that asks and changes nothing; printing itself is done by the host, and that is a boundary, not a gap](/examples/sumsheet/en/app/projects/page-breaks/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/page-breaks/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Two people in one document > Two frames side by side: move the selection in one and the other shows the remote cursor with a name; the screen says plainly that only windows of this browser are visible. ![two frames side by side: move the selection in one and the other shows the remote cursor with a name; the screen says plainly that only windows of this browser are visible](/examples/sumsheet/en/presence.png)[two frames side by side: move the selection in one and the other shows the remote cursor with a name; the screen says plainly that only windows of this browser are visible](/examples/sumsheet/en/app/projects/presence/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/presence/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Allow editing ranges > Six of the ten intents the operation has: the password goes behind the contract seam and never comes back — only the protection method comes back. ![six of the ten intents the operation has: the password goes behind the contract seam and never comes back — only the protection method comes back](/examples/sumsheet/en/protected-ranges.png)[six of the ten intents the operation has: the password goes behind the contract seam and never comes back — only the protection method comes back](/examples/sumsheet/en/app/projects/protected-ranges/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/protected-ranges/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Read-only > The workbook is visible but cannot be edited: commands are grayed out with a reason rather than hidden, and editing never starts at all. ![the workbook is visible but cannot be edited: commands are grayed out with a reason rather than hidden, and editing never starts at all](/examples/sumsheet/en/read-only.png)[the workbook is visible but cannot be edited: commands are grayed out with a reason rather than hidden, and editing never starts at all](/examples/sumsheet/en/app/projects/read-only/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/read-only/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Sheet with the ribbon > How to add our ribbon if you need it. ![how to add our ribbon if you need it](/examples/sumsheet/en/ribbon.png)[how to add our ribbon if you need it](/examples/sumsheet/en/app/projects/ribbon/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/ribbon/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # A million rows > The cost of three gestures on a workbook at the limit — scrolling, fill-dragging and zooming: p50 and p95 frame times and calls to the core as numbers, not promises. ![the cost of three gestures on a workbook at the limit — scrolling, fill-dragging and zooming: p50 and p95 frame times and calls to the core as numbers, not promises](/examples/sumsheet/en/stress.png)[the cost of three gestures on a workbook at the limit — scrolling, fill-dragging and zooming: p50 and p95 frame times and calls to the core as numbers, not promises](/examples/sumsheet/en/app/projects/stress/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/stress/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Workbook links > A formula computes from another workbook: the list of links, their state and the source address come from the core, and the window owner opens the workbook. ![a formula computes from another workbook: the list of links, their state and the source address come from the core, and the window owner opens the workbook](/examples/sumsheet/en/workbook-links.png)[a formula computes from another workbook: the list of links, their state and the source address come from the core, and the window owner opens the workbook](/examples/sumsheet/en/app/projects/workbook-links/index.html) Full screen[open in a new tab ↗](/examples/sumsheet/en/app/projects/workbook-links/index.html)A working example. ## Next [Section titled “Next”](#next) * The rest of the examples — [SumSheet examples](/sumsheet/examples/). * What the sheet is built from — [Architecture](/sumsheet/architecture/). * What you can call today — the [Compute Contract reference](/reference/sumsheet/overview/). # Installing SumSheet > Exactly what gets installed, how to download the build, verify the checksum, the signature, and notarization, and where to find the processor. ## Exactly what gets installed [Section titled “Exactly what gets installed”](#exactly-what-gets-installed) SumSheet is a spreadsheet editor. Inside the installed application is the Rust processor compute\_contract\_cli. It accepts JSON requests, holds the open workbook in the current process’s memory, and returns JSON responses. | Item | Role | Boundary | | ---------------------- | ------------------------------------------------------------- | -------------------------------------------------------------- | | SumSheet.app | The spreadsheet editor’s user interface | A person opening and editing workbooks | | `compute_contract_cli` | The operations contract in the Rust core | Open, read, edit, history, computation, and save | | `subsetId` | The identifier of an open workbook session | Lives only inside a single command-line program process | | `sheetKey` | A stable sheet key | Taken from activeSheet.path; never substitute the sheet’s name | | `viewport` | The viewport: only the visible part of the sheet goes outward | The workbook never unfolds entirely into memory | | `result.xlsx` | The physical OOXML package | The result of save\_workbook\_subset | Architectural takeaway XLSX → open\_workbook\_subset → sparse workbook session → apply/read/history → save\_workbook\_subset → XLSX ### Strength [Section titled “Strength”](#strength) The same core serves both the desktop app and an external integration process. The shell never has to implement its own semantics for formulas, history, or saving. ### Limit [Section titled “Limit”](#limit) This is a process API, not an HTTP API. A browser can’t run a local binary directly. For a server or a web UI on top of it, you need a controlled service host; the scheme is on the [Integrating into an application](/sumsheet/integration/) page. Filenames in the examples are given without the build number In the release catalog, the filename carries a version number built as “year.quarter.patch.build”: `SumSheet-...-mac-arm64.zip`, and the same for the other systems. Take the exact number from the release catalog — in the commands below it’s replaced with an ellipsis or a substitution, so you can run them as is, without matching up digits. The installed version is visible in the application itself: the **SumSheet → About SumSheet** menu. The installation folder doesn’t depend on the version number, so the paths in the examples stay correct even after an update. ## Download SumSheet [Section titled “Download SumSheet”](#download-sumsheet) 1. **Open the release directory.** In the browser, open [dl.layers.md](https://dl.layers.md/sumoffice/sumsheet/release/latest/). The directory is laid out by system: the folders `macos/`, `windows/`, `linux/`, `webhost/` (the web host image archive with `INSTALL.md` — [the server path](/sumsheet/server/)) and `sdk/` (the mobile viewer kit for Android and iOS with checksums, once it is released under this brand — [Phone and tablet](/sumsheet/mobile/)); the root holds only `manifest.json` with the version number and release notes. 2. **Choose the package for your system.** * macOS In the `macos/` folder: a file like `SumSheet-…-mac-arm64.zip` for Apple Silicon computers and `SumSheet-…-mac-x64.zip` for Intel Macs. * Windows In the `windows/` folder: a file like `SumSheet-…-x64-setup.exe`, the regular installer for Intel and AMD machines. For ARM machines (Snapdragon, Surface) the same folder holds `SumSheet-…-arm64-setup.exe`: the native build runs faster than emulation. * Linux In the `linux/` folder: `SumSheet-….deb` for Debian and Ubuntu, `SumSheet-….rpm` for Fedora and RHEL, or `SumSheet-….AppImage`, which runs without installation. 3. **Download the checksum list.** The folder you took the package from also holds `SHA256SUMS` — sha256 sums of all its files. The `latest-*.yml` files next to it serve the application auto-update and are not needed for manual verification. ### The same thing in one command [Section titled “The same thing in one command”](#the-same-thing-in-one-command) * macOS ```bash mkdir -p ~/Downloads/f1-first-run cd ~/Downloads/f1-first-run base=https://dl.layers.md/sumoffice/sumsheet/release/latest/macos curl -fsSLO $base/SHA256SUMS # take the filename with the version number from the same list curl -fLO $base/$(awk '/mac-arm64.zip$/ {print $2; exit}' SHA256SUMS) ``` * Windows ```powershell mkdir $HOME\Downloads\f1-first-run -Force cd $HOME\\Downloads\\f1-first-run $base = "https://dl.layers.md/sumoffice/sumsheet/release/latest/windows" Invoke-WebRequest "$base/SHA256SUMS" -OutFile SHA256SUMS # take the filename with the version number from the same list $name = (Select-String -Path SHA256SUMS -Pattern 'x64-setup\.exe$').Line.Split(' ')[-1] Invoke-WebRequest "$base/$name" -OutFile $name ``` * Linux ```bash mkdir -p ~/Downloads/f1-first-run cd ~/Downloads/f1-first-run base=https://dl.layers.md/sumoffice/sumsheet/release/latest/linux curl -fsSLO $base/SHA256SUMS # take the filename with the version number from the same list curl -fLO $base/$(awk '/amd64.deb$/ {print $2; exit}' SHA256SUMS) ``` ### Checksum verification [Section titled “Checksum verification”](#checksum-verification) * macOS ```bash cd ~/Downloads/f1-first-run # SHA256SUMS was downloaded in the previous step from the macos/ folder shasum -a 256 -c SHA256SUMS --ignore-missing ``` Expect the line `SumSheet-…-mac-arm64.zip: OK`. * Windows ```powershell cd $HOME\Downloads\f1-first-run # SHA256SUMS was downloaded in the previous step from the windows/ folder $hash = (Get-FileHash .\SumSheet-*-setup.exe -Algorithm SHA256).Hash.ToLower() Select-String -Path SHA256SUMS -Pattern $hash ``` The line was found — the checksum matches. * Linux ```bash cd ~/Downloads/f1-first-run # SHA256SUMS was downloaded in the previous step from the linux/ folder sha256sum -c SHA256SUMS --ignore-missing ``` Expect the line `SumSheet-…-amd64.deb: OK`. Stop condition If the checksum differs, don’t run the package. Delete the downloaded file and download again from the release/latest catalog. ## Install and verify SumSheet [Section titled “Install and verify SumSheet”](#install-and-verify-sumsheet) ### Extraction [Section titled “Extraction”](#extraction) * macOS ```bash cd ~/Downloads/f1-first-run mkdir -p unpacked ditto -x -k SumSheet-*-mac-*.zip unpacked ditto unpacked/SumSheet.app ~/Applications/SumSheet.app ``` * Windows Run the downloaded `SumSheet-…-setup.exe` and go through the installer. Installation applies to the whole machine, so you’ll need administrator rights. The default folder is `C:\Program Files\SumSheet`; you can change it in the installer itself. * Linux ```bash cd ~/Downloads/f1-first-run # Debian, Ubuntu, and derivatives sudo apt install ./SumSheet-*.deb # Fedora, RHEL, and derivatives sudo dnf install ./SumSheet-*.rpm ``` The package installs to `/opt/SumSheet`. ### Verifying the signature and notarization [Section titled “Verifying the signature and notarization”](#verifying-the-signature-and-notarization) Verify the app, not the image It is the `SumSheet.app` application itself that is signed and notarized with Apple. The `.dmg` image it is distributed in carries a notarization ticket but has no code signature: `codesign` and `spctl` on the image file itself answer with a refusal. This is not a delivery defect — Gatekeeper checks the app on first launch and accepts it. Mount the image or unpack the `.zip` archive from the same directory and run the checks below on `SumSheet.app`. The certificate carries the legal entity’s name, not the product name: `Developer ID Application: HEALTH INFORMATIC SECURITY SYSTEM SL (K58GV7E7X4)`. That’s expected — check it against this team identifier. On Windows the signature is not yet production-grade. The installer is signed with the test certificate `FastOffice Test Signing (DEVELOPMENT ONLY)`, the system will show exactly that name, and the root of that certificate is not among the trusted ones — you will get an unknown-publisher warning. The timestamp is set by DigiCert, but it is not the signature issuer. Until a production certificate arrives, the only reliable check on Windows is the checksum from `SHA256SUMS` in the `windows/` folder. * macOS ```bash APP="$HOME/Applications/SumSheet.app" codesign --verify --deep --strict --verbose=2 "$APP" spctl -a -vv "$APP" ``` Expect a successful `codesign` check and the line `accepted` with `Notarized Developer ID` from `spctl`. * Windows ```powershell Get-AuthenticodeSignature "C:\Program Files\SumSheet\SumSheet.exe" | Format-List Status, SignerCertificate ``` Expect `Status: Valid`. A `NotSigned` value means the file didn’t come from the release catalog — don’t run such a package. * Linux The package manager checks package integrity during installation: `apt` and `dnf` will reject a package with corrupted content. No separate command is needed — the checksum check from the previous step is enough. Next to the `.deb` package and the `AppImage` in the `linux/` folder there is a detached signature — an `.asc` file — and the public key `fastoffices-signing-key.asc`; the `.rpm` package has no detached signature. The check is the same as for SumDoc: ```bash base=https://dl.layers.md/sumoffice/sumsheet/release/latest/linux curl -fsSLO $base/fastoffices-signing-key.asc gpg --import fastoffices-signing-key.asc curl -fsSLO $base/$(awk '/amd64.deb.asc$/ {print $2; exit}' SHA256SUMS) gpg --verify SumSheet-*-amd64.deb.asc SumSheet-*-amd64.deb ``` The key comes from the same server as the package and proves nothing on its own — verify the fingerprint you received from us through another channel. Expect a successful codesign check and the line accepted / Notarized Developer ID from spctl. ### First launch of the interface [Section titled “First launch of the interface”](#first-launch-of-the-interface) * macOS ```bash open ~/Applications/SumSheet.app ``` * Windows Launch SumSheet from the Start menu or the desktop shortcut — the installer creates both. * Linux ```bash /opt/SumSheet/f1 ``` Open any XLSX workbook and confirm the grid is visible. After that, you can close SumSheet: the next section uses the built-in Rust processor directly. ### Find the processor [Section titled “Find the processor”](#find-the-processor) * macOS ```bash F1_CLI="$HOME/Applications/SumSheet.app/Contents/Resources/runtime/native/compute_contract_cli" file "$F1_CLI" test -x "$F1_CLI" && echo "processor ready" ``` * Windows ```powershell $F1_CLI = "C:\Program Files\SumSheet\resources\runtime\native\compute_contract_cli.exe" Test-Path $F1_CLI ``` A `True` response means the processor is in place. * Linux ```bash F1_CLI="/opt/SumSheet/resources/runtime/native/compute_contract_cli" file "$F1_CLI" test -x "$F1_CLI" && echo "processor ready" ``` Verified locally The file is an arm64 Mach-O executable; the application’s signature is valid, and Gatekeeper accepts the application. ## What’s next [Section titled “What’s next”](#whats-next) The processor is installed — from here there are four paths: * **Confirm the API responds.** [Quick start](/sumsheet/quickstart/): open a workbook, write a value and a formula, save the result. * **Understand how the session works.** [How the API session works](/sumsheet/session/): transport, response contents, and handling refusals. * **See the calls broken down.** [Requests from the example](/sumsheet/requests/) — exactly what’s sent at each step. * **See finished code.** [Examples](/sumsheet/examples/) — twenty-three small projects, each shown in full. If something won’t start — [diagnostics](/sumsheet/diagnostics/). # Integrating into an application > How to embed SumSheet in your own application: boundaries, the call sequence, and the recommended setup. ## Desktop app [Section titled “Desktop app”](#desktop-app) The recommended option is a child process per window or a controlled group of workbooks. Keep stdin/stdout open, match one request to one response, and log `operation` and `code`, but not cell content. A caveat to “one response per request”: while you’re waiting for the response to an operation that touches the network, the core can send a counter-question — a line with a `kind` field. It has no TLS of its own, so it hands off `https` requests and connections to Postgres or SQL Server to you: you reach the network, and you answer with a line carrying the same `id`. The core sits idle until it gets that answer. Parse incoming lines by their `kind` field, and don’t treat every line as a response to your own request — otherwise the first Power Query request over `https` will end with both sides waiting on each other. ## Server [Section titled “Server”](#server) Wrap the command-line program in a service of your own. On a load request, create an isolated working folder, start the process with a memory and time limit, expose your own session token, and never show the client `subsetId` — it’s the internal name of an open workbook session, living only inside the core process. ## Browser [Section titled “Browser”](#browser) The browser can’t run `compute_contract_cli` directly: the core is an ordinary executable, and you can’t call it from a page. There’s one working scheme today: the shell runs in the browser, the core process runs on your side, and a persistent connection sits between them. That’s how the [live example](/sumsheet/demo/) is built — the workbook is opened by a separate process, and the page shows the sheet and passes along actions. This guide doesn’t promise a package you can install and call straight from the page: what that will include is described in the [embedding kit](/sumsheet/embedding-api/). ## Phone and tablet [Section titled “Phone and tablet”](#phone-and-tablet) On iOS and Android, use the server option or an adapter built for the platform itself. Don’t bundle the desktop processor into a mobile app and don’t run it as an arbitrary process: the phone’s sandboxing rules don’t allow it. ## Recommended shape for your API [Section titled “Recommended shape for your API”](#recommended-shape-for-your-api) ```plaintext POST /workbooks → your own session token POST /workbooks/{id}/commands → a typed response GET /workbooks/{id}/cells → a section of the sheet, not the whole sheet POST /workbooks/{id}/save → a file or a download link DELETE /workbooks/{id} → close the session and clean up ``` Security Allow only pre-defined folders and file types. Don’t pass a `destinationUri` that came from an external client straight into the command-line program: the destination address must be assembled on your side. ## More on this topic [Section titled “More on this topic”](#more-on-this-topic) * The full list of operations with their fields — the [Compute Contract reference](/reference/sumsheet/overview/). * What arrives in the response and how to read a refusal — [How the API session works](/sumsheet/session/). * Before the pilot — the [readiness checklist](/sumsheet/checklist/). # Responding to clicks and the context menu > How to handle a click on the sheet, selection, and your own context menu. The operations contract is responsible for the workbook’s meaning; your interface is responsible for pointer events. Keep these responsibilities separate: | Event or task | Who’s responsible | What to pass | | ------------------------- | ----------------- | --------------------------------------------------- | | Click and double-click | Your interface | The coordinate, what was hit, the current selection | | Context menu | Your interface | The object type and the commands allowed for it | | A cell’s value or formula | The core | `sheetKey`, `row`, `col`, `inputKind`, `input` | | Undo and redo | The core | `subsetId` and the direction | | Save | The core | `subsetId` and the destination address | ## What the interface passes along with a click [Section titled “What the interface passes along with a click”](#what-the-interface-passes-along-with-a-click) ```json { "subsetId": "subset-...", "sheetKey": "xl/worksheets/sheet1.xml", "selection": { "top": 0, "left": 0, "rows": 1, "cols": 1 }, "hit": { "kind": "cell", "row": 0, "col": 0 }, "pointer": { "kind": "double-click", "button": 0 } } ``` This is your own shape, not a request to the core. The `hit` and `pointer` fields don’t exist in the contract at all, and `selection` is there, but means something else: a string like `A1:B4`, not an object with area bounds. You can’t copy this block straight into a request — what goes to the core is the cell address and the value type. The interface uses an object like this to decide which menu to show. A command that changes the workbook then turns into a strictly typed request to the core. Don’t send the core markup nodes or chunks of HTML: it works with cell addresses and value types, not with what’s drawn on screen. What inputKind is A cell edit is described by the [`CellInputEdit`](/reference/sumsheet/types-cells/#cellinputedit) type. Along with the address (`sheetKey`, `row`, `col`), you pass `inputKind` — the input kind. It determines how the core interprets what’s passed, so the result depends on it. There are thirteen kinds in all. **A value in a cell.** `raw-user-input` is what a person typed into the formula bar: the core decides for itself whether it’s a number, a date, a boolean, or text (you can add `locale`). `text` and `number` are already-parsed values, no guessing. `formula` is a formula, for example `=B1*2`. `legacy-array-formula` is an array formula, which additionally needs `refRange`. `raw-user-input` has two behaviors none of the other kinds have, and both mirror Excel: * A string starting with `=` is parsed as a formula, and **an unparseable one is refused** — with the code `raw-input-invalid-formula`, without changing the cell. The one exception is exactly `=`: it’s stored as text. The `formula` kind has no such check at this step. * If the destination cell has a **text number format**, the whole string is stored as text. `=B1*2` in such a cell becomes a label, not a formula, and there’s no refusal. **Clearing.** `empty-string` — an empty string, `clear-to-blank` — clear the cell, `clear-formatting` — remove formatting while keeping the value. **Formatting.** `formatting` — fill and font color, number format, style, alignment, and other cell properties. **Fill and utility.** `drag-fill` and `fill-series` — drag-filling, `prepared-cell` — a whole ready-made cell, `sheet-protection` — a companion to a batch formatting operation. Each kind’s fields are in the type definition. # What happens from open to save > The workbook's full path through the layers, and the main point of the design: only a viewport goes outward, only filled cells sit in memory, and an edit either goes through whole or changes nothing. *The workbook’s path from file to saved file: seven steps, and at each one it’s clear who’s responsible for what happens — your application, the shell, or the core.* 1. **Your application opens a session.** It checks the user, picks the document, and passes the file, its identifier, the mode — view-only or editable — and the interface settings. 2. **The core opens the workbook.** The adapter passes it the file’s content. The core parses the format, starts a workbook session at revision zero, and returns the first projection — what needs to be shown. 3. **The shell draws the visible part.** It only gets the viewport that’s currently on screen, and information about it. A large workbook doesn’t have to turn entirely into page markup. 4. **The user performs an operation.** Editing a cell, sorting, inserting a shape, changing the format. The shell passes the intent and the expected revision number through the operations contract. 5. **The core checks and applies it.** It checks permissions, sheet protection, and whether the revision is stale. On success, the workbook and its history change together; on refusal, no half-operation is left behind. 6. **The shell and your application get the response and the event.** The shell updates the screen, and the application can log it to audit or change a status. Which request and session the response ties to is visible from the identifiers in it. 7. **Saving returns the finished file.** The core assembles the workbook back into a file. Your application takes its content, creates a version, and carries its own process through to the end — approval, signing, posting, whatever’s behind it on your side. ## The key execution model [Section titled “The key execution model”](#the-key-execution-model) The workbook never turns entirely into a screen. Between the file and what the user sees is a chain, and every link passes on less data than it received: **part of the workbook** → **sparse storage** → **viewport** → **editor shell** → **your application** * **Part of the workbook.** The core takes from the file the sheet and the range needed right now, not the whole workbook. * **Sparse storage.** Only filled cells are stored. A sheet with a million rows, of which two hundred are filled, takes up memory as two hundred cells. * **Viewport.** Only the rectangle currently on screen goes outward, and only the non-empty cells inside it. * **Editor shell.** Draws the rectangle it received and collects the user’s intent. It has no copy of the workbook of its own: it never computes formulas and never changes the file itself. * **Your application.** Gets events and operation outcomes — what changed, how the save turned out — not the workbook itself. It doesn’t need to know the internal structure of the XLSX file. That gives you three consequences worth knowing in advance. * **Workbook size isn’t capped by the browser.** A large file opens because a viewport goes into the page, not the document. * **An operation either goes through whole or changes nothing.** Success adds one entry to the history; a refusal never leaves the workbook half-changed, and undo stays consistent. * **Checking happens before the change.** A stale revision, an invalid request, or a policy block gives an explicit refusal, not a silent corruption of the workbook. ## Next [Section titled “Next”](#next) * For developers: what the conversation with the core looks like — [How the session API works](/sumsheet/session/). * What the core can do next to Excel — the [capability map](/sumsheet/atlas/). # Phone and tablet > Why a mobile editor isn't a shrunken desktop app, and how one core carries over to phone and tablet. The same operations work on a phone, but the path to the core is built differently. The ready-made SumSheet apps for iPhone, iPad, and Android are released, and a view kit for embedding is built from the same build. Below are four approaches at different levels of readiness: the right-hand column says what already exists for each one and what doesn’t yet. | Approach | Where the interface is | Where the core is | Readiness | | ----------------------- | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Mobile browser | A page in the phone’s browser. | WebAssembly in the browser or a background thread. | Technically possible; needs a separate touch-tailored interface. | | WebView inside the app | Your WebView window with the editor page. | The mobile Rust core next to the WebView: the page talks to it through a bridge — JNI on Android, a C interface on iOS. | This is how the ready-made SumSheet apps are built: for iPhone and iPad in the [App Store](https://apps.apple.com/app/id6807049725), for Android in [Google Play](https://play.google.com/store/apps/details?id=com.sumoffice.sumsheet), for macOS in the [Mac App Store](https://apps.apple.com/us/app/id6808759607). For embedding in your own app, a view kit (view-SDK) is built from the same build, under the same version number: the core library, the page, and the bridge ([where to get it](https://sumoffice.com/developers.html#mobile)). Android — `arm64-v8a` only, Android 8.1 and newer; iOS — 16 and newer, device and simulator. It needs neither a server nor a network. The WebAssembly-inside-WebView variant remains for a pilot with a limited set of scenarios. | | Native app screens | Your screens in Swift or Kotlin. | The Rust core as a library through a platform bridge. | On the core side, the bridge is written: a separate mobile core with a single door — a contract request as a JSON string, a response as a JSON string, and the session lives between calls. The same mechanism calculates as in the desktop app, so the phone doesn’t have a separate set of operations and won’t diverge from the desktop one. The core is exposed in two ways: a C interface for iOS and JNI for Android. The browser isn’t part of this line: a different bridge works there, unrelated to the mobile core ([The core in the browser](/sumsheet/wasm/)). The built library is verified on a real phone. What’s missing is the other part: Swift and Kotlin screens on top of the bare core. Today the developer kit ships the core together with the editor page and the bridge (the row above), not as a library for your own screens. | | Computing on the server | The mobile interface sends the intent. | The Rust core runs on the server. | The core on the server works already today ([The processor on the server](/sumsheet/server/)). What’s missing is a ready-made multi-tenant wrapper and a network session model. | ## Why this isn’t a shrunken desktop app [Section titled “Why this isn’t a shrunken desktop app”](#why-this-isnt-a-shrunken-desktop-app) * It needs touch selection, an on-screen keyboard, gestures, a compact ribbon, and dialogs that fit a narrow screen. * A phone has less memory, so for large workbooks you have to keep an even smaller part of the sheet in it. * The system can evict the app from memory while it’s in the background — taking the open workbook with it. That’s why checkpoints and session recovery are needed. * File access, the Share menu, offline storage, and permissions are all built differently on iOS and Android. Recommendation For a first mobile pilot, take a tablet or a WebView and one narrow scenario: open the workbook → find and change a range → save. Consider a full Excel-level mobile interface a separate product, not the next step from this one. ## What the mobile core actually exposes [Section titled “What the mobile core actually exposes”](#what-the-mobile-core-actually-exposes) The door is narrow — six calls on the C side: | Call | What it does | | ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | `fastsheet_mobile_host_open` | Starts a workbook session and returns a pointer to it. | | `fastsheet_mobile_host_execute_json` | The one working call: takes a contract request as a line and hands back a response as a line. Everything else is bookkeeping. | | `fastsheet_mobile_compute_contract_version` | The operations contract version. There’s no greeting line here like the processor has — this call is the only way to check compatibility. | | `fastsheet_mobile_last_error` | The last error’s text. In the C interface, the response and the refusal reason are separate: the call returned nothing — the reason is fetched from here. | | `fastsheet_mobile_buffer_free` | Free a string the core returned. | | `fastsheet_mobile_host_free` | Close the session. | On the Android side, the same actions come through JNI as four `FastSheetBridge` methods: create, ask version, run request, release. This is a state, not a contract The view kit (view-SDK) ships these calls already wrapped: a Kotlin and Swift bridge, the editor page, and the core library in one archive, with the same version number as the build in the store. The bare names above show what is built and working, but they are not a compatibility promise: it’s too early to build your own screens directly on them — first the profile is fixed, then the names. ## Other environments [Section titled “Other environments”](#other-environments) * [The core in the browser](/sumsheet/wasm/) * [A separate process alongside your application](/sumsheet/native/) * [The processor on the server](/sumsheet/server/) * [The end-to-end scenario and what changes between environments](/sumsheet/environments/) # A separate core process alongside your application > How this works today: your application, a child process, JSON-line exchange, and the Rust core. ## What the setup consists of [Section titled “What the setup consists of”](#what-the-setup-consists-of) The core runs as a separate process alongside your application, so the scheme has four participants: * **Your desktop application** — the window, file access, ties to the operating system, the editor’s web shell. * **The exchange channel** — a long-lived session: a JSON line with the request, a JSON line with the response. * **The `compute_contract_cli` processor** — the workbook session, computation, import, and export. * **Local or corporate storage** — the source file and the new version. ## The actual protocol today [Section titled “The actual protocol today”](#the-actual-protocol-today) The processor starts in session mode and sends a five-field handshake as its first line: | Field | What’s in it | | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `kind` | `compute_contract_cli_session_ready` — the handshake’s own marker: it’s how you tell it apart from an ordinary response. | | `transport` | `native-desktop-binary` — how the exchange happens: this is a separate process alongside the application, not a browser and not a server. | | `protocol` | `compute-contract-cli-session-v1` — the version of the conversation itself. This is what’s worth checking at startup: a mismatch means the processor is older or newer than your code. | | `computeContractVersion` | The operations contract version. | | `pid` | The process ID: useful for killing a hung one. | After that, it accepts one JSON command per line and answers each with one JSON line. The `requestId` field comes back in the response — that’s how you match the pair in your own logs. Not every line you send gets a response The processor silently skips an empty line — and a line of nothing but spaces: it will never get a response. A client that waits for exactly one line after every send will hang forever on a stray newline. Send the command and its newline as one chunk, and never send empty lines to try to “wake up” the processor. A line that fails to parse as contract JSON, on the other hand, does get a response: an error envelope with the `invalid-compute-request` code and the reason spelled out in the details. The session continues either way — the processor doesn’t close and waits for the next command. The processor answers strictly in order: responses arrive in the same order the requests were sent, so a long operation delays everything sent after it. There’s no point sending the next command before the previous one’s response arrives — it will just wait anyway. If you need parallelism, start a second process. There’s one exception to “a line in, a line back”, and it’s what trips people up most often. While you’re waiting for the response to an operation that needs the network, the processor can write you a counter-question — a line with a `kind` field and its own `id` — and stop until it gets a response with the same `id`. It has no network of its own: for `https` and for connecting to Postgres or SQL Server, it turns to you. It has no timeout of its own either, so you’re the one who has to watch the clock; closing the input stream ends the wait with a refusal, not a hang. Parse incoming lines by their `kind` field, and don’t treat every line as a response to your own request — [how the conversation works](/sumsheet/session/). Starting, ending, and restarting the process is on your side. | Strength | Cost / limit | | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | More memory available, and more predictable behavior with large workbooks. | You have to install, update, and monitor an executable. | | Direct access to local files and the corporate environment. | You need strict process isolation and checks on paths and permissions. | | The interface is the same as in the browser. | You’re responsible for restarting after a crash, timeouts, and cleaning up orphaned processes. | Good fit for Desktop applications, virtual desktops (VDI), large workbooks, and air-gapped environments where the memory available to a browser isn’t enough. ## Other environments [Section titled “Other environments”](#other-environments) * [The core in the browser](/sumsheet/wasm/) * [The processor on the server](/sumsheet/server/) * [Phone and tablet](/sumsheet/mobile/) * [The end-to-end scenario and what changes between environments](/sumsheet/environments/) # SumSheet — what it is > An embeddable, Excel-class spreadsheet processor: where the core lives, how the layers connect, and what the public interface is proposed to become. **SumSheet** is the spreadsheet part of the SumOffice platform: a spreadsheet engine with formulas, edit history, import and save, and with it a ready-made editor surface that you can replace with your own. It keeps only filled cells in memory, so large workbooks open without being expanded in full. Short answer SumSheet has two main parts: the editor shell shows the spreadsheet, and a single Rust core understands the workbook and runs the operations. Between them sits one operations contract. Your system wraps around SumSheet: it hands over the file and permissions, receives events, and saves the new version. * **Your product** — the document card, users, permissions, versions, audit, approval processes. * **The editor shell** — the ribbon, the grid, dialogs, the keyboard, displaying the result. * **The operation contract (Compute Contract)** — a single language of commands, results, errors, revisions, and events. * **The SumSheet core in Rust** — the workbook, formulas, operations, history, import and export, save. * **The execution adapter** — the core in the browser (WebAssembly) or a separate process on a computer or a server. ## How to read this document [Section titled “How to read this document”](#how-to-read-this-document) First — which parts SumSheet consists of and who is responsible for what: [Architecture](/sumsheet/architecture/). Then — the path of one operation from a click to a saved file: [Lifecycle](/sumsheet/lifecycle/). After that — where the core runs: in the browser, on a server, on a desktop computer, and on a phone ([Runtimes](/sumsheet/environments/)). At the end — [strengths and limitations](/sumsheet/tradeoffs/) and [the capability map next to Excel](/sumsheet/atlas/). See the code Twenty-three small projects — from a minimal sheet to a million rows — are collected in the [Examples](/sumsheet/examples/) section. Each is shown in full, file by file. Terms that come up across every section — workbook session, revision, viewport, explicit refusal — are collected in the [glossary](/start/glossary/). ## Six design principles [Section titled “Six design principles”](#six-design-principles) Six decisions that make SumSheet the way it is, and what each one gives you. | Principle | What it means for you | | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | One Rust core | Formulas, cells, history, and the meaning of the file are not duplicated in JavaScript. The workbook computes the same way in the desktop app, in the browser, and in the shell. | | One operations contract | The interface, automation, and application adapters go through one verifiable boundary. You get a stable set of calls instead of access to the internals. | | Computing by visible area | Not the whole workbook goes into memory, only the requested part. Large workbooks open and are edited without being expanded in full. | | A refusal instead of a silent error | A stale revision, an invalid request, and a rule-based denial give an explicit refusal — before anything changes. The workbook is not corrupted unnoticed. | | An atomic history | An operation creates one record in the shared history — or does not change the workbook at all. Undo, redo, and the log stay consistent. | | Ownership stays with you | Sign-in, storage, the metrics sink, network rules, and the brand are yours. Data does not leave your perimeter. | ### The future public interface [Section titled “The future public interface”](#the-future-public-interface) A facade being designed The methods below do not exist in SumSheet today — this is what the public set of calls should look like when it arrives. For now you work with the core through the [Compute Contract](/reference/sumsheet/overview/): the contract has 208 operations, of which 206 are accepted by the core of the latest release — the same session lifecycle and the same refusal model. For developers — seven methods, from creating the engine to closing the workbook. | Method | What it returns | What it guarantees | | --------------------------- | ----------------------------------- | ------------------------------------------------------------------------------- | | `F1.create(...)` | A ready engine | Choosing the runtime, checking clearance, and agreeing on the contract version. | | `engine.open(...)` | A workbook session | Its own identifier, declared capabilities, and the starting revision. | | `document.getSnapshot(...)` | A projection of the requested range | The workbook is never unfolded entirely into memory without your knowledge. | | `document.execute(...)` | The operation’s result | Either full success, or an explicit refusal with a reason. | | `document.subscribe(...)` | A subscription | Session events arrive in a defined order. | | `document.save(...)` | The save result | The format and the right to save itself are both declared explicitly. | | `document.close()` | Nothing | A repeated call is safe, and resources are released exactly once. | # Quick start: your first project > Prepare a folder, add a workbook and a script, run the example, and see the result. What you need before you start The commands below run in the prepared `~/Desktop/SumSheet-API-First-Run` folder. It comes, together with the `f1-api-first-run.mjs` script and the `input.xlsx` workbook, from the **Evaluation Kit** — a separate delivery artifact (see [What is delivered](/platform/delivery/)). It is not part of the SumSheet installer and cannot be downloaded from [dl.layers.md](https://dl.layers.md/sumoffice/sumsheet/release/latest/): request it from the vendor. **If you don’t have the Evaluation Kit yet**, an installed SumSheet is enough to follow the same path: the `compute_contract_cli` processor lives inside the application (see [Installing SumSheet](/sumsheet/install/)), the script’s full text is on the [Verified script](/sumsheet/reference-script/) page, and you can rename any workbook of yours to `input.xlsx`. ## Prepare your first project [Section titled “Prepare your first project”](#prepare-your-first-project) You’ll need Node.js version 22 LTS or newer and any XLSX workbook. The ready-made kit on the desktop already has input.xlsx and the verified f1-api-first-run.mjs. ### Create a folder [Section titled “Create a folder”](#create-a-folder) * macOS ```bash mkdir -p ~/Desktop/SumSheet-API-First-Run cd ~/Desktop/SumSheet-API-First-Run ``` * Windows ```powershell mkdir $HOME\Desktop\SumSheet-API-First-Run -Force cd $HOME\Desktop\SumSheet-API-First-Run ``` * Linux ```bash mkdir -p ~/Desktop/SumSheet-API-First-Run cd ~/Desktop/SumSheet-API-First-Run ``` ### Add the source workbook [Section titled “Add the source workbook”](#add-the-source-workbook) Copy an existing workbook and name it input.xlsx. The script doesn’t change the source file: it writes a new result.xlsx. * macOS ```bash cp ~/Downloads/workbook.xlsx ./input.xlsx ls -lh input.xlsx ``` * Windows ```powershell Copy-Item $HOME\Downloads\workbook.xlsx .\input.xlsx Get-Item .\input.xlsx | Format-List Name, Length ``` * Linux ```bash cp ~/Downloads/workbook.xlsx ./input.xlsx ls -lh input.xlsx ``` ### Add the script [Section titled “Add the script”](#add-the-script) Use the `f1-api-first-run.mjs` file from the Evaluation Kit. The full text is on the [Verified script](/sumsheet/reference-script/) page. Coordinates The `row` and `col` fields in the operations contract are zero-based: A1 = row 0, col 0; B1 = row 0, col 1; C1 = row 0, col 2. ## Run the example [Section titled “Run the example”](#run-the-example) * macOS ```bash cd ~/Desktop/SumSheet-API-First-Run node ./f1-api-first-run.mjs ``` * Windows ```powershell cd $HOME\Desktop\SumSheet-API-First-Run node .\f1-api-first-run.mjs ``` * Linux ```bash cd ~/Desktop/SumSheet-API-First-Run node ./f1-api-first-run.mjs ``` The script performs seven steps: * starts compute\_contract\_cli –session and gets the handshake; * opens input.xlsx through open\_workbook\_subset; * gets subsetId and sheetKey from Rust’s response; * writes A1 = SumSheet API, B1 = 21, C1 = the formula =B1\*2; * reads C1 and gets displayValue 42; * performs Undo and Redo through the central history; * saves result.xlsx, starts a new process, and checks C1 after a cold open. ### Expected output [Section titled “Expected output”](#expected-output) ```plaintext 1. Session: compute_contract_cli_session_ready 2. Workbook opened: Data subset-... 3. Changes applied, revision: 1 4. C1 after the formula: ... displayValue: '42' ... 5. Undo/Redo: done 6. Saved: .../result.xlsx 7. Reopened, C1: ... displayValue: '42' ... ``` ### See the result [Section titled “See the result”](#see-the-result) * macOS ```bash open -a ~/Applications/SumSheet.app ~/Desktop/SumSheet-API-First-Run/result.xlsx ``` * Windows ```powershell & "C:\Program Files\SumSheet\SumSheet.exe" "$HOME\Desktop\SumSheet-API-First-Run\result.xlsx" ``` * Linux ```bash /opt/SumSheet/f1 ~/Desktop/SumSheet-API-First-Run/result.xlsx ``` Actual verification result In a verified run, the C1 formula returned 42; after undo, redo, save, and starting a new process, the value stayed the same. ## What’s next [Section titled “What’s next”](#whats-next) * Understand how the session lives and what arrives in the response — [How the API session works](/sumsheet/session/). * Work through every call in the example — [Requests used in the example](/sumsheet/requests/). * Get the whole script — [Verified script](/sumsheet/reference-script/). * Every operation with its fields — the [Compute Contract reference](/reference/sumsheet/overview/). * Something won’t start — [Diagnostics](/sumsheet/diagnostics/). # Verified script > The full verified first-run script, and the configuration it's confirmed on. ## The full verified script [Section titled “The full verified script”](#the-full-verified-script) The `f1-api-first-run.mjs` file is part of the Evaluation Kit, but you can just copy it from here: the script finds the processor itself, based on the system it’s running on. If the application is installed in a non-standard folder, set the path with the `F1_CLI` environment variable. ```js #!/usr/bin/env node import { spawn } from "node:child_process"; import { createInterface } from "node:readline"; import { fileURLToPath, pathToFileURL } from "node:url"; import path from "node:path"; // Path to the processor: can be set with the F1_CLI environment variable, // otherwise it uses the current system's standard installation folder. const installed = { darwin: `${process.env.HOME}/Applications/SumSheet.app/Contents/Resources/runtime/native/compute_contract_cli`, win32: "C:\\Program Files\\SumSheet\\resources\\runtime\\native\\compute_contract_cli.exe", linux: "/opt/SumSheet/resources/runtime/native/compute_contract_cli", }; const binary = process.env.F1_CLI ?? installed[process.platform]; if (!binary) throw new Error(`unknown system: ${process.platform}`); const workDir = path.resolve(process.argv[2] ?? path.dirname(fileURLToPath(import.meta.url))); const source = path.join(workDir, "input.xlsx"); const destination = path.join(workDir, "result.xlsx"); const viewport = { top: 0, left: 0, rows: 20, cols: 12 }; const child = spawn(binary, ["--session"], { stdio: ["pipe", "pipe", "inherit"], }); const lines = createInterface({ input: child.stdout }); const queue = []; let pending; lines.on("line", (line) => { const value = JSON.parse(line); if (pending) { const resolve = pending; pending = undefined; resolve(value); } else { queue.push(value); } }); function nextLine() { if (queue.length) return Promise.resolve(queue.shift()); return new Promise((resolve) => { pending = resolve; }); } async function send(request) { child.stdin.write(`${JSON.stringify(request)}\n`); const response = await nextLine(); if (!response.ok) { throw new Error(`${request.operation}: ${JSON.stringify(response)}`); } return response.payload; } function edit(sheetKey, row, col, inputKind, input) { return { sheetKey, row, col, inputKind, input }; } try { const handshake = await nextLine(); console.log("1. Session:", handshake.kind); const opened = await send({ operation: "open_workbook_subset", sourceUri: pathToFileURL(source).href, viewport, requestedBackend: "native-desktop", }); const subsetId = opened.subsetId; const sheetKey = opened.activeSheet.path; console.log("2. Workbook opened:", opened.activeSheet.name, subsetId); const applied = await send({ operation: "apply_cell_edits", subsetId, edits: [ edit(sheetKey, 0, 0, "text", "SumSheet API"), edit(sheetKey, 0, 1, "number", "21"), edit(sheetKey, 0, 2, "formula", "=B1*2"), ], expectedRevision: 0, viewport, requestedBackend: "native-desktop", }); console.log("3. Changes applied, revision:", applied.workbookHistory?.revision); const cell = await send({ operation: "read_cell_details", subsetId, row: 0, col: 2, viewport, requestedBackend: "native-desktop", }); console.log("4. C1 after the formula:", cell.cell?.displayValue); await send({ operation: "replay_workbook_history", subsetId, direction: "undo", viewport, requestedBackend: "native-desktop", }); await send({ operation: "replay_workbook_history", subsetId, direction: "redo", viewport, requestedBackend: "native-desktop", }); console.log("5. Undo/Redo: done"); await send({ operation: "save_workbook_subset", subsetId, destinationUri: pathToFileURL(destination).href, preserveCachedValues: true, requestedBackend: "native-desktop", }); console.log("6. Saved:", destination); child.stdin.end(); await new Promise((resolve) => child.once("exit", resolve)); const verify = spawn(binary, ["--session"], { stdio: ["pipe", "pipe", "inherit"] }); const verifyLines = createInterface({ input: verify.stdout }); const iterator = verifyLines[Symbol.asyncIterator](); await iterator.next(); verify.stdin.write(`${JSON.stringify({ operation: "open_workbook_subset", sourceUri: pathToFileURL(destination).href, viewport, requestedBackend: "native-desktop", })}\n`); const reopened = JSON.parse((await iterator.next()).value); if (!reopened.ok) throw new Error(`cold reopen: ${JSON.stringify(reopened)}`); const reopenedSubsetId = reopened.payload.subsetId; verify.stdin.write(`${JSON.stringify({ operation: "read_cell_details", subsetId: reopenedSubsetId, row: 0, col: 2, viewport, requestedBackend: "native-desktop", })}\n`); const verified = JSON.parse((await iterator.next()).value); if (!verified.ok) throw new Error(`verify cell: ${JSON.stringify(verified)}`); console.log("7. Reopened, C1:", verified.payload.cell?.displayValue); verify.stdin.end(); verify.kill(); } catch (error) { child.kill(); console.error(error); process.exitCode = 1; } ``` ## The configuration it’s verified on [Section titled “The configuration it’s verified on”](#the-configuration-its-verified-on) | Parameter | Value | | ----------------- | ------------------------------------------------------------------------------- | | Release catalog | [dl.layers.md](https://dl.layers.md/sumoffice/sumsheet/release/latest/) | | Package | The macOS archive for Apple Silicon | | Package integrity | Verified against `SHA256SUMS` from the `macos/` folder of the release directory | | Installation | `~/Applications/SumSheet.app` | | Processor | `Contents/Resources/runtime/native/compute_contract_cli` inside the package | | Transport | JSON lines over stdin and stdout, `--session` mode | | Verified result | C1 = 42 after editing, undo, redo, saving, and reopening in a new process | Scope The scenario applies only to SumSheet and its built-in spreadsheet processor. For DOCX documents there’s a separate path — the [SumDoc quick start](/sumdoc/quickstart/). # Requests used in the example > Opening a workbook, writing text, a number, and a formula, recalculating, and saving — a breakdown of each call. This breaks down the calls from SumSheet’s first run — the same `f1-api-first-run.mjs` script the [quick start](/sumsheet/quickstart/) uses to open a workbook, edit three cells, and save the result. The whole script is on the [Verified script](/sumsheet/reference-script/) page; below is each of its requests, one at a time. Every request after open goes to the same process `subsetId` lives in the running core’s memory, not in the file. If you send the next request to a new process, you’ll get the `unknown-subset-session` refusal: “open and edit must run in the same process, no changes were made”. So you start the core once and keep talking to it while the workbook is open — how that conversation works is described in the [API session](/sumsheet/session/). ## Open the workbook [Section titled “Open the workbook”](#open-the-workbook) ```json { "operation": "open_workbook_subset", "sourceUri": "file:///absolute/path/input.xlsx", "viewport": { "top": 0, "left": 0, "rows": 20, "cols": 12 }, "requestedBackend": "native-desktop" } ``` You take `payload.subsetId` and `payload.activeSheet.path` from the response. `requestedBackend` here is a request, not a requirement. There are three values: `native-desktop`, `wasm`, and `service-host`. If you ask for something other than what’s actually running, there’s no refusal: the core computes with what it has and says so honestly — with the `requested-backend-unavailable` warning, and the response carries `backendUsed` and `fallbackUsed`. So an example carried over from the desktop app to the browser won’t break, but it also won’t actually compute on the engine it names — [what else arrives in every response](/sumsheet/session/). ## Write text, a number, and a formula [Section titled “Write text, a number, and a formula”](#write-text-a-number-and-a-formula) ```json { "operation": "apply_cell_edits", "subsetId": "subset-...", "edits": [ { "sheetKey": "xl/worksheets/sheet1.xml", "row": 0, "col": 0, "inputKind": "text", "input": "SumSheet API" }, { "sheetKey": "xl/worksheets/sheet1.xml", "row": 0, "col": 1, "inputKind": "number", "input": "21" }, { "sheetKey": "xl/worksheets/sheet1.xml", "row": 0, "col": 2, "inputKind": "formula", "input": "=B1*2" } ], "expectedRevision": 0, "viewport": { "top": 0, "left": 0, "rows": 20, "cols": 12 }, "requestedBackend": "native-desktop" } ``` The three edits are sent atomically and create one history entry. ## Read the cell [Section titled “Read the cell”](#read-the-cell) ```json { "operation": "read_cell_details", "subsetId": "subset-...", "row": 0, "col": 2, "viewport": { "top": 0, "left": 0, "rows": 20, "cols": 12 }, "requestedBackend": "native-desktop" } ``` The value you want is in `payload.cell.displayValue`, and the formula’s original text is in `payload.cell.editText`. ## Undo and redo [Section titled “Undo and redo”](#undo-and-redo) ```json { "operation": "replay_workbook_history", "subsetId": "subset-...", "direction": "undo", "viewport": { "top": 0, "left": 0, "rows": 20, "cols": 12 }, "requestedBackend": "native-desktop" } ``` For redo, send the same request with `direction: "redo"`. ## Save [Section titled “Save”](#save) ```json { "operation": "save_workbook_subset", "subsetId": "subset-...", "destinationUri": "file:///absolute/path/result.xlsx", "preserveCachedValues": true, "requestedBackend": "native-desktop" } ``` Don’t assemble the URI by hand In Node.js, use `pathToFileURL(path).href`. It correctly encodes spaces and non-ASCII characters. `preserveCachedValues` decides the fate of the numbers formulas show in the file. The field is required — it has no default. | Value | What ends up in the file | The warning in the response | | ------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | | `true` | The formulas themselves and the numbers they show: both what came from the original workbook and what the current session recalculated. | `cached-formula-values-preserved`, if a recalculation is needed somewhere else | | `false` | Only the formulas themselves. The numbers are cleared for every formula in the workbook. | `cached-formula-values-omitted` | `false` leaves the file empty for anything that can’t compute Cleared numbers don’t come back on their own when the file opens: only a recalculation restores them. Excel will recalculate, but a plain viewer or a library parse will show empty cells wherever there’s a formula. Set `false` only when you’re certain the file will be opened by a program that computes — [what the response warns about](/sumsheet/session/). How the file is published `save_workbook_subset` doesn’t write over the existing file. The bytes go into a temporary file in the same folder, get flushed to disk, and only then does the temporary file atomically take the target’s place. So if something fails — a process crash, running out of space, a power cut — the target path ends up with either the whole previous file or the whole new one, never a truncated one. You don’t need to build your own temp files around saving, and the file appearing at the target path already means the write is complete. ## Next [Section titled “Next”](#next) * The full list of operations — the [Compute Contract reference](/reference/sumsheet/overview/). * Verification before the pilot — the [Checklist](/sumsheet/checklist/). # From concept to pilot > The minimal architectural pilot and the path to a production delivery, including the delivery plan for the embedding kit. The path from concept to delivery has several forks, and it’s best to walk through each before the work starts. They’re collected below as a table: the question, the possible answers, and what the choice changes. | Question | Options | What the decision affects | | --------------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------- | | Where does the core run? | WebAssembly on the user’s side, a desktop app, or a process on the server. | This determines the deployment scheme. | | Who owns the file? | A document management system, a local file, or object storage. | This determines the open and save sequence and how versions are handled. | | Which objects are needed? | Cells, formulas, tables, charts, shapes, imported data. | This makes up the pilot’s capability matrix. | | Which interface? | The ready-made surface, either under your brand or as a fully custom interface. | This determines what goes into the public call set and how deeply you can customize the look. | | How are permissions passed? | View-only or editing, sheet protection, separation by tenant, permissions on data sources. | This makes up the session contract and the access checks. | | How does the session live? | One tab, a desktop app process, a job on the server, returning to the app on a phone. | This determines timeouts, cancellation, and recovery. | | Who operates it? | You yourselves, jointly, or us turnkey. | This determines availability commitments, monitoring, updates, and support. | ## The minimal architectural pilot [Section titled “The minimal architectural pilot”](#the-minimal-architectural-pilot) * One real, anonymized XLSX, and one business route. * One chosen scheme: browser with WebAssembly, or a desktop app. Don’t mix the server and mobile variants into the first prototype. * Your application starts an integration session and passes the file’s content and permissions; SumSheet returns the saved result and events. * Reopening, behavior under concurrent edits, a refusal with no partial write, memory use, and response time are all verified. * The outcome locks in the first version of the public interface, the capability matrix, what’s delivered, availability commitments, and the plan for reaching a production product. The object model in one line Your system starts an integration session → the core opens a workbook session → the surface shows the visible area → the user sends an operation → the core changes the revision and the history → saving creates a file → your system creates a new version. In other words, SumSheet is a surface around a single processor, sitting between your user’s session and your storage. ## A ready-made statement and the API delivery plan [Section titled “A ready-made statement and the API delivery plan”](#a-ready-made-statement-and-the-api-delivery-plan) ### What’s already available [Section titled “What’s already available”](#whats-already-available) In short SumSheet has programmatic access to the workbook’s structure inside it: sheets, ranges, cells, tables, and graphic objects. The Rust core returns typed projections and applies changes through a single operations contract. The surface already handles selection, clicks, double-clicks, invoking the context menu, and picking objects. This will open outward not as access to internal markup, but as a separate embedding kit: reading, semantic events, commands, and your own context menu items. Exactly what goes into the kit and which objects it covers is locked in by the pilot’s capability matrix. There’s no public kit yet — see the [embedding kit](/sumsheet/embedding-api/). ### What goes into the first embedding kit [Section titled “What goes into the first embedding kit”](#what-goes-into-the-first-embedding-kit) These packages don’t exist yet The names below are a plan, not something you can install today. The packages will be published together with the public embedding kit; the way to reach the workbook today is through the [operations contract](/reference/sumsheet/overview/). What remains a plan is the packages themselves, not the language they’ll speak. The embedding contract has already shipped as a separate version: event names, refusal codes, and the list of accepted formats are declared and don’t change arbitrarily — [what’s in it](/sumsheet/embedding-api/). So you can design around these names right now; all you have to wait for is what implements them. This is a separate kit from the `@sumsheet/*` packages collected in the [embedding examples](/sumsheet/examples/): those ship with the delivery and aren’t published to the public npm registry. | Package | Minimal contents | | ------------------------- | --------------------------------------------------------------------------------------------------------------- | | `@sumsheet/embed` | Creation, open and close, embedding in the page, session state, choosing the runtime. | | `@sumsheet/document` | Workbook contents, selection, cell details, a range of values, an object inventory. | | `@sumsheet/events` | Selection, activation, double-click, object selection, menu-opening, and workbook-change events. | | `@sumsheet/commands` | Running operations, undo and redo, revision checking, typed results and refusals. | | `@sumsheet/ui-extensions` | Context menu item providers, registering your own commands, panels, and actions within the allotted boundaries. | ### What needs to be finished before production handoff [Section titled “What needs to be finished before production handoff”](#what-needs-to-be-finished-before-production-handoff) * Separate the public types and names from the large internal operations contract. * Lock in the event delivery order, whether they can be canceled, timeouts, and resource-release rules. * Compile the list of object kinds under the pointer, and the selection rules based on permissions and available capabilities. * Add versioning, a compatibility period, examples, test scaffolding, and a migration guide between versions. * Run a pilot on your real scenarios with cells, tables, charts, and shapes, in the chosen environment. The boundary of API stability What’s worth promising is the interface model itself and the agreed contents of the first version, not the stability of today’s internal events, utility attributes, and global objects prefixed `__f1`. That’s the product’s internal design, not a delivery contract: it changes without notice. # SumSheet as a server-side processor > The proposed server scheme, what already exists, and what isn't a ready-made product yet. There are two different server scenarios, and it’s important not to mix them up. | Scenario | Where the core computes | What the server does | | -------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------- | | The browser computes | On the user’s device, as a WebAssembly build. | Serves the app and the file, stores versions, accepts the result. | | The server computes | As a separate process alongside your server. | Starts the job and the session, passes the document, limits resources, accepts the finished file. | ## The proposed server scheme [Section titled “The proposed server scheme”](#the-proposed-server-scheme) * **Entry point** — user sign-in, keeping clients separate from each other, consumption limits. * **Session management** — jobs, time limits, cancellation. * **Core worker process** — the same operations contract and workbook session as on a workstation. * **File storage** — source workbooks and results. ## What exists, and what isn’t a ready-made product yet [Section titled “What exists, and what isn’t a ready-made product yet”](#what-exists-and-what-isnt-a-ready-made-product-yet) | Status | Item | What it means | | ---------------------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Exists | A long-lived core session | A separate process and the same operations contract as everywhere else. | | Exists | Handling the workbook as bytes | You can pass the document by content, not only by a path to a file on disk. | | Available, as a ready-made image | SumSheet web host | A multi-user service: every user gets an isolated process with its own copy of the workbook, sign-in is checked by calling your system, and pages and traffic go through the manager. Several people can edit one workbook at once: other people’s input shows up as they type, and whoever opened the workbook first writes the file to the host. It ships as a ready-made Docker image — an archive in the `webhost/` folder of the release catalog and an image on Docker Hub; it isn’t part of the engine packages. How to start it — [below](#what-starts-the-f1-web-host). | | Available, installed separately | Workbook check service | A small service next to the web host: it accepts a workbook up to 50 MB (.xlsx, .xlsm, .xlsb, .xls, .xltm, .xltx, .xlam) without an account, executes nothing from it, and deletes it after 24 hours; the report covers functions, pivot tables, Power Query, external links, and the route of every macro. The bot for Slack and Telegram works through it too. It isn’t part of the web host image; on your own server it’s installed by a separate request — [how to check workbooks before the pilot](/sumsheet/checklist/#check-workbooks-before-the-pilot). | | You’ll need to build it yourself | Load wrapper | A job queue, per-tenant quotas, load monitoring, and scaling under it. The web host is designed for people at the editor, not for batch processing. | | Needs to be agreed in the contract | Commitments and deployment | Redundancy, updates, key storage, and who’s responsible for the service’s operation. | An honest boundary A service around the core exists and works: the SumSheet web host starts a separate process with its own copy of the workbook for every user, and asks your system who signed in. But it’s a service for people at the editor, not a platform serving several tenant organizations at once: a job queue, per-tenant quotas, and scaling under load aren’t part of it and are built separately. You can’t count on them as part of the delivery. ## What starts the SumSheet web host [Section titled “What starts the SumSheet web host”](#what-starts-the-sumsheet-web-host) The web host ships as a ready-made Docker image for Linux x86-64: the sandbox manager, the built page, and the core of the same release inside — there’s nothing for them to drift apart on. The image archive is in the `webhost/` folder of the [release catalog](https://dl.layers.md/sumoffice/sumsheet/release/latest/webhost/) together with `INSTALL.md` and `SHA256SUMS`; the same image is published on Docker Hub: `docker pull hissih/sumsheet-webhost:latest`. The machine needs 2 GB of memory plus about 250 MB per open workbook. ```bash docker load -i SumSheet--webhost-docker.tar.gz # from the archive, no internet needed docker run -d --name f1-webhost --restart unless-stopped \ -p 127.0.0.1:8092:8092 \ -v /srv/f1-cabins:/data/cabins \ hissih/sumsheet-webhost:latest \ --base-path /f1 --max-cabins 12 --idle-min 20 \ --auth-url 'https://your-host/api/me' \ --attach-url 'https://your-host/api/files/{id}/content' ``` Check: `curl http://127.0.0.1:8092/f1/health` — the response contains `"status": "ok"` and `"skewMin": 0`; the second means the page and the core are from the same release. Sandboxes live in the `/data/cabins` volume and survive an image update: `docker load` the new archive, remove the old container, and run the same start command with the new image. The path to the core, the folder with the WebSocket library, and the listen address are already set in the image. ### From the archive without Docker [Section titled “From the archive without Docker”](#from-the-archive-without-docker) The sandbox manager starts with a single command on bare Node ≥ 22; it takes the core from the installed delivery, and the path to it is passed as an environment variable. ```bash FASTSHEET_NATIVE_COMPUTE_HOST_BIN="$CLI" \ WEBHOST_WS_DIR=/opt/fastsheet/webhost \ node webhost/cabin-manager.mjs \ --template /opt/fastsheet/blank.xlsx \ --docs-dir /opt/fastsheet/cabins \ --port 8090 \ --auth-url 'https://your-host/api/me' \ --attach-url 'https://your-host/api/files/{id}/content' ``` Both variables in the first lines are required for a manual start, and they behave differently. `FASTSHEET_NATIVE_COMPUTE_HOST_BIN` is the path to the processor, the same `$CLI` as during installation: without it, the manager starts, but no sandbox opens — there’s nothing to start the core with. `WEBHOST_WS_DIR` is the folder that holds `node_modules/ws`: the WebSocket library is taken from there. Without it, the manager doesn’t start at all — it prints “WEBHOST\_WS\_DIR is not set” and exits immediately. By default, the manager listens only on the local address — you can’t connect to it from outside, even from your own network. This isn’t a limitation but a safeguard: your server exposes the service by proxying it and adding its own sign-in (the proxy must pass WebSocket and the cookie through). In the container, the image sets the address (`WEBHOST_BIND=0.0.0.0`), and the boundary is kept by publishing the port on `127.0.0.1`. `--base-path` is handled the same way if the service doesn’t live at the domain’s root. | Flag | Default | What it does | | -------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | `--port` | `8090` (`8092` in the image) | The manager’s port. | | `--bind` | `127.0.0.1` or `WEBHOST_BIND` | The listen address; in the image — all addresses of the container. | | `--template` | — | The empty workbook that sandboxes start from. | | `--docs-dir` | next to the template | The folder for working copies of workbooks, per sandbox. | | `--auth-url` | none | Your “who am I” address: as long as it’s set, sign-in only goes through your permission check. | | `--attach-url` | none | Your “file by ID” address; the sandbox downloads the workbook using the request’s own credentials. | | `--create-url` | none | Your “create file” endpoint — needed for a new workbook and for a copy of a busy workbook. | | `--base-path` | none | A subpath, if the service doesn’t live at the domain’s root. | | `--ui-locale` | none | The language of the manager’s service pages: `ru`, `en`, or `auto` — by the browser language. Without the flag — English. | | `--warm` | `0` | How many sandboxes to keep warmed up. For spreadsheets, warm-up is off by default. | | `--idle-min` | `30` | How many minutes of idling before a sandbox shuts down, taking anything unsaved with it. | | `--max-cabins` | `0` — computed from the machine | The limit on simultaneous sandboxes: at zero, the manager picks it itself, based on memory and core count. | | `--chrome` | `none` | The window’s top bar: `full`, `slim`, or `none`. | | `--entry` | none | A fallback pass around your “who am I”. | The same two caveats as for documents `--idle-min` decides the fate of unsaved work: the sandbox shuts down on idling. `--entry` opens a way in past your permission check — as long as `--auth-url` is set, it doesn’t exist at all, and you shouldn’t enable it in production. There’s one difference from the SumDoc web host, but a noticeable one: for spreadsheets, warm-up is off by default (`--warm 0`), so the first sign-in waits for the process to start. If you need fast sign-in, set warm-up explicitly. ## What your system must respond [Section titled “What your system must respond”](#what-your-system-must-respond) The web host stores neither users nor files: it goes to two endpoints for them, and a third one is needed if you allow creating workbooks. The browser’s cookie and `Authorization` header are passed to them as is, so there’s no separate sign-in to the editor. | Endpoint | Why | What it must respond | | ------------------------------------------------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--auth-url` | find out who signed in | `2xx` and JSON with an `email` or `id` field; otherwise `401` or `403` | | `--attach-url`, `GET …/{id}/content` | return the workbook by ID | the `.xlsx` file itself — only to someone who has the right; a `302` to a signed link is acceptable | | the same endpoint with `/replace` instead of `/content` | accept an edit | `POST multipart/form-data`, part `file`; parse the part, not the raw body | | `--create-url`, `{userId}` is substituted | create a workbook | `POST multipart/form-data`, part `file`, the workbook name in the `x-f1-name` header (percent-encoded); the response is JSON with the `id` of the new file | The workbook link for the user: `https://your-domain/f1/?doc=`. ## Several people in one workbook [Section titled “Several people in one workbook”](#several-people-in-one-workbook) Everyone can type. Edits travel between sandboxes through the manager: it keeps the canonical state per cell — the last edit confirmed by the core wins — and broadcasts it to everyone, so everyone ends up with the same workbook. Inserting and deleting rows and columns go through a separate shift log, and the manager fixes up lagging edits itself. One person writes the file to the host — whoever opened the workbook first; everyone else’s edits leave together with that save. The workbook shows “in the workbook: N” with names, and another person’s cursor as a colored frame with a name on a visible cell, or a label at the edge if the cell is off screen. Presence is ephemeral: a lost frame is fixed by the next move, and a sandbox’s death removes its cursor for everyone right away. Every 15 seconds, the manager compares each sandbox against the canonical state and patches up what has drifted. Undo removes only your own edits: your neighbors’ edits don’t enter your undo stack. ## Second entrance: WOPI [Section titled “Second entrance: WOPI”](#second-entrance-wopi) For systems that speak WOPI (Nextcloud, ownCloud, SharePoint), the web host opens a second entrance — the `wopi-facade.mjs` facade from the same delivery, placed in front of the manager. To the outside it’s a WOPI client: discovery, a proof signature on every request, CheckFileInfo, GetFile, PutFile, Lock/Unlock/RefreshLock, PutRelativeFile, RenameFile, and the host page’s postMessage API. To the inside — exactly the host contract from the table above; the manager doesn’t change by a single line. 8110/v1/me ```bash node webhost/wopi-facade.mjs \ --port 8110 --manager http://127.0.0.1:8090 \ --public-url https://your-domain/f1 --wopi-allow storage1,storage2 # --attach-url 'http://127.0.0.1:8110/v1/attachments/{id}/content' ``` `--wopi-allow` is a comma-separated allowlist of storages; there’s one lock per file, it lives as long as at least one writing session of the workbook is alive, and it’s renewed every 25 minutes. The manager checks the `UserCanWrite` right from CheckFileInfo on every edit: without it, the workbook opens read-only. The entrance has been verified against our own test WOPI host; it isn’t certified against Nextcloud, SharePoint, or ownCloud. ## Other environments [Section titled “Other environments”](#other-environments) * [The core in the browser](/sumsheet/wasm/) * [A separate process alongside your application](/sumsheet/native/) * [Phone and tablet](/sumsheet/mobile/) * [The end-to-end scenario and what changes between environments](/sumsheet/environments/) # How the API session works > What a conversation with the processor looks like, what to keep at each step, and what to do with a refusal. ## Transport [Section titled “Transport”](#transport) The `compute_contract_cli` processor starts with the `--session` flag. As its first line, it reports readiness: one JSON line on standard output. After that, the conversation runs line by line — you write one JSON request line to its input, and it answers with one JSON line on output. Requests are processed strictly in order: the next one is read only after the previous one’s response, so you can’t send them in a batch and match responses by number. The conversation isn’t always one-directional. The processor has no TLS of its own, and for an operation that needs the network over `https` or a connection to Postgres or SQL Server, it writes you a counter-question — a line with a `kind` field and its own `id` — and **stops** until it gets a response with the same `id`. You’re the one who has to reach the network, answer, and watch the clock: the `deadlineMs` in its line is a deadline for you, not a limit the core gives up at on its own. Don’t answer, and it will wait indefinitely; close the input stream, and the operation ends in a refusal. This only happens inside such an operation — exactly when you’re already waiting for its response anyway; an ordinary workbook edit never asks a counter-question. ### What kinds of counter-lines there are [Section titled “What kinds of counter-lines there are”](#what-kinds-of-counter-lines-there-are) There are three conversations in all, and every one starts with a line from the core and ends with your line carrying the same `id`. | The core writes | What it’s asking for | You respond | | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `transport-request` | A single `https` request: the address, method, headers, `deadlineMs` | `transport-response` with `status`, headers, and the body in `bodyBase64` — or `transport-error` with the value `timeout`, `tls`, `offline`, or `connection-reset` | | `socket-open`, `socket-send`, `socket-recv`, `socket-close`, `socket-cert-hash` | A long byte stream to a database: open, send, receive, close, show the certificate fingerprint | `socket-opened` with the channel number, `socket-sent`, `socket-data` (with an `eof` flag), `socket-closed`, `socket-cert` — or `socket-error` with the same list of causes | | `credential-proof` | A proof of the database password: the core never holds the password itself or anything derived from it | `credential-proof-response` with `proofBase64` and `serverSignatureBase64` — or `credential-proof-error` | Any other line breaks off the operation While the core waits for a response, it reads exactly one line and expects it to match by `kind` and `id`. Everything else — another request, a response with someone else’s `id`, unparseable JSON — counts as a protocol violation, and the operation closes with a refusal; for a database channel, this poisons the channel itself too. So don’t send anything of your own while a counter-conversation is in progress. The core reaches out over `http` on its own: only `https` is delegated outward. ```ts const child = spawn(binary, ["--session"], { stdio: ["pipe", "pipe", "inherit"], }); child.stdin.write(JSON.stringify(request) + "\n"); ``` ## Lifecycle [Section titled “Lifecycle”](#lifecycle) | Step | What to keep | Why | | ---------------------- | ---------------------------------- | -------------------------------------------------------------------------- | | `open_workbook_subset` | `payload.subsetId` | Identifies the workbook in this process | | `open_workbook_subset` | `payload.activeSheet.path` | The sheet key: that’s what edit operations expect, not the visible name | | `apply_cell_edits` | `payload.workbookHistory.revision` | The new accepted revision | | every response | ok / code / payload | Every refusal has its own code; you must never show success on `ok: false` | | `save_workbook_subset` | `destinationUri` | The full address of the saved file, starting with `file://` | Important The subset identifier lives only inside the running process. Don’t store it in your own database and reuse it after a restart: a new process doesn’t know about it, and you need to open the workbook again. ## What to do with a refusal [Section titled “What to do with a refusal”](#what-to-do-with-a-refusal) ```ts if (!response.ok) { throw new Error(response.code + ": " + JSON.stringify(response)); } ``` Whether to pass expectedRevision The field is optional, and it determines the behavior on a race. **With it**, the core checks the number against the workbook’s current revision. If the workbook was already changed, the request is refused with the `apply-cell-edits-stale-revision` code and **changes nothing** — the edit never lands on top of someone else’s. **Without it**, the edit applies unconditionally, over whatever the current state is. This is legacy behavior; it suits cases where a single session edits the workbook and concurrent changes can’t happen. For an integration, pass `expectedRevision` — the one that came back in the response to the previous operation. A breakdown of the response contents is below on this page. What arrives in the response Success and refusal differ by the `ok` field and by their contents. | Field | When it’s present | What it means | | ------------------------------------------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ok` | always | `true` — the operation succeeded, `false` — it was refused before the workbook changed. | | `requestId` | if it was in the request | The request’s tag, returned unchanged. This is how the response ties to the request — it’s the only reliable way, because the operation name in the response can differ from the one you sent. | | `payload` | when `ok: true` | The operation’s result; its fields are described on that operation’s own page. | | `code` | when `ok: false` | A stable refusal code — this is what your handling branches on. There’s no closed list of codes, so a default branch is mandatory. | | `message` | when `ok: false` | A human-readable reason; this is what’s worth showing in the log. | | `details` | when `ok: false` | Extra detail, when there is any. | | `warnings` | always | Warnings that don’t cancel the result. | | `requestedBackend`, `backendUsed`, `fallbackUsed` | always | Which runtime was requested, which one actually ran, and whether it had to fall back to a different one. | | ::: | | | ### What warnings show up [Section titled “What warnings show up”](#what-warnings-show-up) A warning doesn’t cancel the result — the operation is done. It says the operation was done not quite the way you might have assumed, and two of them change how you should write your code. | Code | What happened | What to do about it | | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `large-sheet-viewport-open` | A large sheet is opened by its visible area. Until the sheet is fully loaded, `usedRange`, `maxRow`, and `maxCol` come from a size hint, or, if there isn’t one, describe **only the loaded start of the sheet**. The total count of filled cells and anything beyond what’s loaded is deferred. | Don’t treat these fields as a description of the whole sheet right after opening. If you need the full picture, wait for the full load, in the same process. | | `cached-formula-preview` | Formula values are shown as Excel last saved them: only the current subset recalculates live. | If you’re presenting the numbers as “ours”, wait for the recalculation first. For viewing, that’s enough. | | `cached-formula-values-preserved` | On save, Excel’s saved formula values carried over as is — you asked for this with the `preserveCachedValues: true` field. | Nothing; this way the numbers in the file are preserved even where we didn’t recalculate. The field has no default — you have to state a value every time. | | `cached-formula-values-omitted` | Those same values were dropped on save — because you asked for that. | Confirm that whatever reads the file can recalculate: without the values, it will see empty formulas. | | `requested-backend-unavailable` | You asked for a different engine than the one running; it computed with the one available. | Check `backendUsed`. There won’t be a refusal — it will quietly compute somewhere other than where you thought. | ## Next [Section titled “Next”](#next) * The example’s requests, step by step — [Requests used in the example](/sumsheet/requests/). * If something isn’t working — [Diagnostics](/sumsheet/diagnostics/). # Surface events > What events the SumSheet shell emits today, what arrives in detail, and why this is an internal contract, not a public SDK. Internal contract The current SumSheet shell emits these events. They’re not part of the public [embedding kit](/sumsheet/embedding-api/) and can change without notice: subscribing to them is fine in an internal build, but not as a long-term API. The public event contract is locked in separately. All the names start with `fastsheet:` — a product prefix, not a brand one; renaming the product to SumSheet didn’t touch it. ## What the shell emits [Section titled “What the shell emits”](#what-the-shell-emits) The surface sends three object events on itself, with `bubbles: true` — you can listen on the node itself, or on any of its ancestors. | Event | When it fires | What’s in `detail` | | ----------------------------------- | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | `fastsheet:surface-object-selected` | A graphic object on the sheet is selected | `objectId`, `sheetKey`, `family`, `status`; for charts, also `chartLocalX`, `chartLocalY`, `chartTargetId` | | `fastsheet:surface-object-dragging` | An object is being dragged | `objectId` and `bounds` — and nothing else | | `fastsheet:surface-object-moved` | Dragging is finished | `objectId`, `sheetKey`, `family`, `status` | Dragging has a different `detail` shape `fastsheet:surface-object-dragging` carries only the identifier and bounds: `sheetKey`, `family`, and `status` are absent from it. A handler written after the pattern of the selection event will get `undefined` here — and won’t throw an error, it’ll just silently run on the wrong sheet. ## The locale change arrives somewhere different from the rest [Section titled “The locale change arrives somewhere different from the rest”](#the-locale-change-arrives-somewhere-different-from-the-rest) | Event | Where to listen | What’s in `detail` | | ---------------------------------- | --------------- | --------------------- | | `fastsheet:surface-locale-changed` | on `window` | `locale`, `direction` | This is the only event the shell sends not to the surface but to `window`, and it doesn’t bubble. A listener attached to the surface node alongside the other four will never get the locale change. ## `fastsheet:surface-dispose` goes the other way [Section titled “fastsheet:surface-dispose goes the other way”](#fastsheetsurface-dispose-goes-the-other-way) The shell doesn’t emit this event — it **listens** for it. The embedding application sends it — that’s how it tells the surface its node is leaving the page; on receiving the event, the shell unregisters the surface, disconnects its own listeners, and clears temporary nodes. ```js // Remove the surface before deleting the node from the page. surface.dispatchEvent(new CustomEvent("fastsheet:surface-dispose")); ``` Subscribing to it while waiting for a “surface closed” signal makes no sense: you send it, not the surface. ## It’s not worth parsing `detail` directly [Section titled “It’s not worth parsing detail directly”](#its-not-worth-parsing-detail-directly) Wrap the events in a facade of your own, as shown in [Runtime environments](/sumsheet/environments/): the contents of `detail` are the shell’s internal business, and even today they already differ between neighboring events. # Strengths and tradeoffs > What the architecture gives you and what it costs — an honest list, no marketing. Architecture is always a trade: every property is paid for with something else. Below are both sides of the trade, with no cherry-picking. First what the product’s design gives you, then what it costs and what you’ll have to do. ## What the product’s design gives you [Section titled “What the product’s design gives you”](#what-the-products-design-gives-you) | Strength | What it gives you | | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | | A single owner of meaning — the Rust core | The browser, the desktop app, and the server wrapper understand operations the same way. | | One operations contract | You can change the interface and the transport without rewriting the spreadsheet engine. | | Computing by visible area | A large workbook never unfolds entirely in the browser — only what’s needed right now is computed and drawn. | | Running on your own machine, inside your own perimeter | Documents can stay inside your infrastructure and never leave. | | Explicit refusals and revision checking | An error or someone else’s concurrent edit produces a refusal before the change, not a half-corrupted file. | | A surface under your brand | The brand, the user journey, and the customer relationship all stay yours. | ## What it costs [Section titled “What it costs”](#what-it-costs) | Limit | What you’ll need | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | The public developer kit still needs to be separated from the internal contract. | Stable package names, versions, compatibility rules, examples, and a version support period. | | The server wrapper isn’t a ready-made multi-tenant platform. | A gateway, a task queue, isolation, quotas, secret storage, metrics collection, and availability commitments. | | The mobile kit is an editor page, not a library for your own screens. | Ready-made apps for phone and tablet are released, and the viewing kit is assembled from the same build: the core, the page, and the bridge. Your own screens in Swift and Kotlin on top of the bare core are separate work; there’s no public kit for it ([Phone and tablet](/sumsheet/mobile/)). | | The core in the browser is limited by memory and by the browser’s rules. | Decisions on background threads, vector computation (SIMD), and multithreading, a fallback route, and calculated memory limits. | | Matching Excel is finite and reached in stages. | An agreed capability matrix; what’s unsupported is honestly hidden or disabled, not made to look like it works. | | Two parts to the runtime complicate releases. | Matched versions of the web part and the core, checksums, signing, and the ability to roll back to a previous version. | ## Next [Section titled “Next”](#next) * How these limits are verified before the contract — [Readiness checklist](/sumsheet/checklist/). * What’s already covered from this list, and what isn’t — the [capability map](/sumsheet/atlas/) and [Risks and honest boundaries](/platform/risks/). # The core in the browser through WebAssembly > The core runs on the user's device: how the exchange works, what it gives you, and what limits to account for. ## What the setup consists of [Section titled “What the setup consists of”](#what-the-setup-consists-of) The core computes on the user’s device. There’s less work for you here than in the other environments: the core arrives together with the page — you don’t have to install it, update it, or restart it after a crash. The scheme has four participants: * **Your server** — serves the page, the build, and the file, issues the session and permissions, and accepts the saved result. * **The browser or WebView** — the SumSheet shell and a background thread. * **The core in WebAssembly** — the workbook session and computation live in the browser’s memory. * **Your product** — versions, audit, approval routes, notifications. ## Where the build comes from [Section titled “Where the build comes from”](#where-the-build-comes-from) The WebAssembly build of the core and its bridge module ship as SumSheet engine packages — a separate delivery artifact, see [What is delivered](/platform/delivery/). They’re not in the desktop installer: that has the native processor, which doesn’t run in the browser. ## What’s available in the browser [Section titled “What’s available in the browser”](#whats-available-in-the-browser) The operation set is the same as in the desktop app: the browser build accepts the same contract requests and passes them to the same core — it has no trimmed-down list of its own. One caveat, and it’s not about the environment. Anything that touches the network — Postgres and SQL Server connections, `https` requests — doesn’t work in the browser. The reason is the same as everywhere else: the core has no network of its own, and it asks whoever’s nearby to go fetch. In the desktop app, a host sits nearby and answers such requests; in the browser, the bridge is responsible only for passing requests along and the session’s lifetime, and there’s no one there to serve the request. The operations still exist and refuse honestly — [why, and with what codes](/reference/sumsheet/pq-connectors/). The browser’s other limits are about the environment: memory, threads, and first-load time. ## Which workbooks the browser won’t take [Section titled “Which workbooks the browser won’t take”](#which-workbooks-the-browser-wont-take) These limits aren’t vague: the core checks the workbook against them before parsing, and on overflow it responds with the `wasm-memory-envelope-exceeded` refusal, naming both the limit that was broken and the actual value in the details. | Limit | Value | | --------------------- | --------- | | Workbook file size | 256 MB | | Rows per sheet | 1 000 000 | | Filled cells | 8 000 000 | | Estimated peak memory | 1.5 GB | All four are calculated from the environment’s ceiling: wasm32’s address space is 4 GB for everything, including the build itself and working structures, and the margin is left deliberately. The desktop app and the server have none of these limits — there, only the machine limits the workbook. ## How the exchange works [Section titled “How the exchange works”](#how-the-exchange-works) The shell talks to the WebAssembly session, which remembers the workbook’s state between calls. The workbook stays in the tab’s or background thread’s memory, and the file only goes to your server on open and save, or on a separately agreed event. | Strength | Cost / limit | | ------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | The document is processed without going out to any external cloud. | Memory and processing power are limited by the device and the browser. | | There’s almost no delay between the user’s action and the core. | The first load of the code and opening a large workbook take time you need to budget for. | | The same behavior with or without a network. | Vector computation (SIMD) isn’t in every browser, and multithreading needs all three conditions at once: the site is origin-isolated with two headers — COOP and COEP; the browser supports SIMD (the multithreaded core is built only for that variant); and the delivery has the multithreaded core itself — a separate build, not the one that ships by default. If any one is missing, the core falls back to the single-threaded variant and names the reason, down to `simd-required-for-threaded-core` and `threaded-core-artifact-not-built`. The ordinary build needs none of this. | | Your server is simpler: storage, sign-in, and versions. | Long operations need to move to a background thread, be cancelable, and account for the tab possibly being closed. | Good fit for Web portals, air-gapped environments, private clouds, and scenarios where you’d rather process the document locally on the user’s device. ## Other environments [Section titled “Other environments”](#other-environments) * [A separate process alongside your application](/sumsheet/native/) * [The processor on the server](/sumsheet/server/) * [Phone and tablet](/sumsheet/mobile/) * [The end-to-end scenario and what changes between environments](/sumsheet/environments/)