@columnus/sdk 0.0.0-stage → 0.3.1
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/blocknote-editor-FP33A6RJ.js +7 -0
- package/dist/blocknote-editor-FP33A6RJ.js.map +1 -0
- package/dist/blocknote-editor-YZEFMXLC.css +47 -0
- package/dist/blocknote-editor-YZEFMXLC.css.map +1 -0
- package/dist/blocknote-preview-6WRENQZD.css +47 -0
- package/dist/blocknote-preview-6WRENQZD.css.map +1 -0
- package/dist/blocknote-preview-QZ5SC2GJ.js +7 -0
- package/dist/blocknote-preview-QZ5SC2GJ.js.map +1 -0
- package/dist/chunk-5IPH2A64.js +23337 -0
- package/dist/chunk-5IPH2A64.js.map +1 -0
- package/dist/chunk-6LKVKI5O.js +494 -0
- package/dist/chunk-6LKVKI5O.js.map +1 -0
- package/dist/chunk-BXTTCBIK.js +11 -0
- package/dist/chunk-BXTTCBIK.js.map +1 -0
- package/dist/chunk-CKNRITN3.js +225 -0
- package/dist/chunk-CKNRITN3.js.map +1 -0
- package/dist/chunk-FKHOREJP.js +58 -0
- package/dist/chunk-FKHOREJP.js.map +1 -0
- package/dist/chunk-ICKWVUW7.js +134 -0
- package/dist/chunk-ICKWVUW7.js.map +1 -0
- package/dist/chunk-LTPU2AL3.js +18774 -0
- package/dist/chunk-LTPU2AL3.js.map +1 -0
- package/dist/chunk-PX6F3LHL.js +37 -0
- package/dist/chunk-PX6F3LHL.js.map +1 -0
- package/dist/chunk-QPQRNIKG.js +142 -0
- package/dist/chunk-QPQRNIKG.js.map +1 -0
- package/dist/chunk-UXUDOFKZ.js +4169 -0
- package/dist/chunk-UXUDOFKZ.js.map +1 -0
- package/dist/chunk-ZTWPGA37.js +68 -0
- package/dist/chunk-ZTWPGA37.js.map +1 -0
- package/dist/cms/builder/diff-view.js +70 -0
- package/dist/cms/builder/diff-view.js.map +1 -0
- package/dist/cms/builder/panel.js +1316 -0
- package/dist/cms/builder/panel.js.map +1 -0
- package/dist/cms/convex/index.css +47 -0
- package/dist/cms/convex/index.css.map +1 -0
- package/dist/cms/convex/index.js +370 -0
- package/dist/cms/convex/index.js.map +1 -0
- package/dist/cms/index.css +47 -0
- package/dist/cms/index.css.map +1 -0
- package/dist/cms/index.js +9 -0
- package/dist/cms/index.js.map +1 -0
- package/dist/cms/server/index.js +5 -0
- package/dist/cms/server/index.js.map +1 -0
- package/dist/cms/tables/tables-dialog.css +47 -0
- package/dist/cms/tables/tables-dialog.css.map +1 -0
- package/dist/cms/tables/tables-dialog.js +590 -0
- package/dist/cms/tables/tables-dialog.js.map +1 -0
- package/dist/cms/tailwind.css +4 -0
- package/dist/editor-54UG7BSP.css +47 -0
- package/dist/editor-54UG7BSP.css.map +1 -0
- package/dist/editor-HJ3UNV3Q.js +427 -0
- package/dist/editor-HJ3UNV3Q.js.map +1 -0
- package/dist/mcp-cli.js +61218 -0
- package/dist/primitives.css +143 -0
- package/dist/rich-text-editor/blocknote-preview-studio.css +54 -0
- package/dist/richtext.css +4 -0
- package/dist/types/cms/src/adapters/default-richtext.d.ts +24 -0
- package/dist/types/cms/src/adapters/projected-fields-adapter.d.ts +22 -0
- package/dist/types/cms/src/adapters/table-rows-context.d.ts +4 -0
- package/dist/types/cms/src/adapters/table-rows-richtext.d.ts +8 -0
- package/dist/types/cms/src/builder/annotate.d.ts +13 -0
- package/dist/types/cms/src/builder/diff-view.d.ts +10 -0
- package/dist/types/cms/src/builder/inspect.d.ts +32 -0
- package/dist/types/cms/src/builder/panel.d.ts +11 -0
- package/dist/types/cms/src/builder/sessions-menu.d.ts +37 -0
- package/dist/types/cms/src/builder/sidecar-json.d.ts +2 -0
- package/dist/types/cms/src/cache/html-cache.d.ts +12 -0
- package/dist/types/cms/src/chrome/changes-view.d.ts +15 -0
- package/dist/types/cms/src/chrome/confirm-panel.d.ts +10 -0
- package/dist/types/cms/src/chrome/floating-toolbar.d.ts +25 -0
- package/dist/types/cms/src/chrome/icons.d.ts +13 -0
- package/dist/types/cms/src/chrome/overlay-styles.d.ts +38 -0
- package/dist/types/cms/src/chrome/resolve-dialog.d.ts +26 -0
- package/dist/types/cms/src/chrome/session-storage.d.ts +3 -0
- package/dist/types/cms/src/convex/cms-convex-proposals.d.ts +19 -0
- package/dist/types/cms/src/convex/cms-convex-shell.d.ts +8 -0
- package/dist/types/cms/src/convex/cms-host-refs.d.ts +15 -0
- package/dist/types/cms/src/convex/index.d.ts +7 -0
- package/dist/types/cms/src/convex/proposal-refs.d.ts +20 -0
- package/dist/types/cms/src/convex/use-cms-display-fields-adapter.d.ts +17 -0
- package/dist/types/cms/src/convex/use-cms-display-values.d.ts +12 -0
- package/dist/types/cms/src/convex/use-cms-editor-auth.d.ts +12 -0
- package/dist/types/cms/src/convex/use-cms-storage-display.d.ts +19 -0
- package/dist/types/cms/src/convex/use-cms-storage-fields-adapter.d.ts +63 -0
- package/dist/types/cms/src/convex/use-fields-adapter-host.d.ts +4 -0
- package/dist/types/cms/src/create/compound-create.d.ts +56 -0
- package/dist/types/cms/src/draft/merge-draft.d.ts +31 -0
- package/dist/types/cms/src/edit/cms-compound-create.d.ts +12 -0
- package/dist/types/cms/src/edit/cms-create-button.d.ts +9 -0
- package/dist/types/cms/src/edit/edit-surface.d.ts +16 -0
- package/dist/types/cms/src/edit/field-editor-dialog.d.ts +22 -0
- package/dist/types/cms/src/edit/inplace-field-editor.d.ts +21 -0
- package/dist/types/cms/src/edit/inplace-switch-modal.d.ts +5 -0
- package/dist/types/cms/src/edit/insert-row-dialog.d.ts +20 -0
- package/dist/types/cms/src/index.d.ts +35 -0
- package/dist/types/cms/src/list/build-insert-draft.d.ts +13 -0
- package/dist/types/cms/src/manifest-index.d.ts +5 -0
- package/dist/types/cms/src/nav/content-ref-integrity.d.ts +18 -0
- package/dist/types/cms/src/nav/content-ref.d.ts +6 -0
- package/dist/types/cms/src/nav/infer-navigation-table.d.ts +20 -0
- package/dist/types/cms/src/nav/slugify-de.d.ts +4 -0
- package/dist/types/cms/src/pages/login-page.d.ts +5 -0
- package/dist/types/cms/src/profile/propose-gates.d.ts +12 -0
- package/dist/types/cms/src/profile/readable-tables.d.ts +13 -0
- package/dist/types/cms/src/projection/cms-projection.d.ts +63 -0
- package/dist/types/cms/src/proposals/types.d.ts +59 -0
- package/dist/types/cms/src/provider/builder-draft.d.ts +14 -0
- package/dist/types/cms/src/provider/cms-provider.d.ts +240 -0
- package/dist/types/cms/src/rich-doc/cms-rich-doc-view.d.ts +4 -0
- package/dist/types/cms/src/server/cookie.d.ts +11 -0
- package/dist/types/cms/src/server/index.d.ts +2 -0
- package/dist/types/cms/src/server/session.d.ts +53 -0
- package/dist/types/cms/src/stamps/attrs.d.ts +17 -0
- package/dist/types/cms/src/stamps/related.d.ts +11 -0
- package/dist/types/cms/src/stamps/resolve-display.d.ts +41 -0
- package/dist/types/cms/src/stamps/row.d.ts +41 -0
- package/dist/types/cms/src/stamps/stamp-media-drop.d.ts +23 -0
- package/dist/types/cms/src/stamps/stamp.d.ts +44 -0
- package/dist/types/cms/src/stamps/storage-display.d.ts +4 -0
- package/dist/types/cms/src/stamps/use-cms-projected-field.d.ts +6 -0
- package/dist/types/cms/src/stamps/use-cms-projected-table.d.ts +7 -0
- package/dist/types/cms/src/stamps/use-cms-related-row.d.ts +2 -0
- package/dist/types/cms/src/tables/tables-dialog.d.ts +6 -0
- package/dist/types/cms/src/tables/use-cms-grid.d.ts +78 -0
- package/dist/types/cms/src/tables/use-draft-commands.d.ts +35 -0
- package/dist/types/data-grid/src/components/balanced-preview-columns.d.ts +7 -0
- package/dist/types/data-grid/src/components/cell-formula-bar.d.ts +40 -0
- package/dist/types/data-grid/src/components/cell-renderer.d.ts +10 -0
- package/dist/types/data-grid/src/components/cell-selection.d.ts +72 -0
- package/dist/types/data-grid/src/components/column-filter-popover.d.ts +29 -0
- package/dist/types/data-grid/src/components/context-menu-selection.d.ts +24 -0
- package/dist/types/data-grid/src/components/data-grid-table.d.ts +49 -0
- package/dist/types/data-grid/src/components/delete-confirm-copy.d.ts +6 -0
- package/dist/types/data-grid/src/components/display-search-scope-notice.d.ts +4 -0
- package/dist/types/data-grid/src/components/draft-rows.d.ts +14 -0
- package/dist/types/data-grid/src/components/field-condition-editor.d.ts +71 -0
- package/dist/types/data-grid/src/components/fill-handle.d.ts +22 -0
- package/dist/types/data-grid/src/components/grid-action-bar.d.ts +8 -0
- package/dist/types/data-grid/src/components/grid-body-layout.d.ts +27 -0
- package/dist/types/data-grid/src/components/grid-body-row.d.ts +83 -0
- package/dist/types/data-grid/src/components/grid-editing.d.ts +158 -0
- package/dist/types/data-grid/src/components/grid-event-utils.d.ts +10 -0
- package/dist/types/data-grid/src/components/grid-filter-search-chips.d.ts +7 -0
- package/dist/types/data-grid/src/components/grid-filter-search-context.d.ts +135 -0
- package/dist/types/data-grid/src/components/grid-filter-search.d.ts +6 -0
- package/dist/types/data-grid/src/components/grid-row-menu.d.ts +23 -0
- package/dist/types/data-grid/src/components/grid-seam-island.d.ts +23 -0
- package/dist/types/data-grid/src/components/grid-sort-group.d.ts +25 -0
- package/dist/types/data-grid/src/components/grid-toolbar.d.ts +54 -0
- package/dist/types/data-grid/src/components/index-suggestion-banner.d.ts +11 -0
- package/dist/types/data-grid/src/components/inline-edit-draft.d.ts +18 -0
- package/dist/types/data-grid/src/components/keyboard-shortcuts-overlay.d.ts +7 -0
- package/dist/types/data-grid/src/components/measure-column-auto-width.d.ts +6 -0
- package/dist/types/data-grid/src/components/pending-edits.d.ts +25 -0
- package/dist/types/data-grid/src/components/perform-grid-row-delete.d.ts +27 -0
- package/dist/types/data-grid/src/components/query-plan-banner.d.ts +13 -0
- package/dist/types/data-grid/src/components/query-predicate-builder.d.ts +53 -0
- package/dist/types/data-grid/src/components/row-detail-dialog.d.ts +17 -0
- package/dist/types/data-grid/src/components/row-preview-content.d.ts +21 -0
- package/dist/types/data-grid/src/components/row-preview-drawer.d.ts +24 -0
- package/dist/types/data-grid/src/components/selection-value-chips.d.ts +12 -0
- package/dist/types/data-grid/src/components/selection.d.ts +46 -0
- package/dist/types/data-grid/src/components/table-cell-overlays.d.ts +33 -0
- package/dist/types/data-grid/src/components/table-color-marker.d.ts +10 -0
- package/dist/types/data-grid/src/components/use-column-visibility.d.ts +5 -0
- package/dist/types/data-grid/src/components/use-column-widths.d.ts +6 -0
- package/dist/types/data-grid/src/components/use-undo-redo.d.ts +46 -0
- package/dist/types/data-grid/src/hooks/plan-pending-edits.d.ts +41 -0
- package/dist/types/data-grid/src/hooks/use-grid-interactions.d.ts +100 -0
- package/dist/types/data-grid/src/hooks/use-grid-pending-state.d.ts +41 -0
- package/dist/types/data-grid/src/hooks/use-grid-selection-model.d.ts +28 -0
- package/dist/types/data-grid/src/hooks/use-grid-table-layout.d.ts +39 -0
- package/dist/types/data-grid/src/hooks/use-true-after-delay.d.ts +10 -0
- package/dist/types/data-grid/src/index.d.ts +47 -0
- package/dist/types/data-grid/src/lib/column-filter.d.ts +43 -0
- package/dist/types/data-grid/src/lib/display-search-scope.d.ts +2 -0
- package/dist/types/data-grid/src/lib/format-query-chips.d.ts +28 -0
- package/dist/types/data-grid/src/lib/grid-items.d.ts +63 -0
- package/dist/types/data-grid/src/lib/persistent-state.d.ts +6 -0
- package/dist/types/data-grid/src/lib/query-editor-draft.d.ts +15 -0
- package/dist/types/data-grid/src/lib/use-row-preview-collapsed.d.ts +9 -0
- package/dist/types/data-grid/src/lib/use-row-preview-title.d.ts +1 -0
- package/dist/types/fields/src/components/batch-edit-sheet.d.ts +10 -0
- package/dist/types/fields/src/components/cell-editor.d.ts +29 -0
- package/dist/types/fields/src/components/date-time-input.d.ts +21 -0
- package/dist/types/fields/src/components/date-time-picker-logic.d.ts +13 -0
- package/dist/types/fields/src/components/field-input-chrome.d.ts +11 -0
- package/dist/types/fields/src/components/field-input-inline.d.ts +30 -0
- package/dist/types/fields/src/components/field-input.d.ts +36 -0
- package/dist/types/fields/src/components/field-value-view.d.ts +10 -0
- package/dist/types/fields/src/components/file-array-cell.d.ts +5 -0
- package/dist/types/fields/src/components/file-array-upload-dialog.d.ts +19 -0
- package/dist/types/fields/src/components/file-cell.d.ts +5 -0
- package/dist/types/fields/src/components/file-input.d.ts +21 -0
- package/dist/types/fields/src/components/file-upload-dialog.d.ts +19 -0
- package/dist/types/fields/src/components/focus-text-input.d.ts +5 -0
- package/dist/types/fields/src/components/id-array-cell.d.ts +9 -0
- package/dist/types/fields/src/components/id-array-values.d.ts +1 -0
- package/dist/types/fields/src/components/id-cell.d.ts +4 -0
- package/dist/types/fields/src/components/id-picker.d.ts +28 -0
- package/dist/types/fields/src/components/image-array-cell.d.ts +7 -0
- package/dist/types/fields/src/components/image-cell.d.ts +7 -0
- package/dist/types/fields/src/components/image-preview-dialog.d.ts +8 -0
- package/dist/types/fields/src/components/media-compact-preview.d.ts +17 -0
- package/dist/types/fields/src/components/media-library-picker-dialog.d.ts +16 -0
- package/dist/types/fields/src/components/multi-id-picker.d.ts +24 -0
- package/dist/types/fields/src/components/picker-chrome.d.ts +28 -0
- package/dist/types/fields/src/components/picker-density.d.ts +5 -0
- package/dist/types/fields/src/components/picker-list-placeholder.d.ts +13 -0
- package/dist/types/fields/src/components/picker-menu-keyboard.d.ts +16 -0
- package/dist/types/fields/src/components/picker-menu-layout.d.ts +12 -0
- package/dist/types/fields/src/components/picker-menu-portal.d.ts +19 -0
- package/dist/types/fields/src/components/picker-option-row.d.ts +10 -0
- package/dist/types/fields/src/components/picker-overlay.d.ts +35 -0
- package/dist/types/fields/src/components/record-link-chip.d.ts +21 -0
- package/dist/types/fields/src/components/row-edit-panel.d.ts +38 -0
- package/dist/types/fields/src/components/row-editor.d.ts +21 -0
- package/dist/types/fields/src/components/row-popover.d.ts +11 -0
- package/dist/types/fields/src/components/use-flush-ref.d.ts +3 -0
- package/dist/types/fields/src/components/use-picker-combobox.d.ts +88 -0
- package/dist/types/fields/src/components/use-picker-highlight-scroll.d.ts +4 -0
- package/dist/types/fields/src/components/use-picker-menu-overlay.d.ts +7 -0
- package/dist/types/fields/src/fields-data-adapter.d.ts +111 -0
- package/dist/types/fields/src/fields-data-provider.d.ts +45 -0
- package/dist/types/fields/src/hooks/use-debounced-value.d.ts +1 -0
- package/dist/types/fields/src/hooks/use-row-edit-shortcuts.d.ts +15 -0
- package/dist/types/fields/src/index.d.ts +38 -0
- package/dist/types/fields/src/lib/is-row-doc-dirty.d.ts +2 -0
- package/dist/types/fields/src/lib/scroll-to-form-field.d.ts +6 -0
- package/dist/types/fields/src/media-library-query.d.ts +34 -0
- package/dist/types/fields/src/media-upload-limits.d.ts +18 -0
- package/dist/types/fields/src/record-actions-context.d.ts +17 -0
- package/dist/types/fields/src/storage-upload.d.ts +21 -0
- package/dist/types/primitives/src/components/ui/accordion.d.ts +6 -0
- package/dist/types/primitives/src/components/ui/alert-dialog.d.ts +12 -0
- package/dist/types/primitives/src/components/ui/badge.d.ts +9 -0
- package/dist/types/primitives/src/components/ui/button.d.ts +11 -0
- package/dist/types/primitives/src/components/ui/calendar.d.ts +8 -0
- package/dist/types/primitives/src/components/ui/card.d.ts +7 -0
- package/dist/types/primitives/src/components/ui/checkbox.d.ts +3 -0
- package/dist/types/primitives/src/components/ui/dialog.d.ts +15 -0
- package/dist/types/primitives/src/components/ui/dropdown-menu.d.ts +10 -0
- package/dist/types/primitives/src/components/ui/info-hint.d.ts +37 -0
- package/dist/types/primitives/src/components/ui/input.d.ts +2 -0
- package/dist/types/primitives/src/components/ui/label.d.ts +3 -0
- package/dist/types/primitives/src/components/ui/popover.d.ts +6 -0
- package/dist/types/primitives/src/components/ui/save-bar.d.ts +43 -0
- package/dist/types/primitives/src/components/ui/select.d.ts +8 -0
- package/dist/types/primitives/src/components/ui/separator.d.ts +3 -0
- package/dist/types/primitives/src/components/ui/sheet.d.ts +18 -0
- package/dist/types/primitives/src/components/ui/sonner.d.ts +1 -0
- package/dist/types/primitives/src/components/ui/switch.d.ts +3 -0
- package/dist/types/primitives/src/components/ui/table.d.ts +7 -0
- package/dist/types/primitives/src/components/ui/tabs.d.ts +6 -0
- package/dist/types/primitives/src/components/ui/tooltip.d.ts +6 -0
- package/dist/types/primitives/src/index.d.ts +28 -0
- package/dist/types/primitives/src/lib/animation-frame-batcher.d.ts +11 -0
- package/dist/types/primitives/src/lib/locale-week-start.d.ts +5 -0
- package/dist/types/primitives/src/lib/save-bar-logic.d.ts +52 -0
- package/dist/types/primitives/src/lib/use-raf-batched-pointer-drag.d.ts +31 -0
- package/dist/types/primitives/src/lib/use-save-bar.d.ts +36 -0
- package/dist/types/primitives/src/lib/use-unsaved-changes-guard.d.ts +15 -0
- package/dist/types/primitives/src/lib/utils.d.ts +6 -0
- package/dist/types/richtext/src/editor.d.ts +16 -0
- package/dist/types/richtext/src/host-adapter.d.ts +66 -0
- package/dist/types/richtext/src/index.d.ts +11 -0
- package/dist/types/richtext/src/markdown-editor/editor-styles.d.ts +7 -0
- package/dist/types/richtext/src/markdown-editor/markdown-editor-dialog.d.ts +16 -0
- package/dist/types/richtext/src/markdown-editor/markdown-editor.d.ts +2 -0
- package/dist/types/richtext/src/markdown-editor/markdown-field-input.d.ts +11 -0
- package/dist/types/richtext/src/markdown-editor/markdown-field-trigger.d.ts +8 -0
- package/dist/types/richtext/src/markdown-editor/markdown-insert-pickers-session.d.ts +5 -0
- package/dist/types/richtext/src/markdown-editor/markdown-insert-pickers.d.ts +9 -0
- package/dist/types/richtext/src/markdown-editor/markdown-preview.d.ts +7 -0
- package/dist/types/richtext/src/markdown-editor/markdown-rich-preview.d.ts +5 -0
- package/dist/types/richtext/src/markdown-editor/record-link-picker-session.d.ts +7 -0
- package/dist/types/richtext/src/markdown-editor/record-link-picker.d.ts +9 -0
- package/dist/types/richtext/src/markdown-editor/record-table-picker.d.ts +21 -0
- package/dist/types/richtext/src/markdown-editor/use-markdown-insert-pickers.d.ts +33 -0
- package/dist/types/richtext/src/record-table-view.d.ts +17 -0
- package/dist/types/richtext/src/rich-doc-view.d.ts +30 -0
- package/dist/types/richtext/src/rich-text-editor/blocknote-editor.d.ts +25 -0
- package/dist/types/richtext/src/rich-text-editor/blocknote-portaled-dropdown.d.ts +2 -0
- package/dist/types/richtext/src/rich-text-editor/blocknote-preview.d.ts +12 -0
- package/dist/types/richtext/src/rich-text-editor/record-link-inline.d.ts +15 -0
- package/dist/types/richtext/src/rich-text-editor/record-link-rows-context.d.ts +9 -0
- package/dist/types/richtext/src/rich-text-editor/record-table-block.d.ts +18 -0
- package/dist/types/richtext/src/rich-text-editor/studio-schema.d.ts +283 -0
- package/dist/types/richtext/src/rich-text-editor/studio-slash-menu.d.ts +8 -0
- package/dist/types/richtext/src/rich-text-editor/use-sync-blocknote-value.d.ts +2 -0
- package/dist/types/shared/src/apiProfile.d.ts +164 -0
- package/dist/types/shared/src/apiProfileDiscovery.d.ts +88 -0
- package/dist/types/shared/src/apiProfileSlug.d.ts +11 -0
- package/dist/types/shared/src/apiProfileSources.d.ts +112 -0
- package/dist/types/shared/src/apiProfileValidators.d.ts +310 -0
- package/dist/types/shared/src/apiToken.d.ts +6 -0
- package/dist/types/shared/src/assetFamily.d.ts +38 -0
- package/dist/types/shared/src/assetFieldValues.d.ts +21 -0
- package/dist/types/shared/src/assetGraph.d.ts +221 -0
- package/dist/types/shared/src/assetJobs.d.ts +99 -0
- package/dist/types/shared/src/assetSettings.d.ts +147 -0
- package/dist/types/shared/src/auditRedact.d.ts +36 -0
- package/dist/types/shared/src/betterAuthSession.d.ts +12 -0
- package/dist/types/shared/src/bffHost.d.ts +36 -0
- package/dist/types/shared/src/bffProtocol.d.ts +563 -0
- package/dist/types/shared/src/bffRedact.d.ts +30 -0
- package/dist/types/shared/src/ciPreviewEnv.d.ts +21 -0
- package/dist/types/shared/src/clipboardTransfer.d.ts +25 -0
- package/dist/types/shared/src/convexFacade.d.ts +44 -0
- package/dist/types/shared/src/convexSiteUrl.d.ts +73 -0
- package/dist/types/shared/src/csv.d.ts +65 -0
- package/dist/types/shared/src/dataTransfer.d.ts +21 -0
- package/dist/types/shared/src/dateValues.d.ts +21 -0
- package/dist/types/shared/src/deployOutput.d.ts +3 -0
- package/dist/types/shared/src/displayLabel.d.ts +17 -0
- package/dist/types/shared/src/displayTemplateGenerator.d.ts +11 -0
- package/dist/types/shared/src/displayTypes.d.ts +10 -0
- package/dist/types/shared/src/erdLayout.d.ts +27 -0
- package/dist/types/shared/src/facets.d.ts +109 -0
- package/dist/types/shared/src/failureMessage.d.ts +5 -0
- package/dist/types/shared/src/fieldTypeMeta.d.ts +110 -0
- package/dist/types/shared/src/fieldTypeText.d.ts +34 -0
- package/dist/types/shared/src/fieldValueEqual.d.ts +10 -0
- package/dist/types/shared/src/fieldValueShape.d.ts +24 -0
- package/dist/types/shared/src/fieldValueText.d.ts +32 -0
- package/dist/types/shared/src/gridQuery.d.ts +103 -0
- package/dist/types/shared/src/importMatch.d.ts +80 -0
- package/dist/types/shared/src/index.d.ts +78 -0
- package/dist/types/shared/src/inferIdentifier.d.ts +18 -0
- package/dist/types/shared/src/keyboard.d.ts +16 -0
- package/dist/types/shared/src/manifestDeploy.d.ts +31 -0
- package/dist/types/shared/src/manifestHash.d.ts +12 -0
- package/dist/types/shared/src/mcpOAuth.d.ts +182 -0
- package/dist/types/shared/src/postLoginPath.d.ts +21 -0
- package/dist/types/shared/src/previewDeployName.d.ts +27 -0
- package/dist/types/shared/src/proposalDraftMerge.d.ts +35 -0
- package/dist/types/shared/src/proposePolicy.d.ts +17 -0
- package/dist/types/shared/src/proposeRateLimit.d.ts +27 -0
- package/dist/types/shared/src/queryBetween.d.ts +21 -0
- package/dist/types/shared/src/queryConditions.d.ts +46 -0
- package/dist/types/shared/src/queryExecution.d.ts +12 -0
- package/dist/types/shared/src/queryFieldOps.d.ts +123 -0
- package/dist/types/shared/src/queryMerge.d.ts +30 -0
- package/dist/types/shared/src/queryPlan.d.ts +86 -0
- package/dist/types/shared/src/queryStudio.d.ts +28 -0
- package/dist/types/shared/src/queryTypes.d.ts +184 -0
- package/dist/types/shared/src/queryValidators.d.ts +233 -0
- package/dist/types/shared/src/readApiQuery.d.ts +10 -0
- package/dist/types/shared/src/readModelLimits.d.ts +23 -0
- package/dist/types/shared/src/recordTableColumns.d.ts +24 -0
- package/dist/types/shared/src/recordTablePreload.d.ts +19 -0
- package/dist/types/shared/src/refDisplayRequests.d.ts +17 -0
- package/dist/types/shared/src/refGraph.d.ts +97 -0
- package/dist/types/shared/src/refsRecompute.d.ts +16 -0
- package/dist/types/shared/src/richDoc.d.ts +80 -0
- package/dist/types/shared/src/rowPatchWire.d.ts +12 -0
- package/dist/types/shared/src/rowTrash.d.ts +26 -0
- package/dist/types/shared/src/savedView.d.ts +37 -0
- package/dist/types/shared/src/schemaGenerator.d.ts +36 -0
- package/dist/types/shared/src/schemaShrink.d.ts +82 -0
- package/dist/types/shared/src/schemaShrinkValidators.d.ts +72 -0
- package/dist/types/shared/src/schemaTypes.d.ts +311 -0
- package/dist/types/shared/src/share.d.ts +8 -0
- package/dist/types/shared/src/shareApiBridge.d.ts +13 -0
- package/dist/types/shared/src/shareGuestPolicy.d.ts +14 -0
- package/dist/types/shared/src/shareProposal.d.ts +141 -0
- package/dist/types/shared/src/shareProposalDiff.d.ts +13 -0
- package/dist/types/shared/src/shareScopes.d.ts +19 -0
- package/dist/types/shared/src/shareTokenCrypto.d.ts +9 -0
- package/dist/types/shared/src/shareTokens.d.ts +6 -0
- package/dist/types/shared/src/shareTypes.d.ts +113 -0
- package/dist/types/shared/src/shareWizard.d.ts +23 -0
- package/dist/types/shared/src/spaceBundle.d.ts +89 -0
- package/dist/types/shared/src/stagedApiAccess.d.ts +104 -0
- package/dist/types/shared/src/studioBoot.d.ts +63 -0
- package/dist/types/shared/src/syncChannel.d.ts +25 -0
- package/dist/types/shared/src/syncClampMembership.d.ts +22 -0
- package/dist/types/shared/src/tableSearch.d.ts +52 -0
- package/dist/types/shared/src/tenantHosts.d.ts +34 -0
- package/dist/types/shared/src/tenantSecretsCrypto.d.ts +31 -0
- package/dist/types/shared/src/useDebouncedCommit.d.ts +15 -0
- package/dist/types/shared/src/useDebouncedValue.d.ts +1 -0
- package/dist/types/shared/src/useModifierHeld.d.ts +2 -0
- package/package.json +85 -3
- package/README.md +0 -3
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Studio grid's query (plan 098): {@link Query} with up to three sort keys and up to three
|
|
3
|
+
* group levels. The Studio grid's URL and saved queries hold it; every Convex endpoint keeps taking
|
|
4
|
+
* {@link Query} through {@link toConvexQuery}.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { type Query, type QueryError, type QueryOrder } from "./queryTypes.ts";
|
|
8
|
+
import type { Field, Table } from "./schemaTypes.ts";
|
|
9
|
+
export declare const GROUP_BUCKETS: readonly ["day", "week", "month", "quarter", "year"];
|
|
10
|
+
/** Sort keys and group levels a grid query holds at most. */
|
|
11
|
+
export declare const MAX_GRID_KEYS = 3;
|
|
12
|
+
export type GroupBucket = (typeof GROUP_BUCKETS)[number];
|
|
13
|
+
declare const gridGroupBySchema: z.ZodObject<{
|
|
14
|
+
field: z.ZodString;
|
|
15
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
16
|
+
asc: "asc";
|
|
17
|
+
desc: "desc";
|
|
18
|
+
}>>;
|
|
19
|
+
bucket: z.ZodOptional<z.ZodEnum<{
|
|
20
|
+
day: "day";
|
|
21
|
+
week: "week";
|
|
22
|
+
month: "month";
|
|
23
|
+
quarter: "quarter";
|
|
24
|
+
year: "year";
|
|
25
|
+
}>>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export type GridGroupBy = z.infer<typeof gridGroupBySchema>;
|
|
28
|
+
export declare const gridQuerySchema: z.ZodObject<{
|
|
29
|
+
predicates: z.ZodOptional<z.ZodArray<z.ZodType<import("./queryTypes.ts").Condition, unknown, z.core.$ZodTypeInternals<import("./queryTypes.ts").Condition, unknown>>>>;
|
|
30
|
+
maxScan: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
indexHint: z.ZodOptional<z.ZodString>;
|
|
32
|
+
order: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
33
|
+
field: z.ZodString;
|
|
34
|
+
direction: z.ZodEnum<{
|
|
35
|
+
asc: "asc";
|
|
36
|
+
desc: "desc";
|
|
37
|
+
}>;
|
|
38
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
39
|
+
field: z.ZodString;
|
|
40
|
+
direction: z.ZodEnum<{
|
|
41
|
+
asc: "asc";
|
|
42
|
+
desc: "desc";
|
|
43
|
+
}>;
|
|
44
|
+
}, z.core.$strip>>]>>;
|
|
45
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
46
|
+
field: z.ZodString;
|
|
47
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
asc: "asc";
|
|
49
|
+
desc: "desc";
|
|
50
|
+
}>>;
|
|
51
|
+
bucket: z.ZodOptional<z.ZodEnum<{
|
|
52
|
+
day: "day";
|
|
53
|
+
week: "week";
|
|
54
|
+
month: "month";
|
|
55
|
+
quarter: "quarter";
|
|
56
|
+
year: "year";
|
|
57
|
+
}>>;
|
|
58
|
+
}, z.core.$strip>>>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
export type GridQuery = z.infer<typeof gridQuerySchema>;
|
|
61
|
+
/** Parse a `qf` or stored query; an empty `order` or `groupBy` becomes undefined. */
|
|
62
|
+
export declare function parseGridQuery(input: unknown): {
|
|
63
|
+
ok: true;
|
|
64
|
+
query: GridQuery;
|
|
65
|
+
} | {
|
|
66
|
+
ok: false;
|
|
67
|
+
error: QueryError;
|
|
68
|
+
};
|
|
69
|
+
/** Sort keys, highest priority first. */
|
|
70
|
+
export declare function queryOrders(query: GridQuery): QueryOrder[];
|
|
71
|
+
/**
|
|
72
|
+
* The fields a grid query references: its predicates' at any depth, then its sort keys', then its
|
|
73
|
+
* groups'.
|
|
74
|
+
*/
|
|
75
|
+
export declare function gridQueryFields(query: GridQuery): string[];
|
|
76
|
+
/**
|
|
77
|
+
* The tables a grid query orders by label: the target of each link or link list it sorts or groups
|
|
78
|
+
* by. The read model refuses the query while one's label fills; the grid re-fetches on its changes.
|
|
79
|
+
*/
|
|
80
|
+
export declare function gridQueryLinkTargets(table: Pick<Table, "fields">, query: GridQuery): string[];
|
|
81
|
+
/** The part a Convex endpoint accepts: the first sort key and no groups. */
|
|
82
|
+
export declare function toConvexQuery(query: GridQuery): Query;
|
|
83
|
+
/**
|
|
84
|
+
* `query` with fields, sort keys and groups the table no longer has (or cannot sort or group by)
|
|
85
|
+
* dropped, and date buckets off fields without them; null when nothing is left. A single `order`
|
|
86
|
+
* stays an object and a list stays a list.
|
|
87
|
+
*/
|
|
88
|
+
export declare function validateGridQueryForTable(table: Table, query: GridQuery): GridQuery | null;
|
|
89
|
+
/**
|
|
90
|
+
* Sort key `index` replaced by `order` (any other key on its field is dropped), or removed when
|
|
91
|
+
* `order` is null; `index` at the end adds a key. Filters and groups stay.
|
|
92
|
+
*/
|
|
93
|
+
export declare function setGridSort<Q extends GridQuery>(query: Q | null, index: number, order: QueryOrder | null): Q | null;
|
|
94
|
+
/** A header click: the first sort key on `field` goes asc → desc → off; other keys stay. */
|
|
95
|
+
export declare function cycleGridSort<Q extends GridQuery>(query: Q | null, field: string): Q | null;
|
|
96
|
+
/** Group level `index` replaced by `group`, removed when null, or added at the end. */
|
|
97
|
+
export declare function setGridGroup(query: GridQuery | null, index: number, group: GridGroupBy | null): GridQuery | null;
|
|
98
|
+
/**
|
|
99
|
+
* `field`'s group level removed, or a level on it appended (a date field by month); a fourth
|
|
100
|
+
* level is not added.
|
|
101
|
+
*/
|
|
102
|
+
export declare function toggleGridGroup(query: GridQuery | null, field: Field): GridQuery | null;
|
|
103
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { DisplayIdLookup } from "./csv.ts";
|
|
2
|
+
import { type ImportRow, type ParseResult } from "./csv.ts";
|
|
3
|
+
import type { FieldType, Table } from "./schemaTypes.ts";
|
|
4
|
+
export type ImportMatchKey = {
|
|
5
|
+
kind: "_id";
|
|
6
|
+
tableName: string;
|
|
7
|
+
} | {
|
|
8
|
+
kind: "scalar";
|
|
9
|
+
fieldName: string;
|
|
10
|
+
fieldType: FieldType;
|
|
11
|
+
} | {
|
|
12
|
+
kind: "id";
|
|
13
|
+
fieldName: string;
|
|
14
|
+
refTable: string;
|
|
15
|
+
} | {
|
|
16
|
+
kind: "idArray";
|
|
17
|
+
fieldName: string;
|
|
18
|
+
refTable: string;
|
|
19
|
+
};
|
|
20
|
+
export type ImportStagingRow = ImportRow & {
|
|
21
|
+
/** Synthetic grid row id (`import-row-{rowNum}`). */
|
|
22
|
+
stagingId: string;
|
|
23
|
+
};
|
|
24
|
+
declare const MATCH_ERROR_KEY = "_match";
|
|
25
|
+
export declare function importStagingId(rowNum: number): string;
|
|
26
|
+
export declare function csvHasIdColumn(parsed: ParseResult): boolean;
|
|
27
|
+
export declare function matchColumnsForTable(table: Table): ImportMatchColumn[];
|
|
28
|
+
export type ImportMatchColumn = {
|
|
29
|
+
kind: "scalar";
|
|
30
|
+
fieldName: string;
|
|
31
|
+
fieldType: FieldType;
|
|
32
|
+
label: string;
|
|
33
|
+
} | {
|
|
34
|
+
kind: "id";
|
|
35
|
+
fieldName: string;
|
|
36
|
+
refTable: string;
|
|
37
|
+
label: string;
|
|
38
|
+
} | {
|
|
39
|
+
kind: "idArray";
|
|
40
|
+
fieldName: string;
|
|
41
|
+
refTable: string;
|
|
42
|
+
label: string;
|
|
43
|
+
};
|
|
44
|
+
export declare function defaultMatchColumn(table: Table): ImportMatchColumn | null;
|
|
45
|
+
export declare function matchKeyFromColumn(col: ImportMatchColumn, _tableName: string): ImportMatchKey;
|
|
46
|
+
export declare function patchMergeImportRow(existing: Record<string, unknown>, csvDoc: Record<string, unknown>, table: Table): Record<string, unknown>;
|
|
47
|
+
export declare function normalizeMatchKeyFromValue(value: unknown, matchKey: ImportMatchKey, displayLookup: DisplayIdLookup): string;
|
|
48
|
+
export declare function normalizeMatchKeyFromCsvRow(rawRow: Record<string, string>, matchKey: ImportMatchKey, displayLookup: DisplayIdLookup): string | null;
|
|
49
|
+
export declare function collectMatchDisplayIdRefs(_table: Table, existingRows: Record<string, unknown>[], csvRows: Record<string, string>[], matchKey: ImportMatchKey): Map<string, Set<string>>;
|
|
50
|
+
export declare function resolveImportMatches(args: {
|
|
51
|
+
table: Table;
|
|
52
|
+
parsed: ParseResult;
|
|
53
|
+
existingRows: Record<string, unknown>[];
|
|
54
|
+
matchKey: ImportMatchKey;
|
|
55
|
+
displayLookup: DisplayIdLookup;
|
|
56
|
+
}): ImportStagingRow[];
|
|
57
|
+
export declare function stagingRowsToGridRows(staging: ImportStagingRow[]): Record<string, unknown>[];
|
|
58
|
+
export declare function mergeStagingPendingEdits(staging: ImportStagingRow[], pendingEdits: Map<string, Record<string, unknown>>): ImportStagingRow[];
|
|
59
|
+
/** Recompute insert/replace mode and match errors after grid edits to match fields. */
|
|
60
|
+
export declare function reconcileStagingMatchState(args: {
|
|
61
|
+
staging: ImportStagingRow[];
|
|
62
|
+
existingRows: Record<string, unknown>[];
|
|
63
|
+
matchKey: ImportMatchKey;
|
|
64
|
+
displayLookup: DisplayIdLookup;
|
|
65
|
+
parsed: ParseResult;
|
|
66
|
+
table: Table;
|
|
67
|
+
}): ImportStagingRow[];
|
|
68
|
+
/** Merge staging + pending edits, reconcile match mode, and revalidate for commit. */
|
|
69
|
+
export declare function buildImportCommitRows(args: {
|
|
70
|
+
stagingRows: ImportStagingRow[];
|
|
71
|
+
pendingEdits: Map<string, Record<string, unknown>>;
|
|
72
|
+
table: Table;
|
|
73
|
+
parsed: ParseResult | null;
|
|
74
|
+
matchKey: ImportMatchKey | null;
|
|
75
|
+
existingRows: Record<string, unknown>[] | null;
|
|
76
|
+
displayLookup: DisplayIdLookup;
|
|
77
|
+
}): ImportStagingRow[];
|
|
78
|
+
export declare function revalidateStagingRow(row: ImportStagingRow, table: Table): ImportStagingRow;
|
|
79
|
+
export declare function stagingRowToImportRow(row: ImportStagingRow): ImportRow;
|
|
80
|
+
export { MATCH_ERROR_KEY };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export * from "./schemaTypes.ts";
|
|
2
|
+
export * from "./fieldTypeText.ts";
|
|
3
|
+
export * from "./fieldTypeMeta.ts";
|
|
4
|
+
export * from "./fieldValueShape.ts";
|
|
5
|
+
export * from "./fieldValueText.ts";
|
|
6
|
+
export * from "./inferIdentifier.ts";
|
|
7
|
+
export * from "./schemaGenerator.ts";
|
|
8
|
+
export * from "./schemaShrink.ts";
|
|
9
|
+
export * from "./schemaShrinkValidators.ts";
|
|
10
|
+
export * from "./displayTypes.ts";
|
|
11
|
+
export * from "./displayLabel.ts";
|
|
12
|
+
export * from "./displayTemplateGenerator.ts";
|
|
13
|
+
export * from "./erdLayout.ts";
|
|
14
|
+
export * from "./richDoc.ts";
|
|
15
|
+
export * from "./recordTablePreload.ts";
|
|
16
|
+
export * from "./recordTableColumns.ts";
|
|
17
|
+
export { collectAssetIds, collectAssetIdsFromRow, isValidAssetId } from "./assetFieldValues.ts";
|
|
18
|
+
export * from "./assetFamily.ts";
|
|
19
|
+
export * from "./assetGraph.ts";
|
|
20
|
+
export * from "./assetJobs.ts";
|
|
21
|
+
export * from "./assetSettings.ts";
|
|
22
|
+
export * from "./fieldValueEqual.ts";
|
|
23
|
+
export * from "./rowPatchWire.ts";
|
|
24
|
+
export * from "./dateValues.ts";
|
|
25
|
+
export * from "./csv.ts";
|
|
26
|
+
export * from "./importMatch.ts";
|
|
27
|
+
export * from "./refDisplayRequests.ts";
|
|
28
|
+
export * from "./queryTypes.ts";
|
|
29
|
+
export * from "./queryConditions.ts";
|
|
30
|
+
export * from "./queryBetween.ts";
|
|
31
|
+
export * from "./queryFieldOps.ts";
|
|
32
|
+
export * from "./queryMerge.ts";
|
|
33
|
+
export { deriveListMeta, idListMeta, planMergedQuery, planQuery, type IndexRangeBound, type PlannedAccess, type PlannedIndexAccess, type PlannedPage, type PlanQueryOptions, type PlanQueryResult, type QueryPlan, } from "./queryPlan.ts";
|
|
34
|
+
export * from "./queryExecution.ts";
|
|
35
|
+
export * from "./queryStudio.ts";
|
|
36
|
+
export * from "./gridQuery.ts";
|
|
37
|
+
export * from "./queryValidators.ts";
|
|
38
|
+
export * from "./keyboard.ts";
|
|
39
|
+
export * from "./postLoginPath.ts";
|
|
40
|
+
export * from "./useDebouncedValue.ts";
|
|
41
|
+
export * from "./useDebouncedCommit.ts";
|
|
42
|
+
export * from "./useModifierHeld.ts";
|
|
43
|
+
export * from "./deployOutput.ts";
|
|
44
|
+
export * from "./previewDeployName.ts";
|
|
45
|
+
export * from "./ciPreviewEnv.ts";
|
|
46
|
+
export * from "./convexSiteUrl.ts";
|
|
47
|
+
export * from "./betterAuthSession.ts";
|
|
48
|
+
export * from "./apiToken.ts";
|
|
49
|
+
export * from "./share.ts";
|
|
50
|
+
export * from "./shareTokenCrypto.ts";
|
|
51
|
+
export * from "./proposePolicy.ts";
|
|
52
|
+
export * from "./proposeRateLimit.ts";
|
|
53
|
+
export * from "./apiProfileSlug.ts";
|
|
54
|
+
export * from "./apiProfile.ts";
|
|
55
|
+
export * from "./apiProfileSources.ts";
|
|
56
|
+
export * from "./apiProfileValidators.ts";
|
|
57
|
+
export * from "./apiProfileDiscovery.ts";
|
|
58
|
+
export * from "./syncClampMembership.ts";
|
|
59
|
+
export * from "./rowTrash.ts";
|
|
60
|
+
export * from "./failureMessage.ts";
|
|
61
|
+
export * from "./syncChannel.ts";
|
|
62
|
+
export * from "./readApiQuery.ts";
|
|
63
|
+
export * from "./manifestHash.ts";
|
|
64
|
+
export * from "./manifestDeploy.ts";
|
|
65
|
+
export * from "./refGraph.ts";
|
|
66
|
+
export * from "./refsRecompute.ts";
|
|
67
|
+
export * from "./savedView.ts";
|
|
68
|
+
export * from "./spaceBundle.ts";
|
|
69
|
+
export * from "./dataTransfer.ts";
|
|
70
|
+
export * from "./clipboardTransfer.ts";
|
|
71
|
+
export * from "./tenantHosts.ts";
|
|
72
|
+
export * from "./tenantSecretsCrypto.ts";
|
|
73
|
+
export * from "./studioBoot.ts";
|
|
74
|
+
export * from "./bffHost.ts";
|
|
75
|
+
export * from "./bffProtocol.ts";
|
|
76
|
+
export * from "./bffRedact.ts";
|
|
77
|
+
export * from "./auditRedact.ts";
|
|
78
|
+
export * from "./shareProposal.ts";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Whether `name` is a valid manifest table/field identifier. */
|
|
2
|
+
export declare function isValidIdentifier(name: string): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Infer a camelCase identifier from human display text.
|
|
5
|
+
* Does not pluralize/singularize — splits on non-alphanumeric runs only.
|
|
6
|
+
*/
|
|
7
|
+
export declare function inferIdentifier(displayName: string): string;
|
|
8
|
+
/** True when `name` appears in `siblings` (exact match). */
|
|
9
|
+
export declare function hasIdentifierCollision(name: string, siblings: Iterable<string>): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Return `base` or `base2`, `base3`, … when `base` is already taken.
|
|
12
|
+
* Empty `base` is returned unchanged.
|
|
13
|
+
*/
|
|
14
|
+
export declare function uniqueIdentifier(base: string, reservedNames?: Iterable<string>): string;
|
|
15
|
+
/** Infer an identifier from display text, bumping with a numeric suffix when taken. */
|
|
16
|
+
export declare function inferUniqueIdentifier(displayName: string, reservedNames?: Iterable<string>): string;
|
|
17
|
+
/** First duplicate identifier in a list, if any. */
|
|
18
|
+
export declare function findDuplicateIdentifier(names: readonly string[]): string | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type UndoRedoKind = "undo" | "redo" | null;
|
|
2
|
+
export declare function modKeyLabel(): string;
|
|
3
|
+
/** e.g. "⌘S" on Mac, "Ctrl+S" elsewhere */
|
|
4
|
+
export declare function formatModShortcut(key: string, shift?: boolean): string;
|
|
5
|
+
export declare function matchModShortcut(e: KeyboardEvent, key: string): boolean;
|
|
6
|
+
export declare function matchModShiftShortcut(e: KeyboardEvent, key: string): boolean;
|
|
7
|
+
export declare function matchModEnter(e: KeyboardEvent): boolean;
|
|
8
|
+
export declare function matchEscape(e: KeyboardEvent): boolean;
|
|
9
|
+
export declare function formatModEnterShortcut(): string;
|
|
10
|
+
export declare function formatEscapeShortcut(): string;
|
|
11
|
+
export declare function matchSave(e: KeyboardEvent): boolean;
|
|
12
|
+
export declare function matchToggleEditMode(e: KeyboardEvent): boolean;
|
|
13
|
+
export declare function matchUndoRedo(e: KeyboardEvent): UndoRedoKind;
|
|
14
|
+
export declare function isTypingInEditor(): boolean;
|
|
15
|
+
/** True when a Radix popover/select layer is open — Escape should close it first. */
|
|
16
|
+
export declare function isRadixOverlayOpen(): boolean;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { PendingApiAccess, StagedApiAccess } from "./stagedApiAccess.ts";
|
|
2
|
+
export declare const MANIFEST_DEPLOY_STATUSES: readonly ["idle", "cleaning", "ready", "deploying", "deployed", "failed"];
|
|
3
|
+
/** Status persisted in the singleton Columnus manifest row. */
|
|
4
|
+
export type ManifestDeployStatus = (typeof MANIFEST_DEPLOY_STATUSES)[number];
|
|
5
|
+
export declare function isManifestDeployStatus(value: unknown): value is ManifestDeployStatus;
|
|
6
|
+
/** Manifest row fields shared by the component, host, read API, CLI, and UI boundaries. */
|
|
7
|
+
export type ManifestDeploySnapshot = {
|
|
8
|
+
manifestJson: string;
|
|
9
|
+
draftManifestJson?: string;
|
|
10
|
+
draftUpdatedAt?: number;
|
|
11
|
+
erdLayoutJson?: string;
|
|
12
|
+
draftErdLayoutJson?: string;
|
|
13
|
+
lastSaveAt: number;
|
|
14
|
+
deployStatus: ManifestDeployStatus;
|
|
15
|
+
deployError?: string;
|
|
16
|
+
deployLogTail?: string;
|
|
17
|
+
deployedAt?: number;
|
|
18
|
+
deployOperationId?: string;
|
|
19
|
+
desiredManifestHash?: string;
|
|
20
|
+
deployedManifestHash?: string;
|
|
21
|
+
deployStartedAt?: number;
|
|
22
|
+
deployCompletedAt?: number;
|
|
23
|
+
refsSchemaHash?: string;
|
|
24
|
+
refsIndexedAt?: number;
|
|
25
|
+
refsRecomputeTargetHash?: string;
|
|
26
|
+
refsRecomputeHeartbeatAt?: number;
|
|
27
|
+
pendingRefsRecomputeBeforeJson?: string;
|
|
28
|
+
/** Plan 082 S9: API access staged by an import, and what a running deploy commits. */
|
|
29
|
+
draftApiAccess?: StagedApiAccess;
|
|
30
|
+
pendingApiAccess?: PendingApiAccess;
|
|
31
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Manifest } from "./schemaTypes.ts";
|
|
2
|
+
import type { ApiTableAccess } from "./apiProfile.ts";
|
|
3
|
+
/** Stable JSON for `{ tables }` filtered to an allowlist (sorted by table name). */
|
|
4
|
+
export declare function canonicalManifestTablesJson(manifest: Manifest, allowedTableNames?: readonly string[]): string;
|
|
5
|
+
export declare function sha256Hex(input: string): Promise<string>;
|
|
6
|
+
/** SHA-256 hex of canonical filtered manifest tables (server source of truth for pull sync). */
|
|
7
|
+
export declare function computeManifestHash(manifest: Manifest, allowedTableNames?: readonly string[]): Promise<string>;
|
|
8
|
+
/**
|
|
9
|
+
* Pull-sync fingerprint for a manifest plus the profile capabilities that
|
|
10
|
+
* determine generated client refs and hooks.
|
|
11
|
+
*/
|
|
12
|
+
export declare function computeManifestAccessHash(manifest: Manifest, tableAccess: readonly ApiTableAccess[]): Promise<string>;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import type { FacadeApi } from "./convexFacade.ts";
|
|
2
|
+
/** Operation scopes a person consents to separately (Q22). */
|
|
3
|
+
export declare const MCP_OAUTH_SCOPES: readonly ["sources:read", "drafts:write", "drafts:publish", "media:write"];
|
|
4
|
+
export type McpOAuthScope = (typeof MCP_OAUTH_SCOPES)[number];
|
|
5
|
+
export declare const MCP_OAUTH_SCOPE_LABELS: Record<McpOAuthScope, string>;
|
|
6
|
+
export declare const MCP_OAUTH_REQUEST_TTL_MS: number;
|
|
7
|
+
export declare const MCP_OAUTH_CODE_TTL_MS: number;
|
|
8
|
+
export declare const MCP_OAUTH_ACCESS_TOKEN_TTL_MS: number;
|
|
9
|
+
/** Idle expiry: every refresh rotates the token and restarts this window. */
|
|
10
|
+
export declare const MCP_OAUTH_REFRESH_TOKEN_TTL_MS: number;
|
|
11
|
+
/** A registered client that never connects is removed after this. */
|
|
12
|
+
export declare const MCP_OAUTH_UNUSED_CLIENT_TTL_MS: number;
|
|
13
|
+
/**
|
|
14
|
+
* A client whose last connection ended is removed after this; its refresh
|
|
15
|
+
* tokens would have expired by then anyway.
|
|
16
|
+
*/
|
|
17
|
+
export declare const MCP_OAUTH_IDLE_CLIENT_TTL_MS: number;
|
|
18
|
+
export declare const MCP_OAUTH_ACCESS_TOKEN_PREFIX = "colat_";
|
|
19
|
+
export declare const MCP_OAUTH_REFRESH_TOKEN_PREFIX = "colrt_";
|
|
20
|
+
export declare const MCP_OAUTH_MAX_REDIRECT_URIS = 10;
|
|
21
|
+
export declare const MCP_OAUTH_MAX_URI_LENGTH = 2000;
|
|
22
|
+
export declare const MCP_OAUTH_MAX_CLIENT_NAME_LENGTH = 200;
|
|
23
|
+
export declare const MCP_OAUTH_MAX_STATE_LENGTH = 1000;
|
|
24
|
+
/** A random opaque credential: `prefix` + base64url of `bytes` random bytes. */
|
|
25
|
+
export declare function randomCredential(prefix: string, bytes?: number): string;
|
|
26
|
+
export declare const newOAuthAccessToken: () => string;
|
|
27
|
+
export declare const newOAuthCode: () => string;
|
|
28
|
+
export declare const newOAuthRequestId: () => string;
|
|
29
|
+
export declare const newOAuthClientId: () => string;
|
|
30
|
+
/** A refresh-token family: one per code exchange, kept by every rotation. */
|
|
31
|
+
export declare const newOAuthRefreshFamily: () => string;
|
|
32
|
+
/**
|
|
33
|
+
* A refresh token carries its family in the clear, so presenting any rotated
|
|
34
|
+
* token of a live family is recognised as reuse without storing old hashes
|
|
35
|
+
* (RFC 9700 §4.14.2).
|
|
36
|
+
*/
|
|
37
|
+
export declare const newOAuthRefreshToken: (family: string) => string;
|
|
38
|
+
/** The family a refresh token belongs to, or null when it is not one of ours. */
|
|
39
|
+
export declare function oauthRefreshFamily(token: string): string | null;
|
|
40
|
+
export declare function isOAuthAccessToken(value: string): boolean;
|
|
41
|
+
/** Stored form of a credential: credentials are never persisted in the clear. */
|
|
42
|
+
export declare function hashOAuthSecret(secret: string): Promise<string>;
|
|
43
|
+
export declare function isPkceChallenge(value: string): boolean;
|
|
44
|
+
/** RFC 7636 S256 challenge for a verifier, or null for a malformed verifier. */
|
|
45
|
+
export declare function pkceS256Challenge(verifier: string): Promise<string | null>;
|
|
46
|
+
/**
|
|
47
|
+
* Requested scopes: omitted or blank means every scope (authorization then
|
|
48
|
+
* narrows to the profile's); unknown is an error.
|
|
49
|
+
*/
|
|
50
|
+
export declare function parseOAuthScopes(scope: string | undefined): McpOAuthScope[] | null;
|
|
51
|
+
/** Scopes in canonical order with duplicates and unknown values dropped. */
|
|
52
|
+
export declare function canonicalOAuthScopes(scopes: readonly string[]): McpOAuthScope[];
|
|
53
|
+
export declare function intersectOAuthScopes(a: readonly string[], b: readonly string[]): McpOAuthScope[];
|
|
54
|
+
/**
|
|
55
|
+
* Why a client's redirect URI is not acceptable, or null. Allowed: https,
|
|
56
|
+
* loopback http (native apps, RFC 8252 §7.3), and private-use schemes
|
|
57
|
+
* (§7.1). Never fragments, credentials, or script-capable schemes.
|
|
58
|
+
*/
|
|
59
|
+
export declare function redirectUriProblem(uri: string): string | null;
|
|
60
|
+
/** Exact match, except loopback http where the port may differ (RFC 8252 §7.3). */
|
|
61
|
+
export declare function redirectUriMatches(registered: string, requested: string): boolean;
|
|
62
|
+
/** The browser-facing origin of a tenant host; MCP and OAuth are https only. */
|
|
63
|
+
export declare function tenantOrigin(hostname: string): string;
|
|
64
|
+
export declare const MCP_ENDPOINT_PATH_PREFIX: string;
|
|
65
|
+
export declare const MCP_OAUTH_PATH_PREFIX: string;
|
|
66
|
+
/** The resource (RFC 8707) that names one profile's MCP endpoint on a host. */
|
|
67
|
+
export declare function mcpResourceUrl(origin: string, profileSlug: string): string;
|
|
68
|
+
/**
|
|
69
|
+
* The tenant origin and profile a resource names, when its host is one of the
|
|
70
|
+
* tenant's own site origins (its authoritative `SITE_URL` list); otherwise null.
|
|
71
|
+
*/
|
|
72
|
+
export declare function trustedMcpResource(resource: string, siteOrigins: readonly string[]): {
|
|
73
|
+
origin: string;
|
|
74
|
+
profileSlug: string;
|
|
75
|
+
} | null;
|
|
76
|
+
/** The profile slug a resource names on `origin`, or null for any other resource. */
|
|
77
|
+
export declare function profileSlugFromResource(resource: string, origin: string): string | null;
|
|
78
|
+
/** RFC 9728 metadata URL for a resource (path inserted after `/.well-known/…`). */
|
|
79
|
+
export declare function protectedResourceMetadataUrl(resource: string): string;
|
|
80
|
+
/** RFC 6749 §5.2 / RFC 7591 §3.2.2 error answer; `redirect` says whether it may go to the client. */
|
|
81
|
+
export type OAuthFailure = {
|
|
82
|
+
ok: false;
|
|
83
|
+
error: string;
|
|
84
|
+
description: string;
|
|
85
|
+
redirect?: boolean;
|
|
86
|
+
};
|
|
87
|
+
export type OAuthRegisterClientRequest = {
|
|
88
|
+
redirectUris: string[];
|
|
89
|
+
clientName?: string;
|
|
90
|
+
clientUri?: string;
|
|
91
|
+
softwareId?: string;
|
|
92
|
+
softwareVersion?: string;
|
|
93
|
+
grantTypes?: string[];
|
|
94
|
+
responseTypes?: string[];
|
|
95
|
+
};
|
|
96
|
+
export type OAuthRegistration = {
|
|
97
|
+
ok: true;
|
|
98
|
+
clientId: string;
|
|
99
|
+
clientIdIssuedAt: number;
|
|
100
|
+
redirectUris: string[];
|
|
101
|
+
clientName?: string;
|
|
102
|
+
clientUri?: string;
|
|
103
|
+
grantTypes: string[];
|
|
104
|
+
responseTypes: string[];
|
|
105
|
+
tokenEndpointAuthMethod: "none";
|
|
106
|
+
scope: string;
|
|
107
|
+
};
|
|
108
|
+
export type OAuthAuthorizeRequest = {
|
|
109
|
+
clientId: string;
|
|
110
|
+
redirectUri: string;
|
|
111
|
+
responseType?: string;
|
|
112
|
+
codeChallenge?: string;
|
|
113
|
+
codeChallengeMethod?: string;
|
|
114
|
+
resource?: string;
|
|
115
|
+
scope?: string;
|
|
116
|
+
state?: string;
|
|
117
|
+
};
|
|
118
|
+
export type OAuthAuthorizeResult = {
|
|
119
|
+
ok: true;
|
|
120
|
+
requestId: string;
|
|
121
|
+
} | OAuthFailure;
|
|
122
|
+
export type OAuthTokenRequest = {
|
|
123
|
+
grantType: string;
|
|
124
|
+
clientId: string;
|
|
125
|
+
code?: string;
|
|
126
|
+
codeVerifier?: string;
|
|
127
|
+
redirectUri?: string;
|
|
128
|
+
refreshToken?: string;
|
|
129
|
+
resource?: string;
|
|
130
|
+
scope?: string;
|
|
131
|
+
};
|
|
132
|
+
export type OAuthTokens = {
|
|
133
|
+
ok: true;
|
|
134
|
+
accessToken: string;
|
|
135
|
+
refreshToken: string;
|
|
136
|
+
tokenType: "Bearer";
|
|
137
|
+
expiresIn: number;
|
|
138
|
+
scope: string;
|
|
139
|
+
};
|
|
140
|
+
/** What the backend's code exchange or refresh decided; the host adds the token strings. */
|
|
141
|
+
export type OAuthGrantResult = {
|
|
142
|
+
ok: true;
|
|
143
|
+
scopes: string[];
|
|
144
|
+
resource: string;
|
|
145
|
+
accessExpiresAt: number;
|
|
146
|
+
} | {
|
|
147
|
+
ok: false;
|
|
148
|
+
error: "invalid_grant" | "invalid_scope";
|
|
149
|
+
description: string;
|
|
150
|
+
};
|
|
151
|
+
export type OAuthRevokeRequest = {
|
|
152
|
+
token: string;
|
|
153
|
+
clientId: string;
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* The tenant `columnus/mcpOAuth` functions the Web BFF's OAuth endpoints call.
|
|
157
|
+
* The host's `registerMcpOAuth` is checked against this at compile time.
|
|
158
|
+
*/
|
|
159
|
+
export type McpOAuthFacade = {
|
|
160
|
+
oauthRegisterClient: {
|
|
161
|
+
type: "mutation";
|
|
162
|
+
args: OAuthRegisterClientRequest;
|
|
163
|
+
returns: OAuthRegistration | OAuthFailure;
|
|
164
|
+
};
|
|
165
|
+
oauthAuthorize: {
|
|
166
|
+
type: "mutation";
|
|
167
|
+
args: OAuthAuthorizeRequest;
|
|
168
|
+
returns: OAuthAuthorizeResult;
|
|
169
|
+
};
|
|
170
|
+
oauthToken: {
|
|
171
|
+
type: "mutation";
|
|
172
|
+
args: OAuthTokenRequest;
|
|
173
|
+
returns: OAuthTokens | OAuthFailure;
|
|
174
|
+
};
|
|
175
|
+
/** Null once revoked, unknown tokens included (RFC 7009). */
|
|
176
|
+
oauthRevoke: {
|
|
177
|
+
type: "mutation";
|
|
178
|
+
args: OAuthRevokeRequest;
|
|
179
|
+
returns: null;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
export type McpOAuthFacadeApi = FacadeApi<McpOAuthFacade>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where to send a session that has just signed in.
|
|
3
|
+
*
|
|
4
|
+
* Both front ends bounce an unauthenticated visitor to `/login?next=<where
|
|
5
|
+
* they were>` and follow `next` once the code checks out. That parameter
|
|
6
|
+
* arrives from the URL, so it is attacker-controllable through a crafted link
|
|
7
|
+
* — and it is obeyed at the exact moment the session becomes worth stealing.
|
|
8
|
+
* Anything that is not a path on this origin is refused.
|
|
9
|
+
*
|
|
10
|
+
* Shared rather than per-app on purpose: this existed in the control plane
|
|
11
|
+
* only, and Studio spent that time following `next` unchecked.
|
|
12
|
+
*/
|
|
13
|
+
/** Allow only same-app relative paths after login. */
|
|
14
|
+
export declare function safePostLoginPath(raw: string | null | undefined, fallback?: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* The whole post-login decision, from the login page's own query string.
|
|
17
|
+
*
|
|
18
|
+
* Takes `window.location.search` rather than a pre-extracted `next` so that no
|
|
19
|
+
* call site is left holding a raw parameter it could forget to check.
|
|
20
|
+
*/
|
|
21
|
+
export declare function postLoginRedirectPath(search: string, fallback?: string): string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Canonical Kubernetes preview PR identity (matches columnus-pr-N namespaces). */
|
|
2
|
+
export declare const PREVIEW_PR_ID_RE: RegExp;
|
|
3
|
+
export declare const PREVIEW_TENANT_SLUG_PREFIX = "preview-";
|
|
4
|
+
export declare function isPreviewTenantSlug(slug: string): boolean;
|
|
5
|
+
/** Explicit application origin used by CI and runtime preview routing. */
|
|
6
|
+
export declare function previewHostnameFromEnv(env?: NodeJS.ProcessEnv): string | null;
|
|
7
|
+
/** Browser origin for server-side auth probes; never use a Convex HTTP endpoint. */
|
|
8
|
+
export declare function resolveTrustedAuthOrigin(env?: NodeJS.ProcessEnv): string | undefined;
|
|
9
|
+
/** CI_PREVIEW is the local build mode; COLUMNUS_PREVIEW identifies deployed previews. */
|
|
10
|
+
export declare function isCiPreviewBuild(env?: NodeJS.ProcessEnv): boolean;
|
|
11
|
+
/** PR id from `preview-<n>.<domain>` / `manage-preview-<n>` hostname or `pull/<n>/head` branch. */
|
|
12
|
+
export declare function resolvePreviewPrId(env?: NodeJS.ProcessEnv): string | null;
|
|
13
|
+
/** Resolve the CI git branch used for Convex preview deployment naming. */
|
|
14
|
+
export declare function resolvePreviewBranch(env?: NodeJS.ProcessEnv): string | null;
|
|
15
|
+
export declare function sanitizePreviewDeployName(branch: string): string;
|
|
16
|
+
/** Normalize a preview name from Convex env before `convex deploy --preview-name`. */
|
|
17
|
+
export declare function normalizePreviewDeployName(name: string): string;
|
|
18
|
+
/** Identifier rule shared by CI configuration and Management registration. */
|
|
19
|
+
export declare const PREVIEW_DEPLOY_NAME_RE: RegExp;
|
|
20
|
+
/** Explicit CI identity, including hostless Management builds. */
|
|
21
|
+
export declare function explicitPreviewDeployName(env?: NodeJS.ProcessEnv): string | null;
|
|
22
|
+
export declare function ciPreviewDeployName(env?: NodeJS.ProcessEnv): string | null;
|
|
23
|
+
/** Stale failures from broken preview deploy before the bridge was live. */
|
|
24
|
+
export declare const STALE_ENDPOINT_DEPLOY_ERROR: RegExp;
|
|
25
|
+
export declare function isStaleEndpointDeployError(error: string | undefined): boolean;
|
|
26
|
+
/** Infra failures from a prior broken deploy that a fresh save can retry. */
|
|
27
|
+
export declare function isRecoverableDeployError(error: string | undefined): boolean;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plan 082 S4: the pure shared-draft merge, used by the CMS (local draft
|
|
3
|
+
* state) and the backend's transactional delta save.
|
|
4
|
+
*
|
|
5
|
+
* One effective operation per row: updates merge into inserts and updates,
|
|
6
|
+
* deleting a provisional insert cancels it, and explicit clears travel as
|
|
7
|
+
* `clearFields` (setting a field un-clears it). A row's original baseline and
|
|
8
|
+
* native provenance survive merges and operation changes; only removing the
|
|
9
|
+
* row's operation (cancellation or explicit discard) drops them.
|
|
10
|
+
*/
|
|
11
|
+
export type DraftMergePatch = {
|
|
12
|
+
table: string;
|
|
13
|
+
rowId: string;
|
|
14
|
+
op: "insert" | "update" | "delete";
|
|
15
|
+
fields: Record<string, unknown>;
|
|
16
|
+
/** Optional fields an update removes. */
|
|
17
|
+
clearFields?: string[];
|
|
18
|
+
/** Live values the row's fields were drafted against (kept from the first save). */
|
|
19
|
+
baseFields?: Record<string, unknown> | null;
|
|
20
|
+
/** Native authorization provenance; never dropped by a CMS merge. */
|
|
21
|
+
nativeScope?: "token" | "editor";
|
|
22
|
+
};
|
|
23
|
+
export declare function draftRowKey(patch: Pick<DraftMergePatch, "table" | "rowId">): string;
|
|
24
|
+
/** Merge `delta` into `existing`, keeping existing row order and appending new rows. */
|
|
25
|
+
export declare function mergeDraftPatches(existing: readonly DraftMergePatch[], delta: readonly DraftMergePatch[]): DraftMergePatch[];
|
|
26
|
+
/** A row's operation to drop from a draft, or with `fields` only those fields of an update. */
|
|
27
|
+
export type DraftDiscard = Pick<DraftMergePatch, "table" | "rowId"> & {
|
|
28
|
+
fields?: readonly string[];
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Drop discarded rows, or the named fields of an update with their baselines
|
|
32
|
+
* and clears (an update left with nothing drops). New and deleted rows only
|
|
33
|
+
* drop whole.
|
|
34
|
+
*/
|
|
35
|
+
export declare function discardFromDraft(patches: readonly DraftMergePatch[], discard: readonly DraftDiscard[]): DraftMergePatch[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type ProposalOperation = "insert" | "update" | "delete";
|
|
2
|
+
export type ProposalAccess = {
|
|
3
|
+
table: string;
|
|
4
|
+
ops: Record<ProposalOperation, boolean>;
|
|
5
|
+
recordIds?: string[];
|
|
6
|
+
allowedFields?: string[];
|
|
7
|
+
};
|
|
8
|
+
export type ProposalTarget = {
|
|
9
|
+
table: string;
|
|
10
|
+
operation: ProposalOperation;
|
|
11
|
+
rowId?: string;
|
|
12
|
+
fields?: string[];
|
|
13
|
+
};
|
|
14
|
+
/** Enforce the proposal rules shared by API profiles and share scopes. */
|
|
15
|
+
export declare function assertProposalAccess(accesses: readonly ProposalAccess[], target: ProposalTarget): ProposalAccess;
|
|
16
|
+
/** Strip system and disallowed fields before persisting a proposal patch. */
|
|
17
|
+
export declare function pickProposalFields(fields: Record<string, unknown>, allowedFields?: string[]): Record<string, unknown>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type ProposeRateLimitKind = "api_token" | "share_invite" | "public_form" | "client_key"
|
|
2
|
+
/** Plan 082 S5: open OAuth client registration, tenant-wide. */
|
|
3
|
+
| "oauth_register";
|
|
4
|
+
export type ProposeRateLimitConfig = {
|
|
5
|
+
max: number;
|
|
6
|
+
windowMs: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const DEFAULT_PROPOSE_RATE_LIMITS: Record<ProposeRateLimitKind, ProposeRateLimitConfig>;
|
|
9
|
+
export declare function parseProposeRateLimitInt(raw: string | undefined, fallback: number): number;
|
|
10
|
+
export declare function proposeRateLimitBucket(kind: ProposeRateLimitKind, id: string): string;
|
|
11
|
+
export type SlidingWindowState = {
|
|
12
|
+
hits: number[];
|
|
13
|
+
};
|
|
14
|
+
export type RateLimitCheckResult = {
|
|
15
|
+
allowed: true;
|
|
16
|
+
next: SlidingWindowState;
|
|
17
|
+
} | {
|
|
18
|
+
allowed: false;
|
|
19
|
+
retryAfterMs: number;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Sliding-window counter: prune stale hits, reject when `cost` more hits would
|
|
23
|
+
* exceed capacity. A batch submission costs one hit per operation.
|
|
24
|
+
*/
|
|
25
|
+
export declare function checkSlidingWindowRateLimit(state: SlidingWindowState, now: number, config: ProposeRateLimitConfig, cost?: number): RateLimitCheckResult;
|
|
26
|
+
export declare const PROPOSE_RATE_LIMITED_CODE: "propose_rate_limited";
|
|
27
|
+
export declare function proposeRateLimitedMessage(retryAfterMs: number): string;
|