@mog-sdk/spreadsheet-contracts 0.1.12

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.
Files changed (701) hide show
  1. package/dist/accessibility/index.d.ts +9 -0
  2. package/dist/accessibility/index.d.ts.map +1 -0
  3. package/dist/accessibility/types.d.ts +75 -0
  4. package/dist/accessibility/types.d.ts.map +1 -0
  5. package/dist/actions/comments.d.ts +31 -0
  6. package/dist/actions/comments.d.ts.map +1 -0
  7. package/dist/actions/index.d.ts +22 -0
  8. package/dist/actions/index.d.ts.map +1 -0
  9. package/dist/actions/types.d.ts +448 -0
  10. package/dist/actions/types.d.ts.map +1 -0
  11. package/dist/actors/chart.d.ts +88 -0
  12. package/dist/actors/chart.d.ts.map +1 -0
  13. package/dist/actors/clipboard.d.ts +243 -0
  14. package/dist/actors/clipboard.d.ts.map +1 -0
  15. package/dist/actors/commands.d.ts +1343 -0
  16. package/dist/actors/commands.d.ts.map +1 -0
  17. package/dist/actors/comment.d.ts +84 -0
  18. package/dist/actors/comment.d.ts.map +1 -0
  19. package/dist/actors/draw-border.d.ts +89 -0
  20. package/dist/actors/draw-border.d.ts.map +1 -0
  21. package/dist/actors/editor.d.ts +161 -0
  22. package/dist/actors/editor.d.ts.map +1 -0
  23. package/dist/actors/find-replace.d.ts +88 -0
  24. package/dist/actors/find-replace.d.ts.map +1 -0
  25. package/dist/actors/focus.d.ts +91 -0
  26. package/dist/actors/focus.d.ts.map +1 -0
  27. package/dist/actors/index.d.ts +88 -0
  28. package/dist/actors/index.d.ts.map +1 -0
  29. package/dist/actors/input.d.ts +98 -0
  30. package/dist/actors/input.d.ts.map +1 -0
  31. package/dist/actors/object-interaction.d.ts +163 -0
  32. package/dist/actors/object-interaction.d.ts.map +1 -0
  33. package/dist/actors/object.d.ts +124 -0
  34. package/dist/actors/object.d.ts.map +1 -0
  35. package/dist/actors/page-break.d.ts +64 -0
  36. package/dist/actors/page-break.d.ts.map +1 -0
  37. package/dist/actors/pane-focus.d.ts +56 -0
  38. package/dist/actors/pane-focus.d.ts.map +1 -0
  39. package/dist/actors/renderer.d.ts +197 -0
  40. package/dist/actors/renderer.d.ts.map +1 -0
  41. package/dist/actors/selection.d.ts +170 -0
  42. package/dist/actors/selection.d.ts.map +1 -0
  43. package/dist/actors/slicer.d.ts +175 -0
  44. package/dist/actors/slicer.d.ts.map +1 -0
  45. package/dist/actors/smartart.d.ts +48 -0
  46. package/dist/actors/smartart.d.ts.map +1 -0
  47. package/dist/api/index.d.ts +19 -0
  48. package/dist/api/index.d.ts.map +1 -0
  49. package/dist/api/mutation-receipt.d.ts +26 -0
  50. package/dist/api/mutation-receipt.d.ts.map +1 -0
  51. package/dist/api/types.d.ts +1542 -0
  52. package/dist/api/types.d.ts.map +1 -0
  53. package/dist/api/workbook/history.d.ts +43 -0
  54. package/dist/api/workbook/history.d.ts.map +1 -0
  55. package/dist/api/workbook/index.d.ts +17 -0
  56. package/dist/api/workbook/index.d.ts.map +1 -0
  57. package/dist/api/workbook/names.d.ts +104 -0
  58. package/dist/api/workbook/names.d.ts.map +1 -0
  59. package/dist/api/workbook/notifications.d.ts +35 -0
  60. package/dist/api/workbook/notifications.d.ts.map +1 -0
  61. package/dist/api/workbook/protection.d.ts +14 -0
  62. package/dist/api/workbook/protection.d.ts.map +1 -0
  63. package/dist/api/workbook/scenarios.d.ts +45 -0
  64. package/dist/api/workbook/scenarios.d.ts.map +1 -0
  65. package/dist/api/workbook/sheets.d.ts +74 -0
  66. package/dist/api/workbook/sheets.d.ts.map +1 -0
  67. package/dist/api/workbook/slicers.d.ts +63 -0
  68. package/dist/api/workbook/slicers.d.ts.map +1 -0
  69. package/dist/api/workbook/styles.d.ts +19 -0
  70. package/dist/api/workbook/styles.d.ts.map +1 -0
  71. package/dist/api/workbook/theme.d.ts +38 -0
  72. package/dist/api/workbook/theme.d.ts.map +1 -0
  73. package/dist/api/workbook/viewport.d.ts +85 -0
  74. package/dist/api/workbook/viewport.d.ts.map +1 -0
  75. package/dist/api/workbook.d.ts +279 -0
  76. package/dist/api/workbook.d.ts.map +1 -0
  77. package/dist/api/worksheet/bindings.d.ts +66 -0
  78. package/dist/api/worksheet/bindings.d.ts.map +1 -0
  79. package/dist/api/worksheet/changes.d.ts +60 -0
  80. package/dist/api/worksheet/changes.d.ts.map +1 -0
  81. package/dist/api/worksheet/charts.d.ts +83 -0
  82. package/dist/api/worksheet/charts.d.ts.map +1 -0
  83. package/dist/api/worksheet/collections/connector-collection.d.ts +7 -0
  84. package/dist/api/worksheet/collections/connector-collection.d.ts.map +1 -0
  85. package/dist/api/worksheet/collections/drawing-collection.d.ts +9 -0
  86. package/dist/api/worksheet/collections/drawing-collection.d.ts.map +1 -0
  87. package/dist/api/worksheet/collections/equation-collection.d.ts +8 -0
  88. package/dist/api/worksheet/collections/equation-collection.d.ts.map +1 -0
  89. package/dist/api/worksheet/collections/index.d.ts +12 -0
  90. package/dist/api/worksheet/collections/index.d.ts.map +1 -0
  91. package/dist/api/worksheet/collections/object-collection.d.ts +45 -0
  92. package/dist/api/worksheet/collections/object-collection.d.ts.map +1 -0
  93. package/dist/api/worksheet/collections/picture-collection.d.ts +8 -0
  94. package/dist/api/worksheet/collections/picture-collection.d.ts.map +1 -0
  95. package/dist/api/worksheet/collections/shape-collection.d.ts +8 -0
  96. package/dist/api/worksheet/collections/shape-collection.d.ts.map +1 -0
  97. package/dist/api/worksheet/collections/textbox-collection.d.ts +8 -0
  98. package/dist/api/worksheet/collections/textbox-collection.d.ts.map +1 -0
  99. package/dist/api/worksheet/collections/wordart-collection.d.ts +8 -0
  100. package/dist/api/worksheet/collections/wordart-collection.d.ts.map +1 -0
  101. package/dist/api/worksheet/comments.d.ts +143 -0
  102. package/dist/api/worksheet/comments.d.ts.map +1 -0
  103. package/dist/api/worksheet/conditional-formats.d.ts +101 -0
  104. package/dist/api/worksheet/conditional-formats.d.ts.map +1 -0
  105. package/dist/api/worksheet/filters.d.ts +141 -0
  106. package/dist/api/worksheet/filters.d.ts.map +1 -0
  107. package/dist/api/worksheet/form-controls.d.ts +22 -0
  108. package/dist/api/worksheet/form-controls.d.ts.map +1 -0
  109. package/dist/api/worksheet/format-mappings.d.ts +50 -0
  110. package/dist/api/worksheet/format-mappings.d.ts.map +1 -0
  111. package/dist/api/worksheet/formats.d.ts +136 -0
  112. package/dist/api/worksheet/formats.d.ts.map +1 -0
  113. package/dist/api/worksheet/handles/chart-handle.d.ts +11 -0
  114. package/dist/api/worksheet/handles/chart-handle.d.ts.map +1 -0
  115. package/dist/api/worksheet/handles/connector-handle.d.ts +9 -0
  116. package/dist/api/worksheet/handles/connector-handle.d.ts.map +1 -0
  117. package/dist/api/worksheet/handles/drawing-handle.d.ts +14 -0
  118. package/dist/api/worksheet/handles/drawing-handle.d.ts.map +1 -0
  119. package/dist/api/worksheet/handles/equation-handle.d.ts +9 -0
  120. package/dist/api/worksheet/handles/equation-handle.d.ts.map +1 -0
  121. package/dist/api/worksheet/handles/floating-object-handle.d.ts +75 -0
  122. package/dist/api/worksheet/handles/floating-object-handle.d.ts.map +1 -0
  123. package/dist/api/worksheet/handles/index.d.ts +16 -0
  124. package/dist/api/worksheet/handles/index.d.ts.map +1 -0
  125. package/dist/api/worksheet/handles/ole-object-handle.d.ts +10 -0
  126. package/dist/api/worksheet/handles/ole-object-handle.d.ts.map +1 -0
  127. package/dist/api/worksheet/handles/picture-handle.d.ts +9 -0
  128. package/dist/api/worksheet/handles/picture-handle.d.ts.map +1 -0
  129. package/dist/api/worksheet/handles/shape-handle.d.ts +11 -0
  130. package/dist/api/worksheet/handles/shape-handle.d.ts.map +1 -0
  131. package/dist/api/worksheet/handles/slicer-handle.d.ts +13 -0
  132. package/dist/api/worksheet/handles/slicer-handle.d.ts.map +1 -0
  133. package/dist/api/worksheet/handles/smartart-handle.d.ts +11 -0
  134. package/dist/api/worksheet/handles/smartart-handle.d.ts.map +1 -0
  135. package/dist/api/worksheet/handles/textbox-handle.d.ts +9 -0
  136. package/dist/api/worksheet/handles/textbox-handle.d.ts.map +1 -0
  137. package/dist/api/worksheet/handles/wordart-handle.d.ts +10 -0
  138. package/dist/api/worksheet/handles/wordart-handle.d.ts.map +1 -0
  139. package/dist/api/worksheet/hyperlinks.d.ts +52 -0
  140. package/dist/api/worksheet/hyperlinks.d.ts.map +1 -0
  141. package/dist/api/worksheet/index.d.ts +35 -0
  142. package/dist/api/worksheet/index.d.ts.map +1 -0
  143. package/dist/api/worksheet/internal.d.ts +105 -0
  144. package/dist/api/worksheet/internal.d.ts.map +1 -0
  145. package/dist/api/worksheet/layout.d.ts +150 -0
  146. package/dist/api/worksheet/layout.d.ts.map +1 -0
  147. package/dist/api/worksheet/names.d.ts +52 -0
  148. package/dist/api/worksheet/names.d.ts.map +1 -0
  149. package/dist/api/worksheet/objects.d.ts +124 -0
  150. package/dist/api/worksheet/objects.d.ts.map +1 -0
  151. package/dist/api/worksheet/outline.d.ts +101 -0
  152. package/dist/api/worksheet/outline.d.ts.map +1 -0
  153. package/dist/api/worksheet/pivots.d.ts +257 -0
  154. package/dist/api/worksheet/pivots.d.ts.map +1 -0
  155. package/dist/api/worksheet/print.d.ts +108 -0
  156. package/dist/api/worksheet/print.d.ts.map +1 -0
  157. package/dist/api/worksheet/protection.d.ts +73 -0
  158. package/dist/api/worksheet/protection.d.ts.map +1 -0
  159. package/dist/api/worksheet/settings.d.ts +54 -0
  160. package/dist/api/worksheet/settings.d.ts.map +1 -0
  161. package/dist/api/worksheet/slicers.d.ts +101 -0
  162. package/dist/api/worksheet/slicers.d.ts.map +1 -0
  163. package/dist/api/worksheet/smartart.d.ts +49 -0
  164. package/dist/api/worksheet/smartart.d.ts.map +1 -0
  165. package/dist/api/worksheet/sparklines.d.ts +143 -0
  166. package/dist/api/worksheet/sparklines.d.ts.map +1 -0
  167. package/dist/api/worksheet/structure.d.ts +44 -0
  168. package/dist/api/worksheet/structure.d.ts.map +1 -0
  169. package/dist/api/worksheet/tables.d.ts +313 -0
  170. package/dist/api/worksheet/tables.d.ts.map +1 -0
  171. package/dist/api/worksheet/validation.d.ts +101 -0
  172. package/dist/api/worksheet/validation.d.ts.map +1 -0
  173. package/dist/api/worksheet/view.d.ts +91 -0
  174. package/dist/api/worksheet/view.d.ts.map +1 -0
  175. package/dist/api/worksheet.d.ts +370 -0
  176. package/dist/api/worksheet.d.ts.map +1 -0
  177. package/dist/app/index.d.ts +17 -0
  178. package/dist/app/index.d.ts.map +1 -0
  179. package/dist/app/types.d.ts +349 -0
  180. package/dist/app/types.d.ts.map +1 -0
  181. package/dist/apps/api.d.ts +519 -0
  182. package/dist/apps/api.d.ts.map +1 -0
  183. package/dist/apps/bindings.d.ts +72 -0
  184. package/dist/apps/bindings.d.ts.map +1 -0
  185. package/dist/apps/index.d.ts +13 -0
  186. package/dist/apps/index.d.ts.map +1 -0
  187. package/dist/apps/types.d.ts +224 -0
  188. package/dist/apps/types.d.ts.map +1 -0
  189. package/dist/apps/views.d.ts +142 -0
  190. package/dist/apps/views.d.ts.map +1 -0
  191. package/dist/bridges/chart-bridge.d.ts +172 -0
  192. package/dist/bridges/chart-bridge.d.ts.map +1 -0
  193. package/dist/bridges/equation-bridge.d.ts +74 -0
  194. package/dist/bridges/equation-bridge.d.ts.map +1 -0
  195. package/dist/bridges/index.d.ts +25 -0
  196. package/dist/bridges/index.d.ts.map +1 -0
  197. package/dist/bridges/ink-recognition-bridge.d.ts +142 -0
  198. package/dist/bridges/ink-recognition-bridge.d.ts.map +1 -0
  199. package/dist/bridges/locale-bridge.d.ts +93 -0
  200. package/dist/bridges/locale-bridge.d.ts.map +1 -0
  201. package/dist/bridges/pivot-bridge.d.ts +201 -0
  202. package/dist/bridges/pivot-bridge.d.ts.map +1 -0
  203. package/dist/bridges/schema-bridge.d.ts +137 -0
  204. package/dist/bridges/schema-bridge.d.ts.map +1 -0
  205. package/dist/bridges/smartart-bridge.d.ts +217 -0
  206. package/dist/bridges/smartart-bridge.d.ts.map +1 -0
  207. package/dist/bridges/wordart-bridge.d.ts +86 -0
  208. package/dist/bridges/wordart-bridge.d.ts.map +1 -0
  209. package/dist/capabilities/errors.d.ts +16 -0
  210. package/dist/capabilities/errors.d.ts.map +1 -0
  211. package/dist/capabilities/gated-api.d.ts +355 -0
  212. package/dist/capabilities/gated-api.d.ts.map +1 -0
  213. package/dist/capabilities/grants.d.ts +239 -0
  214. package/dist/capabilities/grants.d.ts.map +1 -0
  215. package/dist/capabilities/index.d.ts +24 -0
  216. package/dist/capabilities/index.d.ts.map +1 -0
  217. package/dist/capabilities/manifest.d.ts +128 -0
  218. package/dist/capabilities/manifest.d.ts.map +1 -0
  219. package/dist/capabilities/requester.d.ts +209 -0
  220. package/dist/capabilities/requester.d.ts.map +1 -0
  221. package/dist/capabilities/scope.d.ts +55 -0
  222. package/dist/capabilities/scope.d.ts.map +1 -0
  223. package/dist/capabilities/sensitive.d.ts +279 -0
  224. package/dist/capabilities/sensitive.d.ts.map +1 -0
  225. package/dist/capabilities/taxonomy.d.ts +15 -0
  226. package/dist/capabilities/taxonomy.d.ts.map +1 -0
  227. package/dist/capabilities/types.d.ts +91 -0
  228. package/dist/capabilities/types.d.ts.map +1 -0
  229. package/dist/cells/cell-identity.d.ts +281 -0
  230. package/dist/cells/cell-identity.d.ts.map +1 -0
  231. package/dist/cells/cell-style.d.ts +67 -0
  232. package/dist/cells/cell-style.d.ts.map +1 -0
  233. package/dist/cells/formula-string.d.ts +37 -0
  234. package/dist/cells/formula-string.d.ts.map +1 -0
  235. package/dist/cells/index.d.ts +7 -0
  236. package/dist/cells/index.d.ts.map +1 -0
  237. package/dist/cells/range-ref.d.ts +77 -0
  238. package/dist/cells/range-ref.d.ts.map +1 -0
  239. package/dist/cells/rich-text.d.ts +66 -0
  240. package/dist/cells/rich-text.d.ts.map +1 -0
  241. package/dist/cells/spill.d.ts +121 -0
  242. package/dist/cells/spill.d.ts.map +1 -0
  243. package/dist/conditional-format/index.d.ts +11 -0
  244. package/dist/conditional-format/index.d.ts.map +1 -0
  245. package/dist/conditional-format/presets.d.ts +54 -0
  246. package/dist/conditional-format/presets.d.ts.map +1 -0
  247. package/dist/conditional-format/range-utils.d.ts +11 -0
  248. package/dist/conditional-format/range-utils.d.ts.map +1 -0
  249. package/dist/conditional-format/render-types.d.ts +80 -0
  250. package/dist/conditional-format/render-types.d.ts.map +1 -0
  251. package/dist/connections/api-errors.d.ts +29 -0
  252. package/dist/connections/api-errors.d.ts.map +1 -0
  253. package/dist/connections/api.d.ts +879 -0
  254. package/dist/connections/api.d.ts.map +1 -0
  255. package/dist/connections/database-bridge-types.d.ts +108 -0
  256. package/dist/connections/database-bridge-types.d.ts.map +1 -0
  257. package/dist/connections/index.d.ts +5 -0
  258. package/dist/connections/index.d.ts.map +1 -0
  259. package/dist/connections/power-query.d.ts +1 -0
  260. package/dist/connections/power-query.d.ts.map +1 -0
  261. package/dist/connections/query.d.ts +144 -0
  262. package/dist/connections/query.d.ts.map +1 -0
  263. package/dist/context-menu/index.d.ts +10 -0
  264. package/dist/context-menu/index.d.ts.map +1 -0
  265. package/dist/context-menu/types.d.ts +28 -0
  266. package/dist/context-menu/types.d.ts.map +1 -0
  267. package/dist/core/commands.d.ts +143 -0
  268. package/dist/core/commands.d.ts.map +1 -0
  269. package/dist/core/core.d.ts +943 -0
  270. package/dist/core/core.d.ts.map +1 -0
  271. package/dist/core/disposable.d.ts +30 -0
  272. package/dist/core/disposable.d.ts.map +1 -0
  273. package/dist/core/event-base.d.ts +31 -0
  274. package/dist/core/event-base.d.ts.map +1 -0
  275. package/dist/core/execution.d.ts +79 -0
  276. package/dist/core/execution.d.ts.map +1 -0
  277. package/dist/core/formatted-text.d.ts +8 -0
  278. package/dist/core/formatted-text.d.ts.map +1 -0
  279. package/dist/core/index.d.ts +10 -0
  280. package/dist/core/index.d.ts.map +1 -0
  281. package/dist/core/result.d.ts +23 -0
  282. package/dist/core/result.d.ts.map +1 -0
  283. package/dist/core/schema.d.ts +360 -0
  284. package/dist/core/schema.d.ts.map +1 -0
  285. package/dist/core/testing.d.ts +309 -0
  286. package/dist/core/testing.d.ts.map +1 -0
  287. package/dist/culture/index.d.ts +11 -0
  288. package/dist/culture/index.d.ts.map +1 -0
  289. package/dist/culture/types.d.ts +320 -0
  290. package/dist/culture/types.d.ts.map +1 -0
  291. package/dist/data/charts.d.ts +412 -0
  292. package/dist/data/charts.d.ts.map +1 -0
  293. package/dist/data/conditional-format.d.ts +188 -0
  294. package/dist/data/conditional-format.d.ts.map +1 -0
  295. package/dist/data/filter.d.ts +364 -0
  296. package/dist/data/filter.d.ts.map +1 -0
  297. package/dist/data/grouping.d.ts +170 -0
  298. package/dist/data/grouping.d.ts.map +1 -0
  299. package/dist/data/index.d.ts +12 -0
  300. package/dist/data/index.d.ts.map +1 -0
  301. package/dist/data/named-ranges.d.ts +104 -0
  302. package/dist/data/named-ranges.d.ts.map +1 -0
  303. package/dist/data/pivot.d.ts +68 -0
  304. package/dist/data/pivot.d.ts.map +1 -0
  305. package/dist/data/slicers.d.ts +417 -0
  306. package/dist/data/slicers.d.ts.map +1 -0
  307. package/dist/data/sorting.d.ts +172 -0
  308. package/dist/data/sorting.d.ts.map +1 -0
  309. package/dist/data/sparklines.d.ts +358 -0
  310. package/dist/data/sparklines.d.ts.map +1 -0
  311. package/dist/data/tables.d.ts +333 -0
  312. package/dist/data/tables.d.ts.map +1 -0
  313. package/dist/data/trace-arrows.d.ts +165 -0
  314. package/dist/data/trace-arrows.d.ts.map +1 -0
  315. package/dist/diagnostics/core.d.ts +219 -0
  316. package/dist/diagnostics/core.d.ts.map +1 -0
  317. package/dist/diagnostics/index.d.ts +9 -0
  318. package/dist/diagnostics/index.d.ts.map +1 -0
  319. package/dist/diagnostics/style.d.ts +196 -0
  320. package/dist/diagnostics/style.d.ts.map +1 -0
  321. package/dist/document/comments.d.ts +109 -0
  322. package/dist/document/comments.d.ts.map +1 -0
  323. package/dist/document/document.d.ts +182 -0
  324. package/dist/document/document.d.ts.map +1 -0
  325. package/dist/document/index.d.ts +5 -0
  326. package/dist/document/index.d.ts.map +1 -0
  327. package/dist/document/protection.d.ts +114 -0
  328. package/dist/document/protection.d.ts.map +1 -0
  329. package/dist/document/search.d.ts +202 -0
  330. package/dist/document/search.d.ts.map +1 -0
  331. package/dist/drawing/index.d.ts +8 -0
  332. package/dist/drawing/index.d.ts.map +1 -0
  333. package/dist/drawing/three-d.d.ts +171 -0
  334. package/dist/drawing/three-d.d.ts.map +1 -0
  335. package/dist/editor/drag.d.ts +178 -0
  336. package/dist/editor/drag.d.ts.map +1 -0
  337. package/dist/editor/editor.d.ts +59 -0
  338. package/dist/editor/editor.d.ts.map +1 -0
  339. package/dist/editor/form-controls.d.ts +428 -0
  340. package/dist/editor/form-controls.d.ts.map +1 -0
  341. package/dist/editor/index.d.ts +4 -0
  342. package/dist/editor/index.d.ts.map +1 -0
  343. package/dist/equation/errors.d.ts +19 -0
  344. package/dist/equation/errors.d.ts.map +1 -0
  345. package/dist/equation/index.d.ts +12 -0
  346. package/dist/equation/index.d.ts.map +1 -0
  347. package/dist/equation/omml-ast.d.ts +358 -0
  348. package/dist/equation/omml-ast.d.ts.map +1 -0
  349. package/dist/equation/templates.d.ts +26 -0
  350. package/dist/equation/templates.d.ts.map +1 -0
  351. package/dist/equation/types.d.ts +87 -0
  352. package/dist/equation/types.d.ts.map +1 -0
  353. package/dist/events/canvas-object-events.d.ts +31 -0
  354. package/dist/events/canvas-object-events.d.ts.map +1 -0
  355. package/dist/events/cell-events.d.ts +60 -0
  356. package/dist/events/cell-events.d.ts.map +1 -0
  357. package/dist/events/chart-events.d.ts +61 -0
  358. package/dist/events/chart-events.d.ts.map +1 -0
  359. package/dist/events/comment-events.d.ts +43 -0
  360. package/dist/events/comment-events.d.ts.map +1 -0
  361. package/dist/events/conditional-formatting-events.d.ts +40 -0
  362. package/dist/events/conditional-formatting-events.d.ts.map +1 -0
  363. package/dist/events/data-tools-events.d.ts +29 -0
  364. package/dist/events/data-tools-events.d.ts.map +1 -0
  365. package/dist/events/file-io-events.d.ts +39 -0
  366. package/dist/events/file-io-events.d.ts.map +1 -0
  367. package/dist/events/filter-events.d.ts +43 -0
  368. package/dist/events/filter-events.d.ts.map +1 -0
  369. package/dist/events/floating-object-events.d.ts +158 -0
  370. package/dist/events/floating-object-events.d.ts.map +1 -0
  371. package/dist/events/grouping-events.d.ts +75 -0
  372. package/dist/events/grouping-events.d.ts.map +1 -0
  373. package/dist/events/index.d.ts +129 -0
  374. package/dist/events/index.d.ts.map +1 -0
  375. package/dist/events/ink-collaboration-events.d.ts +57 -0
  376. package/dist/events/ink-collaboration-events.d.ts.map +1 -0
  377. package/dist/events/ink-events.d.ts +33 -0
  378. package/dist/events/ink-events.d.ts.map +1 -0
  379. package/dist/events/ink-recognition-events.d.ts +149 -0
  380. package/dist/events/ink-recognition-events.d.ts.map +1 -0
  381. package/dist/events/ink-stroke-events.d.ts +197 -0
  382. package/dist/events/ink-stroke-events.d.ts.map +1 -0
  383. package/dist/events/merge-events.d.ts +46 -0
  384. package/dist/events/merge-events.d.ts.map +1 -0
  385. package/dist/events/named-range-events.d.ts +24 -0
  386. package/dist/events/named-range-events.d.ts.map +1 -0
  387. package/dist/events/pivot-events.d.ts +47 -0
  388. package/dist/events/pivot-events.d.ts.map +1 -0
  389. package/dist/events/print-events.d.ts +75 -0
  390. package/dist/events/print-events.d.ts.map +1 -0
  391. package/dist/events/recalc-events.d.ts +20 -0
  392. package/dist/events/recalc-events.d.ts.map +1 -0
  393. package/dist/events/scenario-events.d.ts +37 -0
  394. package/dist/events/scenario-events.d.ts.map +1 -0
  395. package/dist/events/selection-events.d.ts +16 -0
  396. package/dist/events/selection-events.d.ts.map +1 -0
  397. package/dist/events/settings-events.d.ts +41 -0
  398. package/dist/events/settings-events.d.ts.map +1 -0
  399. package/dist/events/sheet-events.d.ts +68 -0
  400. package/dist/events/sheet-events.d.ts.map +1 -0
  401. package/dist/events/slicer-events.d.ts +47 -0
  402. package/dist/events/slicer-events.d.ts.map +1 -0
  403. package/dist/events/smartart-events.d.ts +222 -0
  404. package/dist/events/smartart-events.d.ts.map +1 -0
  405. package/dist/events/sparkline-events.d.ts +68 -0
  406. package/dist/events/sparkline-events.d.ts.map +1 -0
  407. package/dist/events/store-events.d.ts +18 -0
  408. package/dist/events/store-events.d.ts.map +1 -0
  409. package/dist/events/structure-events.d.ts +76 -0
  410. package/dist/events/structure-events.d.ts.map +1 -0
  411. package/dist/events/table-events.d.ts +99 -0
  412. package/dist/events/table-events.d.ts.map +1 -0
  413. package/dist/events/validation-events.d.ts +85 -0
  414. package/dist/events/validation-events.d.ts.map +1 -0
  415. package/dist/events/view-events.d.ts +72 -0
  416. package/dist/events/view-events.d.ts.map +1 -0
  417. package/dist/events/wordart-events.d.ts +169 -0
  418. package/dist/events/wordart-events.d.ts.map +1 -0
  419. package/dist/events.d.ts +41 -0
  420. package/dist/events.d.ts.map +1 -0
  421. package/dist/extensions/index.d.ts +9 -0
  422. package/dist/extensions/index.d.ts.map +1 -0
  423. package/dist/extensions/types.d.ts +64 -0
  424. package/dist/extensions/types.d.ts.map +1 -0
  425. package/dist/filesystem/index.d.ts +11 -0
  426. package/dist/filesystem/index.d.ts.map +1 -0
  427. package/dist/filesystem/paths.d.ts +38 -0
  428. package/dist/filesystem/paths.d.ts.map +1 -0
  429. package/dist/filesystem/permissions.d.ts +89 -0
  430. package/dist/filesystem/permissions.d.ts.map +1 -0
  431. package/dist/filesystem/types.d.ts +251 -0
  432. package/dist/filesystem/types.d.ts.map +1 -0
  433. package/dist/fill/custom-lists.d.ts +41 -0
  434. package/dist/fill/custom-lists.d.ts.map +1 -0
  435. package/dist/fill/index.d.ts +11 -0
  436. package/dist/fill/index.d.ts.map +1 -0
  437. package/dist/fill/types.d.ts +102 -0
  438. package/dist/fill/types.d.ts.map +1 -0
  439. package/dist/formatting/format-registry.d.ts +45 -0
  440. package/dist/formatting/format-registry.d.ts.map +1 -0
  441. package/dist/formatting/index.d.ts +9 -0
  442. package/dist/formatting/index.d.ts.map +1 -0
  443. package/dist/formatting/theme.d.ts +108 -0
  444. package/dist/formatting/theme.d.ts.map +1 -0
  445. package/dist/index.d.ts +49 -0
  446. package/dist/index.d.ts.map +1 -0
  447. package/dist/ink/index.d.ts +16 -0
  448. package/dist/ink/index.d.ts.map +1 -0
  449. package/dist/ink/spatial-index.d.ts +113 -0
  450. package/dist/ink/spatial-index.d.ts.map +1 -0
  451. package/dist/ink/types.d.ts +558 -0
  452. package/dist/ink/types.d.ts.map +1 -0
  453. package/dist/kernel/floating-object-manager.d.ts +68 -0
  454. package/dist/kernel/floating-object-manager.d.ts.map +1 -0
  455. package/dist/kernel/index.d.ts +12 -0
  456. package/dist/kernel/index.d.ts.map +1 -0
  457. package/dist/kernel/kernel-context.d.ts +129 -0
  458. package/dist/kernel/kernel-context.d.ts.map +1 -0
  459. package/dist/keyboard/actions.d.ts +328 -0
  460. package/dist/keyboard/actions.d.ts.map +1 -0
  461. package/dist/keyboard/binding-utils.d.ts +112 -0
  462. package/dist/keyboard/binding-utils.d.ts.map +1 -0
  463. package/dist/keyboard/customization.d.ts +121 -0
  464. package/dist/keyboard/customization.d.ts.map +1 -0
  465. package/dist/keyboard/display-utils.d.ts +9 -0
  466. package/dist/keyboard/display-utils.d.ts.map +1 -0
  467. package/dist/keyboard/excel-reference.d.ts +28 -0
  468. package/dist/keyboard/excel-reference.d.ts.map +1 -0
  469. package/dist/keyboard/index.d.ts +16 -0
  470. package/dist/keyboard/index.d.ts.map +1 -0
  471. package/dist/keyboard/input.d.ts +124 -0
  472. package/dist/keyboard/input.d.ts.map +1 -0
  473. package/dist/keyboard/physical-keys.d.ts +79 -0
  474. package/dist/keyboard/physical-keys.d.ts.map +1 -0
  475. package/dist/keyboard/shortcuts/definitions/index.d.ts +10 -0
  476. package/dist/keyboard/shortcuts/definitions/index.d.ts.map +1 -0
  477. package/dist/keyboard/shortcuts/types.d.ts +347 -0
  478. package/dist/keyboard/shortcuts/types.d.ts.map +1 -0
  479. package/dist/machines/index.d.ts +12 -0
  480. package/dist/machines/index.d.ts.map +1 -0
  481. package/dist/machines/snapshots.d.ts +160 -0
  482. package/dist/machines/snapshots.d.ts.map +1 -0
  483. package/dist/machines/types.d.ts +64 -0
  484. package/dist/machines/types.d.ts.map +1 -0
  485. package/dist/number-formats/constants.d.ts +39 -0
  486. package/dist/number-formats/constants.d.ts.map +1 -0
  487. package/dist/number-formats/index.d.ts +14 -0
  488. package/dist/number-formats/index.d.ts.map +1 -0
  489. package/dist/number-formats/locale/index.d.ts +5 -0
  490. package/dist/number-formats/locale/index.d.ts.map +1 -0
  491. package/dist/number-formats/locale/locale-defaults.d.ts +17 -0
  492. package/dist/number-formats/locale/locale-defaults.d.ts.map +1 -0
  493. package/dist/number-formats/registry.d.ts +52 -0
  494. package/dist/number-formats/registry.d.ts.map +1 -0
  495. package/dist/number-formats/types.d.ts +134 -0
  496. package/dist/number-formats/types.d.ts.map +1 -0
  497. package/dist/objects/canvas-object.d.ts +157 -0
  498. package/dist/objects/canvas-object.d.ts.map +1 -0
  499. package/dist/objects/drawing-object.d.ts +144 -0
  500. package/dist/objects/drawing-object.d.ts.map +1 -0
  501. package/dist/objects/floating-objects.d.ts +742 -0
  502. package/dist/objects/floating-objects.d.ts.map +1 -0
  503. package/dist/objects/index.d.ts +5 -0
  504. package/dist/objects/index.d.ts.map +1 -0
  505. package/dist/objects/object-bounds-reader.d.ts +25 -0
  506. package/dist/objects/object-bounds-reader.d.ts.map +1 -0
  507. package/dist/objects/object-mutator.d.ts +30 -0
  508. package/dist/objects/object-mutator.d.ts.map +1 -0
  509. package/dist/performance/index.d.ts +8 -0
  510. package/dist/performance/index.d.ts.map +1 -0
  511. package/dist/performance/profiler-types.d.ts +351 -0
  512. package/dist/performance/profiler-types.d.ts.map +1 -0
  513. package/dist/platform/identity.d.ts +24 -0
  514. package/dist/platform/identity.d.ts.map +1 -0
  515. package/dist/platform/index.d.ts +17 -0
  516. package/dist/platform/index.d.ts.map +1 -0
  517. package/dist/platform/types.d.ts +359 -0
  518. package/dist/platform/types.d.ts.map +1 -0
  519. package/dist/rendering/canvas-bridge-types.d.ts +68 -0
  520. package/dist/rendering/canvas-bridge-types.d.ts.map +1 -0
  521. package/dist/rendering/constants.d.ts +76 -0
  522. package/dist/rendering/constants.d.ts.map +1 -0
  523. package/dist/rendering/coordinates.d.ts +452 -0
  524. package/dist/rendering/coordinates.d.ts.map +1 -0
  525. package/dist/rendering/coordinator-interfaces.d.ts +163 -0
  526. package/dist/rendering/coordinator-interfaces.d.ts.map +1 -0
  527. package/dist/rendering/data-sources.d.ts +372 -0
  528. package/dist/rendering/data-sources.d.ts.map +1 -0
  529. package/dist/rendering/grid-region.d.ts +32 -0
  530. package/dist/rendering/grid-region.d.ts.map +1 -0
  531. package/dist/rendering/grid-renderer.d.ts +391 -0
  532. package/dist/rendering/grid-renderer.d.ts.map +1 -0
  533. package/dist/rendering/grouping.d.ts +21 -0
  534. package/dist/rendering/grouping.d.ts.map +1 -0
  535. package/dist/rendering/hit-test-service.d.ts +58 -0
  536. package/dist/rendering/hit-test-service.d.ts.map +1 -0
  537. package/dist/rendering/hit-test.d.ts +223 -0
  538. package/dist/rendering/hit-test.d.ts.map +1 -0
  539. package/dist/rendering/index.d.ts +25 -0
  540. package/dist/rendering/index.d.ts.map +1 -0
  541. package/dist/rendering/interactive-elements.d.ts +121 -0
  542. package/dist/rendering/interactive-elements.d.ts.map +1 -0
  543. package/dist/rendering/primitives.d.ts +17 -0
  544. package/dist/rendering/primitives.d.ts.map +1 -0
  545. package/dist/rendering/render-context.d.ts +457 -0
  546. package/dist/rendering/render-context.d.ts.map +1 -0
  547. package/dist/rendering/text-measurement-service.d.ts +197 -0
  548. package/dist/rendering/text-measurement-service.d.ts.map +1 -0
  549. package/dist/ribbon/collapse-configs.d.ts +298 -0
  550. package/dist/ribbon/collapse-configs.d.ts.map +1 -0
  551. package/dist/ribbon/collapse-types.d.ts +76 -0
  552. package/dist/ribbon/collapse-types.d.ts.map +1 -0
  553. package/dist/ribbon/index.d.ts +25 -0
  554. package/dist/ribbon/index.d.ts.map +1 -0
  555. package/dist/selection/index.d.ts +10 -0
  556. package/dist/selection/index.d.ts.map +1 -0
  557. package/dist/selection/registry.d.ts +17 -0
  558. package/dist/selection/registry.d.ts.map +1 -0
  559. package/dist/selection/types.d.ts +82 -0
  560. package/dist/selection/types.d.ts.map +1 -0
  561. package/dist/selectors/index.d.ts +8 -0
  562. package/dist/selectors/index.d.ts.map +1 -0
  563. package/dist/selectors/smart-art.d.ts +58 -0
  564. package/dist/selectors/smart-art.d.ts.map +1 -0
  565. package/dist/services/index.d.ts +273 -0
  566. package/dist/services/index.d.ts.map +1 -0
  567. package/dist/smartart/index.d.ts +26 -0
  568. package/dist/smartart/index.d.ts.map +1 -0
  569. package/dist/smartart/layouts.d.ts +193 -0
  570. package/dist/smartart/layouts.d.ts.map +1 -0
  571. package/dist/smartart/ooxml-algorithm-types.d.ts +939 -0
  572. package/dist/smartart/ooxml-algorithm-types.d.ts.map +1 -0
  573. package/dist/smartart/ooxml-data-model-types.d.ts +845 -0
  574. package/dist/smartart/ooxml-data-model-types.d.ts.map +1 -0
  575. package/dist/smartart/ooxml-drawing-types.d.ts +356 -0
  576. package/dist/smartart/ooxml-drawing-types.d.ts.map +1 -0
  577. package/dist/smartart/ooxml-engine-types.d.ts +873 -0
  578. package/dist/smartart/ooxml-engine-types.d.ts.map +1 -0
  579. package/dist/smartart/ooxml-layout-types.d.ts +405 -0
  580. package/dist/smartart/ooxml-layout-types.d.ts.map +1 -0
  581. package/dist/smartart/ooxml-style-types.d.ts +474 -0
  582. package/dist/smartart/ooxml-style-types.d.ts.map +1 -0
  583. package/dist/smartart/styles.d.ts +137 -0
  584. package/dist/smartart/styles.d.ts.map +1 -0
  585. package/dist/smartart/types.d.ts +323 -0
  586. package/dist/smartart/types.d.ts.map +1 -0
  587. package/dist/storage/capabilities.d.ts +33 -0
  588. package/dist/storage/capabilities.d.ts.map +1 -0
  589. package/dist/storage/connection.d.ts +183 -0
  590. package/dist/storage/connection.d.ts.map +1 -0
  591. package/dist/storage/index.d.ts +13 -0
  592. package/dist/storage/index.d.ts.map +1 -0
  593. package/dist/storage/query.d.ts +91 -0
  594. package/dist/storage/query.d.ts.map +1 -0
  595. package/dist/storage/table-driver.d.ts +249 -0
  596. package/dist/storage/table-driver.d.ts.map +1 -0
  597. package/dist/store/cell-schema.d.ts +235 -0
  598. package/dist/store/cell-schema.d.ts.map +1 -0
  599. package/dist/store/equation-schema.d.ts +22 -0
  600. package/dist/store/equation-schema.d.ts.map +1 -0
  601. package/dist/store/index.d.ts +33 -0
  602. package/dist/store/index.d.ts.map +1 -0
  603. package/dist/store/ink-schema.d.ts +26 -0
  604. package/dist/store/ink-schema.d.ts.map +1 -0
  605. package/dist/store/scenarios-schema.d.ts +105 -0
  606. package/dist/store/scenarios-schema.d.ts.map +1 -0
  607. package/dist/store/schema-types.d.ts +113 -0
  608. package/dist/store/schema-types.d.ts.map +1 -0
  609. package/dist/store/sheet-maps-schema.d.ts +222 -0
  610. package/dist/store/sheet-maps-schema.d.ts.map +1 -0
  611. package/dist/store/sheet-meta-schema.d.ts +16 -0
  612. package/dist/store/sheet-meta-schema.d.ts.map +1 -0
  613. package/dist/store/smartart-schema.d.ts +17 -0
  614. package/dist/store/smartart-schema.d.ts.map +1 -0
  615. package/dist/store/store-types.d.ts +381 -0
  616. package/dist/store/store-types.d.ts.map +1 -0
  617. package/dist/store/wordart-schema.d.ts +13 -0
  618. package/dist/store/wordart-schema.d.ts.map +1 -0
  619. package/dist/store/workbook-schema.d.ts +16 -0
  620. package/dist/store/workbook-schema.d.ts.map +1 -0
  621. package/dist/styles/built-in-styles.d.ts +10 -0
  622. package/dist/styles/built-in-styles.d.ts.map +1 -0
  623. package/dist/styles/index.d.ts +18 -0
  624. package/dist/styles/index.d.ts.map +1 -0
  625. package/dist/utils/a1.d.ts +12 -0
  626. package/dist/utils/a1.d.ts.map +1 -0
  627. package/dist/utils/datetime.d.ts +7 -0
  628. package/dist/utils/datetime.d.ts.map +1 -0
  629. package/dist/utils/function-registry.d.ts +40 -0
  630. package/dist/utils/function-registry.d.ts.map +1 -0
  631. package/dist/utils/index.d.ts +9 -0
  632. package/dist/utils/index.d.ts.map +1 -0
  633. package/dist/utils/protection.d.ts +9 -0
  634. package/dist/utils/protection.d.ts.map +1 -0
  635. package/dist/utils/range-navigation.d.ts +9 -0
  636. package/dist/utils/range-navigation.d.ts.map +1 -0
  637. package/dist/utils/range.d.ts +9 -0
  638. package/dist/utils/range.d.ts.map +1 -0
  639. package/dist/utils/rich-text.d.ts +9 -0
  640. package/dist/utils/rich-text.d.ts.map +1 -0
  641. package/dist/viewport/geometry.d.ts +90 -0
  642. package/dist/viewport/geometry.d.ts.map +1 -0
  643. package/dist/viewport/grid-canvas.d.ts +133 -0
  644. package/dist/viewport/grid-canvas.d.ts.map +1 -0
  645. package/dist/viewport/index.d.ts +5 -0
  646. package/dist/viewport/index.d.ts.map +1 -0
  647. package/dist/viewport/viewport-config.d.ts +95 -0
  648. package/dist/viewport/viewport-config.d.ts.map +1 -0
  649. package/dist/viewport/viewport.d.ts +191 -0
  650. package/dist/viewport/viewport.d.ts.map +1 -0
  651. package/dist/views/index.d.ts +9 -0
  652. package/dist/views/index.d.ts.map +1 -0
  653. package/dist/views/types.d.ts +161 -0
  654. package/dist/views/types.d.ts.map +1 -0
  655. package/dist/what-if/index.d.ts +2 -0
  656. package/dist/what-if/index.d.ts.map +1 -0
  657. package/dist/what-if/what-if.d.ts +152 -0
  658. package/dist/what-if/what-if.d.ts.map +1 -0
  659. package/dist/window-manager/index.d.ts +134 -0
  660. package/dist/window-manager/index.d.ts.map +1 -0
  661. package/dist/wordart/effects.d.ts +611 -0
  662. package/dist/wordart/effects.d.ts.map +1 -0
  663. package/dist/wordart/index.d.ts +17 -0
  664. package/dist/wordart/index.d.ts.map +1 -0
  665. package/dist/wordart/presets.d.ts +133 -0
  666. package/dist/wordart/presets.d.ts.map +1 -0
  667. package/dist/wordart/types.d.ts +444 -0
  668. package/dist/wordart/types.d.ts.map +1 -0
  669. package/dist/workflows/context.d.ts +777 -0
  670. package/dist/workflows/context.d.ts.map +1 -0
  671. package/dist/workflows/definition.d.ts +256 -0
  672. package/dist/workflows/definition.d.ts.map +1 -0
  673. package/dist/workflows/events.d.ts +397 -0
  674. package/dist/workflows/events.d.ts.map +1 -0
  675. package/dist/workflows/index.d.ts +19 -0
  676. package/dist/workflows/index.d.ts.map +1 -0
  677. package/dist/workflows/instance.d.ts +358 -0
  678. package/dist/workflows/instance.d.ts.map +1 -0
  679. package/dist/workflows/runtime.d.ts +287 -0
  680. package/dist/workflows/runtime.d.ts.map +1 -0
  681. package/dist/workflows/triggers.d.ts +335 -0
  682. package/dist/workflows/triggers.d.ts.map +1 -0
  683. package/dist/workflows/versioning.d.ts +245 -0
  684. package/dist/workflows/versioning.d.ts.map +1 -0
  685. package/dist/xlsx-parser/conditional-format.d.ts +137 -0
  686. package/dist/xlsx-parser/conditional-format.d.ts.map +1 -0
  687. package/dist/xlsx-parser/core.d.ts +622 -0
  688. package/dist/xlsx-parser/core.d.ts.map +1 -0
  689. package/dist/xlsx-parser/data-validation.d.ts +55 -0
  690. package/dist/xlsx-parser/data-validation.d.ts.map +1 -0
  691. package/dist/xlsx-parser/errors.d.ts +38 -0
  692. package/dist/xlsx-parser/errors.d.ts.map +1 -0
  693. package/dist/xlsx-parser/index.d.ts +17 -0
  694. package/dist/xlsx-parser/index.d.ts.map +1 -0
  695. package/dist/xlsx-parser/options.d.ts +89 -0
  696. package/dist/xlsx-parser/options.d.ts.map +1 -0
  697. package/dist/xlsx-parser/styles.d.ts +157 -0
  698. package/dist/xlsx-parser/styles.d.ts.map +1 -0
  699. package/dist/xlsx-parser/table.d.ts +170 -0
  700. package/dist/xlsx-parser/table.d.ts.map +1 -0
  701. package/package.json +410 -0
@@ -0,0 +1,879 @@
1
+ /**
2
+ * External API Contracts
3
+ *
4
+ * Type definitions for the external-facing spreadsheet API.
5
+ * These interfaces define the public API surface for AI agents
6
+ * and external consumers.
7
+ */
8
+ import type { CellAddress, CellData, CellFormat, CellRange, CellValue, CellValuePrimitive, SheetInfo } from '../core/core';
9
+ import type { CodeExecutionOptions, CodeExecutionResult } from '../core/execution';
10
+ import type { Chart as ApiChart, ChartConfig as ApiChartConfig } from '../data/charts';
11
+ import type { ApiSortOptions } from '../data/sorting';
12
+ import type { TableConfig } from '../data/tables';
13
+ import type { SpreadsheetEvent, SpreadsheetEventType } from '../events';
14
+ import type { ApiError } from './api-errors';
15
+ /**
16
+ * Standard result type for all write operations.
17
+ * Uses discriminated union pattern for type-safe error handling.
18
+ */
19
+ export type OperationResult<T = void> = {
20
+ success: true;
21
+ data: T;
22
+ affectedCells?: CellAddress[];
23
+ } | {
24
+ success: false;
25
+ error: ApiError;
26
+ };
27
+ /**
28
+ * Helper type for void operations (no data returned on success)
29
+ */
30
+ export type VoidResult = OperationResult<void>;
31
+ /**
32
+ * Summary of sheet contents
33
+ */
34
+ export interface SheetSnapshot {
35
+ /** Sheet ID */
36
+ id: string;
37
+ /** Sheet name */
38
+ name: string;
39
+ /** Sheet index (0-based) */
40
+ index: number;
41
+ /** Range containing all non-empty cells, or null if sheet is empty */
42
+ usedRange: CellRange | null;
43
+ /** Number of cells with data */
44
+ cellCount: number;
45
+ /** Number of cells with formulas */
46
+ formulaCount: number;
47
+ /** Number of charts in this sheet */
48
+ chartCount: number;
49
+ /** Sheet dimensions */
50
+ dimensions: {
51
+ rows: number;
52
+ cols: number;
53
+ };
54
+ }
55
+ /**
56
+ * Summary of workbook contents
57
+ */
58
+ export interface WorkbookSnapshot {
59
+ /** All sheets in the workbook */
60
+ sheets: SheetSnapshot[];
61
+ /** ID of the active sheet */
62
+ activeSheetId: string;
63
+ /** Total number of sheets */
64
+ sheetCount: number;
65
+ }
66
+ /**
67
+ * Information about a spreadsheet function
68
+ */
69
+ export interface FunctionInfo {
70
+ /** Function name (e.g., "SUM", "VLOOKUP") */
71
+ name: string;
72
+ /** Function category (e.g., "Math", "Lookup", "Text") */
73
+ category: string;
74
+ /** Description of what the function does */
75
+ description: string;
76
+ /** Syntax example (e.g., "SUM(number1, [number2], ...)") */
77
+ syntax: string;
78
+ /** Parameter descriptions */
79
+ parameters: FunctionParameter[];
80
+ /** Return type description */
81
+ returnType: string;
82
+ /** Usage examples */
83
+ examples: string[];
84
+ }
85
+ /**
86
+ * Function parameter description
87
+ */
88
+ export interface FunctionParameter {
89
+ /** Parameter name */
90
+ name: string;
91
+ /** Parameter description */
92
+ description: string;
93
+ /** Whether the parameter is optional */
94
+ optional?: boolean;
95
+ /** Whether the parameter can be repeated */
96
+ repeating?: boolean;
97
+ /** Expected type(s) */
98
+ type?: string;
99
+ }
100
+ /**
101
+ * Information about a merged region.
102
+ *
103
+ * This is the external API representation - it exposes only resolved positions,
104
+ * hiding internal CellId implementation details.
105
+ */
106
+ export interface MergedRegionInfo {
107
+ /** Start row (0-based) */
108
+ startRow: number;
109
+ /** Start column (0-based) */
110
+ startCol: number;
111
+ /** End row (0-based, inclusive) */
112
+ endRow: number;
113
+ /** End column (0-based, inclusive) */
114
+ endCol: number;
115
+ /** Row span (endRow - startRow + 1) */
116
+ rowSpan: number;
117
+ /** Column span (endCol - startCol + 1) */
118
+ colSpan: number;
119
+ }
120
+ /**
121
+ * Shape types supported by the API.
122
+ * Matches ShapeType from floating-objects.ts for consistency.
123
+ */
124
+ export type ApiShapeType = 'rect' | 'roundRect' | 'ellipse' | 'triangle' | 'rtTriangle' | 'diamond' | 'pentagon' | 'hexagon' | 'octagon' | 'parallelogram' | 'trapezoid' | 'nonIsoscelesTrapezoid' | 'heptagon' | 'decagon' | 'dodecagon' | 'teardrop' | 'pie' | 'pieWedge' | 'blockArc' | 'donut' | 'noSmoking' | 'plaque' | 'round1Rect' | 'round2SameRect' | 'round2DiagRect' | 'snip1Rect' | 'snip2SameRect' | 'snip2DiagRect' | 'snipRoundRect' | 'rightArrow' | 'leftArrow' | 'upArrow' | 'downArrow' | 'leftRightArrow' | 'upDownArrow' | 'quadArrow' | 'chevron' | 'leftArrowCallout' | 'rightArrowCallout' | 'upArrowCallout' | 'downArrowCallout' | 'leftRightArrowCallout' | 'upDownArrowCallout' | 'quadArrowCallout' | 'bentArrow' | 'uturnArrow' | 'circularArrow' | 'leftCircularArrow' | 'leftRightCircularArrow' | 'curvedRightArrow' | 'curvedLeftArrow' | 'curvedUpArrow' | 'curvedDownArrow' | 'swooshArrow' | 'star4' | 'star5' | 'star6' | 'star7' | 'star8' | 'star10' | 'star12' | 'star16' | 'star24' | 'star32' | 'ribbon' | 'ribbon2' | 'ellipseRibbon' | 'ellipseRibbon2' | 'leftRightRibbon' | 'banner' | 'wedgeRectCallout' | 'wedgeRoundRectCallout' | 'wedgeEllipseCallout' | 'cloud' | 'callout1' | 'callout2' | 'callout3' | 'borderCallout1' | 'borderCallout2' | 'borderCallout3' | 'accentCallout1' | 'accentCallout2' | 'accentCallout3' | 'accentBorderCallout1' | 'accentBorderCallout2' | 'accentBorderCallout3' | 'line' | 'lineArrow' | 'lineDoubleArrow' | 'curve' | 'arc' | 'connector' | 'bentConnector2' | 'bentConnector3' | 'bentConnector4' | 'bentConnector5' | 'curvedConnector2' | 'curvedConnector3' | 'curvedConnector4' | 'curvedConnector5' | 'flowChartProcess' | 'flowChartDecision' | 'flowChartInputOutput' | 'flowChartPredefinedProcess' | 'flowChartInternalStorage' | 'flowChartDocument' | 'flowChartMultidocument' | 'flowChartTerminator' | 'flowChartPreparation' | 'flowChartManualInput' | 'flowChartManualOperation' | 'flowChartConnector' | 'flowChartPunchedCard' | 'flowChartPunchedTape' | 'flowChartSummingJunction' | 'flowChartOr' | 'flowChartCollate' | 'flowChartSort' | 'flowChartExtract' | 'flowChartMerge' | 'flowChartOfflineStorage' | 'flowChartOnlineStorage' | 'flowChartMagneticTape' | 'flowChartMagneticDisk' | 'flowChartMagneticDrum' | 'flowChartDisplay' | 'flowChartDelay' | 'flowChartAlternateProcess' | 'flowChartOffpageConnector' | 'heart' | 'lightningBolt' | 'sun' | 'moon' | 'smileyFace' | 'foldedCorner' | 'bevel' | 'frame' | 'halfFrame' | 'corner' | 'diagStripe' | 'chord' | 'can' | 'cube' | 'plus' | 'cross' | 'irregularSeal1' | 'irregularSeal2' | 'homePlate' | 'funnel' | 'verticalScroll' | 'horizontalScroll' | 'actionButtonBlank' | 'actionButtonHome' | 'actionButtonHelp' | 'actionButtonInformation' | 'actionButtonForwardNext' | 'actionButtonBackPrevious' | 'actionButtonEnd' | 'actionButtonBeginning' | 'actionButtonReturn' | 'actionButtonDocument' | 'actionButtonSound' | 'actionButtonMovie' | 'leftBracket' | 'rightBracket' | 'leftBrace' | 'rightBrace' | 'bracketPair' | 'bracePair' | 'mathPlus' | 'mathMinus' | 'mathMultiply' | 'mathDivide' | 'mathEqual' | 'mathNotEqual' | 'gear6' | 'gear9' | 'cornerTabs' | 'squareTabs' | 'plaqueTabs' | 'chartX' | 'chartStar' | 'chartPlus';
125
+ /**
126
+ * Shape position configuration for API.
127
+ */
128
+ export interface ApiShapePosition {
129
+ /** Anchor row (0-based) */
130
+ anchorRow: number;
131
+ /** Anchor column (0-based) */
132
+ anchorCol: number;
133
+ /** X offset from cell in pixels */
134
+ xOffset?: number;
135
+ /** Y offset from cell in pixels */
136
+ yOffset?: number;
137
+ /** Width in pixels */
138
+ width: number;
139
+ /** Height in pixels */
140
+ height: number;
141
+ }
142
+ /**
143
+ * Shape fill configuration.
144
+ */
145
+ export interface ApiShapeFill {
146
+ /** Fill type */
147
+ type: 'none' | 'solid' | 'gradient';
148
+ /** Fill color (for solid) */
149
+ color?: string;
150
+ }
151
+ /**
152
+ * Shape outline configuration.
153
+ */
154
+ export interface ApiShapeOutline {
155
+ /** Outline style */
156
+ style: 'none' | 'solid' | 'dashed' | 'dotted';
157
+ /** Outline color */
158
+ color?: string;
159
+ /** Outline width in pixels */
160
+ width?: number;
161
+ }
162
+ /**
163
+ * Shape configuration for API operations.
164
+ */
165
+ export interface ApiShapeConfig {
166
+ /** Shape type */
167
+ type: ApiShapeType;
168
+ /** Position configuration */
169
+ position: ApiShapePosition;
170
+ /** Optional name for the shape */
171
+ name?: string;
172
+ /** Fill configuration */
173
+ fill?: ApiShapeFill;
174
+ /** Outline configuration */
175
+ outline?: ApiShapeOutline;
176
+ /** Text content inside the shape */
177
+ text?: string;
178
+ /** Rotation angle in degrees (0-360) */
179
+ rotation?: number;
180
+ /** Whether the shape is locked */
181
+ locked?: boolean;
182
+ }
183
+ /**
184
+ * Shape data returned by the API.
185
+ */
186
+ export interface ApiShape extends ApiShapeConfig {
187
+ /** Unique shape ID */
188
+ id: string;
189
+ /** Sheet ID the shape belongs to */
190
+ sheetId: string;
191
+ /** Z-order within the sheet */
192
+ zIndex: number;
193
+ /** Creation timestamp */
194
+ createdAt?: number;
195
+ /** Last update timestamp */
196
+ updatedAt?: number;
197
+ }
198
+ /**
199
+ * Per-sheet operations interface.
200
+ * Obtained via SpreadsheetAPI.sheet(sheetId) or .activeSheet()
201
+ */
202
+ export interface ISheetAPI {
203
+ /** The sheet ID this API operates on */
204
+ readonly sheetId: string;
205
+ /**
206
+ * Get complete cell data including formula, format, etc.
207
+ * Returns undefined if cell is empty.
208
+ */
209
+ getCell(row: number, col: number): CellData | undefined | Promise<CellData | undefined>;
210
+ /**
211
+ * Get the computed value of a cell.
212
+ * For formula cells, returns the calculated result.
213
+ */
214
+ getValue(row: number, col: number): CellValue | Promise<CellValue>;
215
+ /**
216
+ * Get the display string of a cell (formatted value).
217
+ */
218
+ getDisplayValue(row: number, col: number): string | Promise<string>;
219
+ /**
220
+ * Get the formula of a cell, if any.
221
+ */
222
+ getFormula(row: number, col: number): string | undefined | Promise<string | undefined>;
223
+ /**
224
+ * Get the format of a cell.
225
+ */
226
+ getFormat(row: number, col: number): CellFormat | undefined | Promise<CellFormat | undefined>;
227
+ /**
228
+ * Set a cell's value. If value starts with "=", it's treated as a formula.
229
+ */
230
+ setCell(row: number, col: number, value: CellValuePrimitive): Promise<OperationResult<void>>;
231
+ /**
232
+ * Clear a cell's value.
233
+ */
234
+ clearCell(row: number, col: number): Promise<OperationResult<void>>;
235
+ /**
236
+ * Get all cell data in a range.
237
+ */
238
+ getRange(range: CellRange): CellData[][] | Promise<CellData[][]>;
239
+ /**
240
+ * Get just the values from a range.
241
+ */
242
+ getRangeValues(range: CellRange): CellValue[][] | Promise<CellValue[][]>;
243
+ /**
244
+ * Set values in a range from a 2D array.
245
+ * Array dimensions determine the range size.
246
+ */
247
+ setRange(startRow: number, startCol: number, values: CellValuePrimitive[][]): Promise<OperationResult<void>>;
248
+ /**
249
+ * Clear all values in a range.
250
+ */
251
+ clearRange(range: CellRange): Promise<OperationResult<void>>;
252
+ /**
253
+ * Set format for a single cell.
254
+ */
255
+ setFormat(row: number, col: number, format: Partial<CellFormat>): OperationResult<void>;
256
+ /**
257
+ * Set format for a range.
258
+ */
259
+ setRangeFormat(range: CellRange, format: Partial<CellFormat>): OperationResult<void>;
260
+ /**
261
+ * Clear format from a cell.
262
+ */
263
+ clearFormat(row: number, col: number): OperationResult<void>;
264
+ /**
265
+ * Insert rows at the specified position.
266
+ */
267
+ insertRows(startRow: number, count: number): OperationResult<void>;
268
+ /**
269
+ * Delete rows starting at the specified position.
270
+ */
271
+ deleteRows(startRow: number, count: number): OperationResult<void>;
272
+ /**
273
+ * Insert columns at the specified position.
274
+ */
275
+ insertColumns(startCol: number, count: number): OperationResult<void>;
276
+ /**
277
+ * Delete columns starting at the specified position.
278
+ */
279
+ deleteColumns(startCol: number, count: number): OperationResult<void>;
280
+ /**
281
+ * Merge cells in a range.
282
+ *
283
+ * Creates a merged region where the top-left cell contains the value
284
+ * and spans across all cells in the range. Other cells in the range
285
+ * are cleared.
286
+ *
287
+ * @param range - The range to merge
288
+ * @returns OperationResult with the merge info, or error if range is invalid/overlaps
289
+ *
290
+ * @example
291
+ * ```typescript
292
+ * // Merge cells A1:B2
293
+ * const result = sheet.mergeCells({ startRow: 0, startCol: 0, endRow: 1, endCol: 1 });
294
+ * if (result.success) {
295
+ * console.log('Merged region created');
296
+ * }
297
+ * ```
298
+ */
299
+ mergeCells(range: CellRange): OperationResult<MergedRegionInfo>;
300
+ /**
301
+ * Unmerge cells in a range.
302
+ *
303
+ * Removes any merged regions whose origin falls within the given range.
304
+ * The origin cell retains its value.
305
+ *
306
+ * @param range - The range to unmerge
307
+ * @returns OperationResult with the count of merges removed
308
+ */
309
+ unmergeCells(range: CellRange): OperationResult<{
310
+ count: number;
311
+ }>;
312
+ /**
313
+ * Get all merged regions in this sheet.
314
+ *
315
+ * @returns Array of merged regions with their resolved positions
316
+ */
317
+ getMergedRegions(): MergedRegionInfo[] | Promise<MergedRegionInfo[]>;
318
+ /**
319
+ * Get the merge containing a specific cell, if any.
320
+ *
321
+ * @param row - Row index (0-based)
322
+ * @param col - Column index (0-based)
323
+ * @returns The merge info if cell is in a merge, undefined otherwise
324
+ */
325
+ getMergeAt(row: number, col: number): MergedRegionInfo | undefined | Promise<MergedRegionInfo | undefined>;
326
+ /**
327
+ * Create a new chart on this sheet.
328
+ *
329
+ * @param config - Chart configuration
330
+ * @returns OperationResult with the created chart's ID
331
+ *
332
+ * @example
333
+ * ```typescript
334
+ * const result = sheet.createChart({
335
+ * type: 'bar',
336
+ * dataRange: 'A1:D10',
337
+ * position: { anchorRow: 0, anchorCol: 5, width: 8, height: 15 },
338
+ * title: 'Sales by Region',
339
+ * });
340
+ * if (result.success) {
341
+ * console.log('Created chart:', result.data.chartId);
342
+ * }
343
+ * ```
344
+ */
345
+ createChart(config: ApiChartConfig): OperationResult<{
346
+ chartId: string;
347
+ }> | Promise<OperationResult<{
348
+ chartId: string;
349
+ }>>;
350
+ /**
351
+ * Update an existing chart's configuration.
352
+ *
353
+ * @param chartId - ID of the chart to update
354
+ * @param updates - Partial configuration to apply
355
+ * @returns OperationResult indicating success or failure
356
+ */
357
+ updateChart(chartId: string, updates: Partial<ApiChartConfig>): OperationResult<void> | Promise<OperationResult<void>>;
358
+ /**
359
+ * Delete a chart from this sheet.
360
+ *
361
+ * @param chartId - ID of the chart to delete
362
+ * @returns OperationResult indicating success or failure
363
+ */
364
+ deleteChart(chartId: string): OperationResult<void> | Promise<OperationResult<void>>;
365
+ /**
366
+ * Get a chart by ID.
367
+ *
368
+ * @param chartId - ID of the chart
369
+ * @returns The chart configuration, or undefined if not found
370
+ */
371
+ getChart(chartId: string): ApiChart | undefined | Promise<ApiChart | undefined>;
372
+ /**
373
+ * Get all charts on this sheet.
374
+ *
375
+ * @returns Array of chart configurations
376
+ */
377
+ getCharts(): ApiChart[] | Promise<ApiChart[]>;
378
+ /**
379
+ * Create a new shape on this sheet.
380
+ *
381
+ * @param config - Shape configuration
382
+ * @returns OperationResult with the created shape
383
+ */
384
+ createShape(config: ApiShapeConfig): OperationResult<ApiShape> | Promise<OperationResult<ApiShape>>;
385
+ /**
386
+ * Get a shape by ID.
387
+ *
388
+ * @param shapeId - ID of the shape
389
+ * @returns The shape, or undefined if not found
390
+ */
391
+ getShape(shapeId: string): ApiShape | undefined;
392
+ /**
393
+ * Get all shapes on this sheet.
394
+ *
395
+ * @returns Array of shapes
396
+ */
397
+ getShapes(): ApiShape[];
398
+ /**
399
+ * Update a shape's properties.
400
+ *
401
+ * @param shapeId - ID of the shape to update
402
+ * @param updates - Partial configuration to apply
403
+ * @returns OperationResult indicating success or failure
404
+ */
405
+ updateShape(shapeId: string, updates: Partial<ApiShapeConfig>): OperationResult<void>;
406
+ /**
407
+ * Delete a shape from this sheet.
408
+ *
409
+ * @param shapeId - ID of the shape to delete
410
+ * @returns OperationResult indicating success or failure
411
+ */
412
+ deleteShape(shapeId: string): OperationResult<void>;
413
+ /**
414
+ * Move a shape to a new position.
415
+ *
416
+ * @param shapeId - ID of the shape to move
417
+ * @param x - New X position in pixels
418
+ * @param y - New Y position in pixels
419
+ * @returns OperationResult indicating success or failure
420
+ */
421
+ moveShape(shapeId: string, x: number, y: number): OperationResult<void>;
422
+ /**
423
+ * Resize a shape.
424
+ *
425
+ * @param shapeId - ID of the shape to resize
426
+ * @param width - New width in pixels
427
+ * @param height - New height in pixels
428
+ * @returns OperationResult indicating success or failure
429
+ */
430
+ resizeShape(shapeId: string, width: number, height: number): OperationResult<void>;
431
+ /**
432
+ * Rotate a shape.
433
+ *
434
+ * @param shapeId - ID of the shape to rotate
435
+ * @param angle - Rotation angle in degrees (0-360)
436
+ * @returns OperationResult indicating success or failure
437
+ */
438
+ rotateShape(shapeId: string, angle: number): OperationResult<void>;
439
+ /**
440
+ * Flip a shape horizontally or vertically.
441
+ *
442
+ * @param shapeId - ID of the shape to flip
443
+ * @param direction - 'horizontal' or 'vertical'
444
+ * @returns OperationResult indicating success or failure
445
+ */
446
+ flipShape(shapeId: string, direction: 'horizontal' | 'vertical'): OperationResult<void>;
447
+ /**
448
+ * Duplicate a shape.
449
+ *
450
+ * @param shapeId - ID of the shape to duplicate
451
+ * @param offsetX - Optional horizontal offset for the duplicate (default: 20px)
452
+ * @param offsetY - Optional vertical offset for the duplicate (default: 20px)
453
+ * @returns OperationResult with the duplicated shape
454
+ */
455
+ duplicateShape(shapeId: string, offsetX?: number, offsetY?: number): OperationResult<ApiShape>;
456
+ /**
457
+ * Bring a shape to the front (highest z-index).
458
+ *
459
+ * @param shapeId - ID of the shape
460
+ * @returns OperationResult indicating success or failure
461
+ */
462
+ bringShapeToFront(shapeId: string): OperationResult<void>;
463
+ /**
464
+ * Send a shape to the back (lowest z-index).
465
+ *
466
+ * @param shapeId - ID of the shape
467
+ * @returns OperationResult indicating success or failure
468
+ */
469
+ sendShapeToBack(shapeId: string): OperationResult<void>;
470
+ /**
471
+ * Get the range containing all non-empty cells.
472
+ */
473
+ getUsedRange(): CellRange | null;
474
+ /**
475
+ * Find cells matching a predicate.
476
+ */
477
+ findCells(predicate: (cell: CellData, row: number, col: number) => boolean): CellAddress[];
478
+ /**
479
+ * Find cells by value.
480
+ */
481
+ findByValue(value: CellValue): CellAddress[];
482
+ /**
483
+ * Find cells with formulas matching a pattern.
484
+ */
485
+ findByFormula(pattern: RegExp): CellAddress[];
486
+ /**
487
+ * Get cells that depend on the specified cell.
488
+ */
489
+ getDependents(row: number, col: number): CellAddress[] | Promise<CellAddress[]>;
490
+ /**
491
+ * Get cells that the specified cell references.
492
+ */
493
+ getPrecedents(row: number, col: number): CellAddress[] | Promise<CellAddress[]>;
494
+ /**
495
+ * Sort a range of cells.
496
+ *
497
+ * Sorts the data in a range based on one or more columns.
498
+ * Uses the Cell Identity Model internally - cells keep their identity
499
+ * (CellIds), only positions change.
500
+ *
501
+ * @param range - The range to sort
502
+ * @param options - Sort options specifying columns and directions
503
+ * @returns OperationResult with the number of rows that changed position
504
+ *
505
+ * @example
506
+ * ```typescript
507
+ * // Sort A1:C10 by column B ascending
508
+ * const result = sheet.sortRange(
509
+ * { startRow: 0, startCol: 0, endRow: 9, endCol: 2 },
510
+ * { sortBy: [{ column: 1, direction: 'asc' }], hasHeaders: true }
511
+ * );
512
+ * if (result.success) {
513
+ * console.log(`${result.data.rowsMoved} rows were reordered`);
514
+ * }
515
+ *
516
+ * // Multi-column sort: primary by column A, secondary by column C
517
+ * sheet.sortRange(range, {
518
+ * sortBy: [
519
+ * { column: 0, direction: 'asc' },
520
+ * { column: 2, direction: 'desc' }
521
+ * ],
522
+ * hasHeaders: true
523
+ * });
524
+ * ```
525
+ */
526
+ sortRange(range: CellRange, options: ApiSortOptions): OperationResult<{
527
+ rowsMoved: number;
528
+ }> | OperationResult<{
529
+ dispatched: boolean;
530
+ }> | Promise<OperationResult<{
531
+ rowsMoved: number;
532
+ }>> | Promise<OperationResult<{
533
+ dispatched: boolean;
534
+ }>>;
535
+ }
536
+ /**
537
+ * Main spreadsheet API facade.
538
+ * Entry point for all spreadsheet operations.
539
+ */
540
+ export interface ISpreadsheetAPI {
541
+ /**
542
+ * Get a SheetAPI for the specified sheet.
543
+ */
544
+ sheet(sheetId: string): ISheetAPI;
545
+ /**
546
+ * Get a SheetAPI for the currently active sheet.
547
+ */
548
+ activeSheet(): ISheetAPI | Promise<ISheetAPI>;
549
+ /**
550
+ * Create a new sheet with the given name.
551
+ */
552
+ createSheet(name: string): OperationResult<{
553
+ sheetId: string;
554
+ }> | Promise<OperationResult<{
555
+ sheetId: string;
556
+ }>>;
557
+ /**
558
+ * Delete a sheet.
559
+ */
560
+ deleteSheet(sheetId: string): OperationResult<void> | Promise<OperationResult<void>>;
561
+ /**
562
+ * Rename a sheet.
563
+ */
564
+ renameSheet(sheetId: string, name: string): OperationResult<void> | Promise<OperationResult<void>>;
565
+ /**
566
+ * Get all sheet IDs in order.
567
+ */
568
+ getSheetIds(): string[] | Promise<string[]>;
569
+ /**
570
+ * Get metadata for a sheet.
571
+ */
572
+ getSheetMeta(sheetId: string): SheetInfo | undefined | Promise<SheetInfo | undefined>;
573
+ /**
574
+ * Move a sheet to a new position.
575
+ * @param sheetId The sheet to move
576
+ * @param newIndex The zero-based target index
577
+ */
578
+ moveSheet(sheetId: string, newIndex: number): OperationResult<void> | Promise<OperationResult<void>>;
579
+ /**
580
+ * Force a full recalculation of the workbook.
581
+ * Normally recalc happens automatically after each write.
582
+ */
583
+ recalc(): OperationResult<void> | Promise<OperationResult<void>>;
584
+ /**
585
+ * Suspend automatic recalculation.
586
+ * While suspended, writes still go to the engine but intermediate
587
+ * recalc results are not applied to the store. Call `resumeCalc()`
588
+ * to trigger a single recalc and apply all changes.
589
+ */
590
+ suspendCalc(): void;
591
+ /**
592
+ * Resume automatic recalculation and trigger a full recalc.
593
+ * Applies all changes accumulated since `suspendCalc()`.
594
+ */
595
+ resumeCalc(): OperationResult<void> | Promise<OperationResult<void>>;
596
+ /**
597
+ * Check if calculation is currently suspended.
598
+ */
599
+ isCalcSuspended(): boolean;
600
+ /**
601
+ * Execute multiple operations as a single undoable transaction.
602
+ */
603
+ batch(fn: (api: ISpreadsheetAPI) => void): OperationResult<void>;
604
+ /**
605
+ * Undo the last operation.
606
+ */
607
+ undo(): OperationResult<void>;
608
+ /**
609
+ * Redo the last undone operation.
610
+ */
611
+ redo(): OperationResult<void>;
612
+ /**
613
+ * Check if undo is available.
614
+ */
615
+ canUndo(): boolean;
616
+ /**
617
+ * Check if redo is available.
618
+ */
619
+ canRedo(): boolean;
620
+ /**
621
+ * Create a table from a range.
622
+ * @param sheetId Sheet to create the table in
623
+ * @param range Cell range for the table (startRow, startCol, endRow, endCol)
624
+ * @param options Optional table configuration
625
+ * @returns OperationResult with the table name on success
626
+ */
627
+ createTable(sheetId: string, range: {
628
+ startRow: number;
629
+ startCol: number;
630
+ endRow: number;
631
+ endCol: number;
632
+ }, options?: {
633
+ name?: string;
634
+ hasHeaderRow?: boolean;
635
+ hasTotalRow?: boolean;
636
+ styleName?: string;
637
+ }): OperationResult<string> | Promise<OperationResult<string>>;
638
+ /**
639
+ * Get all tables in a sheet.
640
+ * @param sheetId Sheet identifier
641
+ * @returns Array of table info
642
+ */
643
+ getTables(sheetId: string): Array<{
644
+ name: string;
645
+ range: {
646
+ startRow: number;
647
+ startCol: number;
648
+ endRow: number;
649
+ endCol: number;
650
+ };
651
+ hasHeaderRow: boolean;
652
+ hasTotalRow: boolean;
653
+ styleName: string;
654
+ columns: string[];
655
+ }> | Promise<Array<{
656
+ name: string;
657
+ range: {
658
+ startRow: number;
659
+ startCol: number;
660
+ endRow: number;
661
+ endCol: number;
662
+ };
663
+ hasHeaderRow: boolean;
664
+ hasTotalRow: boolean;
665
+ styleName: string;
666
+ columns: string[];
667
+ }>>;
668
+ /**
669
+ * Get a specific table by name.
670
+ * @param sheetId Sheet identifier
671
+ * @param tableName Table name
672
+ * @returns Table info or undefined if not found
673
+ */
674
+ getTable(sheetId: string, tableName: string): {
675
+ name: string;
676
+ range: {
677
+ startRow: number;
678
+ startCol: number;
679
+ endRow: number;
680
+ endCol: number;
681
+ };
682
+ hasHeaderRow: boolean;
683
+ hasTotalRow: boolean;
684
+ styleName: string;
685
+ columns: string[];
686
+ } | undefined | Promise<{
687
+ name: string;
688
+ range: {
689
+ startRow: number;
690
+ startCol: number;
691
+ endRow: number;
692
+ endCol: number;
693
+ };
694
+ hasHeaderRow: boolean;
695
+ hasTotalRow: boolean;
696
+ styleName: string;
697
+ columns: string[];
698
+ } | undefined>;
699
+ /**
700
+ * Get the table containing a specific cell.
701
+ * @param sheetId Sheet identifier
702
+ * @param row Row index
703
+ * @param col Column index
704
+ * @returns Table config if cell is in a table, undefined otherwise
705
+ */
706
+ getTableAtCell(sheetId: string, row: number, col: number): TableConfig | undefined | Promise<TableConfig | undefined>;
707
+ /**
708
+ * Delete a table (keeps cell data).
709
+ * @param sheetId Sheet identifier
710
+ * @param tableName Table name
711
+ * @returns OperationResult indicating success or failure
712
+ */
713
+ deleteTable(sheetId: string, tableName: string): OperationResult<void> | Promise<OperationResult<void>>;
714
+ /**
715
+ * Rename a table.
716
+ * @param sheetId Sheet identifier
717
+ * @param oldName Current table name
718
+ * @param newName New table name
719
+ * @returns OperationResult indicating success or failure
720
+ */
721
+ renameTable(sheetId: string, oldName: string, newName: string): OperationResult<void> | Promise<OperationResult<void>>;
722
+ /**
723
+ * Toggle a table's total row.
724
+ * @param sheetId Sheet identifier
725
+ * @param tableName Table name
726
+ * @param show Whether to show the total row
727
+ * @returns OperationResult indicating success or failure
728
+ */
729
+ toggleTableTotalRow(sheetId: string, tableName: string, show: boolean): OperationResult<void> | Promise<OperationResult<void>>;
730
+ /**
731
+ * Set total function for a table column.
732
+ * @param sheetId Sheet identifier
733
+ * @param tableName Table name
734
+ * @param columnName Column name
735
+ * @param func Total function to apply (uppercase: SUM, AVERAGE, etc. or lowercase)
736
+ * @returns OperationResult indicating success or failure
737
+ */
738
+ setTableTotalFunction(sheetId: string, tableName: string, columnName: string, func: 'AVERAGE' | 'COUNT' | 'COUNTA' | 'MAX' | 'MIN' | 'STDDEV' | 'SUM' | 'VAR' | 'none'): OperationResult<void> | Promise<OperationResult<void>>;
739
+ /**
740
+ * Define a new named range.
741
+ * @param name The name (e.g., "SalesData", "TaxRate")
742
+ * @param refersTo A1-style reference (e.g., "=Sheet1!$A$1:$B$10")
743
+ * @param options Optional scope and comment
744
+ */
745
+ defineName(name: string, refersTo: string, options?: {
746
+ scope?: string;
747
+ comment?: string;
748
+ }): OperationResult<{
749
+ id: string;
750
+ name: string;
751
+ }> | Promise<OperationResult<{
752
+ id: string;
753
+ name: string;
754
+ }>>;
755
+ /**
756
+ * Get all defined names.
757
+ */
758
+ getDefinedNames(): Array<{
759
+ id: string;
760
+ name: string;
761
+ refersToA1: string;
762
+ scope?: string;
763
+ comment?: string;
764
+ }> | Promise<Array<{
765
+ id: string;
766
+ name: string;
767
+ refersToA1: string;
768
+ scope?: string;
769
+ comment?: string;
770
+ }>>;
771
+ /**
772
+ * Get a specific defined name by name.
773
+ * @param name The name to find
774
+ * @param scope Optional scope (undefined = workbook scope)
775
+ */
776
+ getDefinedName(name: string, scope?: string): {
777
+ id: string;
778
+ name: string;
779
+ refersToA1: string;
780
+ scope?: string;
781
+ comment?: string;
782
+ } | undefined | Promise<{
783
+ id: string;
784
+ name: string;
785
+ refersToA1: string;
786
+ scope?: string;
787
+ comment?: string;
788
+ } | undefined>;
789
+ /**
790
+ * Update a defined name.
791
+ * @param id The ID of the name to update
792
+ * @param updates Fields to update
793
+ */
794
+ updateDefinedName(id: string, updates: {
795
+ name?: string;
796
+ refersTo?: string;
797
+ comment?: string;
798
+ }): OperationResult<void> | Promise<OperationResult<void>>;
799
+ /**
800
+ * Delete a defined name.
801
+ * @param id The ID of the name to delete
802
+ */
803
+ deleteDefinedName(id: string): OperationResult<void> | Promise<OperationResult<void>>;
804
+ /**
805
+ * Validate a potential name (without creating it).
806
+ * @param name The name to validate
807
+ * @param scope Optional scope
808
+ */
809
+ validateDefinedName(name: string, scope?: string): {
810
+ valid: boolean;
811
+ error?: string;
812
+ message?: string;
813
+ } | Promise<{
814
+ valid: boolean;
815
+ error?: string;
816
+ message?: string;
817
+ }>;
818
+ /**
819
+ * Get a snapshot of the workbook state.
820
+ * Useful for understanding what exists before making changes.
821
+ */
822
+ getWorkbookSnapshot(): WorkbookSnapshot | Promise<WorkbookSnapshot>;
823
+ /**
824
+ * Get all available spreadsheet functions.
825
+ */
826
+ getFunctionCatalog(): FunctionInfo[];
827
+ /**
828
+ * Get detailed info about a specific function.
829
+ */
830
+ getFunctionInfo(name: string): FunctionInfo | undefined;
831
+ /**
832
+ * Subscribe to spreadsheet events.
833
+ * Returns an unsubscribe function.
834
+ */
835
+ on<K extends SpreadsheetEventType>(eventType: K, handler: (event: Extract<SpreadsheetEvent, {
836
+ type: K;
837
+ }>) => void): () => void;
838
+ /**
839
+ * Execute AI-generated code in a sandboxed Web Worker.
840
+ *
841
+ * This method provides secure code execution for AI agents. The code runs
842
+ * in an isolated Web Worker with no DOM access, no localStorage, and
843
+ * no network access. All spreadsheet operations go through the API.
844
+ *
845
+ * The code has access to:
846
+ * - `workbook` - Async proxy to SpreadsheetAPI
847
+ * - `store` - Persistent key-value store between executions
848
+ * - `console` - Console methods (captured and returned in logs)
849
+ *
850
+ * @param code - TypeScript/JavaScript code to execute
851
+ * @param options - Execution options (timeout, store, etc.)
852
+ * @returns Execution result with affected cells, logs, and timing
853
+ *
854
+ * @example
855
+ * ```typescript
856
+ * const result = await api.executeCode(`
857
+ * const sheet = await workbook.activeSheet();
858
+ * await sheet.setCell(0, 0, "Hello from AI!");
859
+ * await sheet.setRange(1, 0, [
860
+ * ["Name", "Score"],
861
+ * ["Alice", 100],
862
+ * ["Bob", 95],
863
+ * ]);
864
+ * console.log("Done!");
865
+ * `);
866
+ *
867
+ * if (result.status === 'success') {
868
+ * console.log(`Modified ${result.changeCount} cells`);
869
+ * console.log(`Logs: ${result.logs.join('\n')}`);
870
+ * } else {
871
+ * console.error(`Error: ${result.error}`);
872
+ * }
873
+ * ```
874
+ */
875
+ executeCode(code: string, options?: CodeExecutionOptions): Promise<CodeExecutionResult>;
876
+ }
877
+ export type { ApiError, ApiErrorCode } from './api-errors';
878
+ export type { CellAddress, CellData, CellFormat, CellRange, CellValue, CellValuePrimitive };
879
+ //# sourceMappingURL=api.d.ts.map