chore: fixing api reports for a cleanup
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -17,6 +17,7 @@ import { AnyApiRef } from '@backstage/core-plugin-api';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import { z } from 'zod';
|
||||
|
||||
/** @alpha */
|
||||
export type ScaffolderFormDecoratorContext<TInput> = {
|
||||
input: TInput;
|
||||
formState: Record<string, JsonValue>;
|
||||
@@ -29,6 +30,7 @@ export type ScaffolderFormDecoratorContext<TInput> = {
|
||||
) => void;
|
||||
};
|
||||
|
||||
/** @alpha */
|
||||
export type ScaffolderFormDecorator<
|
||||
TInputSchema extends { [key in string]: (zImpl: typeof z) => z.ZodType } = {},
|
||||
TDeps extends { [key in string]: AnyApiRef } = { [key in string]: AnyApiRef },
|
||||
@@ -53,7 +55,7 @@ export type ScaffolderFormDecorator<
|
||||
/**
|
||||
* Method for creating decorators which can be used to collect
|
||||
* secrets from the user before submitting to the backend.
|
||||
* @public
|
||||
* @alpha
|
||||
*/
|
||||
export function createScaffolderFormDecorator<
|
||||
TDeps extends { [key in string]: AnyApiRef },
|
||||
|
||||
@@ -17,11 +17,14 @@
|
||||
import useAsync from 'react-use/esm/useAsync';
|
||||
import { scaffolderApiRef } from '../../api/ref';
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
import { TemplateParameterSchema } from '@backstage/plugin-scaffolder-react';
|
||||
|
||||
/**
|
||||
* @alpha
|
||||
*/
|
||||
export const useTemplateParameterSchema = (templateRef: string) => {
|
||||
export const useTemplateParameterSchema = (
|
||||
templateRef: string,
|
||||
): { manifest?: TemplateParameterSchema; loading: boolean; error?: Error } => {
|
||||
const scaffolderApi = useApi(scaffolderApiRef);
|
||||
const {
|
||||
value: manifest,
|
||||
|
||||
Reference in New Issue
Block a user