@object-ui/app-shell 6.2.3 → 7.0.0
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/CHANGELOG.md +948 -0
- package/README.md +292 -0
- package/dist/assistant/assistantBus.d.ts +72 -0
- package/dist/assistant/assistantBus.js +133 -0
- package/dist/chrome/CommandPalette.d.ts +1 -1
- package/dist/chrome/CommandPalette.js +26 -22
- package/dist/chrome/ConditionalAuthWrapper.d.ts +1 -1
- package/dist/chrome/ConsoleToaster.d.ts +1 -1
- package/dist/chrome/ConsoleToaster.js +3 -1
- package/dist/chrome/ErrorBoundary.d.ts +1 -1
- package/dist/chrome/KeyboardShortcutsDialog.d.ts +1 -1
- package/dist/chrome/KeyboardShortcutsDialog.js +16 -5
- package/dist/chrome/LoadingScreen.d.ts +1 -1
- package/dist/chrome/LoadingScreen.js +22 -26
- package/dist/chrome/RouteFader.d.ts +1 -1
- package/dist/chrome/ThemeProvider.d.ts +1 -1
- package/dist/components/ManagedByBadge.d.ts +1 -1
- package/dist/console/AppContent.d.ts +1 -1
- package/dist/console/AppContent.js +170 -37
- package/dist/console/ConsoleShell.d.ts +7 -7
- package/dist/console/ConsoleShell.js +32 -3
- package/dist/console/ai/AiChatPage.d.ts +88 -1
- package/dist/console/ai/AiChatPage.js +743 -66
- package/dist/console/ai/ConversationsSidebar.d.ts +26 -1
- package/dist/console/ai/ConversationsSidebar.js +149 -34
- package/dist/console/ai/LiveCanvas.d.ts +22 -0
- package/dist/console/ai/LiveCanvas.js +78 -0
- package/dist/console/ai/reconcileTurn.d.ts +8 -0
- package/dist/console/ai/reconcileTurn.js +20 -0
- package/dist/console/auth/AuthPageLayout.d.ts +1 -1
- package/dist/console/auth/ForgotPasswordPage.d.ts +1 -1
- package/dist/console/auth/LoginPage.d.ts +1 -1
- package/dist/console/auth/RegisterPage.d.ts +1 -1
- package/dist/console/auth/RegisterPage.js +23 -3
- package/dist/console/cloud-connection/CloudConnectionPanel.d.ts +1 -0
- package/dist/console/cloud-connection/CloudConnectionPanel.js +169 -0
- package/dist/console/home/AppCard.d.ts +1 -1
- package/dist/console/home/AppCard.js +6 -12
- package/dist/console/home/HomeAppsStrip.d.ts +8 -0
- package/dist/console/home/HomeAppsStrip.js +61 -0
- package/dist/console/home/HomeLayout.d.ts +1 -1
- package/dist/console/home/HomeLayout.js +3 -1
- package/dist/console/home/HomePage.d.ts +1 -2
- package/dist/console/home/HomePage.js +149 -21
- package/dist/console/home/HomeRail.d.ts +22 -0
- package/dist/console/home/HomeRail.js +62 -0
- package/dist/console/home/QuickActions.d.ts +1 -1
- package/dist/console/home/QuickActions.js +3 -11
- package/dist/console/home/RecentApps.d.ts +1 -1
- package/dist/console/home/RecentApps.js +2 -2
- package/dist/console/home/StarredApps.d.ts +1 -1
- package/dist/console/home/StarredApps.js +2 -2
- package/dist/console/marketplace/InstalledListWidget.d.ts +1 -0
- package/dist/console/marketplace/InstalledListWidget.js +93 -0
- package/dist/console/marketplace/MarkdownText.d.ts +1 -1
- package/dist/console/marketplace/MarketplaceAccessDenied.d.ts +1 -1
- package/dist/console/marketplace/MarketplaceInstalledPage.d.ts +8 -14
- package/dist/console/marketplace/MarketplaceInstalledPage.js +14 -66
- package/dist/console/marketplace/MarketplacePackagePage.d.ts +1 -1
- package/dist/console/marketplace/MarketplacePackagePage.js +249 -8
- package/dist/console/marketplace/MarketplacePage.d.ts +1 -1
- package/dist/console/marketplace/MarketplacePage.js +60 -3
- package/dist/console/marketplace/PackageIcon.d.ts +1 -1
- package/dist/console/marketplace/PluginDisclosure.d.ts +14 -0
- package/dist/console/marketplace/PluginDisclosure.js +38 -0
- package/dist/console/marketplace/marketplaceApi.d.ts +123 -0
- package/dist/console/marketplace/marketplaceApi.js +254 -1
- package/dist/console/organizations/CreateWorkspaceDialog.d.ts +1 -1
- package/dist/console/organizations/OrganizationsLayout.d.ts +1 -1
- package/dist/console/organizations/OrganizationsPage.d.ts +1 -1
- package/dist/console/organizations/manage/AcceptInvitationPage.d.ts +1 -1
- package/dist/console/organizations/manage/InvitationsPage.d.ts +1 -1
- package/dist/console/organizations/manage/InviteMemberDialog.d.ts +1 -1
- package/dist/console/organizations/manage/MembersPage.d.ts +1 -1
- package/dist/console/organizations/manage/OrganizationLayout.d.ts +1 -1
- package/dist/console/organizations/manage/SettingsPage.d.ts +1 -1
- package/dist/context/CommandPaletteProvider.d.ts +44 -0
- package/dist/context/CommandPaletteProvider.js +71 -0
- package/dist/context/FavoritesProvider.d.ts +1 -1
- package/dist/context/NavigationContext.d.ts +1 -1
- package/dist/context/RecentItemsProvider.d.ts +2 -2
- package/dist/context/UserStateAdapters.d.ts +1 -1
- package/dist/context/index.d.ts +2 -0
- package/dist/context/index.js +1 -0
- package/dist/hooks/index.d.ts +5 -2
- package/dist/hooks/index.js +4 -1
- package/dist/hooks/useActionModal.d.ts +53 -0
- package/dist/hooks/useActionModal.js +111 -0
- package/dist/hooks/useChatConversation.d.ts +107 -4
- package/dist/hooks/useChatConversation.js +253 -25
- package/dist/hooks/useConsoleActionRuntime.d.ts +70 -0
- package/dist/hooks/useConsoleActionRuntime.js +560 -0
- package/dist/hooks/useConversationList.js +61 -3
- package/dist/hooks/useHomeInbox.d.ts +13 -0
- package/dist/hooks/useHomeInbox.js +142 -0
- package/dist/hooks/useNavPins.js +17 -23
- package/dist/hooks/useNavigationSync.d.ts +33 -0
- package/dist/hooks/useNavigationSync.js +98 -12
- package/dist/hooks/useReconcileOnError.d.ts +40 -0
- package/dist/hooks/useReconcileOnError.js +37 -0
- package/dist/hooks/useRecordApprovals.d.ts +18 -19
- package/dist/hooks/useRecordApprovals.js +24 -40
- package/dist/hooks/useResponsiveSidebar.js +14 -5
- package/dist/hooks/useSettleSignal.d.ts +19 -0
- package/dist/hooks/useSettleSignal.js +20 -0
- package/dist/hooks/useTrackRouteAsRecent.js +35 -0
- package/dist/hooks/useUrlOverlay.d.ts +62 -0
- package/dist/hooks/useUrlOverlay.js +88 -0
- package/dist/index.d.ts +16 -7
- package/dist/index.js +12 -4
- package/dist/layout/ActivityFeed.d.ts +1 -1
- package/dist/layout/AppHeader.d.ts +3 -2
- package/dist/layout/AppHeader.js +237 -72
- package/dist/layout/AppSidebar.d.ts +2 -1
- package/dist/layout/AppSidebar.js +26 -46
- package/dist/layout/AppSwitcher.d.ts +2 -1
- package/dist/layout/AppSwitcher.js +9 -5
- package/dist/layout/AuthPageLayout.d.ts +1 -1
- package/dist/layout/ConnectionStatus.d.ts +1 -1
- package/dist/layout/ConnectionStatus.js +9 -6
- package/dist/layout/ConsoleChatbotFab.d.ts +19 -1
- package/dist/layout/ConsoleChatbotFab.js +16 -2
- package/dist/layout/ConsoleFloatingChatbot.d.ts +32 -2
- package/dist/layout/ConsoleFloatingChatbot.js +374 -41
- package/dist/layout/ConsoleLayout.d.ts +1 -1
- package/dist/layout/ConsoleLayout.js +27 -11
- package/dist/layout/ContextSelectors.d.ts +44 -0
- package/dist/layout/ContextSelectors.js +218 -0
- package/dist/layout/InboxPopover.d.ts +6 -1
- package/dist/layout/InboxPopover.js +25 -6
- package/dist/layout/LocaleSwitcher.d.ts +1 -1
- package/dist/layout/LocalizedSidebarTrigger.d.ts +2 -0
- package/dist/layout/LocalizedSidebarTrigger.js +15 -0
- package/dist/layout/MobileViewSwitcherContext.d.ts +1 -1
- package/dist/layout/ModeToggle.d.ts +1 -1
- package/dist/layout/PageHeader.d.ts +1 -1
- package/dist/layout/UnifiedSidebar.d.ts +2 -1
- package/dist/layout/UnifiedSidebar.js +116 -15
- package/dist/observability/index.d.ts +1 -0
- package/dist/observability/index.js +1 -0
- package/dist/observability/settleSignal.d.ts +64 -0
- package/dist/observability/settleSignal.js +131 -0
- package/dist/preview/DraftChangesPanel.d.ts +19 -0
- package/dist/preview/DraftChangesPanel.js +114 -0
- package/dist/preview/DraftPreviewBar.d.ts +8 -0
- package/dist/preview/DraftPreviewBar.js +86 -0
- package/dist/preview/PreviewDraftEmptyState.d.ts +16 -0
- package/dist/preview/PreviewDraftEmptyState.js +47 -0
- package/dist/preview/PreviewModeContext.d.ts +57 -0
- package/dist/preview/PreviewModeContext.js +99 -0
- package/dist/preview/UnpublishedAppBar.d.ts +8 -0
- package/dist/preview/UnpublishedAppBar.js +79 -0
- package/dist/preview/draftStatus.d.ts +20 -0
- package/dist/preview/draftStatus.js +27 -0
- package/dist/preview/usePublishAllDrafts.d.ts +18 -0
- package/dist/preview/usePublishAllDrafts.js +106 -0
- package/dist/providers/AdapterProvider.d.ts +1 -1
- package/dist/providers/AdapterProvider.js +6 -1
- package/dist/providers/ExpressionProvider.d.ts +1 -1
- package/dist/providers/MetadataProvider.d.ts +17 -2
- package/dist/providers/MetadataProvider.js +183 -12
- package/dist/runtime-config.d.ts +46 -2
- package/dist/runtime-config.js +39 -2
- package/dist/services/builtinComponents.js +68 -59
- package/dist/skeletons/SkeletonDashboard.d.ts +1 -1
- package/dist/skeletons/SkeletonDetail.d.ts +1 -1
- package/dist/skeletons/SkeletonGrid.d.ts +1 -1
- package/dist/utils/appRoute.d.ts +21 -0
- package/dist/utils/appRoute.js +25 -0
- package/dist/utils/deriveRelatedLists.d.ts +54 -0
- package/dist/utils/deriveRelatedLists.js +91 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/managedByEmptyState.d.ts +8 -1
- package/dist/utils/managedByEmptyState.js +13 -7
- package/dist/utils/preferLocal.d.ts +18 -0
- package/dist/utils/preferLocal.js +24 -0
- package/dist/views/ActionConfirmDialog.d.ts +1 -1
- package/dist/views/ActionConfirmDialog.js +3 -1
- package/dist/views/ActionParamDialog.d.ts +6 -1
- package/dist/views/ActionParamDialog.js +9 -3
- package/dist/views/ActionResultDialog.d.ts +13 -0
- package/dist/views/ActionResultDialog.js +134 -0
- package/dist/views/ComponentNavView.d.ts +14 -1
- package/dist/views/CreateViewDialog.d.ts +1 -1
- package/dist/views/DashboardConfigPanel.d.ts +28 -0
- package/dist/views/DashboardConfigPanel.js +81 -0
- package/dist/views/DashboardView.d.ts +4 -3
- package/dist/views/DashboardView.js +38 -239
- package/dist/views/FlowRunner.d.ts +59 -0
- package/dist/views/FlowRunner.js +153 -0
- package/dist/views/InterfaceListPage.d.ts +49 -0
- package/dist/views/InterfaceListPage.js +347 -0
- package/dist/views/MetadataInspector.d.ts +2 -2
- package/dist/views/ObjectView.d.ts +1 -1
- package/dist/views/ObjectView.js +209 -532
- package/dist/views/PageView.d.ts +8 -3
- package/dist/views/PageView.js +45 -32
- package/dist/views/RecordDetailView.d.ts +1 -1
- package/dist/views/RecordDetailView.js +363 -148
- package/dist/views/RecordFormPage.d.ts +1 -1
- package/dist/views/RecordFormPage.js +26 -1
- package/dist/views/ReportConfigPanel.d.ts +37 -0
- package/dist/views/ReportConfigPanel.js +85 -0
- package/dist/views/ReportView.d.ts +1 -1
- package/dist/views/ReportView.js +116 -7
- package/dist/views/RuntimeDraftBar.d.ts +30 -0
- package/dist/views/RuntimeDraftBar.js +112 -0
- package/dist/views/SearchResultsPage.d.ts +1 -1
- package/dist/views/SearchResultsPage.js +8 -18
- package/dist/views/ViewConfigPanel.d.ts +24 -17
- package/dist/views/ViewConfigPanel.js +121 -77
- package/dist/views/index.d.ts +1 -1
- package/dist/views/index.js +1 -1
- package/dist/views/metadata-admin/AuditPanel.d.ts +28 -0
- package/dist/views/metadata-admin/AuditPanel.js +79 -0
- package/dist/views/metadata-admin/DiagnosticsPage.d.ts +20 -0
- package/dist/views/metadata-admin/DiagnosticsPage.js +69 -0
- package/dist/views/metadata-admin/DirectoryPage.d.ts +16 -1
- package/dist/views/metadata-admin/DirectoryPage.js +113 -24
- package/dist/views/metadata-admin/DraftReviewPanel.d.ts +33 -0
- package/dist/views/metadata-admin/DraftReviewPanel.js +77 -0
- package/dist/views/metadata-admin/EmbeddedItemEditor.d.ts +17 -1
- package/dist/views/metadata-admin/EmbeddedItemEditor.js +15 -8
- package/dist/views/metadata-admin/JsonSourceEditor.d.ts +37 -0
- package/dist/views/metadata-admin/JsonSourceEditor.js +178 -0
- package/dist/views/metadata-admin/LayeredDiff.d.ts +39 -1
- package/dist/views/metadata-admin/LayeredDiff.js +171 -5
- package/dist/views/metadata-admin/MetadataDetailDrawer.d.ts +15 -1
- package/dist/views/metadata-admin/MetadataTypeActions.d.ts +48 -0
- package/dist/views/metadata-admin/MetadataTypeActions.js +165 -0
- package/dist/views/metadata-admin/PackagesPage.d.ts +18 -0
- package/dist/views/metadata-admin/PackagesPage.js +395 -0
- package/dist/views/metadata-admin/PageShell.d.ts +1 -1
- package/dist/views/metadata-admin/PageShell.js +9 -4
- package/dist/views/metadata-admin/PermissionMatrixEditor.d.ts +35 -1
- package/dist/views/metadata-admin/QuickFind.d.ts +21 -1
- package/dist/views/metadata-admin/QuickFind.js +6 -3
- package/dist/views/metadata-admin/RelatedPanel.d.ts +24 -1
- package/dist/views/metadata-admin/RelatedPanel.js +20 -18
- package/dist/views/metadata-admin/ResourceEditPage.d.ts +40 -1
- package/dist/views/metadata-admin/ResourceEditPage.js +1223 -60
- package/dist/views/metadata-admin/ResourceHistoryPage.d.ts +39 -1
- package/dist/views/metadata-admin/ResourceHistoryPage.js +66 -16
- package/dist/views/metadata-admin/ResourceListPage.d.ts +13 -1
- package/dist/views/metadata-admin/ResourceListPage.js +266 -30
- package/dist/views/metadata-admin/ResourceRouter.d.ts +23 -1
- package/dist/views/metadata-admin/SchemaForm.d.ts +34 -1
- package/dist/views/metadata-admin/SchemaForm.js +559 -49
- package/dist/views/metadata-admin/StudioHomePage.d.ts +22 -0
- package/dist/views/metadata-admin/StudioHomePage.js +213 -0
- package/dist/views/metadata-admin/anchors.js +237 -24
- package/dist/views/metadata-admin/clientValidation.d.ts +50 -0
- package/dist/views/metadata-admin/clientValidation.js +169 -0
- package/dist/views/metadata-admin/color-variant-field.d.ts +30 -0
- package/dist/views/metadata-admin/color-variant-field.js +38 -0
- package/dist/views/metadata-admin/createDerive.d.ts +75 -0
- package/dist/views/metadata-admin/createDerive.js +179 -0
- package/dist/views/metadata-admin/dashboard-schema.d.ts +12 -0
- package/dist/views/metadata-admin/dashboard-schema.js +80 -0
- package/dist/views/metadata-admin/datasource/DatasourceResourcePage.d.ts +35 -0
- package/dist/views/metadata-admin/datasource/DatasourceResourcePage.js +327 -0
- package/dist/views/metadata-admin/datasource/register.d.ts +1 -0
- package/dist/views/metadata-admin/datasource/register.js +24 -0
- package/dist/views/metadata-admin/default-inspector-registry.d.ts +49 -0
- package/dist/views/metadata-admin/default-inspector-registry.js +8 -0
- package/dist/views/metadata-admin/default-schemas.js +115 -10
- package/dist/views/metadata-admin/external/ExternalDatasourcePanel.d.ts +27 -0
- package/dist/views/metadata-admin/external/ExternalDatasourcePanel.js +69 -0
- package/dist/views/metadata-admin/external/ImportObjectDialog.d.ts +27 -0
- package/dist/views/metadata-admin/external/ImportObjectDialog.js +77 -0
- package/dist/views/metadata-admin/external/SchemaBrowser.d.ts +16 -0
- package/dist/views/metadata-admin/external/SchemaBrowser.js +74 -0
- package/dist/views/metadata-admin/external/ValidationPanel.d.ts +16 -0
- package/dist/views/metadata-admin/external/ValidationPanel.js +68 -0
- package/dist/views/metadata-admin/external/api.d.ts +100 -0
- package/dist/views/metadata-admin/external/api.js +124 -0
- package/dist/views/metadata-admin/i18n.d.ts +1 -0
- package/dist/views/metadata-admin/i18n.js +1166 -2
- package/dist/views/metadata-admin/index.d.ts +8 -5
- package/dist/views/metadata-admin/index.js +12 -2
- package/dist/views/metadata-admin/inspector-registry.d.ts +51 -0
- package/dist/views/metadata-admin/inspector-registry.js +11 -0
- package/dist/views/metadata-admin/inspectors/ActionDefaultInspector.d.ts +30 -0
- package/dist/views/metadata-admin/inspectors/ActionDefaultInspector.js +180 -0
- package/dist/views/metadata-admin/inspectors/AppNavInspector.d.ts +16 -0
- package/dist/views/metadata-admin/inspectors/AppNavInspector.js +110 -0
- package/dist/views/metadata-admin/inspectors/ConditionBuilder.d.ts +29 -0
- package/dist/views/metadata-admin/inspectors/ConditionBuilder.js +154 -0
- package/dist/views/metadata-admin/inspectors/DashboardDefaultInspector.d.ts +28 -0
- package/dist/views/metadata-admin/inspectors/DashboardDefaultInspector.js +110 -0
- package/dist/views/metadata-admin/inspectors/DashboardWidgetInspector.d.ts +18 -0
- package/dist/views/metadata-admin/inspectors/DashboardWidgetInspector.js +139 -0
- package/dist/views/metadata-admin/inspectors/DatasetDefaultInspector.d.ts +21 -0
- package/dist/views/metadata-admin/inspectors/DatasetDefaultInspector.js +107 -0
- package/dist/views/metadata-admin/inspectors/FlowEdgeInspector.d.ts +16 -0
- package/dist/views/metadata-admin/inspectors/FlowEdgeInspector.js +45 -0
- package/dist/views/metadata-admin/inspectors/FlowInspector.d.ts +12 -0
- package/dist/views/metadata-admin/inspectors/FlowInspector.js +9 -0
- package/dist/views/metadata-admin/inspectors/FlowKeyValueField.d.ts +30 -0
- package/dist/views/metadata-admin/inspectors/FlowKeyValueField.js +125 -0
- package/dist/views/metadata-admin/inspectors/FlowNodeConfigField.d.ts +18 -0
- package/dist/views/metadata-admin/inspectors/FlowNodeConfigField.js +40 -0
- package/dist/views/metadata-admin/inspectors/FlowNodeInspector.d.ts +14 -0
- package/dist/views/metadata-admin/inspectors/FlowNodeInspector.js +140 -0
- package/dist/views/metadata-admin/inspectors/FlowObjectListField.d.ts +26 -0
- package/dist/views/metadata-admin/inspectors/FlowObjectListField.js +105 -0
- package/dist/views/metadata-admin/inspectors/FlowReferenceField.d.ts +83 -0
- package/dist/views/metadata-admin/inspectors/FlowReferenceField.js +181 -0
- package/dist/views/metadata-admin/inspectors/FlowStringListField.d.ts +21 -0
- package/dist/views/metadata-admin/inspectors/FlowStringListField.js +60 -0
- package/dist/views/metadata-admin/inspectors/InspectorComboField.d.ts +40 -0
- package/dist/views/metadata-admin/inspectors/InspectorComboField.js +61 -0
- package/dist/views/metadata-admin/inspectors/ObjectDefaultInspector.d.ts +21 -0
- package/dist/views/metadata-admin/inspectors/ObjectDefaultInspector.js +54 -0
- package/dist/views/metadata-admin/inspectors/ObjectFieldInspector.d.ts +23 -0
- package/dist/views/metadata-admin/inspectors/ObjectFieldInspector.js +330 -0
- package/dist/views/metadata-admin/inspectors/PageBlockInspector.d.ts +48 -0
- package/dist/views/metadata-admin/inspectors/PageBlockInspector.js +332 -0
- package/dist/views/metadata-admin/inspectors/ReportDefaultInspector.d.ts +58 -0
- package/dist/views/metadata-admin/inspectors/ReportDefaultInspector.js +160 -0
- package/dist/views/metadata-admin/inspectors/ViewColumnInspector.d.ts +19 -0
- package/dist/views/metadata-admin/inspectors/ViewColumnInspector.js +144 -0
- package/dist/views/metadata-admin/inspectors/ViewInspector.d.ts +19 -0
- package/dist/views/metadata-admin/inspectors/ViewInspector.js +21 -0
- package/dist/views/metadata-admin/inspectors/ViewVariantInspector.d.ts +54 -0
- package/dist/views/metadata-admin/inspectors/ViewVariantInspector.js +191 -0
- package/dist/views/metadata-admin/inspectors/_shared.d.ts +124 -0
- package/dist/views/metadata-admin/inspectors/_shared.js +113 -0
- package/dist/views/metadata-admin/inspectors/expression-validate.d.ts +26 -0
- package/dist/views/metadata-admin/inspectors/expression-validate.js +66 -0
- package/dist/views/metadata-admin/inspectors/flow-node-config.d.ts +143 -0
- package/dist/views/metadata-admin/inspectors/flow-node-config.js +461 -0
- package/dist/views/metadata-admin/inspectors/index.d.ts +1 -0
- package/dist/views/metadata-admin/inspectors/index.js +45 -0
- package/dist/views/metadata-admin/inspectors/json-schema-to-fields.d.ts +40 -0
- package/dist/views/metadata-admin/inspectors/json-schema-to-fields.js +227 -0
- package/dist/views/metadata-admin/inspectors/useDatasetFields.d.ts +72 -0
- package/dist/views/metadata-admin/inspectors/useDatasetFields.js +0 -0
- package/dist/views/metadata-admin/mergeServerFields.d.ts +65 -0
- package/dist/views/metadata-admin/mergeServerFields.js +56 -0
- package/dist/views/metadata-admin/preview-registry.d.ts +55 -0
- package/dist/views/metadata-admin/previews/ActionPreview.d.ts +25 -0
- package/dist/views/metadata-admin/previews/ActionPreview.js +238 -0
- package/dist/views/metadata-admin/previews/AddWidgetPicker.d.ts +12 -0
- package/dist/views/metadata-admin/previews/AddWidgetPicker.js +56 -0
- package/dist/views/metadata-admin/previews/AgentPreview.d.ts +24 -0
- package/dist/views/metadata-admin/previews/AgentPreview.js +100 -0
- package/dist/views/metadata-admin/previews/AppNavCanvas.d.ts +31 -0
- package/dist/views/metadata-admin/previews/AppNavCanvas.js +260 -0
- package/dist/views/metadata-admin/previews/AppPreview.d.ts +16 -1
- package/dist/views/metadata-admin/previews/AppPreview.js +23 -14
- package/dist/views/metadata-admin/previews/BookPreview.d.ts +20 -0
- package/dist/views/metadata-admin/previews/BookPreview.js +132 -0
- package/dist/views/metadata-admin/previews/DashboardPreview.d.ts +16 -1
- package/dist/views/metadata-admin/previews/DashboardPreview.js +110 -8
- package/dist/views/metadata-admin/previews/DatasetPreview.d.ts +18 -0
- package/dist/views/metadata-admin/previews/DatasetPreview.js +89 -0
- package/dist/views/metadata-admin/previews/DatasourcePreview.d.ts +23 -0
- package/dist/views/metadata-admin/previews/DatasourcePreview.js +68 -0
- package/dist/views/metadata-admin/previews/EmailTemplatePreview.d.ts +14 -1
- package/dist/views/metadata-admin/previews/FieldStub.d.ts +30 -0
- package/dist/views/metadata-admin/previews/FieldStub.js +104 -0
- package/dist/views/metadata-admin/previews/FieldsListEditor.d.ts +50 -0
- package/dist/views/metadata-admin/previews/FieldsListEditor.js +97 -0
- package/dist/views/metadata-admin/previews/FlowCanvas.d.ts +43 -0
- package/dist/views/metadata-admin/previews/FlowCanvas.js +328 -0
- package/dist/views/metadata-admin/previews/FlowPreview.d.ts +20 -0
- package/dist/views/metadata-admin/previews/FlowPreview.js +92 -0
- package/dist/views/metadata-admin/previews/FlowRunsPanel.d.ts +46 -0
- package/dist/views/metadata-admin/previews/FlowRunsPanel.js +97 -0
- package/dist/views/metadata-admin/previews/FlowSimulatorPanel.d.ts +25 -0
- package/dist/views/metadata-admin/previews/FlowSimulatorPanel.js +170 -0
- package/dist/views/metadata-admin/previews/JobPreview.d.ts +28 -0
- package/dist/views/metadata-admin/previews/JobPreview.js +290 -0
- package/dist/views/metadata-admin/previews/ObjectFormCanvas.d.ts +30 -0
- package/dist/views/metadata-admin/previews/ObjectFormCanvas.js +547 -0
- package/dist/views/metadata-admin/previews/ObjectPreview.d.ts +14 -1
- package/dist/views/metadata-admin/previews/ObjectPreview.js +5 -30
- package/dist/views/metadata-admin/previews/OutlineStrip.d.ts +32 -0
- package/dist/views/metadata-admin/previews/OutlineStrip.js +8 -0
- package/dist/views/metadata-admin/previews/PageBlockCanvas.d.ts +49 -0
- package/dist/views/metadata-admin/previews/PageBlockCanvas.js +510 -0
- package/dist/views/metadata-admin/previews/PagePreview.d.ts +10 -1
- package/dist/views/metadata-admin/previews/PagePreview.js +90 -4
- package/dist/views/metadata-admin/previews/PermissionPreview.d.ts +27 -0
- package/dist/views/metadata-admin/previews/PermissionPreview.js +115 -0
- package/dist/views/metadata-admin/previews/PreviewShell.d.ts +29 -6
- package/dist/views/metadata-admin/previews/PreviewShell.js +16 -3
- package/dist/views/metadata-admin/previews/ReportPreview.d.ts +18 -1
- package/dist/views/metadata-admin/previews/ReportPreview.js +23 -15
- package/dist/views/metadata-admin/previews/RolePreview.d.ts +19 -0
- package/dist/views/metadata-admin/previews/RolePreview.js +14 -0
- package/dist/views/metadata-admin/previews/SkillPreview.d.ts +22 -0
- package/dist/views/metadata-admin/previews/SkillPreview.js +34 -0
- package/dist/views/metadata-admin/previews/ToolPreview.d.ts +25 -0
- package/dist/views/metadata-admin/previews/ToolPreview.js +122 -0
- package/dist/views/metadata-admin/previews/TranslationPreview.d.ts +25 -0
- package/dist/views/metadata-admin/previews/TranslationPreview.js +52 -0
- package/dist/views/metadata-admin/previews/ValidationPreview.d.ts +27 -0
- package/dist/views/metadata-admin/previews/ValidationPreview.js +110 -0
- package/dist/views/metadata-admin/previews/ViewColumnPanes.d.ts +62 -0
- package/dist/views/metadata-admin/previews/ViewColumnPanes.js +140 -0
- package/dist/views/metadata-admin/previews/ViewPreview.d.ts +23 -1
- package/dist/views/metadata-admin/previews/ViewPreview.js +101 -73
- package/dist/views/metadata-admin/previews/block-config.d.ts +82 -0
- package/dist/views/metadata-admin/previews/block-config.js +324 -0
- package/dist/views/metadata-admin/previews/block-types.d.ts +40 -0
- package/dist/views/metadata-admin/previews/block-types.js +110 -0
- package/dist/views/metadata-admin/previews/field-types.d.ts +53 -0
- package/dist/views/metadata-admin/previews/field-types.js +97 -0
- package/dist/views/metadata-admin/previews/flow-canvas-layout.d.ts +88 -0
- package/dist/views/metadata-admin/previews/flow-canvas-layout.js +190 -0
- package/dist/views/metadata-admin/previews/flow-canvas-parts.d.ts +88 -0
- package/dist/views/metadata-admin/previews/flow-canvas-parts.js +358 -0
- package/dist/views/metadata-admin/previews/form-preview.d.ts +24 -0
- package/dist/views/metadata-admin/previews/form-preview.js +29 -0
- package/dist/views/metadata-admin/previews/index.js +43 -0
- package/dist/views/metadata-admin/previews/object-fields-bridge.d.ts +66 -0
- package/dist/views/metadata-admin/previews/object-fields-bridge.js +171 -0
- package/dist/views/metadata-admin/previews/object-fields-io.d.ts +109 -0
- package/dist/views/metadata-admin/previews/object-fields-io.js +208 -0
- package/dist/views/metadata-admin/previews/simulator/flow-sim-types.d.ts +91 -0
- package/dist/views/metadata-admin/previews/simulator/flow-sim-types.js +2 -0
- package/dist/views/metadata-admin/previews/simulator/flow-sim-validate.d.ts +8 -0
- package/dist/views/metadata-admin/previews/simulator/flow-sim-validate.js +113 -0
- package/dist/views/metadata-admin/previews/simulator/flow-simulator.d.ts +44 -0
- package/dist/views/metadata-admin/previews/simulator/flow-simulator.js +316 -0
- package/dist/views/metadata-admin/previews/useDatasetCatalog.d.ts +47 -0
- package/dist/views/metadata-admin/previews/useDatasetCatalog.js +133 -0
- package/dist/views/metadata-admin/previews/useFlowNodePalette.d.ts +44 -0
- package/dist/views/metadata-admin/previews/useFlowNodePalette.js +124 -0
- package/dist/views/metadata-admin/previews/useMetaOptions.d.ts +8 -0
- package/dist/views/metadata-admin/previews/useMetaOptions.js +50 -0
- package/dist/views/metadata-admin/previews/useObjectFields.d.ts +23 -0
- package/dist/views/metadata-admin/previews/useObjectFields.js +79 -0
- package/dist/views/metadata-admin/previews/useObjectOptions.d.ts +8 -0
- package/dist/views/metadata-admin/previews/useObjectOptions.js +43 -0
- package/dist/views/metadata-admin/previews/view-column-io.d.ts +42 -0
- package/dist/views/metadata-admin/previews/view-column-io.js +73 -0
- package/dist/views/metadata-admin/previews/widget-types.d.ts +24 -0
- package/dist/views/metadata-admin/previews/widget-types.js +40 -0
- package/dist/views/metadata-admin/registry.d.ts +140 -19
- package/dist/views/metadata-admin/report-schema.d.ts +26 -0
- package/dist/views/metadata-admin/report-schema.js +121 -0
- package/dist/views/metadata-admin/useMetadata.d.ts +100 -2
- package/dist/views/metadata-admin/useMetadata.js +155 -4
- package/dist/views/metadata-admin/view-item-normalize.d.ts +20 -0
- package/dist/views/metadata-admin/view-item-normalize.js +68 -0
- package/dist/views/metadata-admin/view-schema.d.ts +16 -0
- package/dist/views/metadata-admin/view-schema.js +107 -0
- package/dist/views/metadata-admin/view-variant-model.d.ts +23 -0
- package/dist/views/metadata-admin/view-variant-model.js +64 -0
- package/dist/views/metadata-admin/widgets.d.ts +89 -1
- package/dist/views/metadata-admin/widgets.js +491 -17
- package/dist/views/runtime-metadata-persistence.d.ts +78 -0
- package/dist/views/runtime-metadata-persistence.js +89 -0
- package/dist/views/useOpenRecordList.d.ts +18 -0
- package/dist/views/useOpenRecordList.js +36 -0
- package/dist/views/userFilterUrlState.d.ts +15 -0
- package/dist/views/userFilterUrlState.js +53 -0
- package/dist/views/view-config-adapter.d.ts +38 -0
- package/dist/views/view-config-adapter.js +80 -0
- package/package.json +52 -34
- package/dist/views/DesignDrawer.d.ts +0 -28
- package/dist/views/DesignDrawer.js +0 -51
- package/dist/views/metadata-admin/DesignerEditorWrapper.d.ts +0 -68
- package/dist/views/metadata-admin/DesignerEditorWrapper.js +0 -158
|
@@ -51,14 +51,40 @@ export interface MarketplacePackageSummary {
|
|
|
51
51
|
export interface MarketplacePackageDetail extends MarketplacePackageSummary {
|
|
52
52
|
readme?: string | null;
|
|
53
53
|
}
|
|
54
|
+
/** Structured permission grants a plugin requests (ADR-0025 §3.2). */
|
|
55
|
+
export interface PluginPermissions {
|
|
56
|
+
services?: string[];
|
|
57
|
+
hooks?: string[];
|
|
58
|
+
network?: string[];
|
|
59
|
+
fs?: string[];
|
|
60
|
+
}
|
|
54
61
|
export interface MarketplacePackageVersion {
|
|
55
62
|
id: string;
|
|
56
63
|
version: string;
|
|
57
64
|
status?: string;
|
|
58
65
|
is_prerelease?: boolean;
|
|
59
66
|
published_at?: string | null;
|
|
67
|
+
release_notes?: string | null;
|
|
60
68
|
listing_status?: string;
|
|
61
69
|
reviewed_at?: string | null;
|
|
70
|
+
artifact_kind?: string;
|
|
71
|
+
/** True when this version carries executable code (a `plugin` artifact). */
|
|
72
|
+
contains_code?: boolean;
|
|
73
|
+
/** Trust tier the plugin runs under: 'node' | 'sandbox' | 'worker'. */
|
|
74
|
+
runtime?: string;
|
|
75
|
+
/** Dependency packaging: 'bundled' | 'manifest-deps'. */
|
|
76
|
+
packaging?: string;
|
|
77
|
+
/** Structured permission set the plugin asks the installer to grant. */
|
|
78
|
+
permissions?: PluginPermissions | null;
|
|
79
|
+
/** Compatibility ranges ({ platform, protocol }). */
|
|
80
|
+
engines?: {
|
|
81
|
+
platform?: string;
|
|
82
|
+
protocol?: string;
|
|
83
|
+
} | null;
|
|
84
|
+
/** Whether the artifact carries a verified publisher signature. */
|
|
85
|
+
signed?: boolean;
|
|
86
|
+
/** Whether the marketplace counter-signed (reviewed + approved) this version. */
|
|
87
|
+
platform_verified?: boolean;
|
|
62
88
|
}
|
|
63
89
|
export interface MarketplaceListResponse {
|
|
64
90
|
items: MarketplacePackageSummary[];
|
|
@@ -136,6 +162,49 @@ export declare function listCloudEnvironments(): Promise<CloudEnvironment[]>;
|
|
|
136
162
|
*/
|
|
137
163
|
export declare function listInstallableOrgIds(): Promise<Set<string>>;
|
|
138
164
|
export declare function cloudInstallDeepLink(packageId: string): string;
|
|
165
|
+
/**
|
|
166
|
+
* Deep-link to the cloud upgrade entry point: the environments list, where each
|
|
167
|
+
* environment's "Upgrade Plan" action opens Stripe checkout. Surfaced from the
|
|
168
|
+
* tenant SPA when an AI quota refusal (429) offers an upgrade / top-up CTA.
|
|
169
|
+
* Centralized so the target can be re-pointed (dedicated pricing or credit-pack
|
|
170
|
+
* page) as the cloud billing UI evolves. Same `cloud-control` app slug as
|
|
171
|
+
* cloudInstallDeepLink above.
|
|
172
|
+
*/
|
|
173
|
+
export declare function cloudPricingDeepLink(): string;
|
|
174
|
+
/**
|
|
175
|
+
* Look up whether a package is already installed in the given environment.
|
|
176
|
+
* Returns the installed version string when an `enabled=true` row exists,
|
|
177
|
+
* or `null` when no install row is found.
|
|
178
|
+
*
|
|
179
|
+
* Used by `MarketplacePackagePage` to flip the primary CTA from
|
|
180
|
+
* "Install to Cloud" → "Installed" on initial render — without it, the
|
|
181
|
+
* button keeps inviting users to install a package that's already
|
|
182
|
+
* installed and the install call surfaces a confusing "already exists"
|
|
183
|
+
* error.
|
|
184
|
+
*/
|
|
185
|
+
export interface CloudInstallationInfo {
|
|
186
|
+
installationId: string;
|
|
187
|
+
version: string;
|
|
188
|
+
withSampleData: boolean;
|
|
189
|
+
}
|
|
190
|
+
export declare function getCloudInstalledVersion(packageId: string, environmentId: string): Promise<string | null>;
|
|
191
|
+
/**
|
|
192
|
+
* Richer companion to {@link getCloudInstalledVersion}. Returns the
|
|
193
|
+
* full installation handle (id, version, sample-data flag) so the
|
|
194
|
+
* Marketplace UI can render reseed / purge actions.
|
|
195
|
+
*/
|
|
196
|
+
export declare function getCloudInstallationInfo(packageId: string, environmentId: string): Promise<CloudInstallationInfo | null>;
|
|
197
|
+
/** POST /api/v1/cloud/installations/:id/reseed-sample-data */
|
|
198
|
+
export declare function reseedSampleData(installationId: string): Promise<{
|
|
199
|
+
ok: boolean;
|
|
200
|
+
error?: string;
|
|
201
|
+
}>;
|
|
202
|
+
/** POST /api/v1/cloud/installations/:id/purge-sample-data */
|
|
203
|
+
export declare function purgeSampleData(installationId: string): Promise<{
|
|
204
|
+
ok: boolean;
|
|
205
|
+
deleted?: number;
|
|
206
|
+
error?: string;
|
|
207
|
+
}>;
|
|
139
208
|
export interface LocalInstallEntry {
|
|
140
209
|
packageId: string;
|
|
141
210
|
versionId: string;
|
|
@@ -143,6 +212,9 @@ export interface LocalInstallEntry {
|
|
|
143
212
|
version: string;
|
|
144
213
|
installedAt: string;
|
|
145
214
|
installedBy: string | null;
|
|
215
|
+
/** Whether the bundled seed datasets are currently loaded in the local
|
|
216
|
+
* kernel DB. True after install (with seed) or reseed; false after purge. */
|
|
217
|
+
withSampleData?: boolean;
|
|
146
218
|
}
|
|
147
219
|
export interface LocalInstallResult {
|
|
148
220
|
manifestId: string;
|
|
@@ -153,9 +225,60 @@ export interface LocalInstallResult {
|
|
|
153
225
|
upgradedFrom: string | null;
|
|
154
226
|
note?: string;
|
|
155
227
|
}
|
|
228
|
+
/**
|
|
229
|
+
* Org-scoped catalog (ADR-0007 step ②). The caller's own organization's
|
|
230
|
+
* packages (visibility org/private) — discoverable + installable from inside
|
|
231
|
+
* the environment via the same-origin /cloud-connection/org-packages proxy,
|
|
232
|
+
* distinct from the public marketplace browse. `connected: false` → not
|
|
233
|
+
* cloud-bound (self-hosted), so there is no org catalog to show.
|
|
234
|
+
*/
|
|
235
|
+
export interface OrgPackageSummary {
|
|
236
|
+
id: string;
|
|
237
|
+
manifest_id: string;
|
|
238
|
+
display_name: string;
|
|
239
|
+
description?: string | null;
|
|
240
|
+
category?: string | null;
|
|
241
|
+
icon_url?: string | null;
|
|
242
|
+
visibility?: string;
|
|
243
|
+
latest_version?: string | null;
|
|
244
|
+
}
|
|
245
|
+
export interface OrgPackagesResult {
|
|
246
|
+
connected: boolean;
|
|
247
|
+
items: OrgPackageSummary[];
|
|
248
|
+
}
|
|
249
|
+
export declare function listOrgPackages(): Promise<OrgPackagesResult>;
|
|
156
250
|
export declare function installLocal(input: {
|
|
157
251
|
packageId: string;
|
|
158
252
|
versionId?: string;
|
|
159
253
|
}): Promise<LocalInstallResult>;
|
|
160
254
|
export declare function listLocalInstalls(): Promise<LocalInstallEntry[]>;
|
|
255
|
+
/**
|
|
256
|
+
* Cloud-managed installed list (ADR-0007 step ①).
|
|
257
|
+
*
|
|
258
|
+
* For a cloud-connected environment, the authoritative "what's installed"
|
|
259
|
+
* lives in the control plane's `sys_package_installation`, NOT the runtime's
|
|
260
|
+
* local `.objectstack/installed-packages/` cache. A tenant SPA can't read the
|
|
261
|
+
* control plane cross-origin, so the env's own runtime proxies it at the
|
|
262
|
+
* same-origin `/api/v1/cloud-connection/installed` route. This surfaces
|
|
263
|
+
* packages installed via ANY path (CLI `--env --install`, marketplace, REST).
|
|
264
|
+
*
|
|
265
|
+
* `connected: false` means this runtime is self-hosted / not cloud-bound — the
|
|
266
|
+
* caller should fall back to {@link listLocalInstalls}.
|
|
267
|
+
*/
|
|
268
|
+
export interface InstalledPackagesResult {
|
|
269
|
+
connected: boolean;
|
|
270
|
+
items: LocalInstallEntry[];
|
|
271
|
+
}
|
|
272
|
+
export declare function listInstalledPackages(): Promise<InstalledPackagesResult>;
|
|
161
273
|
export declare function uninstallLocal(manifestId: string): Promise<void>;
|
|
274
|
+
export interface LocalSampleDataResult {
|
|
275
|
+
manifestId: string;
|
|
276
|
+
inserted?: number;
|
|
277
|
+
updated?: number;
|
|
278
|
+
deleted?: number;
|
|
279
|
+
skipped?: number;
|
|
280
|
+
errors?: number;
|
|
281
|
+
withSampleData: boolean;
|
|
282
|
+
}
|
|
283
|
+
export declare function reseedLocalSampleData(manifestId: string): Promise<LocalSampleDataResult>;
|
|
284
|
+
export declare function purgeLocalSampleData(manifestId: string): Promise<LocalSampleDataResult>;
|
|
@@ -13,8 +13,27 @@
|
|
|
13
13
|
* framework/packages/runtime/src/cloud/marketplace-proxy-plugin.ts
|
|
14
14
|
*/
|
|
15
15
|
import { getCloudBase } from '../../runtime-config';
|
|
16
|
+
import { TokenStorage } from '@object-ui/auth';
|
|
16
17
|
const SERVER_URL = (import.meta.env.VITE_SERVER_URL || '').replace(/\/$/, '');
|
|
17
18
|
const API_BASE = `${SERVER_URL}/api/v1/marketplace`;
|
|
19
|
+
/**
|
|
20
|
+
* Attach the Bearer token to same-origin `/api/v1/cloud-connection/*` calls.
|
|
21
|
+
*
|
|
22
|
+
* objectui authenticates with a Bearer token (better-auth, stored in
|
|
23
|
+
* localStorage by `@object-ui/auth` and normally injected by the app's
|
|
24
|
+
* `createAuthenticatedFetch` wrapper). These marketplace routes use raw
|
|
25
|
+
* `fetch()` and so bypass that wrapper — relying on `credentials: 'include'`
|
|
26
|
+
* (the session cookie) alone is NOT enough on a tenant runtime: after
|
|
27
|
+
* platform SSO the env's session cookie is not reliably presented, so the
|
|
28
|
+
* cloud-connection route's `resolveEnvSession` finds no session and returns
|
|
29
|
+
* 401 "Sign in to this environment." even though the user is signed in.
|
|
30
|
+
* Injecting the Bearer (which the server's `getSession` accepts) fixes it.
|
|
31
|
+
* `credentials: 'include'` is kept so the cookie still rides along when set.
|
|
32
|
+
*/
|
|
33
|
+
function withEnvAuth(headers) {
|
|
34
|
+
const token = TokenStorage.get();
|
|
35
|
+
return token ? { ...headers, Authorization: `Bearer ${token}` } : headers;
|
|
36
|
+
}
|
|
18
37
|
async function call(path, init) {
|
|
19
38
|
const res = await fetch(`${API_BASE}${path}`, {
|
|
20
39
|
credentials: 'omit',
|
|
@@ -54,7 +73,47 @@ export async function getMarketplacePackage(id) {
|
|
|
54
73
|
return call(`/packages/${encodeURIComponent(id)}`);
|
|
55
74
|
}
|
|
56
75
|
export async function installPackage(input) {
|
|
57
|
-
const
|
|
76
|
+
const cloudBase = getCloudBase();
|
|
77
|
+
// ── In-environment (tenant runtime) path ──────────────────────────────
|
|
78
|
+
// When `getCloudBase()` is non-empty we're a *tenant runtime* (e.g.
|
|
79
|
+
// crm.objectos.app) whose marketplace browses a *separate* cloud origin.
|
|
80
|
+
// POSTing the install straight to `${cloudBase}/api/v1/actions/...` is a
|
|
81
|
+
// cross-origin, credentialed request that the browser blocks with
|
|
82
|
+
// "Failed to fetch" (no CORS allowance + cross-site cookie). Instead we
|
|
83
|
+
// call the SAME-ORIGIN `/api/v1/cloud-connection/install` route that the
|
|
84
|
+
// cloud-owned runtime plugin mounts: it authorizes via the environment's
|
|
85
|
+
// own session and forwards to cloud server-to-server (no CORS, no leaked
|
|
86
|
+
// cross-site cookie). The target environment is the current one, resolved
|
|
87
|
+
// by hostname on the server. See
|
|
88
|
+
// docs/design/cloud-account-binding-marketplace-install.md (cloud repo).
|
|
89
|
+
if (cloudBase) {
|
|
90
|
+
const res = await fetch(`/api/v1/cloud-connection/install`, {
|
|
91
|
+
method: 'POST',
|
|
92
|
+
credentials: 'include',
|
|
93
|
+
headers: withEnvAuth({ 'Accept': 'application/json', 'Content-Type': 'application/json' }),
|
|
94
|
+
body: JSON.stringify({
|
|
95
|
+
package_id: input.packageId,
|
|
96
|
+
seed_sample_data: !!input.seedSampleData,
|
|
97
|
+
}),
|
|
98
|
+
});
|
|
99
|
+
let payload = null;
|
|
100
|
+
try {
|
|
101
|
+
payload = await res.json();
|
|
102
|
+
}
|
|
103
|
+
catch { /* empty */ }
|
|
104
|
+
if (!res.ok || payload?.success === false) {
|
|
105
|
+
const code = payload?.error?.code ?? payload?.code ?? `HTTP_${res.status}`;
|
|
106
|
+
const message = payload?.error?.message ?? payload?.error ?? payload?.message ?? res.statusText;
|
|
107
|
+
const err = new Error(typeof message === 'string' ? message : `${code}`);
|
|
108
|
+
err.code = code;
|
|
109
|
+
err.status = res.status;
|
|
110
|
+
throw err;
|
|
111
|
+
}
|
|
112
|
+
return (payload?.data ?? payload);
|
|
113
|
+
}
|
|
114
|
+
// ── Cloud control-plane path (runtime IS cloud) ───────────────────────
|
|
115
|
+
// Same-origin direct call to the install action.
|
|
116
|
+
const base = SERVER_URL;
|
|
58
117
|
const res = await fetch(`${base}/api/v1/actions/sys_package/install_package`, {
|
|
59
118
|
method: 'POST',
|
|
60
119
|
credentials: 'include',
|
|
@@ -165,6 +224,149 @@ export function cloudInstallDeepLink(packageId) {
|
|
|
165
224
|
const base = getCloudBase() || 'https://cloud.objectos.app';
|
|
166
225
|
return `${base}/apps/cloud-control/sys_package/${encodeURIComponent(packageId)}`;
|
|
167
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* Deep-link to the cloud upgrade entry point: the environments list, where each
|
|
229
|
+
* environment's "Upgrade Plan" action opens Stripe checkout. Surfaced from the
|
|
230
|
+
* tenant SPA when an AI quota refusal (429) offers an upgrade / top-up CTA.
|
|
231
|
+
* Centralized so the target can be re-pointed (dedicated pricing or credit-pack
|
|
232
|
+
* page) as the cloud billing UI evolves. Same `cloud-control` app slug as
|
|
233
|
+
* cloudInstallDeepLink above.
|
|
234
|
+
*/
|
|
235
|
+
export function cloudPricingDeepLink() {
|
|
236
|
+
const base = getCloudBase() || 'https://cloud.objectos.app';
|
|
237
|
+
return `${base}/apps/cloud-control/sys_environment`;
|
|
238
|
+
}
|
|
239
|
+
export async function getCloudInstalledVersion(packageId, environmentId) {
|
|
240
|
+
const info = await getCloudInstallationInfo(packageId, environmentId);
|
|
241
|
+
return info ? info.version : null;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Richer companion to {@link getCloudInstalledVersion}. Returns the
|
|
245
|
+
* full installation handle (id, version, sample-data flag) so the
|
|
246
|
+
* Marketplace UI can render reseed / purge actions.
|
|
247
|
+
*/
|
|
248
|
+
export async function getCloudInstallationInfo(packageId, environmentId) {
|
|
249
|
+
if (!packageId)
|
|
250
|
+
return null;
|
|
251
|
+
// ── In-environment (tenant runtime) path ──────────────────────────────
|
|
252
|
+
// When `getCloudBase()` is non-empty we're a tenant runtime browsing a
|
|
253
|
+
// *separate* cloud origin. A direct `${cloudBase}/api/v1/data/...` read is
|
|
254
|
+
// a cross-origin, cross-site-cookie request the browser blocks — the exact
|
|
255
|
+
// reason `installPackage()` routes through the same-origin proxy. Mirror it
|
|
256
|
+
// here: the cloud-owned runtime plugin's `/cloud-connection/installation`
|
|
257
|
+
// route resolves the env by hostname and queries the control plane
|
|
258
|
+
// server-to-server. Without this, the "Installed" CTA never flips and an
|
|
259
|
+
// already-installed package keeps inviting another install.
|
|
260
|
+
const cloudBase = getCloudBase();
|
|
261
|
+
if (cloudBase) {
|
|
262
|
+
try {
|
|
263
|
+
const res = await fetch(`/api/v1/cloud-connection/installation?package_id=${encodeURIComponent(packageId)}`, { credentials: 'include', headers: withEnvAuth({ 'Accept': 'application/json' }) });
|
|
264
|
+
if (!res.ok)
|
|
265
|
+
return null;
|
|
266
|
+
const payload = await res.json().catch(() => ({}));
|
|
267
|
+
const data = payload?.data ?? payload ?? {};
|
|
268
|
+
if (!data.installed)
|
|
269
|
+
return null;
|
|
270
|
+
return {
|
|
271
|
+
installationId: String(data.installationId ?? ''),
|
|
272
|
+
version: String(data.version ?? 'installed'),
|
|
273
|
+
withSampleData: data.withSampleData === true,
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
catch {
|
|
277
|
+
return null;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
// ── Cloud control-plane path (runtime IS cloud) ───────────────────────
|
|
281
|
+
// Use the dedicated installed-state route, NOT the generic
|
|
282
|
+
// `/api/v1/data/sys_package_installation`. The control plane does not expose
|
|
283
|
+
// sys_package_installation rows through the generic data API (the row exists
|
|
284
|
+
// but the read returns empty), and that row carries `package_version_id`, not
|
|
285
|
+
// a version string. The dedicated route reads the control DB directly and
|
|
286
|
+
// resolves the human-readable version — and now enforces org membership for
|
|
287
|
+
// user-mode callers. Same response shape as the tenant proxy above.
|
|
288
|
+
if (!environmentId)
|
|
289
|
+
return null;
|
|
290
|
+
const base = SERVER_URL;
|
|
291
|
+
try {
|
|
292
|
+
const res = await fetch(`${base}/api/v1/cloud/environments/${encodeURIComponent(environmentId)}/installations/${encodeURIComponent(packageId)}`, { credentials: 'include', headers: { 'Accept': 'application/json' } });
|
|
293
|
+
if (!res.ok)
|
|
294
|
+
return null;
|
|
295
|
+
const payload = await res.json().catch(() => ({}));
|
|
296
|
+
const data = payload?.data ?? payload ?? {};
|
|
297
|
+
if (!data.installed)
|
|
298
|
+
return null;
|
|
299
|
+
return {
|
|
300
|
+
installationId: String(data.installationId ?? ''),
|
|
301
|
+
version: String(data.version ?? 'installed'),
|
|
302
|
+
withSampleData: data.withSampleData === true,
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
catch {
|
|
306
|
+
return null;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
/** POST /api/v1/cloud/installations/:id/reseed-sample-data */
|
|
310
|
+
export async function reseedSampleData(installationId) {
|
|
311
|
+
if (!installationId)
|
|
312
|
+
return { ok: false, error: 'installation id required' };
|
|
313
|
+
const base = getCloudBase() || SERVER_URL;
|
|
314
|
+
try {
|
|
315
|
+
const res = await fetch(`${base}/api/v1/cloud/installations/${encodeURIComponent(installationId)}/reseed-sample-data`, {
|
|
316
|
+
method: 'POST',
|
|
317
|
+
credentials: 'include',
|
|
318
|
+
headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' },
|
|
319
|
+
body: '{}',
|
|
320
|
+
});
|
|
321
|
+
const payload = await res.json().catch(() => ({}));
|
|
322
|
+
if (!res.ok || payload?.success === false) {
|
|
323
|
+
return { ok: false, error: payload?.error || `HTTP ${res.status}` };
|
|
324
|
+
}
|
|
325
|
+
return { ok: true };
|
|
326
|
+
}
|
|
327
|
+
catch (err) {
|
|
328
|
+
return { ok: false, error: err?.message || 'Network error' };
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
/** POST /api/v1/cloud/installations/:id/purge-sample-data */
|
|
332
|
+
export async function purgeSampleData(installationId) {
|
|
333
|
+
if (!installationId)
|
|
334
|
+
return { ok: false, error: 'installation id required' };
|
|
335
|
+
const base = getCloudBase() || SERVER_URL;
|
|
336
|
+
try {
|
|
337
|
+
const res = await fetch(`${base}/api/v1/cloud/installations/${encodeURIComponent(installationId)}/purge-sample-data`, {
|
|
338
|
+
method: 'POST',
|
|
339
|
+
credentials: 'include',
|
|
340
|
+
headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' },
|
|
341
|
+
body: '{}',
|
|
342
|
+
});
|
|
343
|
+
const payload = await res.json().catch(() => ({}));
|
|
344
|
+
if (!res.ok || payload?.success === false) {
|
|
345
|
+
return { ok: false, error: payload?.error || `HTTP ${res.status}` };
|
|
346
|
+
}
|
|
347
|
+
return { ok: true, deleted: Number(payload?.data?.deleted ?? 0) };
|
|
348
|
+
}
|
|
349
|
+
catch (err) {
|
|
350
|
+
return { ok: false, error: err?.message || 'Network error' };
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
export async function listOrgPackages() {
|
|
354
|
+
try {
|
|
355
|
+
const res = await fetch(`${SERVER_URL}/api/v1/cloud-connection/org-packages`, {
|
|
356
|
+
credentials: 'include',
|
|
357
|
+
headers: { Accept: 'application/json' },
|
|
358
|
+
});
|
|
359
|
+
if (!res.ok)
|
|
360
|
+
return { connected: false, items: [] };
|
|
361
|
+
const payload = await res.json().catch(() => ({}));
|
|
362
|
+
const data = payload?.data ?? {};
|
|
363
|
+
const items = Array.isArray(data.items) ? data.items : [];
|
|
364
|
+
return { connected: data.connected === true, items };
|
|
365
|
+
}
|
|
366
|
+
catch {
|
|
367
|
+
return { connected: false, items: [] };
|
|
368
|
+
}
|
|
369
|
+
}
|
|
168
370
|
export async function installLocal(input) {
|
|
169
371
|
const res = await fetch(`${API_BASE}/install-local`, {
|
|
170
372
|
method: 'POST',
|
|
@@ -206,6 +408,35 @@ export async function listLocalInstalls() {
|
|
|
206
408
|
return [];
|
|
207
409
|
}
|
|
208
410
|
}
|
|
411
|
+
export async function listInstalledPackages() {
|
|
412
|
+
try {
|
|
413
|
+
const res = await fetch(`${SERVER_URL}/api/v1/cloud-connection/installed`, {
|
|
414
|
+
credentials: 'include',
|
|
415
|
+
headers: { Accept: 'application/json' },
|
|
416
|
+
});
|
|
417
|
+
if (!res.ok)
|
|
418
|
+
return { connected: false, items: [] };
|
|
419
|
+
const payload = await res.json().catch(() => ({}));
|
|
420
|
+
const data = payload?.data ?? {};
|
|
421
|
+
const pkgs = Array.isArray(data.packages) ? data.packages : [];
|
|
422
|
+
const items = pkgs.map((p) => {
|
|
423
|
+
const manifestId = String(p.packageId ?? p.package_id ?? '');
|
|
424
|
+
return {
|
|
425
|
+
packageId: manifestId,
|
|
426
|
+
versionId: String(p.package_version_id ?? ''),
|
|
427
|
+
manifestId,
|
|
428
|
+
version: String(p.version ?? 'installed'),
|
|
429
|
+
installedAt: String(p.installed_at ?? p.installedAt ?? ''),
|
|
430
|
+
installedBy: (p.installed_by ?? p.installedBy ?? null),
|
|
431
|
+
withSampleData: p.with_sample_data === true || p.withSampleData === true,
|
|
432
|
+
};
|
|
433
|
+
});
|
|
434
|
+
return { connected: data.connected === true, items };
|
|
435
|
+
}
|
|
436
|
+
catch {
|
|
437
|
+
return { connected: false, items: [] };
|
|
438
|
+
}
|
|
439
|
+
}
|
|
209
440
|
export async function uninstallLocal(manifestId) {
|
|
210
441
|
const res = await fetch(`${API_BASE}/install-local/${encodeURIComponent(manifestId)}`, {
|
|
211
442
|
method: 'DELETE',
|
|
@@ -218,3 +449,25 @@ export async function uninstallLocal(manifestId) {
|
|
|
218
449
|
throw new Error(typeof message === 'string' ? message : `HTTP_${res.status}`);
|
|
219
450
|
}
|
|
220
451
|
}
|
|
452
|
+
async function postLocalSampleAction(manifestId, action) {
|
|
453
|
+
const path = action === 'reseed' ? 'reseed-sample-data' : 'purge-sample-data';
|
|
454
|
+
const res = await fetch(`${API_BASE}/install-local/${encodeURIComponent(manifestId)}/${path}`, {
|
|
455
|
+
method: 'POST',
|
|
456
|
+
credentials: 'include',
|
|
457
|
+
headers: { 'Accept': 'application/json' },
|
|
458
|
+
});
|
|
459
|
+
const payload = await res.json().catch(() => ({}));
|
|
460
|
+
if (!res.ok) {
|
|
461
|
+
const message = payload?.error?.message ?? res.statusText;
|
|
462
|
+
const err = new Error(typeof message === 'string' ? message : `HTTP_${res.status}`);
|
|
463
|
+
err.code = payload?.error?.code ?? `HTTP_${res.status}`;
|
|
464
|
+
throw err;
|
|
465
|
+
}
|
|
466
|
+
return (payload?.data ?? payload);
|
|
467
|
+
}
|
|
468
|
+
export function reseedLocalSampleData(manifestId) {
|
|
469
|
+
return postLocalSampleAction(manifestId, 'reseed');
|
|
470
|
+
}
|
|
471
|
+
export function purgeLocalSampleData(manifestId) {
|
|
472
|
+
return postLocalSampleAction(manifestId, 'purge');
|
|
473
|
+
}
|
|
@@ -12,5 +12,5 @@ interface CreateWorkspaceDialogProps {
|
|
|
12
12
|
onOpenChange: (open: boolean) => void;
|
|
13
13
|
onCreated?: (org: AuthOrganization) => void;
|
|
14
14
|
}
|
|
15
|
-
export declare function CreateWorkspaceDialog({ open, onOpenChange, onCreated, }: CreateWorkspaceDialogProps): import("react
|
|
15
|
+
export declare function CreateWorkspaceDialog({ open, onOpenChange, onCreated, }: CreateWorkspaceDialogProps): import("react").JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -11,5 +11,5 @@ import React from 'react';
|
|
|
11
11
|
interface OrganizationsLayoutProps {
|
|
12
12
|
children: React.ReactNode;
|
|
13
13
|
}
|
|
14
|
-
export declare function OrganizationsLayout({ children }: OrganizationsLayoutProps):
|
|
14
|
+
export declare function OrganizationsLayout({ children }: OrganizationsLayoutProps): React.JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* Standalone page for accepting or rejecting an organization invitation.
|
|
5
5
|
* Route: /accept-invitation/:invitationId
|
|
6
6
|
*/
|
|
7
|
-
export declare function AcceptInvitationPage(): import("react
|
|
7
|
+
export declare function AcceptInvitationPage(): import("react").JSX.Element | null;
|
|
@@ -12,5 +12,5 @@ interface InviteMemberDialogProps {
|
|
|
12
12
|
onOpenChange: (open: boolean) => void;
|
|
13
13
|
onInvited?: (invitation: AuthInvitation) => void;
|
|
14
14
|
}
|
|
15
|
-
export declare function InviteMemberDialog({ organizationId, open, onOpenChange, onInvited, }: InviteMemberDialogProps): import("react
|
|
15
|
+
export declare function InviteMemberDialog({ organizationId, open, onOpenChange, onInvited, }: InviteMemberDialogProps): import("react").JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Resolves the org by slug, ensures it is the active organization,
|
|
6
6
|
* renders nav tabs (Members / Invitations / Settings) and an Outlet.
|
|
7
7
|
*/
|
|
8
|
-
export declare function OrganizationLayout(): import("react
|
|
8
|
+
export declare function OrganizationLayout(): import("react").JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CommandPaletteProvider
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for whether the global ⌘K command palette is open,
|
|
5
|
+
* plus the shared, idempotent commands used to open / close it.
|
|
6
|
+
*
|
|
7
|
+
* Open state is delegated to {@link useUrlOverlay} (`?palette=1`, `?cmdk=1`
|
|
8
|
+
* alias), so it is URL-addressable (deep-linkable, restore-on-reload,
|
|
9
|
+
* back/forward) per ADR-0054 invariant C3, and every "open" affordance — the
|
|
10
|
+
* top-bar search button, a programmatic caller, a deep-link — shares the same
|
|
11
|
+
* idempotent `openCommandPalette()` (never a toggle) per C1.
|
|
12
|
+
*
|
|
13
|
+
* `⌘K` stays an *accelerator*: the keydown handler toggles (close-on-repeat is
|
|
14
|
+
* a keyboard nicety), but the OPEN path used by buttons / links / programmatic
|
|
15
|
+
* callers is the idempotent `openCommandPalette()`.
|
|
16
|
+
*
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
import { type ReactNode } from 'react';
|
|
20
|
+
export interface CommandPaletteContextValue {
|
|
21
|
+
/** Whether the palette is currently open (derived from the URL). */
|
|
22
|
+
open: boolean;
|
|
23
|
+
/** Idempotent open — calling when already open is a no-op (C1). */
|
|
24
|
+
openCommandPalette: () => void;
|
|
25
|
+
/** Idempotent close. */
|
|
26
|
+
closeCommandPalette: () => void;
|
|
27
|
+
/** Toggle — reserved for the keyboard accelerator, not the open affordances. */
|
|
28
|
+
toggleCommandPalette: () => void;
|
|
29
|
+
/** Imperative setter, used by the dialog's `onOpenChange`. */
|
|
30
|
+
setOpen: (open: boolean) => void;
|
|
31
|
+
}
|
|
32
|
+
export declare function CommandPaletteProvider({ children }: {
|
|
33
|
+
children: ReactNode;
|
|
34
|
+
}): import("react").JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* Access the shared command-palette controls.
|
|
37
|
+
*
|
|
38
|
+
* Falls back to a no-op implementation when used outside a
|
|
39
|
+
* `<CommandPaletteProvider>` (e.g. an `AppHeader` rendered in the `home`/`orgs`
|
|
40
|
+
* variants, where no palette is mounted, or isolated unit tests). The trigger is
|
|
41
|
+
* then inert rather than throwing — matching the prior behavior where the
|
|
42
|
+
* synthetic `⌘K` had nothing to open.
|
|
43
|
+
*/
|
|
44
|
+
export declare function useCommandPalette(): CommandPaletteContextValue;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* CommandPaletteProvider
|
|
4
|
+
*
|
|
5
|
+
* Single source of truth for whether the global ⌘K command palette is open,
|
|
6
|
+
* plus the shared, idempotent commands used to open / close it.
|
|
7
|
+
*
|
|
8
|
+
* Open state is delegated to {@link useUrlOverlay} (`?palette=1`, `?cmdk=1`
|
|
9
|
+
* alias), so it is URL-addressable (deep-linkable, restore-on-reload,
|
|
10
|
+
* back/forward) per ADR-0054 invariant C3, and every "open" affordance — the
|
|
11
|
+
* top-bar search button, a programmatic caller, a deep-link — shares the same
|
|
12
|
+
* idempotent `openCommandPalette()` (never a toggle) per C1.
|
|
13
|
+
*
|
|
14
|
+
* `⌘K` stays an *accelerator*: the keydown handler toggles (close-on-repeat is
|
|
15
|
+
* a keyboard nicety), but the OPEN path used by buttons / links / programmatic
|
|
16
|
+
* callers is the idempotent `openCommandPalette()`.
|
|
17
|
+
*
|
|
18
|
+
* @module
|
|
19
|
+
*/
|
|
20
|
+
import { createContext, useContext, useEffect, useMemo, } from 'react';
|
|
21
|
+
import { useUrlOverlay } from '../hooks/useUrlOverlay';
|
|
22
|
+
const CommandPaletteContext = createContext(null);
|
|
23
|
+
export function CommandPaletteProvider({ children }) {
|
|
24
|
+
const { open, setOpen, openOverlay, closeOverlay, toggleOverlay } = useUrlOverlay('palette', {
|
|
25
|
+
alias: 'cmdk',
|
|
26
|
+
});
|
|
27
|
+
// ⌘K / Ctrl+K accelerator. Lives here (not in CommandPalette) so the command
|
|
28
|
+
// and its shortcut share one definition and one open-state source. Toggle is
|
|
29
|
+
// fine for the *keyboard* (close-on-repeat); buttons/links/programmatic open
|
|
30
|
+
// paths use the idempotent openOverlay().
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
const onKeyDown = (e) => {
|
|
33
|
+
if (e.key === 'k' && (e.metaKey || e.ctrlKey)) {
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
toggleOverlay();
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
document.addEventListener('keydown', onKeyDown);
|
|
39
|
+
return () => document.removeEventListener('keydown', onKeyDown);
|
|
40
|
+
}, [toggleOverlay]);
|
|
41
|
+
const value = useMemo(() => ({
|
|
42
|
+
open,
|
|
43
|
+
openCommandPalette: openOverlay,
|
|
44
|
+
closeCommandPalette: closeOverlay,
|
|
45
|
+
toggleCommandPalette: toggleOverlay,
|
|
46
|
+
setOpen,
|
|
47
|
+
}), [open, openOverlay, closeOverlay, toggleOverlay, setOpen]);
|
|
48
|
+
return (_jsx(CommandPaletteContext.Provider, { value: value, children: children }));
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Access the shared command-palette controls.
|
|
52
|
+
*
|
|
53
|
+
* Falls back to a no-op implementation when used outside a
|
|
54
|
+
* `<CommandPaletteProvider>` (e.g. an `AppHeader` rendered in the `home`/`orgs`
|
|
55
|
+
* variants, where no palette is mounted, or isolated unit tests). The trigger is
|
|
56
|
+
* then inert rather than throwing — matching the prior behavior where the
|
|
57
|
+
* synthetic `⌘K` had nothing to open.
|
|
58
|
+
*/
|
|
59
|
+
export function useCommandPalette() {
|
|
60
|
+
const ctx = useContext(CommandPaletteContext);
|
|
61
|
+
if (!ctx) {
|
|
62
|
+
return {
|
|
63
|
+
open: false,
|
|
64
|
+
openCommandPalette: () => { },
|
|
65
|
+
closeCommandPalette: () => { },
|
|
66
|
+
toggleCommandPalette: () => { },
|
|
67
|
+
setOpen: () => { },
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
return ctx;
|
|
71
|
+
}
|
|
@@ -82,7 +82,7 @@ interface FavoritesContextValue {
|
|
|
82
82
|
interface FavoritesProviderProps {
|
|
83
83
|
children: ReactNode;
|
|
84
84
|
}
|
|
85
|
-
export declare function FavoritesProvider({ children }: FavoritesProviderProps): import("react
|
|
85
|
+
export declare function FavoritesProvider({ children }: FavoritesProviderProps): import("react").JSX.Element;
|
|
86
86
|
/**
|
|
87
87
|
* Access shared favorites state.
|
|
88
88
|
*
|
|
@@ -32,7 +32,7 @@ interface NavigationContextValue {
|
|
|
32
32
|
interface NavigationProviderProps {
|
|
33
33
|
children: ReactNode;
|
|
34
34
|
}
|
|
35
|
-
export declare function NavigationProvider({ children }: NavigationProviderProps): import("react
|
|
35
|
+
export declare function NavigationProvider({ children }: NavigationProviderProps): import("react").JSX.Element;
|
|
36
36
|
/**
|
|
37
37
|
* Hook to access navigation context
|
|
38
38
|
*/
|