diff --git a/plugins/scaffolder/api-report.md b/plugins/scaffolder/api-report.md index 82a8dfd8d3..db0fb7412a 100644 --- a/plugins/scaffolder/api-report.md +++ b/plugins/scaffolder/api-report.md @@ -69,7 +69,23 @@ export type CustomFieldValidator = CustomFieldValidator_2; // @public +<<<<<<< HEAD export const EntityNamePickerFieldExtension: FieldExtensionComponent_2< +======= +export type CustomFieldValidator = ( + data: TFieldReturnValue, + field: FieldValidation, + context: { + apiHolder: ApiHolder; + }, +) => void | Promise; + +// @alpha (undocumented) +export const EmbeddableWorkflow: (props: WorkflowProps) => JSX.Element; + +// @public +export const EntityNamePickerFieldExtension: FieldExtensionComponent< +>>>>>>> b2747a3f35 (api-reports) string, {} >; @@ -282,6 +298,20 @@ export const OwnerPickerFieldSchema: FieldSchema< // @public export type OwnerPickerUiOptions = typeof OwnerPickerFieldSchema.uiOptionsType; +// @alpha (undocumented) +export interface ParsedTemplateSchema { + // (undocumented) + description?: string; + // (undocumented) + mergedSchema: JsonObject; + // (undocumented) + schema: JsonObject; + // (undocumented) + title: string; + // (undocumented) + uiSchema: UiSchema; +} + // @public export const repoPickerValidation: ( value: string, @@ -347,6 +377,14 @@ export const RepoUrlPickerFieldSchema: FieldSchema< export type RepoUrlPickerUiOptions = typeof RepoUrlPickerFieldSchema.uiOptionsType; +// @alpha (undocumented) +export interface ReviewStateProps { + // (undocumented) + formState: JsonObject; + // (undocumented) + schemas: ParsedTemplateSchema[]; +} + // @public export type ReviewStepProps = { disableButtons: boolean; @@ -526,6 +564,40 @@ export type TemplateParameterSchema = TemplateParameterSchema_2; // @public export const TemplateTypePicker: () => JSX.Element | null; +<<<<<<< HEAD // @public @deprecated (undocumented) export const useTemplateSecrets: () => ScaffolderUseTemplateSecrets_2; +======= +// @alpha +export const useGetCustomFields: ( + element: React_2.ReactNode, +) => NextFieldExtensionOptions[]; + +// @public +export const useTemplateSecrets: () => ScaffolderUseTemplateSecrets; + +// @alpha (undocumented) +export interface WorkflowProps { + // (undocumented) + customFieldExtensions: NextFieldExtensionOptions[]; + // (undocumented) + description?: string; + // (undocumented) + initialFormState?: Record; + // (undocumented) + namespace: string; + // (undocumented) + onComplete: (values: Record) => Promise; + // (undocumented) + onError(error: Error | undefined): JSX.Element | null; + // (undocumented) + ReviewStateWrapper?: (props: ReviewStateProps) => JSX.Element; + // (undocumented) + templateName: string; + // (undocumented) + title?: string; + // (undocumented) + transformErrors?: ErrorTransformer; +} +>>>>>>> b2747a3f35 (api-reports) ``` diff --git a/plugins/scaffolder/src/index.ts b/plugins/scaffolder/src/index.ts index 8488ac8a22..6ae4e280cf 100644 --- a/plugins/scaffolder/src/index.ts +++ b/plugins/scaffolder/src/index.ts @@ -49,6 +49,8 @@ export { EmbeddableWorkflow, useGetCustomFields, type WorkflowProps, + type ReviewStateProps, + type ParsedTemplateSchema, } from './next'; export type { NextRouterProps } from './next'; export type { TemplateGroupFilter } from './next'; diff --git a/plugins/scaffolder/src/next/Workflow/Workflow.tsx b/plugins/scaffolder/src/next/Workflow/Workflow.tsx index 6a71657a9d..6a3af93714 100644 --- a/plugins/scaffolder/src/next/Workflow/Workflow.tsx +++ b/plugins/scaffolder/src/next/Workflow/Workflow.tsx @@ -48,6 +48,9 @@ const useStyles = makeStyles(() => ({ }, })); +/** + * @alpha + */ export interface WorkflowProps { title?: string; description?: string; @@ -118,6 +121,9 @@ export const Workflow = ({ ); }; +/** + * @alpha + */ export const EmbeddableWorkflow = (props: WorkflowProps) => (