@datalayer/core 1.1.60 → 1.2.10
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/README.md +41 -18
- package/lib/api/DatalayerApi.d.ts +42 -1
- package/lib/api/DatalayerApi.js +90 -3
- package/lib/api/constants.d.ts +19 -1
- package/lib/api/constants.js +19 -1
- package/lib/api/contents/attachments.d.ts +9 -0
- package/lib/api/contents/attachments.js +39 -0
- package/lib/api/contents/bridges.d.ts +22 -0
- package/lib/api/contents/bridges.js +79 -0
- package/lib/api/contents/capabilities.d.ts +11 -0
- package/lib/api/contents/capabilities.js +21 -0
- package/lib/api/contents/cloudStorage.d.ts +31 -0
- package/lib/api/contents/cloudStorage.js +89 -0
- package/lib/api/contents/dataservers.d.ts +37 -0
- package/lib/api/contents/dataservers.js +121 -0
- package/lib/api/contents/datasets.d.ts +63 -0
- package/lib/api/contents/datasets.js +82 -0
- package/lib/api/contents/datasources.d.ts +70 -0
- package/lib/api/contents/datasources.js +149 -0
- package/lib/api/contents/generated.d.ts +1070 -0
- package/lib/api/contents/index.d.ts +16 -0
- package/lib/api/contents/index.js +20 -0
- package/lib/api/contents/mcp.d.ts +46 -0
- package/lib/api/contents/mcp.js +157 -0
- package/lib/api/contents/objects.d.ts +31 -0
- package/lib/api/contents/objects.js +88 -0
- package/lib/api/contents/operations.d.ts +3 -0
- package/lib/api/contents/operations.js +19 -0
- package/lib/api/contents/runtimeMounts.d.ts +40 -0
- package/lib/api/contents/runtimeMounts.js +59 -0
- package/lib/api/contents/sandboxUid.d.ts +21 -0
- package/lib/api/contents/sandboxUid.js +27 -0
- package/lib/api/contents/sources.d.ts +19 -0
- package/lib/api/contents/sources.js +119 -0
- package/lib/api/contents/sync.d.ts +18 -0
- package/lib/api/contents/sync.js +69 -0
- package/lib/api/contents/transfers.d.ts +38 -0
- package/lib/api/contents/transfers.js +123 -0
- package/lib/api/evals/client.d.ts +402 -0
- package/lib/api/evals/client.js +359 -0
- package/lib/api/evals/index.d.ts +10 -0
- package/lib/api/evals/index.js +18 -0
- package/lib/api/evals/request.d.ts +43 -0
- package/lib/api/evals/request.js +67 -0
- package/lib/api/evals/status.d.ts +27 -0
- package/lib/api/evals/status.js +122 -0
- package/lib/api/evals/types.d.ts +1335 -0
- package/lib/api/evals/types.js +5 -0
- package/lib/api/iam/connectedAgents.d.ts +68 -0
- package/lib/api/iam/connectedAgents.js +87 -0
- package/lib/api/iam/identityProviders.d.ts +76 -0
- package/lib/api/iam/identityProviders.js +187 -0
- package/lib/api/iam/index.d.ts +3 -1
- package/lib/api/iam/index.js +3 -1
- package/lib/api/iam/mcpAlertRules.d.ts +51 -0
- package/lib/api/iam/mcpAlertRules.js +198 -0
- package/lib/api/iam/mcpAuditSettings.d.ts +46 -0
- package/lib/api/iam/mcpAuditSettings.js +120 -0
- package/lib/api/iam/mcpPolicy.d.ts +181 -0
- package/lib/api/iam/mcpPolicy.js +168 -0
- package/lib/api/iam/organizationTeams.d.ts +13 -0
- package/lib/api/iam/organizationTeams.js +43 -0
- package/lib/api/iam/profile.d.ts +17 -1
- package/lib/api/iam/profile.js +27 -0
- package/lib/api/iam/scimTokens.d.ts +79 -0
- package/lib/api/iam/scimTokens.js +141 -0
- package/lib/api/iam/secrets.js +9 -21
- package/lib/api/iam/serviceAgents.d.ts +68 -0
- package/lib/api/iam/serviceAgents.js +119 -0
- package/lib/api/iam/trials.d.ts +38 -0
- package/lib/api/iam/trials.js +66 -0
- package/lib/api/index.d.ts +8 -1
- package/lib/api/index.js +7 -1
- package/lib/api/mcp/activity.d.ts +37 -0
- package/lib/api/mcp/activity.js +26 -0
- package/lib/api/mcp/alerts.d.ts +25 -0
- package/lib/api/mcp/alerts.js +51 -0
- package/lib/api/mcp/audit.d.ts +29 -0
- package/lib/api/mcp/audit.js +55 -0
- package/lib/api/mcp/bindings.d.ts +18 -0
- package/lib/api/mcp/bindings.js +42 -0
- package/lib/api/mcp/forwarding.d.ts +25 -0
- package/lib/api/mcp/forwarding.js +46 -0
- package/lib/api/mcp/gateway.d.ts +16 -0
- package/lib/api/mcp/gateway.js +70 -0
- package/lib/api/mcp/generated.d.ts +22 -0
- package/lib/api/mcp/generated.js +213 -0
- package/lib/api/mcp/index.d.ts +17 -0
- package/lib/api/mcp/index.js +25 -0
- package/lib/api/mcp/observability.d.ts +141 -0
- package/lib/api/mcp/observability.js +267 -0
- package/lib/api/mcp/operations.d.ts +83 -0
- package/lib/api/mcp/operations.js +50 -0
- package/lib/api/mcp/organizations.d.ts +102 -0
- package/lib/api/mcp/organizations.js +46 -0
- package/lib/api/mcp/policy.d.ts +9 -0
- package/lib/api/mcp/policy.js +23 -0
- package/lib/api/mcp/tasks.d.ts +49 -0
- package/lib/api/mcp/tasks.js +147 -0
- package/lib/api/orchestration/client.d.ts +53 -0
- package/lib/api/orchestration/client.js +105 -0
- package/lib/api/orchestration/events.d.ts +88 -0
- package/lib/api/orchestration/events.js +245 -0
- package/lib/api/orchestration/generated.d.ts +693 -0
- package/lib/api/orchestration/generated.js +687 -0
- package/lib/api/orchestration/index.d.ts +30 -0
- package/lib/api/orchestration/index.js +34 -0
- package/lib/api/orchestration/lifecycle.d.ts +39 -0
- package/lib/api/orchestration/lifecycle.js +57 -0
- package/lib/api/orchestration/measures.d.ts +55 -0
- package/lib/api/orchestration/measures.js +99 -0
- package/lib/api/otel/dashboards.d.ts +56 -0
- package/lib/api/otel/dashboards.js +50 -0
- package/lib/api/otel/index.d.ts +1 -0
- package/lib/api/otel/index.js +1 -0
- package/lib/api/otel/metrics.d.ts +16 -0
- package/lib/api/otel/metrics.js +15 -0
- package/lib/api/scheduler/client.d.ts +32 -0
- package/lib/api/scheduler/client.js +42 -0
- package/lib/api/scheduler/index.d.ts +8 -0
- package/lib/api/scheduler/index.js +16 -0
- package/lib/api/scheduler/request.d.ts +28 -0
- package/lib/api/scheduler/request.js +50 -0
- package/lib/api/scheduler/types.d.ts +88 -0
- package/lib/api/scheduler/types.js +5 -0
- package/lib/api/spacer/comments.d.ts +97 -0
- package/lib/api/spacer/comments.js +45 -0
- package/lib/api/spacer/index.d.ts +9 -0
- package/lib/api/spacer/index.js +17 -0
- package/lib/api/spacer/notebooks.d.ts +33 -0
- package/lib/api/spacer/notebooks.js +39 -0
- package/lib/api/spacer/request.d.ts +25 -0
- package/lib/api/spacer/request.js +46 -0
- package/lib/api/spacer/spaces.d.ts +68 -0
- package/lib/api/spacer/spaces.js +45 -0
- package/lib/api/utils/validation.d.ts +4 -4
- package/lib/api/utils/validation.js +10 -7
- package/lib/client/auth/index.js +0 -5
- package/lib/client/auth/storage.js +0 -5
- package/lib/client/auth/strategies.js +0 -5
- package/lib/client/base.d.ts +6 -0
- package/lib/client/base.js +8 -0
- package/lib/client/constants.d.ts +1 -0
- package/lib/client/constants.js +1 -0
- package/lib/client/index.d.ts +0 -10
- package/lib/client/index.js +2 -2
- package/lib/client/mixins/ContentsMixin.d.ts +71 -0
- package/lib/client/mixins/ContentsMixin.js +157 -0
- package/lib/client/mixins/IAMMixin.d.ts +0 -31
- package/lib/client/mixins/IAMMixin.js +0 -58
- package/lib/components/animation/AnimatedText.d.ts +2 -44
- package/lib/components/animation/AnimatedText.js +6 -126
- package/lib/components/anonymous/AnonymousKeyExpired.d.ts +56 -0
- package/lib/components/anonymous/AnonymousKeyExpired.js +96 -0
- package/lib/components/anonymous/AnonymousKeyTimer.d.ts +63 -0
- package/lib/components/anonymous/AnonymousKeyTimer.js +140 -0
- package/lib/components/anonymous/index.d.ts +7 -0
- package/lib/components/anonymous/index.js +15 -0
- package/lib/components/auth/SigInAPIKey.d.ts +1 -0
- package/lib/components/auth/SigInAPIKey.js +0 -6
- package/lib/components/auth/SignIn.d.ts +1 -0
- package/lib/components/auth/SignIn.js +0 -4
- package/lib/components/auth/SignIn.stories.d.ts +2 -2
- package/lib/components/avatars/BoringAvatar.d.ts +1 -1
- package/lib/components/avatars/BoringAvatar.stories.d.ts +1 -1
- package/lib/components/avatars/DLAvatar.d.ts +1 -1
- package/lib/components/avatars/DLAvatar.js +0 -4
- package/lib/components/avatars/UserAvatar.d.ts +16 -1
- package/lib/components/avatars/UserAvatar.js +15 -13
- package/lib/components/avatars/UserProfileAvatar.d.ts +1 -1
- package/lib/components/banners/NoAutomationBanner.d.ts +1 -1
- package/lib/components/billing/BillingEntitySelect.d.ts +16 -0
- package/lib/components/billing/BillingEntitySelect.js +49 -27
- package/lib/components/billing/eligibility.d.ts +22 -0
- package/lib/components/billing/eligibility.js +27 -0
- package/lib/components/billing/index.d.ts +1 -0
- package/lib/components/billing/index.js +1 -4
- package/lib/components/buttons/DownloadCSVButton.d.ts +1 -1
- package/lib/components/buttons/DownloadJsonButton.d.ts +1 -1
- package/lib/components/buttons/LongActionButton.d.ts +1 -0
- package/lib/components/buttons/LongActionButton.js +0 -4
- package/lib/components/buttons/UploadButton.d.ts +1 -0
- package/lib/components/buttons/UploadButton.js +0 -4
- package/lib/components/checkout/StripeCheckout.d.ts +1 -1
- package/lib/components/collaboration/LiveEditorCollaborators.d.ts +36 -0
- package/lib/components/collaboration/LiveEditorCollaborators.js +88 -53
- package/lib/components/collaboration/index.js +0 -4
- package/lib/components/confetti/ConfettiSuccess.d.ts +1 -1
- package/lib/components/contents/ContentSourceCard.d.ts +8 -0
- package/lib/components/contents/ContentSourceCard.js +23 -0
- package/lib/components/contents/HomeFolderObjectsBrowser.d.ts +10 -0
- package/lib/components/contents/HomeFolderObjectsBrowser.js +148 -0
- package/lib/components/contents/index.d.ts +2 -0
- package/lib/components/contents/index.js +6 -0
- package/lib/components/context/OrganizationSelect.d.ts +1 -1
- package/lib/components/display/AvatarSkeleton.d.ts +1 -1
- package/lib/components/display/BusyDots.d.ts +1 -1
- package/lib/components/display/CenteredSpinner.d.ts +1 -1
- package/lib/components/display/CodePreview.d.ts +1 -1
- package/lib/components/display/DatalayerBox.d.ts +7 -3
- package/lib/components/display/DatalayerBox.js +7 -7
- package/lib/components/display/HorizontalCenter.d.ts +1 -1
- package/lib/components/display/JupyterDialog.d.ts +1 -0
- package/lib/components/display/JupyterDialog.js +1 -7
- package/lib/components/display/Markdown.d.ts +1 -0
- package/lib/components/display/NavLink.js +3 -2
- package/lib/components/display/NotebookSkeleton.d.ts +1 -1
- package/lib/components/display/Placeholder.d.ts +1 -1
- package/lib/components/display/ToTopBranded.d.ts +1 -1
- package/lib/components/echarts/EChartsReact.d.ts +1 -1
- package/lib/components/flashes/FlashClosable.d.ts +1 -0
- package/lib/components/flashes/FlashClosable.js +0 -4
- package/lib/components/flashes/FlashGuest.d.ts +1 -1
- package/lib/components/flashes/FlashSurveys.d.ts +1 -1
- package/lib/components/flashes/FlashUnauthorized.d.ts +1 -0
- package/lib/components/flashes/FlashUnauthorized.js +0 -6
- package/lib/components/flashes/surveys/Survey2025_1.d.ts +1 -1
- package/lib/components/iam/ExternalTokenSilentLogin.d.ts +1 -1
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +2 -0
- package/lib/components/labels/StatusLabels.d.ts +2 -9
- package/lib/components/labels/StatusLabels.js +2 -26
- package/lib/components/labels/VisibilityLabel.d.ts +1 -1
- package/lib/components/landings/StepBlock.d.ts +1 -1
- package/lib/components/mcp/ClientBadge.d.ts +41 -0
- package/lib/components/mcp/ClientBadge.js +33 -0
- package/lib/components/mcp/McpErrorBlankslate.d.ts +21 -0
- package/lib/components/mcp/McpErrorBlankslate.js +17 -0
- package/lib/components/mcp/ScopeList.d.ts +28 -0
- package/lib/components/mcp/ScopeList.js +14 -0
- package/lib/components/mcp/index.d.ts +10 -0
- package/lib/components/mcp/index.js +18 -0
- package/lib/components/navbar/NavigationVisbilityObserver.d.ts +2 -1
- package/lib/components/navbar/SubdomainNavBar.d.ts +10 -5
- package/lib/components/navbar/SubdomainNavBar.js +2 -1
- package/lib/components/notebooks/JupyterNotebook.d.ts +1 -1
- package/lib/components/notebooks/JupyterNotebookToolbar.d.ts +1 -1
- package/lib/components/principal/PrincipalAppearance.d.ts +22 -42
- package/lib/components/principal/PrincipalAppearance.js +232 -182
- package/lib/components/principal/PrincipalAvatar.d.ts +9 -1
- package/lib/components/principal/PrincipalAvatar.js +18 -10
- package/lib/components/principal/PrincipalBadge.d.ts +1 -1
- package/lib/components/principal/PrincipalBanner.d.ts +1 -1
- package/lib/components/principal/PrincipalDetailsOverlay.d.ts +38 -1
- package/lib/components/principal/PrincipalDetailsOverlay.js +64 -33
- package/lib/components/principal/PrincipalHoverCard.d.ts +31 -0
- package/lib/components/principal/PrincipalHoverCard.js +52 -0
- package/lib/components/principal/PrincipalSwitcherMenu.d.ts +1 -0
- package/lib/components/principal/PrincipalSwitcherMenu.js +5 -14
- package/lib/components/principal/index.d.ts +2 -1
- package/lib/components/principal/index.js +2 -1
- package/lib/components/progress/ConsumptionBar.d.ts +1 -0
- package/lib/components/progress/ConsumptionBar.js +0 -4
- package/lib/components/progress/ProgressRing.d.ts +1 -0
- package/lib/components/progress/SpinnerBar.d.ts +1 -1
- package/lib/components/progress/Timer.d.ts +1 -0
- package/lib/components/progress/Timer.js +0 -4
- package/lib/components/screencapture/Screencapture.js +46 -3
- package/lib/components/screencapture/ScreencaptureButton.d.ts +1 -1
- package/lib/components/sharing/ShareAccessComponent.d.ts +58 -3
- package/lib/components/sharing/ShareAccessComponent.js +143 -98
- package/lib/components/sharing/SharingEditor.d.ts +21 -0
- package/lib/components/sharing/SharingEditor.js +9 -28
- package/lib/components/sharing/index.d.ts +1 -0
- package/lib/components/sharing/index.js +1 -0
- package/lib/components/sharing/sandboxSharing.d.ts +26 -0
- package/lib/components/sharing/sandboxSharing.js +41 -0
- package/lib/components/spaces/SpaceDetailsOverlay.d.ts +39 -0
- package/lib/components/spaces/SpaceDetailsOverlay.js +80 -0
- package/lib/components/spaces/SpaceDisplay.d.ts +38 -0
- package/lib/components/spaces/SpaceDisplay.js +92 -0
- package/lib/components/spaces/index.d.ts +4 -0
- package/lib/components/spaces/index.js +7 -0
- package/lib/components/spaces/spaceDisplayModel.d.ts +93 -0
- package/lib/components/spaces/spaceDisplayModel.js +170 -0
- package/lib/components/sparklines/Sparklines.js +3 -4
- package/lib/components/sparklines/index.js +0 -4
- package/lib/components/storage/ContentsBrowser.d.ts +25 -1
- package/lib/components/storage/ContentsBrowser.js +145 -52
- package/lib/components/storage/ContentsBrowserMock.d.ts +3 -0
- package/lib/components/storage/ContentsBrowserMock.js +75 -0
- package/lib/components/storage/ContentsItems.d.ts +2 -1
- package/lib/components/storage/ContentsItems.js +0 -4
- package/lib/components/storage/ContentsTable.d.ts +50 -0
- package/lib/components/storage/ContentsTable.js +134 -0
- package/lib/components/storage/HomeFolderDrive.d.ts +71 -0
- package/lib/components/storage/HomeFolderDrive.js +248 -0
- package/lib/components/storage/index.d.ts +2 -0
- package/lib/components/storage/index.js +2 -0
- package/lib/components/students/StudentItemStatus.d.ts +1 -1
- package/lib/components/students/StudentResultCircle.d.ts +1 -1
- package/lib/components/subnav/SubNav.d.ts +5 -5
- package/lib/components/subnav/SubNav.js +11 -9
- package/lib/components/tables/DataTable.d.ts +1 -1
- package/lib/components/text-reveal/TextRevealAnimation.d.ts +2 -2
- package/lib/components/text-reveal/useTextRevealAnimationLines.d.ts +1 -1
- package/lib/components/time/LiveRelativeTime.d.ts +1 -0
- package/lib/components/time/LiveRelativeTime.js +0 -8
- package/lib/components/time/index.js +0 -4
- package/lib/components/timeline/Timeline.d.ts +1 -1
- package/lib/components/timeline/index.js +0 -4
- package/lib/components/users/PeerIndicator.d.ts +1 -0
- package/lib/components/users/PeerIndicator.js +0 -4
- package/lib/config/Configuration.d.ts +15 -17
- package/lib/config/Configuration.js +7 -0
- package/lib/hooks/cacheConverters.d.ts +0 -7
- package/lib/hooks/cacheConverters.js +0 -25
- package/lib/hooks/index.d.ts +3 -0
- package/lib/hooks/index.js +3 -0
- package/lib/hooks/layouts/LayoutBackdrop.d.ts +1 -1
- package/lib/hooks/layouts/LayoutScreencapture.d.ts +1 -1
- package/lib/hooks/useBackdrop.d.ts +1 -1
- package/lib/hooks/useBackdropJupyterLab.d.ts +3 -2
- package/lib/hooks/useBackdropJupyterLab.js +0 -4
- package/lib/hooks/useBillingEntityStore.js +3 -0
- package/lib/hooks/useCache.d.ts +478 -130
- package/lib/hooks/useCache.js +1580 -676
- package/lib/hooks/useContainsFocus.d.ts +1 -1
- package/lib/hooks/useContents.d.ts +334 -0
- package/lib/hooks/useContents.js +1033 -0
- package/lib/hooks/useFocusTrap.d.ts +4 -4
- package/lib/hooks/useFocusTrap.js +1 -1
- package/lib/hooks/useMcp.d.ts +315 -0
- package/lib/hooks/useMcp.js +891 -0
- package/lib/hooks/useMobile.js +0 -5
- package/lib/hooks/useNavigate.d.ts +41 -3
- package/lib/hooks/useNavigate.js +106 -52
- package/lib/hooks/usePrincipalCacheStore.js +3 -0
- package/lib/hooks/usePrincipalStore.js +3 -0
- package/lib/hooks/useProjectStore.d.ts +3 -3
- package/lib/hooks/useProjectStore.js +4 -4
- package/lib/hooks/useRef.d.ts +1 -1
- package/lib/hooks/useRef.js +3 -0
- package/lib/hooks/useScreencapture.d.ts +2 -1
- package/lib/hooks/useScreencapture.js +0 -4
- package/lib/hooks/useSpaceCacheStore.d.ts +50 -0
- package/lib/hooks/useSpaceCacheStore.js +85 -0
- package/lib/hooks/useToast.js +0 -4
- package/lib/hooks/useVisibilityObserver.d.ts +1 -1
- package/lib/index.d.ts +4 -1
- package/lib/index.js +3 -1
- package/lib/mocks/components/FlashMock.d.ts +1 -1
- package/lib/mocks/views/ActionMenuMock.d.ts +1 -1
- package/lib/mocks/views/ChartMock.d.ts +1 -1
- package/lib/mocks/views/DashboardMock.d.ts +1 -1
- package/lib/mocks/views/FormMock.d.ts +1 -1
- package/lib/mocks/views/TableMock.d.ts +1 -1
- package/lib/mocks/views/WipMock.d.ts +1 -1
- package/lib/models/Credits.d.ts +16 -0
- package/lib/models/Credits.js +22 -0
- package/lib/models/CreditsDTO.d.ts +6 -5
- package/lib/models/CreditsDTO.js +7 -5
- package/lib/models/McpAuditEvent.d.ts +52 -0
- package/lib/models/McpAuditEvent.js +5 -0
- package/lib/models/McpBinding.d.ts +57 -0
- package/lib/models/McpBinding.js +5 -0
- package/lib/models/McpPolicy.d.ts +77 -0
- package/lib/models/McpPolicy.js +5 -0
- package/lib/models/McpTask.d.ts +94 -0
- package/lib/models/McpTask.js +7 -0
- package/lib/models/Organization.d.ts +69 -0
- package/lib/models/Organization.js +96 -0
- package/lib/models/Secret.d.ts +1 -2
- package/lib/models/Secret.js +2 -18
- package/lib/models/StartedBy.d.ts +91 -0
- package/lib/models/StartedBy.js +117 -0
- package/lib/models/Team.d.ts +2 -0
- package/lib/models/Team.js +2 -0
- package/lib/models/User.d.ts +4 -0
- package/lib/models/User.js +3 -0
- package/lib/models/UserDTO.js +4 -2
- package/lib/models/UserSettings.d.ts +13 -0
- package/lib/models/UserSettings.js +9 -0
- package/lib/models/contents/__fixtures__/solr-codec.json +57 -0
- package/lib/models/contents/__fixtures__/v1-contracts.json +194 -0
- package/lib/models/contents/fieldCase.d.ts +8 -0
- package/lib/models/contents/fieldCase.js +37 -0
- package/lib/models/contents/index.d.ts +2 -0
- package/lib/models/contents/index.js +6 -0
- package/lib/models/contents/permissions.d.ts +16 -0
- package/lib/models/contents/permissions.js +34 -0
- package/lib/models/index.d.ts +5 -1
- package/lib/models/index.js +5 -1
- package/lib/navigation/components.js +2 -3
- package/lib/routes/publicPaths.js +4 -0
- package/lib/state/index.d.ts +1 -0
- package/lib/state/index.js +1 -0
- package/lib/state/sessionEnd.d.ts +55 -0
- package/lib/state/sessionEnd.js +162 -0
- package/lib/state/substates/CoreState.d.ts +15 -7
- package/lib/state/substates/CoreState.js +21 -17
- package/lib/state/substates/IAMState.d.ts +1 -1
- package/lib/state/substates/IAMState.js +12 -5
- package/lib/state/substates/LayoutState.js +12 -0
- package/lib/state/substates/ProfileState.d.ts +1 -0
- package/lib/state/substates/ProfileState.js +1 -4
- package/lib/state/substates/index.d.ts +0 -1
- package/lib/state/substates/index.js +0 -1
- package/lib/utils/Jwt.d.ts +26 -0
- package/lib/utils/Jwt.js +37 -0
- package/lib/utils/Lazy.d.ts +20 -0
- package/lib/utils/Lazy.js +32 -6
- package/lib/utils/Screencapture.js +3 -0
- package/lib/utils/WithSuspense.d.ts +11 -1
- package/lib/utils/WithSuspense.js +11 -1
- package/lib/views/api-keys/APIKeyEdit.d.ts +1 -1
- package/lib/views/api-keys/APIKeyNew.d.ts +1 -1
- package/lib/views/api-keys/APIKeys.d.ts +1 -1
- package/lib/views/api-keys/APIKeys.js +30 -4
- package/lib/views/api-keys/APIKeysStandalone.d.ts +5 -1
- package/lib/views/api-keys/APIKeysStandalone.js +2 -2
- package/lib/views/datasources/DatasourceDetail.d.ts +12 -5
- package/lib/views/datasources/DatasourceDetail.js +80 -110
- package/lib/views/datasources/DatasourceNew.d.ts +14 -8
- package/lib/views/datasources/DatasourceNew.js +129 -118
- package/lib/views/datasources/Datasources.d.ts +39 -7
- package/lib/views/datasources/Datasources.js +95 -40
- package/lib/views/datasources/DatasourcesMock.d.ts +3 -0
- package/lib/views/datasources/DatasourcesMock.js +57 -0
- package/lib/views/iam/SignInSimple.d.ts +12 -0
- package/lib/views/iam/SignInSimple.js +4 -4
- package/lib/views/index.d.ts +1 -0
- package/lib/views/index.js +1 -0
- package/lib/views/mcp/AdmittedClients.d.ts +44 -0
- package/lib/views/mcp/AdmittedClients.js +59 -0
- package/lib/views/mcp/AlertDestinations.d.ts +34 -0
- package/lib/views/mcp/AlertDestinations.js +75 -0
- package/lib/views/mcp/AlertRules.d.ts +32 -0
- package/lib/views/mcp/AlertRules.js +245 -0
- package/lib/views/mcp/ApprovalQueue.d.ts +66 -0
- package/lib/views/mcp/ApprovalQueue.js +95 -0
- package/lib/views/mcp/AuditLog.d.ts +42 -0
- package/lib/views/mcp/AuditLog.js +144 -0
- package/lib/views/mcp/ConnectedAgents.d.ts +34 -0
- package/lib/views/mcp/ConnectedAgents.js +135 -0
- package/lib/views/mcp/EnterpriseConsole.d.ts +74 -0
- package/lib/views/mcp/EnterpriseConsole.js +195 -0
- package/lib/views/mcp/IdentityProviders.d.ts +33 -0
- package/lib/views/mcp/IdentityProviders.js +299 -0
- package/lib/views/mcp/McpDashboard.d.ts +50 -0
- package/lib/views/mcp/McpDashboard.js +430 -0
- package/lib/views/mcp/McpHome.d.ts +92 -0
- package/lib/views/mcp/McpHome.js +153 -0
- package/lib/views/mcp/McpObservability.d.ts +79 -0
- package/lib/views/mcp/McpObservability.js +236 -0
- package/lib/views/mcp/NotebookRuns.d.ts +39 -0
- package/lib/views/mcp/NotebookRuns.js +44 -0
- package/lib/views/mcp/OrganizationPolicy.d.ts +45 -0
- package/lib/views/mcp/OrganizationPolicy.js +108 -0
- package/lib/views/mcp/OrganizationUsage.d.ts +69 -0
- package/lib/views/mcp/OrganizationUsage.js +113 -0
- package/lib/views/mcp/PersonalPolicy.d.ts +54 -0
- package/lib/views/mcp/PersonalPolicy.js +126 -0
- package/lib/views/mcp/Policies.d.ts +53 -0
- package/lib/views/mcp/Policies.js +210 -0
- package/lib/views/mcp/PolicyForm.d.ts +83 -0
- package/lib/views/mcp/PolicyForm.js +113 -0
- package/lib/views/mcp/PolicyHistory.d.ts +58 -0
- package/lib/views/mcp/PolicyHistory.js +75 -0
- package/lib/views/mcp/RunDetail.d.ts +87 -0
- package/lib/views/mcp/RunDetail.js +186 -0
- package/lib/views/mcp/ScimProvisioning.d.ts +54 -0
- package/lib/views/mcp/ScimProvisioning.js +173 -0
- package/lib/views/mcp/ServiceAgents.d.ts +46 -0
- package/lib/views/mcp/ServiceAgents.js +194 -0
- package/lib/views/mcp/TeamPolicies.d.ts +33 -0
- package/lib/views/mcp/TeamPolicies.js +159 -0
- package/lib/views/mcp/ToolAccess.d.ts +60 -0
- package/lib/views/mcp/ToolAccess.js +101 -0
- package/lib/views/mcp/TraceTimeline.d.ts +81 -0
- package/lib/views/mcp/TraceTimeline.js +132 -0
- package/lib/views/mcp/format.d.ts +25 -0
- package/lib/views/mcp/format.js +77 -0
- package/lib/views/mcp/index.d.ts +34 -0
- package/lib/views/mcp/index.js +42 -0
- package/lib/views/mcp/types.d.ts +66 -0
- package/lib/views/mcp/types.js +5 -0
- package/lib/views/otel/simpleAuthStore.js +3 -0
- package/lib/views/secrets/SecretEdit.d.ts +5 -1
- package/lib/views/secrets/SecretEdit.js +5 -4
- package/lib/views/secrets/SecretNew.d.ts +11 -1
- package/lib/views/secrets/SecretNew.js +7 -3
- package/lib/views/secrets/Secrets.d.ts +12 -1
- package/lib/views/secrets/Secrets.js +2 -2
- package/package.json +269 -260
- package/scripts/generate-contents-types.py +169 -0
- package/scripts/generate-mcp-types.py +233 -0
- package/scripts/generate-orchestration-types.py +920 -0
- package/lib/api/iam/datasources.d.ts +0 -86
- package/lib/api/iam/datasources.js +0 -185
- package/lib/components/toolbars/index.d.ts +0 -1
- package/lib/models/Datasource.d.ts +0 -181
- package/lib/models/Datasource.js +0 -154
- package/lib/state/substates/DatasourceState.d.ts +0 -11
- package/lib/state/substates/DatasourceState.js +0 -16
- /package/lib/{components/toolbars/index.js → api/contents/generated.js} +0 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/** A scope in the words of the consent screen. */
|
|
2
|
+
export interface ConnectedAgentScope {
|
|
3
|
+
name: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
}
|
|
7
|
+
/** How the client registered: by document URL, or the deprecated fallback. */
|
|
8
|
+
export type ConnectedAgentRegistration = 'cimd' | 'dcr';
|
|
9
|
+
export interface ConnectedAgent {
|
|
10
|
+
/** The grant's uid: what **Disconnect** names. */
|
|
11
|
+
uid: string;
|
|
12
|
+
clientId: string;
|
|
13
|
+
clientName: string;
|
|
14
|
+
/**
|
|
15
|
+
* The hostname of the client's document when it registered by URL — the
|
|
16
|
+
* part of a client's identity that cannot be invented, and what the
|
|
17
|
+
* consent screen showed. Empty for a DCR client.
|
|
18
|
+
*/
|
|
19
|
+
clientHostname: string;
|
|
20
|
+
registration: ConnectedAgentRegistration;
|
|
21
|
+
scopes: string[];
|
|
22
|
+
scopeDetails: ConnectedAgentScope[];
|
|
23
|
+
/** The MCP resource the grant is for. */
|
|
24
|
+
resource: string;
|
|
25
|
+
createdAt?: string | null;
|
|
26
|
+
lastUsedAt?: string | null;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Whether a client id is a Client ID Metadata Document URL: `https`, a host
|
|
30
|
+
* and a path, no fragment. IAM answers `registration` itself; this is for a
|
|
31
|
+
* client id read from somewhere else, such as an audit row or a task.
|
|
32
|
+
*/
|
|
33
|
+
export declare const isCimdClientId: (clientId: string) => boolean;
|
|
34
|
+
export declare const listConnectedAgents: (token: string, baseUrl?: string) => Promise<ConnectedAgent[]>;
|
|
35
|
+
/** Revoke one grant. A grant that is not the caller's is a `404`, not a revocation. */
|
|
36
|
+
export declare const disconnectAgent: (token: string, grantUid: string, baseUrl?: string) => Promise<{
|
|
37
|
+
success: boolean;
|
|
38
|
+
message?: string;
|
|
39
|
+
}>;
|
|
40
|
+
/**
|
|
41
|
+
* Disconnect every agent this person has connected — sign out everywhere.
|
|
42
|
+
*
|
|
43
|
+
* **This is also how a forced re-consent is done.** A grant *is* the consent,
|
|
44
|
+
* so ending them all sends the next authorization through the consent screen
|
|
45
|
+
* rather than letting it be answered from what was agreed before; there is no
|
|
46
|
+
* separate "ask again" flag to keep in step with this one.
|
|
47
|
+
*
|
|
48
|
+
* Always the caller's own. A person cannot end somebody else's sessions here
|
|
49
|
+
* — an organization taking back what it granted is deprovisioning, which runs
|
|
50
|
+
* when a membership ends.
|
|
51
|
+
*/
|
|
52
|
+
export declare const disconnectEveryAgent: (token: string, baseUrl?: string) => Promise<{
|
|
53
|
+
success: boolean;
|
|
54
|
+
revoked: number;
|
|
55
|
+
message?: string;
|
|
56
|
+
}>;
|
|
57
|
+
/**
|
|
58
|
+
* Disconnect every agent connected while acting for one team.
|
|
59
|
+
*
|
|
60
|
+
* For the people who may manage that team: ending a team's sessions is the
|
|
61
|
+
* same kind of authority as removing somebody from it. It never touches a
|
|
62
|
+
* personal agent or another team's — the same narrowness deprovisioning has.
|
|
63
|
+
*/
|
|
64
|
+
export declare const disconnectEveryAgentInTeam: (token: string, teamUid: string, baseUrl?: string) => Promise<{
|
|
65
|
+
success: boolean;
|
|
66
|
+
revoked: number;
|
|
67
|
+
message?: string;
|
|
68
|
+
}>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/*
|
|
6
|
+
* Copyright (c) 2023-2026 Datalayer, Inc.
|
|
7
|
+
* Distributed under the terms of the Modified BSD License.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The agents a person has connected: the OAuth grants IAM holds for them,
|
|
11
|
+
* one per client, with the scopes approved and when each was last used.
|
|
12
|
+
*
|
|
13
|
+
* Disconnecting revokes the grant: the refresh token stops working at once,
|
|
14
|
+
* and an access token the agent still holds dies with its own expiry, which
|
|
15
|
+
* is why they are short.
|
|
16
|
+
*
|
|
17
|
+
* @module api/iam/connectedAgents
|
|
18
|
+
*/
|
|
19
|
+
import { requestDatalayerAPI } from '../DatalayerApi.js';
|
|
20
|
+
import { API_BASE_PATHS, DEFAULT_SERVICE_URLS } from '../constants.js';
|
|
21
|
+
const connectedAgentsUrl = (baseUrl, suffix = '') => `${baseUrl}${API_BASE_PATHS.IAM}/oauth/connected-agents${suffix}`;
|
|
22
|
+
/**
|
|
23
|
+
* Whether a client id is a Client ID Metadata Document URL: `https`, a host
|
|
24
|
+
* and a path, no fragment. IAM answers `registration` itself; this is for a
|
|
25
|
+
* client id read from somewhere else, such as an audit row or a task.
|
|
26
|
+
*/
|
|
27
|
+
export const isCimdClientId = (clientId) => /^https:\/\/[^/?#]+\/[^#]*$/.test(clientId);
|
|
28
|
+
export const listConnectedAgents = async (token, baseUrl = DEFAULT_SERVICE_URLS.IAM) => {
|
|
29
|
+
const response = await requestDatalayerAPI({
|
|
30
|
+
url: connectedAgentsUrl(baseUrl),
|
|
31
|
+
method: 'GET',
|
|
32
|
+
token,
|
|
33
|
+
});
|
|
34
|
+
return (response.agents ?? []).map(agent => ({
|
|
35
|
+
uid: agent.uid,
|
|
36
|
+
clientId: agent.client_id ?? '',
|
|
37
|
+
clientName: agent.client_name ?? agent.client_id ?? '',
|
|
38
|
+
clientHostname: agent.client_hostname ?? '',
|
|
39
|
+
registration: agent.registration ?? 'dcr',
|
|
40
|
+
scopes: agent.scopes ?? [],
|
|
41
|
+
scopeDetails: agent.scope_details ?? [],
|
|
42
|
+
resource: agent.resource ?? '',
|
|
43
|
+
createdAt: agent.created_at ?? null,
|
|
44
|
+
lastUsedAt: agent.last_used_at ?? null,
|
|
45
|
+
}));
|
|
46
|
+
};
|
|
47
|
+
/** Revoke one grant. A grant that is not the caller's is a `404`, not a revocation. */
|
|
48
|
+
export const disconnectAgent = async (token, grantUid, baseUrl = DEFAULT_SERVICE_URLS.IAM) => requestDatalayerAPI({
|
|
49
|
+
url: connectedAgentsUrl(baseUrl, `/${encodeURIComponent(grantUid)}`),
|
|
50
|
+
method: 'DELETE',
|
|
51
|
+
token,
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* Disconnect every agent this person has connected — sign out everywhere.
|
|
55
|
+
*
|
|
56
|
+
* **This is also how a forced re-consent is done.** A grant *is* the consent,
|
|
57
|
+
* so ending them all sends the next authorization through the consent screen
|
|
58
|
+
* rather than letting it be answered from what was agreed before; there is no
|
|
59
|
+
* separate "ask again" flag to keep in step with this one.
|
|
60
|
+
*
|
|
61
|
+
* Always the caller's own. A person cannot end somebody else's sessions here
|
|
62
|
+
* — an organization taking back what it granted is deprovisioning, which runs
|
|
63
|
+
* when a membership ends.
|
|
64
|
+
*/
|
|
65
|
+
export const disconnectEveryAgent = async (token, baseUrl = DEFAULT_SERVICE_URLS.IAM) => {
|
|
66
|
+
const response = await requestDatalayerAPI({
|
|
67
|
+
url: connectedAgentsUrl(baseUrl),
|
|
68
|
+
method: 'DELETE',
|
|
69
|
+
token,
|
|
70
|
+
});
|
|
71
|
+
return { ...response, revoked: response.revoked ?? 0 };
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Disconnect every agent connected while acting for one team.
|
|
75
|
+
*
|
|
76
|
+
* For the people who may manage that team: ending a team's sessions is the
|
|
77
|
+
* same kind of authority as removing somebody from it. It never touches a
|
|
78
|
+
* personal agent or another team's — the same narrowness deprovisioning has.
|
|
79
|
+
*/
|
|
80
|
+
export const disconnectEveryAgentInTeam = async (token, teamUid, baseUrl = DEFAULT_SERVICE_URLS.IAM) => {
|
|
81
|
+
const response = await requestDatalayerAPI({
|
|
82
|
+
url: `${baseUrl}${API_BASE_PATHS.IAM}/oauth/teams/${encodeURIComponent(teamUid)}/connected-agents`,
|
|
83
|
+
method: 'DELETE',
|
|
84
|
+
token,
|
|
85
|
+
});
|
|
86
|
+
return { ...response, revoked: response.revoked ?? 0 };
|
|
87
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/** A role a group mapping may grant, at the organization or at a team. */
|
|
2
|
+
export declare const ORGANIZATION_ROLES: readonly ["organization_owner", "organization_security_auditor", "organization_user_reviewer", "organization_member"];
|
|
3
|
+
export declare const TEAM_ROLES: readonly ["team_owner", "team_member"];
|
|
4
|
+
export type OrganizationRole = (typeof ORGANIZATION_ROLES)[number];
|
|
5
|
+
export type TeamRole = (typeof TEAM_ROLES)[number];
|
|
6
|
+
/** One `groups` claim mapped onto one role, at the organization or a team. */
|
|
7
|
+
export interface RoleMapping {
|
|
8
|
+
/** The group, exactly as the token names it. */
|
|
9
|
+
group: string;
|
|
10
|
+
role: OrganizationRole | TeamRole;
|
|
11
|
+
/** Which team, when `role` is a team role; empty for an organization role. */
|
|
12
|
+
teamUid: string;
|
|
13
|
+
}
|
|
14
|
+
export interface IdentityProvider {
|
|
15
|
+
uid: string;
|
|
16
|
+
orgUid: string;
|
|
17
|
+
name: string;
|
|
18
|
+
protocol: 'oidc';
|
|
19
|
+
issuer: string;
|
|
20
|
+
clientId: string;
|
|
21
|
+
/** The *name* of a secret in this organization's store — never the secret. */
|
|
22
|
+
clientSecretRef: string;
|
|
23
|
+
/** Domains this provider claims. Claiming is free; see `verifiedDomains`. */
|
|
24
|
+
domains: string[];
|
|
25
|
+
/** The claimed domains proved by DNS. Only these route a sign-in. */
|
|
26
|
+
verifiedDomains: string[];
|
|
27
|
+
groupClaim: string;
|
|
28
|
+
/** Whether a sign-in may adopt a Datalayer account that already exists
|
|
29
|
+
* with the asserted address, rather than being refused. Off by default:
|
|
30
|
+
* see the module and provisioning notes for why. */
|
|
31
|
+
allowEmailLinking: boolean;
|
|
32
|
+
roleMappings: RoleMapping[];
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
createdBy?: string;
|
|
35
|
+
createdAt?: string;
|
|
36
|
+
updatedAt?: string;
|
|
37
|
+
version?: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A provider as it is written. Everything but what the route already names
|
|
41
|
+
* and `verifiedDomains` — which is never sent, only ever read: it is set
|
|
42
|
+
* exclusively by `verifyDomain` checking DNS, and a draft that could set it
|
|
43
|
+
* directly would be a way to claim verification without proving anything.
|
|
44
|
+
*/
|
|
45
|
+
export type IdentityProviderDraft = Omit<IdentityProvider, 'uid' | 'orgUid' | 'verifiedDomains' | 'createdBy' | 'createdAt' | 'updatedAt' | 'version'>;
|
|
46
|
+
export interface DomainVerification {
|
|
47
|
+
host: string;
|
|
48
|
+
type: 'TXT';
|
|
49
|
+
value: string;
|
|
50
|
+
}
|
|
51
|
+
/** Raised when the registry refused a provider as written — a bad issuer, an
|
|
52
|
+
* unowned domain, an unknown role in a mapping. The message is IAM's own. */
|
|
53
|
+
export declare class IdentityProviderInvalid extends Error {
|
|
54
|
+
constructor(message: string);
|
|
55
|
+
}
|
|
56
|
+
export declare const listIdentityProviders: (token: string, orgUid: string, baseUrl?: string) => Promise<IdentityProvider[]>;
|
|
57
|
+
export declare const getIdentityProvider: (token: string, orgUid: string, uid: string, baseUrl?: string) => Promise<IdentityProvider>;
|
|
58
|
+
export declare const createIdentityProvider: (token: string, orgUid: string, provider: IdentityProviderDraft, baseUrl?: string) => Promise<IdentityProvider>;
|
|
59
|
+
export declare const updateIdentityProvider: (token: string, orgUid: string, uid: string, provider: IdentityProviderDraft, baseUrl?: string) => Promise<IdentityProvider>;
|
|
60
|
+
export declare const enableIdentityProvider: (token: string, orgUid: string, uid: string, baseUrl?: string) => Promise<IdentityProvider>;
|
|
61
|
+
export declare const disableIdentityProvider: (token: string, orgUid: string, uid: string, baseUrl?: string) => Promise<IdentityProvider>;
|
|
62
|
+
/** Remove a registration outright. Prefer disabling one that has been used:
|
|
63
|
+
* this keeps no trace for the sign-in rows that name it. */
|
|
64
|
+
export declare const deleteIdentityProvider: (token: string, orgUid: string, uid: string, baseUrl?: string) => Promise<void>;
|
|
65
|
+
/** What to publish in DNS to prove this organization holds `domain`. */
|
|
66
|
+
export declare const getDomainVerification: (token: string, orgUid: string, uid: string, domain: string, baseUrl?: string) => Promise<{
|
|
67
|
+
verification: DomainVerification;
|
|
68
|
+
verified: boolean;
|
|
69
|
+
}>;
|
|
70
|
+
/**
|
|
71
|
+
* Check DNS now and, if the record is there, make the domain route sign-in.
|
|
72
|
+
*
|
|
73
|
+
* Until this succeeds the domain routes nothing at all, whatever was typed
|
|
74
|
+
* when the provider was registered.
|
|
75
|
+
*/
|
|
76
|
+
export declare const verifyDomain: (token: string, orgUid: string, uid: string, domain: string, baseUrl?: string) => Promise<IdentityProvider>;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/*
|
|
6
|
+
* Copyright (c) 2023-2026 Datalayer, Inc.
|
|
7
|
+
* Distributed under the terms of the Modified BSD License.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* An organization's own identity provider.
|
|
11
|
+
*
|
|
12
|
+
* Enterprise sign-in used to be one Okta for the whole deployment. This is
|
|
13
|
+
* the registry that replaces it: an organization registers an OIDC provider
|
|
14
|
+
* — issuer, client id, the email domains it claims — and a sign-in is routed
|
|
15
|
+
* to it by domain.
|
|
16
|
+
*
|
|
17
|
+
* **A claim is not proof.** Registering a domain here does not route
|
|
18
|
+
* anything: only a domain proved by a DNS TXT record does, because a domain
|
|
19
|
+
* that only had to be typed would let one organization receive another's
|
|
20
|
+
* sign-ins. `getDomainVerification` reads what to publish; `verifyDomain`
|
|
21
|
+
* checks it and is the only call that turns a claim into a route.
|
|
22
|
+
*
|
|
23
|
+
* **The client secret never appears here.** The record names a secret in the
|
|
24
|
+
* organization's own secret store (`clientSecretRef`); this client never
|
|
25
|
+
* reads or writes a secret's value.
|
|
26
|
+
*
|
|
27
|
+
* @module api/iam/identityProviders
|
|
28
|
+
*/
|
|
29
|
+
import { requestDatalayerAPI } from '../DatalayerApi.js';
|
|
30
|
+
import { API_BASE_PATHS, DEFAULT_SERVICE_URLS } from '../constants.js';
|
|
31
|
+
/** A role a group mapping may grant, at the organization or at a team. */
|
|
32
|
+
export const ORGANIZATION_ROLES = [
|
|
33
|
+
'organization_owner',
|
|
34
|
+
'organization_security_auditor',
|
|
35
|
+
'organization_user_reviewer',
|
|
36
|
+
'organization_member',
|
|
37
|
+
];
|
|
38
|
+
export const TEAM_ROLES = ['team_owner', 'team_member'];
|
|
39
|
+
const roleMappingFromWire = (mapping) => ({
|
|
40
|
+
group: mapping.group ?? '',
|
|
41
|
+
role: mapping.role ?? 'organization_member',
|
|
42
|
+
teamUid: mapping.team_uid ?? '',
|
|
43
|
+
});
|
|
44
|
+
const roleMappingToWire = (mapping) => ({
|
|
45
|
+
group: mapping.group,
|
|
46
|
+
role: mapping.role,
|
|
47
|
+
team_uid: mapping.teamUid,
|
|
48
|
+
});
|
|
49
|
+
const fromWire = (provider) => ({
|
|
50
|
+
uid: provider.uid,
|
|
51
|
+
orgUid: provider.org_uid ?? '',
|
|
52
|
+
name: provider.name ?? '',
|
|
53
|
+
protocol: 'oidc',
|
|
54
|
+
issuer: provider.issuer ?? '',
|
|
55
|
+
clientId: provider.client_id ?? '',
|
|
56
|
+
clientSecretRef: provider.client_secret_ref ?? '',
|
|
57
|
+
domains: provider.domains ?? [],
|
|
58
|
+
verifiedDomains: provider.verified_domains ?? [],
|
|
59
|
+
groupClaim: provider.group_claim ?? 'groups',
|
|
60
|
+
allowEmailLinking: provider.allow_email_linking ?? false,
|
|
61
|
+
roleMappings: (provider.role_mappings ?? []).map(roleMappingFromWire),
|
|
62
|
+
enabled: provider.enabled ?? true,
|
|
63
|
+
createdBy: provider.created_by ?? undefined,
|
|
64
|
+
createdAt: provider.created_at ?? undefined,
|
|
65
|
+
updatedAt: provider.updated_at ?? undefined,
|
|
66
|
+
version: provider.version ?? undefined,
|
|
67
|
+
});
|
|
68
|
+
const toWire = (provider) => ({
|
|
69
|
+
name: provider.name,
|
|
70
|
+
protocol: provider.protocol,
|
|
71
|
+
issuer: provider.issuer,
|
|
72
|
+
client_id: provider.clientId,
|
|
73
|
+
client_secret_ref: provider.clientSecretRef,
|
|
74
|
+
domains: provider.domains,
|
|
75
|
+
group_claim: provider.groupClaim,
|
|
76
|
+
allow_email_linking: provider.allowEmailLinking,
|
|
77
|
+
role_mappings: provider.roleMappings.map(roleMappingToWire),
|
|
78
|
+
enabled: provider.enabled,
|
|
79
|
+
});
|
|
80
|
+
/** Raised when the registry refused a provider as written — a bad issuer, an
|
|
81
|
+
* unowned domain, an unknown role in a mapping. The message is IAM's own. */
|
|
82
|
+
export class IdentityProviderInvalid extends Error {
|
|
83
|
+
constructor(message) {
|
|
84
|
+
super(message);
|
|
85
|
+
this.name = 'IdentityProviderInvalid';
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
const providersUrl = (baseUrl, orgUid, suffix = '') => `${baseUrl}${API_BASE_PATHS.IAM}/organizations/${encodeURIComponent(orgUid)}/identity-providers${suffix}`;
|
|
89
|
+
export const listIdentityProviders = async (token, orgUid, baseUrl = DEFAULT_SERVICE_URLS.IAM) => {
|
|
90
|
+
const response = await requestDatalayerAPI({
|
|
91
|
+
url: providersUrl(baseUrl, orgUid),
|
|
92
|
+
method: 'GET',
|
|
93
|
+
token,
|
|
94
|
+
});
|
|
95
|
+
return (response.providers ?? []).map(fromWire);
|
|
96
|
+
};
|
|
97
|
+
export const getIdentityProvider = async (token, orgUid, uid, baseUrl = DEFAULT_SERVICE_URLS.IAM) => {
|
|
98
|
+
const response = await requestDatalayerAPI({
|
|
99
|
+
url: providersUrl(baseUrl, orgUid, `/${encodeURIComponent(uid)}`),
|
|
100
|
+
method: 'GET',
|
|
101
|
+
token,
|
|
102
|
+
});
|
|
103
|
+
return fromWire(response.provider ?? { uid });
|
|
104
|
+
};
|
|
105
|
+
export const createIdentityProvider = async (token, orgUid, provider, baseUrl = DEFAULT_SERVICE_URLS.IAM) => {
|
|
106
|
+
const response = await withRefusal(() => requestDatalayerAPI({
|
|
107
|
+
url: providersUrl(baseUrl, orgUid),
|
|
108
|
+
method: 'POST',
|
|
109
|
+
token,
|
|
110
|
+
body: toWire(provider),
|
|
111
|
+
}));
|
|
112
|
+
return fromWire(response.provider ?? { uid: '' });
|
|
113
|
+
};
|
|
114
|
+
export const updateIdentityProvider = async (token, orgUid, uid, provider, baseUrl = DEFAULT_SERVICE_URLS.IAM) => {
|
|
115
|
+
const response = await withRefusal(() => requestDatalayerAPI({
|
|
116
|
+
url: providersUrl(baseUrl, orgUid, `/${encodeURIComponent(uid)}`),
|
|
117
|
+
method: 'PUT',
|
|
118
|
+
token,
|
|
119
|
+
body: toWire(provider),
|
|
120
|
+
}));
|
|
121
|
+
return fromWire(response.provider ?? { uid });
|
|
122
|
+
};
|
|
123
|
+
const setEnabled = async (token, orgUid, uid, enabled, baseUrl) => {
|
|
124
|
+
const response = await requestDatalayerAPI({
|
|
125
|
+
url: providersUrl(baseUrl, orgUid, `/${encodeURIComponent(uid)}/${enabled ? 'enable' : 'disable'}`),
|
|
126
|
+
method: 'POST',
|
|
127
|
+
token,
|
|
128
|
+
});
|
|
129
|
+
return fromWire(response.provider ?? { uid });
|
|
130
|
+
};
|
|
131
|
+
export const enableIdentityProvider = (token, orgUid, uid, baseUrl = DEFAULT_SERVICE_URLS.IAM) => setEnabled(token, orgUid, uid, true, baseUrl);
|
|
132
|
+
export const disableIdentityProvider = (token, orgUid, uid, baseUrl = DEFAULT_SERVICE_URLS.IAM) => setEnabled(token, orgUid, uid, false, baseUrl);
|
|
133
|
+
/** Remove a registration outright. Prefer disabling one that has been used:
|
|
134
|
+
* this keeps no trace for the sign-in rows that name it. */
|
|
135
|
+
export const deleteIdentityProvider = async (token, orgUid, uid, baseUrl = DEFAULT_SERVICE_URLS.IAM) => {
|
|
136
|
+
await requestDatalayerAPI({
|
|
137
|
+
url: providersUrl(baseUrl, orgUid, `/${encodeURIComponent(uid)}`),
|
|
138
|
+
method: 'DELETE',
|
|
139
|
+
token,
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
/** What to publish in DNS to prove this organization holds `domain`. */
|
|
143
|
+
export const getDomainVerification = async (token, orgUid, uid, domain, baseUrl = DEFAULT_SERVICE_URLS.IAM) => {
|
|
144
|
+
const response = await requestDatalayerAPI({
|
|
145
|
+
url: providersUrl(baseUrl, orgUid, `/${encodeURIComponent(uid)}/domains/${encodeURIComponent(domain)}/verification`),
|
|
146
|
+
method: 'GET',
|
|
147
|
+
token,
|
|
148
|
+
});
|
|
149
|
+
return {
|
|
150
|
+
verification: response.verification ?? { host: '', type: 'TXT', value: '' },
|
|
151
|
+
verified: response.verified ?? false,
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* Check DNS now and, if the record is there, make the domain route sign-in.
|
|
156
|
+
*
|
|
157
|
+
* Until this succeeds the domain routes nothing at all, whatever was typed
|
|
158
|
+
* when the provider was registered.
|
|
159
|
+
*/
|
|
160
|
+
export const verifyDomain = async (token, orgUid, uid, domain, baseUrl = DEFAULT_SERVICE_URLS.IAM) => {
|
|
161
|
+
const response = await withRefusal(() => requestDatalayerAPI({
|
|
162
|
+
url: providersUrl(baseUrl, orgUid, `/${encodeURIComponent(uid)}/domains/${encodeURIComponent(domain)}/verify`),
|
|
163
|
+
method: 'POST',
|
|
164
|
+
token,
|
|
165
|
+
}));
|
|
166
|
+
return fromWire(response.provider ?? { uid });
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Turn IAM's `400` into one the form can show beside the field.
|
|
170
|
+
*
|
|
171
|
+
* A `400` here is never a bug in the client: it is the registry saying it
|
|
172
|
+
* refused what was written, and its message names why — an `http` issuer, a
|
|
173
|
+
* domain somebody else already verified, an unknown role in a mapping.
|
|
174
|
+
*/
|
|
175
|
+
const withRefusal = async (call) => {
|
|
176
|
+
try {
|
|
177
|
+
return await call();
|
|
178
|
+
}
|
|
179
|
+
catch (error) {
|
|
180
|
+
const candidate = error;
|
|
181
|
+
const status = candidate?.status ?? candidate?.response?.status;
|
|
182
|
+
if (status === 400) {
|
|
183
|
+
throw new IdentityProviderInvalid(candidate.message || 'This identity provider was refused.');
|
|
184
|
+
}
|
|
185
|
+
throw error;
|
|
186
|
+
}
|
|
187
|
+
};
|
package/lib/api/iam/index.d.ts
CHANGED
|
@@ -11,9 +11,11 @@ export * as profile from './profile';
|
|
|
11
11
|
export * as healthz from './healthz';
|
|
12
12
|
export * as usage from './usage';
|
|
13
13
|
export * as secrets from './secrets';
|
|
14
|
-
export * as
|
|
14
|
+
export * as connectedAgents from './connectedAgents';
|
|
15
|
+
export * as trials from './trials';
|
|
15
16
|
export { login, logout, checkAuth } from './authentication';
|
|
16
17
|
export { getOAuth2AuthzUrl, getOAuth2AuthzUrlForLink, handleGitHubOAuth2Callback, handleLinkedInOAuth2Callback, handleOktaOAuth2Callback, type OAuth2Provider, type OAuth2AuthzUrlResponse, type OAuth2CallbackParams, type OAuth2CallbackResponse, } from './oauth2';
|
|
17
18
|
export { me, whoami } from './profile';
|
|
18
19
|
export { ping } from './healthz';
|
|
19
20
|
export { getCredits } from './usage';
|
|
21
|
+
export { listConnectedAgents, disconnectAgent, isCimdClientId, type ConnectedAgent, type ConnectedAgentRegistration, type ConnectedAgentScope, } from './connectedAgents';
|
package/lib/api/iam/index.js
CHANGED
|
@@ -15,10 +15,12 @@ export * as profile from './profile.js';
|
|
|
15
15
|
export * as healthz from './healthz.js';
|
|
16
16
|
export * as usage from './usage.js';
|
|
17
17
|
export * as secrets from './secrets.js';
|
|
18
|
-
export * as
|
|
18
|
+
export * as connectedAgents from './connectedAgents.js';
|
|
19
|
+
export * as trials from './trials.js';
|
|
19
20
|
// For backward compatibility, export the old API structure
|
|
20
21
|
export { login, logout, checkAuth } from './authentication.js';
|
|
21
22
|
export { getOAuth2AuthzUrl, getOAuth2AuthzUrlForLink, handleGitHubOAuth2Callback, handleLinkedInOAuth2Callback, handleOktaOAuth2Callback, } from './oauth2.js';
|
|
22
23
|
export { me, whoami } from './profile.js';
|
|
23
24
|
export { ping } from './healthz.js';
|
|
24
25
|
export { getCredits } from './usage.js';
|
|
26
|
+
export { listConnectedAgents, disconnectAgent, isCimdClientId, } from './connectedAgents.js';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a rule may be about.
|
|
3
|
+
*
|
|
4
|
+
* Each name is answered by one reader in the gateway. `measurable` says
|
|
5
|
+
* whether a reader exists *today*: a condition with none is counted
|
|
6
|
+
* unreadable and never fires, which is exactly the silence rules are written
|
|
7
|
+
* to avoid — so a form shows it as not yet available rather than offering it
|
|
8
|
+
* as though it worked.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ALERT_CONDITIONS: {
|
|
11
|
+
name: string;
|
|
12
|
+
label: string;
|
|
13
|
+
help: string;
|
|
14
|
+
measurable: boolean;
|
|
15
|
+
}[];
|
|
16
|
+
/** How a reading is compared with the threshold. */
|
|
17
|
+
export declare const ALERT_OPERATORS: {
|
|
18
|
+
name: string;
|
|
19
|
+
label: string;
|
|
20
|
+
}[];
|
|
21
|
+
export declare const ALERT_SEVERITIES: readonly ["info", "warning", "critical"];
|
|
22
|
+
/** What a rule is measured over. */
|
|
23
|
+
export declare const ALERT_SCOPE_KINDS: readonly ["organization", "team", "user", "agent"];
|
|
24
|
+
export type AlertSeverity = (typeof ALERT_SEVERITIES)[number];
|
|
25
|
+
export type AlertScopeKind = (typeof ALERT_SCOPE_KINDS)[number];
|
|
26
|
+
export interface McpAlertRule {
|
|
27
|
+
uid: string;
|
|
28
|
+
orgUid: string;
|
|
29
|
+
condition: string;
|
|
30
|
+
operator: string;
|
|
31
|
+
threshold: number;
|
|
32
|
+
severity: AlertSeverity;
|
|
33
|
+
/** How far back a reading looks. Whole seconds — the tick is a minute. */
|
|
34
|
+
windowSeconds: number;
|
|
35
|
+
scopeKind: AlertScopeKind;
|
|
36
|
+
/** The team, user or agent the rule is about; empty for the organization. */
|
|
37
|
+
scopeUid: string;
|
|
38
|
+
enabled: boolean;
|
|
39
|
+
version?: number;
|
|
40
|
+
}
|
|
41
|
+
/** A rule as it is written. `uid` and `orgUid` come from the route. */
|
|
42
|
+
export type McpAlertRuleDraft = Omit<McpAlertRule, 'uid' | 'orgUid' | 'version'>;
|
|
43
|
+
/** Raised when the evaluator could not evaluate the rule as written. */
|
|
44
|
+
export declare class AlertRuleInvalid extends Error {
|
|
45
|
+
constructor(message: string);
|
|
46
|
+
}
|
|
47
|
+
export declare const listAlertRules: (token: string, orgUid: string, baseUrl?: string) => Promise<McpAlertRule[]>;
|
|
48
|
+
export declare const createAlertRule: (token: string, orgUid: string, rule: McpAlertRuleDraft, baseUrl?: string) => Promise<McpAlertRule>;
|
|
49
|
+
export declare const updateAlertRule: (token: string, orgUid: string, uid: string, rule: McpAlertRuleDraft, baseUrl?: string) => Promise<McpAlertRule>;
|
|
50
|
+
/** Remove one rule. What it watched is unwatched from the next tick. */
|
|
51
|
+
export declare const deleteAlertRule: (token: string, orgUid: string, uid: string, baseUrl?: string) => Promise<void>;
|