A4 reference: Rust Session Protocol, window.fastdocShell, DTO, события. # Отсутствующие API и совместимость > Что явно не входит в текущий контракт и как это влияет на планирование интеграции. | Чего нет | Что вместо этого | | ---------------------------------------- | ---------------------------------------------------------- | | Щелчок и двойной щелчок | Нет в публичном контракте поверхности | | Щелчок правой кнопкой и свои пункты меню | Нет | | Публичный вызов «что под этой точкой» | Нет | | Правка произвольного узла | Одной универсальной команды нет | | Устойчивая нумерация версий | Нет: контракт помечен `1.0.0-draft` | | WebSocket снаружи и без пропуска | Запрещён: только локальный интерфейс и пропуск | | Двоичные кадры WebSocket | Не принимаются | | Своя копия документа в окне редактора | Запрещена: модель, история и запись файла принадлежат ядру | Пока контракт помечен `draft`, закрепляйте у себя контрольную сумму и версию исполняемого файла вместе с объявлениями типов, а при запуске сверяйте схему приветственного сообщения и список `supported_commands` — оба приходят в первой же строке сеанса. # Сеанс и соглашения A4 > Что важно знать до первого вызова: корреляция запросов, порядок команд, обязательные поля правки, признак несохранённых изменений, завершение сеанса и отсутствие таймаутов. **Как пишутся имена.** В A4 три разных соглашения, и путать их нельзя. Имена команд — через дефис или одним словом: `save-checkpoint`, `print-window`, `model`, `mutate`; подчёркивания в именах команд нет ни одного. Имена полей — наоборот, через подчёркивание: `document_id`, `paragraph_index`, `operation_kind`, `expected_revision`. А значения полей, которые выбираются из списка, снова идут через дефис: `insert-text`, `delete-line-break`, `merge-with-next`. Ошибка в написании возвращает отказ, который читается как «команда не поддержана», хотя дело в одном знаке. Для сравнения: в F1 поля пишутся слитно — `subsetId`, `sheetKey`, — и подчёркивания там не будет. Встраивая оба продукта, имя из одного в другом не ищите. **В чём измеряются размеры.** Единицы две, и по имени поля видно, какая. Поля, кончающиеся на `_twips`, — в твипах: это единица разметки Word, одна тысяча четыреста сороковая доля дюйма. Дюйм — 1440 твипов, сантиметр — примерно 567, стандартное поле страницы в 2,54 см как раз и есть 1440. Поля, кончающиеся на `_milli_px`, — в тысячных долях пикселя: 96000 значит 96 px, а не девяносто шесть тысяч. Первое досталось от формата документа, второе — от экрана, и смешивать их нельзя. **Корреляция.** Поле `id` необязательно и принимает любое значение JSON — строку или число. Ядро возвращает его без изменений, поэтому по нему ответ сопоставляется с запросом; в ответе поле есть всегда и равно `null`, если запрос его не нёс. **Порядок.** Сессия хранит состояние между командами. Команда, которой нужен открытый документ, до `open` отказывает с текстом `no document is open in this session`. **Правка.** Для `mutate` обязательны `operation_kind` и `paragraph_index` — у остальных полей есть значения по умолчанию. Нумерация абзацев с нуля. Виды правки перечислены в [Объектах запросов и ответов](/a4/envelope/). **Несохранённые изменения.** Признак `dirty` означает, что текущая модель отличается от последнего сохранённого состояния, а не что документ испорчен. **Завершение.** Ответ на `shutdown` содержит `shutdown: true` и не содержит ни `cmd`, ни `elapsed_ms`, ни `result`. **Время ответа.** Таймаута в сеансе нет: ответ приходит, когда команда обработана. Ограничение по времени задаёт клиент. Единственный таймаут на стороне A4 — пять секунд на чтение HTTP-запроса в Surface Host. **Сохранение.** Файл публикуется атомарно: запись идёт во временный файл рядом с целевым, содержимое доводится до диска, и только потом он заменяет цель. Оборванная запись не оставляет половинчатый DOCX — см. [Жизненный цикл документа](/a4/lifecycle/). Команда `save-checkpoint` вдобавок сверяет файл с тем состоянием, которое передали в `expected_hash`, и отказывает, если его изменили снаружи. Формат сообщений и коды отказов — в [Транспорте](/reference/a4/transport/), перечень команд — в [Session Protocol](/reference/a4/session-protocol/). # DTO · api-document.ts > 39 интерфейсов shell-contract — работа с документом: открытие и раскрытие путей, экспорт медиа, снимки отчёта, маркеры поддержки и связи пакета. Внутренний контракт Эти типы описывают обмен внутри окна настольного A4. Для встраивания в свой продукт используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). В некоторых типах попадаются служебные метки вида `backlog_id: "D38"` или `sharedSceneOwner: "D5"` — это номера задач, по которым возможность заводилась внутри команды. Они приходят в ответе, но встраиванию не нужны: разбирать и сохранять их незачем. Модуль контракта: `api-document.ts`. ### OpenExternalHyperlinkResult [Заголовок раздела «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 [Заголовок раздела «ShellShareClipboardResult»](#shellshareclipboardresult) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellShareClipboardResult { copied: boolean; length: number; text: string; } ``` ### ShellRevealPathResult [Заголовок раздела «ShellRevealPathResult»](#shellrevealpathresult) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellRevealPathResult { revealed: boolean; smokeBlocked: boolean; path: string | null; reason: string | null; } ``` ### ShellSupportMarker [Заголовок раздела «ShellSupportMarker»](#shellsupportmarker) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellSupportMarker { kind: string; location: string; detail: string; } ``` ### ShellDetectedFeature [Заголовок раздела «ShellDetectedFeature»](#shelldetectedfeature) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellDetectedFeature { kind?: string; location?: string; detail?: string; } ``` ### ShellRelationshipSnapshot [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «ShellFileSessionRecoveryCandidate»](#shellfilesessionrecoverycandidate) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellFileSessionRecoveryCandidate { recoveryId: string; documentPath: string | null; displayName: string; capturedAtLabel: string; reasonLabel: string; } ``` ### ShellFileSessionRecoveryState [Заголовок раздела «ShellFileSessionRecoveryState»](#shellfilesessionrecoverystate) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellFileSessionRecoveryState { status: "none" | "available" | "recovering" | "recovered" | "error"; candidate: ShellFileSessionRecoveryCandidate | null; errorMessage: string | null; } ``` ### ShellAutosaveRecoverySettings [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «ShellVersionHistoryResult»](#shellversionhistoryresult) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellVersionHistoryResult { documentPath: string; versions: ShellVersionHistoryEntry[]; } ``` ### ShellDocxCompatibilityIssue [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «ShellDocxCompatibilityOperationResult»](#shelldocxcompatibilityoperationresult) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellDocxCompatibilityOperationResult { canceled: boolean; opened: boolean; outputPath: string | null; result: ShellDocxCompatibilityCommandResult | null; } ``` ### ShellExternalChangePromptState [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «ShellDocumentWindowSession»](#shelldocumentwindowsession) `InterfaceDeclaration` · `api-document.ts` ```ts interface ShellDocumentWindowSession { windowId: number | null; sessionRevision: number; windows: ShellDocumentWindowDescriptor[]; snapshot: ShellDocumentSessionSnapshot | null; } ``` ### ShellDocumentSessionSelection [Заголовок раздела «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 [Заголовок раздела «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; } ``` # DTO · api-market.ts > 8 интерфейсов и 2 псевдонима типов shell-contract — запросы и результаты сценарных маршрутов проверки выпуска, а также команды колонтитулов; во встраивании не используются. Внутренний контракт Эти типы описывают обмен внутри окна настольного A4. Для встраивания в свой продукт используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). В некоторых типах попадаются служебные метки вида `backlog_id: "D38"` или `sharedSceneOwner: "D5"` — это номера задач, по которым возможность заводилась внутри команды. Они приходят в ответе, но встраиванию не нужны: разбирать и сохранять их незачем. Модуль контракта: `api-market.ts`. **Типы на этой странице — 10** * [`EditorV0Doc006015MarketRouteRequest`](#editorv0doc006015marketrouterequest) * [`EditorV0Doc001005MarketRouteRequest`](#editorv0doc001005marketrouterequest) * [`EditorV0Doc016025MarketRouteRequest`](#editorv0doc016025marketrouterequest) * [`EditorV0Doc006015MarketRouteResult`](#editorv0doc006015marketrouteresult) * [`EditorV0Doc001005MarketRouteResult`](#editorv0doc001005marketrouteresult) * [`EditorV0Doc016025MarketRouteResult`](#editorv0doc016025marketrouteresult) * [`D36HeaderFooterMarketCommand`](#d36headerfootermarketcommand) * [`D36HeaderFooterStoryVariant`](#d36headerfooterstoryvariant) * [`D36HeaderFooterMarketRequest`](#d36headerfootermarketrequest) * [`D36HeaderFooterMarketResult`](#d36headerfootermarketresult) ### EditorV0Doc006015MarketRouteRequest [Заголовок раздела «EditorV0Doc006015MarketRouteRequest»](#editorv0doc006015marketrouterequest) `InterfaceDeclaration` · `api-market.ts` ```ts interface EditorV0Doc006015MarketRouteRequest { writebackDir?: string | null; insertText?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0Doc001005MarketRouteRequest [Заголовок раздела «EditorV0Doc001005MarketRouteRequest»](#editorv0doc001005marketrouterequest) `InterfaceDeclaration` · `api-market.ts` ```ts interface EditorV0Doc001005MarketRouteRequest { writebackDir?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0Doc016025MarketRouteRequest [Заголовок раздела «EditorV0Doc016025MarketRouteRequest»](#editorv0doc016025marketrouterequest) `InterfaceDeclaration` · `api-market.ts` ```ts interface EditorV0Doc016025MarketRouteRequest { writebackDir?: string | null; objectDocumentPath?: string | null; linkedDocumentPath?: string | null; updatedLinkedDocumentPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0Doc006015MarketRouteResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D36HeaderFooterStoryVariant»](#d36headerfooterstoryvariant) `TypeAliasDeclaration` · `api-market.ts` ```ts type D36HeaderFooterStoryVariant = "default" | "first" | "even"; ``` ### D36HeaderFooterMarketRequest [Заголовок раздела «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 [Заголовок раздела «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 интерфейсов и 5 псевдонимов типов shell-contract — быстрые блоки: галереи, режимы вставки, выбор и хранилище building blocks. Внутренний контракт Эти типы описывают обмен внутри окна настольного A4. Для встраивания в свой продукт используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). В некоторых типах попадаются служебные метки вида `backlog_id: "D38"` или `sharedSceneOwner: "D5"` — это номера задач, по которым возможность заводилась внутри команды. Они приходят в ответе, но встраиванию не нужны: разбирать и сохранять их незачем. Модуль контракта: `api-quick-parts.ts`. **Типы на этой странице — 11** * [`ShellQuickPartGallery`](#shellquickpartgallery) * [`ShellQuickPartInsertionMode`](#shellquickpartinsertionmode) * [`ShellQuickPartStoryKind`](#shellquickpartstorykind) * [`ShellQuickPartsFieldScope`](#shellquickpartsfieldscope) * [`ShellQuickPartSelection`](#shellquickpartselection) * [`ShellQuickPartTarget`](#shellquickparttarget) * [`ShellQuickPartBuildingBlock`](#shellquickpartbuildingblock) * [`ShellQuickPartsStoreSnapshot`](#shellquickpartsstoresnapshot) * [`ShellQuickPartsDocumentOperation`](#shellquickpartsdocumentoperation) * [`ShellQuickPartsDocumentResult`](#shellquickpartsdocumentresult) * [`FastDocQuickPartsApi`](#fastdocquickpartsapi) ### ShellQuickPartGallery [Заголовок раздела «ShellQuickPartGallery»](#shellquickpartgallery) `TypeAliasDeclaration` · `api-quick-parts.ts` ```ts type ShellQuickPartGallery = "quick-parts" | "autotext"; ``` ### ShellQuickPartInsertionMode [Заголовок раздела «ShellQuickPartInsertionMode»](#shellquickpartinsertionmode) `TypeAliasDeclaration` · `api-quick-parts.ts` ```ts type ShellQuickPartInsertionMode = "content" | "paragraph" | "page"; ``` ### ShellQuickPartStoryKind [Заголовок раздела «ShellQuickPartStoryKind»](#shellquickpartstorykind) `TypeAliasDeclaration` · `api-quick-parts.ts` ```ts type ShellQuickPartStoryKind = "body" | "table-cell" | "header" | "footer" | "footnote" | "endnote" | "text-box"; ``` ### ShellQuickPartsFieldScope [Заголовок раздела «ShellQuickPartsFieldScope»](#shellquickpartsfieldscope) `TypeAliasDeclaration` · `api-quick-parts.ts` ```ts type ShellQuickPartsFieldScope = "current" | "selection" | "all"; ``` ### ShellQuickPartSelection [Заголовок раздела «ShellQuickPartSelection»](#shellquickpartselection) `InterfaceDeclaration` · `api-quick-parts.ts` ```ts interface ShellQuickPartSelection { storyKind: ShellQuickPartStoryKind; storyIndex: number; tableCellIndex: number | null; blockStart: number; blockEnd: number; } ``` ### ShellQuickPartTarget [Заголовок раздела «ShellQuickPartTarget»](#shellquickparttarget) `InterfaceDeclaration` · `api-quick-parts.ts` ```ts interface ShellQuickPartTarget { storyKind: ShellQuickPartStoryKind; storyIndex: number; tableCellIndex: number | null; blockIndex: number | null; insertionMode: ShellQuickPartInsertionMode; } ``` ### ShellQuickPartBuildingBlock [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «ShellQuickPartsDocumentResult»](#shellquickpartsdocumentresult) `InterfaceDeclaration` · `api-quick-parts.ts` ```ts interface ShellQuickPartsDocumentResult extends Record { applied: true; outputPath: string; operationKind: string; reopened: boolean; } ``` ### FastDocQuickPartsApi [Заголовок раздела «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 > 47 интерфейсов и 6 псевдонимов типов shell-contract — рецензирование: примечания, отслеживаемые исправления, снимки обзора и правописание. Внутренний контракт Эти типы описывают обмен внутри окна настольного A4. Для встраивания в свой продукт используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). В некоторых типах попадаются служебные метки вида `backlog_id: "D38"` или `sharedSceneOwner: "D5"` — это номера задач, по которым возможность заводилась внутри команды. Они приходят в ответе, но встраиванию не нужны: разбирать и сохранять их незачем. Модуль контракта: `api-review.ts`. ### ShellCommentAnchorResolution [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «ShellProofingWordCheckRequest»](#shellproofingwordcheckrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellProofingWordCheckRequest { words: Array<{ word: string; language: "en-US" | "ru-RU"; }>; } ``` ### ShellProofingWordCheckResult [Заголовок раздела «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 [Заголовок раздела «ShellProofingDocumentPolicy»](#shellproofingdocumentpolicy) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellProofingDocumentPolicy { schema: "fastdoc.shell.proofing-document-policy.v1"; documentPath: string; trackRevisionsEnabled: boolean; } ``` ### ShellProofingDictionaryResult [Заголовок раздела «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 [Заголовок раздела «ShellReviewActionPreviewOperation»](#shellreviewactionpreviewoperation) `TypeAliasDeclaration` · `api-review.ts` ```ts type ShellReviewActionPreviewOperation = "insert-comment" | "resolve-comment" | "accept-change" | "reject-change"; ``` ### ShellReviewActionPreviewRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «ShellReviewDeleteCommentCopyRequest»](#shellreviewdeletecommentcopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewDeleteCommentCopyRequest { commentId: number; } ``` ### ShellReviewReplyCommentCopyRequest [Заголовок раздела «ShellReviewReplyCommentCopyRequest»](#shellreviewreplycommentcopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewReplyCommentCopyRequest { commentId: number; text?: string; author?: string | null; } ``` ### ShellReviewResolveCommentCopyRequest [Заголовок раздела «ShellReviewResolveCommentCopyRequest»](#shellreviewresolvecommentcopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewResolveCommentCopyRequest { commentId: number; } ``` ### ShellReviewSetCommentResolvedCopyRequest [Заголовок раздела «ShellReviewSetCommentResolvedCopyRequest»](#shellreviewsetcommentresolvedcopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewSetCommentResolvedCopyRequest { commentId: number; resolved: boolean; historySafeOutput?: boolean; } ``` ### ShellReviewResolveAllCommentsCopyRequest [Заголовок раздела «ShellReviewResolveAllCommentsCopyRequest»](#shellreviewresolveallcommentscopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewResolveAllCommentsCopyRequest { requestId?: string; historySafeOutput?: boolean; } ``` ### ShellReviewResolveCommentsAuthorCopyRequest [Заголовок раздела «ShellReviewResolveCommentsAuthorCopyRequest»](#shellreviewresolvecommentsauthorcopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewResolveCommentsAuthorCopyRequest { author: string; historySafeOutput?: boolean; } ``` ### ShellReviewResolveMyCommentsCopyRequest [Заголовок раздела «ShellReviewResolveMyCommentsCopyRequest»](#shellreviewresolvemycommentscopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewResolveMyCommentsCopyRequest { author: string; historySafeOutput?: boolean; } ``` ### ShellReviewAcceptChangeCopyRequest [Заголовок раздела «ShellReviewAcceptChangeCopyRequest»](#shellreviewacceptchangecopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewAcceptChangeCopyRequest { changeId: number; author?: string; changeKind?: string; changeOccurrence?: number; outputPath?: string; historySafeOutput?: boolean; } ``` ### ShellReviewRejectChangeCopyRequest [Заголовок раздела «ShellReviewRejectChangeCopyRequest»](#shellreviewrejectchangecopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewRejectChangeCopyRequest { changeId: number; author?: string; changeKind?: string; changeOccurrence?: number; outputPath?: string; historySafeOutput?: boolean; } ``` ### ShellReviewModeCopyRequest [Заголовок раздела «ShellReviewModeCopyRequest»](#shellreviewmodecopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewModeCopyRequest { enabled?: boolean; outputPath?: string | null; } ``` ### ShellReviewNewDocumentCopyRequest [Заголовок раздела «ShellReviewNewDocumentCopyRequest»](#shellreviewnewdocumentcopyrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellReviewNewDocumentCopyRequest { reviewMode?: "on"; } ``` ### ShellTrackedChangeMarkupModeRequest [Заголовок раздела «ShellTrackedChangeMarkupModeRequest»](#shelltrackedchangemarkupmoderequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellTrackedChangeMarkupModeRequest { mode?: "in-line" | "balloon"; } ``` ### ShellTrackedChangeMarkupModeResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «ShellFieldToolsWritebackRequest»](#shellfieldtoolswritebackrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellFieldToolsWritebackRequest { actionId: ShellFieldToolsActionId; routeId?: "ribbon" | "field-command-center" | "market-launch-center"; } ``` ### ShellDesignToolsWritebackRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «ShellFileInterchangeActionRequest»](#shellfileinterchangeactionrequest) `InterfaceDeclaration` · `api-review.ts` ```ts interface ShellFileInterchangeActionRequest { actionId: ShellFileInterchangeActionId; routeId?: "file-menu" | "document-command-center" | "market-launch-center"; path?: string | null; } ``` ### ShellReviewDeleteCommentCopyResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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; } ``` # DTO · api-smoke.ts > 1 псевдоним типа shell-contract — режимы дымовых прогонов: имена внутренних проверок сборки A4, во встраивании не используются. Внутренний контракт Эти типы описывают обмен внутри окна настольного A4. Для встраивания в свой продукт используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). В некоторых типах попадаются служебные метки вида `backlog_id: "D38"` или `sharedSceneOwner: "D5"` — это номера задач, по которым возможность заводилась внутри команды. Они приходят в ответе, но встраиванию не нужны: разбирать и сохранять их незачем. Модуль контракта: `api-smoke.ts`. **Типы на этой странице — 1** * [`SmokeMode`](#smokemode) ### SmokeMode [Заголовок раздела «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"; // …список оборван: показаны первые 20, всего значений 382 ``` # DTO · api-view.ts > 18 интерфейсов и 6 псевдонимов типов shell-contract — отображение: режимы инспектора, операции отрисовки, текстовые эффекты и описатели печатного вида. Внутренний контракт Эти типы описывают обмен внутри окна настольного A4. Для встраивания в свой продукт используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). В некоторых типах попадаются служебные метки вида `backlog_id: "D38"` или `sharedSceneOwner: "D5"` — это номера задач, по которым возможность заводилась внутри команды. Они приходят в ответе, но встраиванию не нужны: разбирать и сохранять их незачем. Модуль контракта: `api-view.ts`. **Типы на этой странице — 24** * [`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) ### InspectorMode [Заголовок раздела «InspectorMode»](#inspectormode) `TypeAliasDeclaration` · `api-view.ts` ```ts type InspectorMode = "print" | "paginate" | "report" | "review"; ``` ### ShellDrawOpKind [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «EditorV0QuickPrintRangeMode»](#editorv0quickprintrangemode) `TypeAliasDeclaration` · `api-view.ts` ```ts type EditorV0QuickPrintRangeMode = "all" | "current-page" | "selection" | "pages"; ``` ### EditorV0QuickPrintDuplexMode [Заголовок раздела «EditorV0QuickPrintDuplexMode»](#editorv0quickprintduplexmode) `TypeAliasDeclaration` · `api-view.ts` ```ts type EditorV0QuickPrintDuplexMode = "one-sided" | "long-edge" | "short-edge"; ``` ### EditorV0QuickPrintDispatchMode [Заголовок раздела «EditorV0QuickPrintDispatchMode»](#editorv0quickprintdispatchmode) `TypeAliasDeclaration` · `api-view.ts` ```ts type EditorV0QuickPrintDispatchMode = "plan-only" | "native-print-test-dry-run" | "native-print-dialog" | "native-print"; ``` ### EditorV0QuickPrintSelectionGeometry [Заголовок раздела «EditorV0QuickPrintSelectionGeometry»](#editorv0quickprintselectiongeometry) `InterfaceDeclaration` · `api-view.ts` ```ts interface EditorV0QuickPrintSelectionGeometry { anchorXMilliPx: number; anchorYMilliPx: number; focusXMilliPx: number; focusYMilliPx: number; lineLocation: string; } ``` ### EditorV0QuickPrintPlanRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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; } ``` # DTO · Поля, сноски и ссылки > 34 интерфейса и 8 псевдонимов типов модуля `api-edit.ts` — сноски, оглавление, библиография, указатели, слияние и поля форм. Внутренний контракт Эти типы описывают обмен внутри окна настольного A4. Для встраивания в свой продукт используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). В некоторых типах попадаются служебные метки вида `backlog_id: "D38"` или `sharedSceneOwner: "D5"` — это номера задач, по которым возможность заводилась внутри команды. Они приходят в ответе, но встраиванию не нужны: разбирать и сохранять их незачем. Модуль контракта: `api-edit.ts`. Другие темы модуля: [Текст и абзацы](/reference/a4/dto-edit-text/) · [Таблицы: структура](/reference/a4/dto-edit-table-structure/) · [Таблицы: ячейки и оформление](/reference/a4/dto-edit-table-cells/) · [Таблицы: размещение на странице](/reference/a4/dto-edit-table-layout/) · [Разметка и структура документа](/reference/a4/dto-edit-page/) · [Объекты и рисунки](/reference/a4/dto-edit-objects/) · **Поля, сноски и ссылки**. ### EditorV0InsertDateFieldRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «EditorV0DateFieldKind»](#editorv0datefieldkind) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0DateFieldKind = "date" | "date-time"; ``` ### EditorV0UpdateDateFieldResultRequest [Заголовок раздела «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 [Заголовок раздела «EditorV0InsertFootnoteRequest»](#editorv0insertfootnoterequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertFootnoteRequest { paragraphIndex: number; offset?: number | null; noteText?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0ManageNoteKind [Заголовок раздела «EditorV0ManageNoteKind»](#editorv0managenotekind) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0ManageNoteKind = "footnote" | "endnote"; ``` ### EditorV0ManageNoteAction [Заголовок раздела «EditorV0ManageNoteAction»](#editorv0managenoteaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0ManageNoteAction = "edit" | "delete"; ``` ### EditorV0ManageNoteRequest [Заголовок раздела «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 [Заголовок раздела «EditorV0CrossReferenceFieldKind»](#editorv0crossreferencefieldkind) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0CrossReferenceFieldKind = "REF" | "PAGEREF" | "NOTEREF"; ``` ### EditorV0InsertCrossReferenceRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «EditorV0UpdateSequenceFieldResultRequest»](#editorv0updatesequencefieldresultrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0UpdateSequenceFieldResultRequest { paragraphIndex: number; fieldLabel: string; currentResult: string; updatedResult: string; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0BibliographyStyleRequest [Заголовок раздела «EditorV0BibliographyStyleRequest»](#editorv0bibliographystylerequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0BibliographyStyleRequest { selectedStyle: string; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0BibliographyCommandAction [Заголовок раздела «EditorV0BibliographyCommandAction»](#editorv0bibliographycommandaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0BibliographyCommandAction = "insert-citation" | "add-source" | "insert-bibliography"; ``` ### EditorV0BibliographyCommandRequest [Заголовок раздела «EditorV0BibliographyCommandRequest»](#editorv0bibliographycommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0BibliographyCommandRequest { action: EditorV0BibliographyCommandAction; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0IndexAuthoritiesCommandAction [Заголовок раздела «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 [Заголовок раздела «EditorV0IndexAuthoritiesCommandRequest»](#editorv0indexauthoritiescommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0IndexAuthoritiesCommandRequest { action: EditorV0IndexAuthoritiesCommandAction; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0MailMergeCommandAction [Заголовок раздела «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 [Заголовок раздела «EditorV0MailMergeCommandRequest»](#editorv0mailmergecommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0MailMergeCommandRequest { action: EditorV0MailMergeCommandAction; recordIndex?: number | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0FormsFieldsBusinessAction [Заголовок раздела «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 [Заголовок раздела «EditorV0FormsFieldsBusinessRequest»](#editorv0formsfieldsbusinessrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0FormsFieldsBusinessRequest { action: EditorV0FormsFieldsBusinessAction; dataSourcePath?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0InsertEndnoteRequest [Заголовок раздела «EditorV0InsertEndnoteRequest»](#editorv0insertendnoterequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertEndnoteRequest { paragraphIndex: number; offset?: number | null; noteText?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0InsertHyperlinkRequest [Заголовок раздела «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 [Заголовок раздела «EditorV0InsertBookmarkRequest»](#editorv0insertbookmarkrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertBookmarkRequest { paragraphIndex: number; offset: number; deleteCount: number; bookmarkName: string; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0InsertDateFieldResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 · Объекты и рисунки > 29 интерфейсов и 2 псевдонима типов модуля `api-edit.ts` — изображения, фигуры, формулы и другие вставляемые объекты. Внутренний контракт Эти типы описывают обмен внутри окна настольного A4. Для встраивания в свой продукт используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). В некоторых типах попадаются служебные метки вида `backlog_id: "D38"` или `sharedSceneOwner: "D5"` — это номера задач, по которым возможность заводилась внутри команды. Они приходят в ответе, но встраиванию не нужны: разбирать и сохранять их незачем. Модуль контракта: `api-edit.ts`. Другие темы модуля: [Текст и абзацы](/reference/a4/dto-edit-text/) · [Таблицы: структура](/reference/a4/dto-edit-table-structure/) · [Таблицы: ячейки и оформление](/reference/a4/dto-edit-table-cells/) · [Таблицы: размещение на странице](/reference/a4/dto-edit-table-layout/) · [Разметка и структура документа](/reference/a4/dto-edit-page/) · **Объекты и рисунки** · [Поля, сноски и ссылки](/reference/a4/dto-edit-fields/). ### EditorV0InsertImageObjectRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «EditorV0EquationSymbolAuthoringRequest»](#editorv0equationsymbolauthoringrequest) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0EquationSymbolAuthoringRequest = EditorV0InsertEquationObjectRequest; ``` ### EditorV0EditEquationObjectRequest [Заголовок раздела «EditorV0EditEquationObjectRequest»](#editorv0editequationobjectrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0EditEquationObjectRequest { equationIndex?: number | null; text: string; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0ResizeDrawingObjectRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «EditorV0DistributeDrawingObjectsRequest»](#editorv0distributedrawingobjectsrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0DistributeDrawingObjectsRequest { objectLocations: string[]; axis: "horizontal" | "vertical"; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0SetDrawingObjectStyleRequest [Заголовок раздела «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 [Заголовок раздела «EditorV0DeleteDrawingObjectRequest»](#editorv0deletedrawingobjectrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0DeleteDrawingObjectRequest { objectLocation?: string | null; sourceLocation?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0SetDrawingObjectAnchorLockRequest [Заголовок раздела «EditorV0SetDrawingObjectAnchorLockRequest»](#editorv0setdrawingobjectanchorlockrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0SetDrawingObjectAnchorLockRequest { objectLocation?: string | null; sourceLocation?: string | null; locked: boolean; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0GroupDrawingObjectsRequest [Заголовок раздела «EditorV0GroupDrawingObjectsRequest»](#editorv0groupdrawingobjectsrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0GroupDrawingObjectsRequest { objectLocations: string[]; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0UngroupDrawingObjectRequest [Заголовок раздела «EditorV0UngroupDrawingObjectRequest»](#editorv0ungroupdrawingobjectrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0UngroupDrawingObjectRequest { objectLocation?: string | null; sourceLocation?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0EditDrawingObjectTextRequest [Заголовок раздела «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 [Заголовок раздела «EditorV0InsertObjectTextFileSourceResult»](#editorv0insertobjecttextfilesourceresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertObjectTextFileSourceResult { canceled: boolean; path: string | null; text: string; length: number; } ``` ### EditorV0InsertImageObjectResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «EditorV0EquationSymbolAuthoringResult»](#editorv0equationsymbolauthoringresult) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0EquationSymbolAuthoringResult = EditorV0InsertEquationObjectResult; ``` ### EditorV0EditEquationObjectResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 · Разметка и структура документа > 19 интерфейсов и 11 псевдонимов типов модуля `api-edit.ts` — разделы, размер и ориентация страницы, колонтитулы, нумерация строк, переносы и режим структуры. Внутренний контракт Эти типы описывают обмен внутри окна настольного A4. Для встраивания в свой продукт используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). В некоторых типах попадаются служебные метки вида `backlog_id: "D38"` или `sharedSceneOwner: "D5"` — это номера задач, по которым возможность заводилась внутри команды. Они приходят в ответе, но встраиванию не нужны: разбирать и сохранять их незачем. Модуль контракта: `api-edit.ts`. Другие темы модуля: [Текст и абзацы](/reference/a4/dto-edit-text/) · [Таблицы: структура](/reference/a4/dto-edit-table-structure/) · [Таблицы: ячейки и оформление](/reference/a4/dto-edit-table-cells/) · [Таблицы: размещение на странице](/reference/a4/dto-edit-table-layout/) · **Разметка и структура документа** · [Объекты и рисунки](/reference/a4/dto-edit-objects/) · [Поля, сноски и ссылки](/reference/a4/dto-edit-fields/). **Типы на этой странице — 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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «EditorV0ContentControlsRequest»](#editorv0contentcontrolsrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ContentControlsRequest { request: Record; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0ContentControlsResult [Заголовок раздела «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 [Заголовок раздела «D36CombinedSectionStart»](#d36combinedsectionstart) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36CombinedSectionStart = "next-page" | "continuous" | "even-page" | "odd-page"; ``` ### D36CombinedPaperSize [Заголовок раздела «D36CombinedPaperSize»](#d36combinedpapersize) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36CombinedPaperSize = "A4" | "Letter"; ``` ### D36CombinedOrientation [Заголовок раздела «D36CombinedOrientation»](#d36combinedorientation) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36CombinedOrientation = "portrait" | "landscape"; ``` ### D36CombinedMarginPreset [Заголовок раздела «D36CombinedMarginPreset»](#d36combinedmarginpreset) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36CombinedMarginPreset = "normal" | "narrow" | "moderate" | "wide"; ``` ### D36CombinedSectionCommandRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D36SectionPresetVisibleWorkflowCommand»](#d36sectionpresetvisibleworkflowcommand) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36SectionPresetVisibleWorkflowCommand = "section-preset-a4" | "section-preset-landscape" | "section-preset-first-page" | "section-preset-narrow-margins"; ``` ### D36SectionPresetVisibleWorkflowRequest [Заголовок раздела «D36SectionPresetVisibleWorkflowRequest»](#d36sectionpresetvisibleworkflowrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D36SectionPresetVisibleWorkflowRequest { command: D36SectionPresetVisibleWorkflowCommand; paragraphIndex: number; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### D36SectionPresetVisibleWorkflowResult [Заголовок раздела «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 [Заголовок раздела «D36LineNumbersCommand»](#d36linenumberscommand) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36LineNumbersCommand = "none" | "continuous" | "restart-page" | "restart-section" | "suppress-current-paragraph"; ``` ### D36LineNumbersContinuousRequest [Заголовок раздела «D36LineNumbersContinuousRequest»](#d36linenumberscontinuousrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D36LineNumbersContinuousRequest { command?: D36LineNumbersCommand; paragraphIndex: number; paragraphIndexes?: number[]; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### D36LineNumbersContinuousResult [Заголовок раздела «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 [Заголовок раздела «D36HyphenationCommand»](#d36hyphenationcommand) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36HyphenationCommand = "none" | "auto"; ``` ### D36HyphenationRequest [Заголовок раздела «D36HyphenationRequest»](#d36hyphenationrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D36HyphenationRequest { command?: D36HyphenationCommand; paragraphIndex: number; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### D36HyphenationResult [Заголовок раздела «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 [Заголовок раздела «D36HeaderFooterEditModeStoryKind»](#d36headerfootereditmodestorykind) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36HeaderFooterEditModeStoryKind = "header" | "footer"; ``` ### D36HeaderFooterEditModeStoryVariant [Заголовок раздела «D36HeaderFooterEditModeStoryVariant»](#d36headerfootereditmodestoryvariant) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36HeaderFooterEditModeStoryVariant = "default" | "first" | "even"; ``` ### D36HeaderFooterEditModeSaveRequest [Заголовок раздела «D36HeaderFooterEditModeSaveRequest»](#d36headerfootereditmodesaverequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D36HeaderFooterEditModeSaveRequest { storyKind: D36HeaderFooterEditModeStoryKind; storyVariant?: D36HeaderFooterEditModeStoryVariant; text: string; paragraphIndex: number; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### D36HeaderFooterEditModeSaveResult [Заголовок раздела «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 [Заголовок раздела «D36HeaderFooterRemoveOperationKind»](#d36headerfooterremoveoperationkind) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D36HeaderFooterRemoveOperationKind = "remove-default-header" | "remove-default-footer"; ``` ### D36HeaderFooterRemoveRequest [Заголовок раздела «D36HeaderFooterRemoveRequest»](#d36headerfooterremoverequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D36HeaderFooterRemoveRequest { storyKind: D36HeaderFooterEditModeStoryKind; paragraphIndex: number; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### D36HeaderFooterRemoveResult [Заголовок раздела «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 · Таблицы: ячейки и оформление > 55 интерфейсов и 20 псевдонимов типов модуля `api-edit.ts` — содержимое ячеек, границы, заливка, объединение и выравнивание. Внутренний контракт Эти типы описывают обмен внутри окна настольного A4. Для встраивания в свой продукт используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). В некоторых типах попадаются служебные метки вида `backlog_id: "D38"` или `sharedSceneOwner: "D5"` — это номера задач, по которым возможность заводилась внутри команды. Они приходят в ответе, но встраиванию не нужны: разбирать и сохранять их незачем. Модуль контракта: `api-edit.ts`. Другие темы модуля: [Текст и абзацы](/reference/a4/dto-edit-text/) · [Таблицы: структура](/reference/a4/dto-edit-table-structure/) · **Таблицы: ячейки и оформление** · [Таблицы: размещение на странице](/reference/a4/dto-edit-table-layout/) · [Разметка и структура документа](/reference/a4/dto-edit-page/) · [Объекты и рисунки](/reference/a4/dto-edit-objects/) · [Поля, сноски и ссылки](/reference/a4/dto-edit-fields/). ### ShellTableCellBorder [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableSelectionPencilEraserRange»](#d37tableselectionpencileraserrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionPencilEraserRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionPencilEraserRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableEqualizeMode»](#d37tableequalizemode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableEqualizeMode = "row-heights" | "column-widths" | "column-widths-from-existing"; ``` ### D37TableEqualizeRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableSelectionEqualizeColumnsAction»](#d37tableselectionequalizecolumnsaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionEqualizeColumnsAction = "equalize-selected-table-columns"; ``` ### D37TableSelectionEqualizeColumnsRange [Заголовок раздела «D37TableSelectionEqualizeColumnsRange»](#d37tableselectionequalizecolumnsrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionEqualizeColumnsRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionEqualizeColumnsRequest [Заголовок раздела «D37TableSelectionEqualizeColumnsRequest»](#d37tableselectionequalizecolumnsrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionEqualizeColumnsRequest { selection: D37TableSelectionEqualizeColumnsRange; action: D37TableSelectionEqualizeColumnsAction; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionEqualizeColumnsResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableStyleRequest»](#d37tablestylerequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableStyleRequest { bodyBlockIndex: number; styleKind?: "banded-blue" | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableStyleResult [Заголовок раздела «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 [Заголовок раздела «D37TableStyleOptions»](#d37tablestyleoptions) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableStyleOptions { headerRow: boolean; totalRow: boolean; bandedRows: boolean; firstColumn: boolean; lastColumn: boolean; bandedColumns: boolean; } ``` ### D37TableCellRangeFormatRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableSelectionCellRangeFormatPreset»](#d37tableselectioncellrangeformatpreset) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionCellRangeFormatPreset = "market-emphasis" | "review-attention"; ``` ### D37TableSelectionCellRangeFormatRange [Заголовок раздела «D37TableSelectionCellRangeFormatRange»](#d37tableselectioncellrangeformatrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionCellRangeFormatRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionCellRangeFormatRequest [Заголовок раздела «D37TableSelectionCellRangeFormatRequest»](#d37tableselectioncellrangeformatrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionCellRangeFormatRequest { selection: D37TableSelectionCellRangeFormatRange; preset: D37TableSelectionCellRangeFormatPreset; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionCellRangeFormatResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableSelectionAllBordersAction»](#d37tableselectionallbordersaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionAllBordersAction = "set-selected-all-borders" | "clear-selected-all-borders"; ``` ### D37TableSelectionAllBordersRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableSelectionOutsideBordersAction»](#d37tableselectionoutsidebordersaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionOutsideBordersAction = "set-selected-outside-borders" | "clear-selected-outside-borders"; ``` ### D37TableSelectionOutsideBordersRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableSelectionInsideBordersAction»](#d37tableselectioninsidebordersaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionInsideBordersAction = "set-selected-inside-borders" | "clear-selected-inside-borders"; ``` ### D37TableSelectionInsideBordersRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableAlignmentMode»](#d37tablealignmentmode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableAlignmentMode = "left" | "center" | "right"; ``` ### D37TableAlignmentRequest [Заголовок раздела «D37TableAlignmentRequest»](#d37tablealignmentrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableAlignmentRequest { bodyBlockIndex: number; alignment: D37TableAlignmentMode; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableAlignmentResult [Заголовок раздела «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 [Заголовок раздела «D37TableSelectionAlignmentAction»](#d37tableselectionalignmentaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionAlignmentAction = "align-selected-table-left" | "align-selected-table-center" | "align-selected-table-right"; ``` ### D37TableSelectionAlignmentRange [Заголовок раздела «D37TableSelectionAlignmentRange»](#d37tableselectionalignmentrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionAlignmentRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionAlignmentRequest [Заголовок раздела «D37TableSelectionAlignmentRequest»](#d37tableselectionalignmentrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionAlignmentRequest { selection: D37TableSelectionAlignmentRange; action: D37TableSelectionAlignmentAction; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionAlignmentResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableWidthMode»](#d37tablewidthmode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableWidthMode = "centimeters" | "percent" | "fit-contents" | "fit-window" | "fixed-column-width"; ``` ### D37TableWidthRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableSelectionWidthFitAction»](#d37tableselectionwidthfitaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionWidthFitAction = "fit-selected-table-to-contents"; ``` ### D37TableSelectionWidthFitRange [Заголовок раздела «D37TableSelectionWidthFitRange»](#d37tableselectionwidthfitrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionWidthFitRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionWidthFitRequest [Заголовок раздела «D37TableSelectionWidthFitRequest»](#d37tableselectionwidthfitrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionWidthFitRequest { selection: D37TableSelectionWidthFitRange; action: D37TableSelectionWidthFitAction; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionWidthFitResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableCellContentVerticalAlignment»](#d37tablecellcontentverticalalignment) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableCellContentVerticalAlignment = "top" | "center" | "middle" | "bottom"; ``` ### D37TableCellContentHorizontalAlignment [Заголовок раздела «D37TableCellContentHorizontalAlignment»](#d37tablecellcontenthorizontalalignment) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableCellContentHorizontalAlignment = "left" | "center" | "right"; ``` ### D37TableCellContentAlignmentRequest [Заголовок раздела «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 [Заголовок раздела «D37TableCellVerticalAlignment»](#d37tablecellverticalalignment) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableCellVerticalAlignment = "top" | "center" | "middle" | "bottom"; ``` ### D37TableCellVerticalAlignmentMode [Заголовок раздела «D37TableCellVerticalAlignmentMode»](#d37tablecellverticalalignmentmode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableCellVerticalAlignmentMode = "cell" | "range"; ``` ### D37TableCellVerticalAlignmentRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableCellTextDirection»](#d37tablecelltextdirection) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableCellTextDirection = "horizontal" | "normal" | "rotate_down" | "down" | "vertical" | "rotate_up" | "up" | "0deg" | "90deg" | "270deg" | "-90deg"; ``` ### D37TableCellTextDirectionMode [Заголовок раздела «D37TableCellTextDirectionMode»](#d37tablecelltextdirectionmode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableCellTextDirectionMode = "single" | "range"; ``` ### D37TableCellTextDirectionRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «EditorV0TableCellTextRangeEndpoint»](#editorv0tablecelltextrangeendpoint) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0TableCellTextRangeEndpoint = EditorV0TableCellParagraphTextTarget & { offset: number; }; ``` # DTO · Таблицы: размещение на странице > 27 интерфейсов и 6 псевдонимов типов модуля `api-edit.ts` — обтекание, плавающие таблицы, автоподбор и отступы. Внутренний контракт Эти типы описывают обмен внутри окна настольного A4. Для встраивания в свой продукт используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). В некоторых типах попадаются служебные метки вида `backlog_id: "D38"` или `sharedSceneOwner: "D5"` — это номера задач, по которым возможность заводилась внутри команды. Они приходят в ответе, но встраиванию не нужны: разбирать и сохранять их незачем. Модуль контракта: `api-edit.ts`. Другие темы модуля: [Текст и абзацы](/reference/a4/dto-edit-text/) · [Таблицы: структура](/reference/a4/dto-edit-table-structure/) · [Таблицы: ячейки и оформление](/reference/a4/dto-edit-table-cells/) · **Таблицы: размещение на странице** · [Разметка и структура документа](/reference/a4/dto-edit-page/) · [Объекты и рисунки](/reference/a4/dto-edit-objects/) · [Поля, сноски и ссылки](/reference/a4/dto-edit-fields/). ### D37TableColumnAutofitRequest [Заголовок раздела «D37TableColumnAutofitRequest»](#d37tablecolumnautofitrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableColumnAutofitRequest { bodyBlockIndex: number; columnIndex: number; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableColumnAutofitResult [Заголовок раздела «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 [Заголовок раздела «D37TableSelectionColumnAutofitStrategy»](#d37tableselectioncolumnautofitstrategy) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionColumnAutofitStrategy = "widest-content-column"; ``` ### D37TableSelectionColumnAutofitRange [Заголовок раздела «D37TableSelectionColumnAutofitRange»](#d37tableselectioncolumnautofitrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionColumnAutofitRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionColumnAutofitRequest [Заголовок раздела «D37TableSelectionColumnAutofitRequest»](#d37tableselectioncolumnautofitrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionColumnAutofitRequest { selection: D37TableSelectionColumnAutofitRange; strategy: D37TableSelectionColumnAutofitStrategy; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionColumnAutofitResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableCellSpacingRequest»](#d37tablecellspacingrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCellSpacingRequest { bodyBlockIndex: number; spacingTwips: number; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableCellSpacingResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableWrappingStyleMode»](#d37tablewrappingstylemode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableWrappingStyleMode = "inline" | "floating"; ``` ### D37TableWrappingStyleRequest [Заголовок раздела «D37TableWrappingStyleRequest»](#d37tablewrappingstylerequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableWrappingStyleRequest { bodyBlockIndex: number; wrappingStyle: D37TableWrappingStyleMode; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableWrappingStyleResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableAutofitToWindowAction»](#d37tableautofittowindowaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableAutofitToWindowAction = "fit-selected-table-to-window"; ``` ### D37TableAutofitToWindowRequest [Заголовок раздела «D37TableAutofitToWindowRequest»](#d37tableautofittowindowrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableAutofitToWindowRequest { selection: D37TableSelectionWidthFitRange; action: D37TableAutofitToWindowAction; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableAutofitToWindowResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableFixedColumnWidthAction»](#d37tablefixedcolumnwidthaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableFixedColumnWidthAction = "fixed-selected-table-column-width"; ``` ### D37TableFixedColumnWidthRequest [Заголовок раздела «D37TableFixedColumnWidthRequest»](#d37tablefixedcolumnwidthrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableFixedColumnWidthRequest { selection: D37TableSelectionWidthFitRange; action: D37TableFixedColumnWidthAction; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableFixedColumnWidthResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableCellMarginsMode»](#d37tablecellmarginsmode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableCellMarginsMode = "cell" | "range" | "default-from-cell"; ``` ### D37TableCellMarginsRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableCellTextWrappingMode»](#d37tablecelltextwrappingmode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableCellTextWrappingMode = "cell" | "range"; ``` ### D37TableCellTextWrappingRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 · Таблицы: структура > 60 интерфейсов и 14 псевдонимов типов модуля `api-edit.ts` — создание таблиц, строки и столбцы, выделение и правка сетки. Внутренний контракт Эти типы описывают обмен внутри окна настольного A4. Для встраивания в свой продукт используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). В некоторых типах попадаются служебные метки вида `backlog_id: "D38"` или `sharedSceneOwner: "D5"` — это номера задач, по которым возможность заводилась внутри команды. Они приходят в ответе, но встраиванию не нужны: разбирать и сохранять их незачем. Модуль контракта: `api-edit.ts`. Другие темы модуля: [Текст и абзацы](/reference/a4/dto-edit-text/) · **Таблицы: структура** · [Таблицы: ячейки и оформление](/reference/a4/dto-edit-table-cells/) · [Таблицы: размещение на странице](/reference/a4/dto-edit-table-layout/) · [Разметка и структура документа](/reference/a4/dto-edit-page/) · [Объекты и рисунки](/reference/a4/dto-edit-objects/) · [Поля, сноски и ссылки](/reference/a4/dto-edit-fields/). ### D37TableRangeRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableCreateRequest»](#d37tablecreaterequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableCreateRequest { bodyBlockIndex: number; clipboardText?: string; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableCreateResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37AnyTableCreateResult»](#d37anytablecreateresult) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37AnyTableCreateResult = D37TableCreateResult | D37TableGridCreateResult; ``` ### EditorV0InsertTableCaptionRequest [Заголовок раздела «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 [Заголовок раздела «EditorV0UpdateTableRequest»](#editorv0updatetablerequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0UpdateTableRequest { reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0TableOfFiguresRequest [Заголовок раздела «EditorV0TableOfFiguresRequest»](#editorv0tableoffiguresrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0TableOfFiguresRequest { captionLabel?: string | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0InsertTableCaptionResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableMouseDrawSemanticRequest»](#d37tablemousedrawsemanticrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableMouseDrawSemanticRequest { bodyBlockIndex: number; rowCount: number; columnCount: number; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableMouseDrawSemanticResult [Заголовок раздела «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 [Заголовок раздела «D37TableSelectionResizeAxis»](#d37tableselectionresizeaxis) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionResizeAxis = "column-width" | "row-height"; ``` ### D37TableSelectionResizeEdge [Заголовок раздела «D37TableSelectionResizeEdge»](#d37tableselectionresizeedge) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionResizeEdge = "left" | "right" | "bottom"; ``` ### D37TableSelectionResizeRange [Заголовок раздела «D37TableSelectionResizeRange»](#d37tableselectionresizerange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionResizeRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionResizeRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableTemplateRequest»](#d37tabletemplaterequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableTemplateRequest { bodyBlockIndex: number; templateKind?: "banded-blue" | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableTemplateResult [Заголовок раздела «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 [Заголовок раздела «D37TableHeaderRowMode»](#d37tableheaderrowmode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableHeaderRowMode = "set"; ``` ### D37TableHeaderRowRequest [Заголовок раздела «D37TableHeaderRowRequest»](#d37tableheaderrowrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableHeaderRowRequest { bodyBlockIndex: number; headerRowMode?: D37TableHeaderRowMode | null; styleOptions?: D37TableStyleOptions | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableHeaderRowResult [Заголовок раздела «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 [Заголовок раздела «D37TableHeaderRepeatMode»](#d37tableheaderrepeatmode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableHeaderRepeatMode = "repeat" | "clear"; ``` ### D37TableHeaderRepeatRequest [Заголовок раздела «D37TableHeaderRepeatRequest»](#d37tableheaderrepeatrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableHeaderRepeatRequest { bodyBlockIndex: number; repeatMode?: D37TableHeaderRepeatMode | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableHeaderRepeatResult [Заголовок раздела «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 [Заголовок раздела «D37TableDataCommandKind»](#d37tabledatacommandkind) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableDataCommandKind = "sort-table-ascending" | "convert-table-to-text"; ``` ### D37TableTextSeparator [Заголовок раздела «D37TableTextSeparator»](#d37tabletextseparator) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableTextSeparator = "paragraphs" | "tabs" | "semicolons" | "other"; ``` ### D37TableSortValueType [Заголовок раздела «D37TableSortValueType»](#d37tablesortvaluetype) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSortValueType = "text" | "number" | "date"; ``` ### D37TableSortDirection [Заголовок раздела «D37TableSortDirection»](#d37tablesortdirection) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSortDirection = "ascending" | "descending"; ``` ### D37TableSortHeaderMode [Заголовок раздела «D37TableSortHeaderMode»](#d37tablesortheadermode) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSortHeaderMode = "header" | "no-header"; ``` ### D37TableSortKey [Заголовок раздела «D37TableSortKey»](#d37tablesortkey) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSortKey { columnIndex: number; valueType: D37TableSortValueType; direction: D37TableSortDirection; } ``` ### D37TableDataCommandRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableSelectionHeaderRepeatAction»](#d37tableselectionheaderrepeataction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionHeaderRepeatAction = "repeat-selected-header-row"; ``` ### D37TableSelectionHeaderRepeatRange [Заголовок раздела «D37TableSelectionHeaderRepeatRange»](#d37tableselectionheaderrepeatrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionHeaderRepeatRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionHeaderRepeatRequest [Заголовок раздела «D37TableSelectionHeaderRepeatRequest»](#d37tableselectionheaderrepeatrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionHeaderRepeatRequest { selection: D37TableSelectionHeaderRepeatRange; action: D37TableSelectionHeaderRepeatAction; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionHeaderRepeatResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableSelectionClearFillRequest»](#d37tableselectionclearfillrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionClearFillRequest { selection: D37TableSelectionCellRangeFormatRange; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionClearFillResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableSelectionClearContentsRequest»](#d37tableselectionclearcontentsrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionClearContentsRequest { selection: D37TableSelectionCellRangeFormatRange; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionClearContentsResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableSelectionClearFormattingRequest»](#d37tableselectionclearformattingrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionClearFormattingRequest { selection: D37TableSelectionCellRangeFormatRange; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionClearFormattingResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableSelectionClearContentFormatRequest»](#d37tableselectionclearcontentformatrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionClearContentFormatRequest { selection: D37TableSelectionCellRangeFormatRange; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionClearContentFormatResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableSelectionRange»](#d37tableselectionrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionStructureEditRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableSelectionRowFitAction»](#d37tableselectionrowfitaction) `TypeAliasDeclaration` · `api-edit.ts` ```ts type D37TableSelectionRowFitAction = "fit-selected-table-row-to-contents"; ``` ### D37TableSelectionRowFitRange [Заголовок раздела «D37TableSelectionRowFitRange»](#d37tableselectionrowfitrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionRowFitRange { bodyBlockIndex: number; rowIndex: number; columnIndex: number; rowCount: number; columnCount: number; } ``` ### D37TableSelectionRowFitRequest [Заголовок раздела «D37TableSelectionRowFitRequest»](#d37tableselectionrowfitrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableSelectionRowFitRequest { selection: D37TableSelectionRowFitRange; action?: D37TableSelectionRowFitAction | null; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableSelectionRowFitResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «D37TableAltTextRequest»](#d37tablealttextrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface D37TableAltTextRequest { bodyBlockIndex: number; title: string; description: string; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### D37TableAltTextResult [Заголовок раздела «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 · Текст и абзацы > 49 интерфейсов и 7 псевдонимов типов модуля `api-edit.ts` — правка текста, абзацы, списки, шрифты, буфер обмена и история. Внутренний контракт Эти типы описывают обмен внутри окна настольного A4. Для встраивания в свой продукт используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). В некоторых типах попадаются служебные метки вида `backlog_id: "D38"` или `sharedSceneOwner: "D5"` — это номера задач, по которым возможность заводилась внутри команды. Они приходят в ответе, но встраиванию не нужны: разбирать и сохранять их незачем. Модуль контракта: `api-edit.ts`. Другие темы модуля: **Текст и абзацы** · [Таблицы: структура](/reference/a4/dto-edit-table-structure/) · [Таблицы: ячейки и оформление](/reference/a4/dto-edit-table-cells/) · [Таблицы: размещение на странице](/reference/a4/dto-edit-table-layout/) · [Разметка и структура документа](/reference/a4/dto-edit-page/) · [Объекты и рисунки](/reference/a4/dto-edit-objects/) · [Поля, сноски и ссылки](/reference/a4/dto-edit-fields/). ### MenuCommand [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «ShellObservedBreak»](#shellobservedbreak) `InterfaceDeclaration` · `api-edit.ts` ```ts interface ShellObservedBreak { break_kind: string; location: string; detail: string; } ``` ### ShellReportSnapshot [Заголовок раздела «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 [Заголовок раздела «ShellFixtureOption»](#shellfixtureoption) `InterfaceDeclaration` · `api-edit.ts` ```ts interface ShellFixtureOption { key: string; label: string; path: string; description: string; } ``` ### ShellParagraphTabStop [Заголовок раздела «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 [Заголовок раздела «ShellComposedLineFragment»](#shellcomposedlinefragment) `InterfaceDeclaration` · `api-edit.ts` ```ts interface ShellComposedLineFragment { text: string; width_milli_px: number; } ``` ### ShellComposedParagraphLine [Заголовок раздела «ShellComposedParagraphLine»](#shellcomposedparagraphline) `InterfaceDeclaration` · `api-edit.ts` ```ts interface ShellComposedParagraphLine { text: string; fragments: ShellComposedLineFragment[]; } ``` ### ShellComposedParagraph [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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"; // …список оборван: показаны первые 20, всего значений 245 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 [Заголовок раздела «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 [Заголовок раздела «EditorV0InsertDropCapKind»](#editorv0insertdropcapkind) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0InsertDropCapKind = "none" | "drop" | "margin"; ``` ### EditorV0InsertBreakRequest [Заголовок раздела «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 [Заголовок раздела «EditorV0InsertDropCapRequest»](#editorv0insertdropcaprequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0InsertDropCapRequest { dropCapKind: EditorV0InsertDropCapKind; paragraphIndex: number; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0InsertBreakResult [Заголовок раздела «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 [Заголовок раздела «EditorV0AddTextLevel»](#editorv0addtextlevel) `TypeAliasDeclaration` · `api-edit.ts` ```ts type EditorV0AddTextLevel = "none" | "1" | "2" | "3"; ``` ### EditorV0AddTextRequest [Заголовок раздела «EditorV0AddTextRequest»](#editorv0addtextrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0AddTextRequest { paragraphIndex: number; level: EditorV0AddTextLevel; reopenAfterWrite?: boolean; outputPath?: string | null; } ``` ### EditorV0InsertDropCapResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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"; // …список оборван: показаны первые 20, всего значений 248 outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0ParagraphStructureResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «EditorV0ToolbarFormatBatchCommandRequest»](#editorv0toolbarformatbatchcommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ToolbarFormatBatchCommandRequest { commands: EditorV0ToolbarFormatCommandRequest[]; reopenAfterWrite?: boolean; } ``` ### EditorV0ToolbarFormatBatchCommandResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «EditorV0UpdateStyleFromSelectionRequest»](#editorv0updatestylefromselectionrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0UpdateStyleFromSelectionRequest { styleId: "FastDocWritingHeading"; styleName: "FastDoc Writing Heading"; paragraphIndexes: number[]; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0UpdateStyleFromSelectionResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «EditorV0HomeStyleFormat»](#editorv0homestyleformat) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0HomeStyleFormat { paragraph: EditorV0HomeParagraphFormat; character: EditorV0HomeCharacterFormat; } ``` ### EditorV0HomeStyleDefinition [Заголовок раздела «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 [Заголовок раздела «EditorV0HomeParagraphState»](#editorv0homeparagraphstate) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0HomeParagraphState { paragraphIndex: number; text: string; styleId: string; hasNumbering: boolean; format: EditorV0HomeParagraphFormat; } ``` ### EditorV0HomeFormattingSnapshot [Заголовок раздела «EditorV0HomeFormattingSnapshot»](#editorv0homeformattingsnapshot) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0HomeFormattingSnapshot { schema: "fastdoc.home-formatting-state.v1"; defaultTabStopTwips: number; styles: EditorV0HomeStyleDefinition[]; paragraphs: EditorV0HomeParagraphState[]; } ``` ### EditorV0HomeFormattingOperation [Заголовок раздела «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 [Заголовок раздела «EditorV0HomeFormattingRequest»](#editorv0homeformattingrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0HomeFormattingRequest { operations: EditorV0HomeFormattingOperation[]; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0HomeFormattingResult [Заголовок раздела «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 [Заголовок раздела «EditorV0ParagraphLayoutBatchCommandRequest»](#editorv0paragraphlayoutbatchcommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphLayoutBatchCommandRequest { commands: EditorV0ParagraphLayoutCommandRequest[]; reopenAfterWrite?: boolean; } ``` ### EditorV0ParagraphLayoutBatchCommandResult [Заголовок раздела «EditorV0ParagraphLayoutBatchCommandResult»](#editorv0paragraphlayoutbatchcommandresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphLayoutBatchCommandResult { applied: boolean; outputPath: string; paragraphIndexes: number[]; commandCount: number; beforeTexts: string[]; afterTexts: string[]; } ``` ### EditorV0ParagraphFillCommandRequest [Заголовок раздела «EditorV0ParagraphFillCommandRequest»](#editorv0paragraphfillcommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphFillCommandRequest { paragraphIndex: number; fillColorRgb: string; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0ParagraphFillCommandResult [Заголовок раздела «EditorV0ParagraphFillCommandResult»](#editorv0paragraphfillcommandresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphFillCommandResult { applied: boolean; outputPath: string; fillColorRgb: string; paragraphIndex: number; beforeTexts: string[]; afterTexts: string[]; } ``` ### EditorV0ParagraphBorderCommandRequest [Заголовок раздела «EditorV0ParagraphBorderCommandRequest»](#editorv0paragraphbordercommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphBorderCommandRequest { paragraphIndex: number; borderColorRgb: string; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0ParagraphBorderCommandResult [Заголовок раздела «EditorV0ParagraphBorderCommandResult»](#editorv0paragraphbordercommandresult) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphBorderCommandResult { applied: boolean; outputPath: string; borderColorRgb: string; paragraphIndex: number; beforeTexts: string[]; afterTexts: string[]; } ``` ### EditorV0ParagraphSortCommandRequest [Заголовок раздела «EditorV0ParagraphSortCommandRequest»](#editorv0paragraphsortcommandrequest) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0ParagraphSortCommandRequest { startParagraphIndex: number; paragraphCount: number; outputPath?: string | null; reopenAfterWrite?: boolean; } ``` ### EditorV0ParagraphSortCommandResult [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «BoundedLiveTextMutationResult»](#boundedlivetextmutationresult) `TypeAliasDeclaration` · `api-edit.ts` ```ts type BoundedLiveTextMutationResult = Omit & { afterText: string; }; ``` ### EditorV0EditingReplaceFirstRequest [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «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 [Заголовок раздела «EditorV0EditingReplaceAllSemanticRange»](#editorv0editingreplaceallsemanticrange) `InterfaceDeclaration` · `api-edit.ts` ```ts interface EditorV0EditingReplaceAllSemanticRange { offset: number; deleteCount: number; matchedText: string; } ``` ### EditorV0EditingReplaceAllParagraphResult [Заголовок раздела «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 [Заголовок раздела «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; } ``` # События между приложением и редактором > Полный перечень: семь событий от приложения к редактору и одиннадцать обратно, с сигнатурой и именем канала. Внутренний API События ниже ходят внутри окна настольного A4 между его оболочкой и редактором. В браузере, в вашем `iframe` и в чужой оболочке их нет: для встраивания используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). ## От приложения к редактору — 7 событий [Заголовок раздела «От приложения к редактору — 7 событий»](#от-приложения-к-редактору--7-событий) ### onDocumentSessionSnapshot [Заголовок раздела «onDocumentSessionSnapshot»](#ondocumentsessionsnapshot) ```ts onDocumentSessionSnapshot(callback: (snapshot: ShellDocumentSessionSnapshot) => void): () => void ``` Канал: `fastdoc-shell:document-session-snapshot` ### onMenuCommand [Заголовок раздела «onMenuCommand»](#onmenucommand) ```ts onMenuCommand(callback: (command: MenuCommand) => void): () => void ``` Канал: `fastdoc-shell:menu-command` ### onSaveBeforeClose [Заголовок раздела «onSaveBeforeClose»](#onsavebeforeclose) ```ts onSaveBeforeClose(callback: () => void): () => void ``` Канал: `fastdoc-shell:save-before-close` ### onSaveBeforeCloseFailed [Заголовок раздела «onSaveBeforeCloseFailed»](#onsavebeforeclosefailed) ```ts onSaveBeforeCloseFailed(callback: (payload: { message: string }) => void): () => void ``` Канал: `fastdoc-shell:save-before-close-failed` ### onSaveBeforeDocumentSwitch [Заголовок раздела «onSaveBeforeDocumentSwitch»](#onsavebeforedocumentswitch) ```ts onSaveBeforeDocumentSwitch(callback: (request: { requestId: number }) => void): () => void ``` Канал: `fastdoc-shell:save-before-document-switch` ### onStateChanged [Заголовок раздела «onStateChanged»](#onstatechanged) ```ts onStateChanged(callback: (state: ShellBridgeState) => void): () => void ``` Канал: `fastdoc-shell:state-changed` ### onSystemPaste [Заголовок раздела «onSystemPaste»](#onsystempaste) ```ts onSystemPaste(callback: (payload: SystemPastePayload) => void): () => void ``` Канал: `fastdoc-shell:system-paste` ## От редактора к приложению — 11 событий [Заголовок раздела «От редактора к приложению — 11 событий»](#от-редактора-к-приложению--11-событий) ### completeSaveBeforeClose [Заголовок раздела «completeSaveBeforeClose»](#completesavebeforeclose) ```ts completeSaveBeforeClose(payload: { saved: boolean; message?: string | null }): void ``` Канал: `fastdoc-shell:save-before-close-result` ### completeSaveBeforeDocumentSwitch [Заголовок раздела «completeSaveBeforeDocumentSwitch»](#completesavebeforedocumentswitch) ```ts completeSaveBeforeDocumentSwitch(result: { requestId: number; saved: boolean; savedPath: string | null; errorMessage: string | null; }): void ``` Канал: `fastdoc-shell:document-switch-save-result` ### notifyCanonicalEditDropped [Заголовок раздела «notifyCanonicalEditDropped»](#notifycanonicaleditdropped) ```ts notifyCanonicalEditDropped(payload: { code: string; requestId: string; commandType: string; }): void ``` Канал: `fastdoc-shell:canonical-edit-dropped` ### notifyCurrentDocumentTruthViewerReady [Заголовок раздела «notifyCurrentDocumentTruthViewerReady»](#notifycurrentdocumenttruthviewerready) ```ts notifyCurrentDocumentTruthViewerReady(payload: { availability: string; fixtureId: string | null; blockedStatesVisible: boolean; forbiddenClaimsVisible: boolean; unavailableStateVisible: boolean; genericFixtureListVisible: boolean; }): void ``` Канал: `fastdoc-shell:current-document-truth-viewer-ready` ### notifyDocumentRendered [Заголовок раздела «notifyDocumentRendered»](#notifydocumentrendered) ```ts notifyDocumentRendered(renderedPath: string | null): void ``` Канал: `fastdoc-shell:document-rendered` ### notifyEditKeyDropped [Заголовок раздела «notifyEditKeyDropped»](#notifyeditkeydropped) ```ts notifyEditKeyDropped(payload: { code: string; inputType: string; selectionShape: string; inputRoute: string; contextRefusal: string; pressIndex: number; }): void ``` Канал: `fastdoc-shell:edit-key-dropped` ### notifyPageHydrationDropped [Заголовок раздела «notifyPageHydrationDropped»](#notifypagehydrationdropped) ```ts notifyPageHydrationDropped(payload: { code: string; stage: string }): void ``` Канал: `fastdoc-shell:page-hydration-dropped` ### notifyPersistentSaveRefused [Заголовок раздела «notifyPersistentSaveRefused»](#notifypersistentsaverefused) ```ts notifyPersistentSaveRefused(payload: { code: string; requestId: string; saveAs: boolean; }): void ``` Канал: `fastdoc-shell:persistent-save-refused` ### notifyRendererReady [Заголовок раздела «notifyRendererReady»](#notifyrendererready) ```ts notifyRendererReady(): void ``` Канал: `fastdoc-shell:renderer-ready` ### notifySmokeCheckpoint [Заголовок раздела «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 ``` Канал: `fastdoc-shell:smoke-checkpoint` ### notifyUnsavedState [Заголовок раздела «notifyUnsavedState»](#notifyunsavedstate) ```ts notifyUnsavedState(hasUnsavedChanges: boolean): void ``` Канал: `fastdoc-shell:unsaved-state` Жизненный цикл подписки. Каждый метод `on*` возвращает функцию отписки — вызывайте её, когда убираете компонент или закрываете окно, иначе обработчики останутся висеть. # Справочник A4 > Полная API-спецификация A4: протокол сеанса (28 команд), Browser Surface API, window.fastdocShell (306 методов), события между приложением и редактором и каталог типов (479 штук). Этот раздел — машинно выверенный справочник по внешнему API A4. Он описывает четыре независимых поверхности: | Поверхность | Что это | Страницы | | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | **Rust Session Protocol** | 28 команд документного сеанса: обмен строками JSON через стандартный ввод-вывод или через WebSocket на локальном интерфейсе. Основной путь внешней интеграции. | [Транспорт](/reference/a4/transport/), [Команды сессии](/reference/a4/session-protocol/), [Типы типизированной правки](/reference/a4/typed-dto/) | | **Browser Surface API** | Встраивание готовой поверхности редактора и события, которые она шлёт вашему приложению. | [Интерфейс поверхности в браузере](/reference/a4/surface-api/) | | **window\.fastdocShell** | 306 методов внутри окна настольного A4. Внутренний контракт, а не публичный интерфейс. | [document](/reference/a4/shell-document/) … [прочие методы](/reference/a4/shell-current-api/) | | **Каталог типов** | 479 типов внутреннего контракта и 31 сгенерированный тип сеанса. | [api-document.ts](/reference/a4/dto-api-document/) … [Типы сеанса](/reference/a4/session-types/) | Как выбрать правильный API Для встраивания в чужой продукт используйте **Rust Session Protocol** или **Browser Surface API**. `window.fastdocShell` — внутренний контракт настольного приложения. Он не является публичным интерфейсом и в чужую оболочку не переносится. ## Из чего состоит справочник [Заголовок раздела «Из чего состоит справочник»](#из-чего-состоит-справочник) *Протокол сеанса · интерфейс поверхности · внутренние объекты окна · события · типы* | Показатель | Значение | | --------------------- | ---------------------------------------------------------------------------------------- | | Rust Session Protocol | 28 команд · fastdoc.session-protocol-descriptor.v1 | | `window.fastdocShell` | 306 методов / 308 сигнатур | | Типы | 479 типов внутреннего контракта и 31 сгенерированный тип сеанса | | Состояние справочника | Черновик первой версии: имена и состав могут уточняться до выпуска публичного интерфейса | # Rust Session Protocol — 28 команд > Полный перечень команд документного сеанса: параметры, предусловия и результат каждой из 28 команд. # Типы сеанса на TypeScript > 31 тип, порождённый из контракта сеанса: в таком виде запросы и ответы идут по соединению с ядром на Rust. Типы порождены из контракта сеанса — по ним ваш код собирает запрос и разбирает ответ. Имена команд перечислены в [командах сеанса](/reference/a4/session-protocol/). ### SessionCommandName [Заголовок раздела «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 [Заголовок раздела «SessionApplyCompositionRequest»](#sessionapplycompositionrequest) ```ts interface SessionApplyCompositionRequest { cmd: "apply-composition"; id?: unknown; request: unknown; } ``` ### SessionApplyTextTransactionRequest [Заголовок раздела «SessionApplyTextTransactionRequest»](#sessionapplytexttransactionrequest) ```ts interface SessionApplyTextTransactionRequest { cmd: "apply-text-transaction"; id?: unknown; request: unknown; } ``` ### SessionCommitSnapshotRequest [Заголовок раздела «SessionCommitSnapshotRequest»](#sessioncommitsnapshotrequest) ```ts interface SessionCommitSnapshotRequest { cmd: "commit-snapshot"; id?: unknown; document_id: string; path: string; transaction_order: number; transition_kind: string; } ``` ### SessionCommitStructuralSnapshotRequest [Заголовок раздела «SessionCommitStructuralSnapshotRequest»](#sessioncommitstructuralsnapshotrequest) ```ts interface SessionCommitStructuralSnapshotRequest { cmd: "commit-structural-snapshot"; id?: unknown; path: string; request: unknown; } ``` ### SessionCompatibilityInspectRequest [Заголовок раздела «SessionCompatibilityInspectRequest»](#sessioncompatibilityinspectrequest) ```ts interface SessionCompatibilityInspectRequest { cmd: "compatibility-inspect"; id?: unknown; } ``` ### SessionComposeRequest [Заголовок раздела «SessionComposeRequest»](#sessioncomposerequest) ```ts interface SessionComposeRequest { cmd: "compose"; id?: unknown; } ``` ### SessionModelRequest [Заголовок раздела «SessionModelRequest»](#sessionmodelrequest) ```ts interface SessionModelRequest { cmd: "model"; id?: unknown; } ``` ### SessionMutateRequest [Заголовок раздела «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 [Заголовок раздела «SessionOpenRequest»](#sessionopenrequest) ```ts interface SessionOpenRequest { cmd: "open"; id?: unknown; document_id?: string | null; path: string; } ``` ### SessionPaginateRequest [Заголовок раздела «SessionPaginateRequest»](#sessionpaginaterequest) ```ts interface SessionPaginateRequest { cmd: "paginate"; id?: unknown; } ``` ### SessionPingRequest [Заголовок раздела «SessionPingRequest»](#sessionpingrequest) ```ts interface SessionPingRequest { cmd: "ping"; id?: unknown; } ``` ### SessionPrintRequest [Заголовок раздела «SessionPrintRequest»](#sessionprintrequest) ```ts interface SessionPrintRequest { cmd: "print"; id?: unknown; tracked_change_markup_mode?: string | null; } ``` ### SessionPrintDeltaRequest [Заголовок раздела «SessionPrintDeltaRequest»](#sessionprintdeltarequest) ```ts interface SessionPrintDeltaRequest { cmd: "print-delta"; id?: unknown; known_fingerprints?: unknown[]; tracked_change_markup_mode?: string | null; } ``` ### SessionPrintSummaryRequest [Заголовок раздела «SessionPrintSummaryRequest»](#sessionprintsummaryrequest) ```ts interface SessionPrintSummaryRequest { cmd: "print-summary"; id?: unknown; } ``` ### SessionPrintWindowRequest [Заголовок раздела «SessionPrintWindowRequest»](#sessionprintwindowrequest) ```ts interface SessionPrintWindowRequest { cmd: "print-window"; id?: unknown; include_page_stack?: boolean; page_indexes: unknown[]; } ``` ### SessionRedoRequest [Заголовок раздела «SessionRedoRequest»](#sessionredorequest) ```ts interface SessionRedoRequest { cmd: "redo"; id?: unknown; document_id?: string | null; transaction_order?: number; } ``` ### SessionReportRequest [Заголовок раздела «SessionReportRequest»](#sessionreportrequest) ```ts interface SessionReportRequest { cmd: "report"; id?: unknown; } ``` ### SessionReviewRequest [Заголовок раздела «SessionReviewRequest»](#sessionreviewrequest) ```ts interface SessionReviewRequest { cmd: "review"; id?: unknown; } ``` ### SessionSaveRequest [Заголовок раздела «SessionSaveRequest»](#sessionsaverequest) ```ts interface SessionSaveRequest { cmd: "save"; id?: unknown; path?: string | null; } ``` ### SessionSaveCheckpointRequest [Заголовок раздела «SessionSaveCheckpointRequest»](#sessionsavecheckpointrequest) ```ts interface SessionSaveCheckpointRequest { cmd: "save-checkpoint"; id?: unknown; expected_revision: number; request_id: string; session_id: string; target: unknown; } ``` ### SessionSetSelectionRequest [Заголовок раздела «SessionSetSelectionRequest»](#sessionsetselectionrequest) ```ts interface SessionSetSelectionRequest { cmd: "set-selection"; id?: unknown; request: unknown; } ``` ### SessionShutdownRequest [Заголовок раздела «SessionShutdownRequest»](#sessionshutdownrequest) ```ts interface SessionShutdownRequest { cmd: "shutdown"; id?: unknown; } ``` ### SessionSimpleFieldInventoryRequest [Заголовок раздела «SessionSimpleFieldInventoryRequest»](#sessionsimplefieldinventoryrequest) ```ts interface SessionSimpleFieldInventoryRequest { cmd: "simple-field-inventory"; id?: unknown; } ``` ### SessionSquashHistoryRequest [Заголовок раздела «SessionSquashHistoryRequest»](#sessionsquashhistoryrequest) ```ts interface SessionSquashHistoryRequest { cmd: "squash-history"; id?: unknown; base_undo_depth: number; document_id: string; transition_kind?: string | null; } ``` ### SessionStatusRequest [Заголовок раздела «SessionStatusRequest»](#sessionstatusrequest) ```ts interface SessionStatusRequest { cmd: "status"; id?: unknown; } ``` ### SessionStyleRequest [Заголовок раздела «SessionStyleRequest»](#sessionstylerequest) ```ts interface SessionStyleRequest { cmd: "style"; id?: unknown; } ``` ### SessionTrackRevisionsStateRequest [Заголовок раздела «SessionTrackRevisionsStateRequest»](#sessiontrackrevisionsstaterequest) ```ts interface SessionTrackRevisionsStateRequest { cmd: "track-revisions-state"; id?: unknown; } ``` ### SessionUndoRequest [Заголовок раздела «SessionUndoRequest»](#sessionundorequest) ```ts interface SessionUndoRequest { cmd: "undo"; id?: unknown; document_id?: string | null; transaction_order?: number; } ``` ### SessionRequest [Заголовок раздела «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 [Заголовок раздела «SessionResponse»](#sessionresponse) ```ts interface SessionResponse { cmd?: string; elapsed_ms?: number; error?: string; id?: unknown; ok?: boolean; result?: unknown; } ``` # window.fastdocShell · прочие методы > Методы, не вошедшие в тематические группы выше: история правок, работа с текущим документом и окнами, шаблоны, автосохранение и восстановление. Методов: 70. Внутренний API `window.fastdocShell` доступен только внутри окна настольного A4. Для внешней интеграции используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). # window.fastdocShell · document > Работа с текущим документом: открытие, экспорт изображений, сравнение, печать. Методов: 20. Внутренний API `window.fastdocShell` доступен только внутри окна настольного A4. Для внешней интеграции используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). # window.fastdocShell · edit > Самое большое семейство: правка текста, форматирование, таблицы, буфер обмена, история. Методов: 118. Внутренний API `window.fastdocShell` доступен только внутри окна настольного A4. Для внешней интеграции используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). # window.fastdocShell · market > Сценарные маршруты, которыми команда A4 проверяет готовность выпуска. Как и дымовые прогоны, во встраивании не используются. Методов: 40. Внутренний API `window.fastdocShell` доступен только внутри окна настольного A4. Для внешней интеграции используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). # window.fastdocShell · review > Рецензирование: примечания, исправления, режимы отображения. Методов: 15. Внутренний API `window.fastdocShell` доступен только внутри окна настольного A4. Для внешней интеграции используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). # window.fastdocShell · smoke > Маршруты дымовых прогонов — служебных проверок самой сборки A4. Во встраивании не используются. Методов: 3. Внутренний API `window.fastdocShell` доступен только внутри окна настольного A4. Для внешней интеграции используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). # window.fastdocShell · view > Отображение: масштаб, режимы страниц, панели, полноэкранное чтение. Методов: 40. Внутренний API `window.fastdocShell` доступен только внутри окна настольного A4. Для внешней интеграции используйте [Rust Session Protocol](/reference/a4/session-protocol/) или [Интерфейс поверхности в браузере](/reference/a4/surface-api/). # Интерфейс поверхности в браузере (Browser Surface API) > Встраивание поверхности, её установка и снятие, события для вашего приложения и текущие границы. Запуск поверхности. `$CLI` — путь к процессору внутри установленного приложения, он задан на странице [Установка и проверка](/a4/install/): ```bash "$CLI" surface --port 0 --doc /absolute/input.docx --save /absolute/output.docx ``` Что поверхность выставляет в окне. Имена начинаются с `fastdoc` — это внутреннее имя документного движка в коде, а не другой продукт: переименование в A4 их не затронуло, потому что смена имён в коде сломала бы совместимость у тех, кто уже встроил поверхность. То же и у таблиц с префиксом `fastsheet`. ```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 ``` ## События для вашего приложения [Заголовок раздела «События для вашего приложения»](#события-для-вашего-приложения) ```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)); // В WKWebView события приходят обработчику fastdocHost, в WebView2 — через WebMessageReceived ``` Поверхность сегодня ограничена: встраивание и снятие, чтение и правка первого абзаца, сохранение, завершение и пять событий. Произвольная структура документа, выделение и контекстное меню наружу не выведены. # Транспорт и формат сообщений A4 > Обмен строками JSON и через WebSocket, формат запроса и ответа, тексты отказов, таймауты и версии контрактов обмена. ## JSONL stdio [Заголовок раздела «JSONL stdio»](#jsonl-stdio) ```bash # $CLI — путь к процессору внутри установленного приложения, # он задан на странице «Установка и проверка» "$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 [Заголовок раздела «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} ``` Соединение принимает только текстовые кадры в кодировке UTF-8, слушает локальный интерфейс и проверяет пропуск, переданный в адресе подключения. Сразу после соединения приходит та же строка готовности, что и при обмене через стандартный ввод-вывод. ## Конверт запроса и ответа [Заголовок раздела «Конверт запроса и ответа»](#конверт-запроса-и-ответа) ```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; } ``` | Ситуация | Что приходит | | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | Запрос не объект или без поля `cmd` | `ok: false`, в поле `error` — `each request line must be a JSON object with a string cmd field` | | Команды с таким именем нет | `ok: false`, в `error` — `unknown session command: <имя>` | | Команда требует открытого документа | `ok: false`, в `error` — `no document is open in this session` | | Внутренняя ошибка обработки | `ok: false` и сообщение с пометкой `panicked`. Сеанс при этом остаётся живым, соединение не рвётся — можно отправлять следующую команду | ## Версии контрактов обмена [Заголовок раздела «Версии контрактов обмена»](#версии-контрактов-обмена) | Контракт | Версия | | ------------------------------------------ | ------------------------------------------------ | | Машинное описание протокола сеанса | fastdoc.session-protocol-descriptor.v1 | | Готовность сеанса JSONL | fastdoc.session-serve.v1 | | Адрес и пропуск для WebSocket | fastdoc.session-ws-bootstrap.v1 | | Запуск поверхности: адрес, пропуск, версия | fastdoc.surface-host-bootstrap.v1 | | Вставка поверхности в вашу страницу | fastdoc.surface-mount.v1 | | Событие поверхности вашему приложению | fastdoc.surface-host-event.v1 | | Контекст взаимодействия — предлагается | `a4.interaction-context.v1`, ещё не зафиксирован | # Типы типизированной правки > Типизированные структуры транзакций редактирования на границе Rust. Web-проекция serde-форм. Typed DTO используют UTF-16 offsets и deny\_unknown\_fields. Полные receipt/projection DTO также входят в shell type appendix ниже. ```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; } ```