@backstage/backend-plugin-api 1.8.1-next.0 → 1.9.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/alpha.d.ts +19 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @backstage/backend-plugin-api
|
|
2
2
|
|
|
3
|
+
## 1.9.0-next.1
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4559806: Added support for typed `examples` on actions registered via the actions registry. Action authors can now provide examples with compile-time-checked `input` and `output` values that match their schema definitions.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @backstage/plugin-auth-node@0.7.0-next.1
|
|
13
|
+
- @backstage/plugin-permission-node@0.10.12-next.1
|
|
14
|
+
|
|
3
15
|
## 1.8.1-next.0
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/alpha.d.ts
CHANGED
|
@@ -22,6 +22,17 @@ type ActionsRegistryActionContext<TInputSchema extends AnyZodObject> = {
|
|
|
22
22
|
logger: LoggerService;
|
|
23
23
|
credentials: BackstageCredentials;
|
|
24
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* An example of how to use an action registered in the actions registry.
|
|
27
|
+
*
|
|
28
|
+
* @alpha
|
|
29
|
+
*/
|
|
30
|
+
type ActionsRegistryActionExample<TInputSchema extends AnyZodObject, TOutputSchema extends AnyZodObject> = {
|
|
31
|
+
title: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
input: z.infer<TInputSchema>;
|
|
34
|
+
output?: z.infer<TOutputSchema>;
|
|
35
|
+
};
|
|
25
36
|
/**
|
|
26
37
|
* @alpha
|
|
27
38
|
*/
|
|
@@ -33,6 +44,7 @@ type ActionsRegistryActionOptions<TInputSchema extends AnyZodObject, TOutputSche
|
|
|
33
44
|
input: (zod: typeof z) => TInputSchema;
|
|
34
45
|
output: (zod: typeof z) => TOutputSchema;
|
|
35
46
|
};
|
|
47
|
+
examples?: Array<ActionsRegistryActionExample<TInputSchema, TOutputSchema>>;
|
|
36
48
|
visibilityPermission?: BasicPermission;
|
|
37
49
|
attributes?: {
|
|
38
50
|
destructive?: boolean;
|
|
@@ -63,6 +75,12 @@ type ActionsServiceAction = {
|
|
|
63
75
|
input: JSONSchema7;
|
|
64
76
|
output: JSONSchema7;
|
|
65
77
|
};
|
|
78
|
+
examples?: Array<{
|
|
79
|
+
title: string;
|
|
80
|
+
description?: string;
|
|
81
|
+
input: JsonObject;
|
|
82
|
+
output?: JsonObject;
|
|
83
|
+
}>;
|
|
66
84
|
attributes: {
|
|
67
85
|
readOnly: boolean;
|
|
68
86
|
destructive: boolean;
|
|
@@ -303,4 +321,4 @@ declare const rootSystemMetadataServiceRef: _backstage_backend_plugin_api.Servic
|
|
|
303
321
|
declare const metricsServiceRef: _backstage_backend_plugin_api.ServiceRef<MetricsService, "plugin", "singleton">;
|
|
304
322
|
|
|
305
323
|
export { actionsRegistryServiceRef, actionsServiceRef, metricsServiceRef, rootSystemMetadataServiceRef };
|
|
306
|
-
export type { ActionsRegistryActionContext, ActionsRegistryActionOptions, ActionsRegistryService, ActionsService, ActionsServiceAction, MetricAdvice, MetricAttributeValue, MetricAttributes, MetricOptions, MetricsService, MetricsServiceCounter, MetricsServiceGauge, MetricsServiceHistogram, MetricsServiceObservable, MetricsServiceObservableCallback, MetricsServiceObservableCounter, MetricsServiceObservableGauge, MetricsServiceObservableResult, MetricsServiceObservableUpDownCounter, MetricsServiceUpDownCounter, RootSystemMetadataService, RootSystemMetadataServicePluginInfo };
|
|
324
|
+
export type { ActionsRegistryActionContext, ActionsRegistryActionExample, ActionsRegistryActionOptions, ActionsRegistryService, ActionsService, ActionsServiceAction, MetricAdvice, MetricAttributeValue, MetricAttributes, MetricOptions, MetricsService, MetricsServiceCounter, MetricsServiceGauge, MetricsServiceHistogram, MetricsServiceObservable, MetricsServiceObservableCallback, MetricsServiceObservableCounter, MetricsServiceObservableGauge, MetricsServiceObservableResult, MetricsServiceObservableUpDownCounter, MetricsServiceUpDownCounter, RootSystemMetadataService, RootSystemMetadataServicePluginInfo };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/backend-plugin-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0-next.1",
|
|
4
4
|
"description": "Core API used by Backstage backend plugins",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "node-library"
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
"@backstage/cli-common": "0.2.1-next.0",
|
|
69
69
|
"@backstage/config": "1.3.6",
|
|
70
70
|
"@backstage/errors": "1.2.7",
|
|
71
|
-
"@backstage/plugin-auth-node": "0.
|
|
71
|
+
"@backstage/plugin-auth-node": "0.7.0-next.1",
|
|
72
72
|
"@backstage/plugin-permission-common": "0.9.7",
|
|
73
|
-
"@backstage/plugin-permission-node": "0.10.12-next.
|
|
73
|
+
"@backstage/plugin-permission-node": "0.10.12-next.1",
|
|
74
74
|
"@backstage/types": "1.2.2",
|
|
75
75
|
"@types/express": "^4.17.6",
|
|
76
76
|
"@types/json-schema": "^7.0.6",
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"zod": "^3.25.76 || ^4.0.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@backstage/backend-test-utils": "1.11.2-next.
|
|
85
|
-
"@backstage/cli": "0.36.1-next.
|
|
84
|
+
"@backstage/backend-test-utils": "1.11.2-next.1",
|
|
85
|
+
"@backstage/cli": "0.36.1-next.1"
|
|
86
86
|
},
|
|
87
87
|
"configSchema": "config.d.ts"
|
|
88
88
|
}
|