import React from "react"; import { z } from "zod"; import { type ExtensionInstanceModelContext } from "../defineExtension/index.js"; import { type AppName } from "../abstractions/types.js"; export type ExtensionTags = { [key: string]: string | undefined; appName?: AppName; runtimeContext?: "app-build" | "project" | "cli" | "pulumi"; }; export interface DefineExtensionParams { type: string; tags: ExtensionTags; description?: string; multiple?: boolean; paramsSchema?: TParamsSchema | ((ctx: ExtensionInstanceModelContext) => TParamsSchema); build?: (params: z.infer, ctx: ExtensionInstanceModelContext) => Promise | void; validate?: (params: z.infer) => Promise | void; render?: (props: z.infer & { remove?: boolean; before?: string; after?: string; name?: string; }) => React.ReactNode; }