Skip to content
SumOfficeSumOfficeSumOffice

Types: protection and review

Compute Contract type definitions — protection, permissions, comments, tracked changes, and signatures. Names: 65.

Definitions of the names from the “TypeScript type” column on the operation pages.

Other dictionary topics: session, workbook, and sheets · cells and ranges · formulas and calculation · formatting · data and sheet objects · pivot tables · charts and graphics · printing and page layout · Power Query · VBA and macros · protection and review · general and utility.

Types on this page — 65
interface ContractCommentRichTextRun {
text: string;
fontFamily?: string | null;
fontSize?: string | null;
bold?: boolean | null;
italic?: boolean | null;
color?: string | null;
language?: string | null;
rtl?: boolean | null;
}
interface ContractCustomViewOutlineTrack {
axis: ContractCustomViewOutlineAxis;
index: number;
level: number;
collapsed: boolean;
}
interface ContractOutlineTrackState {
index: number;
level: number;
hidden: boolean;
collapsed: boolean;
}
type ContractProtectedRangeAccessKind = | "open" | "password" | "domain_permission" | "irm" | "unsupported_algorithm" | "invalid_verifier";
interface ContractProtectedRangeView {
id: string;
sheetKey: string;
sheetName: string;
name: string;
sqref: string;
accessKind: ContractProtectedRangeAccessKind;
supported: boolean;
unlocked: boolean;
unsupportedCode?: string | null;
}
type ContractProtectedRangesIntent =
| { action: "list"; sheetKey: string }
| ({ action: "create"; sheetKey: string; name: string; sqref: string; password?: string
| null; } & ProtectedRangesMutationGuard)
| ({ action: "update";
sheetKey: string;
rangeId: string;
name: string;
sqref: string;
clearPassword?: boolean;
password?: string
| null; } & ProtectedRangesMutationGuard)
| ({ action: "rename"; sheetKey: string; rangeId: string; name: string; } & ProtectedRangesMutationGuard)
| ({ action: "delete"; sheetKey: string; rangeId: string; } & ProtectedRangesMutationGuard)
| { action: "unlock"; sheetKey: string; rangeId: string; password: string; expectedRevision?: number
| null; }
| { action: "lock"; sheetKey: string; rangeId: string; expectedRevision?: number
| null; }
| { action: "reset"; sheetKey?: string
| null; expectedRevision?: number
| null; }
| ({ action: "undo" } & ProtectedRangesMutationGuard)
| ({ action: "redo" } & ProtectedRangesMutationGuard);
interface ContractProtectedRangesResult {
status:
| "listed"
| "applied"
| "unlocked"
| "locked"
| "reset"
| "undone"
| "redone";
revision: number;
sheetKey: string;
sheetName: string;
entries: ContractProtectedRangeView[];
unlockedCount: number;
undoDepth: number;
redoDepth: number;
mutatedCount: number;
}
type ContractProtectionAuditCategory = "workbook" | "sheet" | "cell" | "protected-range";
interface ContractProtectionAuditFinding {
stableId: string;
kind: ContractProtectionAuditFindingKind;
category: ContractProtectionAuditCategory;
severity: ContractProtectionAuditSeverity;
reasonCode: string;
sheetId?: string | null;
sheetName?: string | null;
locationLabel: string;
navigationTarget: ContractProtectionAuditNavigationTarget;
observedRevision: number;
remediations?: ContractProtectionAuditRemediation[];
}
type ContractProtectionAuditFindingKind =
| "malformed-workbook-protection"
| "unsupported-workbook-protection"
| "malformed-sheet-protection"
| "unsupported-sheet-protection-verifier"
| "invalid-sheet-protection-verifier"
| "malformed-protected-ranges"
| "unsupported-protected-range"
| "invalid-protected-range-verifier"
| "non-canonical-protected-range-sqref"
| "protected-ranges-inactive"
| "hidden-cell-ineffective"
| "hidden-non-formula-cell"
| "missing-cell-style"
| "session-authority-active"
| "stale-session-authority";
type ContractProtectionAuditIntent =
| { action: "scan" }
| { action: "apply"; findingId: string; remediation: ContractProtectionAuditRemediationKind; }
| { action: "fix_all" }
| { action: "undo" }
| { action: "redo" };
type ContractProtectionAuditNavigationTarget =
| { kind: "workbook" }
| { kind: "sheet"; sheetId: string }
| { kind: "cell"; sheetId: string; row: number; col: number; cellRef: string }
| { kind: "protected-range"; sheetId: string; rangeId: string; sqref: string; };
interface ContractProtectionAuditRemediation {
kind: ContractProtectionAuditRemediationKind;
fixAllEligible: boolean;
}
type ContractProtectionAuditRemediationKind = "normalize-protected-range-sqref" | "revoke-session-authority";
interface ContractProtectionAuditResult {
requestId: string;
generation: number;
revision: number;
status: ContractProtectionAuditStatus;
reason?: string | null;
workbook: ContractProtectionWorkbookAuditState;
sheets: ContractProtectionSheetAuditState[];
totalFindingCount: number;
returnedFindingCount: number;
truncated: boolean;
undoDepth: number;
redoDepth: number;
mutatedCount: number;
packageMutated: boolean;
findings: ContractProtectionAuditFinding[];
}
type ContractProtectionAuditSeverity = "error" | "warning" | "info";
type ContractProtectionAuditStatus = "scanned" | "mutated" | "undone" | "redone" | "blocked";
interface ContractProtectionSheetAuditState {
sheetId: string;
sheetName: string;
packageProtected: boolean;
effectiveProtected: boolean;
sessionUnlocked: boolean;
allowedActions: string[];
presentCellCount: number;
lockedCellCount: number;
unlockedCellCount: number;
hiddenCellCount: number;
hiddenFormulaCellCount: number;
malformedStyleReferenceCount: number;
protectedRangeCount: number;
unlockedProtectedRangeCount: number;
overlapPairCount: number;
}
interface ContractProtectionWorkbookAuditState {
packageProtected: boolean;
lockStructure: boolean;
lockWindows: boolean;
effectiveStructureLocked: boolean;
effectiveWindowsLocked: boolean;
sessionUnlocked: boolean;
supported: boolean;
stateCode?: string | null;
}
interface ContractReviewAnchorCellMapping {
from: string;
to: string;
}
type ContractReviewAnchorTransform =
| { kind: "copy_cells"; mappings: ContractReviewAnchorCellMapping[] }
| { kind: "fill_cells"; mappings: ContractReviewAnchorCellMapping[] }
| { kind: "move_cells"; mappings: ContractReviewAnchorCellMapping[] }
| { kind: "insert_rows"; at: number; count: number }
| { kind: "delete_rows"; at: number; count: number }
| { kind: "insert_columns"; at: number; count: number }
| { kind: "delete_columns"; at: number; count: number }
| { kind: "reorder_rows"; mappings: ContractReviewAnchorCellMapping[] }
| { kind: "filter_rows" }
| { kind: "rename_sheet"; newSheetId: string }
| { kind: "copy_sheet"; newSheetId: string }
| { kind: "delete_sheet" };
interface ContractReviewAnnotation {
annotationId: string;
kind: ContractReviewAnnotationKind;
supportState: ContractReviewAnnotationSupportState;
sheetId: string;
cellRef: string;
personId: string;
author: string;
text: string;
paragraphs?: ContractTextParagraph[];
createdAt: string;
modifiedAt: string;
visible?: boolean;
resolved?: boolean;
replies?: ContractReviewReply[];
task?: ContractReviewTask | null;
preservedMentionsXml?: string[];
}
type ContractReviewAnnotationKind = "legacy-note" | "threaded-comment";
type ContractReviewAnnotationSupportState = "live" | "unsupported-preserved";
type ContractReviewAnnotationsIntent =
| { action: "list" }
| { action: "upsert";
kind: ContractReviewAnnotationKind;
cellRef: string;
text: string;
author: string;
annotationId?: string;
visible?: boolean;
paragraphs?: ContractTextParagraph[];
}
| { action: "delete"; annotationId: string }
| { action: "reply"; annotationId: string; text: string; author: string }
| { action: "delete_reply"; annotationId: string; replyId: string }
| { action: "set_resolved"; annotationId: string; resolved: boolean }
| { action: "set_task"; annotationId: string; title: string; assignee: string; }
| { action: "set_task_completed"; annotationId: string; completed: boolean }
| { action: "remove_task"; annotationId: string }
| { action: "set_note_visibility"; annotationId: string; visible: boolean }
| { action: "show_all_notes"; visible: boolean }
| { action: "transform_anchors"; transform: ContractReviewAnchorTransform }
| { action: "undo" }
| { action: "redo" };
interface ContractReviewAnnotationsResult {
requestId: string;
generation: number;
status: ContractReviewAnnotationsStatus;
state: ContractReviewAnnotationsState;
reason?: string;
}
interface ContractReviewAnnotationsSnapshot {
sheetId: string;
persons: ContractReviewPerson[];
annotations: ContractReviewAnnotation[];
}
interface ContractReviewAnnotationsState {
workbookId: string;
revision: number;
generation: number;
undoStack: ContractReviewAnnotationsSnapshot[];
redoStack: ContractReviewAnnotationsSnapshot[];
}
type ContractReviewAnnotationsStatus = "listed" | "mutated" | "undone" | "redone" | "blocked";
type ContractReviewInkDeleteScope = "sheet" | "workbook";
interface ContractReviewInkIdentityLedgerEntry {
stableId: string;
sheetPath: string;
drawingPath: string;
nonVisualId: string;
relationshipIds: string[];
removedParts: string[];
}
interface ContractReviewInkPreservedPart {
partName: string;
sha256: string;
}
interface ContractReviewInkProjectionItem {
stableId: string;
objectId: string;
sheetPath: string;
name: string;
presenceStatus: ContractWorkbookObjectPresenceStatus;
supportState: ContractWorkbookObjectSupportState;
anchor: ContractObjectAnchor;
inkXml: string;
}
interface ContractReviewPerson {
personId: string;
displayName: string;
}
interface ContractReviewReply {
replyId: string;
personId: string;
author: string;
text: string;
createdAt: string;
modifiedAt: string;
}
interface ContractReviewTask {
taskId: string;
title: string;
assignee: string;
status: ContractReviewTaskStatus;
deliveryScope: ContractReviewTaskDeliveryScope;
createdAt: string;
modifiedAt: string;
}
type ContractReviewTaskDeliveryScope = "workbook-local-no-external-delivery";
type ContractReviewTaskStatus = "open" | "completed";
type ContractSheetProtectionAllowedAction =
| "selectLockedCells"
| "selectUnlockedCells"
| "formatCells"
| "formatColumns"
| "formatRows"
| "insertColumns"
| "insertRows"
| "insertHyperlinks"
| "deleteColumns"
| "deleteRows"
| "sort"
| "autoFilter"
| "pivotTables"
| "editObjects"
| "editScenarios";
type ContractSheetProtectionSessionAction = "status" | "unlock" | "lock";
interface ContractThreadedCommentPayload {
source: ContractThreadedCommentPayloadSource;
cellRef: string;
author?: string | null;
text: string;
commentId?: string | null;
personId?: string | null;
createdAt?: string | null;
modifiedAt?: string | null;
resolved?: boolean;
replies?: ContractThreadedCommentReplyPayload[] | null;
taskAssignment?: ContractThreadedCommentTaskAssignment | null;
preservedMentionsXml?: string[] | null;
}
type ContractThreadedCommentPayloadSource = "threaded-comments";
interface ContractThreadedCommentReplyPayload {
text: string;
author?: string | null;
replyId?: string | null;
personId?: string | null;
createdAt?: string | null;
modifiedAt?: string | null;
}
interface ContractThreadedCommentTaskAssignment {
source:
| "f1-workbook-local-task-extension"
| "f1-workbook-local-task-extension-malformed"
| "f1-bounded-task-marker";
assignee: string;
status: "open" | "completed" | "assigned" | "";
taskId?: string | null;
title?: string | null;
deliveryScope?: ContractReviewTaskDeliveryScope | null;
createdAt?: string | null;
modifiedAt?: string | null;
}
type ContractTrackAxis = "row" | "column";
type ContractTrackStructureAction = "insert" | "delete";
type ContractTrackVisibilityOwner = "manual" | "filter";
type ContractWorkbookProtectionIntent =
| { action: "status" }
| ({ action: "protect"; lockStructure: boolean; lockWindows: boolean; password?: string
| null; } & WorkbookProtectionMutationGuard)
| { action: "unlock"; password: string; expectedRevision?: number
| null }
| { action: "lock"; expectedRevision?: number
| null }
| { action: "reset" }
| ({ action: "unprotect"; password?: string
| null; } & WorkbookProtectionMutationGuard)
| ({ action: "undo" } & WorkbookProtectionMutationGuard)
| ({ action: "redo" } & WorkbookProtectionMutationGuard);
interface ContractWorkbookProtectionResult {
status:
| "status"
| "protected"
| "unlocked"
| "locked"
| "reset"
| "unprotected"
| "undone"
| "redone";
revision: number;
lockStructure: boolean;
lockWindows: boolean;
effectiveStructureLocked: boolean;
effectiveWindowsLocked: boolean;
passwordProtected: boolean;
sessionUnlocked: boolean;
supported: boolean;
unsupportedCode?: string | null;
undoDepth: number;
redoDepth: number;
mutatedCount: number;
}
interface ContractXlsxThreadedCommentMutationPatch {
activeSheetPath: string;
cellRef: string;
action: "upsert" | "delete" | "reply" | "resolve" | "reopen" | "assign-task";
text?: string | null;
author?: string | null;
commentId?: string | null;
personId?: string | null;
createdAt?: string | null;
modifiedAt?: string | null;
resolved?: boolean | null;
replyId?: string | null;
replies?: ContractXlsxThreadedCommentReplyPatch[] | null;
task?: ContractReviewTask | null;
assignee?: string | null;
}
interface ContractXlsxThreadedCommentReplyPatch {
text: string;
author?: string | null;
replyId?: string | null;
personId?: string | null;
createdAt?: string | null;
modifiedAt?: string | null;
}
type ContractXlsxTrackTransferAxis = "row" | "column";
type ContractXlsxTrackTransferMode = "move" | "copy";
interface ContractXlsxTrackTransferPatch {
activeSheetPath: string;
axis: ContractXlsxTrackTransferAxis;
sourceStart: number;
sourceEnd: number;
targetStart: number;
mode: ContractXlsxTrackTransferMode;
}
interface ContractXlsxWorkbookProtectionPatch {
lockStructure?: boolean | null;
lockWindows?: boolean | null;
workbookPassword?: string | null;
workbookAlgorithmName?: string | null;
workbookHashValue?: string | null;
workbookSaltValue?: string | null;
workbookSpinCount?: number | string | null;
}
interface OpcSignatureInventory {
schemaVersion: 1;
signed: boolean;
states: SignatureTrustState[];
originCount: number;
signatureCount: number;
signedPartCount: number;
signedRelationshipCount: number;
validDigestCount: number;
invalidDigestCount: number;
unsupportedDigestCount: number;
malformed: boolean;
errorCode?: string;
trustProviderChecked: false;
sourceBytesUnchanged: boolean;
signatures: OpcSignatureRecord[];
}
interface OpcSignatureRecord {
signatureId: string;
originId: string;
partName: string;
states: SignatureTrustState[];
algorithms: SignatureAlgorithmRecord[];
references: SignedReferenceRecord[];
certificates: SignatureCertificateMetadata[];
signatureValueVerified: false;
certificateChainValidated: false;
xadesOpaque: boolean;
opaquePreserved: boolean;
}
type SignatureAlgorithmKind = "digest" | "signature" | "canonicalization" | "transform";
interface SignatureAlgorithmRecord {
kind: SignatureAlgorithmKind;
uri: string;
support: SignatureAlgorithmSupport;
}
type SignatureAlgorithmSupport = "supported" | "recognized-unverified" | "unsupported";
interface SignatureCertificateMetadata {
fingerprintSha256: string;
serialHex: string;
subject: string;
issuer: string;
notBeforeUtc: string;
notAfterUtc: string;
expired: boolean;
selfSigned: boolean;
chainValidated: false;
}
type SignatureDigestState = "valid" | "invalid" | "unsupported" | "not-checked";
type SignatureTargetKind = | "part" | "relationship-set" | "same-document-object" | "external" | "malformed";
type SignatureTrustState =
| "unsigned"
| "trusted"
| "untrusted"
| "expired"
| "invalid"
| "modified"
| "unsupported"
| "malformed";
interface SignedReferenceRecord {
targetId: string;
target: string;
targetKind: SignatureTargetKind;
digestMethod: string;
digestState: SignatureDigestState;
transformCount: number;
}

Documentation assistant

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