docxodus 12.4.0 → 12.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +101 -0
- package/dist/core.d.ts +924 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +1915 -0
- package/dist/core.js.map +1 -0
- package/dist/docxodus.worker.js +280 -7
- package/dist/docxodus.worker.js.map +1 -1
- package/dist/editor-reconcile.d.ts +5 -0
- package/dist/editor-reconcile.d.ts.map +1 -1
- package/dist/editor-reconcile.js.map +1 -1
- package/dist/editor.bundle.js +157 -15
- package/dist/editor.d.ts +44 -0
- package/dist/editor.d.ts.map +1 -1
- package/dist/editor.js +209 -22
- package/dist/editor.js.map +1 -1
- package/dist/embed.bundle.js +12565 -12222
- package/dist/embed.iife.js +12532 -12189
- package/dist/export-assets.json +48 -48
- package/dist/export-browser.bundle.js +101 -4
- package/dist/external-annotation-wire.d.ts +19 -0
- package/dist/external-annotation-wire.d.ts.map +1 -0
- package/dist/external-annotation-wire.js +139 -0
- package/dist/external-annotation-wire.js.map +1 -0
- package/dist/index.d.ts +2 -922
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2093
- package/dist/index.js.map +1 -1
- package/dist/session.bundle.js +258 -7
- package/dist/session.d.ts +61 -12
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +234 -7
- package/dist/session.js.map +1 -1
- package/dist/types.d.ts +371 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/verification-request.d.ts +9 -0
- package/dist/verification-request.d.ts.map +1 -0
- package/dist/verification-request.js +37 -0
- package/dist/verification-request.js.map +1 -0
- package/dist/wasm/_framework/Docxodus.wasm +0 -0
- package/dist/wasm/_framework/Docxodus.wasm.br +0 -0
- package/dist/wasm/_framework/DocxodusWasm.wasm +0 -0
- package/dist/wasm/_framework/DocxodusWasm.wasm.br +0 -0
- package/dist/wasm/_framework/System.Collections.Concurrent.wasm +0 -0
- package/dist/wasm/_framework/System.Collections.Concurrent.wasm.br +0 -0
- package/dist/wasm/_framework/System.Collections.Immutable.wasm +0 -0
- package/dist/wasm/_framework/System.Collections.Immutable.wasm.br +0 -0
- package/dist/wasm/_framework/System.Collections.NonGeneric.wasm +0 -0
- package/dist/wasm/_framework/System.Collections.NonGeneric.wasm.br +0 -0
- package/dist/wasm/_framework/System.Collections.Specialized.wasm +0 -0
- package/dist/wasm/_framework/System.Collections.Specialized.wasm.br +0 -0
- package/dist/wasm/_framework/System.Collections.wasm +0 -0
- package/dist/wasm/_framework/System.Collections.wasm.br +0 -0
- package/dist/wasm/_framework/System.ComponentModel.Primitives.wasm +0 -0
- package/dist/wasm/_framework/System.ComponentModel.Primitives.wasm.br +0 -0
- package/dist/wasm/_framework/System.ComponentModel.TypeConverter.wasm +0 -0
- package/dist/wasm/_framework/System.ComponentModel.TypeConverter.wasm.br +0 -0
- package/dist/wasm/_framework/System.ComponentModel.wasm +0 -0
- package/dist/wasm/_framework/System.ComponentModel.wasm.br +0 -0
- package/dist/wasm/_framework/System.Console.wasm +0 -0
- package/dist/wasm/_framework/System.Console.wasm.br +0 -0
- package/dist/wasm/_framework/System.IO.Compression.wasm +0 -0
- package/dist/wasm/_framework/System.IO.Compression.wasm.br +0 -0
- package/dist/wasm/_framework/System.IO.Pipelines.wasm +0 -0
- package/dist/wasm/_framework/System.IO.Pipelines.wasm.br +0 -0
- package/dist/wasm/_framework/System.Linq.Expressions.wasm +0 -0
- package/dist/wasm/_framework/System.Linq.Expressions.wasm.br +0 -0
- package/dist/wasm/_framework/System.Linq.wasm +0 -0
- package/dist/wasm/_framework/System.Linq.wasm.br +0 -0
- package/dist/wasm/_framework/System.Memory.wasm +0 -0
- package/dist/wasm/_framework/System.Memory.wasm.br +0 -0
- package/dist/wasm/_framework/System.Net.Http.wasm +0 -0
- package/dist/wasm/_framework/System.Net.Http.wasm.br +0 -0
- package/dist/wasm/_framework/System.Net.Primitives.wasm +0 -0
- package/dist/wasm/_framework/System.Net.Primitives.wasm.br +0 -0
- package/dist/wasm/_framework/System.ObjectModel.wasm +0 -0
- package/dist/wasm/_framework/System.ObjectModel.wasm.br +0 -0
- package/dist/wasm/_framework/System.Private.CoreLib.wasm +0 -0
- package/dist/wasm/_framework/System.Private.CoreLib.wasm.br +0 -0
- package/dist/wasm/_framework/System.Private.Uri.wasm +0 -0
- package/dist/wasm/_framework/System.Private.Uri.wasm.br +0 -0
- package/dist/wasm/_framework/System.Private.Xml.Linq.wasm +0 -0
- package/dist/wasm/_framework/System.Private.Xml.Linq.wasm.br +0 -0
- package/dist/wasm/_framework/System.Private.Xml.wasm +0 -0
- package/dist/wasm/_framework/System.Private.Xml.wasm.br +0 -0
- package/dist/wasm/_framework/System.Runtime.InteropServices.JavaScript.wasm +0 -0
- package/dist/wasm/_framework/System.Runtime.InteropServices.JavaScript.wasm.br +0 -0
- package/dist/wasm/_framework/System.Runtime.wasm +0 -0
- package/dist/wasm/_framework/System.Runtime.wasm.br +0 -0
- package/dist/wasm/_framework/System.Security.Cryptography.wasm +0 -0
- package/dist/wasm/_framework/System.Security.Cryptography.wasm.br +0 -0
- package/dist/wasm/_framework/System.Text.Encodings.Web.wasm +0 -0
- package/dist/wasm/_framework/System.Text.Encodings.Web.wasm.br +0 -0
- package/dist/wasm/_framework/System.Text.Json.wasm +0 -0
- package/dist/wasm/_framework/System.Text.Json.wasm.br +0 -0
- package/dist/wasm/_framework/System.Text.RegularExpressions.wasm +0 -0
- package/dist/wasm/_framework/System.Text.RegularExpressions.wasm.br +0 -0
- package/dist/wasm/_framework/System.Xml.Linq.wasm +0 -0
- package/dist/wasm/_framework/System.Xml.Linq.wasm.br +0 -0
- package/dist/wasm/_framework/System.Xml.XDocument.wasm +0 -0
- package/dist/wasm/_framework/System.Xml.XDocument.wasm.br +0 -0
- package/dist/wasm/_framework/System.wasm +0 -0
- package/dist/wasm/_framework/System.wasm.br +0 -0
- package/dist/wasm/_framework/dotnet.boot.js +34 -34
- package/dist/wasm/_framework/dotnet.boot.js.br +0 -0
- package/dist/wasm/_framework/dotnet.js +1 -1
- package/dist/wasm/_framework/dotnet.js.br +0 -0
- package/dist/wasm/_framework/dotnet.native.js +3 -3
- package/dist/wasm/_framework/dotnet.native.js.br +0 -0
- package/dist/wasm/_framework/dotnet.native.wasm +0 -0
- package/dist/wasm/_framework/dotnet.native.wasm.br +0 -0
- package/dist/wasm/_framework/dotnet.runtime.js +1 -1
- package/dist/wasm/_framework/dotnet.runtime.js.br +0 -0
- package/dist/worker-proxy.bundle.js +101 -4
- package/dist/worker-proxy.d.ts +21 -3
- package/dist/worker-proxy.d.ts.map +1 -1
- package/dist/worker-proxy.js +57 -2
- package/dist/worker-proxy.js.map +1 -1
- package/package.json +8 -1
package/dist/types.d.ts
CHANGED
|
@@ -886,6 +886,50 @@ export interface DeliveryArtifactVerification {
|
|
|
886
886
|
* Portable delivery change receipt verification verdict — the shared facade wire
|
|
887
887
|
* shape every transport returns (issue #520).
|
|
888
888
|
*/
|
|
889
|
+
/** What the session's host-owned delivery evidence recorder holds (issue #748). */
|
|
890
|
+
export interface DeliveryEvidenceStatus {
|
|
891
|
+
enabled: boolean;
|
|
892
|
+
transactionCount: number;
|
|
893
|
+
lineageEventCount: number;
|
|
894
|
+
/** Version steps applied by direct calls: exact packages, unknown request. */
|
|
895
|
+
unlabeledTransactionCount: number;
|
|
896
|
+
retainedStateCount: number;
|
|
897
|
+
retainedBytes: number;
|
|
898
|
+
sourceVersion: number;
|
|
899
|
+
currentVersion: number;
|
|
900
|
+
/** Null when a complete receipt can be minted; otherwise the first reason it cannot. */
|
|
901
|
+
unavailableReason: string | null;
|
|
902
|
+
}
|
|
903
|
+
export type DeliveryReceiptPrivacyProfile = "hashOnly" | "hashAndSummary" | "fullEvidence";
|
|
904
|
+
export interface DeliveryReceiptBuildOptions {
|
|
905
|
+
privacyProfile?: DeliveryReceiptPrivacyProfile;
|
|
906
|
+
failOnUnexpectedChanges?: boolean;
|
|
907
|
+
}
|
|
908
|
+
export interface DeliveryBundleArtifact {
|
|
909
|
+
artifactId: string;
|
|
910
|
+
kind: string;
|
|
911
|
+
requiredness: "required" | "optional";
|
|
912
|
+
availability: "available" | "unavailable";
|
|
913
|
+
relativePath: string;
|
|
914
|
+
mediaType: string;
|
|
915
|
+
/** Present when available. */
|
|
916
|
+
bytes?: Uint8Array;
|
|
917
|
+
/** Present when unavailable. */
|
|
918
|
+
unavailableReason?: string;
|
|
919
|
+
}
|
|
920
|
+
/**
|
|
921
|
+
* A delivery bundle as every transport publishes it: the verified manifest, its canonical bytes,
|
|
922
|
+
* and each artifact with its bytes or the reason it is unavailable. `evidence` is the session's
|
|
923
|
+
* recorder status at delivery time.
|
|
924
|
+
*/
|
|
925
|
+
export interface DeliveryBundleResult {
|
|
926
|
+
status: "complete" | "incomplete" | "failed";
|
|
927
|
+
verified: boolean;
|
|
928
|
+
manifest: Record<string, unknown>;
|
|
929
|
+
manifestBytes: Uint8Array;
|
|
930
|
+
artifacts: readonly DeliveryBundleArtifact[];
|
|
931
|
+
evidence?: DeliveryEvidenceStatus;
|
|
932
|
+
}
|
|
889
933
|
export interface DeliveryReceiptVerificationResult {
|
|
890
934
|
isValid: boolean;
|
|
891
935
|
receiptDigestValid: boolean;
|
|
@@ -894,6 +938,85 @@ export interface DeliveryReceiptVerificationResult {
|
|
|
894
938
|
artifacts: DeliveryArtifactVerification[];
|
|
895
939
|
findings: string[];
|
|
896
940
|
}
|
|
941
|
+
/** One approved package-level delta the deliverable is expected to show (issue #747). */
|
|
942
|
+
export interface DeliverablePackageChangeExpectation {
|
|
943
|
+
kind: DeliverablePackageChangeKind;
|
|
944
|
+
location: ChangeLocation;
|
|
945
|
+
beforeDigest?: VerificationDigest;
|
|
946
|
+
afterDigest?: VerificationDigest;
|
|
947
|
+
beforeValue?: string;
|
|
948
|
+
afterValue?: string;
|
|
949
|
+
}
|
|
950
|
+
export type DeliverableRenderDiagnosticKind = "warning" | "unsupportedContent" | "missingFont" | "fontSubstitution";
|
|
951
|
+
/** One render warning or limitation reported by the companion renderer. */
|
|
952
|
+
export interface DeliverableRenderDiagnostic {
|
|
953
|
+
kind: DeliverableRenderDiagnosticKind;
|
|
954
|
+
message: string;
|
|
955
|
+
severity?: VerificationFindingSeverity;
|
|
956
|
+
code?: string;
|
|
957
|
+
phase?: string;
|
|
958
|
+
}
|
|
959
|
+
/** Bytes and renderer/document binding for one companion artifact submitted for verification. */
|
|
960
|
+
export interface DeliverableCompanionArtifactInput {
|
|
961
|
+
artifactId: string;
|
|
962
|
+
role: DeliverableArtifactRole;
|
|
963
|
+
mediaType: string;
|
|
964
|
+
/** Defaults to `available`. */
|
|
965
|
+
availability?: DeliverableArtifactAvailability;
|
|
966
|
+
bytes?: Uint8Array;
|
|
967
|
+
unavailableReason?: string;
|
|
968
|
+
pageCount?: number;
|
|
969
|
+
rendererFingerprint?: string;
|
|
970
|
+
/** Digest of the exact package the renderer consumed; a mismatch is a stale artifact. */
|
|
971
|
+
sourcePackageDigest?: VerificationDigest;
|
|
972
|
+
pageMapDigest?: VerificationDigest;
|
|
973
|
+
renderDiagnostics?: readonly DeliverableRenderDiagnostic[];
|
|
974
|
+
}
|
|
975
|
+
/**
|
|
976
|
+
* Policy and inspection limits for verification (issue #747). Every field is optional; an
|
|
977
|
+
* omitted field takes the verifier's own default. Unknown fields are rejected.
|
|
978
|
+
*/
|
|
979
|
+
export interface DeliverableVerificationPolicyOptions {
|
|
980
|
+
mode?: DeliverableVerificationMode;
|
|
981
|
+
openXmlVersion?: string;
|
|
982
|
+
failOnUnexpectedChanges?: boolean;
|
|
983
|
+
requireNoPlaceholders?: boolean;
|
|
984
|
+
detectBracketedAlternativeClauses?: boolean;
|
|
985
|
+
editorialMarkers?: readonly string[];
|
|
986
|
+
placeholderTokens?: readonly string[];
|
|
987
|
+
maxPackageBytes?: number;
|
|
988
|
+
maxFindings?: number;
|
|
989
|
+
maxDetectorNodes?: number;
|
|
990
|
+
maxDetectorRelationships?: number;
|
|
991
|
+
maxDetectorTextCharacters?: number;
|
|
992
|
+
maxDetectorRegexMatches?: number;
|
|
993
|
+
maxDetectorSteps?: number;
|
|
994
|
+
maxCompanionArtifactBytes?: number;
|
|
995
|
+
maxTotalCompanionArtifactBytes?: number;
|
|
996
|
+
maxCompanionArtifacts?: number;
|
|
997
|
+
maxRenderDiagnostics?: number;
|
|
998
|
+
maxExpectedChanges?: number;
|
|
999
|
+
maxReportedDeltaChanges?: number;
|
|
1000
|
+
packageManifest?: {
|
|
1001
|
+
maxEntryCount?: number;
|
|
1002
|
+
maxEntryUncompressedBytes?: number;
|
|
1003
|
+
maxTotalUncompressedBytes?: number;
|
|
1004
|
+
maxXmlPartBytes?: number;
|
|
1005
|
+
maxCompressionRatio?: number;
|
|
1006
|
+
maxUriLength?: number;
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
1009
|
+
/**
|
|
1010
|
+
* The full bounded verification request (issue #747): what the typed .NET request adds to the
|
|
1011
|
+
* package bytes. Package bytes are passed alongside, never inside, this object.
|
|
1012
|
+
*/
|
|
1013
|
+
export interface DeliverableVerificationRequest {
|
|
1014
|
+
options?: DeliverableVerificationPolicyOptions;
|
|
1015
|
+
/** The canonical semantic-changes object (as `getSemanticChanges` returns it). */
|
|
1016
|
+
expectedSemanticChanges?: SemanticChangeSet;
|
|
1017
|
+
expectedPackageChanges?: readonly DeliverablePackageChangeExpectation[];
|
|
1018
|
+
companionArtifacts?: readonly DeliverableCompanionArtifactInput[];
|
|
1019
|
+
}
|
|
897
1020
|
export interface DeliverableVerificationResult {
|
|
898
1021
|
schema: "https://docxodus.dev/schemas/verification/deliverable-verification/v1";
|
|
899
1022
|
schemaVersion: 1;
|
|
@@ -1054,6 +1177,8 @@ export interface DocxodusWasmExports {
|
|
|
1054
1177
|
DocumentConverter: {
|
|
1055
1178
|
GeneratePackageManifest: (bytes: Uint8Array) => string;
|
|
1056
1179
|
VerifyDeliverable: (bytes: Uint8Array) => string;
|
|
1180
|
+
VerifyDeliverableWithRequest?: (bytes: Uint8Array, requestJson: string) => string;
|
|
1181
|
+
VerifyDeliverableWithBaselineAndRequest?: (baselineBytes: Uint8Array, bytes: Uint8Array, requestJson: string) => string;
|
|
1057
1182
|
VerifyDeliveryReceipt: (receiptJson: string, artifactsJson: string) => string;
|
|
1058
1183
|
VerifyDeliverableWithBaseline: (baselineBytes: Uint8Array, bytes: Uint8Array) => string;
|
|
1059
1184
|
ProveRedlineReversibility: (baselineBytes: Uint8Array, intendedFinalBytes: Uint8Array, redlineBytes: Uint8Array) => string;
|
|
@@ -1140,6 +1265,16 @@ export interface DocxodusWasmExports {
|
|
|
1140
1265
|
GetPageMapStatus: (handle: number, requestJson: string) => string;
|
|
1141
1266
|
GetPageCitation: (handle: number, anchorId: string, requestJson: string) => string;
|
|
1142
1267
|
GetPackageContentHash?: (handle: number) => string;
|
|
1268
|
+
BeginMutationTransaction?: (handle: number, transactionId: string, requestJson: string) => string;
|
|
1269
|
+
CompleteMutationTransaction?: (handle: number, transactionId: string, serializedResponse: string) => void;
|
|
1270
|
+
AbandonMutationTransaction?: (handle: number, transactionId: string) => void;
|
|
1271
|
+
RetainPreview?: (shadowHandle: number) => string;
|
|
1272
|
+
CommitPreview?: (handle: number, previewId: string) => string;
|
|
1273
|
+
GetDeliveryEvidenceStatus?: (handle: number) => string;
|
|
1274
|
+
BuildDeliveryReceipt?: (handle: number, optionsJson: string) => string;
|
|
1275
|
+
BeginDeliveryEvidence?: (handle: number, operationsJson: string, mode: string, identityJson: string) => boolean;
|
|
1276
|
+
CompleteDeliveryEvidence?: (handle: number, stepsJson: string) => void;
|
|
1277
|
+
AbandonDeliveryEvidence?: (handle: number) => void;
|
|
1143
1278
|
GetPackageManifest: (handle: number) => string;
|
|
1144
1279
|
RenderPreviewHtml?: (handle: number) => string;
|
|
1145
1280
|
RenderPreviewBlockHtml?: (handle: number, anchorId: string) => string;
|
|
@@ -1183,6 +1318,8 @@ export interface DocxodusWasmExports {
|
|
|
1183
1318
|
/** Batch block render with the editor profile — `RenderBlocksHtml` plus comment markup;
|
|
1184
1319
|
* same JSON-object result (`{ [anchorId]: html | null }`, or `{"error": …}`). */
|
|
1185
1320
|
RenderEditorBlocksHtml?: (handle: number, anchorIdsJson: string, optionsJson: string) => string;
|
|
1321
|
+
RenderEditorChromeHtml?: (handle: number, optionsJson: string) => string;
|
|
1322
|
+
RenderEditorRangeHtml?: (handle: number, anchorIdsJson: string, optionsJson: string) => string;
|
|
1186
1323
|
/** Single-block render with the editor profile — `RenderBlockHtml` plus comment markup. */
|
|
1187
1324
|
RenderEditorBlockHtml?: (handle: number, anchorId: string, optionsJson: string) => string;
|
|
1188
1325
|
ReplaceText: (handle: number, anchor: string, md: string) => string;
|
|
@@ -1249,6 +1386,7 @@ export interface DocxodusWasmExports {
|
|
|
1249
1386
|
ListImages: (handle: number, scopes: number) => string;
|
|
1250
1387
|
InsertImage: (handle: number, anchor: string, characterOffset: number, imageBase64: string, optionsJson: string) => string;
|
|
1251
1388
|
ReplaceImage: (handle: number, imageId: string, imageBase64: string) => string;
|
|
1389
|
+
EmbedLinkedImage: (handle: number, imageId: string, imageBase64: string) => string;
|
|
1252
1390
|
SetImageDimensions: (handle: number, imageId: string, dimensionsJson: string) => string;
|
|
1253
1391
|
SetImageMetadata: (handle: number, imageId: string, altText: string | null, title: string | null) => string;
|
|
1254
1392
|
SetImageFloatingLayout: (handle: number, imageId: string, layoutJson: string) => string;
|
|
@@ -1268,6 +1406,8 @@ export interface DocxodusWasmExports {
|
|
|
1268
1406
|
MoveBookmark: (handle: number, name: string, startAnchor: string, startOffset: number, endAnchor: string, endOffset: number) => string;
|
|
1269
1407
|
RemoveBookmark: (handle: number, name: string) => string;
|
|
1270
1408
|
ListRevisions: (handle: number) => string;
|
|
1409
|
+
ListRevisionRepairs?: (handle: number) => string;
|
|
1410
|
+
RepairRevisions?: (handle: number, repairsJson: string) => string;
|
|
1271
1411
|
AcceptRevision: (handle: number, revisionId: string) => string;
|
|
1272
1412
|
RejectRevision: (handle: number, revisionId: string) => string;
|
|
1273
1413
|
AcceptAllRevisions: (handle: number) => string;
|
|
@@ -1298,6 +1438,7 @@ export interface DocxodusWasmExports {
|
|
|
1298
1438
|
GetDiff: (handle: number, format: number) => string;
|
|
1299
1439
|
GetSemanticChanges: (handle: number) => string;
|
|
1300
1440
|
VerifyDeliverable: (handle: number) => string;
|
|
1441
|
+
VerifyDeliverableWithRequest?: (handle: number, requestJson: string) => string;
|
|
1301
1442
|
FindByAnnotation: (handle: number, annotationId: string) => string;
|
|
1302
1443
|
FindByAnnotationWithCitations: (handle: number, annotationId: string, requestJson: string) => string;
|
|
1303
1444
|
FindByLabel: (handle: number, labelId: string) => string;
|
|
@@ -1336,7 +1477,7 @@ export interface DocxodusWasmExports {
|
|
|
1336
1477
|
SaveWithAnchorIds: (handle: number) => Uint8Array;
|
|
1337
1478
|
};
|
|
1338
1479
|
}
|
|
1339
|
-
export type EditErrorCode = "anchor_not_found" | "anchor_wrong_kind" | "anchors_not_adjacent" | "session_disposed" | "malformed_markdown" | "unsupported_markdown_syntax" | "table_insert_not_supported" | "footnote_ref_not_supported" | "comment_marker_not_supported" | "image_insert_not_supported" | "anchor_token_in_payload" | "offset_out_of_range" | "invalid_position" | "text_not_found" | "unknown_style" | "invalid_list_level" | "invalid_list_start_value" | "invalid_page_numbering" | "invalid_page_setup" | "invalid_reference_field" | "invalid_paragraph_format" | "invalid_table_styling" | "invalid_table_merge" | "table_anchor_migration_required" | "malformed_xml" | "disallowed_namespace" | "incompatible_element_type" | "validation_failed" | "nothing_to_undo" | "nothing_to_redo" | "duplicate_annotation_id" | "annotation_not_found" | "empty_annotation_span" | "empty_comment_span" | "revision_not_found" | "precondition_failed" | "invalid_batch_step" | "invalid_transaction" | "transaction_conflict" | "transaction_result_evicted" | "transaction_incomplete" | "hyperlink_not_found" | "bookmark_not_found" | "duplicate_bookmark_name" | "invalid_bookmark_name" | "invalid_hyperlink_target" | "missing_bookmark_target" | "bookmark_in_use" | "managed_bookmark" | "empty_hyperlink_span" | "unsupported_inline_boundary" | "revision_unsupported" | "revision_malformed" | "revision_ambiguous" | "tracked_operation_unsupported" | "unresolved_structural_revision" | "content_control_not_found" | "content_control_malformed" | "content_control_unsupported" | "content_control_locked" | "content_control_bound" | "content_control_wrong_type" | "invalid_content_control_value" | "content_control_placement_unsupported" | "content_control_nested_fill_unsupported" | "repeating_section_constraint" | "image_not_found" | "invalid_image_data" | "unsupported_image_format" | "image_too_large" | "invalid_image_dimensions" | "unsupported_image_markup" | "linked_image_read_only" | "invalid_image_layout" | "internal_error";
|
|
1480
|
+
export type EditErrorCode = "anchor_not_found" | "anchor_wrong_kind" | "anchors_not_adjacent" | "session_disposed" | "malformed_markdown" | "unsupported_markdown_syntax" | "table_insert_not_supported" | "footnote_ref_not_supported" | "comment_marker_not_supported" | "image_insert_not_supported" | "anchor_token_in_payload" | "offset_out_of_range" | "invalid_position" | "text_not_found" | "unknown_style" | "invalid_list_level" | "invalid_list_start_value" | "invalid_page_numbering" | "invalid_page_setup" | "invalid_reference_field" | "invalid_paragraph_format" | "invalid_table_styling" | "invalid_table_merge" | "table_anchor_migration_required" | "malformed_xml" | "disallowed_namespace" | "incompatible_element_type" | "validation_failed" | "nothing_to_undo" | "nothing_to_redo" | "duplicate_annotation_id" | "annotation_not_found" | "empty_annotation_span" | "empty_comment_span" | "revision_not_found" | "precondition_failed" | "invalid_batch_step" | "invalid_transaction" | "transaction_conflict" | "transaction_result_evicted" | "transaction_incomplete" | "preview_not_found" | "preview_stale" | "revision_repair_rejected" | "hyperlink_not_found" | "bookmark_not_found" | "duplicate_bookmark_name" | "invalid_bookmark_name" | "invalid_hyperlink_target" | "missing_bookmark_target" | "bookmark_in_use" | "managed_bookmark" | "empty_hyperlink_span" | "unsupported_inline_boundary" | "revision_unsupported" | "revision_malformed" | "revision_ambiguous" | "tracked_operation_unsupported" | "unresolved_structural_revision" | "content_control_not_found" | "content_control_malformed" | "content_control_unsupported" | "content_control_locked" | "content_control_bound" | "content_control_wrong_type" | "invalid_content_control_value" | "content_control_placement_unsupported" | "content_control_nested_fill_unsupported" | "repeating_section_constraint" | "image_not_found" | "invalid_image_data" | "unsupported_image_format" | "image_too_large" | "invalid_image_dimensions" | "unsupported_image_markup" | "linked_image_read_only" | "invalid_image_layout" | "internal_error";
|
|
1340
1481
|
export interface AnchorRef {
|
|
1341
1482
|
id: string;
|
|
1342
1483
|
kind: string;
|
|
@@ -1389,6 +1530,11 @@ export interface MutationBatchStep {
|
|
|
1389
1530
|
mutation: () => EditResult | readonly EditResult[];
|
|
1390
1531
|
/** Optional read-only validation: all run up front in atomic mode, per-step in best-effort. */
|
|
1391
1532
|
preflight?: () => EditError | undefined;
|
|
1533
|
+
/**
|
|
1534
|
+
* The step's request arguments, recorded as the normalized request in delivery evidence
|
|
1535
|
+
* (issue #748) when the session captures it. The callback hides them, so name them here.
|
|
1536
|
+
*/
|
|
1537
|
+
args?: Record<string, unknown>;
|
|
1392
1538
|
}
|
|
1393
1539
|
/** A preview callback receives the isolated shadow session it must mutate/read. */
|
|
1394
1540
|
export interface MutationBatchPreviewStep {
|
|
@@ -1401,6 +1547,24 @@ export interface MutationBatchPreviewOptions {
|
|
|
1401
1547
|
html?: "none" | "scoped" | "full";
|
|
1402
1548
|
/** Required for scoped HTML. */
|
|
1403
1549
|
htmlAnchorId?: string;
|
|
1550
|
+
/**
|
|
1551
|
+
* Keep a successful preview's exact result package so {@link DocxSession.commitPreview} can
|
|
1552
|
+
* later make it the live document with the previewed generated ids, timestamps and
|
|
1553
|
+
* `packageHash`. The receipt then carries {@link MutationBatchResult.retention}. Retention
|
|
1554
|
+
* is bounded (count, bytes and time) and cleared when the session closes.
|
|
1555
|
+
*/
|
|
1556
|
+
retain?: boolean;
|
|
1557
|
+
}
|
|
1558
|
+
/**
|
|
1559
|
+
* Identity of a preview retained for a guarded commit (issue #760). `baseVersion` and
|
|
1560
|
+
* `basePackageHash` describe the live state the preview was predicted from; the commit refuses
|
|
1561
|
+
* once either has moved. `expiresAt` is the ISO-8601 UTC instant after which the entry is gone.
|
|
1562
|
+
*/
|
|
1563
|
+
export interface MutationPreviewRetention {
|
|
1564
|
+
previewId: string;
|
|
1565
|
+
baseVersion: number;
|
|
1566
|
+
basePackageHash: string;
|
|
1567
|
+
expiresAt: string;
|
|
1404
1568
|
}
|
|
1405
1569
|
export interface MutationBatchStepResult {
|
|
1406
1570
|
index: number;
|
|
@@ -1446,6 +1610,36 @@ export interface MutationBatchResult {
|
|
|
1446
1610
|
warnings: readonly string[];
|
|
1447
1611
|
/** Shadow-only preview HTML when requested; null otherwise. */
|
|
1448
1612
|
html: string | null;
|
|
1613
|
+
/**
|
|
1614
|
+
* Present only for a batch executed under a {@link MutationTransaction}: the identity the
|
|
1615
|
+
* session's journal bound the request to — the same on the original call and on a replay.
|
|
1616
|
+
*/
|
|
1617
|
+
transaction?: MutationTransactionIdentity;
|
|
1618
|
+
/**
|
|
1619
|
+
* Present on a preview retained with {@link MutationBatchPreviewOptions.retain} and on the
|
|
1620
|
+
* result of {@link DocxSession.commitPreview}.
|
|
1621
|
+
*/
|
|
1622
|
+
retention?: MutationPreviewRetention;
|
|
1623
|
+
}
|
|
1624
|
+
/** The versioned identity a transaction-aware batch result carries (issue #761). */
|
|
1625
|
+
export interface MutationTransactionIdentity {
|
|
1626
|
+
schemaVersion: number;
|
|
1627
|
+
transactionId: string;
|
|
1628
|
+
/** SHA-256 over the canonical rendering of {@link MutationTransaction.request} plus the mode. */
|
|
1629
|
+
requestFingerprint: string;
|
|
1630
|
+
}
|
|
1631
|
+
/**
|
|
1632
|
+
* Retry deduplication for {@link DocxSession.executeBatch}. The session's journal replays the
|
|
1633
|
+
* original result for an identical retry under the same `transactionId` without executing the
|
|
1634
|
+
* steps again, and refuses the id for a different request with `transaction_conflict`. Because
|
|
1635
|
+
* the batch is composed from callbacks, `request` is the caller's own serializable description
|
|
1636
|
+
* of what the batch does and is what the fingerprint covers: pass the same descriptor on a retry.
|
|
1637
|
+
*/
|
|
1638
|
+
export interface MutationTransaction {
|
|
1639
|
+
/** Non-blank, at most 256 Unicode scalar values; scoped to this open session. */
|
|
1640
|
+
transactionId: string;
|
|
1641
|
+
/** A JSON object describing the batch (step kinds, targets, payloads). */
|
|
1642
|
+
request: Record<string, unknown>;
|
|
1449
1643
|
}
|
|
1450
1644
|
export interface MarkdownPatch {
|
|
1451
1645
|
scopeAnchorId: string;
|
|
@@ -1490,6 +1684,20 @@ export type ImageHorizontalReference = "page" | "margin" | "column" | "character
|
|
|
1490
1684
|
export type ImageVerticalReference = "page" | "margin" | "paragraph" | "line" | "unknown";
|
|
1491
1685
|
export type ImageHorizontalAlignment = "left" | "center" | "right" | "inside" | "outside" | "unknown";
|
|
1492
1686
|
export type ImageVerticalAlignment = "top" | "center" | "bottom" | "inside" | "outside" | "unknown";
|
|
1687
|
+
/** One vertex of a tight/through wrap outline in DrawingML's 21600-unit picture space. */
|
|
1688
|
+
export interface ImageWrapPoint {
|
|
1689
|
+
x: number;
|
|
1690
|
+
y: number;
|
|
1691
|
+
}
|
|
1692
|
+
/**
|
|
1693
|
+
* The outline text follows under tight/through wrap: a start vertex plus at least two line
|
|
1694
|
+
* segments. Omit it on write to get the picture rectangle; a layout read from the document
|
|
1695
|
+
* always carries the outline it holds.
|
|
1696
|
+
*/
|
|
1697
|
+
export interface ImageWrapPolygon {
|
|
1698
|
+
points: ImageWrapPoint[];
|
|
1699
|
+
edited?: boolean;
|
|
1700
|
+
}
|
|
1493
1701
|
export interface FloatingImageLayout {
|
|
1494
1702
|
horizontalRelativeFrom?: ImageHorizontalReference;
|
|
1495
1703
|
horizontalOffsetEmu?: number | null;
|
|
@@ -1499,6 +1707,7 @@ export interface FloatingImageLayout {
|
|
|
1499
1707
|
verticalAlignment?: ImageVerticalAlignment | null;
|
|
1500
1708
|
wrapMode?: ImageWrapMode;
|
|
1501
1709
|
wrapSide?: ImageWrapSide;
|
|
1710
|
+
wrapPolygon?: ImageWrapPolygon | null;
|
|
1502
1711
|
distanceTopEmu?: number;
|
|
1503
1712
|
distanceBottomEmu?: number;
|
|
1504
1713
|
distanceLeftEmu?: number;
|
|
@@ -1532,6 +1741,12 @@ export interface ImageDimensions {
|
|
|
1532
1741
|
heightPoints?: number;
|
|
1533
1742
|
preserveAspect?: boolean;
|
|
1534
1743
|
}
|
|
1744
|
+
/** Whether one image operation applies to one occurrence in the session's current mode. */
|
|
1745
|
+
export interface ImageOperationSupport {
|
|
1746
|
+
operation: string;
|
|
1747
|
+
canMutate: boolean;
|
|
1748
|
+
reason?: string;
|
|
1749
|
+
}
|
|
1535
1750
|
export interface ImageOccurrence {
|
|
1536
1751
|
id: string;
|
|
1537
1752
|
markupKind: ImageMarkupKind;
|
|
@@ -1561,6 +1776,14 @@ export interface ImageOccurrence {
|
|
|
1561
1776
|
title?: string;
|
|
1562
1777
|
floatingLayout?: FloatingImageLayout;
|
|
1563
1778
|
floatingLayoutSupported: boolean;
|
|
1779
|
+
/** replace, embed_linked, set_dimensions, set_metadata, set_floating_layout and remove, each answered. */
|
|
1780
|
+
operations: ImageOperationSupport[];
|
|
1781
|
+
}
|
|
1782
|
+
/** Which operations one markup family accepts, independent of any occurrence. */
|
|
1783
|
+
export interface ImageMarkupCapability {
|
|
1784
|
+
markup: string;
|
|
1785
|
+
operations: string[];
|
|
1786
|
+
limitation?: string;
|
|
1564
1787
|
}
|
|
1565
1788
|
export interface ImageFormatCapability {
|
|
1566
1789
|
format: ImageBinaryFormat;
|
|
@@ -1585,12 +1808,36 @@ export interface ImageCapabilities {
|
|
|
1585
1808
|
acceptsBinaryBytes: boolean;
|
|
1586
1809
|
supportsNetworkFetch: boolean;
|
|
1587
1810
|
supportsFileIo: boolean;
|
|
1811
|
+
markups: ImageMarkupCapability[];
|
|
1812
|
+
trackedOperations: string[];
|
|
1588
1813
|
}
|
|
1589
1814
|
export type ContentControlType = "plain_text" | "rich_text" | "checkbox" | "date" | "drop_down_list" | "combo_box" | "picture" | "repeating_section" | "repeating_section_item" | "unsupported";
|
|
1590
1815
|
export type ContentControlPlacement = "inline" | "block" | "row" | "cell" | "unknown";
|
|
1591
1816
|
export type ContentControlBindingPolicy = "preserve" | "detach_target";
|
|
1817
|
+
/** How a whole-control fill treats nested controls inside its target (issue #763). */
|
|
1818
|
+
export type ContentControlNestedPolicy = "refuse" | "preserve" | "replace";
|
|
1592
1819
|
export interface ContentControlFillOptions {
|
|
1593
1820
|
bindingPolicy?: ContentControlBindingPolicy;
|
|
1821
|
+
/**
|
|
1822
|
+
* Default `refuse`. `preserve` keeps every nested control in place and replaces only the
|
|
1823
|
+
* content outside them; `replace` discards the whole payload, nested controls included
|
|
1824
|
+
* (each is reported removed; a locked or data-bound nested control refuses).
|
|
1825
|
+
*/
|
|
1826
|
+
nestedControls?: ContentControlNestedPolicy;
|
|
1827
|
+
/**
|
|
1828
|
+
* With `preserve`: plain-text fills for nested text/rich-text controls of the target, keyed
|
|
1829
|
+
* by their `sdt` anchor, applied in the same operation. A key that is not a nested textual
|
|
1830
|
+
* control, or a child that fails its own gates, fails the whole call without mutating.
|
|
1831
|
+
*/
|
|
1832
|
+
childFills?: Record<string, string>;
|
|
1833
|
+
}
|
|
1834
|
+
/** Whether one operation would succeed on a control right now, by the gates the operation applies. */
|
|
1835
|
+
export interface ContentControlOperationSupport {
|
|
1836
|
+
operation: "fill_text" | "fill_rich_text" | "set_checked" | "set_date" | "select_item" | "fill_picture" | "add_repeating_item" | "remove_repeating_item";
|
|
1837
|
+
/** The nested policy this entry describes, when the target contains nested controls. */
|
|
1838
|
+
nestedControls?: ContentControlNestedPolicy;
|
|
1839
|
+
canMutate: boolean;
|
|
1840
|
+
reason?: string;
|
|
1594
1841
|
}
|
|
1595
1842
|
export interface ContentControlBindingInfo {
|
|
1596
1843
|
storeItemId?: string;
|
|
@@ -1619,6 +1866,13 @@ export interface ContentControlInfo {
|
|
|
1619
1866
|
unsupportedReason?: string;
|
|
1620
1867
|
text: string;
|
|
1621
1868
|
itemValues: string[];
|
|
1869
|
+
/** Anchors of the controls nested anywhere inside this control's payload, in story order. */
|
|
1870
|
+
nestedControlAnchorIds: string[];
|
|
1871
|
+
/**
|
|
1872
|
+
* Per-operation support for this control's family, including nested-policy variants of a
|
|
1873
|
+
* fill when the target contains nested controls and the session's tracked-change mode.
|
|
1874
|
+
*/
|
|
1875
|
+
operations: ContentControlOperationSupport[];
|
|
1622
1876
|
}
|
|
1623
1877
|
export interface DocumentRange {
|
|
1624
1878
|
startAnchorId: string;
|
|
@@ -1675,6 +1929,47 @@ export interface CommentListEntry {
|
|
|
1675
1929
|
export type SessionRevisionType = "insert" | "delete" | "move" | "format" | "structure";
|
|
1676
1930
|
export type RevisionFamily = "content_insert" | "content_delete" | "move" | "paragraph_mark" | "row_insert" | "row_delete" | "cell_insert" | "cell_delete" | "cell_merge" | "content_control_insert" | "content_control_delete" | "numbering_properties_insert" | "numbering_change" | "properties_change" | "unsupported";
|
|
1677
1931
|
export type RevisionResolutionStatus = "supported" | "unsupported" | "malformed" | "ambiguous";
|
|
1932
|
+
/** The explicit repairs the revision registry can perform on markup it refuses to resolve. */
|
|
1933
|
+
export type RevisionRepairKind = "assign_identity" | "reattach_numbering_change" | "reattach_cell_marker" | "restore_orphan_text" | "wrap_orphan_text_as_deletion";
|
|
1934
|
+
/** One repair the registry offers for one listed entry, and whether it can perform it. */
|
|
1935
|
+
export interface RevisionRepairProposal {
|
|
1936
|
+
revisionId: string;
|
|
1937
|
+
kind: RevisionRepairKind;
|
|
1938
|
+
partUri: string;
|
|
1939
|
+
diagnostic: RevisionDiagnostic;
|
|
1940
|
+
/** Every native carrier the repair touches, as QName@element-path keys. */
|
|
1941
|
+
carriers: readonly string[];
|
|
1942
|
+
repairable: boolean;
|
|
1943
|
+
/** What the repair does, or why the package's evidence does not permit it. */
|
|
1944
|
+
reason: string;
|
|
1945
|
+
/** The request must supply `author` and `date`. */
|
|
1946
|
+
requiresAuthorship: boolean;
|
|
1947
|
+
}
|
|
1948
|
+
export interface RevisionRepairRequest {
|
|
1949
|
+
revisionId: string;
|
|
1950
|
+
kind: RevisionRepairKind;
|
|
1951
|
+
author?: string;
|
|
1952
|
+
date?: string;
|
|
1953
|
+
}
|
|
1954
|
+
/** One carrier's identity before and after a repair; `newId` is empty when it was moved, not renumbered. */
|
|
1955
|
+
export interface RevisionCarrierIdentity {
|
|
1956
|
+
carrier: string;
|
|
1957
|
+
oldId: string | null;
|
|
1958
|
+
newId: string;
|
|
1959
|
+
}
|
|
1960
|
+
export interface RevisionRepairOutcome {
|
|
1961
|
+
revisionId: string;
|
|
1962
|
+
kind: RevisionRepairKind;
|
|
1963
|
+
partUri: string;
|
|
1964
|
+
identities: readonly RevisionCarrierIdentity[];
|
|
1965
|
+
}
|
|
1966
|
+
/** Atomic, one undo step; repaired entries get new ids, so re-list afterwards. */
|
|
1967
|
+
export interface RevisionRepairResult {
|
|
1968
|
+
success: boolean;
|
|
1969
|
+
error?: EditError;
|
|
1970
|
+
repairs: readonly RevisionRepairOutcome[];
|
|
1971
|
+
modified: readonly AnchorRef[];
|
|
1972
|
+
}
|
|
1678
1973
|
export interface RevisionDiagnostic {
|
|
1679
1974
|
code: string;
|
|
1680
1975
|
message: string;
|
|
@@ -2088,12 +2383,28 @@ export interface DocxSessionSettings {
|
|
|
2088
2383
|
* do not plan to call either comparison API.
|
|
2089
2384
|
*/
|
|
2090
2385
|
captureInitialProjection?: boolean;
|
|
2386
|
+
/**
|
|
2387
|
+
* Record the evidence a delivery change receipt needs as edits execute (issue #748): the
|
|
2388
|
+
* exact package before and after every version step, each batch's described request,
|
|
2389
|
+
* transaction ids, and undo/redo lineage. {@link DocxSession.buildDeliveryReceipt} then mints
|
|
2390
|
+
* a verifiable receipt. Default false: every version step serializes a clean package copy
|
|
2391
|
+
* and retention holds them (bounded: 256 states / 512 MiB) until delivery. Requires
|
|
2392
|
+
* `captureInitialProjection`.
|
|
2393
|
+
*/
|
|
2394
|
+
captureDeliveryEvidence?: boolean;
|
|
2091
2395
|
}
|
|
2092
2396
|
/** One top-level render unit in a {@link RenderPlan}: a body block (`p`/`h`/`li`),
|
|
2093
2397
|
* one whole table (`tbl`), or one footnote/endnote definition (`fn`/`en`). */
|
|
2094
2398
|
export interface RenderUnit {
|
|
2095
2399
|
id: string;
|
|
2096
2400
|
kind: string;
|
|
2401
|
+
/** Content signature for change detection (leaf blocks omit it). */
|
|
2402
|
+
sig?: string;
|
|
2403
|
+
/** Index of the section wrapper (`[data-section-index]`) the unit renders into. */
|
|
2404
|
+
section?: number;
|
|
2405
|
+
/** Ordinal of the border box the renderer groups adjacent bordered paragraphs into; units
|
|
2406
|
+
* sharing a group render inside one wrapper, so a windowed mount never splits one. */
|
|
2407
|
+
group?: number;
|
|
2097
2408
|
}
|
|
2098
2409
|
/** Ordered top-level render units per scope container — the authority for "what
|
|
2099
2410
|
* blocks exist, in what order" that the incremental reconciler diffs against. */
|
|
@@ -3208,7 +3519,7 @@ export interface DocumentMetadata {
|
|
|
3208
3519
|
/**
|
|
3209
3520
|
* Message types sent from main thread to worker.
|
|
3210
3521
|
*/
|
|
3211
|
-
export type WorkerRequestType = "init" | "generatePackageManifest" | "verifyDeliverable" | "proveRedlineReversibility" | "projectReviewProfile" | "convertDocxToHtml" | "compareDocuments" | "compareDocumentsToHtml" | "getSemanticChanges" | "getRevisions" | "getDocumentMetadata" | "getVersion" | "prepare" | "sessionOpen" | "sessionGetPackageManifest" | "sessionGetSemanticChanges" | "sessionVerifyDeliverable" | "sessionClose" | "sessionAddAnnotation" | "sessionRemoveAnnotation" | "sessionUpdateAnnotation" | "sessionMoveAnnotation";
|
|
3522
|
+
export type WorkerRequestType = "init" | "generatePackageManifest" | "verifyDeliverable" | "proveRedlineReversibility" | "projectReviewProfile" | "convertDocxToHtml" | "compareDocuments" | "compareDocumentsToHtml" | "getSemanticChanges" | "createExternalAnnotationSet" | "validateExternalAnnotations" | "projectAnnotationsOntoHtml" | "convertDocxToHtmlWithExternalAnnotations" | "exportToOpenContract" | "getRevisions" | "getDocumentMetadata" | "getVersion" | "prepare" | "sessionOpen" | "sessionGetPackageManifest" | "sessionGetSemanticChanges" | "sessionVerifyDeliverable" | "sessionClose" | "sessionAddAnnotation" | "sessionRemoveAnnotation" | "sessionUpdateAnnotation" | "sessionMoveAnnotation";
|
|
3212
3523
|
/**
|
|
3213
3524
|
* Base structure for worker requests.
|
|
3214
3525
|
*/
|
|
@@ -3263,6 +3574,8 @@ export interface WorkerVerifyDeliverableRequest extends WorkerRequestBase {
|
|
|
3263
3574
|
type: "verifyDeliverable";
|
|
3264
3575
|
documentBytes: Uint8Array;
|
|
3265
3576
|
baselineBytes?: Uint8Array;
|
|
3577
|
+
/** The serialized full request (issue #747); absent means the default policy. */
|
|
3578
|
+
requestJson?: string;
|
|
3266
3579
|
}
|
|
3267
3580
|
/**
|
|
3268
3581
|
* Prove redline accept/reject reversibility off the main thread. Three packages are inspected and
|
|
@@ -3305,6 +3618,38 @@ export interface WorkerGetSemanticChangesRequest extends WorkerRequestBase {
|
|
|
3305
3618
|
rightBytes: Uint8Array;
|
|
3306
3619
|
settings?: DocxDiffSettings;
|
|
3307
3620
|
}
|
|
3621
|
+
/** Create an empty external annotation set bound to a document's hash (issue #775). */
|
|
3622
|
+
export interface WorkerCreateExternalAnnotationSetRequest extends WorkerRequestBase {
|
|
3623
|
+
type: "createExternalAnnotationSet";
|
|
3624
|
+
documentBytes: Uint8Array;
|
|
3625
|
+
documentId: string;
|
|
3626
|
+
}
|
|
3627
|
+
/** Validate an external annotation set against a document. */
|
|
3628
|
+
export interface WorkerValidateExternalAnnotationsRequest extends WorkerRequestBase {
|
|
3629
|
+
type: "validateExternalAnnotations";
|
|
3630
|
+
documentBytes: Uint8Array;
|
|
3631
|
+
annotationSet: ExternalAnnotationSet;
|
|
3632
|
+
}
|
|
3633
|
+
/** Project an annotation set onto already-rendered (XML-well-formed) HTML. */
|
|
3634
|
+
export interface WorkerProjectAnnotationsOntoHtmlRequest extends WorkerRequestBase {
|
|
3635
|
+
type: "projectAnnotationsOntoHtml";
|
|
3636
|
+
html: string;
|
|
3637
|
+
annotationSet: ExternalAnnotationSet;
|
|
3638
|
+
projectionOptions?: ExternalAnnotationProjectionSettings;
|
|
3639
|
+
}
|
|
3640
|
+
/** Convert a document and project an annotation set onto it in one round trip. */
|
|
3641
|
+
export interface WorkerConvertWithExternalAnnotationsRequest extends WorkerRequestBase {
|
|
3642
|
+
type: "convertDocxToHtmlWithExternalAnnotations";
|
|
3643
|
+
documentBytes: Uint8Array;
|
|
3644
|
+
annotationSet: ExternalAnnotationSet;
|
|
3645
|
+
conversionOptions?: ConversionOptions;
|
|
3646
|
+
projectionOptions?: ExternalAnnotationProjectionSettings;
|
|
3647
|
+
}
|
|
3648
|
+
/** Export a document to the OpenContracts format. */
|
|
3649
|
+
export interface WorkerExportToOpenContractRequest extends WorkerRequestBase {
|
|
3650
|
+
type: "exportToOpenContract";
|
|
3651
|
+
documentBytes: Uint8Array;
|
|
3652
|
+
}
|
|
3308
3653
|
/**
|
|
3309
3654
|
* Get revisions from a document request.
|
|
3310
3655
|
*/
|
|
@@ -3358,6 +3703,8 @@ export interface WorkerSessionGetSemanticChangesRequest extends WorkerRequestBas
|
|
|
3358
3703
|
export interface WorkerSessionVerifyDeliverableRequest extends WorkerRequestBase {
|
|
3359
3704
|
type: "sessionVerifyDeliverable";
|
|
3360
3705
|
handle: number;
|
|
3706
|
+
/** The serialized full request (issue #747); absent means the default policy. */
|
|
3707
|
+
requestJson?: string;
|
|
3361
3708
|
}
|
|
3362
3709
|
/**
|
|
3363
3710
|
* Close a worker DocxSession.
|
|
@@ -3409,7 +3756,7 @@ export interface WorkerSessionMoveAnnotationRequest extends WorkerRequestBase {
|
|
|
3409
3756
|
/**
|
|
3410
3757
|
* Union type of all possible worker requests.
|
|
3411
3758
|
*/
|
|
3412
|
-
export type WorkerRequest = WorkerInitRequest | WorkerGeneratePackageManifestRequest | WorkerVerifyDeliverableRequest | WorkerProveRedlineReversibilityRequest | WorkerProjectReviewProfileRequest | WorkerConvertRequest | WorkerCompareRequest | WorkerCompareToHtmlRequest | WorkerGetSemanticChangesRequest | WorkerGetRevisionsRequest | WorkerGetDocumentMetadataRequest | WorkerGetVersionRequest | WorkerPrepareRequest | WorkerSessionOpenRequest | WorkerSessionGetPackageManifestRequest | WorkerSessionGetSemanticChangesRequest | WorkerSessionVerifyDeliverableRequest | WorkerSessionCloseRequest | WorkerSessionAddAnnotationRequest | WorkerSessionRemoveAnnotationRequest | WorkerSessionUpdateAnnotationRequest | WorkerSessionMoveAnnotationRequest;
|
|
3759
|
+
export type WorkerRequest = WorkerInitRequest | WorkerGeneratePackageManifestRequest | WorkerVerifyDeliverableRequest | WorkerProveRedlineReversibilityRequest | WorkerProjectReviewProfileRequest | WorkerConvertRequest | WorkerCompareRequest | WorkerCompareToHtmlRequest | WorkerGetSemanticChangesRequest | WorkerCreateExternalAnnotationSetRequest | WorkerValidateExternalAnnotationsRequest | WorkerProjectAnnotationsOntoHtmlRequest | WorkerConvertWithExternalAnnotationsRequest | WorkerExportToOpenContractRequest | WorkerGetRevisionsRequest | WorkerGetDocumentMetadataRequest | WorkerGetVersionRequest | WorkerPrepareRequest | WorkerSessionOpenRequest | WorkerSessionGetPackageManifestRequest | WorkerSessionGetSemanticChangesRequest | WorkerSessionVerifyDeliverableRequest | WorkerSessionCloseRequest | WorkerSessionAddAnnotationRequest | WorkerSessionRemoveAnnotationRequest | WorkerSessionUpdateAnnotationRequest | WorkerSessionMoveAnnotationRequest;
|
|
3413
3760
|
/**
|
|
3414
3761
|
* Base structure for worker responses.
|
|
3415
3762
|
*/
|
|
@@ -3481,6 +3828,26 @@ export interface WorkerGetSemanticChangesResponse extends WorkerResponseBase {
|
|
|
3481
3828
|
type: "getSemanticChanges";
|
|
3482
3829
|
semanticChanges?: SemanticChangeSet;
|
|
3483
3830
|
}
|
|
3831
|
+
export interface WorkerCreateExternalAnnotationSetResponse extends WorkerResponseBase {
|
|
3832
|
+
type: "createExternalAnnotationSet";
|
|
3833
|
+
annotationSet?: ExternalAnnotationSet;
|
|
3834
|
+
}
|
|
3835
|
+
export interface WorkerValidateExternalAnnotationsResponse extends WorkerResponseBase {
|
|
3836
|
+
type: "validateExternalAnnotations";
|
|
3837
|
+
validation?: ExternalAnnotationValidationResult;
|
|
3838
|
+
}
|
|
3839
|
+
export interface WorkerProjectAnnotationsOntoHtmlResponse extends WorkerResponseBase {
|
|
3840
|
+
type: "projectAnnotationsOntoHtml";
|
|
3841
|
+
html?: string;
|
|
3842
|
+
}
|
|
3843
|
+
export interface WorkerConvertWithExternalAnnotationsResponse extends WorkerResponseBase {
|
|
3844
|
+
type: "convertDocxToHtmlWithExternalAnnotations";
|
|
3845
|
+
html?: string;
|
|
3846
|
+
}
|
|
3847
|
+
export interface WorkerExportToOpenContractResponse extends WorkerResponseBase {
|
|
3848
|
+
type: "exportToOpenContract";
|
|
3849
|
+
export?: OpenContractDocExport;
|
|
3850
|
+
}
|
|
3484
3851
|
/**
|
|
3485
3852
|
* Response from getRevisions request.
|
|
3486
3853
|
*/
|
|
@@ -3551,7 +3918,7 @@ export interface WorkerSessionEditResponse extends WorkerResponseBase {
|
|
|
3551
3918
|
/**
|
|
3552
3919
|
* Union type of all possible worker responses.
|
|
3553
3920
|
*/
|
|
3554
|
-
export type WorkerResponse = WorkerInitResponse | WorkerGeneratePackageManifestResponse | WorkerVerifyDeliverableResponse | WorkerProveRedlineReversibilityResponse | WorkerProjectReviewProfileResponse | WorkerConvertResponse | WorkerCompareResponse | WorkerCompareToHtmlResponse | WorkerGetSemanticChangesResponse | WorkerGetRevisionsResponse | WorkerGetDocumentMetadataResponse | WorkerGetVersionResponse | WorkerPrepareResponse | WorkerSessionOpenResponse | WorkerSessionGetPackageManifestResponse | WorkerSessionGetSemanticChangesResponse | WorkerSessionVerifyDeliverableResponse | WorkerSessionCloseResponse | WorkerSessionEditResponse;
|
|
3921
|
+
export type WorkerResponse = WorkerInitResponse | WorkerGeneratePackageManifestResponse | WorkerVerifyDeliverableResponse | WorkerProveRedlineReversibilityResponse | WorkerProjectReviewProfileResponse | WorkerConvertResponse | WorkerCompareResponse | WorkerCompareToHtmlResponse | WorkerGetSemanticChangesResponse | WorkerCreateExternalAnnotationSetResponse | WorkerValidateExternalAnnotationsResponse | WorkerProjectAnnotationsOntoHtmlResponse | WorkerConvertWithExternalAnnotationsResponse | WorkerExportToOpenContractResponse | WorkerGetRevisionsResponse | WorkerGetDocumentMetadataResponse | WorkerGetVersionResponse | WorkerPrepareResponse | WorkerSessionOpenResponse | WorkerSessionGetPackageManifestResponse | WorkerSessionGetSemanticChangesResponse | WorkerSessionVerifyDeliverableResponse | WorkerSessionCloseResponse | WorkerSessionEditResponse;
|
|
3555
3922
|
/**
|
|
3556
3923
|
* Options for creating a worker-based Docxodus instance.
|
|
3557
3924
|
*/
|