From fb1edf2425196e1cfeff82049105339393538b41 Mon Sep 17 00:00:00 2001 From: Akshay Agrawal Date: Wed, 21 Aug 2024 17:49:59 -0400 Subject: [PATCH 1/6] feat: user config for dataframe viewer --- .../app-config/user-config-form.tsx | 87 +- .../src/core/cells/__tests__/cells.test.ts | 1 + .../core/codemirror/__tests__/setup.test.ts | 1 + .../language/__tests__/extension.test.ts | 1 + .../language/__tests__/utils.test.ts | 1 + frontend/src/core/config/config-schema.ts | 1 + frontend/src/css/md.css | 4 +- frontend/src/stories/editor.stories.tsx | 1 + marimo/_ast/app.py | 8 +- marimo/_config/config.py | 3 + marimo/_config/settings.py | 1 + marimo/_output/formatters/df_formatters.py | 44 +- .../_output/formatters/pandas_formatters.py | 13 +- marimo/_plugins/ui/_impl/anywidget/comm.py | 1 + marimo/_plugins/ui/_impl/anywidget/init.py | 1 + marimo/_runtime/context/kernel_context.py | 5 + marimo/_runtime/context/script_context.py | 5 + marimo/_runtime/context/types.py | 6 + marimo/_runtime/runtime.py | 2 + marimo/_smoke_tests/bugs/2070-latex-slides.py | 1 + marimo/_smoke_tests/quak-demo.py | 1 + openapi/api.yaml | 15 +- openapi/src/api.ts | 3774 ++++++++++------- 23 files changed, 2470 insertions(+), 1507 deletions(-) diff --git a/frontend/src/components/app-config/user-config-form.tsx b/frontend/src/components/app-config/user-config-form.tsx index 9d82da45baf..fea7352aee1 100644 --- a/frontend/src/components/app-config/user-config-form.tsx +++ b/frontend/src/components/app-config/user-config-form.tsx @@ -342,46 +342,51 @@ export const UserConfigForm: React.FC = () => { /> ( - - Code editor font size - - - + + Cell output area + + field.onChange(e.target.value)} value={field.value} - minValue={8} - maxValue={20} - onChange={(value) => { - field.onChange(value); - onSubmit(form.getValues()); - }} - /> - - - - + disabled={field.disabled} + className="inline-flex mr-2" + > + {["above", "below"].map((option) => ( + + ))} + + + + + + + Where to display cell's output. + + )} /> (
- Cell output area + Dataframe viewer field.onChange(e.target.value)} value={field.value} disabled={field.disabled} className="inline-flex mr-2" > - {["above", "below"].map((option) => ( + {["rich", "plain"].map((option) => ( @@ -392,11 +397,38 @@ export const UserConfigForm: React.FC = () => { - Where to display cell's output. + Whether to use marimo's rich dataframe viewer or a plain HTML + table; requires notebook restart to take effect.
)} /> + ( + + Code editor font size + + + { + field.onChange(value); + onSubmit(form.getValues()); + }} + /> + + + + + )} + /> @@ -622,7 +654,10 @@ export const UserConfigForm: React.FC = () => { const SettingGroup = ({ title, children, -}: { title: string; children: React.ReactNode }) => { +}: { + title: string; + children: React.ReactNode; +}) => { return (
{title} diff --git a/frontend/src/core/cells/__tests__/cells.test.ts b/frontend/src/core/cells/__tests__/cells.test.ts index 83694ecbd1d..e67925d60a8 100644 --- a/frontend/src/core/cells/__tests__/cells.test.ts +++ b/frontend/src/core/cells/__tests__/cells.test.ts @@ -62,6 +62,7 @@ function createEditor(content: string) { completionConfig: { activate_on_typing: true, copilot: false, + codeium_api_key: null, }, hotkeys: new OverridingHotkeyProvider({}), showPlaceholder: true, diff --git a/frontend/src/core/codemirror/__tests__/setup.test.ts b/frontend/src/core/codemirror/__tests__/setup.test.ts index 5643d7be267..af21829fa19 100644 --- a/frontend/src/core/codemirror/__tests__/setup.test.ts +++ b/frontend/src/core/codemirror/__tests__/setup.test.ts @@ -47,6 +47,7 @@ function getOpts() { completionConfig: { activate_on_typing: false, copilot: false, + codeium_api_key: null, }, keymapConfig: { preset: "default", diff --git a/frontend/src/core/codemirror/language/__tests__/extension.test.ts b/frontend/src/core/codemirror/language/__tests__/extension.test.ts index 8163a827efe..30636e8008f 100644 --- a/frontend/src/core/codemirror/language/__tests__/extension.test.ts +++ b/frontend/src/core/codemirror/language/__tests__/extension.test.ts @@ -18,6 +18,7 @@ function createState(content: string) { completionConfig: { copilot: false, activate_on_typing: true, + codeium_api_key: null, }, hotkeys: new OverridingHotkeyProvider({}), enableAI: true, diff --git a/frontend/src/core/codemirror/language/__tests__/utils.test.ts b/frontend/src/core/codemirror/language/__tests__/utils.test.ts index 56234340b7d..c5568f93797 100644 --- a/frontend/src/core/codemirror/language/__tests__/utils.test.ts +++ b/frontend/src/core/codemirror/language/__tests__/utils.test.ts @@ -20,6 +20,7 @@ function createEditor(doc: string) { completionConfig: { activate_on_typing: true, copilot: false, + codeium_api_key: null, }, hotkeys: new OverridingHotkeyProvider({}), showPlaceholder: true, diff --git a/frontend/src/core/config/config-schema.ts b/frontend/src/core/config/config-schema.ts index cb4674e9534..6e3aaa98e4f 100644 --- a/frontend/src/core/config/config-schema.ts +++ b/frontend/src/core/config/config-schema.ts @@ -75,6 +75,7 @@ export const UserConfigSchema = z theme: z.enum(["light", "dark", "system"]).default("light"), code_editor_font_size: z.number().nonnegative().default(14), cell_output: z.enum(["above", "below"]).default("above"), + dataframes: z.enum(["rich", "plain"]).default("rich"), default_width: z .enum(VALID_APP_WIDTHS) .default("medium") diff --git a/frontend/src/css/md.css b/frontend/src/css/md.css index 4f7225aba85..0561e6d06be 100644 --- a/frontend/src/css/md.css +++ b/frontend/src/css/md.css @@ -27,8 +27,8 @@ so we need to apply the same formatting */ display: block; - margin-block: 1rem 1rem; - margin-inline: 0 0; + margin-block: 1rem; + margin-inline: 0; } .markdown h1, diff --git a/frontend/src/stories/editor.stories.tsx b/frontend/src/stories/editor.stories.tsx index e6f2e243775..9135f3f41a7 100644 --- a/frontend/src/stories/editor.stories.tsx +++ b/frontend/src/stories/editor.stories.tsx @@ -80,6 +80,7 @@ export const DefaultPython: Story = { copilotBundle({ activate_on_typing: true, copilot: false, + codeium_api_key: null, }), ]} /> diff --git a/marimo/_ast/app.py b/marimo/_ast/app.py index f397b6f6ccd..ef4a645c023 100644 --- a/marimo/_ast/app.py +++ b/marimo/_ast/app.py @@ -24,7 +24,8 @@ MultipleDefinitionError, UnparsableError, ) -from marimo._config.config import WidthType +from marimo._config.config import MarimoConfig, WidthType +from marimo._config.utils import load_config from marimo._messaging.mimetypes import KnownMimeType from marimo._output.hypertext import Html from marimo._output.rich_help import mddoc @@ -145,6 +146,7 @@ def __init__(self, **kwargs: Any) -> None: # unrecognized settings will just be dropped, instead of raising # a TypeError. self._config = _AppConfig.from_untrusted_dict(kwargs) + self._user_config = load_config() if runtime_context_installed(): # nested applications get a unique cell prefix to disambiguate @@ -571,6 +573,10 @@ def __init__(self, app: App) -> None: def config(self) -> _AppConfig: return self._app._config + @property + def user_config(self) -> MarimoConfig: + return self._app._user_config + @property def cell_manager(self) -> CellManager: return self._app._cell_manager diff --git a/marimo/_config/config.py b/marimo/_config/config.py index 7c643504086..c20fe867cfc 100644 --- a/marimo/_config/config.py +++ b/marimo/_config/config.py @@ -113,12 +113,14 @@ class DisplayConfig(TypedDict): - `theme`: `"light"`, `"dark"`, or `"system"` - `code_editor_font_size`: font size for the code editor - `cell_output`: `"above"` or `"below"` + - `dataframes`: `"rich"` or `"plain"` """ theme: Literal["light", "dark", "system"] code_editor_font_size: int cell_output: Literal["above", "below"] default_width: WidthType + dataframes: Literal["rich", "plain"] @mddoc @@ -214,6 +216,7 @@ class MarimoConfig(TypedDict): "code_editor_font_size": 14, "cell_output": "above", "default_width": "medium", + "dataframes": "rich", }, "formatting": {"line_length": 79}, "keymap": {"preset": "default", "overrides": {}}, diff --git a/marimo/_config/settings.py b/marimo/_config/settings.py index 9091d7db369..65b6f313292 100644 --- a/marimo/_config/settings.py +++ b/marimo/_config/settings.py @@ -1,3 +1,4 @@ +# Copyright 2024 Marimo. All rights reserved. from __future__ import annotations from dataclasses import dataclass diff --git a/marimo/_output/formatters/df_formatters.py b/marimo/_output/formatters/df_formatters.py index ae3868064f8..f87d6785cbf 100644 --- a/marimo/_output/formatters/df_formatters.py +++ b/marimo/_output/formatters/df_formatters.py @@ -9,6 +9,18 @@ LOGGER = _loggers.marimo_logger() +def include_opinionated() -> bool: + from marimo._runtime.context import ( + get_context, + runtime_context_installed, + ) + + if runtime_context_installed(): + ctx = get_context() + return ctx.user_config["display"]["dataframes"] == "rich" + return True + + class PolarsFormatter(FormatterFactory): @staticmethod def package_name() -> str: @@ -19,15 +31,17 @@ def register(self) -> None: from marimo._output import formatting - @formatting.opinionated_formatter(pl.DataFrame) - def _show_marimo_dataframe( - df: pl.DataFrame, - ) -> tuple[KnownMimeType, str]: - try: - return table(df, selection=None, pagination=True)._mime_() - except Exception as e: - LOGGER.warning("Failed to format DataFrame: %s", e) - return ("text/html", df._repr_html_()) + if include_opinionated(): + + @formatting.opinionated_formatter(pl.DataFrame) + def _show_marimo_dataframe( + df: pl.DataFrame, + ) -> tuple[KnownMimeType, str]: + try: + return table(df, selection=None, pagination=True)._mime_() + except Exception as e: + LOGGER.warning("Failed to format DataFrame: %s", e) + return ("text/html", df._repr_html_()) class PyArrowFormatter(FormatterFactory): @@ -40,8 +54,10 @@ def register(self) -> None: from marimo._output import formatting - @formatting.opinionated_formatter(pa.Table) - def _show_marimo_dataframe( - df: pa.Table, - ) -> tuple[KnownMimeType, str]: - return table(df, selection=None, pagination=True)._mime_() + if include_opinionated(): + + @formatting.opinionated_formatter(pa.Table) + def _show_marimo_dataframe( + df: pa.Table, + ) -> tuple[KnownMimeType, str]: + return table(df, selection=None, pagination=True)._mime_() diff --git a/marimo/_output/formatters/pandas_formatters.py b/marimo/_output/formatters/pandas_formatters.py index 601b7752ce3..32867264c94 100644 --- a/marimo/_output/formatters/pandas_formatters.py +++ b/marimo/_output/formatters/pandas_formatters.py @@ -4,6 +4,7 @@ from typing import Any from marimo._messaging.mimetypes import KnownMimeType +from marimo._output.formatters.df_formatters import include_opinionated from marimo._output.formatters.formatter_factory import FormatterFactory from marimo._output.utils import flatten_string from marimo._plugins.ui._impl.table import table @@ -23,11 +24,13 @@ def register(self) -> None: from marimo._output import formatting - @formatting.opinionated_formatter(pd.DataFrame) - def _show_marimo_dataframe( - df: pd.DataFrame, - ) -> tuple[KnownMimeType, str]: - return table(df, selection=None, pagination=True)._mime_() + if include_opinionated(): + + @formatting.opinionated_formatter(pd.DataFrame) + def _show_marimo_dataframe( + df: pd.DataFrame, + ) -> tuple[KnownMimeType, str]: + return table(df, selection=None, pagination=True)._mime_() @formatting.formatter(pd.DataFrame) def _show_dataframe(df: pd.DataFrame) -> tuple[KnownMimeType, str]: diff --git a/marimo/_plugins/ui/_impl/anywidget/comm.py b/marimo/_plugins/ui/_impl/anywidget/comm.py index 4e49a36a96d..87eacc51bcd 100644 --- a/marimo/_plugins/ui/_impl/anywidget/comm.py +++ b/marimo/_plugins/ui/_impl/anywidget/comm.py @@ -1,3 +1,4 @@ +# Copyright 2024 Marimo. All rights reserved. from __future__ import annotations import base64 diff --git a/marimo/_plugins/ui/_impl/anywidget/init.py b/marimo/_plugins/ui/_impl/anywidget/init.py index 2d4dab2c99f..9219a714f6d 100644 --- a/marimo/_plugins/ui/_impl/anywidget/init.py +++ b/marimo/_plugins/ui/_impl/anywidget/init.py @@ -1,3 +1,4 @@ +# Copyright 2024 Marimo. All rights reserved. from __future__ import annotations from typing import TYPE_CHECKING, cast diff --git a/marimo/_runtime/context/kernel_context.py b/marimo/_runtime/context/kernel_context.py index da7430b9fe6..88e30e9a172 100644 --- a/marimo/_runtime/context/kernel_context.py +++ b/marimo/_runtime/context/kernel_context.py @@ -5,6 +5,7 @@ from dataclasses import dataclass from typing import TYPE_CHECKING, Any, Iterator, Optional +from marimo._config.config import MarimoConfig from marimo._messaging.types import Stderr, Stdout from marimo._plugins.ui._core.ids import IDProvider, NoIDProviderException from marimo._runtime.cell_lifecycle_registry import CellLifecycleRegistry @@ -46,6 +47,10 @@ def globals(self) -> dict[str, Any]: def execution_context(self) -> ExecutionContext | None: return self._kernel.execution_context + @property + def user_config(self) -> MarimoConfig: + return self._kernel.user_config + @property def lazy(self) -> bool: return self._kernel.lazy() diff --git a/marimo/_runtime/context/script_context.py b/marimo/_runtime/context/script_context.py index eb80ccd3d7f..8b7eb653e11 100644 --- a/marimo/_runtime/context/script_context.py +++ b/marimo/_runtime/context/script_context.py @@ -6,6 +6,7 @@ from typing import TYPE_CHECKING, Any, Iterator, Optional from marimo._cli.parse_args import args_from_argv +from marimo._config.config import MarimoConfig from marimo._plugins.ui._core.ids import NoIDProviderException from marimo._plugins.ui._core.registry import UIElementRegistry from marimo._runtime.cell_lifecycle_registry import CellLifecycleRegistry @@ -47,6 +48,10 @@ def globals(self) -> dict[str, Any]: def execution_context(self) -> ExecutionContext | None: return self._app.execution_context + @property + def user_config(self) -> MarimoConfig: + return self._app.user_config + @property def cell_id(self) -> Optional[CellId_t]: """Get the cell id of the currently executing cell, if any.""" diff --git a/marimo/_runtime/context/types.py b/marimo/_runtime/context/types.py index 2885fb40ce4..24a302dcb00 100644 --- a/marimo/_runtime/context/types.py +++ b/marimo/_runtime/context/types.py @@ -12,6 +12,7 @@ from dataclasses import dataclass from typing import TYPE_CHECKING, Any, Iterator, Optional +from marimo._config.config import MarimoConfig from marimo._messaging.types import Stderr, Stdout from marimo._runtime import dataflow from marimo._runtime.cell_lifecycle_registry import CellLifecycleRegistry @@ -88,6 +89,11 @@ def globals(self) -> dict[str, Any]: def execution_context(self) -> ExecutionContext | None: pass + @property + @abc.abstractmethod + def user_config(self) -> MarimoConfig: + pass + @property @abc.abstractmethod def cell_id(self) -> Optional[CellId_t]: diff --git a/marimo/_runtime/runtime.py b/marimo/_runtime/runtime.py index 2abb3329a03..ceb0ae6dd0a 100644 --- a/marimo/_runtime/runtime.py +++ b/marimo/_runtime/runtime.py @@ -372,7 +372,9 @@ def __init__( self.package_manager: PackageManager | None = None self.module_reloader: ModuleReloader | None = None self.module_watcher: ModuleWatcher | None = None + # Load runtime settings from user config + self.user_config = user_config self.reactive_execution_mode: OnCellChangeType = user_config[ "runtime" ]["on_cell_change"] diff --git a/marimo/_smoke_tests/bugs/2070-latex-slides.py b/marimo/_smoke_tests/bugs/2070-latex-slides.py index e28eeeacd00..d1a8629f0ec 100644 --- a/marimo/_smoke_tests/bugs/2070-latex-slides.py +++ b/marimo/_smoke_tests/bugs/2070-latex-slides.py @@ -1,3 +1,4 @@ +# Copyright 2024 Marimo. All rights reserved. import marimo __generated_with = "0.8.0" diff --git a/marimo/_smoke_tests/quak-demo.py b/marimo/_smoke_tests/quak-demo.py index c699eb264a4..d5262586cfa 100644 --- a/marimo/_smoke_tests/quak-demo.py +++ b/marimo/_smoke_tests/quak-demo.py @@ -1,3 +1,4 @@ +# Copyright 2024 Marimo. All rights reserved. # /// script # requires-python = ">=3.11" # dependencies = [ diff --git a/openapi/api.yaml b/openapi/api.yaml index a6f1ead5db4..3868da3bc58 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -993,6 +993,7 @@ components: required: - activate_on_typing - copilot + - codeium_api_key type: object display: properties: @@ -1003,6 +1004,11 @@ components: type: string code_editor_font_size: type: integer + dataframes: + enum: + - rich + - plain + type: string default_width: enum: - normal @@ -1021,6 +1027,7 @@ components: - code_editor_font_size - cell_output - default_width + - dataframes type: object experimental: additionalProperties: {} @@ -1532,7 +1539,10 @@ components: nullable: true type: array message: - $ref: '#/components/schemas/JSONType' + additionalProperties: + additionalProperties: true + type: object + type: object name: enum: - send-ui-element-message @@ -1541,6 +1551,7 @@ components: type: string required: - ui_element + - message - name type: object SetCellConfigRequest: @@ -1771,7 +1782,7 @@ components: type: object info: title: marimo API - version: 0.7.20 + version: 0.8.0 openapi: 3.1.0 paths: /@file/{filename_and_length}: diff --git a/openapi/src/api.ts b/openapi/src/api.ts index c71d0d7f92b..cd490573376 100644 --- a/openapi/src/api.ts +++ b/openapi/src/api.ts @@ -3,1474 +3,2334 @@ * Do not make direct changes to the file. */ -/** OneOf type helpers */ -type Without = { [P in Exclude]?: never }; -type XOR = T | U extends object - ? (Without & U) | (Without & T) - : T | U; -type OneOf = T extends [infer Only] - ? Only - : T extends [infer A, infer B, ...infer Rest] - ? OneOf<[XOR, ...Rest]> - : never; - export interface paths { - "/@file/{filename_and_length}": { - get: { - parameters: { - path: { - /** @description The filename and byte length of the virtual file */ - filename_and_length: string; - }; - }; - responses: { - /** @description Get a virtual file */ - 200: { - content: { - "application/octet-stream": string; - }; - }; - /** @description Invalid byte length in virtual file request */ - 404: { - content: never; - }; - }; - }; - }; - "/api/ai/completion": { - post: { - /** @description The prompt to get AI completion for */ - requestBody: { - content: { - "application/json": components["schemas"]["AiCompletionRequest"]; - }; - }; - responses: { - /** @description Get AI completion for a prompt */ - 200: { - content: { - "application/json": { - [key: string]: unknown; - }; - }; - }; - }; - }; - }; - "/api/datasources/preview_column": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewDatasetColumnRequest"]; - }; - }; - responses: { - /** @description Preview a column in a dataset */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - }; - "/api/documentation/snippets": { - get: { - responses: { - /** @description Load the snippets for the documentation page */ - 200: { - content: { - "application/json": components["schemas"]["Snippets"]; - }; - }; - }; - }; - }; - "/api/export/html": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsHTMLRequest"]; - }; - }; - responses: { - /** @description Export the notebook as HTML */ - 200: { - content: { - "text/html": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - content: never; - }; - }; - }; - }; - "/api/export/markdown": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsMarkdownRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a markdown */ - 200: { - content: { - "text/plain": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - content: never; - }; - }; - }; - }; - "/api/export/script": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsScriptRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a script */ - 200: { - content: { - "text/plain": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - content: never; - }; - }; - }; - }; - "/api/files/create": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["FileCreateRequest"]; - }; - }; - responses: { - /** @description Create a new file or directory */ - 200: { - content: { - "application/json": components["schemas"]["FileCreateResponse"]; - }; - }; - }; - }; - }; - "/api/files/delete": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["FileDeleteRequest"]; - }; - }; - responses: { - /** @description Delete a file or directory */ - 200: { - content: { - "application/json": components["schemas"]["FileDeleteResponse"]; - }; - }; - }; - }; - }; - "/api/files/file_details": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["FileDetailsRequest"]; - }; - }; - responses: { - /** @description Get details of a specific file or directory */ - 200: { - content: { - "application/json": components["schemas"]["FileDetailsResponse"]; - }; - }; - }; - }; - }; - "/api/files/list_files": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["FileListRequest"]; - }; - }; - responses: { - /** @description List files and directories in a given path */ - 200: { - content: { - "application/json": components["schemas"]["FileListResponse"]; - }; - }; - }; - }; - }; - "/api/files/move": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["FileMoveRequest"]; - }; - }; - responses: { - /** @description Move a file or directory */ - 200: { - content: { - "application/json": components["schemas"]["FileMoveResponse"]; - }; - }; - }; - }; - }; - "/api/files/update": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["FileUpdateRequest"]; - }; - }; - responses: { - /** @description Update a file or directory */ - 200: { - content: { - "application/json": components["schemas"]["FileUpdateResponse"]; - }; - }; - }; - }; - }; - "/api/home/recent_files": { - post: { - responses: { - /** @description Get the recent files */ - 200: { - content: { - "application/json": components["schemas"]["RecentFilesResponse"]; - }; - }; - }; - }; - }; - "/api/home/running_notebooks": { - post: { - responses: { - /** @description Get the running files */ - 200: { - content: { - "application/json": components["schemas"]["RunningNotebooksResponse"]; - }; - }; - }; - }; - }; - "/api/home/shutdown_session": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["ShutdownSessionRequest"]; - }; - }; - responses: { - /** @description Shutdown the current session */ - 200: { - content: { - "application/json": components["schemas"]["RunningNotebooksResponse"]; - }; - }; - }; - }; - }; - "/api/home/workspace_files": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["WorkspaceFilesRequest"]; - }; - }; - responses: { - /** @description Get the files in the workspace */ - 200: { - content: { - "application/json": components["schemas"]["WorkspaceFilesResponse"]; - }; - }; - }; - }; - }; - "/api/kernel/code_autocomplete": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["CodeCompletionRequest"]; - }; - }; - responses: { - /** @description Complete a code fragment */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - }; - "/api/kernel/delete": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["DeleteCellRequest"]; - }; - }; - responses: { - /** @description Delete a cell */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - }; - "/api/kernel/format": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["FormatRequest"]; - }; - }; - responses: { - /** @description Format code */ - 200: { - content: { - "application/json": components["schemas"]["FormatResponse"]; - }; - }; - }; - }; - }; - "/api/kernel/function_call": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["FunctionCallRequest"]; - }; - }; - responses: { - /** @description Invoke an RPC */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - }; - "/api/kernel/install_missing_packages": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["InstallMissingPackagesRequest"]; - }; - }; - responses: { - /** @description Install missing packages */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - }; - "/api/kernel/instantiate": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["InstantiateRequest"]; - }; - }; - responses: { - /** @description Instantiate a component */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - }; - "/api/kernel/interrupt": { - post: { - responses: { - /** @description Interrupt the kernel's execution */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - }; - "/api/kernel/open": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["OpenFileRequest"]; - }; - }; - responses: { - /** @description Open a file */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File does not exist */ - 400: { - content: never; - }; - }; - }; - }; - "/api/kernel/read_code": { - post: { - responses: { - /** @description Read the code from the server */ - 200: { - content: { - "application/json": components["schemas"]["ReadCodeResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - content: never; - }; - }; - }; - }; - "/api/kernel/rename": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["RenameFileRequest"]; - }; - }; - responses: { - /** @description Rename the current app */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - }; - "/api/kernel/restart_session": { - post: { - responses: { - /** @description Restart the current session without affecting other sessions. */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - }; - "/api/kernel/run": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["RunRequest"]; - }; - }; - responses: { - /** @description Run a cell. Updates cell code in the kernel if needed; registers new cells for unseen cell IDs. Only allowed in edit mode. */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - }; - "/api/kernel/save": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["SaveNotebookRequest"]; - }; - }; - responses: { - /** @description Save the current app */ - 200: { - content: { - "text/plain": string; - }; - }; - }; - }; - }; - "/api/kernel/save_app_config": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["SaveAppConfigurationRequest"]; - }; - }; - responses: { - /** @description Save the app configuration */ - 200: { - content: { - "text/plain": string; - }; - }; - }; - }; - }; - "/api/kernel/save_user_config": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["SaveUserConfigurationRequest"]; - }; - }; - responses: { - /** @description Update the user config on disk and in the kernel. Only allowed in edit mode. */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - }; - "/api/kernel/scratchpad/run": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["RunScratchpadRequest"]; - }; - }; - responses: { - /** @description Run the scratchpad */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - }; - "/api/kernel/set_cell_config": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["SetCellConfigRequest"]; - }; - }; - responses: { - /** @description Set the configuration of a cell */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - }; - "/api/kernel/set_ui_element_value": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateComponentValuesRequest"]; - }; - }; - responses: { - /** @description Set UI element values */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - }; - "/api/kernel/shutdown": { - post: { - responses: { - /** @description Shutdown the kernel */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - }; - "/api/kernel/stdin": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["StdinRequest"]; - }; - }; - responses: { - /** @description Send input to the stdin stream */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - }; - "/api/kernel/sync/cell_ids": { - post: { - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateCellIdsRequest"]; - }; - }; - responses: { - /** @description Sync cell ids */ - 200: { - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - }; - "/api/status": { - get: { - responses: { - /** @description Get the status of the application */ - 200: { - content: { - "application/json": { - filenames?: string[]; - lsp_running?: boolean; - mode?: string; - node_version?: string; - requirements?: string[]; - sessions?: number; - status?: string; - version?: string; - }; - }; - }; - }; - }; - }; - "/api/usage": { - get: { - responses: { - /** @description Get the current memory and CPU usage of the application */ - 200: { - content: { - "application/json": { - cpu: { - percent: number; - }; - kernel?: { - memory?: number; - }; - memory: { - available: number; - free: number; - percent: number; - total: number; - used: number; - }; - server?: { - memory: number; - }; - }; - }; - }; - }; - }; - }; - "/api/version": { - get: { - responses: { - /** @description Get the version of the application */ - 200: { - content: { - "text/plain": string; - }; - }; - }; - }; - }; - "/auth/login": { - /** Submit login form */ - post: { - requestBody?: { - content: { - "application/x-www-form-urlencoded": { - /** @description Access token or password */ - password?: string; - }; - }; - }; - responses: { - /** @description Login page */ - 200: { - content: { - "text/html": string; - }; - }; - /** @description Redirect to the next URL */ - 302: { - headers: { - Location?: string; - }; - content: never; - }; - }; + "/@file/{filename_and_length}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The filename and byte length of the virtual file */ + filename_and_length: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get a virtual file */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/octet-stream": string; + }; + }; + /** @description Invalid byte length in virtual file request */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/completion": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The prompt to get AI completion for */ + requestBody: { + content: { + "application/json": components["schemas"]["AiCompletionRequest"]; + }; + }; + responses: { + /** @description Get AI completion for a prompt */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + [key: string]: unknown; + }; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_column": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewDatasetColumnRequest"]; + }; + }; + responses: { + /** @description Preview a column in a dataset */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/documentation/snippets": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Load the snippets for the documentation page */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Snippets"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/html": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsHTMLRequest"]; + }; + }; + responses: { + /** @description Export the notebook as HTML */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/html": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/markdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsMarkdownRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a markdown */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/script": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsScriptRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a script */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/create": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileCreateRequest"]; + }; + }; + responses: { + /** @description Create a new file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileCreateResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileDeleteRequest"]; + }; + }; + responses: { + /** @description Delete a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileDeleteResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/file_details": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileDetailsRequest"]; + }; + }; + responses: { + /** @description Get details of a specific file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileDetailsResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/list_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileListRequest"]; + }; + }; + responses: { + /** @description List files and directories in a given path */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileListResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/move": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileMoveRequest"]; + }; + }; + responses: { + /** @description Move a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileMoveResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/update": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileUpdateRequest"]; + }; + }; + responses: { + /** @description Update a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileUpdateResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/recent_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the recent files */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RecentFilesResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/running_notebooks": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the running files */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RunningNotebooksResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/shutdown_session": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ShutdownSessionRequest"]; + }; + }; + responses: { + /** @description Shutdown the current session */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RunningNotebooksResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/workspace_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["WorkspaceFilesRequest"]; + }; + }; + responses: { + /** @description Get the files in the workspace */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["WorkspaceFilesResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/code_autocomplete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["CodeCompletionRequest"]; + }; + }; + responses: { + /** @description Complete a code fragment */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["DeleteCellRequest"]; + }; + }; + responses: { + /** @description Delete a cell */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/format": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FormatRequest"]; + }; + }; + responses: { + /** @description Format code */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FormatResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/function_call": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FunctionCallRequest"]; + }; + }; + responses: { + /** @description Invoke an RPC */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/install_missing_packages": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InstallMissingPackagesRequest"]; + }; + }; + responses: { + /** @description Install missing packages */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/instantiate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InstantiateRequest"]; + }; + }; + responses: { + /** @description Instantiate a component */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/interrupt": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Interrupt the kernel's execution */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/open": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["OpenFileRequest"]; + }; + }; + responses: { + /** @description Open a file */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File does not exist */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/read_code": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Read the code from the server */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ReadCodeResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/rename": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RenameFileRequest"]; + }; + }; + responses: { + /** @description Rename the current app */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/restart_session": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Restart the current session without affecting other sessions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RunRequest"]; + }; + }; + responses: { + /** @description Run a cell. Updates cell code in the kernel if needed; registers new cells for unseen cell IDs. Only allowed in edit mode. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveNotebookRequest"]; + }; + }; + responses: { + /** @description Save the current app */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save_app_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveAppConfigurationRequest"]; + }; + }; + responses: { + /** @description Save the app configuration */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save_user_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveUserConfigurationRequest"]; + }; + }; + responses: { + /** @description Update the user config on disk and in the kernel. Only allowed in edit mode. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/scratchpad/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RunScratchpadRequest"]; + }; + }; + responses: { + /** @description Run the scratchpad */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_cell_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SetCellConfigRequest"]; + }; + }; + responses: { + /** @description Set the configuration of a cell */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_ui_element_value": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateComponentValuesRequest"]; + }; + }; + responses: { + /** @description Set UI element values */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/shutdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Shutdown the kernel */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/stdin": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["StdinRequest"]; + }; + }; + responses: { + /** @description Send input to the stdin stream */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/sync/cell_ids": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateCellIdsRequest"]; + }; + }; + responses: { + /** @description Sync cell ids */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the status of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + filenames?: string[]; + lsp_running?: boolean; + mode?: string; + node_version?: string; + requirements?: string[]; + sessions?: number; + status?: string; + version?: string; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/usage": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the current memory and CPU usage of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + cpu: { + percent: number; + }; + kernel?: { + memory?: number; + }; + memory: { + available: number; + free: number; + percent: number; + total: number; + used: number; + }; + server?: { + memory: number; + }; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/version": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the version of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/auth/login": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Submit login form */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/x-www-form-urlencoded": { + /** @description Access token or password */ + password?: string; + }; + }; + }; + responses: { + /** @description Login page */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/html": string; + }; + }; + /** @description Redirect to the next URL */ + 302: { + headers: { + Location?: string; + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - }; } - export type webhooks = Record; - export interface components { - schemas: { - AiCompletionRequest: { - code: string; - includeOtherCode: string; - /** @enum {string} */ - language: "python" | "markdown" | "sql"; - prompt: string; - }; - Alert: { - description: string; - /** @enum {string} */ - name: "alert"; - title: string; - /** @enum {string|null} */ - variant?: "danger" | null; - }; - AppMetadata: { - cliArgs: { - [key: string]: - | string - | boolean - | number - | (string | boolean | number)[]; - }; - filename?: string | null; - queryParams: { - [key: string]: string | string[]; - }; - }; - Banner: { - /** @enum {string|null} */ - action?: "restart" | null; - description: string; - /** @enum {string} */ - name: "banner"; - title: string; - /** @enum {string|null} */ - variant?: "danger" | null; - }; - BaseResponse: { - success: boolean; - }; - /** @enum {string} */ - CellChannel: - | "stdout" - | "stderr" - | "stdin" - | "pdb" - | "output" - | "marimo-error" - | "media"; - CellConfig: { - disabled: boolean; - hide_code: boolean; - }; - CellOp: { - cell_id: string; - console?: - | components["schemas"]["CellOutput"] - | components["schemas"]["CellOutput"][] - | null; - /** @enum {string} */ - name: "cell-op"; - output?: components["schemas"]["CellOutput"]; - stale_inputs?: boolean | null; - status?: components["schemas"]["RuntimeState"]; - timestamp: number; - }; - CellOutput: { - channel: components["schemas"]["CellChannel"]; - data: OneOf< - [ - string, - components["schemas"]["Error"][], - { - [key: string]: unknown; - }, - ] - >; - mimetype: components["schemas"]["MimeType"]; - timestamp: number; - }; - CodeCompletionRequest: { - cellId: string; - document: string; - id: string; - }; - ColumnSummary: { - false?: number | null; - max?: components["schemas"]["NonNestedLiteral"]; - mean?: components["schemas"]["NonNestedLiteral"]; - median?: components["schemas"]["NonNestedLiteral"]; - min?: components["schemas"]["NonNestedLiteral"]; - nulls?: number | null; - p25?: components["schemas"]["NonNestedLiteral"]; - p5?: components["schemas"]["NonNestedLiteral"]; - p75?: components["schemas"]["NonNestedLiteral"]; - p95?: components["schemas"]["NonNestedLiteral"]; - std?: components["schemas"]["NonNestedLiteral"]; - total?: number | null; - true?: number | null; - unique?: number | null; - }; - CompletedRun: { - /** @enum {string} */ - name: "completed-run"; - }; - CompletionResult: { - completion_id: string; - /** @enum {string} */ - name: "completion-result"; - options: { - completion_info?: string | null; - name: string; - type: string; - }[]; - prefix_length: number; - }; - CreationRequest: { - executionRequests: components["schemas"]["ExecutionRequest"][]; - setUiElementValueRequest: components["schemas"]["SetUIElementValueRequest"]; - }; - CycleError: { - edges_with_vars: [string, string[], string][]; - /** @enum {string} */ - type: "cycle"; - }; - DataColumnPreview: { - chart_code?: string | null; - chart_max_rows_errors: boolean; - chart_spec?: string | null; - column_name: string; - error?: string | null; - /** @enum {string} */ - name: "data-column-preview"; - summary?: components["schemas"]["ColumnSummary"]; - table_name: string; - }; - DataTable: { - columns: components["schemas"]["DataTableColumn"][]; - name: string; - num_columns?: number | null; - num_rows?: number | null; - source: string; - /** @enum {string} */ - source_type: "local" | "duckdb"; - variable_name?: string | null; - }; - DataTableColumn: { - external_type: string; - name: string; - type: components["schemas"]["DataType"]; - }; - /** @enum {string} */ - DataType: "string" | "boolean" | "integer" | "number" | "date" | "unknown"; - Datasets: { - /** @enum {string|null} */ - clear_channel?: "local" | "duckdb" | null; - /** @enum {string} */ - name: "datasets"; - tables: components["schemas"]["DataTable"][]; - }; - DeleteCellRequest: { - cellId: string; - }; - DeleteNonlocalError: { - cells: string[]; - name: string; - /** @enum {string} */ - type: "delete-nonlocal"; - }; - Error: - | components["schemas"]["CycleError"] - | components["schemas"]["MultipleDefinitionError"] - | components["schemas"]["DeleteNonlocalError"] - | components["schemas"]["MarimoAncestorStoppedError"] - | components["schemas"]["MarimoAncestorPreventedError"] - | components["schemas"]["MarimoExceptionRaisedError"] - | components["schemas"]["MarimoStrictExecutionError"] - | components["schemas"]["MarimoInterruptionError"] - | components["schemas"]["MarimoSyntaxError"] - | components["schemas"]["UnknownError"]; - ExecuteMultipleRequest: { - cellIds: string[]; - codes: string[]; - timestamp: number; - }; - ExecuteScratchpadRequest: { - code: string; - }; - ExecuteStaleRequest: Record; - ExecutionRequest: { - cellId: string; - code: string; - timestamp: number; - }; - ExportAsHTMLRequest: { - assetUrl?: string | null; - download: boolean; - files: string[]; - includeCode: boolean; - }; - ExportAsMarkdownRequest: { - download: boolean; - }; - ExportAsScriptRequest: { - download: boolean; - }; - FileCreateRequest: { - contents?: string | null; - name: string; - path: string; - /** @enum {string} */ - type: "file" | "directory"; - }; - FileCreateResponse: { - info?: components["schemas"]["FileInfo"]; - message?: string | null; - success: boolean; - }; - FileDeleteRequest: { - path: string; - }; - FileDeleteResponse: { - message?: string | null; - success: boolean; - }; - FileDetailsRequest: { - path: string; - }; - FileDetailsResponse: { - contents?: string | null; - file: components["schemas"]["FileInfo"]; - mimeType?: string | null; - }; - FileInfo: { - children: components["schemas"]["FileInfo"][]; - id: string; - isDirectory: boolean; - isMarimoFile: boolean; - lastModified?: number | null; - name: string; - path: string; - }; - FileListRequest: { - path?: string | null; - }; - FileListResponse: { - files: components["schemas"]["FileInfo"][]; - root: string; - }; - FileMoveRequest: { - newPath: string; - path: string; - }; - FileMoveResponse: { - info?: components["schemas"]["FileInfo"]; - message?: string | null; - success: boolean; - }; - FileUpdateRequest: { - contents: string; - path: string; - }; - FileUpdateResponse: { - info?: components["schemas"]["FileInfo"]; - message?: string | null; - success: boolean; - }; - FocusCell: { - cell_id: string; - /** @enum {string} */ - name: "focus-cell"; - }; - FormatRequest: { - codes: { - [key: string]: string; - }; - lineLength: number; - }; - FormatResponse: { - codes: { - [key: string]: string; - }; - }; - FunctionCallRequest: { - args: { - [key: string]: unknown; - }; - functionCallId: string; - functionName: string; - namespace: string; - }; - FunctionCallResult: { - function_call_id: string; - /** @enum {string} */ - name: "function-call-result"; - return_value?: components["schemas"]["JSONType"]; - status: components["schemas"]["HumanReadableStatus"]; - }; - HumanReadableStatus: { - /** @enum {string} */ - code: "ok" | "error"; - message?: string | null; - title?: string | null; - }; - InstallMissingPackagesRequest: { - manager: string; - }; - InstallingPackageAlert: { - /** @enum {string} */ - name: "installing-package-alert"; - packages: { - [key: string]: "queued" | "installing" | "installed" | "failed"; - }; - }; - InstantiateRequest: { - objectIds: string[]; - values: unknown[]; - }; - Interrupted: { - /** @enum {string} */ - name: "interrupted"; - }; - JSONType: - | string - | number - | Record - | unknown[] - | boolean - | null; - KernelReady: { - app_config: { - app_title?: string | null; - layout_file?: string | null; - /** @enum {string} */ - width: "normal" | "compact" | "medium" | "full"; - }; - capabilities: { - sql: boolean; - terminal: boolean; - }; - cell_ids: string[]; - codes: string[]; - configs: components["schemas"]["CellConfig"][]; - kiosk: boolean; - last_executed_code?: { - [key: string]: string; - } | null; - last_execution_time?: { - [key: string]: number; - } | null; - layout?: { - data: { - [key: string]: unknown; - }; - type: string; - } | null; - /** @enum {string} */ - name: "kernel-ready"; - names: string[]; - resumed: boolean; - ui_values?: { - [key: string]: - | { - [key: string]: components["schemas"]["JSONType"]; - } - | components["schemas"]["JSONType"][] - | string - | number - | boolean - | components["schemas"]["MIME"] - | null; - } | null; - }; - MIME: Record; - MarimoAncestorPreventedError: { - blamed_cell?: string | null; - msg: string; - raising_cell: string; - /** @enum {string} */ - type: "ancestor-prevented"; - }; - MarimoAncestorStoppedError: { - msg: string; - raising_cell: string; - /** @enum {string} */ - type: "ancestor-stopped"; - }; - MarimoConfig: { - ai: { - open_ai: { - api_key: string; - base_url: string; - model: string; - }; - }; - completion: { - activate_on_typing: boolean; - codeium_api_key?: string | null; - copilot: boolean | ("github" | "codeium"); - }; - display: { - /** @enum {string} */ - cell_output: "above" | "below"; - code_editor_font_size: number; - /** @enum {string} */ - default_width: "normal" | "compact" | "medium" | "full"; - /** @enum {string} */ - theme: "light" | "dark" | "system"; - }; - experimental: { - [key: string]: unknown; - }; - formatting: { - line_length: number; - }; - keymap: { - overrides: { - [key: string]: string; + schemas: { + AiCompletionRequest: { + code: string; + includeOtherCode: string; + /** @enum {string} */ + language: "python" | "markdown" | "sql"; + prompt: string; + }; + Alert: { + description: string; + /** @enum {string} */ + name: "alert"; + title: string; + /** @enum {string|null} */ + variant?: "danger" | null; + }; + AppMetadata: { + cliArgs: { + [key: string]: string | boolean | number | (string | boolean | number)[]; + }; + filename?: string | null; + queryParams: { + [key: string]: string | string[]; + }; + }; + Banner: { + /** @enum {string|null} */ + action?: "restart" | null; + description: string; + /** @enum {string} */ + name: "banner"; + title: string; + /** @enum {string|null} */ + variant?: "danger" | null; + }; + BaseResponse: { + success: boolean; }; /** @enum {string} */ - preset: "default" | "vim"; - }; - package_management: { - /** @enum {string} */ - manager: "pip" | "rye" | "uv" | "poetry" | "pixi"; - }; - runtime: { - auto_instantiate: boolean; + CellChannel: "stdout" | "stderr" | "stdin" | "pdb" | "output" | "marimo-error" | "media"; + CellConfig: { + disabled: boolean; + hide_code: boolean; + }; + CellOp: { + cell_id: string; + console?: (components["schemas"]["CellOutput"] | components["schemas"]["CellOutput"][]) | null; + /** @enum {string} */ + name: "cell-op"; + output?: components["schemas"]["CellOutput"]; + stale_inputs?: boolean | null; + status?: components["schemas"]["RuntimeState"]; + timestamp: number; + }; + CellOutput: { + channel: components["schemas"]["CellChannel"]; + data: string | components["schemas"]["Error"][] | { + [key: string]: unknown; + }; + mimetype: components["schemas"]["MimeType"]; + timestamp: number; + }; + CodeCompletionRequest: { + cellId: string; + document: string; + id: string; + }; + ColumnSummary: { + false?: number | null; + max?: components["schemas"]["NonNestedLiteral"]; + mean?: components["schemas"]["NonNestedLiteral"]; + median?: components["schemas"]["NonNestedLiteral"]; + min?: components["schemas"]["NonNestedLiteral"]; + nulls?: number | null; + p25?: components["schemas"]["NonNestedLiteral"]; + p5?: components["schemas"]["NonNestedLiteral"]; + p75?: components["schemas"]["NonNestedLiteral"]; + p95?: components["schemas"]["NonNestedLiteral"]; + std?: components["schemas"]["NonNestedLiteral"]; + total?: number | null; + true?: number | null; + unique?: number | null; + }; + CompletedRun: { + /** @enum {string} */ + name: "completed-run"; + }; + CompletionResult: { + completion_id: string; + /** @enum {string} */ + name: "completion-result"; + options: { + completion_info?: string | null; + name: string; + type: string; + }[]; + prefix_length: number; + }; + CreationRequest: { + executionRequests: components["schemas"]["ExecutionRequest"][]; + setUiElementValueRequest: components["schemas"]["SetUIElementValueRequest"]; + }; + CycleError: { + edges_with_vars: [ + string, + string[], + string + ][]; + /** @enum {string} */ + type: "cycle"; + }; + DataColumnPreview: { + chart_code?: string | null; + chart_max_rows_errors: boolean; + chart_spec?: string | null; + column_name: string; + error?: string | null; + /** @enum {string} */ + name: "data-column-preview"; + summary?: components["schemas"]["ColumnSummary"]; + table_name: string; + }; + DataTable: { + columns: components["schemas"]["DataTableColumn"][]; + name: string; + num_columns?: number | null; + num_rows?: number | null; + source: string; + /** @enum {string} */ + source_type: "local" | "duckdb"; + variable_name?: string | null; + }; + DataTableColumn: { + external_type: string; + name: string; + type: components["schemas"]["DataType"]; + }; /** @enum {string} */ - auto_reload: "off" | "lazy" | "autorun"; + DataType: "string" | "boolean" | "integer" | "number" | "date" | "unknown"; + Datasets: { + /** @enum {string|null} */ + clear_channel?: "local" | "duckdb" | null; + /** @enum {string} */ + name: "datasets"; + tables: components["schemas"]["DataTable"][]; + }; + DeleteCellRequest: { + cellId: string; + }; + DeleteNonlocalError: { + cells: string[]; + name: string; + /** @enum {string} */ + type: "delete-nonlocal"; + }; + Error: components["schemas"]["CycleError"] | components["schemas"]["MultipleDefinitionError"] | components["schemas"]["DeleteNonlocalError"] | components["schemas"]["MarimoAncestorStoppedError"] | components["schemas"]["MarimoAncestorPreventedError"] | components["schemas"]["MarimoExceptionRaisedError"] | components["schemas"]["MarimoStrictExecutionError"] | components["schemas"]["MarimoInterruptionError"] | components["schemas"]["MarimoSyntaxError"] | components["schemas"]["UnknownError"]; + ExecuteMultipleRequest: { + cellIds: string[]; + codes: string[]; + timestamp: number; + }; + ExecuteScratchpadRequest: { + code: string; + }; + ExecuteStaleRequest: Record; + ExecutionRequest: { + cellId: string; + code: string; + timestamp: number; + }; + ExportAsHTMLRequest: { + assetUrl?: string | null; + download: boolean; + files: string[]; + includeCode: boolean; + }; + ExportAsMarkdownRequest: { + download: boolean; + }; + ExportAsScriptRequest: { + download: boolean; + }; + FileCreateRequest: { + contents?: string | null; + name: string; + path: string; + /** @enum {string} */ + type: "file" | "directory"; + }; + FileCreateResponse: { + info?: components["schemas"]["FileInfo"]; + message?: string | null; + success: boolean; + }; + FileDeleteRequest: { + path: string; + }; + FileDeleteResponse: { + message?: string | null; + success: boolean; + }; + FileDetailsRequest: { + path: string; + }; + FileDetailsResponse: { + contents?: string | null; + file: components["schemas"]["FileInfo"]; + mimeType?: string | null; + }; + FileInfo: { + children: components["schemas"]["FileInfo"][]; + id: string; + isDirectory: boolean; + isMarimoFile: boolean; + lastModified?: number | null; + name: string; + path: string; + }; + FileListRequest: { + path?: string | null; + }; + FileListResponse: { + files: components["schemas"]["FileInfo"][]; + root: string; + }; + FileMoveRequest: { + newPath: string; + path: string; + }; + FileMoveResponse: { + info?: components["schemas"]["FileInfo"]; + message?: string | null; + success: boolean; + }; + FileUpdateRequest: { + contents: string; + path: string; + }; + FileUpdateResponse: { + info?: components["schemas"]["FileInfo"]; + message?: string | null; + success: boolean; + }; + FocusCell: { + cell_id: string; + /** @enum {string} */ + name: "focus-cell"; + }; + FormatRequest: { + codes: { + [key: string]: string; + }; + lineLength: number; + }; + FormatResponse: { + codes: { + [key: string]: string; + }; + }; + FunctionCallRequest: { + args: { + [key: string]: unknown; + }; + functionCallId: string; + functionName: string; + namespace: string; + }; + FunctionCallResult: { + function_call_id: string; + /** @enum {string} */ + name: "function-call-result"; + return_value?: components["schemas"]["JSONType"]; + status: components["schemas"]["HumanReadableStatus"]; + }; + HumanReadableStatus: { + /** @enum {string} */ + code: "ok" | "error"; + message?: string | null; + title?: string | null; + }; + InstallMissingPackagesRequest: { + manager: string; + }; + InstallingPackageAlert: { + /** @enum {string} */ + name: "installing-package-alert"; + packages: { + [key: string]: "queued" | "installing" | "installed" | "failed"; + }; + }; + InstantiateRequest: { + objectIds: string[]; + values: unknown[]; + }; + Interrupted: { + /** @enum {string} */ + name: "interrupted"; + }; + JSONType: string | number | Record | unknown[] | boolean | null; + KernelReady: { + app_config: { + app_title?: string | null; + layout_file?: string | null; + /** @enum {string} */ + width: "normal" | "compact" | "medium" | "full"; + }; + capabilities: { + sql: boolean; + terminal: boolean; + }; + cell_ids: string[]; + codes: string[]; + configs: components["schemas"]["CellConfig"][]; + kiosk: boolean; + last_executed_code?: { + [key: string]: string; + } | null; + last_execution_time?: { + [key: string]: number; + } | null; + layout?: { + data: { + [key: string]: unknown; + }; + type: string; + } | null; + /** @enum {string} */ + name: "kernel-ready"; + names: string[]; + resumed: boolean; + ui_values?: { + [key: string]: ({ + [key: string]: components["schemas"]["JSONType"]; + } | components["schemas"]["JSONType"][] | string | number | boolean | components["schemas"]["MIME"]) | null; + } | null; + }; + MIME: Record; + MarimoAncestorPreventedError: { + blamed_cell?: string | null; + msg: string; + raising_cell: string; + /** @enum {string} */ + type: "ancestor-prevented"; + }; + MarimoAncestorStoppedError: { + msg: string; + raising_cell: string; + /** @enum {string} */ + type: "ancestor-stopped"; + }; + MarimoConfig: { + ai: { + open_ai: { + api_key: string; + base_url: string; + model: string; + }; + }; + completion: { + activate_on_typing: boolean; + codeium_api_key: string | null; + copilot: boolean | ("github" | "codeium"); + }; + display: { + /** @enum {string} */ + cell_output: "above" | "below"; + code_editor_font_size: number; + /** @enum {string} */ + dataframes: "rich" | "plain"; + /** @enum {string} */ + default_width: "normal" | "compact" | "medium" | "full"; + /** @enum {string} */ + theme: "light" | "dark" | "system"; + }; + experimental: { + [key: string]: unknown; + }; + formatting: { + line_length: number; + }; + keymap: { + overrides: { + [key: string]: string; + }; + /** @enum {string} */ + preset: "default" | "vim"; + }; + package_management: { + /** @enum {string} */ + manager: "pip" | "rye" | "uv" | "poetry" | "pixi"; + }; + runtime: { + auto_instantiate: boolean; + /** @enum {string} */ + auto_reload: "off" | "lazy" | "autorun"; + /** @enum {string} */ + on_cell_change: "lazy" | "autorun"; + }; + save: { + /** @enum {string} */ + autosave: "off" | "after_delay"; + autosave_delay: number; + format_on_save: boolean; + }; + server: { + browser: "default" | string; + follow_symlink: boolean; + }; + }; + MarimoExceptionRaisedError: { + exception_type: string; + msg: string; + raising_cell?: string | null; + /** @enum {string} */ + type: "exception"; + }; + MarimoFile: { + initializationId?: string | null; + lastModified?: number | null; + name: string; + path: string; + sessionId?: string | null; + }; + MarimoInterruptionError: { + /** @enum {string} */ + type: "interruption"; + }; + MarimoStrictExecutionError: { + blamed_cell?: string | null; + msg: string; + ref: string; + /** @enum {string} */ + type: "strict-exception"; + }; + MarimoSyntaxError: { + msg: string; + /** @enum {string} */ + type: "syntax"; + }; + MessageOperation: components["schemas"]["CellOp"] | components["schemas"]["FunctionCallResult"] | components["schemas"]["SendUIElementMessage"] | components["schemas"]["RemoveUIElements"] | components["schemas"]["Reload"] | components["schemas"]["Reconnected"] | components["schemas"]["Interrupted"] | components["schemas"]["CompletedRun"] | components["schemas"]["KernelReady"] | components["schemas"]["CompletionResult"] | components["schemas"]["Alert"] | components["schemas"]["Banner"] | components["schemas"]["MissingPackageAlert"] | components["schemas"]["InstallingPackageAlert"] | components["schemas"]["Variables"] | components["schemas"]["VariableValues"] | components["schemas"]["QueryParamsSet"] | components["schemas"]["QueryParamsAppend"] | components["schemas"]["QueryParamsDelete"] | components["schemas"]["QueryParamsClear"] | components["schemas"]["Datasets"] | components["schemas"]["DataColumnPreview"] | components["schemas"]["FocusCell"] | components["schemas"]["UpdateCellCodes"] | components["schemas"]["UpdateCellIdsRequest"]; /** @enum {string} */ - on_cell_change: "lazy" | "autorun"; - }; - save: { + MimeType: "application/json" | "application/vnd.marimo+error" | "application/vnd.marimo+traceback" | "image/png" | "image/svg+xml" | "image/tiff" | "image/avif" | "image/bmp" | "image/gif" | "image/jpeg" | "video/mp4" | "video/mpeg" | "text/html" | "text/plain" | "text/markdown" | "text/csv"; + MissingPackageAlert: { + isolated: boolean; + /** @enum {string} */ + name: "missing-package-alert"; + packages: string[]; + }; + MultipleDefinitionError: { + cells: string[]; + name: string; + /** @enum {string} */ + type: "multiple-defs"; + }; + NonNestedLiteral: number | string | boolean; + OpenFileRequest: { + path: string; + }; + PreviewDatasetColumnRequest: { + columnName: string; + source: string; + /** @enum {string} */ + sourceType: "local" | "duckdb"; + tableName: string; + }; + QueryParamsAppend: { + key: string; + /** @enum {string} */ + name: "query-params-append"; + value: string; + }; + QueryParamsClear: { + /** @enum {string} */ + name: "query-params-clear"; + }; + QueryParamsDelete: { + key: string; + /** @enum {string} */ + name: "query-params-delete"; + value?: string | null; + }; + QueryParamsSet: { + key: string; + /** @enum {string} */ + name: "query-params-set"; + value: string | string[]; + }; + ReadCodeResponse: { + contents: string; + }; + RecentFilesResponse: { + files: components["schemas"]["MarimoFile"][]; + }; + Reconnected: { + /** @enum {string} */ + name: "reconnected"; + }; + Reload: { + /** @enum {string} */ + name: "reload"; + }; + RemoveUIElements: { + cell_id: string; + /** @enum {string} */ + name: "remove-ui-elements"; + }; + RenameFileRequest: { + filename: string; + }; + RenameRequest: { + filename: string; + }; + RunRequest: { + cellIds: string[]; + codes: string[]; + }; + RunScratchpadRequest: { + code: string; + }; + RunningNotebooksResponse: { + files: components["schemas"]["MarimoFile"][]; + }; /** @enum {string} */ - autosave: "off" | "after_delay"; - autosave_delay: number; - format_on_save: boolean; - }; - server: { - browser: "default" | string; - follow_symlink: boolean; - }; - }; - MarimoExceptionRaisedError: { - exception_type: string; - msg: string; - raising_cell?: string | null; - /** @enum {string} */ - type: "exception"; - }; - MarimoFile: { - initializationId?: string | null; - lastModified?: number | null; - name: string; - path: string; - sessionId?: string | null; - }; - MarimoInterruptionError: { - /** @enum {string} */ - type: "interruption"; - }; - MarimoStrictExecutionError: { - blamed_cell?: string | null; - msg: string; - ref: string; - /** @enum {string} */ - type: "strict-exception"; - }; - MarimoSyntaxError: { - msg: string; - /** @enum {string} */ - type: "syntax"; - }; - MessageOperation: - | components["schemas"]["CellOp"] - | components["schemas"]["FunctionCallResult"] - | components["schemas"]["SendUIElementMessage"] - | components["schemas"]["RemoveUIElements"] - | components["schemas"]["Reload"] - | components["schemas"]["Reconnected"] - | components["schemas"]["Interrupted"] - | components["schemas"]["CompletedRun"] - | components["schemas"]["KernelReady"] - | components["schemas"]["CompletionResult"] - | components["schemas"]["Alert"] - | components["schemas"]["Banner"] - | components["schemas"]["MissingPackageAlert"] - | components["schemas"]["InstallingPackageAlert"] - | components["schemas"]["Variables"] - | components["schemas"]["VariableValues"] - | components["schemas"]["QueryParamsSet"] - | components["schemas"]["QueryParamsAppend"] - | components["schemas"]["QueryParamsDelete"] - | components["schemas"]["QueryParamsClear"] - | components["schemas"]["Datasets"] - | components["schemas"]["DataColumnPreview"] - | components["schemas"]["FocusCell"] - | components["schemas"]["UpdateCellCodes"] - | components["schemas"]["UpdateCellIdsRequest"]; - /** @enum {string} */ - MimeType: - | "application/json" - | "application/vnd.marimo+error" - | "application/vnd.marimo+traceback" - | "image/png" - | "image/svg+xml" - | "image/tiff" - | "image/avif" - | "image/bmp" - | "image/gif" - | "image/jpeg" - | "video/mp4" - | "video/mpeg" - | "text/html" - | "text/plain" - | "text/markdown" - | "text/csv"; - MissingPackageAlert: { - isolated: boolean; - /** @enum {string} */ - name: "missing-package-alert"; - packages: string[]; - }; - MultipleDefinitionError: { - cells: string[]; - name: string; - /** @enum {string} */ - type: "multiple-defs"; - }; - NonNestedLiteral: number | string | boolean; - OpenFileRequest: { - path: string; - }; - PreviewDatasetColumnRequest: { - columnName: string; - source: string; - /** @enum {string} */ - sourceType: "local" | "duckdb"; - tableName: string; - }; - QueryParamsAppend: { - key: string; - /** @enum {string} */ - name: "query-params-append"; - value: string; - }; - QueryParamsClear: { - /** @enum {string} */ - name: "query-params-clear"; - }; - QueryParamsDelete: { - key: string; - /** @enum {string} */ - name: "query-params-delete"; - value?: string | null; - }; - QueryParamsSet: { - key: string; - /** @enum {string} */ - name: "query-params-set"; - value: string | string[]; - }; - ReadCodeResponse: { - contents: string; - }; - RecentFilesResponse: { - files: components["schemas"]["MarimoFile"][]; - }; - Reconnected: { - /** @enum {string} */ - name: "reconnected"; - }; - Reload: { - /** @enum {string} */ - name: "reload"; - }; - RemoveUIElements: { - cell_id: string; - /** @enum {string} */ - name: "remove-ui-elements"; - }; - RenameFileRequest: { - filename: string; - }; - RenameRequest: { - filename: string; - }; - RunRequest: { - cellIds: string[]; - codes: string[]; - }; - RunScratchpadRequest: { - code: string; - }; - RunningNotebooksResponse: { - files: components["schemas"]["MarimoFile"][]; - }; - /** @enum {string} */ - RuntimeState: "idle" | "queued" | "running" | "disabled-transitively"; - SaveAppConfigurationRequest: { - config: { - [key: string]: unknown; - }; - }; - SaveNotebookRequest: { - cellIds: string[]; - codes: string[]; - configs: components["schemas"]["CellConfig"][]; - filename: string; - layout?: { - [key: string]: unknown; - } | null; - names: string[]; - persist: boolean; - }; - SaveUserConfigurationRequest: { - config: components["schemas"]["MarimoConfig"]; - }; - SendUIElementMessage: { - buffers?: string[] | null; - message?: components["schemas"]["JSONType"]; - /** @enum {string} */ - name: "send-ui-element-message"; - ui_element: string; - }; - SetCellConfigRequest: { - configs: { - [key: string]: { - [key: string]: unknown; + RuntimeState: "idle" | "queued" | "running" | "disabled-transitively"; + SaveAppConfigurationRequest: { + config: { + [key: string]: unknown; + }; }; - }; - }; - SetUIElementValueRequest: { - objectIds: string[]; - token: string; - values: unknown[]; - }; - SetUserConfigRequest: { - config: components["schemas"]["MarimoConfig"]; - }; - ShutdownSessionRequest: { - sessionId: string; - }; - Snippet: { - sections: components["schemas"]["SnippetSection"][]; - title: string; - }; - SnippetSection: { - code?: string | null; - html?: string | null; - id: string; - }; - Snippets: { - snippets: components["schemas"]["Snippet"][]; - }; - StdinRequest: { - text: string; - }; - StopRequest: Record; - SuccessResponse: { - success: boolean; - }; - UnknownError: { - msg: string; - /** @enum {string} */ - type: "unknown"; - }; - UpdateCellCodes: { - cell_ids: string[]; - codes: string[]; - /** @enum {string} */ - name: "update-cell-codes"; - }; - UpdateCellIdsRequest: { - cell_ids: string[]; - /** @enum {string} */ - name: "update-cell-ids"; - }; - UpdateComponentValuesRequest: { - objectIds: string[]; - values: unknown[]; - }; - VariableDeclaration: { - declared_by: string[]; - name: string; - used_by: string[]; - }; - VariableValue: { - datatype?: string | null; - name: string; - value?: string | null; - }; - VariableValues: { - /** @enum {string} */ - name: "variable-values"; - variables: components["schemas"]["VariableValue"][]; - }; - Variables: { - /** @enum {string} */ - name: "variables"; - variables: components["schemas"]["VariableDeclaration"][]; - }; - WorkspaceFilesRequest: { - includeMarkdown: boolean; - }; - WorkspaceFilesResponse: { - files: components["schemas"]["FileInfo"][]; - root: string; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + SaveNotebookRequest: { + cellIds: string[]; + codes: string[]; + configs: components["schemas"]["CellConfig"][]; + filename: string; + layout?: { + [key: string]: unknown; + } | null; + names: string[]; + persist: boolean; + }; + SaveUserConfigurationRequest: { + config: components["schemas"]["MarimoConfig"]; + }; + SendUIElementMessage: { + buffers?: string[] | null; + message: { + [key: string]: { + [key: string]: unknown; + }; + }; + /** @enum {string} */ + name: "send-ui-element-message"; + ui_element: string; + }; + SetCellConfigRequest: { + configs: { + [key: string]: { + [key: string]: unknown; + }; + }; + }; + SetUIElementValueRequest: { + objectIds: string[]; + token: string; + values: unknown[]; + }; + SetUserConfigRequest: { + config: components["schemas"]["MarimoConfig"]; + }; + ShutdownSessionRequest: { + sessionId: string; + }; + Snippet: { + sections: components["schemas"]["SnippetSection"][]; + title: string; + }; + SnippetSection: { + code?: string | null; + html?: string | null; + id: string; + }; + Snippets: { + snippets: components["schemas"]["Snippet"][]; + }; + StdinRequest: { + text: string; + }; + StopRequest: Record; + SuccessResponse: { + success: boolean; + }; + UnknownError: { + msg: string; + /** @enum {string} */ + type: "unknown"; + }; + UpdateCellCodes: { + cell_ids: string[]; + codes: string[]; + /** @enum {string} */ + name: "update-cell-codes"; + }; + UpdateCellIdsRequest: { + cell_ids: string[]; + /** @enum {string} */ + name: "update-cell-ids"; + }; + UpdateComponentValuesRequest: { + objectIds: string[]; + values: unknown[]; + }; + VariableDeclaration: { + declared_by: string[]; + name: string; + used_by: string[]; + }; + VariableValue: { + datatype?: string | null; + name: string; + value?: string | null; + }; + VariableValues: { + /** @enum {string} */ + name: "variable-values"; + variables: components["schemas"]["VariableValue"][]; + }; + Variables: { + /** @enum {string} */ + name: "variables"; + variables: components["schemas"]["VariableDeclaration"][]; + }; + WorkspaceFilesRequest: { + includeMarkdown: boolean; + }; + WorkspaceFilesResponse: { + files: components["schemas"]["FileInfo"][]; + root: string; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; } - export type $defs = Record; - -export type external = Record; - export type operations = Record; From 8ee884d6d80210d87f32a2b410b1eadd635ad93a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 21:51:06 +0000 Subject: [PATCH 2/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- openapi/src/api.ts | 4715 ++++++++++++++++++++++---------------------- 1 file changed, 2398 insertions(+), 2317 deletions(-) diff --git a/openapi/src/api.ts b/openapi/src/api.ts index cd490573376..2ed5294e14a 100644 --- a/openapi/src/api.ts +++ b/openapi/src/api.ts @@ -4,2333 +4,2414 @@ */ export interface paths { - "/@file/{filename_and_length}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path: { - /** @description The filename and byte length of the virtual file */ - filename_and_length: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get a virtual file */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/octet-stream": string; - }; - }; - /** @description Invalid byte length in virtual file request */ - 404: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/completion": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The prompt to get AI completion for */ - requestBody: { - content: { - "application/json": components["schemas"]["AiCompletionRequest"]; - }; - }; - responses: { - /** @description Get AI completion for a prompt */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - [key: string]: unknown; - }; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_column": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewDatasetColumnRequest"]; - }; - }; - responses: { - /** @description Preview a column in a dataset */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/documentation/snippets": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Load the snippets for the documentation page */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Snippets"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/html": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsHTMLRequest"]; - }; - }; - responses: { - /** @description Export the notebook as HTML */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/html": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/markdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsMarkdownRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a markdown */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/script": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsScriptRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a script */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/create": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileCreateRequest"]; - }; - }; - responses: { - /** @description Create a new file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileCreateResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileDeleteRequest"]; - }; - }; - responses: { - /** @description Delete a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileDeleteResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/file_details": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileDetailsRequest"]; - }; - }; - responses: { - /** @description Get details of a specific file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileDetailsResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/list_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileListRequest"]; - }; - }; - responses: { - /** @description List files and directories in a given path */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileListResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/move": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileMoveRequest"]; - }; - }; - responses: { - /** @description Move a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileMoveResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/update": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileUpdateRequest"]; - }; - }; - responses: { - /** @description Update a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileUpdateResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/recent_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the recent files */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RecentFilesResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/running_notebooks": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the running files */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RunningNotebooksResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/shutdown_session": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ShutdownSessionRequest"]; - }; - }; - responses: { - /** @description Shutdown the current session */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RunningNotebooksResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/workspace_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["WorkspaceFilesRequest"]; - }; - }; - responses: { - /** @description Get the files in the workspace */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["WorkspaceFilesResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/code_autocomplete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["CodeCompletionRequest"]; - }; - }; - responses: { - /** @description Complete a code fragment */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["DeleteCellRequest"]; - }; - }; - responses: { - /** @description Delete a cell */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/format": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FormatRequest"]; - }; - }; - responses: { - /** @description Format code */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FormatResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/function_call": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FunctionCallRequest"]; - }; - }; - responses: { - /** @description Invoke an RPC */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/install_missing_packages": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InstallMissingPackagesRequest"]; - }; - }; - responses: { - /** @description Install missing packages */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/instantiate": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InstantiateRequest"]; - }; - }; - responses: { - /** @description Instantiate a component */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/interrupt": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Interrupt the kernel's execution */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/open": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["OpenFileRequest"]; - }; - }; - responses: { - /** @description Open a file */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File does not exist */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/read_code": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Read the code from the server */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ReadCodeResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/rename": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["RenameFileRequest"]; - }; - }; - responses: { - /** @description Rename the current app */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/restart_session": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Restart the current session without affecting other sessions. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/run": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["RunRequest"]; - }; - }; - responses: { - /** @description Run a cell. Updates cell code in the kernel if needed; registers new cells for unseen cell IDs. Only allowed in edit mode. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveNotebookRequest"]; - }; - }; - responses: { - /** @description Save the current app */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save_app_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveAppConfigurationRequest"]; - }; - }; - responses: { - /** @description Save the app configuration */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save_user_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveUserConfigurationRequest"]; - }; - }; - responses: { - /** @description Update the user config on disk and in the kernel. Only allowed in edit mode. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/scratchpad/run": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["RunScratchpadRequest"]; - }; - }; - responses: { - /** @description Run the scratchpad */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_cell_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SetCellConfigRequest"]; - }; - }; - responses: { - /** @description Set the configuration of a cell */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_ui_element_value": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateComponentValuesRequest"]; - }; - }; - responses: { - /** @description Set UI element values */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/shutdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Shutdown the kernel */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/stdin": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["StdinRequest"]; - }; - }; - responses: { - /** @description Send input to the stdin stream */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/sync/cell_ids": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateCellIdsRequest"]; - }; - }; - responses: { - /** @description Sync cell ids */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/status": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the status of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - filenames?: string[]; - lsp_running?: boolean; - mode?: string; - node_version?: string; - requirements?: string[]; - sessions?: number; - status?: string; - version?: string; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/usage": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the current memory and CPU usage of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - cpu: { - percent: number; - }; - kernel?: { - memory?: number; - }; - memory: { - available: number; - free: number; - percent: number; - total: number; - used: number; - }; - server?: { - memory: number; - }; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/version": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the version of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/auth/login": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Submit login form */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/x-www-form-urlencoded": { - /** @description Access token or password */ - password?: string; - }; - }; - }; - responses: { - /** @description Login page */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/html": string; - }; - }; - /** @description Redirect to the next URL */ - 302: { - headers: { - Location?: string; - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; + "/@file/{filename_and_length}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The filename and byte length of the virtual file */ + filename_and_length: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get a virtual file */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/octet-stream": string; + }; + }; + /** @description Invalid byte length in virtual file request */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/completion": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The prompt to get AI completion for */ + requestBody: { + content: { + "application/json": components["schemas"]["AiCompletionRequest"]; + }; + }; + responses: { + /** @description Get AI completion for a prompt */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + [key: string]: unknown; + }; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_column": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewDatasetColumnRequest"]; + }; + }; + responses: { + /** @description Preview a column in a dataset */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/documentation/snippets": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Load the snippets for the documentation page */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Snippets"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/html": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsHTMLRequest"]; + }; + }; + responses: { + /** @description Export the notebook as HTML */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/html": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/markdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsMarkdownRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a markdown */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/script": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsScriptRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a script */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/create": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileCreateRequest"]; + }; + }; + responses: { + /** @description Create a new file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileCreateResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileDeleteRequest"]; + }; + }; + responses: { + /** @description Delete a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileDeleteResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/file_details": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileDetailsRequest"]; + }; + }; + responses: { + /** @description Get details of a specific file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileDetailsResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/list_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileListRequest"]; + }; + }; + responses: { + /** @description List files and directories in a given path */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileListResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/move": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileMoveRequest"]; + }; + }; + responses: { + /** @description Move a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileMoveResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/update": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileUpdateRequest"]; + }; + }; + responses: { + /** @description Update a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileUpdateResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/recent_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the recent files */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RecentFilesResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/running_notebooks": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the running files */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RunningNotebooksResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/shutdown_session": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ShutdownSessionRequest"]; + }; + }; + responses: { + /** @description Shutdown the current session */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RunningNotebooksResponse"]; + }; + }; + }; }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/workspace_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["WorkspaceFilesRequest"]; + }; + }; + responses: { + /** @description Get the files in the workspace */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["WorkspaceFilesResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/code_autocomplete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["CodeCompletionRequest"]; + }; + }; + responses: { + /** @description Complete a code fragment */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["DeleteCellRequest"]; + }; + }; + responses: { + /** @description Delete a cell */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/format": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FormatRequest"]; + }; + }; + responses: { + /** @description Format code */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FormatResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/function_call": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FunctionCallRequest"]; + }; + }; + responses: { + /** @description Invoke an RPC */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/install_missing_packages": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InstallMissingPackagesRequest"]; + }; + }; + responses: { + /** @description Install missing packages */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/instantiate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InstantiateRequest"]; + }; + }; + responses: { + /** @description Instantiate a component */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/interrupt": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Interrupt the kernel's execution */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/open": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["OpenFileRequest"]; + }; + }; + responses: { + /** @description Open a file */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File does not exist */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/read_code": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Read the code from the server */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ReadCodeResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/rename": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RenameFileRequest"]; + }; + }; + responses: { + /** @description Rename the current app */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/restart_session": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Restart the current session without affecting other sessions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RunRequest"]; + }; + }; + responses: { + /** @description Run a cell. Updates cell code in the kernel if needed; registers new cells for unseen cell IDs. Only allowed in edit mode. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveNotebookRequest"]; + }; + }; + responses: { + /** @description Save the current app */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save_app_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveAppConfigurationRequest"]; + }; + }; + responses: { + /** @description Save the app configuration */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save_user_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveUserConfigurationRequest"]; + }; + }; + responses: { + /** @description Update the user config on disk and in the kernel. Only allowed in edit mode. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/scratchpad/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RunScratchpadRequest"]; + }; + }; + responses: { + /** @description Run the scratchpad */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_cell_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SetCellConfigRequest"]; + }; + }; + responses: { + /** @description Set the configuration of a cell */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_ui_element_value": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateComponentValuesRequest"]; + }; + }; + responses: { + /** @description Set UI element values */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/shutdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Shutdown the kernel */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/stdin": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["StdinRequest"]; + }; + }; + responses: { + /** @description Send input to the stdin stream */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/sync/cell_ids": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateCellIdsRequest"]; + }; + }; + responses: { + /** @description Sync cell ids */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the status of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + filenames?: string[]; + lsp_running?: boolean; + mode?: string; + node_version?: string; + requirements?: string[]; + sessions?: number; + status?: string; + version?: string; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/usage": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the current memory and CPU usage of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + cpu: { + percent: number; + }; + kernel?: { + memory?: number; + }; + memory: { + available: number; + free: number; + percent: number; + total: number; + used: number; + }; + server?: { + memory: number; + }; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/version": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the version of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/auth/login": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Submit login form */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/x-www-form-urlencoded": { + /** @description Access token or password */ + password?: string; + }; + }; + }; + responses: { + /** @description Login page */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/html": string; + }; + }; + /** @description Redirect to the next URL */ + 302: { + headers: { + Location?: string; + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; } export type webhooks = Record; export interface components { - schemas: { - AiCompletionRequest: { - code: string; - includeOtherCode: string; - /** @enum {string} */ - language: "python" | "markdown" | "sql"; - prompt: string; - }; - Alert: { - description: string; - /** @enum {string} */ - name: "alert"; - title: string; - /** @enum {string|null} */ - variant?: "danger" | null; - }; - AppMetadata: { - cliArgs: { - [key: string]: string | boolean | number | (string | boolean | number)[]; - }; - filename?: string | null; - queryParams: { - [key: string]: string | string[]; - }; - }; - Banner: { - /** @enum {string|null} */ - action?: "restart" | null; - description: string; - /** @enum {string} */ - name: "banner"; - title: string; - /** @enum {string|null} */ - variant?: "danger" | null; - }; - BaseResponse: { - success: boolean; - }; + schemas: { + AiCompletionRequest: { + code: string; + includeOtherCode: string; + /** @enum {string} */ + language: "python" | "markdown" | "sql"; + prompt: string; + }; + Alert: { + description: string; + /** @enum {string} */ + name: "alert"; + title: string; + /** @enum {string|null} */ + variant?: "danger" | null; + }; + AppMetadata: { + cliArgs: { + [key: string]: + | string + | boolean + | number + | (string | boolean | number)[]; + }; + filename?: string | null; + queryParams: { + [key: string]: string | string[]; + }; + }; + Banner: { + /** @enum {string|null} */ + action?: "restart" | null; + description: string; + /** @enum {string} */ + name: "banner"; + title: string; + /** @enum {string|null} */ + variant?: "danger" | null; + }; + BaseResponse: { + success: boolean; + }; + /** @enum {string} */ + CellChannel: + | "stdout" + | "stderr" + | "stdin" + | "pdb" + | "output" + | "marimo-error" + | "media"; + CellConfig: { + disabled: boolean; + hide_code: boolean; + }; + CellOp: { + cell_id: string; + console?: + | ( + | components["schemas"]["CellOutput"] + | components["schemas"]["CellOutput"][] + ) + | null; + /** @enum {string} */ + name: "cell-op"; + output?: components["schemas"]["CellOutput"]; + stale_inputs?: boolean | null; + status?: components["schemas"]["RuntimeState"]; + timestamp: number; + }; + CellOutput: { + channel: components["schemas"]["CellChannel"]; + data: + | string + | components["schemas"]["Error"][] + | { + [key: string]: unknown; + }; + mimetype: components["schemas"]["MimeType"]; + timestamp: number; + }; + CodeCompletionRequest: { + cellId: string; + document: string; + id: string; + }; + ColumnSummary: { + false?: number | null; + max?: components["schemas"]["NonNestedLiteral"]; + mean?: components["schemas"]["NonNestedLiteral"]; + median?: components["schemas"]["NonNestedLiteral"]; + min?: components["schemas"]["NonNestedLiteral"]; + nulls?: number | null; + p25?: components["schemas"]["NonNestedLiteral"]; + p5?: components["schemas"]["NonNestedLiteral"]; + p75?: components["schemas"]["NonNestedLiteral"]; + p95?: components["schemas"]["NonNestedLiteral"]; + std?: components["schemas"]["NonNestedLiteral"]; + total?: number | null; + true?: number | null; + unique?: number | null; + }; + CompletedRun: { + /** @enum {string} */ + name: "completed-run"; + }; + CompletionResult: { + completion_id: string; + /** @enum {string} */ + name: "completion-result"; + options: { + completion_info?: string | null; + name: string; + type: string; + }[]; + prefix_length: number; + }; + CreationRequest: { + executionRequests: components["schemas"]["ExecutionRequest"][]; + setUiElementValueRequest: components["schemas"]["SetUIElementValueRequest"]; + }; + CycleError: { + edges_with_vars: [string, string[], string][]; + /** @enum {string} */ + type: "cycle"; + }; + DataColumnPreview: { + chart_code?: string | null; + chart_max_rows_errors: boolean; + chart_spec?: string | null; + column_name: string; + error?: string | null; + /** @enum {string} */ + name: "data-column-preview"; + summary?: components["schemas"]["ColumnSummary"]; + table_name: string; + }; + DataTable: { + columns: components["schemas"]["DataTableColumn"][]; + name: string; + num_columns?: number | null; + num_rows?: number | null; + source: string; + /** @enum {string} */ + source_type: "local" | "duckdb"; + variable_name?: string | null; + }; + DataTableColumn: { + external_type: string; + name: string; + type: components["schemas"]["DataType"]; + }; + /** @enum {string} */ + DataType: "string" | "boolean" | "integer" | "number" | "date" | "unknown"; + Datasets: { + /** @enum {string|null} */ + clear_channel?: "local" | "duckdb" | null; + /** @enum {string} */ + name: "datasets"; + tables: components["schemas"]["DataTable"][]; + }; + DeleteCellRequest: { + cellId: string; + }; + DeleteNonlocalError: { + cells: string[]; + name: string; + /** @enum {string} */ + type: "delete-nonlocal"; + }; + Error: + | components["schemas"]["CycleError"] + | components["schemas"]["MultipleDefinitionError"] + | components["schemas"]["DeleteNonlocalError"] + | components["schemas"]["MarimoAncestorStoppedError"] + | components["schemas"]["MarimoAncestorPreventedError"] + | components["schemas"]["MarimoExceptionRaisedError"] + | components["schemas"]["MarimoStrictExecutionError"] + | components["schemas"]["MarimoInterruptionError"] + | components["schemas"]["MarimoSyntaxError"] + | components["schemas"]["UnknownError"]; + ExecuteMultipleRequest: { + cellIds: string[]; + codes: string[]; + timestamp: number; + }; + ExecuteScratchpadRequest: { + code: string; + }; + ExecuteStaleRequest: Record; + ExecutionRequest: { + cellId: string; + code: string; + timestamp: number; + }; + ExportAsHTMLRequest: { + assetUrl?: string | null; + download: boolean; + files: string[]; + includeCode: boolean; + }; + ExportAsMarkdownRequest: { + download: boolean; + }; + ExportAsScriptRequest: { + download: boolean; + }; + FileCreateRequest: { + contents?: string | null; + name: string; + path: string; + /** @enum {string} */ + type: "file" | "directory"; + }; + FileCreateResponse: { + info?: components["schemas"]["FileInfo"]; + message?: string | null; + success: boolean; + }; + FileDeleteRequest: { + path: string; + }; + FileDeleteResponse: { + message?: string | null; + success: boolean; + }; + FileDetailsRequest: { + path: string; + }; + FileDetailsResponse: { + contents?: string | null; + file: components["schemas"]["FileInfo"]; + mimeType?: string | null; + }; + FileInfo: { + children: components["schemas"]["FileInfo"][]; + id: string; + isDirectory: boolean; + isMarimoFile: boolean; + lastModified?: number | null; + name: string; + path: string; + }; + FileListRequest: { + path?: string | null; + }; + FileListResponse: { + files: components["schemas"]["FileInfo"][]; + root: string; + }; + FileMoveRequest: { + newPath: string; + path: string; + }; + FileMoveResponse: { + info?: components["schemas"]["FileInfo"]; + message?: string | null; + success: boolean; + }; + FileUpdateRequest: { + contents: string; + path: string; + }; + FileUpdateResponse: { + info?: components["schemas"]["FileInfo"]; + message?: string | null; + success: boolean; + }; + FocusCell: { + cell_id: string; + /** @enum {string} */ + name: "focus-cell"; + }; + FormatRequest: { + codes: { + [key: string]: string; + }; + lineLength: number; + }; + FormatResponse: { + codes: { + [key: string]: string; + }; + }; + FunctionCallRequest: { + args: { + [key: string]: unknown; + }; + functionCallId: string; + functionName: string; + namespace: string; + }; + FunctionCallResult: { + function_call_id: string; + /** @enum {string} */ + name: "function-call-result"; + return_value?: components["schemas"]["JSONType"]; + status: components["schemas"]["HumanReadableStatus"]; + }; + HumanReadableStatus: { + /** @enum {string} */ + code: "ok" | "error"; + message?: string | null; + title?: string | null; + }; + InstallMissingPackagesRequest: { + manager: string; + }; + InstallingPackageAlert: { + /** @enum {string} */ + name: "installing-package-alert"; + packages: { + [key: string]: "queued" | "installing" | "installed" | "failed"; + }; + }; + InstantiateRequest: { + objectIds: string[]; + values: unknown[]; + }; + Interrupted: { + /** @enum {string} */ + name: "interrupted"; + }; + JSONType: + | string + | number + | Record + | unknown[] + | boolean + | null; + KernelReady: { + app_config: { + app_title?: string | null; + layout_file?: string | null; /** @enum {string} */ - CellChannel: "stdout" | "stderr" | "stdin" | "pdb" | "output" | "marimo-error" | "media"; - CellConfig: { - disabled: boolean; - hide_code: boolean; - }; - CellOp: { - cell_id: string; - console?: (components["schemas"]["CellOutput"] | components["schemas"]["CellOutput"][]) | null; - /** @enum {string} */ - name: "cell-op"; - output?: components["schemas"]["CellOutput"]; - stale_inputs?: boolean | null; - status?: components["schemas"]["RuntimeState"]; - timestamp: number; - }; - CellOutput: { - channel: components["schemas"]["CellChannel"]; - data: string | components["schemas"]["Error"][] | { - [key: string]: unknown; - }; - mimetype: components["schemas"]["MimeType"]; - timestamp: number; - }; - CodeCompletionRequest: { - cellId: string; - document: string; - id: string; - }; - ColumnSummary: { - false?: number | null; - max?: components["schemas"]["NonNestedLiteral"]; - mean?: components["schemas"]["NonNestedLiteral"]; - median?: components["schemas"]["NonNestedLiteral"]; - min?: components["schemas"]["NonNestedLiteral"]; - nulls?: number | null; - p25?: components["schemas"]["NonNestedLiteral"]; - p5?: components["schemas"]["NonNestedLiteral"]; - p75?: components["schemas"]["NonNestedLiteral"]; - p95?: components["schemas"]["NonNestedLiteral"]; - std?: components["schemas"]["NonNestedLiteral"]; - total?: number | null; - true?: number | null; - unique?: number | null; - }; - CompletedRun: { - /** @enum {string} */ - name: "completed-run"; - }; - CompletionResult: { - completion_id: string; - /** @enum {string} */ - name: "completion-result"; - options: { - completion_info?: string | null; - name: string; - type: string; - }[]; - prefix_length: number; - }; - CreationRequest: { - executionRequests: components["schemas"]["ExecutionRequest"][]; - setUiElementValueRequest: components["schemas"]["SetUIElementValueRequest"]; - }; - CycleError: { - edges_with_vars: [ - string, - string[], - string - ][]; - /** @enum {string} */ - type: "cycle"; - }; - DataColumnPreview: { - chart_code?: string | null; - chart_max_rows_errors: boolean; - chart_spec?: string | null; - column_name: string; - error?: string | null; - /** @enum {string} */ - name: "data-column-preview"; - summary?: components["schemas"]["ColumnSummary"]; - table_name: string; - }; - DataTable: { - columns: components["schemas"]["DataTableColumn"][]; - name: string; - num_columns?: number | null; - num_rows?: number | null; - source: string; - /** @enum {string} */ - source_type: "local" | "duckdb"; - variable_name?: string | null; - }; - DataTableColumn: { - external_type: string; - name: string; - type: components["schemas"]["DataType"]; - }; + width: "normal" | "compact" | "medium" | "full"; + }; + capabilities: { + sql: boolean; + terminal: boolean; + }; + cell_ids: string[]; + codes: string[]; + configs: components["schemas"]["CellConfig"][]; + kiosk: boolean; + last_executed_code?: { + [key: string]: string; + } | null; + last_execution_time?: { + [key: string]: number; + } | null; + layout?: { + data: { + [key: string]: unknown; + }; + type: string; + } | null; + /** @enum {string} */ + name: "kernel-ready"; + names: string[]; + resumed: boolean; + ui_values?: { + [key: string]: + | ( + | { + [key: string]: components["schemas"]["JSONType"]; + } + | components["schemas"]["JSONType"][] + | string + | number + | boolean + | components["schemas"]["MIME"] + ) + | null; + } | null; + }; + MIME: Record; + MarimoAncestorPreventedError: { + blamed_cell?: string | null; + msg: string; + raising_cell: string; + /** @enum {string} */ + type: "ancestor-prevented"; + }; + MarimoAncestorStoppedError: { + msg: string; + raising_cell: string; + /** @enum {string} */ + type: "ancestor-stopped"; + }; + MarimoConfig: { + ai: { + open_ai: { + api_key: string; + base_url: string; + model: string; + }; + }; + completion: { + activate_on_typing: boolean; + codeium_api_key: string | null; + copilot: boolean | ("github" | "codeium"); + }; + display: { /** @enum {string} */ - DataType: "string" | "boolean" | "integer" | "number" | "date" | "unknown"; - Datasets: { - /** @enum {string|null} */ - clear_channel?: "local" | "duckdb" | null; - /** @enum {string} */ - name: "datasets"; - tables: components["schemas"]["DataTable"][]; - }; - DeleteCellRequest: { - cellId: string; - }; - DeleteNonlocalError: { - cells: string[]; - name: string; - /** @enum {string} */ - type: "delete-nonlocal"; - }; - Error: components["schemas"]["CycleError"] | components["schemas"]["MultipleDefinitionError"] | components["schemas"]["DeleteNonlocalError"] | components["schemas"]["MarimoAncestorStoppedError"] | components["schemas"]["MarimoAncestorPreventedError"] | components["schemas"]["MarimoExceptionRaisedError"] | components["schemas"]["MarimoStrictExecutionError"] | components["schemas"]["MarimoInterruptionError"] | components["schemas"]["MarimoSyntaxError"] | components["schemas"]["UnknownError"]; - ExecuteMultipleRequest: { - cellIds: string[]; - codes: string[]; - timestamp: number; - }; - ExecuteScratchpadRequest: { - code: string; - }; - ExecuteStaleRequest: Record; - ExecutionRequest: { - cellId: string; - code: string; - timestamp: number; - }; - ExportAsHTMLRequest: { - assetUrl?: string | null; - download: boolean; - files: string[]; - includeCode: boolean; - }; - ExportAsMarkdownRequest: { - download: boolean; - }; - ExportAsScriptRequest: { - download: boolean; - }; - FileCreateRequest: { - contents?: string | null; - name: string; - path: string; - /** @enum {string} */ - type: "file" | "directory"; - }; - FileCreateResponse: { - info?: components["schemas"]["FileInfo"]; - message?: string | null; - success: boolean; - }; - FileDeleteRequest: { - path: string; - }; - FileDeleteResponse: { - message?: string | null; - success: boolean; - }; - FileDetailsRequest: { - path: string; - }; - FileDetailsResponse: { - contents?: string | null; - file: components["schemas"]["FileInfo"]; - mimeType?: string | null; - }; - FileInfo: { - children: components["schemas"]["FileInfo"][]; - id: string; - isDirectory: boolean; - isMarimoFile: boolean; - lastModified?: number | null; - name: string; - path: string; - }; - FileListRequest: { - path?: string | null; - }; - FileListResponse: { - files: components["schemas"]["FileInfo"][]; - root: string; - }; - FileMoveRequest: { - newPath: string; - path: string; - }; - FileMoveResponse: { - info?: components["schemas"]["FileInfo"]; - message?: string | null; - success: boolean; - }; - FileUpdateRequest: { - contents: string; - path: string; - }; - FileUpdateResponse: { - info?: components["schemas"]["FileInfo"]; - message?: string | null; - success: boolean; - }; - FocusCell: { - cell_id: string; - /** @enum {string} */ - name: "focus-cell"; - }; - FormatRequest: { - codes: { - [key: string]: string; - }; - lineLength: number; - }; - FormatResponse: { - codes: { - [key: string]: string; - }; - }; - FunctionCallRequest: { - args: { - [key: string]: unknown; - }; - functionCallId: string; - functionName: string; - namespace: string; - }; - FunctionCallResult: { - function_call_id: string; - /** @enum {string} */ - name: "function-call-result"; - return_value?: components["schemas"]["JSONType"]; - status: components["schemas"]["HumanReadableStatus"]; - }; - HumanReadableStatus: { - /** @enum {string} */ - code: "ok" | "error"; - message?: string | null; - title?: string | null; - }; - InstallMissingPackagesRequest: { - manager: string; - }; - InstallingPackageAlert: { - /** @enum {string} */ - name: "installing-package-alert"; - packages: { - [key: string]: "queued" | "installing" | "installed" | "failed"; - }; - }; - InstantiateRequest: { - objectIds: string[]; - values: unknown[]; - }; - Interrupted: { - /** @enum {string} */ - name: "interrupted"; - }; - JSONType: string | number | Record | unknown[] | boolean | null; - KernelReady: { - app_config: { - app_title?: string | null; - layout_file?: string | null; - /** @enum {string} */ - width: "normal" | "compact" | "medium" | "full"; - }; - capabilities: { - sql: boolean; - terminal: boolean; - }; - cell_ids: string[]; - codes: string[]; - configs: components["schemas"]["CellConfig"][]; - kiosk: boolean; - last_executed_code?: { - [key: string]: string; - } | null; - last_execution_time?: { - [key: string]: number; - } | null; - layout?: { - data: { - [key: string]: unknown; - }; - type: string; - } | null; - /** @enum {string} */ - name: "kernel-ready"; - names: string[]; - resumed: boolean; - ui_values?: { - [key: string]: ({ - [key: string]: components["schemas"]["JSONType"]; - } | components["schemas"]["JSONType"][] | string | number | boolean | components["schemas"]["MIME"]) | null; - } | null; - }; - MIME: Record; - MarimoAncestorPreventedError: { - blamed_cell?: string | null; - msg: string; - raising_cell: string; - /** @enum {string} */ - type: "ancestor-prevented"; - }; - MarimoAncestorStoppedError: { - msg: string; - raising_cell: string; - /** @enum {string} */ - type: "ancestor-stopped"; - }; - MarimoConfig: { - ai: { - open_ai: { - api_key: string; - base_url: string; - model: string; - }; - }; - completion: { - activate_on_typing: boolean; - codeium_api_key: string | null; - copilot: boolean | ("github" | "codeium"); - }; - display: { - /** @enum {string} */ - cell_output: "above" | "below"; - code_editor_font_size: number; - /** @enum {string} */ - dataframes: "rich" | "plain"; - /** @enum {string} */ - default_width: "normal" | "compact" | "medium" | "full"; - /** @enum {string} */ - theme: "light" | "dark" | "system"; - }; - experimental: { - [key: string]: unknown; - }; - formatting: { - line_length: number; - }; - keymap: { - overrides: { - [key: string]: string; - }; - /** @enum {string} */ - preset: "default" | "vim"; - }; - package_management: { - /** @enum {string} */ - manager: "pip" | "rye" | "uv" | "poetry" | "pixi"; - }; - runtime: { - auto_instantiate: boolean; - /** @enum {string} */ - auto_reload: "off" | "lazy" | "autorun"; - /** @enum {string} */ - on_cell_change: "lazy" | "autorun"; - }; - save: { - /** @enum {string} */ - autosave: "off" | "after_delay"; - autosave_delay: number; - format_on_save: boolean; - }; - server: { - browser: "default" | string; - follow_symlink: boolean; - }; - }; - MarimoExceptionRaisedError: { - exception_type: string; - msg: string; - raising_cell?: string | null; - /** @enum {string} */ - type: "exception"; - }; - MarimoFile: { - initializationId?: string | null; - lastModified?: number | null; - name: string; - path: string; - sessionId?: string | null; - }; - MarimoInterruptionError: { - /** @enum {string} */ - type: "interruption"; - }; - MarimoStrictExecutionError: { - blamed_cell?: string | null; - msg: string; - ref: string; - /** @enum {string} */ - type: "strict-exception"; - }; - MarimoSyntaxError: { - msg: string; - /** @enum {string} */ - type: "syntax"; - }; - MessageOperation: components["schemas"]["CellOp"] | components["schemas"]["FunctionCallResult"] | components["schemas"]["SendUIElementMessage"] | components["schemas"]["RemoveUIElements"] | components["schemas"]["Reload"] | components["schemas"]["Reconnected"] | components["schemas"]["Interrupted"] | components["schemas"]["CompletedRun"] | components["schemas"]["KernelReady"] | components["schemas"]["CompletionResult"] | components["schemas"]["Alert"] | components["schemas"]["Banner"] | components["schemas"]["MissingPackageAlert"] | components["schemas"]["InstallingPackageAlert"] | components["schemas"]["Variables"] | components["schemas"]["VariableValues"] | components["schemas"]["QueryParamsSet"] | components["schemas"]["QueryParamsAppend"] | components["schemas"]["QueryParamsDelete"] | components["schemas"]["QueryParamsClear"] | components["schemas"]["Datasets"] | components["schemas"]["DataColumnPreview"] | components["schemas"]["FocusCell"] | components["schemas"]["UpdateCellCodes"] | components["schemas"]["UpdateCellIdsRequest"]; + cell_output: "above" | "below"; + code_editor_font_size: number; /** @enum {string} */ - MimeType: "application/json" | "application/vnd.marimo+error" | "application/vnd.marimo+traceback" | "image/png" | "image/svg+xml" | "image/tiff" | "image/avif" | "image/bmp" | "image/gif" | "image/jpeg" | "video/mp4" | "video/mpeg" | "text/html" | "text/plain" | "text/markdown" | "text/csv"; - MissingPackageAlert: { - isolated: boolean; - /** @enum {string} */ - name: "missing-package-alert"; - packages: string[]; - }; - MultipleDefinitionError: { - cells: string[]; - name: string; - /** @enum {string} */ - type: "multiple-defs"; - }; - NonNestedLiteral: number | string | boolean; - OpenFileRequest: { - path: string; - }; - PreviewDatasetColumnRequest: { - columnName: string; - source: string; - /** @enum {string} */ - sourceType: "local" | "duckdb"; - tableName: string; - }; - QueryParamsAppend: { - key: string; - /** @enum {string} */ - name: "query-params-append"; - value: string; - }; - QueryParamsClear: { - /** @enum {string} */ - name: "query-params-clear"; - }; - QueryParamsDelete: { - key: string; - /** @enum {string} */ - name: "query-params-delete"; - value?: string | null; - }; - QueryParamsSet: { - key: string; - /** @enum {string} */ - name: "query-params-set"; - value: string | string[]; - }; - ReadCodeResponse: { - contents: string; - }; - RecentFilesResponse: { - files: components["schemas"]["MarimoFile"][]; - }; - Reconnected: { - /** @enum {string} */ - name: "reconnected"; - }; - Reload: { - /** @enum {string} */ - name: "reload"; - }; - RemoveUIElements: { - cell_id: string; - /** @enum {string} */ - name: "remove-ui-elements"; - }; - RenameFileRequest: { - filename: string; - }; - RenameRequest: { - filename: string; - }; - RunRequest: { - cellIds: string[]; - codes: string[]; - }; - RunScratchpadRequest: { - code: string; - }; - RunningNotebooksResponse: { - files: components["schemas"]["MarimoFile"][]; - }; + dataframes: "rich" | "plain"; /** @enum {string} */ - RuntimeState: "idle" | "queued" | "running" | "disabled-transitively"; - SaveAppConfigurationRequest: { - config: { - [key: string]: unknown; - }; + default_width: "normal" | "compact" | "medium" | "full"; + /** @enum {string} */ + theme: "light" | "dark" | "system"; + }; + experimental: { + [key: string]: unknown; + }; + formatting: { + line_length: number; + }; + keymap: { + overrides: { + [key: string]: string; }; - SaveNotebookRequest: { - cellIds: string[]; - codes: string[]; - configs: components["schemas"]["CellConfig"][]; - filename: string; - layout?: { - [key: string]: unknown; - } | null; - names: string[]; - persist: boolean; - }; - SaveUserConfigurationRequest: { - config: components["schemas"]["MarimoConfig"]; - }; - SendUIElementMessage: { - buffers?: string[] | null; - message: { - [key: string]: { - [key: string]: unknown; - }; - }; - /** @enum {string} */ - name: "send-ui-element-message"; - ui_element: string; - }; - SetCellConfigRequest: { - configs: { - [key: string]: { - [key: string]: unknown; - }; - }; + /** @enum {string} */ + preset: "default" | "vim"; + }; + package_management: { + /** @enum {string} */ + manager: "pip" | "rye" | "uv" | "poetry" | "pixi"; + }; + runtime: { + auto_instantiate: boolean; + /** @enum {string} */ + auto_reload: "off" | "lazy" | "autorun"; + /** @enum {string} */ + on_cell_change: "lazy" | "autorun"; + }; + save: { + /** @enum {string} */ + autosave: "off" | "after_delay"; + autosave_delay: number; + format_on_save: boolean; + }; + server: { + browser: "default" | string; + follow_symlink: boolean; + }; + }; + MarimoExceptionRaisedError: { + exception_type: string; + msg: string; + raising_cell?: string | null; + /** @enum {string} */ + type: "exception"; + }; + MarimoFile: { + initializationId?: string | null; + lastModified?: number | null; + name: string; + path: string; + sessionId?: string | null; + }; + MarimoInterruptionError: { + /** @enum {string} */ + type: "interruption"; + }; + MarimoStrictExecutionError: { + blamed_cell?: string | null; + msg: string; + ref: string; + /** @enum {string} */ + type: "strict-exception"; + }; + MarimoSyntaxError: { + msg: string; + /** @enum {string} */ + type: "syntax"; + }; + MessageOperation: + | components["schemas"]["CellOp"] + | components["schemas"]["FunctionCallResult"] + | components["schemas"]["SendUIElementMessage"] + | components["schemas"]["RemoveUIElements"] + | components["schemas"]["Reload"] + | components["schemas"]["Reconnected"] + | components["schemas"]["Interrupted"] + | components["schemas"]["CompletedRun"] + | components["schemas"]["KernelReady"] + | components["schemas"]["CompletionResult"] + | components["schemas"]["Alert"] + | components["schemas"]["Banner"] + | components["schemas"]["MissingPackageAlert"] + | components["schemas"]["InstallingPackageAlert"] + | components["schemas"]["Variables"] + | components["schemas"]["VariableValues"] + | components["schemas"]["QueryParamsSet"] + | components["schemas"]["QueryParamsAppend"] + | components["schemas"]["QueryParamsDelete"] + | components["schemas"]["QueryParamsClear"] + | components["schemas"]["Datasets"] + | components["schemas"]["DataColumnPreview"] + | components["schemas"]["FocusCell"] + | components["schemas"]["UpdateCellCodes"] + | components["schemas"]["UpdateCellIdsRequest"]; + /** @enum {string} */ + MimeType: + | "application/json" + | "application/vnd.marimo+error" + | "application/vnd.marimo+traceback" + | "image/png" + | "image/svg+xml" + | "image/tiff" + | "image/avif" + | "image/bmp" + | "image/gif" + | "image/jpeg" + | "video/mp4" + | "video/mpeg" + | "text/html" + | "text/plain" + | "text/markdown" + | "text/csv"; + MissingPackageAlert: { + isolated: boolean; + /** @enum {string} */ + name: "missing-package-alert"; + packages: string[]; + }; + MultipleDefinitionError: { + cells: string[]; + name: string; + /** @enum {string} */ + type: "multiple-defs"; + }; + NonNestedLiteral: number | string | boolean; + OpenFileRequest: { + path: string; + }; + PreviewDatasetColumnRequest: { + columnName: string; + source: string; + /** @enum {string} */ + sourceType: "local" | "duckdb"; + tableName: string; + }; + QueryParamsAppend: { + key: string; + /** @enum {string} */ + name: "query-params-append"; + value: string; + }; + QueryParamsClear: { + /** @enum {string} */ + name: "query-params-clear"; + }; + QueryParamsDelete: { + key: string; + /** @enum {string} */ + name: "query-params-delete"; + value?: string | null; + }; + QueryParamsSet: { + key: string; + /** @enum {string} */ + name: "query-params-set"; + value: string | string[]; + }; + ReadCodeResponse: { + contents: string; + }; + RecentFilesResponse: { + files: components["schemas"]["MarimoFile"][]; + }; + Reconnected: { + /** @enum {string} */ + name: "reconnected"; + }; + Reload: { + /** @enum {string} */ + name: "reload"; + }; + RemoveUIElements: { + cell_id: string; + /** @enum {string} */ + name: "remove-ui-elements"; + }; + RenameFileRequest: { + filename: string; + }; + RenameRequest: { + filename: string; + }; + RunRequest: { + cellIds: string[]; + codes: string[]; + }; + RunScratchpadRequest: { + code: string; + }; + RunningNotebooksResponse: { + files: components["schemas"]["MarimoFile"][]; + }; + /** @enum {string} */ + RuntimeState: "idle" | "queued" | "running" | "disabled-transitively"; + SaveAppConfigurationRequest: { + config: { + [key: string]: unknown; + }; + }; + SaveNotebookRequest: { + cellIds: string[]; + codes: string[]; + configs: components["schemas"]["CellConfig"][]; + filename: string; + layout?: { + [key: string]: unknown; + } | null; + names: string[]; + persist: boolean; + }; + SaveUserConfigurationRequest: { + config: components["schemas"]["MarimoConfig"]; + }; + SendUIElementMessage: { + buffers?: string[] | null; + message: { + [key: string]: { + [key: string]: unknown; + }; + }; + /** @enum {string} */ + name: "send-ui-element-message"; + ui_element: string; + }; + SetCellConfigRequest: { + configs: { + [key: string]: { + [key: string]: unknown; }; - SetUIElementValueRequest: { - objectIds: string[]; - token: string; - values: unknown[]; - }; - SetUserConfigRequest: { - config: components["schemas"]["MarimoConfig"]; - }; - ShutdownSessionRequest: { - sessionId: string; - }; - Snippet: { - sections: components["schemas"]["SnippetSection"][]; - title: string; - }; - SnippetSection: { - code?: string | null; - html?: string | null; - id: string; - }; - Snippets: { - snippets: components["schemas"]["Snippet"][]; - }; - StdinRequest: { - text: string; - }; - StopRequest: Record; - SuccessResponse: { - success: boolean; - }; - UnknownError: { - msg: string; - /** @enum {string} */ - type: "unknown"; - }; - UpdateCellCodes: { - cell_ids: string[]; - codes: string[]; - /** @enum {string} */ - name: "update-cell-codes"; - }; - UpdateCellIdsRequest: { - cell_ids: string[]; - /** @enum {string} */ - name: "update-cell-ids"; - }; - UpdateComponentValuesRequest: { - objectIds: string[]; - values: unknown[]; - }; - VariableDeclaration: { - declared_by: string[]; - name: string; - used_by: string[]; - }; - VariableValue: { - datatype?: string | null; - name: string; - value?: string | null; - }; - VariableValues: { - /** @enum {string} */ - name: "variable-values"; - variables: components["schemas"]["VariableValue"][]; - }; - Variables: { - /** @enum {string} */ - name: "variables"; - variables: components["schemas"]["VariableDeclaration"][]; - }; - WorkspaceFilesRequest: { - includeMarkdown: boolean; - }; - WorkspaceFilesResponse: { - files: components["schemas"]["FileInfo"][]; - root: string; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + }; + }; + SetUIElementValueRequest: { + objectIds: string[]; + token: string; + values: unknown[]; + }; + SetUserConfigRequest: { + config: components["schemas"]["MarimoConfig"]; + }; + ShutdownSessionRequest: { + sessionId: string; + }; + Snippet: { + sections: components["schemas"]["SnippetSection"][]; + title: string; + }; + SnippetSection: { + code?: string | null; + html?: string | null; + id: string; + }; + Snippets: { + snippets: components["schemas"]["Snippet"][]; + }; + StdinRequest: { + text: string; + }; + StopRequest: Record; + SuccessResponse: { + success: boolean; + }; + UnknownError: { + msg: string; + /** @enum {string} */ + type: "unknown"; + }; + UpdateCellCodes: { + cell_ids: string[]; + codes: string[]; + /** @enum {string} */ + name: "update-cell-codes"; + }; + UpdateCellIdsRequest: { + cell_ids: string[]; + /** @enum {string} */ + name: "update-cell-ids"; + }; + UpdateComponentValuesRequest: { + objectIds: string[]; + values: unknown[]; + }; + VariableDeclaration: { + declared_by: string[]; + name: string; + used_by: string[]; + }; + VariableValue: { + datatype?: string | null; + name: string; + value?: string | null; + }; + VariableValues: { + /** @enum {string} */ + name: "variable-values"; + variables: components["schemas"]["VariableValue"][]; + }; + Variables: { + /** @enum {string} */ + name: "variables"; + variables: components["schemas"]["VariableDeclaration"][]; + }; + WorkspaceFilesRequest: { + includeMarkdown: boolean; + }; + WorkspaceFilesResponse: { + files: components["schemas"]["FileInfo"][]; + root: string; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; } export type $defs = Record; export type operations = Record; From ccc5c797cc6d6413b9109d102cb1abfc31b1f794 Mon Sep 17 00:00:00 2001 From: Myles Scolnick Date: Wed, 21 Aug 2024 21:03:30 -0400 Subject: [PATCH 3/6] upgrade fixes --- .../src/components/app-config/user-config-form.tsx | 5 +---- frontend/src/core/config/config-schema.ts | 14 ++++++-------- frontend/src/core/network/api.ts | 4 ++-- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/frontend/src/components/app-config/user-config-form.tsx b/frontend/src/components/app-config/user-config-form.tsx index fea7352aee1..608871f8c9a 100644 --- a/frontend/src/components/app-config/user-config-form.tsx +++ b/frontend/src/components/app-config/user-config-form.tsx @@ -654,10 +654,7 @@ export const UserConfigForm: React.FC = () => { const SettingGroup = ({ title, children, -}: { - title: string; - children: React.ReactNode; -}) => { +}: { title: string; children: React.ReactNode }) => { return (
{title} diff --git a/frontend/src/core/config/config-schema.ts b/frontend/src/core/config/config-schema.ts index 6e3aaa98e4f..826a676b154 100644 --- a/frontend/src/core/config/config-schema.ts +++ b/frontend/src/core/config/config-schema.ts @@ -2,7 +2,7 @@ import { z } from "zod"; import { Logger } from "@/utils/Logger"; import { getMarimoAppConfig, getMarimoUserConfig } from "../dom/marimo-tag"; -import { MarimoConfig } from "../network/types"; +import type { MarimoConfig } from "../network/types"; // This has to be defined in the same file as the zod schema to satisfy zod export const PackageManagerNames = [ @@ -130,11 +130,9 @@ export type SaveConfig = UserConfig["save"]; export type CompletionConfig = UserConfig["completion"]; export type KeymapConfig = UserConfig["keymap"]; -export const AppTitleSchema = z - .string() - .regex(new RegExp("^[A-Za-z0-9-_' ]*$"), { - message: "Invalid application title", - }); +export const AppTitleSchema = z.string().regex(/^[\w '-]*$/, { + message: "Invalid application title", +}); export const AppConfigSchema = z .object({ width: z @@ -170,7 +168,7 @@ export function parseUserConfig(): UserConfig { Logger.log(`🧪 Experimental feature "${key}" is enabled.`); } } - return parsed as UserConfig; + return parsed as unknown as UserConfig; } catch (error) { Logger.error( `Marimo got an unexpected value in the configuration file: ${error}`, @@ -180,5 +178,5 @@ export function parseUserConfig(): UserConfig { } export function defaultUserConfig(): UserConfig { - return UserConfigSchema.parse({}) as UserConfig; + return UserConfigSchema.parse({}) as unknown as UserConfig; } diff --git a/frontend/src/core/network/api.ts b/frontend/src/core/network/api.ts index 6385fabba91..8e7fd28f7bb 100644 --- a/frontend/src/core/network/api.ts +++ b/frontend/src/core/network/api.ts @@ -95,7 +95,7 @@ export const API = { }, handleResponse: (response: { data?: T | undefined; - error?: Error; + error?: Record; response: Response; }): Promise => { if (response.error) { @@ -104,7 +104,7 @@ export const API = { return Promise.resolve(response.data as T); }, handleResponseReturnNull: (response: { - error?: Error; + error?: Record; response: Response; }): Promise => { if (response.error) { From bd6ec9484e8802bfa8a124b2efd4716933341fd3 Mon Sep 17 00:00:00 2001 From: Myles Scolnick Date: Wed, 21 Aug 2024 21:08:41 -0400 Subject: [PATCH 4/6] fix --- frontend/src/core/network/api.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/core/network/api.ts b/frontend/src/core/network/api.ts index 8e7fd28f7bb..c959efac81b 100644 --- a/frontend/src/core/network/api.ts +++ b/frontend/src/core/network/api.ts @@ -73,13 +73,13 @@ export const API = { .then((response) => { if (!response.ok) { throw new Error(response.statusText); - } else if ( + } + if ( response.headers.get("Content-Type")?.startsWith("application/json") ) { return response.json() as RESP; - } else { - return null as RESP; } + return null as RESP; }) .catch((error) => { // Catch and rethrow @@ -99,6 +99,7 @@ export const API = { response: Response; }): Promise => { if (response.error) { + // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors return Promise.reject(response.error); } return Promise.resolve(response.data as T); @@ -108,6 +109,7 @@ export const API = { response: Response; }): Promise => { if (response.error) { + // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors return Promise.reject(response.error); } return Promise.resolve(null); From 2c2821dc5f352948f5fd9792fe9e0a157ba7b96c Mon Sep 17 00:00:00 2001 From: Akshay Agrawal Date: Wed, 21 Aug 2024 21:21:44 -0400 Subject: [PATCH 5/6] update snapshots --- frontend/src/core/config/__tests__/config-schema.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/core/config/__tests__/config-schema.test.ts b/frontend/src/core/config/__tests__/config-schema.test.ts index af1b7f663a2..c6e47072fd6 100644 --- a/frontend/src/core/config/__tests__/config-schema.test.ts +++ b/frontend/src/core/config/__tests__/config-schema.test.ts @@ -36,6 +36,7 @@ test("default UserConfig - empty", () => { "display": { "cell_output": "above", "code_editor_font_size": 14, + "dataframes": "rich", "default_width": "medium", "theme": "light", }, @@ -85,6 +86,7 @@ test("default UserConfig - one level", () => { "display": { "cell_output": "above", "code_editor_font_size": 14, + "dataframes": "rich", "default_width": "medium", "theme": "light", }, From 6773bcbb0f9c2ad16681f40d13aabb2f2e46ba70 Mon Sep 17 00:00:00 2001 From: Akshay Agrawal Date: Wed, 21 Aug 2024 23:09:28 -0400 Subject: [PATCH 6/6] update snaps --- tests/_server/templates/snapshots/export1.txt | 2 +- tests/_server/templates/snapshots/export2.txt | 2 +- tests/_server/templates/snapshots/export3.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/_server/templates/snapshots/export1.txt b/tests/_server/templates/snapshots/export1.txt index 5a0404c110e..9343d9f19ee 100644 --- a/tests/_server/templates/snapshots/export1.txt +++ b/tests/_server/templates/snapshots/export1.txt @@ -56,7 +56,7 @@ - + notebook diff --git a/tests/_server/templates/snapshots/export2.txt b/tests/_server/templates/snapshots/export2.txt index 4aa6df447d6..4f53dc5eeee 100644 --- a/tests/_server/templates/snapshots/export2.txt +++ b/tests/_server/templates/snapshots/export2.txt @@ -56,7 +56,7 @@ - + marimo diff --git a/tests/_server/templates/snapshots/export3.txt b/tests/_server/templates/snapshots/export3.txt index 20a063cdd9f..193589e78fa 100644 --- a/tests/_server/templates/snapshots/export3.txt +++ b/tests/_server/templates/snapshots/export3.txt @@ -56,7 +56,7 @@ - + notebook