@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
|
@@ -1,19 +1,74 @@
|
|
|
1
|
+
import type { JSX } from 'react';
|
|
1
2
|
export type ItemAccessLevel = 'view' | 'update' | 'execute';
|
|
2
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Who a resource can be shared with. `agent` is a service agent: sharing with
|
|
5
|
+
* one grants that agent alone — the grant is matched on the agent's own uid,
|
|
6
|
+
* never on the people who can act through it — so it is a principal in its own
|
|
7
|
+
* right rather than a shorthand for its organization.
|
|
8
|
+
*/
|
|
9
|
+
type PrincipalKind = 'personal' | 'team' | 'organization' | 'agent';
|
|
10
|
+
/**
|
|
11
|
+
* One level the dialog offers, and what it is called. A resource whose
|
|
12
|
+
* service grants other levels than view, update and execute names its own —
|
|
13
|
+
* a benchmark's Reviewer and Runner, for one.
|
|
14
|
+
*/
|
|
15
|
+
export type AccessLevelOption = {
|
|
16
|
+
level: string;
|
|
17
|
+
label: string;
|
|
18
|
+
};
|
|
19
|
+
type SharingLevelPayload = {
|
|
20
|
+
userUids?: string[];
|
|
21
|
+
teamUids?: string[];
|
|
22
|
+
organizationUids?: string[];
|
|
23
|
+
agentUids?: string[];
|
|
24
|
+
};
|
|
25
|
+
type SharingPayload = {
|
|
26
|
+
access?: Partial<Record<string, SharingLevelPayload>>;
|
|
27
|
+
};
|
|
28
|
+
export type ShareAccessTransport = {
|
|
29
|
+
load: () => Promise<Record<string, any>>;
|
|
30
|
+
save: (sharing: SharingPayload) => Promise<void>;
|
|
31
|
+
};
|
|
3
32
|
export type ShareAccessComponentProps = {
|
|
4
33
|
isOpen: boolean;
|
|
5
34
|
requestUrl?: string;
|
|
35
|
+
transport?: ShareAccessTransport;
|
|
6
36
|
resourceLabel: string;
|
|
7
37
|
resourceName?: string;
|
|
8
38
|
resourceDescription?: string;
|
|
9
39
|
expanded?: boolean;
|
|
10
40
|
onSharingAccessRestrictedChange?: (restricted: boolean, message?: string) => void;
|
|
11
|
-
defaultAccessLevel?:
|
|
41
|
+
defaultAccessLevel?: string;
|
|
42
|
+
/** The levels offered, lowest first; view, update and execute when not named. */
|
|
43
|
+
levels?: readonly AccessLevelOption[];
|
|
12
44
|
principalKinds?: readonly PrincipalKind[];
|
|
13
45
|
displayMode?: 'dialog' | 'inline';
|
|
14
46
|
onClose: () => void;
|
|
15
47
|
};
|
|
16
|
-
|
|
48
|
+
type AccessByLevel = Record<string, {
|
|
49
|
+
userUids: string[];
|
|
50
|
+
teamUids: string[];
|
|
51
|
+
organizationUids: string[];
|
|
52
|
+
agentUids: string[];
|
|
53
|
+
}>;
|
|
54
|
+
type ACLPrincipalEntry = {
|
|
55
|
+
kind: PrincipalKind;
|
|
56
|
+
uid: string;
|
|
57
|
+
levels: string[];
|
|
58
|
+
};
|
|
59
|
+
type OwnerPrincipal = {
|
|
60
|
+
kind: PrincipalKind;
|
|
61
|
+
uid: string;
|
|
62
|
+
handle: string;
|
|
63
|
+
displayName: string;
|
|
64
|
+
avatarUrl?: string;
|
|
65
|
+
origin?: string;
|
|
66
|
+
accountHandle?: string;
|
|
67
|
+
};
|
|
68
|
+
export declare function extractOwnerPrincipals(payload: any): OwnerPrincipal[];
|
|
69
|
+
export declare function buildAclEntries(state: AccessByLevel, principalKinds: readonly PrincipalKind[]): ACLPrincipalEntry[];
|
|
70
|
+
export declare function hydrateAccessFromSharing(sharing: SharingPayload, levels: readonly AccessLevelOption[]): AccessByLevel;
|
|
71
|
+
export declare function ShareAccessComponent({ isOpen, requestUrl, transport, resourceLabel, resourceName, resourceDescription: _resourceDescription, expanded, onSharingAccessRestrictedChange, defaultAccessLevel, levels, principalKinds, displayMode, onClose, }: ShareAccessComponentProps): JSX.Element | null;
|
|
17
72
|
export default ShareAccessComponent;
|
|
18
73
|
export declare const ShareAccessDialog: typeof ShareAccessComponent;
|
|
19
74
|
export type ShareAccessDialogProps = ShareAccessComponentProps;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
4
|
-
* Distributed under the terms of the Modified BSD License.
|
|
5
|
-
*/
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
2
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
7
3
|
import { ChevronDownIcon, ChevronUpIcon, KeyIcon, PersonIcon, OrganizationIcon, PeopleIcon, } from '@primer/octicons-react';
|
|
8
4
|
import { Box } from '@datalayer/primer-addons';
|
|
@@ -14,17 +10,17 @@ import { PrincipalBadge } from '../principal/PrincipalBadge.js';
|
|
|
14
10
|
// ---------------------------------------------------------------------------
|
|
15
11
|
// Constants.
|
|
16
12
|
// ---------------------------------------------------------------------------
|
|
17
|
-
const
|
|
13
|
+
const DEFAULT_ACCESS_LEVELS = [
|
|
14
|
+
{ level: 'view', label: 'Viewer' },
|
|
15
|
+
{ level: 'update', label: 'Editor' },
|
|
16
|
+
{ level: 'execute', label: 'Executor' },
|
|
17
|
+
];
|
|
18
18
|
const DEFAULT_PRINCIPAL_KINDS = [
|
|
19
19
|
'personal',
|
|
20
20
|
'team',
|
|
21
21
|
'organization',
|
|
22
|
+
'agent',
|
|
22
23
|
];
|
|
23
|
-
const ACCESS_LEVEL_LABELS = {
|
|
24
|
-
view: 'Viewer',
|
|
25
|
-
update: 'Editor',
|
|
26
|
-
execute: 'Executor',
|
|
27
|
-
};
|
|
28
24
|
// ---------------------------------------------------------------------------
|
|
29
25
|
// String / payload helpers.
|
|
30
26
|
// ---------------------------------------------------------------------------
|
|
@@ -44,6 +40,9 @@ function normalizePrincipalKind(kindRaw) {
|
|
|
44
40
|
if (kind === 'organization' || kind === 'org') {
|
|
45
41
|
return 'organization';
|
|
46
42
|
}
|
|
43
|
+
if (kind === 'agent') {
|
|
44
|
+
return 'agent';
|
|
45
|
+
}
|
|
47
46
|
return 'personal';
|
|
48
47
|
}
|
|
49
48
|
function toTitleCase(value) {
|
|
@@ -84,6 +83,9 @@ function ensurePrincipalDisplayName(kind, ...candidates) {
|
|
|
84
83
|
if (kind === 'team') {
|
|
85
84
|
return 'Team';
|
|
86
85
|
}
|
|
86
|
+
if (kind === 'agent') {
|
|
87
|
+
return 'Agent';
|
|
88
|
+
}
|
|
87
89
|
return 'Principal';
|
|
88
90
|
}
|
|
89
91
|
function formatPrincipalHandle(kind, handle, accountHandle) {
|
|
@@ -113,7 +115,7 @@ function principalKey(kind, uid) {
|
|
|
113
115
|
// ---------------------------------------------------------------------------
|
|
114
116
|
// Owner extraction (preserves all current fallbacks).
|
|
115
117
|
// ---------------------------------------------------------------------------
|
|
116
|
-
function extractOwnerPrincipals(payload) {
|
|
118
|
+
export function extractOwnerPrincipals(payload) {
|
|
117
119
|
const ownersFromSharing = Array.isArray(payload?.sharing?.owners)
|
|
118
120
|
? payload.sharing.owners
|
|
119
121
|
: [];
|
|
@@ -136,7 +138,11 @@ function extractOwnerPrincipals(payload) {
|
|
|
136
138
|
payload?.resource?.owner ||
|
|
137
139
|
payload?.sharing?.owner ||
|
|
138
140
|
{};
|
|
139
|
-
const ownerUid = pickFirstString(ownerPayload?.uid, ownerPayload?.owner_uid, ownerPayload?.ownerUid, ownerPayload?.id, payload?.owner_uid, payload?.ownerUid
|
|
141
|
+
const ownerUid = pickFirstString(ownerPayload?.uid, ownerPayload?.owner_uid, ownerPayload?.ownerUid, ownerPayload?.id, payload?.owner_uid, payload?.ownerUid,
|
|
142
|
+
// Runtimes names a sandbox's owner inside its `sharing` document rather
|
|
143
|
+
// than beside it. Without this the dialog draws no owner at all, which
|
|
144
|
+
// reads as a resource nobody owns.
|
|
145
|
+
payload?.sharing?.owner_uid, payload?.sharing?.ownerUid);
|
|
140
146
|
const ownerHandle = pickFirstString(ownerPayload?.handle_s, ownerPayload?.handle, ownerPayload?.owner_handle, ownerPayload?.ownerHandle, payload?.owner_handle, payload?.ownerHandle);
|
|
141
147
|
const kindFromOwnerPayload = normalizePrincipalKind(pickFirstString(ownerPayload?.kind, ownerPayload?.type, ownerPayload?.principal_kind, ownerPayload?.principalKind, payload?.owner_kind, payload?.ownerKind, payload?.owner_type, payload?.ownerType));
|
|
142
148
|
const accountHandle = pickFirstString(ownerPayload?.organization_handle_s, ownerPayload?.organizationHandle, ownerPayload?.organization_handle, payload?.space?.organization_handle_s, payload?.space?.organizationHandle, payload?.space?.organization_handle);
|
|
@@ -216,19 +222,20 @@ function extractOwnerPrincipals(payload) {
|
|
|
216
222
|
// ---------------------------------------------------------------------------
|
|
217
223
|
// AccessByLevel helpers.
|
|
218
224
|
// ---------------------------------------------------------------------------
|
|
219
|
-
function emptyAccessByLevel() {
|
|
220
|
-
return {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
};
|
|
225
|
+
function emptyAccessByLevel(levels) {
|
|
226
|
+
return Object.fromEntries(levels.map(({ level }) => [
|
|
227
|
+
level,
|
|
228
|
+
{ userUids: [], teamUids: [], organizationUids: [], agentUids: [] },
|
|
229
|
+
]));
|
|
225
230
|
}
|
|
226
231
|
function bucketFor(kind) {
|
|
227
232
|
return kind === 'personal'
|
|
228
233
|
? 'userUids'
|
|
229
234
|
: kind === 'team'
|
|
230
235
|
? 'teamUids'
|
|
231
|
-
: '
|
|
236
|
+
: kind === 'agent'
|
|
237
|
+
? 'agentUids'
|
|
238
|
+
: 'organizationUids';
|
|
232
239
|
}
|
|
233
240
|
function hasPrincipal(state, level, kind, uid) {
|
|
234
241
|
const lower = uid.toLowerCase();
|
|
@@ -250,17 +257,15 @@ function withPrincipalAdded(state, level, kind, uid) {
|
|
|
250
257
|
function withPrincipalRemoved(state, kind, uid) {
|
|
251
258
|
const lower = uid.toLowerCase();
|
|
252
259
|
const bucket = bucketFor(kind);
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
}
|
|
261
|
-
return next;
|
|
260
|
+
return Object.fromEntries(Object.entries(state).map(([level, principals]) => [
|
|
261
|
+
level,
|
|
262
|
+
{
|
|
263
|
+
...principals,
|
|
264
|
+
[bucket]: principals[bucket].filter(value => value.toLowerCase() !== lower),
|
|
265
|
+
},
|
|
266
|
+
]));
|
|
262
267
|
}
|
|
263
|
-
function buildAclEntries(state, principalKinds) {
|
|
268
|
+
export function buildAclEntries(state, principalKinds) {
|
|
264
269
|
const allowed = new Set(principalKinds);
|
|
265
270
|
const byPrincipal = new Map();
|
|
266
271
|
const upsert = (kind, uid, level) => {
|
|
@@ -277,10 +282,11 @@ function buildAclEntries(state, principalKinds) {
|
|
|
277
282
|
existing.levels.push(level);
|
|
278
283
|
}
|
|
279
284
|
};
|
|
280
|
-
for (const level of
|
|
285
|
+
for (const level of Object.keys(state)) {
|
|
281
286
|
state[level].userUids.forEach(uid => upsert('personal', uid, level));
|
|
282
287
|
state[level].teamUids.forEach(uid => upsert('team', uid, level));
|
|
283
288
|
state[level].organizationUids.forEach(uid => upsert('organization', uid, level));
|
|
289
|
+
state[level].agentUids.forEach(uid => upsert('agent', uid, level));
|
|
284
290
|
}
|
|
285
291
|
return Array.from(byPrincipal.values()).sort((a, b) => {
|
|
286
292
|
if (a.kind !== b.kind) {
|
|
@@ -289,28 +295,20 @@ function buildAclEntries(state, principalKinds) {
|
|
|
289
295
|
return a.uid.localeCompare(b.uid);
|
|
290
296
|
});
|
|
291
297
|
}
|
|
292
|
-
function hydrateAccessFromSharing(sharing) {
|
|
298
|
+
export function hydrateAccessFromSharing(sharing, levels) {
|
|
293
299
|
const access = sharing.access || {};
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
organizationUids: [...(update.organizationUids || [])],
|
|
307
|
-
},
|
|
308
|
-
execute: {
|
|
309
|
-
userUids: [...(execute.userUids || [])],
|
|
310
|
-
teamUids: [...(execute.teamUids || [])],
|
|
311
|
-
organizationUids: [...(execute.organizationUids || [])],
|
|
312
|
-
},
|
|
313
|
-
};
|
|
300
|
+
return Object.fromEntries(levels.map(({ level }) => {
|
|
301
|
+
const given = access[level] || {};
|
|
302
|
+
return [
|
|
303
|
+
level,
|
|
304
|
+
{
|
|
305
|
+
userUids: [...(given.userUids || [])],
|
|
306
|
+
teamUids: [...(given.teamUids || [])],
|
|
307
|
+
organizationUids: [...(given.organizationUids || [])],
|
|
308
|
+
agentUids: [...(given.agentUids || [])],
|
|
309
|
+
},
|
|
310
|
+
];
|
|
311
|
+
}));
|
|
314
312
|
}
|
|
315
313
|
// ---------------------------------------------------------------------------
|
|
316
314
|
// Avatar shimmer (used while a user row is being hydrated).
|
|
@@ -329,6 +327,38 @@ function AvatarShimmer({ size = 20 }) {
|
|
|
329
327
|
},
|
|
330
328
|
} }));
|
|
331
329
|
}
|
|
330
|
+
// ---------------------------------------------------------------------------
|
|
331
|
+
// Row components.
|
|
332
|
+
// ---------------------------------------------------------------------------
|
|
333
|
+
/**
|
|
334
|
+
* An agent's avatar. A service agent has no picture, handle or banner of its
|
|
335
|
+
* own — it is a credential, not a person — so it is drawn as a key rather than
|
|
336
|
+
* pushed through the personal/team/organization avatar system.
|
|
337
|
+
*/
|
|
338
|
+
function AgentAvatar({ size = 20 }) {
|
|
339
|
+
return (_jsx(Box, { sx: {
|
|
340
|
+
display: 'inline-flex',
|
|
341
|
+
alignItems: 'center',
|
|
342
|
+
justifyContent: 'center',
|
|
343
|
+
width: size,
|
|
344
|
+
height: size,
|
|
345
|
+
borderRadius: 2,
|
|
346
|
+
bg: 'canvas.subtle',
|
|
347
|
+
color: 'fg.muted',
|
|
348
|
+
flexShrink: 0,
|
|
349
|
+
}, "aria-label": "Agent", children: _jsx(KeyIcon, { size: Math.max(12, Math.round(size * 0.6)) }) }));
|
|
350
|
+
}
|
|
351
|
+
/** An agent as it appears in a row of principals: key, name, and the label
|
|
352
|
+
* that says what it is, so an agent is never mistaken for a person. */
|
|
353
|
+
function AgentPrincipalChip({ displayName, size = 20, }) {
|
|
354
|
+
return (_jsxs(Box, { sx: {
|
|
355
|
+
display: 'inline-flex',
|
|
356
|
+
alignItems: 'center',
|
|
357
|
+
gap: 1,
|
|
358
|
+
minWidth: 0,
|
|
359
|
+
flexWrap: 'wrap',
|
|
360
|
+
}, children: [_jsx(AgentAvatar, { size: size }), _jsx(Text, { sx: { minWidth: 0 }, children: displayName }), _jsx(Label, { size: "small", children: "Agent" })] }));
|
|
361
|
+
}
|
|
332
362
|
function OwnerPrincipalRow({ ownerPrincipal, cache, showAvatarSkeleton = false, isPlatformAdmin, }) {
|
|
333
363
|
const entry = cache[principalKey(ownerPrincipal.kind, ownerPrincipal.uid)] || {};
|
|
334
364
|
const cachedHandle = entry.handle;
|
|
@@ -369,7 +399,7 @@ function AccessPrincipalRow({ entry, cache, showAvatarSkeleton = false, isPlatfo
|
|
|
369
399
|
alignItems: 'center',
|
|
370
400
|
gap: 1,
|
|
371
401
|
flexWrap: 'wrap',
|
|
372
|
-
}, children: showAvatarSkeleton ? (_jsxs(_Fragment, { children: [_jsx(AvatarShimmer, { size: 20 }), _jsx(Text, { children: resolvedDisplayName })] })) : (_jsx(PrincipalBadge, { principal: {
|
|
402
|
+
}, children: showAvatarSkeleton ? (_jsxs(_Fragment, { children: [_jsx(AvatarShimmer, { size: 20 }), _jsx(Text, { children: resolvedDisplayName })] })) : entry.kind === 'agent' ? (_jsx(AgentPrincipalChip, { displayName: resolvedDisplayName })) : (_jsx(PrincipalBadge, { principal: {
|
|
373
403
|
kind: entry.kind,
|
|
374
404
|
uid: entry.uid,
|
|
375
405
|
displayName: resolvedDisplayName,
|
|
@@ -382,7 +412,7 @@ function AccessPrincipalRow({ entry, cache, showAvatarSkeleton = false, isPlatfo
|
|
|
382
412
|
// ---------------------------------------------------------------------------
|
|
383
413
|
// Main component.
|
|
384
414
|
// ---------------------------------------------------------------------------
|
|
385
|
-
export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resourceName, resourceDescription: _resourceDescription, expanded = false, onSharingAccessRestrictedChange, defaultAccessLevel = 'view', principalKinds = DEFAULT_PRINCIPAL_KINDS, displayMode = 'dialog', onClose, }) {
|
|
415
|
+
export function ShareAccessComponent({ isOpen, requestUrl, transport, resourceLabel, resourceName, resourceDescription: _resourceDescription, expanded = false, onSharingAccessRestrictedChange, defaultAccessLevel = 'view', levels = DEFAULT_ACCESS_LEVELS, principalKinds = DEFAULT_PRINCIPAL_KINDS, displayMode = 'dialog', onClose, }) {
|
|
386
416
|
void _resourceDescription;
|
|
387
417
|
const { token, user } = useIAMStore();
|
|
388
418
|
const { configuration } = useCoreStore();
|
|
@@ -393,7 +423,8 @@ export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resour
|
|
|
393
423
|
const [isSaving, setIsSaving] = useState(false);
|
|
394
424
|
const [isExpanded, setIsExpanded] = useState(expanded);
|
|
395
425
|
const [selectedAccessLevel, setSelectedAccessLevel] = useState(defaultAccessLevel);
|
|
396
|
-
const
|
|
426
|
+
const levelLabels = useMemo(() => Object.fromEntries(levels.map(({ level, label }) => [level, label])), [levels]);
|
|
427
|
+
const [access, setAccess] = useState(() => emptyAccessByLevel(levels));
|
|
397
428
|
const [ownerPrincipals, setOwnerPrincipals] = useState([]);
|
|
398
429
|
const [shareablePrincipals, setShareablePrincipals] = useState([]);
|
|
399
430
|
const [isLoadingShareable, setIsLoadingShareable] = useState(false);
|
|
@@ -432,7 +463,7 @@ export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resour
|
|
|
432
463
|
onSharingAccessRestrictedChange,
|
|
433
464
|
]);
|
|
434
465
|
// ----- Derived -----
|
|
435
|
-
const canRequest = Boolean(
|
|
466
|
+
const canRequest = Boolean(token && (requestUrl || transport));
|
|
436
467
|
const canSearchPrincipals = Boolean(configuration?.iamUrl && token);
|
|
437
468
|
const iamUrl = configuration?.iamUrl;
|
|
438
469
|
const principalKindsSet = useMemo(() => new Set(principalKinds), [principalKinds]);
|
|
@@ -492,7 +523,7 @@ export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resour
|
|
|
492
523
|
userHydrationMissesRef.current = new Set();
|
|
493
524
|
return;
|
|
494
525
|
}
|
|
495
|
-
if (!canRequest
|
|
526
|
+
if (!canRequest) {
|
|
496
527
|
setIsLoading(false);
|
|
497
528
|
setIsSharingAccessConfirmed(false);
|
|
498
529
|
return;
|
|
@@ -507,14 +538,18 @@ export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resour
|
|
|
507
538
|
setIsSharingAccessConfirmed(false);
|
|
508
539
|
setSharingAccessMessage(null);
|
|
509
540
|
try {
|
|
510
|
-
const response =
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
541
|
+
const response = transport
|
|
542
|
+
? null
|
|
543
|
+
: await fetch(requestUrl, {
|
|
544
|
+
method: 'GET',
|
|
545
|
+
headers: {
|
|
546
|
+
'Content-Type': 'application/json',
|
|
547
|
+
Authorization: `Bearer ${token}`,
|
|
548
|
+
},
|
|
549
|
+
});
|
|
550
|
+
const payload = transport
|
|
551
|
+
? await transport.load()
|
|
552
|
+
: await response.json();
|
|
518
553
|
const message = payload?.detail ||
|
|
519
554
|
payload?.message ||
|
|
520
555
|
`Unable to load ${resourceLabel.toLowerCase()} sharing.`;
|
|
@@ -522,19 +557,19 @@ export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resour
|
|
|
522
557
|
if (!cancelled && isSharingAuthorizationMessage(message)) {
|
|
523
558
|
setSharingAccessMessage(message);
|
|
524
559
|
setIsSharingAccessConfirmed(true);
|
|
525
|
-
setAccess(emptyAccessByLevel());
|
|
560
|
+
setAccess(emptyAccessByLevel(levels));
|
|
526
561
|
setOwnerPrincipals([]);
|
|
527
562
|
return;
|
|
528
563
|
}
|
|
529
564
|
throw new Error(message);
|
|
530
565
|
}
|
|
531
|
-
if (!response.ok) {
|
|
566
|
+
if (response && !response.ok) {
|
|
532
567
|
if (response.status === 403 ||
|
|
533
568
|
isSharingAuthorizationMessage(message)) {
|
|
534
569
|
if (!cancelled) {
|
|
535
570
|
setSharingAccessMessage(message);
|
|
536
571
|
setIsSharingAccessConfirmed(true);
|
|
537
|
-
setAccess(emptyAccessByLevel());
|
|
572
|
+
setAccess(emptyAccessByLevel(levels));
|
|
538
573
|
setOwnerPrincipals([]);
|
|
539
574
|
}
|
|
540
575
|
return;
|
|
@@ -546,7 +581,7 @@ export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resour
|
|
|
546
581
|
}
|
|
547
582
|
const sharing = (payload?.sharing || {});
|
|
548
583
|
const owners = extractOwnerPrincipals(payload);
|
|
549
|
-
const hydrated = hydrateAccessFromSharing(sharing);
|
|
584
|
+
const hydrated = hydrateAccessFromSharing(sharing, levels);
|
|
550
585
|
setOwnerPrincipals(owners);
|
|
551
586
|
owners.forEach(owner => {
|
|
552
587
|
mergePrincipalCacheEntry(owner.kind, owner.uid, {
|
|
@@ -585,9 +620,11 @@ export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resour
|
|
|
585
620
|
isOpen,
|
|
586
621
|
canRequest,
|
|
587
622
|
requestUrl,
|
|
623
|
+
transport,
|
|
588
624
|
token,
|
|
589
625
|
resourceLabel,
|
|
590
626
|
resourceName,
|
|
627
|
+
levels,
|
|
591
628
|
mergePrincipalCacheEntry,
|
|
592
629
|
]);
|
|
593
630
|
// ----- Fetch shareable principals on open -----
|
|
@@ -1009,30 +1046,29 @@ export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resour
|
|
|
1009
1046
|
]);
|
|
1010
1047
|
// ----- Auto-save on access change after hydration -----
|
|
1011
1048
|
const saveAccess = useCallback(async (snapshot) => {
|
|
1012
|
-
if (!canRequest
|
|
1049
|
+
if (!canRequest) {
|
|
1013
1050
|
return;
|
|
1014
1051
|
}
|
|
1015
1052
|
setIsSaving(true);
|
|
1016
1053
|
try {
|
|
1017
1054
|
const body = {
|
|
1018
|
-
access:
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
userUids: snapshot.update.userUids,
|
|
1026
|
-
teamUids: snapshot.update.teamUids,
|
|
1027
|
-
organizationUids: snapshot.update.organizationUids,
|
|
1055
|
+
access: Object.fromEntries(Object.entries(snapshot).map(([level, principals]) => [
|
|
1056
|
+
level,
|
|
1057
|
+
{
|
|
1058
|
+
userUids: principals.userUids,
|
|
1059
|
+
teamUids: principals.teamUids,
|
|
1060
|
+
organizationUids: principals.organizationUids,
|
|
1061
|
+
agentUids: principals.agentUids,
|
|
1028
1062
|
},
|
|
1029
|
-
|
|
1030
|
-
userUids: snapshot.execute.userUids,
|
|
1031
|
-
teamUids: snapshot.execute.teamUids,
|
|
1032
|
-
organizationUids: snapshot.execute.organizationUids,
|
|
1033
|
-
},
|
|
1034
|
-
},
|
|
1063
|
+
])),
|
|
1035
1064
|
};
|
|
1065
|
+
if (transport) {
|
|
1066
|
+
await transport.save(body);
|
|
1067
|
+
enqueueToastRef.current(`${resourceLabel} sharing updated.`, {
|
|
1068
|
+
variant: 'success',
|
|
1069
|
+
});
|
|
1070
|
+
return;
|
|
1071
|
+
}
|
|
1036
1072
|
const response = await fetch(requestUrl, {
|
|
1037
1073
|
method: 'PUT',
|
|
1038
1074
|
headers: {
|
|
@@ -1073,7 +1109,7 @@ export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resour
|
|
|
1073
1109
|
finally {
|
|
1074
1110
|
setIsSaving(false);
|
|
1075
1111
|
}
|
|
1076
|
-
}, [canRequest, requestUrl, token, resourceLabel]);
|
|
1112
|
+
}, [canRequest, requestUrl, token, resourceLabel, transport]);
|
|
1077
1113
|
useEffect(() => {
|
|
1078
1114
|
if (!hasHydratedSharingRef.current) {
|
|
1079
1115
|
return;
|
|
@@ -1161,7 +1197,8 @@ export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resour
|
|
|
1161
1197
|
const otherUsers = filtered.filter(p => p.kind === 'personal' && p.uid !== selfUid);
|
|
1162
1198
|
const orgs = filtered.filter(p => p.kind === 'organization');
|
|
1163
1199
|
const teams = filtered.filter(p => p.kind === 'team');
|
|
1164
|
-
|
|
1200
|
+
const agents = filtered.filter(p => p.kind === 'agent');
|
|
1201
|
+
return { self, otherUsers, orgs, teams, agents };
|
|
1165
1202
|
}, [shareablePrincipals, principalKindsSet, user?.uid]);
|
|
1166
1203
|
useEffect(() => {
|
|
1167
1204
|
if (isOpen) {
|
|
@@ -1184,7 +1221,9 @@ export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resour
|
|
|
1184
1221
|
? PersonIcon
|
|
1185
1222
|
: principal.kind === 'organization'
|
|
1186
1223
|
? OrganizationIcon
|
|
1187
|
-
:
|
|
1224
|
+
: principal.kind === 'agent'
|
|
1225
|
+
? KeyIcon
|
|
1226
|
+
: PeopleIcon;
|
|
1188
1227
|
return (_jsxs(Box, { as: "button", type: "button", onClick: () => {
|
|
1189
1228
|
if (!alreadyAdded) {
|
|
1190
1229
|
addPrincipal(principal.kind, principal.uid);
|
|
@@ -1214,7 +1253,7 @@ export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resour
|
|
|
1214
1253
|
alignItems: 'center',
|
|
1215
1254
|
gap: 2,
|
|
1216
1255
|
minWidth: 0,
|
|
1217
|
-
}, children: [_jsx(PrincipalAvatar, { kind: principal.kind, avatarUrl: principal.avatarUrl || undefined, alt: displayName, size: 22 }), _jsxs(Box, { sx: { display: 'grid', minWidth: 0 }, children: [_jsxs(Box, { sx: {
|
|
1256
|
+
}, children: [principal.kind === 'agent' ? (_jsx(AgentAvatar, { size: 22 })) : (_jsx(PrincipalAvatar, { kind: principal.kind, avatarUrl: principal.avatarUrl || undefined, alt: displayName, size: 22 })), _jsxs(Box, { sx: { display: 'grid', minWidth: 0 }, children: [_jsxs(Box, { sx: {
|
|
1218
1257
|
display: 'inline-flex',
|
|
1219
1258
|
alignItems: 'center',
|
|
1220
1259
|
gap: 1,
|
|
@@ -1262,7 +1301,9 @@ export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resour
|
|
|
1262
1301
|
alignItems: 'flex-start',
|
|
1263
1302
|
justifyContent: 'space-between',
|
|
1264
1303
|
gap: 2,
|
|
1265
|
-
}, children: [_jsx(Box, { sx: { display: 'grid', gap: 1 }, children: _jsxs(Text, { sx: { fontSize: 1, color: 'fg.muted' }, children: ["Share ", resourceName || `this ${resourceLabel.toLowerCase()}`, ". Pick a principal below \u2014 they will be granted the selected access level."] }) }), _jsxs(ActionMenu, { children: [_jsxs(Box, { sx: { display: 'inline-flex', alignItems: 'center', gap: 1 }, children: [_jsx(ActionMenu.Anchor, { children: _jsxs(Button, { variant: "default", size: "small", leadingVisual: KeyIcon, disabled: isSaving || isReadOnly, children: ["Access:
|
|
1304
|
+
}, children: [_jsx(Box, { sx: { display: 'grid', gap: 1 }, children: _jsxs(Text, { sx: { fontSize: 1, color: 'fg.muted' }, children: ["Share ", resourceName || `this ${resourceLabel.toLowerCase()}`, ". Pick a principal below \u2014 they will be granted the selected access level."] }) }), _jsxs(ActionMenu, { children: [_jsxs(Box, { sx: { display: 'inline-flex', alignItems: 'center', gap: 1 }, children: [_jsx(ActionMenu.Anchor, { children: _jsxs(Button, { variant: "default", size: "small", leadingVisual: KeyIcon, disabled: isSaving || isReadOnly, children: ["Access:", ' ', levelLabels[selectedAccessLevel] || selectedAccessLevel] }) }), _jsx(Button, { variant: "invisible", size: "small", leadingVisual: isExpanded ? ChevronUpIcon : ChevronDownIcon, onClick: () => setIsExpanded(previous => !previous), "aria-label": isExpanded
|
|
1305
|
+
? 'Shrink sharing details'
|
|
1306
|
+
: 'Expand sharing details', children: isExpanded ? 'Shrink details' : 'Expand details' })] }), _jsx(ActionMenu.Overlay, { width: "small", children: _jsx(ActionList, { selectionVariant: "single", children: levels.map(({ level, label }) => (_jsx(ActionList.Item, { selected: selectedAccessLevel === level, onSelect: () => setSelectedAccessLevel(level), children: label }, level))) }) })] })] }), !isExpanded && (_jsxs(Box, { sx: {
|
|
1266
1307
|
px: 3,
|
|
1267
1308
|
py: 2,
|
|
1268
1309
|
borderRadius: 2,
|
|
@@ -1272,7 +1313,7 @@ export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resour
|
|
|
1272
1313
|
bg: 'canvas.default',
|
|
1273
1314
|
display: 'grid',
|
|
1274
1315
|
gap: 1,
|
|
1275
|
-
}, children: [_jsx(Text, { sx: { fontSize: 1, color: 'fg.muted' }, children: "Sharing details are collapsed." }), _jsxs(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: [aclEntries.length, " principal", aclEntries.length === 1 ? '' : 's', "
|
|
1316
|
+
}, children: [_jsx(Text, { sx: { fontSize: 1, color: 'fg.muted' }, children: "Sharing details are collapsed." }), _jsxs(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: [aclEntries.length, " principal", aclEntries.length === 1 ? '' : 's', ' ', "currently granted access."] })] })), isExpanded && (_jsxs(_Fragment, { children: [_jsxs(Box, { sx: {
|
|
1276
1317
|
px: 3,
|
|
1277
1318
|
py: 2,
|
|
1278
1319
|
borderRadius: 2,
|
|
@@ -1303,11 +1344,16 @@ export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resour
|
|
|
1303
1344
|
alignItems: 'center',
|
|
1304
1345
|
justifyContent: 'space-between',
|
|
1305
1346
|
gap: 2,
|
|
1306
|
-
}, children: [_jsx(Text, { sx: { fontSize: 1, fontWeight: 600 }, children: "Share with\u2026" }), isLoadingShareable && (_jsxs(Box, { sx: {
|
|
1347
|
+
}, children: [_jsx(Text, { sx: { fontSize: 1, fontWeight: 600 }, children: "Share with\u2026" }), isLoadingShareable && (_jsxs(Box, { sx: {
|
|
1348
|
+
display: 'inline-flex',
|
|
1349
|
+
alignItems: 'center',
|
|
1350
|
+
gap: 1,
|
|
1351
|
+
}, children: [_jsx(Spinner, { size: "small" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "Loading\u2026" })] }))] }), !isLoadingShareable &&
|
|
1307
1352
|
groupedShareable.self.length === 0 &&
|
|
1308
1353
|
groupedShareable.otherUsers.length === 0 &&
|
|
1309
1354
|
groupedShareable.orgs.length === 0 &&
|
|
1310
|
-
groupedShareable.teams.length === 0
|
|
1355
|
+
groupedShareable.teams.length === 0 &&
|
|
1356
|
+
groupedShareable.agents.length === 0 ? (_jsx(Text, { sx: { fontSize: 1, color: 'fg.muted' }, children: "No principals available to share with." })) : (_jsxs(Box, { sx: { display: 'grid', gap: 2 }, children: [renderShareableGroup('You', groupedShareable.self), renderShareableGroup('Other users', groupedShareable.otherUsers), renderShareableGroup('Your organizations', groupedShareable.orgs), renderShareableGroup('Your teams', groupedShareable.teams), renderShareableGroup('Agents', groupedShareable.agents)] }))] }), _jsxs(Box, { sx: {
|
|
1311
1357
|
px: 3,
|
|
1312
1358
|
py: 2,
|
|
1313
1359
|
borderRadius: 2,
|
|
@@ -1350,14 +1396,13 @@ export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resour
|
|
|
1350
1396
|
display: 'inline-flex',
|
|
1351
1397
|
alignItems: 'center',
|
|
1352
1398
|
gap: 2,
|
|
1353
|
-
}, children: [_jsx(Spinner, { size: "small" }), _jsx(Text, { sx: { fontSize: 1, color: 'fg.muted' }, children: "Searching\u2026" })] })) : searchResults.length === 0 ? (_jsx(Box, { sx: { px: 3, py: 2 }, children: _jsx(Text, { sx: { fontSize: 1, color: 'fg.muted' }, children: "No principals found." }) })) : (_jsx(ActionList, { children: searchResults.map(result => (_jsxs(ActionList.Item, { onSelect: () => handleSearchResultSelect(result), children: [_jsx(ActionList.LeadingVisual, { children: _jsx(PrincipalAvatar, { kind: result.kind, avatarUrl: result.avatarUrl, alt: result.displayName, size: 18 }) }), _jsxs(Box, { sx: {
|
|
1399
|
+
}, children: [_jsx(Spinner, { size: "small" }), _jsx(Text, { sx: { fontSize: 1, color: 'fg.muted' }, children: "Searching\u2026" })] })) : searchResults.length === 0 ? (_jsx(Box, { sx: { px: 3, py: 2 }, children: _jsx(Text, { sx: { fontSize: 1, color: 'fg.muted' }, children: "No principals found." }) })) : (_jsx(ActionList, { children: searchResults.map(result => (_jsxs(ActionList.Item, { onSelect: () => handleSearchResultSelect(result), children: [_jsx(ActionList.LeadingVisual, { children: result.kind === 'agent' ? (_jsx(AgentAvatar, { size: 18 })) : (_jsx(PrincipalAvatar, { kind: result.kind, avatarUrl: result.avatarUrl, alt: result.displayName, size: 18 })) }), _jsxs(Box, { sx: {
|
|
1354
1400
|
display: 'inline-flex',
|
|
1355
1401
|
alignItems: 'center',
|
|
1356
1402
|
gap: 1,
|
|
1357
1403
|
flexWrap: 'wrap',
|
|
1358
1404
|
}, children: [_jsx(Text, { children: result.displayName }), result.kind === 'personal' && (_jsx(Label, { size: "small", variant: "secondary", children: result.origin ||
|
|
1359
|
-
principalCache[principalKey('personal', result.uid)]
|
|
1360
|
-
?.origin ||
|
|
1405
|
+
principalCache[principalKey('personal', result.uid)]?.origin ||
|
|
1361
1406
|
'Datalayer' }))] }), _jsxs(ActionList.Description, { variant: "block", children: ["@", result.handle] })] }, principalKey(result.kind, result.uid)))) })) }))] })] }), _jsxs(Box, { sx: {
|
|
1362
1407
|
px: 3,
|
|
1363
1408
|
py: 2,
|
|
@@ -1393,7 +1438,7 @@ export function ShareAccessComponent({ isOpen, requestUrl, resourceLabel, resour
|
|
|
1393
1438
|
flexWrap: 'wrap',
|
|
1394
1439
|
gap: 1,
|
|
1395
1440
|
justifyContent: 'flex-end',
|
|
1396
|
-
}, children: entry.levels.map(level => (_jsx(Label, { size: "small", variant: "secondary", children:
|
|
1441
|
+
}, children: entry.levels.map(level => (_jsx(Label, { size: "small", variant: "secondary", children: levelLabels[level] || level }, level))) }), _jsx(Button, { size: "small", variant: "invisible", onClick: () => removePrincipal(entry.kind, entry.uid), disabled: isSaving, children: "Remove" })] }, principalKey(entry.kind, entry.uid)))) })) })] })] }))] }), _jsxs(Box, { sx: {
|
|
1397
1442
|
display: 'flex',
|
|
1398
1443
|
justifyContent: 'flex-end',
|
|
1399
1444
|
alignItems: 'center',
|
|
@@ -1,8 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SharingEditor — inline editor for the sharing payload shape used by
|
|
3
|
+
* `ShareAccessComponent` ACL endpoints.
|
|
4
|
+
*
|
|
5
|
+
* Unlike `ShareAccessComponent` (which is bound to a server-side resource
|
|
6
|
+
* via `requestUrl`), this component edits a free-form
|
|
7
|
+
* `{ access: { view/update/execute: { userUids, teamUids, organizationUids,
|
|
8
|
+
* agentUids } } }`
|
|
9
|
+
* blob in memory. It is intended for "create" flows where the resource does
|
|
10
|
+
* not yet exist and the sharing payload must be POSTed alongside the rest of
|
|
11
|
+
* the configuration.
|
|
12
|
+
*
|
|
13
|
+
* This is a scaffold: it currently exposes a structured JSON editor with
|
|
14
|
+
* validation and the canonical default shape. Future iterations can replace
|
|
15
|
+
* the textarea with the same principal-picker UI used by
|
|
16
|
+
* `ShareAccessComponent`.
|
|
17
|
+
*/
|
|
18
|
+
import type { JSX } from 'react';
|
|
1
19
|
export type SharingAccessLevel = 'view' | 'update' | 'execute';
|
|
2
20
|
export type SharingLevelPayload = {
|
|
3
21
|
userUids?: string[];
|
|
4
22
|
teamUids?: string[];
|
|
5
23
|
organizationUids?: string[];
|
|
24
|
+
/** Service agents. A grant here is to that agent alone, matched on its own
|
|
25
|
+
* uid, never to the people who can act through it. */
|
|
26
|
+
agentUids?: string[];
|
|
6
27
|
};
|
|
7
28
|
export type SharingPayload = {
|
|
8
29
|
access?: Partial<Record<SharingAccessLevel, SharingLevelPayload>>;
|