@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.
- package/dist/accessibility/index.d.ts +9 -0
- package/dist/accessibility/index.d.ts.map +1 -0
- package/dist/accessibility/types.d.ts +75 -0
- package/dist/accessibility/types.d.ts.map +1 -0
- package/dist/actions/comments.d.ts +31 -0
- package/dist/actions/comments.d.ts.map +1 -0
- package/dist/actions/index.d.ts +22 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/types.d.ts +448 -0
- package/dist/actions/types.d.ts.map +1 -0
- package/dist/actors/chart.d.ts +88 -0
- package/dist/actors/chart.d.ts.map +1 -0
- package/dist/actors/clipboard.d.ts +243 -0
- package/dist/actors/clipboard.d.ts.map +1 -0
- package/dist/actors/commands.d.ts +1343 -0
- package/dist/actors/commands.d.ts.map +1 -0
- package/dist/actors/comment.d.ts +84 -0
- package/dist/actors/comment.d.ts.map +1 -0
- package/dist/actors/draw-border.d.ts +89 -0
- package/dist/actors/draw-border.d.ts.map +1 -0
- package/dist/actors/editor.d.ts +161 -0
- package/dist/actors/editor.d.ts.map +1 -0
- package/dist/actors/find-replace.d.ts +88 -0
- package/dist/actors/find-replace.d.ts.map +1 -0
- package/dist/actors/focus.d.ts +91 -0
- package/dist/actors/focus.d.ts.map +1 -0
- package/dist/actors/index.d.ts +88 -0
- package/dist/actors/index.d.ts.map +1 -0
- package/dist/actors/input.d.ts +98 -0
- package/dist/actors/input.d.ts.map +1 -0
- package/dist/actors/object-interaction.d.ts +163 -0
- package/dist/actors/object-interaction.d.ts.map +1 -0
- package/dist/actors/object.d.ts +124 -0
- package/dist/actors/object.d.ts.map +1 -0
- package/dist/actors/page-break.d.ts +64 -0
- package/dist/actors/page-break.d.ts.map +1 -0
- package/dist/actors/pane-focus.d.ts +56 -0
- package/dist/actors/pane-focus.d.ts.map +1 -0
- package/dist/actors/renderer.d.ts +197 -0
- package/dist/actors/renderer.d.ts.map +1 -0
- package/dist/actors/selection.d.ts +170 -0
- package/dist/actors/selection.d.ts.map +1 -0
- package/dist/actors/slicer.d.ts +175 -0
- package/dist/actors/slicer.d.ts.map +1 -0
- package/dist/actors/smartart.d.ts +48 -0
- package/dist/actors/smartart.d.ts.map +1 -0
- package/dist/api/index.d.ts +19 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/mutation-receipt.d.ts +26 -0
- package/dist/api/mutation-receipt.d.ts.map +1 -0
- package/dist/api/types.d.ts +1542 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/workbook/history.d.ts +43 -0
- package/dist/api/workbook/history.d.ts.map +1 -0
- package/dist/api/workbook/index.d.ts +17 -0
- package/dist/api/workbook/index.d.ts.map +1 -0
- package/dist/api/workbook/names.d.ts +104 -0
- package/dist/api/workbook/names.d.ts.map +1 -0
- package/dist/api/workbook/notifications.d.ts +35 -0
- package/dist/api/workbook/notifications.d.ts.map +1 -0
- package/dist/api/workbook/protection.d.ts +14 -0
- package/dist/api/workbook/protection.d.ts.map +1 -0
- package/dist/api/workbook/scenarios.d.ts +45 -0
- package/dist/api/workbook/scenarios.d.ts.map +1 -0
- package/dist/api/workbook/sheets.d.ts +74 -0
- package/dist/api/workbook/sheets.d.ts.map +1 -0
- package/dist/api/workbook/slicers.d.ts +63 -0
- package/dist/api/workbook/slicers.d.ts.map +1 -0
- package/dist/api/workbook/styles.d.ts +19 -0
- package/dist/api/workbook/styles.d.ts.map +1 -0
- package/dist/api/workbook/theme.d.ts +38 -0
- package/dist/api/workbook/theme.d.ts.map +1 -0
- package/dist/api/workbook/viewport.d.ts +85 -0
- package/dist/api/workbook/viewport.d.ts.map +1 -0
- package/dist/api/workbook.d.ts +279 -0
- package/dist/api/workbook.d.ts.map +1 -0
- package/dist/api/worksheet/bindings.d.ts +66 -0
- package/dist/api/worksheet/bindings.d.ts.map +1 -0
- package/dist/api/worksheet/changes.d.ts +60 -0
- package/dist/api/worksheet/changes.d.ts.map +1 -0
- package/dist/api/worksheet/charts.d.ts +83 -0
- package/dist/api/worksheet/charts.d.ts.map +1 -0
- package/dist/api/worksheet/collections/connector-collection.d.ts +7 -0
- package/dist/api/worksheet/collections/connector-collection.d.ts.map +1 -0
- package/dist/api/worksheet/collections/drawing-collection.d.ts +9 -0
- package/dist/api/worksheet/collections/drawing-collection.d.ts.map +1 -0
- package/dist/api/worksheet/collections/equation-collection.d.ts +8 -0
- package/dist/api/worksheet/collections/equation-collection.d.ts.map +1 -0
- package/dist/api/worksheet/collections/index.d.ts +12 -0
- package/dist/api/worksheet/collections/index.d.ts.map +1 -0
- package/dist/api/worksheet/collections/object-collection.d.ts +45 -0
- package/dist/api/worksheet/collections/object-collection.d.ts.map +1 -0
- package/dist/api/worksheet/collections/picture-collection.d.ts +8 -0
- package/dist/api/worksheet/collections/picture-collection.d.ts.map +1 -0
- package/dist/api/worksheet/collections/shape-collection.d.ts +8 -0
- package/dist/api/worksheet/collections/shape-collection.d.ts.map +1 -0
- package/dist/api/worksheet/collections/textbox-collection.d.ts +8 -0
- package/dist/api/worksheet/collections/textbox-collection.d.ts.map +1 -0
- package/dist/api/worksheet/collections/wordart-collection.d.ts +8 -0
- package/dist/api/worksheet/collections/wordart-collection.d.ts.map +1 -0
- package/dist/api/worksheet/comments.d.ts +143 -0
- package/dist/api/worksheet/comments.d.ts.map +1 -0
- package/dist/api/worksheet/conditional-formats.d.ts +101 -0
- package/dist/api/worksheet/conditional-formats.d.ts.map +1 -0
- package/dist/api/worksheet/filters.d.ts +141 -0
- package/dist/api/worksheet/filters.d.ts.map +1 -0
- package/dist/api/worksheet/form-controls.d.ts +22 -0
- package/dist/api/worksheet/form-controls.d.ts.map +1 -0
- package/dist/api/worksheet/format-mappings.d.ts +50 -0
- package/dist/api/worksheet/format-mappings.d.ts.map +1 -0
- package/dist/api/worksheet/formats.d.ts +136 -0
- package/dist/api/worksheet/formats.d.ts.map +1 -0
- package/dist/api/worksheet/handles/chart-handle.d.ts +11 -0
- package/dist/api/worksheet/handles/chart-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/connector-handle.d.ts +9 -0
- package/dist/api/worksheet/handles/connector-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/drawing-handle.d.ts +14 -0
- package/dist/api/worksheet/handles/drawing-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/equation-handle.d.ts +9 -0
- package/dist/api/worksheet/handles/equation-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/floating-object-handle.d.ts +75 -0
- package/dist/api/worksheet/handles/floating-object-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/index.d.ts +16 -0
- package/dist/api/worksheet/handles/index.d.ts.map +1 -0
- package/dist/api/worksheet/handles/ole-object-handle.d.ts +10 -0
- package/dist/api/worksheet/handles/ole-object-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/picture-handle.d.ts +9 -0
- package/dist/api/worksheet/handles/picture-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/shape-handle.d.ts +11 -0
- package/dist/api/worksheet/handles/shape-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/slicer-handle.d.ts +13 -0
- package/dist/api/worksheet/handles/slicer-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/smartart-handle.d.ts +11 -0
- package/dist/api/worksheet/handles/smartart-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/textbox-handle.d.ts +9 -0
- package/dist/api/worksheet/handles/textbox-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/wordart-handle.d.ts +10 -0
- package/dist/api/worksheet/handles/wordart-handle.d.ts.map +1 -0
- package/dist/api/worksheet/hyperlinks.d.ts +52 -0
- package/dist/api/worksheet/hyperlinks.d.ts.map +1 -0
- package/dist/api/worksheet/index.d.ts +35 -0
- package/dist/api/worksheet/index.d.ts.map +1 -0
- package/dist/api/worksheet/internal.d.ts +105 -0
- package/dist/api/worksheet/internal.d.ts.map +1 -0
- package/dist/api/worksheet/layout.d.ts +150 -0
- package/dist/api/worksheet/layout.d.ts.map +1 -0
- package/dist/api/worksheet/names.d.ts +52 -0
- package/dist/api/worksheet/names.d.ts.map +1 -0
- package/dist/api/worksheet/objects.d.ts +124 -0
- package/dist/api/worksheet/objects.d.ts.map +1 -0
- package/dist/api/worksheet/outline.d.ts +101 -0
- package/dist/api/worksheet/outline.d.ts.map +1 -0
- package/dist/api/worksheet/pivots.d.ts +257 -0
- package/dist/api/worksheet/pivots.d.ts.map +1 -0
- package/dist/api/worksheet/print.d.ts +108 -0
- package/dist/api/worksheet/print.d.ts.map +1 -0
- package/dist/api/worksheet/protection.d.ts +73 -0
- package/dist/api/worksheet/protection.d.ts.map +1 -0
- package/dist/api/worksheet/settings.d.ts +54 -0
- package/dist/api/worksheet/settings.d.ts.map +1 -0
- package/dist/api/worksheet/slicers.d.ts +101 -0
- package/dist/api/worksheet/slicers.d.ts.map +1 -0
- package/dist/api/worksheet/smartart.d.ts +49 -0
- package/dist/api/worksheet/smartart.d.ts.map +1 -0
- package/dist/api/worksheet/sparklines.d.ts +143 -0
- package/dist/api/worksheet/sparklines.d.ts.map +1 -0
- package/dist/api/worksheet/structure.d.ts +44 -0
- package/dist/api/worksheet/structure.d.ts.map +1 -0
- package/dist/api/worksheet/tables.d.ts +313 -0
- package/dist/api/worksheet/tables.d.ts.map +1 -0
- package/dist/api/worksheet/validation.d.ts +101 -0
- package/dist/api/worksheet/validation.d.ts.map +1 -0
- package/dist/api/worksheet/view.d.ts +91 -0
- package/dist/api/worksheet/view.d.ts.map +1 -0
- package/dist/api/worksheet.d.ts +370 -0
- package/dist/api/worksheet.d.ts.map +1 -0
- package/dist/app/index.d.ts +17 -0
- package/dist/app/index.d.ts.map +1 -0
- package/dist/app/types.d.ts +349 -0
- package/dist/app/types.d.ts.map +1 -0
- package/dist/apps/api.d.ts +519 -0
- package/dist/apps/api.d.ts.map +1 -0
- package/dist/apps/bindings.d.ts +72 -0
- package/dist/apps/bindings.d.ts.map +1 -0
- package/dist/apps/index.d.ts +13 -0
- package/dist/apps/index.d.ts.map +1 -0
- package/dist/apps/types.d.ts +224 -0
- package/dist/apps/types.d.ts.map +1 -0
- package/dist/apps/views.d.ts +142 -0
- package/dist/apps/views.d.ts.map +1 -0
- package/dist/bridges/chart-bridge.d.ts +172 -0
- package/dist/bridges/chart-bridge.d.ts.map +1 -0
- package/dist/bridges/equation-bridge.d.ts +74 -0
- package/dist/bridges/equation-bridge.d.ts.map +1 -0
- package/dist/bridges/index.d.ts +25 -0
- package/dist/bridges/index.d.ts.map +1 -0
- package/dist/bridges/ink-recognition-bridge.d.ts +142 -0
- package/dist/bridges/ink-recognition-bridge.d.ts.map +1 -0
- package/dist/bridges/locale-bridge.d.ts +93 -0
- package/dist/bridges/locale-bridge.d.ts.map +1 -0
- package/dist/bridges/pivot-bridge.d.ts +201 -0
- package/dist/bridges/pivot-bridge.d.ts.map +1 -0
- package/dist/bridges/schema-bridge.d.ts +137 -0
- package/dist/bridges/schema-bridge.d.ts.map +1 -0
- package/dist/bridges/smartart-bridge.d.ts +217 -0
- package/dist/bridges/smartart-bridge.d.ts.map +1 -0
- package/dist/bridges/wordart-bridge.d.ts +86 -0
- package/dist/bridges/wordart-bridge.d.ts.map +1 -0
- package/dist/capabilities/errors.d.ts +16 -0
- package/dist/capabilities/errors.d.ts.map +1 -0
- package/dist/capabilities/gated-api.d.ts +355 -0
- package/dist/capabilities/gated-api.d.ts.map +1 -0
- package/dist/capabilities/grants.d.ts +239 -0
- package/dist/capabilities/grants.d.ts.map +1 -0
- package/dist/capabilities/index.d.ts +24 -0
- package/dist/capabilities/index.d.ts.map +1 -0
- package/dist/capabilities/manifest.d.ts +128 -0
- package/dist/capabilities/manifest.d.ts.map +1 -0
- package/dist/capabilities/requester.d.ts +209 -0
- package/dist/capabilities/requester.d.ts.map +1 -0
- package/dist/capabilities/scope.d.ts +55 -0
- package/dist/capabilities/scope.d.ts.map +1 -0
- package/dist/capabilities/sensitive.d.ts +279 -0
- package/dist/capabilities/sensitive.d.ts.map +1 -0
- package/dist/capabilities/taxonomy.d.ts +15 -0
- package/dist/capabilities/taxonomy.d.ts.map +1 -0
- package/dist/capabilities/types.d.ts +91 -0
- package/dist/capabilities/types.d.ts.map +1 -0
- package/dist/cells/cell-identity.d.ts +281 -0
- package/dist/cells/cell-identity.d.ts.map +1 -0
- package/dist/cells/cell-style.d.ts +67 -0
- package/dist/cells/cell-style.d.ts.map +1 -0
- package/dist/cells/formula-string.d.ts +37 -0
- package/dist/cells/formula-string.d.ts.map +1 -0
- package/dist/cells/index.d.ts +7 -0
- package/dist/cells/index.d.ts.map +1 -0
- package/dist/cells/range-ref.d.ts +77 -0
- package/dist/cells/range-ref.d.ts.map +1 -0
- package/dist/cells/rich-text.d.ts +66 -0
- package/dist/cells/rich-text.d.ts.map +1 -0
- package/dist/cells/spill.d.ts +121 -0
- package/dist/cells/spill.d.ts.map +1 -0
- package/dist/conditional-format/index.d.ts +11 -0
- package/dist/conditional-format/index.d.ts.map +1 -0
- package/dist/conditional-format/presets.d.ts +54 -0
- package/dist/conditional-format/presets.d.ts.map +1 -0
- package/dist/conditional-format/range-utils.d.ts +11 -0
- package/dist/conditional-format/range-utils.d.ts.map +1 -0
- package/dist/conditional-format/render-types.d.ts +80 -0
- package/dist/conditional-format/render-types.d.ts.map +1 -0
- package/dist/connections/api-errors.d.ts +29 -0
- package/dist/connections/api-errors.d.ts.map +1 -0
- package/dist/connections/api.d.ts +879 -0
- package/dist/connections/api.d.ts.map +1 -0
- package/dist/connections/database-bridge-types.d.ts +108 -0
- package/dist/connections/database-bridge-types.d.ts.map +1 -0
- package/dist/connections/index.d.ts +5 -0
- package/dist/connections/index.d.ts.map +1 -0
- package/dist/connections/power-query.d.ts +1 -0
- package/dist/connections/power-query.d.ts.map +1 -0
- package/dist/connections/query.d.ts +144 -0
- package/dist/connections/query.d.ts.map +1 -0
- package/dist/context-menu/index.d.ts +10 -0
- package/dist/context-menu/index.d.ts.map +1 -0
- package/dist/context-menu/types.d.ts +28 -0
- package/dist/context-menu/types.d.ts.map +1 -0
- package/dist/core/commands.d.ts +143 -0
- package/dist/core/commands.d.ts.map +1 -0
- package/dist/core/core.d.ts +943 -0
- package/dist/core/core.d.ts.map +1 -0
- package/dist/core/disposable.d.ts +30 -0
- package/dist/core/disposable.d.ts.map +1 -0
- package/dist/core/event-base.d.ts +31 -0
- package/dist/core/event-base.d.ts.map +1 -0
- package/dist/core/execution.d.ts +79 -0
- package/dist/core/execution.d.ts.map +1 -0
- package/dist/core/formatted-text.d.ts +8 -0
- package/dist/core/formatted-text.d.ts.map +1 -0
- package/dist/core/index.d.ts +10 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/result.d.ts +23 -0
- package/dist/core/result.d.ts.map +1 -0
- package/dist/core/schema.d.ts +360 -0
- package/dist/core/schema.d.ts.map +1 -0
- package/dist/core/testing.d.ts +309 -0
- package/dist/core/testing.d.ts.map +1 -0
- package/dist/culture/index.d.ts +11 -0
- package/dist/culture/index.d.ts.map +1 -0
- package/dist/culture/types.d.ts +320 -0
- package/dist/culture/types.d.ts.map +1 -0
- package/dist/data/charts.d.ts +412 -0
- package/dist/data/charts.d.ts.map +1 -0
- package/dist/data/conditional-format.d.ts +188 -0
- package/dist/data/conditional-format.d.ts.map +1 -0
- package/dist/data/filter.d.ts +364 -0
- package/dist/data/filter.d.ts.map +1 -0
- package/dist/data/grouping.d.ts +170 -0
- package/dist/data/grouping.d.ts.map +1 -0
- package/dist/data/index.d.ts +12 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/named-ranges.d.ts +104 -0
- package/dist/data/named-ranges.d.ts.map +1 -0
- package/dist/data/pivot.d.ts +68 -0
- package/dist/data/pivot.d.ts.map +1 -0
- package/dist/data/slicers.d.ts +417 -0
- package/dist/data/slicers.d.ts.map +1 -0
- package/dist/data/sorting.d.ts +172 -0
- package/dist/data/sorting.d.ts.map +1 -0
- package/dist/data/sparklines.d.ts +358 -0
- package/dist/data/sparklines.d.ts.map +1 -0
- package/dist/data/tables.d.ts +333 -0
- package/dist/data/tables.d.ts.map +1 -0
- package/dist/data/trace-arrows.d.ts +165 -0
- package/dist/data/trace-arrows.d.ts.map +1 -0
- package/dist/diagnostics/core.d.ts +219 -0
- package/dist/diagnostics/core.d.ts.map +1 -0
- package/dist/diagnostics/index.d.ts +9 -0
- package/dist/diagnostics/index.d.ts.map +1 -0
- package/dist/diagnostics/style.d.ts +196 -0
- package/dist/diagnostics/style.d.ts.map +1 -0
- package/dist/document/comments.d.ts +109 -0
- package/dist/document/comments.d.ts.map +1 -0
- package/dist/document/document.d.ts +182 -0
- package/dist/document/document.d.ts.map +1 -0
- package/dist/document/index.d.ts +5 -0
- package/dist/document/index.d.ts.map +1 -0
- package/dist/document/protection.d.ts +114 -0
- package/dist/document/protection.d.ts.map +1 -0
- package/dist/document/search.d.ts +202 -0
- package/dist/document/search.d.ts.map +1 -0
- package/dist/drawing/index.d.ts +8 -0
- package/dist/drawing/index.d.ts.map +1 -0
- package/dist/drawing/three-d.d.ts +171 -0
- package/dist/drawing/three-d.d.ts.map +1 -0
- package/dist/editor/drag.d.ts +178 -0
- package/dist/editor/drag.d.ts.map +1 -0
- package/dist/editor/editor.d.ts +59 -0
- package/dist/editor/editor.d.ts.map +1 -0
- package/dist/editor/form-controls.d.ts +428 -0
- package/dist/editor/form-controls.d.ts.map +1 -0
- package/dist/editor/index.d.ts +4 -0
- package/dist/editor/index.d.ts.map +1 -0
- package/dist/equation/errors.d.ts +19 -0
- package/dist/equation/errors.d.ts.map +1 -0
- package/dist/equation/index.d.ts +12 -0
- package/dist/equation/index.d.ts.map +1 -0
- package/dist/equation/omml-ast.d.ts +358 -0
- package/dist/equation/omml-ast.d.ts.map +1 -0
- package/dist/equation/templates.d.ts +26 -0
- package/dist/equation/templates.d.ts.map +1 -0
- package/dist/equation/types.d.ts +87 -0
- package/dist/equation/types.d.ts.map +1 -0
- package/dist/events/canvas-object-events.d.ts +31 -0
- package/dist/events/canvas-object-events.d.ts.map +1 -0
- package/dist/events/cell-events.d.ts +60 -0
- package/dist/events/cell-events.d.ts.map +1 -0
- package/dist/events/chart-events.d.ts +61 -0
- package/dist/events/chart-events.d.ts.map +1 -0
- package/dist/events/comment-events.d.ts +43 -0
- package/dist/events/comment-events.d.ts.map +1 -0
- package/dist/events/conditional-formatting-events.d.ts +40 -0
- package/dist/events/conditional-formatting-events.d.ts.map +1 -0
- package/dist/events/data-tools-events.d.ts +29 -0
- package/dist/events/data-tools-events.d.ts.map +1 -0
- package/dist/events/file-io-events.d.ts +39 -0
- package/dist/events/file-io-events.d.ts.map +1 -0
- package/dist/events/filter-events.d.ts +43 -0
- package/dist/events/filter-events.d.ts.map +1 -0
- package/dist/events/floating-object-events.d.ts +158 -0
- package/dist/events/floating-object-events.d.ts.map +1 -0
- package/dist/events/grouping-events.d.ts +75 -0
- package/dist/events/grouping-events.d.ts.map +1 -0
- package/dist/events/index.d.ts +129 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/ink-collaboration-events.d.ts +57 -0
- package/dist/events/ink-collaboration-events.d.ts.map +1 -0
- package/dist/events/ink-events.d.ts +33 -0
- package/dist/events/ink-events.d.ts.map +1 -0
- package/dist/events/ink-recognition-events.d.ts +149 -0
- package/dist/events/ink-recognition-events.d.ts.map +1 -0
- package/dist/events/ink-stroke-events.d.ts +197 -0
- package/dist/events/ink-stroke-events.d.ts.map +1 -0
- package/dist/events/merge-events.d.ts +46 -0
- package/dist/events/merge-events.d.ts.map +1 -0
- package/dist/events/named-range-events.d.ts +24 -0
- package/dist/events/named-range-events.d.ts.map +1 -0
- package/dist/events/pivot-events.d.ts +47 -0
- package/dist/events/pivot-events.d.ts.map +1 -0
- package/dist/events/print-events.d.ts +75 -0
- package/dist/events/print-events.d.ts.map +1 -0
- package/dist/events/recalc-events.d.ts +20 -0
- package/dist/events/recalc-events.d.ts.map +1 -0
- package/dist/events/scenario-events.d.ts +37 -0
- package/dist/events/scenario-events.d.ts.map +1 -0
- package/dist/events/selection-events.d.ts +16 -0
- package/dist/events/selection-events.d.ts.map +1 -0
- package/dist/events/settings-events.d.ts +41 -0
- package/dist/events/settings-events.d.ts.map +1 -0
- package/dist/events/sheet-events.d.ts +68 -0
- package/dist/events/sheet-events.d.ts.map +1 -0
- package/dist/events/slicer-events.d.ts +47 -0
- package/dist/events/slicer-events.d.ts.map +1 -0
- package/dist/events/smartart-events.d.ts +222 -0
- package/dist/events/smartart-events.d.ts.map +1 -0
- package/dist/events/sparkline-events.d.ts +68 -0
- package/dist/events/sparkline-events.d.ts.map +1 -0
- package/dist/events/store-events.d.ts +18 -0
- package/dist/events/store-events.d.ts.map +1 -0
- package/dist/events/structure-events.d.ts +76 -0
- package/dist/events/structure-events.d.ts.map +1 -0
- package/dist/events/table-events.d.ts +99 -0
- package/dist/events/table-events.d.ts.map +1 -0
- package/dist/events/validation-events.d.ts +85 -0
- package/dist/events/validation-events.d.ts.map +1 -0
- package/dist/events/view-events.d.ts +72 -0
- package/dist/events/view-events.d.ts.map +1 -0
- package/dist/events/wordart-events.d.ts +169 -0
- package/dist/events/wordart-events.d.ts.map +1 -0
- package/dist/events.d.ts +41 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/extensions/index.d.ts +9 -0
- package/dist/extensions/index.d.ts.map +1 -0
- package/dist/extensions/types.d.ts +64 -0
- package/dist/extensions/types.d.ts.map +1 -0
- package/dist/filesystem/index.d.ts +11 -0
- package/dist/filesystem/index.d.ts.map +1 -0
- package/dist/filesystem/paths.d.ts +38 -0
- package/dist/filesystem/paths.d.ts.map +1 -0
- package/dist/filesystem/permissions.d.ts +89 -0
- package/dist/filesystem/permissions.d.ts.map +1 -0
- package/dist/filesystem/types.d.ts +251 -0
- package/dist/filesystem/types.d.ts.map +1 -0
- package/dist/fill/custom-lists.d.ts +41 -0
- package/dist/fill/custom-lists.d.ts.map +1 -0
- package/dist/fill/index.d.ts +11 -0
- package/dist/fill/index.d.ts.map +1 -0
- package/dist/fill/types.d.ts +102 -0
- package/dist/fill/types.d.ts.map +1 -0
- package/dist/formatting/format-registry.d.ts +45 -0
- package/dist/formatting/format-registry.d.ts.map +1 -0
- package/dist/formatting/index.d.ts +9 -0
- package/dist/formatting/index.d.ts.map +1 -0
- package/dist/formatting/theme.d.ts +108 -0
- package/dist/formatting/theme.d.ts.map +1 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/ink/index.d.ts +16 -0
- package/dist/ink/index.d.ts.map +1 -0
- package/dist/ink/spatial-index.d.ts +113 -0
- package/dist/ink/spatial-index.d.ts.map +1 -0
- package/dist/ink/types.d.ts +558 -0
- package/dist/ink/types.d.ts.map +1 -0
- package/dist/kernel/floating-object-manager.d.ts +68 -0
- package/dist/kernel/floating-object-manager.d.ts.map +1 -0
- package/dist/kernel/index.d.ts +12 -0
- package/dist/kernel/index.d.ts.map +1 -0
- package/dist/kernel/kernel-context.d.ts +129 -0
- package/dist/kernel/kernel-context.d.ts.map +1 -0
- package/dist/keyboard/actions.d.ts +328 -0
- package/dist/keyboard/actions.d.ts.map +1 -0
- package/dist/keyboard/binding-utils.d.ts +112 -0
- package/dist/keyboard/binding-utils.d.ts.map +1 -0
- package/dist/keyboard/customization.d.ts +121 -0
- package/dist/keyboard/customization.d.ts.map +1 -0
- package/dist/keyboard/display-utils.d.ts +9 -0
- package/dist/keyboard/display-utils.d.ts.map +1 -0
- package/dist/keyboard/excel-reference.d.ts +28 -0
- package/dist/keyboard/excel-reference.d.ts.map +1 -0
- package/dist/keyboard/index.d.ts +16 -0
- package/dist/keyboard/index.d.ts.map +1 -0
- package/dist/keyboard/input.d.ts +124 -0
- package/dist/keyboard/input.d.ts.map +1 -0
- package/dist/keyboard/physical-keys.d.ts +79 -0
- package/dist/keyboard/physical-keys.d.ts.map +1 -0
- package/dist/keyboard/shortcuts/definitions/index.d.ts +10 -0
- package/dist/keyboard/shortcuts/definitions/index.d.ts.map +1 -0
- package/dist/keyboard/shortcuts/types.d.ts +347 -0
- package/dist/keyboard/shortcuts/types.d.ts.map +1 -0
- package/dist/machines/index.d.ts +12 -0
- package/dist/machines/index.d.ts.map +1 -0
- package/dist/machines/snapshots.d.ts +160 -0
- package/dist/machines/snapshots.d.ts.map +1 -0
- package/dist/machines/types.d.ts +64 -0
- package/dist/machines/types.d.ts.map +1 -0
- package/dist/number-formats/constants.d.ts +39 -0
- package/dist/number-formats/constants.d.ts.map +1 -0
- package/dist/number-formats/index.d.ts +14 -0
- package/dist/number-formats/index.d.ts.map +1 -0
- package/dist/number-formats/locale/index.d.ts +5 -0
- package/dist/number-formats/locale/index.d.ts.map +1 -0
- package/dist/number-formats/locale/locale-defaults.d.ts +17 -0
- package/dist/number-formats/locale/locale-defaults.d.ts.map +1 -0
- package/dist/number-formats/registry.d.ts +52 -0
- package/dist/number-formats/registry.d.ts.map +1 -0
- package/dist/number-formats/types.d.ts +134 -0
- package/dist/number-formats/types.d.ts.map +1 -0
- package/dist/objects/canvas-object.d.ts +157 -0
- package/dist/objects/canvas-object.d.ts.map +1 -0
- package/dist/objects/drawing-object.d.ts +144 -0
- package/dist/objects/drawing-object.d.ts.map +1 -0
- package/dist/objects/floating-objects.d.ts +742 -0
- package/dist/objects/floating-objects.d.ts.map +1 -0
- package/dist/objects/index.d.ts +5 -0
- package/dist/objects/index.d.ts.map +1 -0
- package/dist/objects/object-bounds-reader.d.ts +25 -0
- package/dist/objects/object-bounds-reader.d.ts.map +1 -0
- package/dist/objects/object-mutator.d.ts +30 -0
- package/dist/objects/object-mutator.d.ts.map +1 -0
- package/dist/performance/index.d.ts +8 -0
- package/dist/performance/index.d.ts.map +1 -0
- package/dist/performance/profiler-types.d.ts +351 -0
- package/dist/performance/profiler-types.d.ts.map +1 -0
- package/dist/platform/identity.d.ts +24 -0
- package/dist/platform/identity.d.ts.map +1 -0
- package/dist/platform/index.d.ts +17 -0
- package/dist/platform/index.d.ts.map +1 -0
- package/dist/platform/types.d.ts +359 -0
- package/dist/platform/types.d.ts.map +1 -0
- package/dist/rendering/canvas-bridge-types.d.ts +68 -0
- package/dist/rendering/canvas-bridge-types.d.ts.map +1 -0
- package/dist/rendering/constants.d.ts +76 -0
- package/dist/rendering/constants.d.ts.map +1 -0
- package/dist/rendering/coordinates.d.ts +452 -0
- package/dist/rendering/coordinates.d.ts.map +1 -0
- package/dist/rendering/coordinator-interfaces.d.ts +163 -0
- package/dist/rendering/coordinator-interfaces.d.ts.map +1 -0
- package/dist/rendering/data-sources.d.ts +372 -0
- package/dist/rendering/data-sources.d.ts.map +1 -0
- package/dist/rendering/grid-region.d.ts +32 -0
- package/dist/rendering/grid-region.d.ts.map +1 -0
- package/dist/rendering/grid-renderer.d.ts +391 -0
- package/dist/rendering/grid-renderer.d.ts.map +1 -0
- package/dist/rendering/grouping.d.ts +21 -0
- package/dist/rendering/grouping.d.ts.map +1 -0
- package/dist/rendering/hit-test-service.d.ts +58 -0
- package/dist/rendering/hit-test-service.d.ts.map +1 -0
- package/dist/rendering/hit-test.d.ts +223 -0
- package/dist/rendering/hit-test.d.ts.map +1 -0
- package/dist/rendering/index.d.ts +25 -0
- package/dist/rendering/index.d.ts.map +1 -0
- package/dist/rendering/interactive-elements.d.ts +121 -0
- package/dist/rendering/interactive-elements.d.ts.map +1 -0
- package/dist/rendering/primitives.d.ts +17 -0
- package/dist/rendering/primitives.d.ts.map +1 -0
- package/dist/rendering/render-context.d.ts +457 -0
- package/dist/rendering/render-context.d.ts.map +1 -0
- package/dist/rendering/text-measurement-service.d.ts +197 -0
- package/dist/rendering/text-measurement-service.d.ts.map +1 -0
- package/dist/ribbon/collapse-configs.d.ts +298 -0
- package/dist/ribbon/collapse-configs.d.ts.map +1 -0
- package/dist/ribbon/collapse-types.d.ts +76 -0
- package/dist/ribbon/collapse-types.d.ts.map +1 -0
- package/dist/ribbon/index.d.ts +25 -0
- package/dist/ribbon/index.d.ts.map +1 -0
- package/dist/selection/index.d.ts +10 -0
- package/dist/selection/index.d.ts.map +1 -0
- package/dist/selection/registry.d.ts +17 -0
- package/dist/selection/registry.d.ts.map +1 -0
- package/dist/selection/types.d.ts +82 -0
- package/dist/selection/types.d.ts.map +1 -0
- package/dist/selectors/index.d.ts +8 -0
- package/dist/selectors/index.d.ts.map +1 -0
- package/dist/selectors/smart-art.d.ts +58 -0
- package/dist/selectors/smart-art.d.ts.map +1 -0
- package/dist/services/index.d.ts +273 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/smartart/index.d.ts +26 -0
- package/dist/smartart/index.d.ts.map +1 -0
- package/dist/smartart/layouts.d.ts +193 -0
- package/dist/smartart/layouts.d.ts.map +1 -0
- package/dist/smartart/ooxml-algorithm-types.d.ts +939 -0
- package/dist/smartart/ooxml-algorithm-types.d.ts.map +1 -0
- package/dist/smartart/ooxml-data-model-types.d.ts +845 -0
- package/dist/smartart/ooxml-data-model-types.d.ts.map +1 -0
- package/dist/smartart/ooxml-drawing-types.d.ts +356 -0
- package/dist/smartart/ooxml-drawing-types.d.ts.map +1 -0
- package/dist/smartart/ooxml-engine-types.d.ts +873 -0
- package/dist/smartart/ooxml-engine-types.d.ts.map +1 -0
- package/dist/smartart/ooxml-layout-types.d.ts +405 -0
- package/dist/smartart/ooxml-layout-types.d.ts.map +1 -0
- package/dist/smartart/ooxml-style-types.d.ts +474 -0
- package/dist/smartart/ooxml-style-types.d.ts.map +1 -0
- package/dist/smartart/styles.d.ts +137 -0
- package/dist/smartart/styles.d.ts.map +1 -0
- package/dist/smartart/types.d.ts +323 -0
- package/dist/smartart/types.d.ts.map +1 -0
- package/dist/storage/capabilities.d.ts +33 -0
- package/dist/storage/capabilities.d.ts.map +1 -0
- package/dist/storage/connection.d.ts +183 -0
- package/dist/storage/connection.d.ts.map +1 -0
- package/dist/storage/index.d.ts +13 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/query.d.ts +91 -0
- package/dist/storage/query.d.ts.map +1 -0
- package/dist/storage/table-driver.d.ts +249 -0
- package/dist/storage/table-driver.d.ts.map +1 -0
- package/dist/store/cell-schema.d.ts +235 -0
- package/dist/store/cell-schema.d.ts.map +1 -0
- package/dist/store/equation-schema.d.ts +22 -0
- package/dist/store/equation-schema.d.ts.map +1 -0
- package/dist/store/index.d.ts +33 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/ink-schema.d.ts +26 -0
- package/dist/store/ink-schema.d.ts.map +1 -0
- package/dist/store/scenarios-schema.d.ts +105 -0
- package/dist/store/scenarios-schema.d.ts.map +1 -0
- package/dist/store/schema-types.d.ts +113 -0
- package/dist/store/schema-types.d.ts.map +1 -0
- package/dist/store/sheet-maps-schema.d.ts +222 -0
- package/dist/store/sheet-maps-schema.d.ts.map +1 -0
- package/dist/store/sheet-meta-schema.d.ts +16 -0
- package/dist/store/sheet-meta-schema.d.ts.map +1 -0
- package/dist/store/smartart-schema.d.ts +17 -0
- package/dist/store/smartart-schema.d.ts.map +1 -0
- package/dist/store/store-types.d.ts +381 -0
- package/dist/store/store-types.d.ts.map +1 -0
- package/dist/store/wordart-schema.d.ts +13 -0
- package/dist/store/wordart-schema.d.ts.map +1 -0
- package/dist/store/workbook-schema.d.ts +16 -0
- package/dist/store/workbook-schema.d.ts.map +1 -0
- package/dist/styles/built-in-styles.d.ts +10 -0
- package/dist/styles/built-in-styles.d.ts.map +1 -0
- package/dist/styles/index.d.ts +18 -0
- package/dist/styles/index.d.ts.map +1 -0
- package/dist/utils/a1.d.ts +12 -0
- package/dist/utils/a1.d.ts.map +1 -0
- package/dist/utils/datetime.d.ts +7 -0
- package/dist/utils/datetime.d.ts.map +1 -0
- package/dist/utils/function-registry.d.ts +40 -0
- package/dist/utils/function-registry.d.ts.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/protection.d.ts +9 -0
- package/dist/utils/protection.d.ts.map +1 -0
- package/dist/utils/range-navigation.d.ts +9 -0
- package/dist/utils/range-navigation.d.ts.map +1 -0
- package/dist/utils/range.d.ts +9 -0
- package/dist/utils/range.d.ts.map +1 -0
- package/dist/utils/rich-text.d.ts +9 -0
- package/dist/utils/rich-text.d.ts.map +1 -0
- package/dist/viewport/geometry.d.ts +90 -0
- package/dist/viewport/geometry.d.ts.map +1 -0
- package/dist/viewport/grid-canvas.d.ts +133 -0
- package/dist/viewport/grid-canvas.d.ts.map +1 -0
- package/dist/viewport/index.d.ts +5 -0
- package/dist/viewport/index.d.ts.map +1 -0
- package/dist/viewport/viewport-config.d.ts +95 -0
- package/dist/viewport/viewport-config.d.ts.map +1 -0
- package/dist/viewport/viewport.d.ts +191 -0
- package/dist/viewport/viewport.d.ts.map +1 -0
- package/dist/views/index.d.ts +9 -0
- package/dist/views/index.d.ts.map +1 -0
- package/dist/views/types.d.ts +161 -0
- package/dist/views/types.d.ts.map +1 -0
- package/dist/what-if/index.d.ts +2 -0
- package/dist/what-if/index.d.ts.map +1 -0
- package/dist/what-if/what-if.d.ts +152 -0
- package/dist/what-if/what-if.d.ts.map +1 -0
- package/dist/window-manager/index.d.ts +134 -0
- package/dist/window-manager/index.d.ts.map +1 -0
- package/dist/wordart/effects.d.ts +611 -0
- package/dist/wordart/effects.d.ts.map +1 -0
- package/dist/wordart/index.d.ts +17 -0
- package/dist/wordart/index.d.ts.map +1 -0
- package/dist/wordart/presets.d.ts +133 -0
- package/dist/wordart/presets.d.ts.map +1 -0
- package/dist/wordart/types.d.ts +444 -0
- package/dist/wordart/types.d.ts.map +1 -0
- package/dist/workflows/context.d.ts +777 -0
- package/dist/workflows/context.d.ts.map +1 -0
- package/dist/workflows/definition.d.ts +256 -0
- package/dist/workflows/definition.d.ts.map +1 -0
- package/dist/workflows/events.d.ts +397 -0
- package/dist/workflows/events.d.ts.map +1 -0
- package/dist/workflows/index.d.ts +19 -0
- package/dist/workflows/index.d.ts.map +1 -0
- package/dist/workflows/instance.d.ts +358 -0
- package/dist/workflows/instance.d.ts.map +1 -0
- package/dist/workflows/runtime.d.ts +287 -0
- package/dist/workflows/runtime.d.ts.map +1 -0
- package/dist/workflows/triggers.d.ts +335 -0
- package/dist/workflows/triggers.d.ts.map +1 -0
- package/dist/workflows/versioning.d.ts +245 -0
- package/dist/workflows/versioning.d.ts.map +1 -0
- package/dist/xlsx-parser/conditional-format.d.ts +137 -0
- package/dist/xlsx-parser/conditional-format.d.ts.map +1 -0
- package/dist/xlsx-parser/core.d.ts +622 -0
- package/dist/xlsx-parser/core.d.ts.map +1 -0
- package/dist/xlsx-parser/data-validation.d.ts +55 -0
- package/dist/xlsx-parser/data-validation.d.ts.map +1 -0
- package/dist/xlsx-parser/errors.d.ts +38 -0
- package/dist/xlsx-parser/errors.d.ts.map +1 -0
- package/dist/xlsx-parser/index.d.ts +17 -0
- package/dist/xlsx-parser/index.d.ts.map +1 -0
- package/dist/xlsx-parser/options.d.ts +89 -0
- package/dist/xlsx-parser/options.d.ts.map +1 -0
- package/dist/xlsx-parser/styles.d.ts +157 -0
- package/dist/xlsx-parser/styles.d.ts.map +1 -0
- package/dist/xlsx-parser/table.d.ts +170 -0
- package/dist/xlsx-parser/table.d.ts.map +1 -0
- 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
|