@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 @@
|
|
|
1
|
+
{"version":3,"file":"gated-api.d.ts","sourceRoot":"","sources":["../../src/capabilities/gated-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,aAAa,EACd,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAM9C;;;;;;;GAOG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;;;;OAQG;IACH,GAAG,CAAC,UAAU,EAAE,cAAc,GAAG,OAAO,CAAC;IAEzC;;;;;;OAMG;IACH,IAAI,IAAI,c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AAQ,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAEpC;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,oBAAoB,CAAC;IAM5C;;;;;;;;;OASG;IACH,KAAK,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;CAChD"}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capability Grants - Grant storage and management interfaces
|
|
3
|
+
*
|
|
4
|
+
* This file defines:
|
|
5
|
+
* - CapabilityGrant interface
|
|
6
|
+
* - GrantOptions interface (scope, sessionOnly, expiresAt)
|
|
7
|
+
* - IGrantsStore interface
|
|
8
|
+
*
|
|
9
|
+
* @see plans/active/permission/CAPABILITY-IMPLEMENTATION.md
|
|
10
|
+
*/
|
|
11
|
+
import type { CapabilityScope } from './scope';
|
|
12
|
+
import type { CapabilityType } from './types';
|
|
13
|
+
/**
|
|
14
|
+
* Opaque app identifier.
|
|
15
|
+
*/
|
|
16
|
+
export type AppId = string & {
|
|
17
|
+
readonly __brand?: 'AppId';
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Source of a capability grant.
|
|
21
|
+
*
|
|
22
|
+
* - 'user': Granted via consent dialog
|
|
23
|
+
* - 'auto': Auto-granted for first-party apps
|
|
24
|
+
* - 'migration': Auto-granted during migration from non-capability system
|
|
25
|
+
*/
|
|
26
|
+
export type GrantSource = 'user' | 'auto' | 'migration';
|
|
27
|
+
/**
|
|
28
|
+
* A capability grant to an app.
|
|
29
|
+
*
|
|
30
|
+
* Represents a single permission granted to an app, optionally
|
|
31
|
+
* scoped to specific resources.
|
|
32
|
+
*/
|
|
33
|
+
export interface CapabilityGrant {
|
|
34
|
+
/** The app this grant belongs to */
|
|
35
|
+
readonly appId: AppId;
|
|
36
|
+
/** The capability being granted */
|
|
37
|
+
readonly capability: CapabilityType;
|
|
38
|
+
/** Optional scope limiting access (e.g., "table:contacts,table:deals") */
|
|
39
|
+
readonly scope?: CapabilityScope;
|
|
40
|
+
/** Timestamp when granted (Unix ms) */
|
|
41
|
+
readonly grantedAt: number;
|
|
42
|
+
/** Who/what granted this capability */
|
|
43
|
+
readonly grantedBy: GrantSource;
|
|
44
|
+
/** Whether this is a session-only grant (not persisted) */
|
|
45
|
+
readonly sessionOnly?: boolean;
|
|
46
|
+
/** When this grant expires (Unix ms), for session-only grants */
|
|
47
|
+
readonly expiresAt?: number;
|
|
48
|
+
/**
|
|
49
|
+
* User ID who granted this (for audit).
|
|
50
|
+
* Null for auto/migration grants.
|
|
51
|
+
*/
|
|
52
|
+
readonly userId?: string | null;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Options for granting a capability.
|
|
56
|
+
*/
|
|
57
|
+
export interface GrantOptions {
|
|
58
|
+
/** Scope to limit the grant to specific resources */
|
|
59
|
+
readonly scope?: CapabilityScope;
|
|
60
|
+
/** Make this a session-only grant (not persisted, expires on session end) */
|
|
61
|
+
readonly sessionOnly?: boolean;
|
|
62
|
+
/** Custom expiration timestamp (Unix ms) */
|
|
63
|
+
readonly expiresAt?: number;
|
|
64
|
+
/** Duration in ms (alternative to expiresAt) */
|
|
65
|
+
readonly duration?: number;
|
|
66
|
+
/** Source of the grant */
|
|
67
|
+
readonly source?: GrantSource;
|
|
68
|
+
/** User ID for audit trail */
|
|
69
|
+
readonly userId?: string | null;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* A denied capability record.
|
|
73
|
+
*
|
|
74
|
+
* When a user explicitly denies a capability request, we record it
|
|
75
|
+
* to avoid repeatedly asking (respects rate limiting).
|
|
76
|
+
*/
|
|
77
|
+
export interface CapabilityDenial {
|
|
78
|
+
/** The app this denial belongs to */
|
|
79
|
+
readonly appId: AppId;
|
|
80
|
+
/** The capability that was denied */
|
|
81
|
+
readonly capability: CapabilityType;
|
|
82
|
+
/** Timestamp when denied (Unix ms) */
|
|
83
|
+
readonly deniedAt: number;
|
|
84
|
+
/** Reason for denial (if provided) */
|
|
85
|
+
readonly reason?: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Storage interface for capability grants.
|
|
89
|
+
*
|
|
90
|
+
* Implementations:
|
|
91
|
+
* - MemoryGrantsStore: In-memory for tests
|
|
92
|
+
* - SQLiteGrantsStore: Local SQLite for desktop
|
|
93
|
+
* - CloudGrantsStore: Server-side for web (with conflict resolution)
|
|
94
|
+
*/
|
|
95
|
+
export interface IGrantsStore {
|
|
96
|
+
/**
|
|
97
|
+
* Check if an app has a specific capability granted.
|
|
98
|
+
*
|
|
99
|
+
* @param appId - The app to check
|
|
100
|
+
* @param capability - The capability to check for
|
|
101
|
+
* @param scope - Optional scope to check (resource type and ID)
|
|
102
|
+
* @returns True if the capability is granted (and not expired)
|
|
103
|
+
*/
|
|
104
|
+
hasGrant(appId: AppId, capability: CapabilityType, scope?: {
|
|
105
|
+
resourceType: string;
|
|
106
|
+
resourceId: string;
|
|
107
|
+
}): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Get all grants for an app.
|
|
110
|
+
*
|
|
111
|
+
* @param appId - The app to get grants for
|
|
112
|
+
* @returns Array of all grants for this app (including expired for audit)
|
|
113
|
+
*/
|
|
114
|
+
getGrants(appId: AppId): readonly CapabilityGrant[];
|
|
115
|
+
/**
|
|
116
|
+
* Get active (non-expired) grants for an app.
|
|
117
|
+
*
|
|
118
|
+
* @param appId - The app to get grants for
|
|
119
|
+
* @returns Array of active grants
|
|
120
|
+
*/
|
|
121
|
+
getActiveGrants(appId: AppId): readonly CapabilityGrant[];
|
|
122
|
+
/**
|
|
123
|
+
* Get a specific grant.
|
|
124
|
+
*
|
|
125
|
+
* @param appId - The app ID
|
|
126
|
+
* @param capability - The capability
|
|
127
|
+
* @returns The grant if found, undefined otherwise
|
|
128
|
+
*/
|
|
129
|
+
getGrant(appId: AppId, capability: CapabilityType): CapabilityGrant | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* Check if a capability was explicitly denied.
|
|
132
|
+
*
|
|
133
|
+
* @param appId - The app to check
|
|
134
|
+
* @param capability - The capability to check
|
|
135
|
+
* @returns True if the capability was explicitly denied
|
|
136
|
+
*/
|
|
137
|
+
isDenied(appId: AppId, capability: CapabilityType): boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Get the denial record for a capability.
|
|
140
|
+
*
|
|
141
|
+
* @param appId - The app to check
|
|
142
|
+
* @param capability - The capability to check
|
|
143
|
+
* @returns The denial record if found
|
|
144
|
+
*/
|
|
145
|
+
getDenial(appId: AppId, capability: CapabilityType): CapabilityDenial | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* Grant a capability to an app.
|
|
148
|
+
*
|
|
149
|
+
* If the capability is already granted, this updates the existing grant
|
|
150
|
+
* (e.g., extending scope or expiration).
|
|
151
|
+
*
|
|
152
|
+
* @param appId - The app to grant to
|
|
153
|
+
* @param capability - The capability to grant
|
|
154
|
+
* @param options - Grant options (scope, session, expiration)
|
|
155
|
+
* @returns The created/updated grant
|
|
156
|
+
*/
|
|
157
|
+
grant(appId: AppId, capability: CapabilityType, options?: GrantOptions): CapabilityGrant;
|
|
158
|
+
/**
|
|
159
|
+
* Grant multiple capabilities to an app.
|
|
160
|
+
*
|
|
161
|
+
* @param appId - The app to grant to
|
|
162
|
+
* @param capabilities - The capabilities to grant
|
|
163
|
+
* @param options - Shared grant options
|
|
164
|
+
* @returns Array of created grants
|
|
165
|
+
*/
|
|
166
|
+
grantBatch(appId: AppId, capabilities: readonly CapabilityType[], options?: GrantOptions): readonly CapabilityGrant[];
|
|
167
|
+
/**
|
|
168
|
+
* Revoke a capability from an app.
|
|
169
|
+
*
|
|
170
|
+
* @param appId - The app to revoke from
|
|
171
|
+
* @param capability - The capability to revoke
|
|
172
|
+
* @returns True if a grant was revoked
|
|
173
|
+
*/
|
|
174
|
+
revoke(appId: AppId, capability: CapabilityType): boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Revoke all capabilities from an app.
|
|
177
|
+
*
|
|
178
|
+
* @param appId - The app to revoke from
|
|
179
|
+
* @returns Number of grants revoked
|
|
180
|
+
*/
|
|
181
|
+
revokeAll(appId: AppId): number;
|
|
182
|
+
/**
|
|
183
|
+
* Record a capability denial.
|
|
184
|
+
*
|
|
185
|
+
* @param appId - The app that was denied
|
|
186
|
+
* @param capability - The capability that was denied
|
|
187
|
+
* @param reason - Optional reason for denial
|
|
188
|
+
*/
|
|
189
|
+
deny(appId: AppId, capability: CapabilityType, reason?: string): void;
|
|
190
|
+
/**
|
|
191
|
+
* Clear a denial record (allow re-prompting).
|
|
192
|
+
*
|
|
193
|
+
* @param appId - The app ID
|
|
194
|
+
* @param capability - The capability to clear denial for
|
|
195
|
+
*/
|
|
196
|
+
clearDenial(appId: AppId, capability: CapabilityType): void;
|
|
197
|
+
/**
|
|
198
|
+
* Clean up expired grants.
|
|
199
|
+
* Called periodically to remove stale session grants.
|
|
200
|
+
*
|
|
201
|
+
* @returns Number of grants cleaned up
|
|
202
|
+
*/
|
|
203
|
+
cleanupExpired(): number;
|
|
204
|
+
/**
|
|
205
|
+
* Subscribe to grant changes for an app.
|
|
206
|
+
*
|
|
207
|
+
* @param appId - The app to watch
|
|
208
|
+
* @param callback - Called when grants change
|
|
209
|
+
* @returns Unsubscribe function
|
|
210
|
+
*/
|
|
211
|
+
subscribe(appId: AppId, callback: (event: GrantChangeEvent) => void): () => void;
|
|
212
|
+
/**
|
|
213
|
+
* Subscribe to all grant changes (for admin UI).
|
|
214
|
+
*
|
|
215
|
+
* @param callback - Called when any grants change
|
|
216
|
+
* @returns Unsubscribe function
|
|
217
|
+
*/
|
|
218
|
+
subscribeAll(callback: (event: GrantChangeEvent) => void): () => void;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Event type for grant changes.
|
|
222
|
+
*/
|
|
223
|
+
export type GrantChangeType = 'granted' | 'revoked' | 'expired' | 'denied' | 'denial-cleared';
|
|
224
|
+
/**
|
|
225
|
+
* Event emitted when grants change.
|
|
226
|
+
*/
|
|
227
|
+
export interface GrantChangeEvent {
|
|
228
|
+
/** Type of change */
|
|
229
|
+
readonly type: GrantChangeType;
|
|
230
|
+
/** App affected */
|
|
231
|
+
readonly appId: AppId;
|
|
232
|
+
/** Capability affected */
|
|
233
|
+
readonly capability: CapabilityType;
|
|
234
|
+
/** The grant (for 'granted' events) */
|
|
235
|
+
readonly grant?: CapabilityGrant;
|
|
236
|
+
/** Timestamp of the event */
|
|
237
|
+
readonly timestamp: number;
|
|
238
|
+
}
|
|
239
|
+
//# sourceMappingURL=grants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grants.d.ts","sourceRoot":"","sources":["../../src/capabilities/grants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAM9C;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAM5D;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;AAExD;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,oCAAoC;IACpC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IAEtB,mCAAmC;IACnC,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;IAEpC,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC;IAEjC,uCAAuC;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,uCAAuC;IACvC,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;IAEhC,2DAA2D;IAC3D,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAE/B,iEAAiE;IACjE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,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;CACvE;AAMD;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,gBAAgB,CAAC;AAE9F;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,qBAAqB;IACrB,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAE/B,mBAAmB;IACnB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IAEtB,0BAA0B;IAC1B,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;IAEpC,uCAAuC;IACvC,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC;IAEjC,6BAA6B;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capability System - Public API (Types Only)
|
|
3
|
+
*
|
|
4
|
+
* This module exports ONLY type definitions for the capability system.
|
|
5
|
+
* Runtime implementation has been moved to @mog/kernel/services/capabilities.
|
|
6
|
+
*
|
|
7
|
+
* For runtime code (scope matching, taxonomy expansion, error classes,
|
|
8
|
+
* grant utilities, manifest validation, etc.), import from:
|
|
9
|
+
* @mog/kernel/services/capabilities
|
|
10
|
+
*
|
|
11
|
+
* @see plans/active/permission/CAPABILITY-SYSTEM.md
|
|
12
|
+
* @see plans/active/permission/CAPABILITY-TAXONOMY.md
|
|
13
|
+
* @see plans/active/permission/CAPABILITY-IMPLEMENTATION.md
|
|
14
|
+
*/
|
|
15
|
+
export type { CapabilityInfo, CapabilityRiskLevel, CapabilityTier, CapabilityType, Tier0Capability, Tier1Capability, Tier2Capability, Tier3Capability, Tier4Capability, Tier5Capability, } from './types';
|
|
16
|
+
export type { CompositeCapability } from './taxonomy';
|
|
17
|
+
export type { CapabilityScope, ParsedScope, ScopeValidationResult } from './scope';
|
|
18
|
+
export type { AppCapabilityManifest, AppManifestWithCapabilities, CapabilityTrigger, ManifestValidationError, ManifestValidationResult, OptionalCapabilityRequest, RuntimeCapabilityRequest, ScopedCapabilityRequest, } from './manifest';
|
|
19
|
+
export type { AppId, CapabilityDenial, CapabilityGrant, GrantChangeEvent, GrantChangeType, GrantOptions, GrantSource, IGrantsStore, } from './grants';
|
|
20
|
+
export type { ICapabilityIntrospection, IGatedAppKernelAPI, IGatedCellsAPI, IGatedCheckpointsAPI, IGatedConnectionsAPI, IGatedDialogsAPI, IGatedFilesystemAPI, IGatedFormattingAPI, IGatedFormulasAPI, IGatedNetworkAPI, IGatedSheetsAPI, IGatedShellAPI, } from './gated-api';
|
|
21
|
+
export type { CapabilityErrorCode } from './errors';
|
|
22
|
+
export type { CapabilityDenialReason, CapabilityPromptFn, CapabilityPromptRequest, CapabilityPromptResult, CapabilityRequest, CapabilityRequestResult, ICapabilityRequester, SingleRequestResult, } from './requester';
|
|
23
|
+
export type { AuthMethod, ExpiryWarning, IReAuthProvider, ISensitiveCapabilityHandler, RateLimitStatus, ReAuthOptions, ReAuthResult, SessionGrant, SessionOptions, } from './sensitive';
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/capabilities/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,GAChB,MAAM,SAAS,CAAC;AAMjB,YAAY,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAMtD,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAMnF,YAAY,EACV,qBAAqB,EACrB,2BAA2B,EAC3B,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,YAAY,CAAC;AAMpB,YAAY,EACV,KAAK,EACL,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,WAAW,EACX,YAAY,GACb,MAAM,UAAU,CAAC;AAMlB,YAAY,EACV,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,cAAc,GACf,MAAM,aAAa,CAAC;AAMrB,YAAY,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAMpD,YAAY,EACV,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAMrB,YAAY,EACV,UAAU,EACV,aAAa,EACb,eAAe,EACf,2BAA2B,EAC3B,eAAe,EACf,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,cAAc,GACf,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App Capability Manifest - App capability declarations
|
|
3
|
+
*
|
|
4
|
+
* This file defines:
|
|
5
|
+
* - AppCapabilityManifest interface (required, optional, runtime, scoped)
|
|
6
|
+
* - AppManifest extension with capabilities
|
|
7
|
+
*
|
|
8
|
+
* @see plans/active/permission/CAPABILITY-TAXONOMY.md
|
|
9
|
+
*/
|
|
10
|
+
import type { CapabilityScope } from './scope';
|
|
11
|
+
import type { CompositeCapability } from './taxonomy';
|
|
12
|
+
import type { CapabilityType } from './types';
|
|
13
|
+
/**
|
|
14
|
+
* Trigger type for runtime capability requests.
|
|
15
|
+
*
|
|
16
|
+
* - 'user-action': User explicitly initiated an action requiring the capability
|
|
17
|
+
* - 'feature-access': User accessed a feature that requires the capability
|
|
18
|
+
*/
|
|
19
|
+
export type CapabilityTrigger = 'user-action' | 'feature-access';
|
|
20
|
+
/**
|
|
21
|
+
* An optional capability request in the manifest.
|
|
22
|
+
* The app works without this capability but with reduced features.
|
|
23
|
+
*/
|
|
24
|
+
export interface OptionalCapabilityRequest {
|
|
25
|
+
/** The capability being requested */
|
|
26
|
+
readonly capability: CapabilityType | CompositeCapability;
|
|
27
|
+
/** User-facing reason why this capability is needed */
|
|
28
|
+
readonly reason: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A runtime capability request in the manifest.
|
|
32
|
+
* This capability is requested during execution, not at launch.
|
|
33
|
+
*/
|
|
34
|
+
export interface RuntimeCapabilityRequest {
|
|
35
|
+
/** The capability being requested */
|
|
36
|
+
readonly capability: CapabilityType;
|
|
37
|
+
/** User-facing reason why this capability is needed */
|
|
38
|
+
readonly reason: string;
|
|
39
|
+
/** What triggers this request */
|
|
40
|
+
readonly trigger: CapabilityTrigger;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A scoped capability request in the manifest.
|
|
44
|
+
* Access is limited to specific resources.
|
|
45
|
+
*/
|
|
46
|
+
export interface ScopedCapabilityRequest {
|
|
47
|
+
/** The capability being requested */
|
|
48
|
+
readonly capability: CapabilityType;
|
|
49
|
+
/** Scope limiting access to specific resources */
|
|
50
|
+
readonly scope: CapabilityScope;
|
|
51
|
+
/** User-facing reason why this scope is needed */
|
|
52
|
+
readonly reason: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Capability manifest for an app.
|
|
56
|
+
*
|
|
57
|
+
* Declares all capabilities the app needs:
|
|
58
|
+
* - required: App won't launch without these
|
|
59
|
+
* - optional: App works without, reduced features (shown in consent)
|
|
60
|
+
* - runtime: Requested during execution (not at launch)
|
|
61
|
+
* - scoped: Access limited to specific resources
|
|
62
|
+
*/
|
|
63
|
+
export interface AppCapabilityManifest {
|
|
64
|
+
/**
|
|
65
|
+
* Required capabilities - app won't launch without these.
|
|
66
|
+
* Can be individual capabilities or composite capabilities.
|
|
67
|
+
*/
|
|
68
|
+
readonly required: readonly (CapabilityType | CompositeCapability)[];
|
|
69
|
+
/**
|
|
70
|
+
* Optional capabilities - app works without, with reduced features.
|
|
71
|
+
* Shown in consent dialog, user can skip.
|
|
72
|
+
*/
|
|
73
|
+
readonly optional?: readonly OptionalCapabilityRequest[];
|
|
74
|
+
/**
|
|
75
|
+
* Runtime capabilities - requested during execution.
|
|
76
|
+
* Not shown at launch, requested when needed.
|
|
77
|
+
*/
|
|
78
|
+
readonly runtime?: readonly RuntimeCapabilityRequest[];
|
|
79
|
+
/**
|
|
80
|
+
* Scoped capabilities - access limited to specific resources.
|
|
81
|
+
* More restrictive than general capability grants.
|
|
82
|
+
*/
|
|
83
|
+
readonly scoped?: readonly ScopedCapabilityRequest[];
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Extended app manifest with capability declarations.
|
|
87
|
+
*
|
|
88
|
+
* This extends the base AppManifest from apps/api.ts with capability support.
|
|
89
|
+
* Apps declare their capabilities here for the consent flow.
|
|
90
|
+
*/
|
|
91
|
+
export interface AppManifestWithCapabilities {
|
|
92
|
+
/** Unique app identifier */
|
|
93
|
+
readonly id: string;
|
|
94
|
+
/** Display name */
|
|
95
|
+
readonly name: string;
|
|
96
|
+
/** App version (semver) */
|
|
97
|
+
readonly version: string;
|
|
98
|
+
/** Icon (emoji or icon identifier) */
|
|
99
|
+
readonly icon?: string;
|
|
100
|
+
/** Description */
|
|
101
|
+
readonly description?: string;
|
|
102
|
+
/** Author */
|
|
103
|
+
readonly author?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Capability manifest declaring what permissions this app needs.
|
|
106
|
+
*/
|
|
107
|
+
readonly capabilities: AppCapabilityManifest;
|
|
108
|
+
/**
|
|
109
|
+
* Whether this is a first-party (trusted) app.
|
|
110
|
+
* First-party apps have their required capabilities auto-granted on first launch.
|
|
111
|
+
*/
|
|
112
|
+
readonly firstParty?: boolean;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Validation error for app manifests.
|
|
116
|
+
*/
|
|
117
|
+
export interface ManifestValidationError {
|
|
118
|
+
readonly field: string;
|
|
119
|
+
readonly message: string;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Manifest validation result.
|
|
123
|
+
*/
|
|
124
|
+
export interface ManifestValidationResult {
|
|
125
|
+
readonly valid: boolean;
|
|
126
|
+
readonly errors: readonly ManifestValidationError[];
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/capabilities/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAM9C;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,gBAAgB,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,qCAAqC;IACrC,QAAQ,CAAC,UAAU,EAAE,cAAc,GAAG,mBAAmB,CAAC;IAC1D,uDAAuD;IACvD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,qCAAqC;IACrC,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;IACpC,uDAAuD;IACvD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,iCAAiC;IACjC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;CACrC;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,qCAAqC;IACrC,QAAQ,CAAC,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wBAAwB;IACvC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,SAAS,uBAAuB,EAAE,CAAC;CACrD"}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capability Requester - Runtime capability request interfaces
|
|
3
|
+
*
|
|
4
|
+
* This file defines:
|
|
5
|
+
* - ICapabilityRequester interface for runtime capability requests
|
|
6
|
+
* - CapabilityRequest and CapabilityRequestResult types
|
|
7
|
+
*
|
|
8
|
+
* Apps use the requester to request additional capabilities during execution.
|
|
9
|
+
*
|
|
10
|
+
* @see plans/active/permission/CAPABILITY-IMPLEMENTATION.md
|
|
11
|
+
*/
|
|
12
|
+
import type { AppId } from './grants';
|
|
13
|
+
import type { CapabilityScope } from './scope';
|
|
14
|
+
import type { CapabilityType } from './types';
|
|
15
|
+
/**
|
|
16
|
+
* A single capability request.
|
|
17
|
+
*/
|
|
18
|
+
export interface CapabilityRequest {
|
|
19
|
+
/** The capability being requested */
|
|
20
|
+
readonly capability: CapabilityType;
|
|
21
|
+
/** User-facing reason why this capability is needed */
|
|
22
|
+
readonly reason: string;
|
|
23
|
+
/** Optional scope for scoped access */
|
|
24
|
+
readonly scope?: CapabilityScope;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Result of a single capability request.
|
|
28
|
+
*/
|
|
29
|
+
export interface SingleRequestResult {
|
|
30
|
+
/** The capability that was requested */
|
|
31
|
+
readonly capability: CapabilityType;
|
|
32
|
+
/** Whether the capability was granted */
|
|
33
|
+
readonly granted: boolean;
|
|
34
|
+
/** If not granted, why (user denied, rate limited, requires auth, etc.) */
|
|
35
|
+
readonly denialReason?: CapabilityDenialReason;
|
|
36
|
+
/** If rate limited, when the request can be retried (Unix ms) */
|
|
37
|
+
readonly retryAfter?: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Reason why a capability request was denied.
|
|
41
|
+
*/
|
|
42
|
+
export type CapabilityDenialReason =
|
|
43
|
+
/** User explicitly denied in the consent dialog */
|
|
44
|
+
'user-denied'
|
|
45
|
+
/** Request was rate-limited (too many requests) */
|
|
46
|
+
| 'rate-limited'
|
|
47
|
+
/** Capability requires re-authentication */
|
|
48
|
+
| 'requires-auth'
|
|
49
|
+
/** User failed re-authentication */
|
|
50
|
+
| 'auth-failed'
|
|
51
|
+
/** Capability was previously denied and denial is still active */
|
|
52
|
+
| 'previously-denied'
|
|
53
|
+
/** The capability is not declared in the app's manifest */
|
|
54
|
+
| 'not-declared'
|
|
55
|
+
/** The capability has been revoked by admin */
|
|
56
|
+
| 'admin-revoked'
|
|
57
|
+
/** Session expired before request completed */
|
|
58
|
+
| 'session-expired';
|
|
59
|
+
/**
|
|
60
|
+
* Result of a multiple capability request.
|
|
61
|
+
*/
|
|
62
|
+
export interface CapabilityRequestResult {
|
|
63
|
+
/** Whether all requested capabilities were granted */
|
|
64
|
+
readonly allGranted: boolean;
|
|
65
|
+
/** Results for each requested capability */
|
|
66
|
+
readonly results: readonly SingleRequestResult[];
|
|
67
|
+
/** List of capabilities that were granted */
|
|
68
|
+
readonly granted: readonly CapabilityType[];
|
|
69
|
+
/** List of capabilities that were denied */
|
|
70
|
+
readonly denied: readonly CapabilityType[];
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Interface for requesting capabilities at runtime.
|
|
74
|
+
*
|
|
75
|
+
* Apps use this to request additional capabilities during execution.
|
|
76
|
+
* The request triggers the consent flow, which may show a dialog to the user.
|
|
77
|
+
*
|
|
78
|
+
* Usage:
|
|
79
|
+
* ```typescript
|
|
80
|
+
* async function handleExport() {
|
|
81
|
+
* if (!requester.has('filesystem:write')) {
|
|
82
|
+
* const granted = await requester.request(
|
|
83
|
+
* 'filesystem:write',
|
|
84
|
+
* 'Save the exported file to your computer'
|
|
85
|
+
* );
|
|
86
|
+
* if (!granted) {
|
|
87
|
+
* showError('Cannot export without file access');
|
|
88
|
+
* return;
|
|
89
|
+
* }
|
|
90
|
+
* // API hot-reloads - api.filesystem is now defined
|
|
91
|
+
* }
|
|
92
|
+
* await api.filesystem!.write('export.csv', data);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
export interface ICapabilityRequester {
|
|
97
|
+
/**
|
|
98
|
+
* Check if the app currently has a capability.
|
|
99
|
+
*
|
|
100
|
+
* This includes both directly granted capabilities and implied capabilities
|
|
101
|
+
* (e.g., cells:write implies cells:read).
|
|
102
|
+
*
|
|
103
|
+
* @param capability - The capability to check
|
|
104
|
+
* @returns True if the app has this capability
|
|
105
|
+
*/
|
|
106
|
+
has(capability: CapabilityType): boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Request a single capability.
|
|
109
|
+
*
|
|
110
|
+
* This triggers the consent flow, which may:
|
|
111
|
+
* - Grant immediately (if already granted)
|
|
112
|
+
* - Show a consent dialog (for normal capabilities)
|
|
113
|
+
* - Require re-authentication (for sensitive capabilities)
|
|
114
|
+
*
|
|
115
|
+
* @param capability - The capability to request
|
|
116
|
+
* @param reason - User-facing reason for the request
|
|
117
|
+
* @returns True if granted, false if denied
|
|
118
|
+
*/
|
|
119
|
+
request(capability: CapabilityType, reason: string): Promise<boolean>;
|
|
120
|
+
/**
|
|
121
|
+
* Request multiple capabilities at once.
|
|
122
|
+
*
|
|
123
|
+
* All capabilities are shown in a single consent dialog.
|
|
124
|
+
* If any are denied, the entire batch fails.
|
|
125
|
+
*
|
|
126
|
+
* @param requests - Array of capability requests
|
|
127
|
+
* @returns Result object with granted/denied status for each
|
|
128
|
+
*/
|
|
129
|
+
requestMultiple(requests: readonly CapabilityRequest[]): Promise<CapabilityRequestResult>;
|
|
130
|
+
/**
|
|
131
|
+
* Request a scoped capability.
|
|
132
|
+
*
|
|
133
|
+
* @param capability - The capability to request
|
|
134
|
+
* @param scope - The scope limiting access (e.g., "table:contacts")
|
|
135
|
+
* @param reason - User-facing reason for the request
|
|
136
|
+
* @returns True if granted, false if denied
|
|
137
|
+
*/
|
|
138
|
+
requestScoped(capability: CapabilityType, scope: CapabilityScope, reason: string): Promise<boolean>;
|
|
139
|
+
/**
|
|
140
|
+
* Check if a request can be made (not rate limited).
|
|
141
|
+
*
|
|
142
|
+
* @param capability - The capability to check
|
|
143
|
+
* @returns Object with canRequest flag and optional retryAfter timestamp
|
|
144
|
+
*/
|
|
145
|
+
canRequest(capability: CapabilityType): {
|
|
146
|
+
readonly canRequest: boolean;
|
|
147
|
+
readonly retryAfter?: number;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Clear a previous denial, allowing re-prompting.
|
|
151
|
+
*
|
|
152
|
+
* This is typically called after user clicks "Grant Permission" in settings.
|
|
153
|
+
*
|
|
154
|
+
* @param capability - The capability to clear denial for
|
|
155
|
+
*/
|
|
156
|
+
clearDenial(capability: CapabilityType): void;
|
|
157
|
+
/**
|
|
158
|
+
* Get the denial status for a capability.
|
|
159
|
+
*
|
|
160
|
+
* @param capability - The capability to check
|
|
161
|
+
* @returns Denial info if denied, undefined if not denied
|
|
162
|
+
*/
|
|
163
|
+
getDenialStatus(capability: CapabilityType): {
|
|
164
|
+
readonly reason: CapabilityDenialReason;
|
|
165
|
+
readonly deniedAt: number;
|
|
166
|
+
} | undefined;
|
|
167
|
+
/**
|
|
168
|
+
* Check if a capability was explicitly denied.
|
|
169
|
+
*
|
|
170
|
+
* @param capability - The capability to check
|
|
171
|
+
* @returns True if the capability was explicitly denied
|
|
172
|
+
*/
|
|
173
|
+
isDenied(capability: CapabilityType): boolean;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Request for showing a capability consent dialog.
|
|
177
|
+
*
|
|
178
|
+
* This is passed to the shell's prompt function.
|
|
179
|
+
*/
|
|
180
|
+
export interface CapabilityPromptRequest {
|
|
181
|
+
/** The app requesting the capability */
|
|
182
|
+
readonly appId: AppId;
|
|
183
|
+
/** App display name */
|
|
184
|
+
readonly appName: string;
|
|
185
|
+
/** The capabilities being requested */
|
|
186
|
+
readonly requests: readonly CapabilityRequest[];
|
|
187
|
+
/** Whether any capabilities are sensitive (require extra warning) */
|
|
188
|
+
readonly hasSensitive: boolean;
|
|
189
|
+
/** Whether re-authentication is required */
|
|
190
|
+
readonly requiresAuth: boolean;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Result of a capability prompt dialog.
|
|
194
|
+
*/
|
|
195
|
+
export interface CapabilityPromptResult {
|
|
196
|
+
/** User's decision */
|
|
197
|
+
readonly decision: 'grant' | 'deny' | 'cancel';
|
|
198
|
+
/** If partial grant, which capabilities were granted */
|
|
199
|
+
readonly grantedCapabilities?: readonly CapabilityType[];
|
|
200
|
+
/** Whether to remember this decision */
|
|
201
|
+
readonly remember?: boolean;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Callback function for prompting the user.
|
|
205
|
+
*
|
|
206
|
+
* The shell provides this to the requester to show UI.
|
|
207
|
+
*/
|
|
208
|
+
export type CapabilityPromptFn = (request: CapabilityPromptRequest) => Promise<CapabilityPromptResult>;
|
|
209
|
+
//# sourceMappingURL=requester.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requester.d.ts","sourceRoot":"","sources":["../../src/capabilities/requester.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAM9C;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,qCAAqC;IACrC,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;IAEpC,uDAAuD;IACvD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,uCAAuC;IACvC,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,mBAA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