Skip to content
SumOfficeSumOfficeSumOffice

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.

Contract module: api-edit.ts.

Other topics in this module: Text and paragraphs · Tables: structure · Tables: cells and formatting · Tables: placement on the page · Page setup and document structure · Objects and drawings · Fields, footnotes, and references.

TypeAliasDeclaration · api-edit.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";

InterfaceDeclaration · api-edit.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;
}

InterfaceDeclaration · api-edit.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;
}

InterfaceDeclaration · api-edit.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[];
}

InterfaceDeclaration · api-edit.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;
}

InterfaceDeclaration · api-edit.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;
}

InterfaceDeclaration · api-edit.ts

interface EditorV0ContentControlsRequest {
request: Record<string, unknown>;
reopenAfterWrite?: boolean;
outputPath?: string | null;
}

InterfaceDeclaration · api-edit.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<Record<string, unknown>>;
snapshot: Record<string, unknown>;
}

TypeAliasDeclaration · api-edit.ts

type D36CombinedSectionStart = "next-page" | "continuous" | "even-page" | "odd-page";

TypeAliasDeclaration · api-edit.ts

type D36CombinedPaperSize = "A4" | "Letter";

TypeAliasDeclaration · api-edit.ts

type D36CombinedOrientation = "portrait" | "landscape";

TypeAliasDeclaration · api-edit.ts

type D36CombinedMarginPreset = "normal" | "narrow" | "moderate" | "wide";

InterfaceDeclaration · api-edit.ts

interface D36CombinedSectionCommandRequest {
paragraphIndex: number;
sectionStart?: D36CombinedSectionStart;
paperSize?: D36CombinedPaperSize;
orientation?: D36CombinedOrientation;
marginPreset?: D36CombinedMarginPreset;
pageNumberStart?: number;
defaultHeaderText?: string;
outputPath?: string | null;
reopenAfterWrite?: boolean;
}

InterfaceDeclaration · api-edit.ts

interface D36CombinedSectionCommandResult {
applied: boolean;
outputPath: string;
label: string;
paragraphIndex: number;
workflowResult: Record<string, unknown>;
finalPageSetupState: Record<string, unknown> | null;
finalHeaderFooterState: Record<string, unknown> | null;
beforeTexts: string[];
afterTexts: string[];
popupWarningShown: false;
}

TypeAliasDeclaration · api-edit.ts

type D36SectionPresetVisibleWorkflowCommand = "section-preset-a4" | "section-preset-landscape" | "section-preset-first-page" | "section-preset-narrow-margins";

InterfaceDeclaration · api-edit.ts

interface D36SectionPresetVisibleWorkflowRequest {
command: D36SectionPresetVisibleWorkflowCommand;
paragraphIndex: number;
outputPath?: string | null;
reopenAfterWrite?: boolean;
}

InterfaceDeclaration · api-edit.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<string, unknown> | null;
afterState: Record<string, unknown> | null;
beforePagination: Record<string, unknown> | null;
afterPagination: Record<string, unknown> | null;
steps: Record<string, unknown>[];
beforeTexts: string[];
afterTexts: string[];
popupWarningShown: false;
}

TypeAliasDeclaration · api-edit.ts

type D36LineNumbersCommand = "none" | "continuous" | "restart-page" | "restart-section" | "suppress-current-paragraph";

InterfaceDeclaration · api-edit.ts

interface D36LineNumbersContinuousRequest {
command?: D36LineNumbersCommand;
paragraphIndex: number;
paragraphIndexes?: number[];
outputPath?: string | null;
reopenAfterWrite?: boolean;
}

InterfaceDeclaration · api-edit.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<string, unknown> | null;
afterPagination: Record<string, unknown> | null;
afterModel: Record<string, unknown> | null;
writebackResult: Record<string, unknown> | null;
beforeTexts: string[];
afterTexts: string[];
popupWarningShown: false;
technicalPanelAdded: false;
wordParityClaim: false;
pixelParityClaim: false;
muscleMemoryParityClaim: false;
}

TypeAliasDeclaration · api-edit.ts

type D36HyphenationCommand = "none" | "auto";

InterfaceDeclaration · api-edit.ts

interface D36HyphenationRequest {
command?: D36HyphenationCommand;
paragraphIndex: number;
outputPath?: string | null;
reopenAfterWrite?: boolean;
}

InterfaceDeclaration · api-edit.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<string, unknown> | null;
writebackResult: Record<string, unknown> | null;
beforeTexts: string[];
afterTexts: string[];
popupWarningShown: false;
technicalPanelAdded: false;
wordParityClaim: false;
pixelParityClaim: false;
muscleMemoryParityClaim: false;
}

TypeAliasDeclaration · api-edit.ts

type D36HeaderFooterEditModeStoryKind = "header" | "footer";

TypeAliasDeclaration · api-edit.ts

type D36HeaderFooterEditModeStoryVariant = "default" | "first" | "even";

InterfaceDeclaration · api-edit.ts

interface D36HeaderFooterEditModeSaveRequest {
storyKind: D36HeaderFooterEditModeStoryKind;
storyVariant?: D36HeaderFooterEditModeStoryVariant;
text: string;
paragraphIndex: number;
outputPath?: string | null;
reopenAfterWrite?: boolean;
}

InterfaceDeclaration · api-edit.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<string, unknown> | null;
afterHeaderFooterState: Record<string, unknown> | null;
beforePagination: Record<string, unknown> | null;
afterPagination: Record<string, unknown> | null;
writebackResult: Record<string, unknown> | null;
beforeTexts: string[];
afterTexts: string[];
popupWarningShown: false;
technicalPanelAdded: false;
wordParityClaim: false;
pixelParityClaim: false;
muscleMemoryParityClaim: false;
}

TypeAliasDeclaration · api-edit.ts

type D36HeaderFooterRemoveOperationKind = "remove-default-header" | "remove-default-footer";

InterfaceDeclaration · api-edit.ts

interface D36HeaderFooterRemoveRequest {
storyKind: D36HeaderFooterEditModeStoryKind;
paragraphIndex: number;
outputPath?: string | null;
reopenAfterWrite?: boolean;
}

InterfaceDeclaration · api-edit.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<string, unknown> | null;
afterHeaderFooterState: Record<string, unknown> | null;
beforePagination: Record<string, unknown> | null;
afterPagination: Record<string, unknown> | null;
writebackResult: Record<string, unknown> | null;
beforeTexts: string[];
afterTexts: string[];
popupWarningShown: false;
technicalPanelAdded: false;
wordParityClaim: false;
pixelParityClaim: false;
muscleMemoryParityClaim: false;
}

Documentation assistant

Answers are assembled from the documentation and may be inaccurate — check the sources.