You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eliminate three hand-maintained copies of ResourceFieldEntry,
ResourceRequirement, and PluginManifest by generating TypeScript
interfaces from plugin-manifest.schema.json using
json-schema-to-typescript.
- Add tools/generate-schema-types.ts for schema→TS generation
- shared/plugin.ts imports and extends generated types
- manifest-types.ts re-exports from generated types
- appkit/registry/types.ts narrows type→ResourceType enum,
permission→ResourcePermission union
- Add generate:types root script and CI drift check
- Keep custom script for ResourceType enum, permission hierarchies
Signed-off-by: Pawel Kosiec <pawel.kosiec@databricks.com>
@@ -17,7 +21,13 @@ Attached to plugin classes as a static property.
17
21
optionalauthor: string;
18
22
```
19
23
20
-
Optional metadata for community plugins
24
+
Author name or organization
25
+
26
+
#### Inherited from
27
+
28
+
```ts
29
+
Omit.author
30
+
```
21
31
22
32
***
23
33
@@ -30,7 +40,7 @@ optional config: {
30
40
```
31
41
32
42
Configuration schema for the plugin.
33
-
Defines the shape and validation rules for plugin config.
43
+
Uses JSONSchema7 instead of the generated ConfigSchema (which is too restrictive).
34
44
35
45
#### schema
36
46
@@ -48,6 +58,12 @@ description: string;
48
58
49
59
Brief description of what the plugin does
50
60
61
+
#### Inherited from
62
+
63
+
```ts
64
+
Omit.description
65
+
```
66
+
51
67
***
52
68
53
69
### displayName
@@ -56,7 +72,13 @@ Brief description of what the plugin does
56
72
displayName: string;
57
73
```
58
74
59
-
Human-readable display name for UI/CLI
75
+
Human-readable display name for UI and CLI
76
+
77
+
#### Inherited from
78
+
79
+
```ts
80
+
Omit.displayName
81
+
```
60
82
61
83
***
62
84
@@ -66,7 +88,13 @@ Human-readable display name for UI/CLI
66
88
optionalhidden: boolean;
67
89
```
68
90
69
-
When true, excluded from the template plugins manifest during sync.
91
+
When true, this plugin is excluded from the template plugins manifest (appkit.plugins.json) during sync.
92
+
93
+
#### Inherited from
94
+
95
+
```ts
96
+
Omit.hidden
97
+
```
70
98
71
99
***
72
100
@@ -76,6 +104,14 @@ When true, excluded from the template plugins manifest during sync.
76
104
optionalkeywords: string[];
77
105
```
78
106
107
+
Keywords for plugin discovery
108
+
109
+
#### Inherited from
110
+
111
+
```ts
112
+
Omit.keywords
113
+
```
114
+
79
115
***
80
116
81
117
### license?
@@ -84,6 +120,14 @@ optional keywords: string[];
84
120
optionallicense: string;
85
121
```
86
122
123
+
SPDX license identifier
124
+
125
+
#### Inherited from
126
+
127
+
```ts
128
+
Omit.license
129
+
```
130
+
87
131
***
88
132
89
133
### name
@@ -94,6 +138,28 @@ name: TName;
94
138
95
139
Plugin identifier — the single source of truth for the plugin's name
96
140
141
+
#### Overrides
142
+
143
+
```ts
144
+
Omit.name
145
+
```
146
+
147
+
***
148
+
149
+
### onSetupMessage?
150
+
151
+
```ts
152
+
optionalonSetupMessage: string;
153
+
```
154
+
155
+
Message displayed to the user after project initialization. Use this to inform about manual setup steps (e.g. environment variables, resource provisioning).
156
+
157
+
#### Inherited from
158
+
159
+
```ts
160
+
Omit.onSetupMessage
161
+
```
162
+
97
163
***
98
164
99
165
### repository?
@@ -102,6 +168,14 @@ Plugin identifier — the single source of truth for the plugin's name
Copy file name to clipboardExpand all lines: docs/docs/api/appkit/Interface.ResourceEntry.md
+5-8Lines changed: 5 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Extends ResourceRequirement with resolution state and plugin ownership.
15
15
alias: string;
16
16
```
17
17
18
-
Unique alias for this resource within the plugin (e.g., 'warehouse', 'secrets'). Used for UI/display.
18
+
Human-readable label for UI/display only. Deduplication uses resourceKey, not alias.
19
19
20
20
#### Inherited from
21
21
@@ -43,8 +43,7 @@ Human-readable description of why this resource is needed
43
43
fields: Record<string, ResourceFieldEntry>;
44
44
```
45
45
46
-
Map of field name to env and optional description.
47
-
Single-value types use one key (e.g. id); multi-value (database, secret) use multiple keys.
46
+
Map of field name to env and optional description. Single-value types use one key (e.g. id); multi-value (database, secret) use multiple (e.g. instance_name, database_name or scope, key).
48
47
49
48
#### Inherited from
50
49
@@ -58,7 +57,7 @@ Single-value types use one key (e.g. id); multi-value (database, secret) use mul
58
57
permission: ResourcePermission;
59
58
```
60
59
61
-
Required permission level for the resource
60
+
Required permission level for the resource (narrowed to union)
62
61
63
62
#### Inherited from
64
63
@@ -94,8 +93,6 @@ Plugin(s) that require this resource (comma-separated if multiple)
94
93
required: boolean;
95
94
```
96
95
97
-
Whether this resource is required (true) or optional (false)
Copy file name to clipboardExpand all lines: docs/docs/api/appkit/Interface.ResourceRequirement.md
+51-8Lines changed: 51 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,11 @@
1
1
# Interface: ResourceRequirement
2
2
3
3
Declares a resource requirement for a plugin.
4
-
Can be defined statically in a manifest or dynamically via getResourceRequirements().
4
+
Narrows the generated base: type → ResourceType enum, permission → ResourcePermission union.
5
+
6
+
## Extends
7
+
8
+
-`ResourceRequirement`
5
9
6
10
## Extended by
7
11
@@ -15,7 +19,13 @@ Can be defined statically in a manifest or dynamically via getResourceRequiremen
15
19
alias: string;
16
20
```
17
21
18
-
Unique alias for this resource within the plugin (e.g., 'warehouse', 'secrets'). Used for UI/display.
22
+
Human-readable label for UI/display only. Deduplication uses resourceKey, not alias.
23
+
24
+
#### Inherited from
25
+
26
+
```ts
27
+
SharedResourceRequirement.alias
28
+
```
19
29
20
30
***
21
31
@@ -27,6 +37,12 @@ description: string;
27
37
28
38
Human-readable description of why this resource is needed
29
39
40
+
#### Inherited from
41
+
42
+
```ts
43
+
SharedResourceRequirement.description
44
+
```
45
+
30
46
***
31
47
32
48
### fields
@@ -35,8 +51,13 @@ Human-readable description of why this resource is needed
35
51
fields: Record<string, ResourceFieldEntry>;
36
52
```
37
53
38
-
Map of field name to env and optional description.
39
-
Single-value types use one key (e.g. id); multi-value (database, secret) use multiple keys.
54
+
Map of field name to env and optional description. Single-value types use one key (e.g. id); multi-value (database, secret) use multiple (e.g. instance_name, database_name or scope, key).
55
+
56
+
#### Inherited from
57
+
58
+
```ts
59
+
SharedResourceRequirement.fields
60
+
```
40
61
41
62
***
42
63
@@ -46,7 +67,13 @@ Single-value types use one key (e.g. id); multi-value (database, secret) use mul
46
67
permission: ResourcePermission;
47
68
```
48
69
49
-
Required permission level for the resource
70
+
Required permission level for the resource (narrowed to union)
71
+
72
+
#### Overrides
73
+
74
+
```ts
75
+
SharedResourceRequirement.permission
76
+
```
50
77
51
78
***
52
79
@@ -56,7 +83,11 @@ Required permission level for the resource
56
83
required: boolean;
57
84
```
58
85
59
-
Whether this resource is required (true) or optional (false)
86
+
#### Inherited from
87
+
88
+
```ts
89
+
SharedResourceRequirement.required
90
+
```
60
91
61
92
***
62
93
@@ -66,7 +97,13 @@ Whether this resource is required (true) or optional (false)
66
97
resourceKey: string;
67
98
```
68
99
69
-
Stable key for machine use (env naming, composite keys, app.yaml). Required.
100
+
Stable key for machine use: deduplication, env naming, composite keys, app.yaml. Required for registry lookup.
101
+
102
+
#### Inherited from
103
+
104
+
```ts
105
+
SharedResourceRequirement.resourceKey
106
+
```
70
107
71
108
***
72
109
@@ -76,4 +113,10 @@ Stable key for machine use (env naming, composite keys, app.yaml). Required.
76
113
type: ResourceType;
77
114
```
78
115
79
-
Type of Databricks resource required
116
+
Type of Databricks resource required (narrowed to enum)
Copy file name to clipboardExpand all lines: docs/docs/api/appkit/index.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,12 +36,12 @@ plugin architecture, and React integration.
36
36
|[GenerateDatabaseCredentialRequest](Interface.GenerateDatabaseCredentialRequest.md)| Request parameters for generating database OAuth credentials |
37
37
|[ITelemetry](Interface.ITelemetry.md)| Plugin-facing interface for OpenTelemetry instrumentation. Provides a thin abstraction over OpenTelemetry APIs for plugins. |
38
38
|[LakebasePoolConfig](Interface.LakebasePoolConfig.md)| Configuration for creating a Lakebase connection pool |
39
-
|[PluginManifest](Interface.PluginManifest.md)| Plugin manifest that declares metadata and resource requirements. Attached to plugin classes as a static property. |
39
+
|[PluginManifest](Interface.PluginManifest.md)| Plugin manifest that declares metadata and resource requirements. Extends the shared PluginManifest with strict resource types. |
40
40
|[RequestedClaims](Interface.RequestedClaims.md)| Optional claims for fine-grained Unity Catalog table permissions When specified, the returned token will be scoped to only the requested tables |
41
41
|[RequestedResource](Interface.RequestedResource.md)| Resource to request permissions for in Unity Catalog |
42
42
|[ResourceEntry](Interface.ResourceEntry.md)| Internal representation of a resource in the registry. Extends ResourceRequirement with resolution state and plugin ownership. |
43
-
|[ResourceFieldEntry](Interface.ResourceFieldEntry.md)|Defines a single field for a resource. Each field has its own environment variable and optional description. Single-value types use one key (e.g. id); multi-value types (database, secret) use multiple (e.g. instance_name, database_name or scope, key).|
44
-
|[ResourceRequirement](Interface.ResourceRequirement.md)| Declares a resource requirement for a plugin. Can be defined statically in a manifest or dynamically via getResourceRequirements(). |
|[ResourceRequirement](Interface.ResourceRequirement.md)| Declares a resource requirement for a plugin. Narrows the generated base: type → ResourceType enum, permission → ResourcePermission union. |
45
45
|[StreamExecutionSettings](Interface.StreamExecutionSettings.md)| Configuration for streaming execution with default and user-scoped settings |
46
46
|[TelemetryConfig](Interface.TelemetryConfig.md)| OpenTelemetry configuration for AppKit applications |
47
47
|[ValidationResult](Interface.ValidationResult.md)| Result of validating all registered resources against the environment. |
0 commit comments