@datalayer/core 1.1.60 → 1.1.66

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.
Files changed (364) hide show
  1. package/README.md +2 -2
  2. package/lib/api/DatalayerApi.d.ts +42 -1
  3. package/lib/api/DatalayerApi.js +90 -3
  4. package/lib/api/constants.d.ts +18 -0
  5. package/lib/api/constants.js +18 -0
  6. package/lib/api/contents/attachments.d.ts +9 -0
  7. package/lib/api/contents/attachments.js +43 -0
  8. package/lib/api/contents/bridges.d.ts +22 -0
  9. package/lib/api/contents/bridges.js +79 -0
  10. package/lib/api/contents/capabilities.d.ts +11 -0
  11. package/lib/api/contents/capabilities.js +21 -0
  12. package/lib/api/contents/cloudStorage.d.ts +31 -0
  13. package/lib/api/contents/cloudStorage.js +89 -0
  14. package/lib/api/contents/dataservers.d.ts +37 -0
  15. package/lib/api/contents/dataservers.js +121 -0
  16. package/lib/api/contents/datasets.d.ts +15 -0
  17. package/lib/api/contents/datasets.js +45 -0
  18. package/lib/api/contents/datasources.d.ts +70 -0
  19. package/lib/api/contents/datasources.js +149 -0
  20. package/lib/api/contents/generated.d.ts +1070 -0
  21. package/lib/api/contents/index.d.ts +16 -0
  22. package/lib/api/contents/index.js +20 -0
  23. package/lib/api/contents/mcp.d.ts +46 -0
  24. package/lib/api/contents/mcp.js +157 -0
  25. package/lib/api/contents/objects.d.ts +31 -0
  26. package/lib/api/contents/objects.js +88 -0
  27. package/lib/api/contents/operations.d.ts +3 -0
  28. package/lib/api/contents/operations.js +19 -0
  29. package/lib/api/contents/runtimeMounts.d.ts +40 -0
  30. package/lib/api/contents/runtimeMounts.js +59 -0
  31. package/lib/api/contents/sandboxUid.d.ts +53 -0
  32. package/lib/api/contents/sandboxUid.js +78 -0
  33. package/lib/api/contents/sources.d.ts +19 -0
  34. package/lib/api/contents/sources.js +119 -0
  35. package/lib/api/contents/sync.d.ts +18 -0
  36. package/lib/api/contents/sync.js +69 -0
  37. package/lib/api/contents/transfers.d.ts +38 -0
  38. package/lib/api/contents/transfers.js +123 -0
  39. package/lib/api/iam/connectedAgents.d.ts +39 -0
  40. package/lib/api/iam/connectedAgents.js +52 -0
  41. package/lib/api/iam/index.d.ts +2 -1
  42. package/lib/api/iam/index.js +2 -1
  43. package/lib/api/iam/mcpAlertRules.d.ts +51 -0
  44. package/lib/api/iam/mcpAlertRules.js +198 -0
  45. package/lib/api/iam/mcpAuditSettings.d.ts +46 -0
  46. package/lib/api/iam/mcpAuditSettings.js +120 -0
  47. package/lib/api/iam/mcpPolicy.d.ts +80 -0
  48. package/lib/api/iam/mcpPolicy.js +132 -0
  49. package/lib/api/iam/organizationTeams.d.ts +13 -0
  50. package/lib/api/iam/organizationTeams.js +43 -0
  51. package/lib/api/iam/serviceAgents.d.ts +68 -0
  52. package/lib/api/iam/serviceAgents.js +119 -0
  53. package/lib/api/index.d.ts +4 -1
  54. package/lib/api/index.js +3 -1
  55. package/lib/api/mcp/activity.d.ts +37 -0
  56. package/lib/api/mcp/activity.js +26 -0
  57. package/lib/api/mcp/alerts.d.ts +25 -0
  58. package/lib/api/mcp/alerts.js +51 -0
  59. package/lib/api/mcp/audit.d.ts +29 -0
  60. package/lib/api/mcp/audit.js +55 -0
  61. package/lib/api/mcp/bindings.d.ts +18 -0
  62. package/lib/api/mcp/bindings.js +42 -0
  63. package/lib/api/mcp/forwarding.d.ts +25 -0
  64. package/lib/api/mcp/forwarding.js +46 -0
  65. package/lib/api/mcp/gateway.d.ts +16 -0
  66. package/lib/api/mcp/gateway.js +70 -0
  67. package/lib/api/mcp/generated.d.ts +22 -0
  68. package/lib/api/mcp/generated.js +213 -0
  69. package/lib/api/mcp/index.d.ts +17 -0
  70. package/lib/api/mcp/index.js +25 -0
  71. package/lib/api/mcp/observability.d.ts +125 -0
  72. package/lib/api/mcp/observability.js +254 -0
  73. package/lib/api/mcp/operations.d.ts +83 -0
  74. package/lib/api/mcp/operations.js +50 -0
  75. package/lib/api/mcp/organizations.d.ts +102 -0
  76. package/lib/api/mcp/organizations.js +46 -0
  77. package/lib/api/mcp/policy.d.ts +9 -0
  78. package/lib/api/mcp/policy.js +23 -0
  79. package/lib/api/mcp/tasks.d.ts +49 -0
  80. package/lib/api/mcp/tasks.js +147 -0
  81. package/lib/api/utils/validation.d.ts +1 -1
  82. package/lib/api/utils/validation.js +1 -1
  83. package/lib/client/auth/index.js +0 -5
  84. package/lib/client/auth/storage.js +0 -5
  85. package/lib/client/auth/strategies.js +0 -5
  86. package/lib/client/base.d.ts +6 -0
  87. package/lib/client/base.js +8 -0
  88. package/lib/client/index.d.ts +0 -10
  89. package/lib/client/index.js +2 -2
  90. package/lib/client/mixins/ContentsMixin.d.ts +71 -0
  91. package/lib/client/mixins/ContentsMixin.js +157 -0
  92. package/lib/client/mixins/IAMMixin.d.ts +0 -31
  93. package/lib/client/mixins/IAMMixin.js +0 -58
  94. package/lib/components/animation/AnimatedText.d.ts +1 -0
  95. package/lib/components/animation/AnimatedText.js +0 -4
  96. package/lib/components/auth/SigInAPIKey.d.ts +1 -0
  97. package/lib/components/auth/SigInAPIKey.js +0 -6
  98. package/lib/components/auth/SignIn.d.ts +1 -0
  99. package/lib/components/auth/SignIn.js +0 -4
  100. package/lib/components/auth/SignIn.stories.d.ts +2 -2
  101. package/lib/components/avatars/BoringAvatar.d.ts +1 -1
  102. package/lib/components/avatars/BoringAvatar.stories.d.ts +1 -1
  103. package/lib/components/avatars/DLAvatar.d.ts +1 -1
  104. package/lib/components/avatars/DLAvatar.js +0 -4
  105. package/lib/components/avatars/UserAvatar.d.ts +9 -0
  106. package/lib/components/avatars/UserAvatar.js +0 -12
  107. package/lib/components/avatars/UserProfileAvatar.d.ts +1 -1
  108. package/lib/components/banners/NoAutomationBanner.d.ts +1 -1
  109. package/lib/components/billing/BillingEntitySelect.d.ts +10 -0
  110. package/lib/components/billing/BillingEntitySelect.js +0 -17
  111. package/lib/components/billing/index.js +0 -4
  112. package/lib/components/buttons/DownloadCSVButton.d.ts +1 -1
  113. package/lib/components/buttons/DownloadJsonButton.d.ts +1 -1
  114. package/lib/components/buttons/LongActionButton.d.ts +1 -0
  115. package/lib/components/buttons/LongActionButton.js +0 -4
  116. package/lib/components/buttons/UploadButton.d.ts +1 -0
  117. package/lib/components/buttons/UploadButton.js +0 -4
  118. package/lib/components/checkout/StripeCheckout.d.ts +1 -1
  119. package/lib/components/collaboration/LiveEditorCollaborators.d.ts +31 -0
  120. package/lib/components/collaboration/LiveEditorCollaborators.js +86 -53
  121. package/lib/components/collaboration/index.js +0 -4
  122. package/lib/components/confetti/ConfettiSuccess.d.ts +1 -1
  123. package/lib/components/contents/ContentSourceCard.d.ts +8 -0
  124. package/lib/components/contents/ContentSourceCard.js +23 -0
  125. package/lib/components/contents/HomeFolderObjectsBrowser.d.ts +10 -0
  126. package/lib/components/contents/HomeFolderObjectsBrowser.js +148 -0
  127. package/lib/components/contents/index.d.ts +2 -0
  128. package/lib/components/contents/index.js +6 -0
  129. package/lib/components/context/OrganizationSelect.d.ts +1 -1
  130. package/lib/components/display/AvatarSkeleton.d.ts +1 -1
  131. package/lib/components/display/BusyDots.d.ts +1 -1
  132. package/lib/components/display/CenteredSpinner.d.ts +1 -1
  133. package/lib/components/display/CodePreview.d.ts +1 -1
  134. package/lib/components/display/DatalayerBox.d.ts +7 -2
  135. package/lib/components/display/DatalayerBox.js +6 -6
  136. package/lib/components/display/HorizontalCenter.d.ts +1 -1
  137. package/lib/components/display/JupyterDialog.d.ts +1 -0
  138. package/lib/components/display/JupyterDialog.js +1 -7
  139. package/lib/components/display/Markdown.d.ts +1 -0
  140. package/lib/components/display/NotebookSkeleton.d.ts +1 -1
  141. package/lib/components/display/Placeholder.d.ts +1 -1
  142. package/lib/components/display/ToTopBranded.d.ts +1 -1
  143. package/lib/components/echarts/EChartsReact.d.ts +1 -1
  144. package/lib/components/flashes/FlashClosable.d.ts +1 -0
  145. package/lib/components/flashes/FlashClosable.js +0 -4
  146. package/lib/components/flashes/FlashGuest.d.ts +1 -1
  147. package/lib/components/flashes/FlashSurveys.d.ts +1 -1
  148. package/lib/components/flashes/FlashUnauthorized.d.ts +1 -0
  149. package/lib/components/flashes/FlashUnauthorized.js +0 -6
  150. package/lib/components/flashes/surveys/Survey2025_1.d.ts +1 -1
  151. package/lib/components/iam/ExternalTokenSilentLogin.d.ts +1 -1
  152. package/lib/components/index.d.ts +2 -0
  153. package/lib/components/index.js +2 -0
  154. package/lib/components/labels/StatusLabels.d.ts +1 -0
  155. package/lib/components/labels/VisibilityLabel.d.ts +1 -1
  156. package/lib/components/landings/StepBlock.d.ts +1 -1
  157. package/lib/components/mcp/ClientBadge.d.ts +41 -0
  158. package/lib/components/mcp/ClientBadge.js +33 -0
  159. package/lib/components/mcp/McpErrorBlankslate.d.ts +21 -0
  160. package/lib/components/mcp/McpErrorBlankslate.js +17 -0
  161. package/lib/components/mcp/ScopeList.d.ts +28 -0
  162. package/lib/components/mcp/ScopeList.js +14 -0
  163. package/lib/components/mcp/index.d.ts +10 -0
  164. package/lib/components/mcp/index.js +18 -0
  165. package/lib/components/navbar/NavigationVisbilityObserver.d.ts +2 -1
  166. package/lib/components/navbar/SubdomainNavBar.d.ts +10 -5
  167. package/lib/components/navbar/SubdomainNavBar.js +2 -1
  168. package/lib/components/notebooks/JupyterNotebook.d.ts +1 -1
  169. package/lib/components/notebooks/JupyterNotebookToolbar.d.ts +1 -1
  170. package/lib/components/principal/PrincipalAppearance.d.ts +1 -0
  171. package/lib/components/principal/PrincipalAppearance.js +0 -8
  172. package/lib/components/principal/PrincipalAvatar.d.ts +1 -0
  173. package/lib/components/principal/PrincipalAvatar.js +17 -9
  174. package/lib/components/principal/PrincipalBadge.d.ts +1 -1
  175. package/lib/components/principal/PrincipalBanner.d.ts +1 -1
  176. package/lib/components/principal/PrincipalDetailsOverlay.d.ts +31 -1
  177. package/lib/components/principal/PrincipalDetailsOverlay.js +64 -33
  178. package/lib/components/principal/PrincipalHoverCard.d.ts +31 -0
  179. package/lib/components/principal/PrincipalHoverCard.js +52 -0
  180. package/lib/components/principal/PrincipalSwitcherMenu.d.ts +1 -0
  181. package/lib/components/principal/PrincipalSwitcherMenu.js +5 -14
  182. package/lib/components/principal/index.d.ts +2 -1
  183. package/lib/components/principal/index.js +2 -1
  184. package/lib/components/progress/ConsumptionBar.d.ts +1 -0
  185. package/lib/components/progress/ConsumptionBar.js +0 -4
  186. package/lib/components/progress/ProgressRing.d.ts +1 -0
  187. package/lib/components/progress/SpinnerBar.d.ts +1 -1
  188. package/lib/components/progress/Timer.d.ts +1 -0
  189. package/lib/components/progress/Timer.js +0 -4
  190. package/lib/components/screencapture/ScreencaptureButton.d.ts +1 -1
  191. package/lib/components/sharing/ShareAccessComponent.d.ts +15 -1
  192. package/lib/components/sharing/ShareAccessComponent.js +36 -23
  193. package/lib/components/sharing/SharingEditor.d.ts +17 -0
  194. package/lib/components/sharing/SharingEditor.js +0 -24
  195. package/lib/components/sparklines/Sparklines.js +3 -4
  196. package/lib/components/sparklines/index.js +0 -4
  197. package/lib/components/storage/ContentsBrowser.d.ts +25 -1
  198. package/lib/components/storage/ContentsBrowser.js +145 -52
  199. package/lib/components/storage/ContentsBrowserMock.d.ts +3 -0
  200. package/lib/components/storage/ContentsBrowserMock.js +75 -0
  201. package/lib/components/storage/ContentsItems.d.ts +2 -1
  202. package/lib/components/storage/ContentsItems.js +0 -4
  203. package/lib/components/storage/ContentsTable.d.ts +50 -0
  204. package/lib/components/storage/ContentsTable.js +134 -0
  205. package/lib/components/storage/HomeFolderDrive.d.ts +71 -0
  206. package/lib/components/storage/HomeFolderDrive.js +248 -0
  207. package/lib/components/storage/index.d.ts +2 -0
  208. package/lib/components/storage/index.js +2 -0
  209. package/lib/components/students/StudentItemStatus.d.ts +1 -1
  210. package/lib/components/students/StudentResultCircle.d.ts +1 -1
  211. package/lib/components/subnav/SubNav.d.ts +5 -5
  212. package/lib/components/subnav/SubNav.js +11 -9
  213. package/lib/components/tables/DataTable.d.ts +1 -1
  214. package/lib/components/text-reveal/TextRevealAnimation.d.ts +2 -2
  215. package/lib/components/text-reveal/useTextRevealAnimationLines.d.ts +1 -1
  216. package/lib/components/time/LiveRelativeTime.d.ts +1 -0
  217. package/lib/components/time/LiveRelativeTime.js +0 -8
  218. package/lib/components/time/index.js +0 -4
  219. package/lib/components/timeline/Timeline.d.ts +1 -1
  220. package/lib/components/timeline/index.js +0 -4
  221. package/lib/components/users/PeerIndicator.d.ts +1 -0
  222. package/lib/components/users/PeerIndicator.js +0 -4
  223. package/lib/config/Configuration.d.ts +15 -17
  224. package/lib/config/Configuration.js +7 -0
  225. package/lib/hooks/index.d.ts +2 -0
  226. package/lib/hooks/index.js +2 -0
  227. package/lib/hooks/layouts/LayoutBackdrop.d.ts +1 -1
  228. package/lib/hooks/layouts/LayoutScreencapture.d.ts +1 -1
  229. package/lib/hooks/useBackdrop.d.ts +1 -1
  230. package/lib/hooks/useBackdropJupyterLab.d.ts +3 -2
  231. package/lib/hooks/useBackdropJupyterLab.js +0 -4
  232. package/lib/hooks/useCache.d.ts +310 -105
  233. package/lib/hooks/useCache.js +142 -355
  234. package/lib/hooks/useContainsFocus.d.ts +1 -1
  235. package/lib/hooks/useContents.d.ts +313 -0
  236. package/lib/hooks/useContents.js +964 -0
  237. package/lib/hooks/useFocusTrap.d.ts +4 -4
  238. package/lib/hooks/useFocusTrap.js +1 -1
  239. package/lib/hooks/useMcp.d.ts +229 -0
  240. package/lib/hooks/useMcp.js +656 -0
  241. package/lib/hooks/useMobile.js +0 -5
  242. package/lib/hooks/useProjectStore.d.ts +3 -3
  243. package/lib/hooks/useProjectStore.js +4 -4
  244. package/lib/hooks/useRef.d.ts +1 -1
  245. package/lib/hooks/useRef.js +3 -0
  246. package/lib/hooks/useScreencapture.d.ts +2 -1
  247. package/lib/hooks/useScreencapture.js +0 -4
  248. package/lib/hooks/useToast.js +0 -4
  249. package/lib/hooks/useVisibilityObserver.d.ts +1 -1
  250. package/lib/index.d.ts +4 -1
  251. package/lib/index.js +3 -1
  252. package/lib/mocks/components/FlashMock.d.ts +1 -1
  253. package/lib/mocks/views/ActionMenuMock.d.ts +1 -1
  254. package/lib/mocks/views/ChartMock.d.ts +1 -1
  255. package/lib/mocks/views/DashboardMock.d.ts +1 -1
  256. package/lib/mocks/views/FormMock.d.ts +1 -1
  257. package/lib/mocks/views/TableMock.d.ts +1 -1
  258. package/lib/mocks/views/WipMock.d.ts +1 -1
  259. package/lib/models/Credits.d.ts +16 -0
  260. package/lib/models/Credits.js +22 -0
  261. package/lib/models/McpAuditEvent.d.ts +52 -0
  262. package/lib/models/McpAuditEvent.js +5 -0
  263. package/lib/models/McpBinding.d.ts +51 -0
  264. package/lib/models/McpBinding.js +5 -0
  265. package/lib/models/McpPolicy.d.ts +77 -0
  266. package/lib/models/McpPolicy.js +5 -0
  267. package/lib/models/McpTask.d.ts +94 -0
  268. package/lib/models/McpTask.js +7 -0
  269. package/lib/models/StartedBy.d.ts +57 -0
  270. package/lib/models/StartedBy.js +81 -0
  271. package/lib/models/UserDTO.js +4 -2
  272. package/lib/models/contents/__fixtures__/solr-codec.json +57 -0
  273. package/lib/models/contents/__fixtures__/v1-contracts.json +66 -0
  274. package/lib/models/contents/fieldCase.d.ts +8 -0
  275. package/lib/models/contents/fieldCase.js +37 -0
  276. package/lib/models/contents/index.d.ts +2 -0
  277. package/lib/models/contents/index.js +6 -0
  278. package/lib/models/contents/permissions.d.ts +16 -0
  279. package/lib/models/contents/permissions.js +34 -0
  280. package/lib/models/index.d.ts +5 -1
  281. package/lib/models/index.js +5 -1
  282. package/lib/state/substates/CoreState.d.ts +15 -7
  283. package/lib/state/substates/CoreState.js +18 -14
  284. package/lib/state/substates/IAMState.d.ts +1 -1
  285. package/lib/state/substates/IAMState.js +5 -5
  286. package/lib/state/substates/ProfileState.js +0 -4
  287. package/lib/state/substates/index.d.ts +0 -1
  288. package/lib/state/substates/index.js +0 -1
  289. package/lib/utils/Jwt.d.ts +26 -0
  290. package/lib/utils/Jwt.js +37 -0
  291. package/lib/utils/WithSuspense.d.ts +1 -1
  292. package/lib/views/api-keys/APIKeyEdit.d.ts +1 -1
  293. package/lib/views/api-keys/APIKeyNew.d.ts +1 -1
  294. package/lib/views/api-keys/APIKeys.d.ts +1 -1
  295. package/lib/views/api-keys/APIKeys.js +30 -4
  296. package/lib/views/api-keys/APIKeysStandalone.d.ts +5 -1
  297. package/lib/views/api-keys/APIKeysStandalone.js +2 -2
  298. package/lib/views/datasources/DatasourceDetail.d.ts +12 -5
  299. package/lib/views/datasources/DatasourceDetail.js +80 -110
  300. package/lib/views/datasources/DatasourceNew.d.ts +14 -8
  301. package/lib/views/datasources/DatasourceNew.js +129 -118
  302. package/lib/views/datasources/Datasources.d.ts +39 -7
  303. package/lib/views/datasources/Datasources.js +95 -40
  304. package/lib/views/datasources/DatasourcesMock.d.ts +3 -0
  305. package/lib/views/datasources/DatasourcesMock.js +57 -0
  306. package/lib/views/iam/SignInSimple.d.ts +12 -0
  307. package/lib/views/iam/SignInSimple.js +4 -4
  308. package/lib/views/index.d.ts +1 -0
  309. package/lib/views/index.js +1 -0
  310. package/lib/views/mcp/AlertDestinations.d.ts +34 -0
  311. package/lib/views/mcp/AlertDestinations.js +75 -0
  312. package/lib/views/mcp/AlertRules.d.ts +32 -0
  313. package/lib/views/mcp/AlertRules.js +245 -0
  314. package/lib/views/mcp/AuditLog.d.ts +42 -0
  315. package/lib/views/mcp/AuditLog.js +144 -0
  316. package/lib/views/mcp/ConnectedAgents.d.ts +34 -0
  317. package/lib/views/mcp/ConnectedAgents.js +100 -0
  318. package/lib/views/mcp/EnterpriseConsole.d.ts +74 -0
  319. package/lib/views/mcp/EnterpriseConsole.js +173 -0
  320. package/lib/views/mcp/McpDashboard.d.ts +50 -0
  321. package/lib/views/mcp/McpDashboard.js +347 -0
  322. package/lib/views/mcp/McpHome.d.ts +92 -0
  323. package/lib/views/mcp/McpHome.js +153 -0
  324. package/lib/views/mcp/McpObservability.d.ts +50 -0
  325. package/lib/views/mcp/McpObservability.js +150 -0
  326. package/lib/views/mcp/OrganizationPolicy.d.ts +45 -0
  327. package/lib/views/mcp/OrganizationPolicy.js +107 -0
  328. package/lib/views/mcp/OrganizationUsage.d.ts +69 -0
  329. package/lib/views/mcp/OrganizationUsage.js +113 -0
  330. package/lib/views/mcp/PersonalPolicy.d.ts +54 -0
  331. package/lib/views/mcp/PersonalPolicy.js +125 -0
  332. package/lib/views/mcp/Policies.d.ts +53 -0
  333. package/lib/views/mcp/Policies.js +210 -0
  334. package/lib/views/mcp/PolicyForm.d.ts +67 -0
  335. package/lib/views/mcp/PolicyForm.js +91 -0
  336. package/lib/views/mcp/PolicyHistory.d.ts +45 -0
  337. package/lib/views/mcp/PolicyHistory.js +62 -0
  338. package/lib/views/mcp/ServiceAgents.d.ts +46 -0
  339. package/lib/views/mcp/ServiceAgents.js +194 -0
  340. package/lib/views/mcp/TeamPolicies.d.ts +33 -0
  341. package/lib/views/mcp/TeamPolicies.js +98 -0
  342. package/lib/views/mcp/format.d.ts +25 -0
  343. package/lib/views/mcp/format.js +77 -0
  344. package/lib/views/mcp/index.d.ts +29 -0
  345. package/lib/views/mcp/index.js +37 -0
  346. package/lib/views/mcp/types.d.ts +66 -0
  347. package/lib/views/mcp/types.js +5 -0
  348. package/lib/views/secrets/SecretEdit.d.ts +5 -1
  349. package/lib/views/secrets/SecretEdit.js +2 -2
  350. package/lib/views/secrets/SecretNew.d.ts +11 -1
  351. package/lib/views/secrets/SecretNew.js +2 -2
  352. package/lib/views/secrets/Secrets.d.ts +12 -1
  353. package/lib/views/secrets/Secrets.js +2 -2
  354. package/package.json +28 -24
  355. package/scripts/generate-contents-types.py +169 -0
  356. package/scripts/generate-mcp-types.py +233 -0
  357. package/lib/api/iam/datasources.d.ts +0 -86
  358. package/lib/api/iam/datasources.js +0 -185
  359. package/lib/components/toolbars/index.d.ts +0 -1
  360. package/lib/models/Datasource.d.ts +0 -181
  361. package/lib/models/Datasource.js +0 -154
  362. package/lib/state/substates/DatasourceState.d.ts +0 -11
  363. package/lib/state/substates/DatasourceState.js +0 -16
  364. /package/lib/{components/toolbars/index.js → api/contents/generated.js} +0 -0
@@ -0,0 +1,66 @@
1
+ /**
2
+ * What every MCP view is given by the application that draws it.
3
+ *
4
+ * Two things a Core view does not decide for itself: the words for a
5
+ * failure, and the addresses to link to. Both belong to the application —
6
+ * the web application says "Sign in to see your agents" and routes at
7
+ * `/audit`, JupyterLab says something else and routes somewhere else — so
8
+ * they arrive as props rather than as a second copy of the same catalog
9
+ * inside Core.
10
+ *
11
+ * The classification itself lives once, in the application, beside its
12
+ * specification: `ui/src/views/mcp/mcpErrorState.ts` and its spec.
13
+ *
14
+ * @module views/mcp/types
15
+ */
16
+ /** What a failed request actually was, in the reader's terms. */
17
+ export type McpErrorReason = 'unauthenticated' | 'forbidden' | 'not-found' | 'unavailable' | 'unknown';
18
+ export interface McpErrorState {
19
+ reason: McpErrorReason;
20
+ heading: string;
21
+ description: string;
22
+ /** Whether retrying in place could plausibly succeed. */
23
+ retryable: boolean;
24
+ }
25
+ /**
26
+ * Describe a failure in terms of what the reader was looking at; `subject`
27
+ * names it as it appears on screen ("Connected agents", "Audit").
28
+ */
29
+ export type McpErrorStateFn = (error: unknown, subject: string) => McpErrorState;
30
+ /**
31
+ * Where the MCP surfaces live in the application drawing them.
32
+ *
33
+ * A view links onward — a call to its audit row, an agent to its runs — and
34
+ * must not invent the addresses; the application owns its routing.
35
+ */
36
+ /**
37
+ * Where an application puts the surfaces these views link to.
38
+ *
39
+ * Required at every mount, with no defaults. There were defaults, naming the
40
+ * layout the web application had when these views were written — the audit at
41
+ * `/audit`, the runs at `/runs`. The application moved them under `/mcp`, and
42
+ * every view mounted without `routes` went on linking to the old addresses:
43
+ * the page rendered, the links looked right, and clicking one left the tabs
44
+ * or landed on a route that had stopped existing.
45
+ *
46
+ * That was found four separate times by clicking, and fixed four times by
47
+ * eye. A default here is a wrong answer that looks like a right one, so
48
+ * there is none: an application that mounts these says where its own pages
49
+ * are, or it does not compile.
50
+ */
51
+ export interface McpRoutes {
52
+ /** The dashboard: what the connected clients are doing right now. */
53
+ dashboard: string;
54
+ /** Setup and access: the endpoint and the per-client cards. */
55
+ access: string;
56
+ /** The audit log. */
57
+ audit: string;
58
+ /** The runs list; a task appends `/{uid}`. */
59
+ runs: string;
60
+ /** The observability panes. */
61
+ observability: string;
62
+ /** The connected agents. */
63
+ agents: string;
64
+ /** The effective policy. */
65
+ policies: string;
66
+ }
@@ -0,0 +1,5 @@
1
+ /*
2
+ * Copyright (c) 2023-2025 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ export {};
@@ -1,2 +1,6 @@
1
- export declare const SecretEdit: () => import("react/jsx-runtime").JSX.Element;
1
+ export type SecretEditProps = {
2
+ /** The list to return to once the secret is deleted. */
3
+ secretsListRoute?: string;
4
+ };
5
+ export declare const SecretEdit: ({ secretsListRoute, }?: SecretEditProps) => import("react").JSX.Element;
2
6
  export default SecretEdit;
@@ -11,7 +11,7 @@ import { EyeIcon, EyeClosedIcon } from '@primer/octicons-react';
11
11
  import { BoringAvatar } from '../../components/avatars/index.js';
12
12
  import { useCache, useNavigate, useToast } from '../../hooks/index.js';
13
13
  import { useRunStore } from '../../state/index.js';
14
- export const SecretEdit = () => {
14
+ export const SecretEdit = ({ secretsListRoute = '/settings/secrets', } = {}) => {
15
15
  const { secretId } = useParams();
16
16
  const runStore = useRunStore();
17
17
  const navigate = useNavigate();
@@ -120,7 +120,7 @@ export const SecretEdit = () => {
120
120
  enqueueToast('The secret is successfully deleted.', {
121
121
  variant: 'success',
122
122
  });
123
- navigate(`/settings/iam/secrets`);
123
+ navigate(secretsListRoute);
124
124
  }
125
125
  },
126
126
  onSettled: () => {
@@ -1,2 +1,12 @@
1
- export declare const SecretNew: () => import("react/jsx-runtime").JSX.Element;
1
+ export type SecretNewProps = {
2
+ /**
3
+ * The list to return to once the secret is created.
4
+ *
5
+ * It was hardcoded to a settings address this view no longer lives at, so a
6
+ * caller that mounted it elsewhere — and passed this prop, which did not
7
+ * exist — landed on a dead URL after every successful save.
8
+ */
9
+ secretsListRoute?: string;
10
+ };
11
+ export declare const SecretNew: ({ secretsListRoute, }?: SecretNewProps) => import("react").JSX.Element;
2
12
  export default SecretNew;
@@ -8,7 +8,7 @@ import { PageHeader, FormControl, Button, TextInput, Textarea, Select, } from '@
8
8
  import { Box } from '@datalayer/primer-addons';
9
9
  import { useCache, useNavigate, useToast } from '../../hooks/index.js';
10
10
  import { useRunStore } from '../../state/index.js';
11
- export const SecretNew = () => {
11
+ export const SecretNew = ({ secretsListRoute = '/settings/secrets', } = {}) => {
12
12
  const runStore = useRunStore();
13
13
  const navigate = useNavigate();
14
14
  const { useCreateSecret } = useCache();
@@ -81,7 +81,7 @@ export const SecretNew = () => {
81
81
  onSuccess: (resp) => {
82
82
  if (resp.success) {
83
83
  enqueueToast(resp.message, { variant: 'success' });
84
- navigate(`/settings/iam/secrets`);
84
+ navigate(secretsListRoute);
85
85
  }
86
86
  },
87
87
  onSettled: () => {
@@ -1,2 +1,13 @@
1
- export declare const Secrets: () => import("react/jsx-runtime").JSX.Element;
1
+ export type SecretsProps = {
2
+ /**
3
+ * Where the "New Secret" button goes.
4
+ *
5
+ * A prop because the same list is mounted at more than one base: the web
6
+ * application serves it under the settings, a JupyterLab extension under its
7
+ * own route. Hardcoding one of those sent the other somewhere that does not
8
+ * exist.
9
+ */
10
+ newSecretRoute?: string;
11
+ };
12
+ export declare const Secrets: ({ newSecretRoute, }?: SecretsProps) => import("react").JSX.Element;
2
13
  export default Secrets;
@@ -41,8 +41,8 @@ const SecretsTable = () => {
41
41
  },
42
42
  ] }) }));
43
43
  };
44
- export const Secrets = () => {
44
+ export const Secrets = ({ newSecretRoute = '/settings/secrets/new', } = {}) => {
45
45
  const navigate = useNavigate();
46
- return (_jsxs(PageLayout, { containerWidth: "full", padding: "normal", style: { overflow: 'visible', minHeight: 'calc(100vh - 45px)' }, children: [_jsx(PageLayout.Header, { children: _jsxs(PageHeader, { children: [_jsx(PageHeader.TitleArea, { variant: "large", children: _jsx(PageHeader.Title, { children: "Secrets" }) }), _jsx(PageHeader.Actions, { children: _jsx(Button, { size: "small", variant: "primary", onClick: e => navigate('/secrets/new', e), children: "New secret" }) })] }) }), _jsx(PageLayout.Content, { children: _jsx(Box, { children: _jsx(SecretsTable, {}) }) })] }));
46
+ return (_jsxs(PageLayout, { containerWidth: "full", padding: "normal", style: { overflow: 'visible', minHeight: 'calc(100vh - 45px)' }, children: [_jsx(PageLayout.Header, { children: _jsxs(PageHeader, { children: [_jsx(PageHeader.TitleArea, { variant: "large", children: _jsx(PageHeader.Title, { children: "Secrets" }) }), _jsx(PageHeader.Actions, { children: _jsx(Button, { size: "small", variant: "primary", onClick: e => navigate(newSecretRoute, e), children: "New secret" }) })] }) }), _jsx(PageLayout.Content, { children: _jsx(Box, { children: _jsx(SecretsTable, {}) }) })] }));
47
47
  };
48
48
  export default Secrets;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datalayer/core",
3
- "version": "1.1.60",
3
+ "version": "1.1.66",
4
4
  "type": "module",
5
5
  "workspaces": [
6
6
  ".",
@@ -55,6 +55,10 @@
55
55
  "build:lib": "npm run clean:lib && gulp resources-to-lib && tsc -b && node scripts/fix-esm-imports.cjs",
56
56
  "build:cli-login": "vite build --config vite.cli-login.config.ts",
57
57
  "build:types": "npm run clean:lib && tsc -b",
58
+ "generate:contents": "python scripts/generate-contents-types.py",
59
+ "check:contents-generated": "python scripts/generate-contents-types.py --check",
60
+ "generate:mcp": "python scripts/generate-mcp-types.py",
61
+ "check:mcp-generated": "python scripts/generate-mcp-types.py --check",
58
62
  "build:nextjs": "npm run build --workspace=nextjj-example",
59
63
  "build:examples": "npm run build:nextjs",
60
64
  "build:all": "npm run build && npm run build:examples",
@@ -135,8 +139,8 @@
135
139
  "@primer/primitives": "^10.7.0",
136
140
  "@primer/react": "^37.31.0",
137
141
  "@primer/react-brand": "^0.58.0",
138
- "@stripe/react-stripe-js": "^6.3.0",
139
- "@stripe/stripe-js": "^9.4.0",
142
+ "@stripe/react-stripe-js": "6.8.2",
143
+ "@stripe/stripe-js": "9.15.0",
140
144
  "@styled-system/css": "^5.1.5",
141
145
  "@tailwindcss/vite": "^4.1.13",
142
146
  "@tanstack/react-query": "^5.90.6",
@@ -155,10 +159,10 @@
155
159
  "lucide-react": "^0.542.0",
156
160
  "marked": "^4.0.10",
157
161
  "mock-socket": "^9.3.1",
158
- "react": "18.3.1",
162
+ "react": "19.2.8",
159
163
  "react-confetti": "^6.4.0",
160
- "react-dom": "18.3.1",
161
- "react-is": "^19.2.0",
164
+ "react-dom": "19.2.8",
165
+ "react-is": "19.2.8",
162
166
  "react-toastify": "^11.0.5",
163
167
  "streamdown": "^1.6.6",
164
168
  "styled-system": "^5.1.5",
@@ -169,7 +173,7 @@
169
173
  "tw-animate-css": "^1.4.0",
170
174
  "ulid": "^2.3.0",
171
175
  "unique-names-generator": "^4.7.1",
172
- "usehooks-ts": "^2.9.1",
176
+ "usehooks-ts": "3.1.1",
173
177
  "uuid": "^13.0.0",
174
178
  "validator": "^13.7.0",
175
179
  "zod": "^4.1.13",
@@ -186,7 +190,7 @@
186
190
  },
187
191
  "devDependencies": {
188
192
  "@chromatic-com/storybook": "^4.1.0",
189
- "@eslint/js": "^9.29.0",
193
+ "@eslint/js": "^10.0.1",
190
194
  "@storybook/addon-a11y": "^9.1.1",
191
195
  "@storybook/addon-docs": "^9.1.1",
192
196
  "@storybook/addon-onboarding": "^9.1.1",
@@ -195,8 +199,8 @@
195
199
  "@storybook/react-vite": "^9.1.1",
196
200
  "@tailwindcss/postcss": "^4.1.16",
197
201
  "@types/node": "^20.11.0",
198
- "@types/react": "18.3.20",
199
- "@types/react-dom": "18.3.6",
202
+ "@types/react": "19.2.18",
203
+ "@types/react-dom": "19.2.5",
200
204
  "@vitejs/plugin-react": "^4.5.2",
201
205
  "@vitest/browser": "^3.2.4",
202
206
  "@vitest/coverage-v8": "^3.2.4",
@@ -204,13 +208,13 @@
204
208
  "autoprefixer": "^10.4.21",
205
209
  "crypto-browserify": "^3.12.1",
206
210
  "dotenv": "^17.2.2",
207
- "eslint": "^9.29.0",
211
+ "eslint": "^10.9.1",
208
212
  "eslint-config-prettier": "^10.1.8",
209
- "eslint-plugin-prettier": "^5.5.4",
213
+ "eslint-plugin-prettier": "^5.5.6",
210
214
  "eslint-plugin-react": "^7.37.5",
211
- "eslint-plugin-react-hooks": "^5.2.0",
212
- "eslint-plugin-react-refresh": "^0.4.20",
213
- "eslint-plugin-storybook": "^9.1.1",
215
+ "eslint-plugin-react-hooks": "^7.1.1",
216
+ "eslint-plugin-react-refresh": "^0.5.5",
217
+ "eslint-plugin-storybook": "^10.5.10",
214
218
  "globals": "^16.2.0",
215
219
  "gulp": "^4.0.2",
216
220
  "gulp-append-prepend": "^1.0.8",
@@ -223,13 +227,13 @@
223
227
  "patch-package": "^8.0.0",
224
228
  "playwright": "^1.53.2",
225
229
  "prettier": "^3.6.2",
226
- "react-router-dom": "^6.22.3",
230
+ "react-router-dom": "7.18.3",
227
231
  "rimraf": "^6.1.3",
228
232
  "storybook": "^9.1.1",
229
233
  "typedoc-plugin-markdown": "^4.0.0",
230
- "typescript": "^5.8.3",
234
+ "typescript": "5.9.3",
231
235
  "typescript-eslint": "^8.34.1",
232
- "vite": "^7.0.0",
236
+ "vite": "7.3.6",
233
237
  "vite-plugin-treat-umd-as-commonjs": "^0.1.4",
234
238
  "vitest": "^3.2.4"
235
239
  },
@@ -241,12 +245,12 @@
241
245
  "@microsoft/fast-react-wrapper": "0.3.24",
242
246
  "@microsoft/fast-web-utilities": "5.4.1",
243
247
  "@microsoft/load-themed-styles": "1.10.295",
244
- "@types/react": "18.3.20",
245
- "@types/react-dom": "18.3.6",
246
- "pyodide": "0.28.0",
247
- "react": "18.3.1",
248
- "react-dom": "18.3.1",
249
- "typescript": "^5.8.3"
248
+ "@types/react": "19.2.18",
249
+ "@types/react-dom": "19.2.5",
250
+ "pyodide": "0.29.4",
251
+ "react": "19.2.8",
252
+ "react-dom": "19.2.8",
253
+ "typescript": "5.9.3"
250
254
  },
251
255
  "lint-staged": {
252
256
  "src/**/*.{js,jsx,ts,tsx}": [
@@ -0,0 +1,169 @@
1
+ #!/usr/bin/env python3
2
+ # Copyright (c) 2023-2025 Datalayer, Inc.
3
+ # Distributed under the terms of the Modified BSD License.
4
+
5
+ """Generate deterministic TypeScript wire types from Contents OpenAPI."""
6
+
7
+ from __future__ import annotations
8
+
9
+ import json
10
+ import os
11
+ import subprocess
12
+ import sys
13
+ import tempfile
14
+ from pathlib import Path
15
+ from typing import Any
16
+
17
+ ROOT = Path(__file__).parents[1]
18
+ DEFAULT_OPENAPI = (
19
+ ROOT.parents[2]
20
+ / "k8s/services/contents/datalayer_contents/contracts/v1/openapi.json"
21
+ )
22
+ OPENAPI = Path(os.environ.get("DATALAYER_CONTENTS_OPENAPI", DEFAULT_OPENAPI))
23
+ DEFAULT_CONTRACT_FIXTURES = (
24
+ ROOT.parents[2] / "k8s/services/contents/tests/fixtures/v1-contracts.json"
25
+ )
26
+ DEFAULT_SOLR_CODEC_FIXTURE = (
27
+ ROOT.parents[2]
28
+ / "k8s/services/common/datalayer_common/tests/fixtures/solr_codec.json"
29
+ )
30
+ CONTRACT_FIXTURES = Path(
31
+ os.environ.get("DATALAYER_CONTENTS_CONTRACT_FIXTURES", DEFAULT_CONTRACT_FIXTURES)
32
+ )
33
+ SOLR_CODEC_FIXTURE = Path(
34
+ os.environ.get("DATALAYER_SOLR_CODEC_FIXTURE", DEFAULT_SOLR_CODEC_FIXTURE)
35
+ )
36
+ OUTPUT = ROOT / "src/api/contents/generated.ts"
37
+ PYTHON_OUTPUT = ROOT / "datalayer_core/models/contents/generated.py"
38
+ CLIENT_CONTRACT_FIXTURES = ROOT / "src/models/contents/__fixtures__/v1-contracts.json"
39
+ CLIENT_SOLR_CODEC_FIXTURE = ROOT / "src/models/contents/__fixtures__/solr-codec.json"
40
+
41
+
42
+ def type_name(reference: str) -> str:
43
+ return reference.rsplit("/", 1)[-1]
44
+
45
+
46
+ def ts_type(schema: dict[str, Any]) -> str:
47
+ if "$ref" in schema:
48
+ return type_name(schema["$ref"])
49
+ if "const" in schema:
50
+ return json.dumps(schema["const"])
51
+ if "enum" in schema:
52
+ return " | ".join(json.dumps(value) for value in schema["enum"])
53
+ if "oneOf" in schema:
54
+ return " | ".join(ts_type(item) for item in schema["oneOf"])
55
+ if "anyOf" in schema:
56
+ return " | ".join(ts_type(item) for item in schema["anyOf"])
57
+ kind = schema.get("type")
58
+ if isinstance(kind, list):
59
+ return " | ".join(
60
+ "null" if item == "null" else ts_type({"type": item}) for item in kind
61
+ )
62
+ if kind == "array":
63
+ return f"Array<{ts_type(schema.get('items', {}))}>"
64
+ if kind == "object":
65
+ additional = schema.get("additionalProperties")
66
+ return (
67
+ f"Record<string, {ts_type(additional)}>"
68
+ if isinstance(additional, dict)
69
+ else "Record<string, unknown>"
70
+ )
71
+ if kind in {"integer", "number"}:
72
+ return "number"
73
+ if kind == "boolean":
74
+ return "boolean"
75
+ if kind == "null":
76
+ return "null"
77
+ if kind == "string":
78
+ return "string"
79
+ return "unknown"
80
+
81
+
82
+ def camel(name: str) -> str:
83
+ parts = name.split("_")
84
+ return parts[0] + "".join(part[:1].upper() + part[1:] for part in parts[1:])
85
+
86
+
87
+ def generate() -> str:
88
+ document = json.loads(OPENAPI.read_text())
89
+ schemas = document["components"]["schemas"]
90
+ lines = [
91
+ "/* This file is generated from Datalayer Contents OpenAPI. Do not edit. */",
92
+ "",
93
+ ]
94
+ for name, schema in schemas.items():
95
+ if schema.get("type") == "object" and "properties" in schema:
96
+ lines.append(f"export interface {name} {{")
97
+ required = set(schema.get("required", []))
98
+ for property_name, property_schema in schema["properties"].items():
99
+ optional = "" if property_name in required else "?"
100
+ lines.append(
101
+ f" {camel(property_name)}{optional}: {ts_type(property_schema)};"
102
+ )
103
+ lines.extend(["}", ""])
104
+ else:
105
+ lines.extend([f"export type {name} = {ts_type(schema)};", ""])
106
+ return "\n".join(lines)
107
+
108
+
109
+ def main() -> None:
110
+ expected = generate()
111
+ expected_fixtures = CONTRACT_FIXTURES.read_text()
112
+ expected_solr_fixture = SOLR_CODEC_FIXTURE.read_text()
113
+ check = "--check" in sys.argv[1:]
114
+ if check:
115
+ if not OUTPUT.exists() or OUTPUT.read_text() != expected:
116
+ raise SystemExit("Stale generated Contents TypeScript types")
117
+ if (
118
+ not CLIENT_CONTRACT_FIXTURES.exists()
119
+ or CLIENT_CONTRACT_FIXTURES.read_text() != expected_fixtures
120
+ ):
121
+ raise SystemExit("Stale generated Contents contract fixtures")
122
+ if (
123
+ not CLIENT_SOLR_CODEC_FIXTURE.exists()
124
+ or CLIENT_SOLR_CODEC_FIXTURE.read_text() != expected_solr_fixture
125
+ ):
126
+ raise SystemExit("Stale generated Solr codec fixture")
127
+ else:
128
+ OUTPUT.parent.mkdir(parents=True, exist_ok=True)
129
+ OUTPUT.write_text(expected)
130
+ CLIENT_CONTRACT_FIXTURES.parent.mkdir(parents=True, exist_ok=True)
131
+ CLIENT_CONTRACT_FIXTURES.write_text(expected_fixtures)
132
+ CLIENT_SOLR_CODEC_FIXTURE.write_text(expected_solr_fixture)
133
+
134
+ with tempfile.TemporaryDirectory() as temporary_directory:
135
+ generated_python = (
136
+ Path(temporary_directory) / "generated.py" if check else PYTHON_OUTPUT
137
+ )
138
+ generated_python.parent.mkdir(parents=True, exist_ok=True)
139
+ subprocess.run(
140
+ [
141
+ "datamodel-codegen",
142
+ "--input",
143
+ str(OPENAPI),
144
+ "--input-file-type",
145
+ "openapi",
146
+ "--output",
147
+ str(generated_python),
148
+ "--output-model-type",
149
+ "pydantic_v2.BaseModel",
150
+ "--target-python-version",
151
+ "3.10",
152
+ "--use-standard-collections",
153
+ "--use-union-operator",
154
+ "--disable-timestamp",
155
+ "--enum-field-as-literal",
156
+ "all",
157
+ "--collapse-root-models",
158
+ ],
159
+ check=True,
160
+ )
161
+ if check and (
162
+ not PYTHON_OUTPUT.exists()
163
+ or PYTHON_OUTPUT.read_text() != generated_python.read_text()
164
+ ):
165
+ raise SystemExit("Stale generated Contents Python types")
166
+
167
+
168
+ if __name__ == "__main__":
169
+ main()