Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6f76009
chore: first draft
atilafassina Feb 17, 2026
ce82860
chore: add files route to dev-playground
atilafassina Feb 17, 2026
be66fdd
chore: add `injectRoutes` logic to plugin
atilafassina Feb 18, 2026
b27e231
feat: add stream and cache
atilafassina Feb 18, 2026
ece130a
chore: file upload stream
atilafassina Feb 18, 2026
5d85548
chore: deduplicate tests, cleanup
atilafassina Feb 18, 2026
5b0a682
chore: skip bail `req.body` type for specific routes in Server plugin
atilafassina Feb 18, 2026
a1c05c4
chore: remove dev-playground files integration
atilafassina Feb 18, 2026
91367c2
docs: update
atilafassina Feb 18, 2026
da0e62f
chore: cleanup integration tests
atilafassina Feb 19, 2026
09f86c3
fix: add file resource to manifest
atilafassina Feb 19, 2026
79bd173
refactor: move client to `/connectors`
atilafassina Feb 19, 2026
f4826dc
chore: improve preview and MIME checks
atilafassina Feb 19, 2026
60b1bcd
chore: fix merge conflicts
atilafassina Feb 20, 2026
5200066
docs: update
atilafassina Feb 20, 2026
a0dda75
chore: address code-review, improve consistency across endpoints, fix…
atilafassina Feb 20, 2026
b95711f
fix: xss vulnerability on raw serving files
atilafassina Feb 20, 2026
1c5805b
chore: linter warnings
atilafassina Feb 20, 2026
e5e973d
fix: docs generation
atilafassina Feb 20, 2026
bb57226
chore: security in-depth and a few inconsistencies between docs and m…
atilafassina Feb 20, 2026
07b6671
clean up JSDoc
atilafassina Feb 23, 2026
e065cdc
docs: format / cleanup
atilafassina Feb 23, 2026
34ef4a5
fix: edge case on extension matching / add tests
atilafassina Feb 23, 2026
a99997f
fix: defaults variable naming
atilafassina Feb 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 9 additions & 62 deletions apps/dev-playground/client/src/appKitTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,46 +14,28 @@ declare module "@databricks/appkit-ui/react" {
endDate: SQLDateMarker;
};
result: Array<{
/** @sqlType STRING */
app_name: string;
/** @sqlType STRING */
day_of_week: string;
/** @sqlType DECIMAL(35,2) */
spend: number;
;
}>;
};
apps_list: {
name: "apps_list";
parameters: Record<string, never>;
result: Array<{
/** @sqlType STRING */
id: string;
/** @sqlType STRING */
name: string;
/** @sqlType STRING */
creator: string;
/** @sqlType STRING */
tags: string;
/** @sqlType DECIMAL(38,6) */
totalSpend: number;
/** @sqlType DATE */
createdAt: string;
;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reverted types look like a regression

}>;
};
cost_recommendations: {
name: "cost_recommendations";
parameters: Record<string, never>;
result: Array<{
/** @sqlType INT */
dummy: number;
;
}>;
};
example: {
name: "example";
parameters: Record<string, never>;
result: Array<{
/** @sqlType BOOLEAN */
"(1 = 1)": boolean;
;
}>;
};
spend_data: {
Expand All @@ -73,12 +55,7 @@ declare module "@databricks/appkit-ui/react" {
creator: SQLStringMarker;
};
result: Array<{
/** @sqlType STRING */
group_key: string;
/** @sqlType TIMESTAMP */
aggregation_period: string;
/** @sqlType DECIMAL(38,6) */
cost_usd: number;
;
}>;
};
spend_summary: {
Expand All @@ -92,12 +69,7 @@ declare module "@databricks/appkit-ui/react" {
startDate: SQLDateMarker;
};
result: Array<{
/** @sqlType DECIMAL(33,0) */
total: number;
/** @sqlType DECIMAL(33,0) */
average: number;
/** @sqlType DECIMAL(33,0) */
forecasted: number;
;
}>;
};
sql_helpers_test: {
Expand All @@ -117,22 +89,7 @@ declare module "@databricks/appkit-ui/react" {
binaryParam: SQLStringMarker;
};
result: Array<{
/** @sqlType STRING */
string_value: string;
/** @sqlType STRING */
number_value: string;
/** @sqlType STRING */
boolean_value: string;
/** @sqlType STRING */
date_value: string;
/** @sqlType STRING */
timestamp_value: string;
/** @sqlType BINARY */
binary_value: string;
/** @sqlType STRING */
binary_hex: string;
/** @sqlType INT */
binary_length: number;
;
}>;
};
top_contributors: {
Expand All @@ -146,10 +103,7 @@ declare module "@databricks/appkit-ui/react" {
endDate: SQLDateMarker;
};
result: Array<{
/** @sqlType STRING */
app_name: string;
/** @sqlType DECIMAL(38,6) */
total_cost_usd: number;
;
}>;
};
untagged_apps: {
Expand All @@ -163,14 +117,7 @@ declare module "@databricks/appkit-ui/react" {
endDate: SQLDateMarker;
};
result: Array<{
/** @sqlType STRING */
app_name: string;
/** @sqlType STRING */
creator: string;
/** @sqlType DECIMAL(38,6) */
total_cost_usd: number;
/** @sqlType DECIMAL(38,10) */
avg_period_cost_usd: number;
;
}>;
};
}
Expand Down
3 changes: 2 additions & 1 deletion apps/dev-playground/server/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "reflect-metadata";
import { analytics, createApp, server } from "@databricks/appkit";
import { analytics, createApp, files, server } from "@databricks/appkit";
import { WorkspaceClient } from "@databricks/sdk-experimental";
import { lakebaseExamples } from "./lakebase-examples-plugin";
import { reconnect } from "./reconnect-plugin";
Expand All @@ -22,6 +22,7 @@ createApp({
telemetryExamples(),
analytics({}),
lakebaseExamples(),
files({ defaultVolume: process.env.DATABRICKS_DEFAULT_VOLUME }),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to pass the DATABRICKS_DEFAULT_VOLUME env value if it is already read by the plugin itself (at least that's what the plugin manifest says)? Looks redundant unless I'm missing something 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how to we manage permissions. Can all users read and upload all the files?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each plugin should work by default by just calling it with no config (meaning we should put a default inside) so we can just call it like files()

],
...(process.env.APPKIT_E2E_TEST && { client: createMockClient() }),
}).then((appkit) => {
Expand Down
18 changes: 18 additions & 0 deletions docs/docs/api/appkit/Class.Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,24 @@ BasePlugin.getEndpoints

***

### getSkipBodyParsingPaths()

```ts
getSkipBodyParsingPaths(): ReadonlySet<string>;
```

#### Returns

`ReadonlySet`\<`string`\>

#### Implementation of

```ts
BasePlugin.getSkipBodyParsingPaths
```

***

### injectRoutes()

```ts
Expand Down
24 changes: 24 additions & 0 deletions docs/docs/api/appkit/Function.contentTypeFromPath.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Function: contentTypeFromPath()

```ts
function contentTypeFromPath(
filePath: string,
reported?: string,
customTypes?: Record<string, string>): string;
```

Resolve the MIME content type for a file path.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `filePath` | `string` | Path to the file (only the extension is inspected). |
| `reported?` | `string` | Optional MIME type reported by the caller; used as fallback when the extension is unknown. |
| `customTypes?` | `Record`\<`string`, `string`\> | Optional map of extension → MIME type overrides (e.g. `{ ".csv": "text/csv" }`). |

## Returns

`string`

The resolved MIME content type string.
1 change: 1 addition & 0 deletions docs/docs/api/appkit/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ plugin architecture, and React integration.
| Function | Description |
| ------ | ------ |
| [appKitTypesPlugin](Function.appKitTypesPlugin.md) | Vite plugin to generate types for AppKit queries. Calls generateFromEntryPoint under the hood. |
| [contentTypeFromPath](Function.contentTypeFromPath.md) | Resolve the MIME content type for a file path. |
| [createApp](Function.createApp.md) | Bootstraps AppKit with the provided configuration. |
| [createLakebasePool](Function.createLakebasePool.md) | Create a Lakebase pool with appkit's logger integration. Telemetry automatically uses appkit's OpenTelemetry configuration via global registry. |
| [generateDatabaseCredential](Function.generateDatabaseCredential.md) | Generate OAuth credentials for Postgres database connection using the proper Postgres API. |
Expand Down
5 changes: 5 additions & 0 deletions docs/docs/api/appkit/typedoc-sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@ const typedocSidebar: SidebarsConfig = {
id: "api/appkit/Function.appKitTypesPlugin",
label: "appKitTypesPlugin"
},
{
type: "doc",
id: "api/appkit/Function.contentTypeFromPath",
label: "contentTypeFromPath"
},
{
type: "doc",
id: "api/appkit/Function.createApp",
Expand Down
Loading