Skip to main content

TemplateActionOptions

Home > @backstage/plugin-scaffolder-node > TemplateActionOptions

Signature:

export type TemplateActionOptions<TActionInput extends JsonObject = {}, TActionOutput extends JsonObject = {}, TInputSchema extends JsonObject | z.ZodType | {
[key in string]: (zImpl: typeof z) => z.ZodType;
} = JsonObject, TOutputSchema extends JsonObject | z.ZodType | {
[key in string]: (zImpl: typeof z) => z.ZodType;
} = JsonObject, TSchemaType extends 'v1' | 'v2' = 'v1' | 'v2'> = {
id: string;
description?: string;
examples?: TemplateExample[];
supportsDryRun?: boolean;
schema?: {
input?: TInputSchema;
output?: TOutputSchema;
};
handler: (ctx: ActionContext<TActionInput, TActionOutput, TSchemaType>) => Promise<void>;
};

References: JsonObject, TemplateExample, ActionContext