beforeSave? |
(ctx) => | true | void | Localized | Promise<true | void | Localized> |
Code hook: last check before saving. Return a message (in one language or several) to stop the save. |
description? |
Localized |
- |
hookTimeoutMs? |
number |
How long an async hook may take, in milliseconds. A check that takes longer is reported and its result ignored; business logic that takes longer changes nothing; a slow beforeSave stops the save. Default 10,000. |
id |
string |
- |
name |
Localized |
Shown to people; in one language or several. |
numbers? |
NumberOptions |
- |
onChange? |
(ctx) => void | Promise<void> |
Code hook: business logic run after each edit; may fill other cells via ctx.set. |
otherSheets? |
"readOnly" | "editable" |
Whether sheets the schema doesn’t describe can be edited. Default “editable”. |
saveWithErrors? |
"block" | "confirm" |
“block” refuses to save while errors remain; “confirm” asks first. Default “block”. |
sheets |
SheetSchema[] |
- |
validate? |
(ctx) => | void | IssueInput[] | Promise< | void | IssueInput[]> |
Code hook: workbook-wide business rules; may call services. |
version? |
string |
Saving stamps the file with the schema’s id and version, so it is checked against this schema first when it is opened again, and a file saved under another version says so. |