Skip to content

Commit 5200066

Browse files
committed
docs: update
1 parent 60b1bcd commit 5200066

File tree

12 files changed

+392
-94
lines changed

12 files changed

+392
-94
lines changed

apps/dev-playground/client/src/appKitTypes.d.ts

Lines changed: 9 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -14,46 +14,28 @@ declare module "@databricks/appkit-ui/react" {
1414
endDate: SQLDateMarker;
1515
};
1616
result: Array<{
17-
/** @sqlType STRING */
18-
app_name: string;
19-
/** @sqlType STRING */
20-
day_of_week: string;
21-
/** @sqlType DECIMAL(35,2) */
22-
spend: number;
17+
;
2318
}>;
2419
};
2520
apps_list: {
2621
name: "apps_list";
2722
parameters: Record<string, never>;
2823
result: Array<{
29-
/** @sqlType STRING */
30-
id: string;
31-
/** @sqlType STRING */
32-
name: string;
33-
/** @sqlType STRING */
34-
creator: string;
35-
/** @sqlType STRING */
36-
tags: string;
37-
/** @sqlType DECIMAL(38,6) */
38-
totalSpend: number;
39-
/** @sqlType DATE */
40-
createdAt: string;
24+
;
4125
}>;
4226
};
4327
cost_recommendations: {
4428
name: "cost_recommendations";
4529
parameters: Record<string, never>;
4630
result: Array<{
47-
/** @sqlType INT */
48-
dummy: number;
31+
;
4932
}>;
5033
};
5134
example: {
5235
name: "example";
5336
parameters: Record<string, never>;
5437
result: Array<{
55-
/** @sqlType BOOLEAN */
56-
"(1 = 1)": boolean;
38+
;
5739
}>;
5840
};
5941
spend_data: {
@@ -73,12 +55,7 @@ declare module "@databricks/appkit-ui/react" {
7355
creator: SQLStringMarker;
7456
};
7557
result: Array<{
76-
/** @sqlType STRING */
77-
group_key: string;
78-
/** @sqlType TIMESTAMP */
79-
aggregation_period: string;
80-
/** @sqlType DECIMAL(38,6) */
81-
cost_usd: number;
58+
;
8259
}>;
8360
};
8461
spend_summary: {
@@ -92,12 +69,7 @@ declare module "@databricks/appkit-ui/react" {
9269
startDate: SQLDateMarker;
9370
};
9471
result: Array<{
95-
/** @sqlType DECIMAL(33,0) */
96-
total: number;
97-
/** @sqlType DECIMAL(33,0) */
98-
average: number;
99-
/** @sqlType DECIMAL(33,0) */
100-
forecasted: number;
72+
;
10173
}>;
10274
};
10375
sql_helpers_test: {
@@ -117,22 +89,7 @@ declare module "@databricks/appkit-ui/react" {
11789
binaryParam: SQLStringMarker;
11890
};
11991
result: Array<{
120-
/** @sqlType STRING */
121-
string_value: string;
122-
/** @sqlType STRING */
123-
number_value: string;
124-
/** @sqlType STRING */
125-
boolean_value: string;
126-
/** @sqlType STRING */
127-
date_value: string;
128-
/** @sqlType STRING */
129-
timestamp_value: string;
130-
/** @sqlType BINARY */
131-
binary_value: string;
132-
/** @sqlType STRING */
133-
binary_hex: string;
134-
/** @sqlType INT */
135-
binary_length: number;
92+
;
13693
}>;
13794
};
13895
top_contributors: {
@@ -146,10 +103,7 @@ declare module "@databricks/appkit-ui/react" {
146103
endDate: SQLDateMarker;
147104
};
148105
result: Array<{
149-
/** @sqlType STRING */
150-
app_name: string;
151-
/** @sqlType DECIMAL(38,6) */
152-
total_cost_usd: number;
106+
;
153107
}>;
154108
};
155109
untagged_apps: {
@@ -163,14 +117,7 @@ declare module "@databricks/appkit-ui/react" {
163117
endDate: SQLDateMarker;
164118
};
165119
result: Array<{
166-
/** @sqlType STRING */
167-
app_name: string;
168-
/** @sqlType STRING */
169-
creator: string;
170-
/** @sqlType DECIMAL(38,6) */
171-
total_cost_usd: number;
172-
/** @sqlType DECIMAL(38,10) */
173-
avg_period_cost_usd: number;
120+
;
174121
}>;
175122
};
176123
}

docs/docs/api/appkit/Class.Plugin.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,24 @@ BasePlugin.getEndpoints
345345

346346
***
347347

348+
### getSkipBodyParsingPaths()
349+
350+
```ts
351+
getSkipBodyParsingPaths(): ReadonlySet<string>;
352+
```
353+
354+
#### Returns
355+
356+
`ReadonlySet`\<`string`\>
357+
358+
#### Implementation of
359+
360+
```ts
361+
BasePlugin.getSkipBodyParsingPaths
362+
```
363+
364+
***
365+
348366
### injectRoutes()
349367

350368
```ts
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Function: contentTypeFromPath()
2+
3+
```ts
4+
function contentTypeFromPath(
5+
filePath: string,
6+
reported?: string,
7+
customTypes?: Record<string, string>): string;
8+
```
9+
10+
Resolve the MIME content type for a file path.
11+
12+
Resolution order:
13+
1. Custom type map (if the extension matches a key in `customTypes`).
14+
2. Built-in extension map (EXTENSION\_CONTENT\_TYPES).
15+
3. The `reported` type from the server, or `application/octet-stream` as a fallback.
16+
17+
## Parameters
18+
19+
| Parameter | Type | Description |
20+
| ------ | ------ | ------ |
21+
| `filePath` | `string` | File path used to extract the extension. |
22+
| `reported?` | `string` | Content type reported by the server (used as fallback). |
23+
| `customTypes?` | `Record`\<`string`, `string`\> | Optional map of extensions to MIME types that takes priority. |
24+
25+
## Returns
26+
27+
`string`
28+
29+
The resolved MIME content type string.

docs/docs/api/appkit/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ plugin architecture, and React integration.
6565
| Function | Description |
6666
| ------ | ------ |
6767
| [appKitTypesPlugin](Function.appKitTypesPlugin.md) | Vite plugin to generate types for AppKit queries. Calls generateFromEntryPoint under the hood. |
68+
| [contentTypeFromPath](Function.contentTypeFromPath.md) | Resolve the MIME content type for a file path. |
6869
| [createApp](Function.createApp.md) | Bootstraps AppKit with the provided configuration. |
6970
| [createLakebasePool](Function.createLakebasePool.md) | Create a Lakebase pool with appkit's logger integration. Telemetry automatically uses appkit's OpenTelemetry configuration via global registry. |
7071
| [generateDatabaseCredential](Function.generateDatabaseCredential.md) | Generate OAuth credentials for Postgres database connection using the proper Postgres API. |

docs/docs/api/appkit/typedoc-sidebar.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ const typedocSidebar: SidebarsConfig = {
200200
id: "api/appkit/Function.appKitTypesPlugin",
201201
label: "appKitTypesPlugin"
202202
},
203+
{
204+
type: "doc",
205+
id: "api/appkit/Function.contentTypeFromPath",
206+
label: "contentTypeFromPath"
207+
},
203208
{
204209
type: "doc",
205210
id: "api/appkit/Function.createApp",

0 commit comments

Comments
 (0)